Grails

Unable to use Glassfish re-deploy with Grails 1.2M3 application

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.2-M3
  • Fix Version/s: 1.2 final
  • Component/s: None
  • Labels:
    None
  • Environment:
    WINDOWS SP sp2, Glassfish v2.1, NetBeans 6.7.1

Description

Using Netbeans 6.7.1, Glassfish v2.1, WINDOWS Xp sp2. Default installation of Netbeans and Glassfish (but uses http port 8081)

In NetBeans: create new Grails project, uninstall-plugin tomcat (not sure if this was essential but I believe it is), create new domain
class (Person, with Strings name, givenName and familyName), ran generate-all, build GrailsApp2.war

Ran Glassfish from command prompt, and admin console from browser (Opera or Firefox); Common Tasks -> Web Applications (empty), press Deploy button and Browse for GrailsApp2.war and press OK - then goes to processing for some seconds. Returns to Web Applications page with GrailsApp2 showing. Press Launch, GrailsApp2 runs. Close GrailsApp2 page.

Return to Glassfish WebApplications page, press Redeploy button against GrailsApp2. after a few seconds popup is displayed "An error has occurred Deploying application in domain failed; N/A N/A" as attached

Click on Cancel and return to WebApplications with no application entry present (GrailsApp2 not present)

But trying to stop glassfish (asadmin stop-domain domain1) returns

java.lang.NullPointerException
CLI157 Could not stop the domain domain1.

I cannot find a Glassfish log file with any relevant entries

(I have not extensively tested with Tomcat 6, but I believe that it will re-deploy correctly)

In previous versions of Grails I have regularly used the re-deploy facility without this sort of problem.

  1. jvm.log_macosx.txt
    16/Dec/09 8:54 AM
    16 kB
    Mike Gaston
  2. jvm.log_Ubuntu.txt
    16/Dec/09 8:54 AM
    18 kB
    Mike Gaston
  1. gferror.jpg
    210 kB
    05/Oct/09 3:42 PM

Activity

Hide
Jeffrey Brayne added a comment -

It's the same on Solaris.

Show
Jeffrey Brayne added a comment - It's the same on Solaris.
Hide
Mike Gaston added a comment -

Identical issue is happening on Solaris10/SPARC servers with GF 2.1.1 and Grails-1.2.0.RC1

Show
Mike Gaston added a comment - Identical issue is happening on Solaris10/SPARC servers with GF 2.1.1 and Grails-1.2.0.RC1
Hide
Graeme Rocher added a comment -

Glassfish isn't providing any useful error messages unfortunately. If someone on the Glassfish team can tell me what this means we may get somewhere:

recursive call into SystemOutandErrhandler
java.lang.RuntimeException: recursivecall
	at com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingByteArrayOutputStream.flush(SystemOutandErrHandler.java:359)
	at java.io.PrintStream.write(PrintStream.java:432)
	at com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingPrintStream.write(SystemOutandErrHandler.java:293)
	at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
	at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
	at sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:85)
	at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:168)
	at java.io.PrintStream.write(PrintStream.java:477)
	at java.io.PrintStream.print(PrintStream.java:619)
	at com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingPrintStream.print(SystemOutandErrHandler.java:205)
	at java.io.PrintStream.println(PrintStream.java:756)
	at com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingPrintStream.println(SystemOutandErrHandler.java:187)
	at com.sun.webui.jsf.component.Selector.log(Selector.java:415)
	at com.sun.webui.jsf.component.ListSelector.markSelectedListItems(ListSelector.java:440)
	at com.sun.webui.jsf.component.ListSelector.processSelections(ListSelector.java:346)
	at com.sun.webui.jsf.component.ListSelector.getListItems(ListSelector.java:137)
	at com.sun.webui.jsf.renderkit.html.ListRendererBase.renderList(ListRendererBase.java:386)
	at com.sun.webui.jsf.renderkit.html.ListRendererBase.renderListComponent(ListRendererBase.java:178)
	at com.sun.webui.jsf.renderkit.html.DropDownRenderer.encodeEnd(DropDownRenderer.java:94)
	at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861)
	at com.sun.webui.jsf.util.RenderingUtilities.renderComponent(RenderingUtilities.java:99)
	at com.sun.webui.jsf.renderkit.html.PropertyRenderer.renderPropertyComponents(PropertyRenderer.java:200)
	at com.sun.webui.jsf.renderkit.html.PropertyRenderer.encodeEnd(PropertyRenderer.java:161)
	at javax.faces.com
Show
Graeme Rocher added a comment - Glassfish isn't providing any useful error messages unfortunately. If someone on the Glassfish team can tell me what this means we may get somewhere:
recursive call into SystemOutandErrhandler
java.lang.RuntimeException: recursivecall
	at com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingByteArrayOutputStream.flush(SystemOutandErrHandler.java:359)
	at java.io.PrintStream.write(PrintStream.java:432)
	at com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingPrintStream.write(SystemOutandErrHandler.java:293)
	at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
	at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
	at sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:85)
	at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:168)
	at java.io.PrintStream.write(PrintStream.java:477)
	at java.io.PrintStream.print(PrintStream.java:619)
	at com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingPrintStream.print(SystemOutandErrHandler.java:205)
	at java.io.PrintStream.println(PrintStream.java:756)
	at com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingPrintStream.println(SystemOutandErrHandler.java:187)
	at com.sun.webui.jsf.component.Selector.log(Selector.java:415)
	at com.sun.webui.jsf.component.ListSelector.markSelectedListItems(ListSelector.java:440)
	at com.sun.webui.jsf.component.ListSelector.processSelections(ListSelector.java:346)
	at com.sun.webui.jsf.component.ListSelector.getListItems(ListSelector.java:137)
	at com.sun.webui.jsf.renderkit.html.ListRendererBase.renderList(ListRendererBase.java:386)
	at com.sun.webui.jsf.renderkit.html.ListRendererBase.renderListComponent(ListRendererBase.java:178)
	at com.sun.webui.jsf.renderkit.html.DropDownRenderer.encodeEnd(DropDownRenderer.java:94)
	at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861)
	at com.sun.webui.jsf.util.RenderingUtilities.renderComponent(RenderingUtilities.java:99)
	at com.sun.webui.jsf.renderkit.html.PropertyRenderer.renderPropertyComponents(PropertyRenderer.java:200)
	at com.sun.webui.jsf.renderkit.html.PropertyRenderer.encodeEnd(PropertyRenderer.java:161)
	at javax.faces.com
Hide
Vivek Pandey added a comment -

To see whats going on GlassFish side, which build of Grails should I try? I am not able to find 1.2 M3 build. Is 1.2 RC1 is the build I should try?

Show
Vivek Pandey added a comment - To see whats going on GlassFish side, which build of Grails should I try? I am not able to find 1.2 M3 build. Is 1.2 RC1 is the build I should try?
Hide
Sebastian Hohns added a comment -

Had the same problem on Debian stable with Glassfish 2.1. I did the update to Glassfishv3 last weekend and
the problem disappeared. Looks like they solved this before the final, no idea if they backport anything to 2.1.

Show
Sebastian Hohns added a comment - Had the same problem on Debian stable with Glassfish 2.1. I did the update to Glassfishv3 last weekend and the problem disappeared. Looks like they solved this before the final, no idea if they backport anything to 2.1.
Hide
Vivek Pandey added a comment -

I tried with the latest glassfish v 2.1.1 from https://glassfish.dev.java.net/downloads/v2.1.1-final.html and I could redeploy just fine without any problem. I also tried GlassFish v3 final (https://glassfish.dev.java.net/downloads/v3-final.html) and could not reproduce the issue.

Can you try glassfish v2.1.1 from the above link and see if you still see the issue?

Show
Vivek Pandey added a comment - I tried with the latest glassfish v 2.1.1 from https://glassfish.dev.java.net/downloads/v2.1.1-final.html and I could redeploy just fine without any problem. I also tried GlassFish v3 final (https://glassfish.dev.java.net/downloads/v3-final.html) and could not reproduce the issue. Can you try glassfish v2.1.1 from the above link and see if you still see the issue?
Hide
Michael Mellinger added a comment -

RC1 now seems to deploy to both 2.1 and 2.1.1 on OpenSolaris/Solaris. On v2.1.1, Grails apps seem to deploy quicker and Grails doesn't appear to kill Glassfish after repeated deployments(yet).

Show
Michael Mellinger added a comment - RC1 now seems to deploy to both 2.1 and 2.1.1 on OpenSolaris/Solaris. On v2.1.1, Grails apps seem to deploy quicker and Grails doesn't appear to kill Glassfish after repeated deployments(yet).
Hide
Graeme Rocher added a comment -

@Michael Interesting that was not my experience. I was able to reproduce the error on v2.1.1 on Mac OS X (I have not tested v3). However, since the problem seems to be intermittent and environment specific I don't consider this a blocker for the 1.2 release

Show
Graeme Rocher added a comment - @Michael Interesting that was not my experience. I was able to reproduce the error on v2.1.1 on Mac OS X (I have not tested v3). However, since the problem seems to be intermittent and environment specific I don't consider this a blocker for the 1.2 release
Hide
Vivek Pandey added a comment -

@Graeme: I could not reproduce on GlassFish v 2.1.1 or GlassFish v3. My env was grails 1.2. rc1, Mac OS X Snow leopard, java v6 u17. Both asadmin CLI and admin console can do redeploy of petclinic sample just fine. Not sure whats that causing this re-deployment failure in your env.

Show
Vivek Pandey added a comment - @Graeme: I could not reproduce on GlassFish v 2.1.1 or GlassFish v3. My env was grails 1.2. rc1, Mac OS X Snow leopard, java v6 u17. Both asadmin CLI and admin console can do redeploy of petclinic sample just fine. Not sure whats that causing this re-deployment failure in your env.
Hide
Mike Gaston added a comment -

I have reproduced the issue consistently on each of the following O/S and Platforms:

1. Mac OS/X 10.6 Snow Leopard, java 1.6.0_17 grails 1.2 rc1, glassfish 2.1.1 b31g
2. Solaris 10 SPARC (T2), Java 1.6.0_15, grails 1.2 rc1 and latest dev snapshot, glassfish 2.1.1 b31g (verified on 2 physical servers)
3. MS Windows XP, java 1.6.0_17, grails 1.2 rc1, glassfish 2.1.1 b31g

(I'm currently installing and testing the same on Solaris 10 x86 and Ubuntu 9.10)

Each of the above servers are patched current with latest OS patches and successfully run the same simple app under grails 1.1.x.

The test I ran on each server consisted of deploying a grails 1.2 app, attempting to undeploy/redeploy the app and then try to shutdown glassfish.
In each instance I receive:

java.lang.NullPointerException
CLI157 Could not stop the domain domain1.

and have to kill the process manually and restart the glassfish server.

Show
Mike Gaston added a comment - I have reproduced the issue consistently on each of the following O/S and Platforms: 1. Mac OS/X 10.6 Snow Leopard, java 1.6.0_17 grails 1.2 rc1, glassfish 2.1.1 b31g 2. Solaris 10 SPARC (T2), Java 1.6.0_15, grails 1.2 rc1 and latest dev snapshot, glassfish 2.1.1 b31g (verified on 2 physical servers) 3. MS Windows XP, java 1.6.0_17, grails 1.2 rc1, glassfish 2.1.1 b31g (I'm currently installing and testing the same on Solaris 10 x86 and Ubuntu 9.10) Each of the above servers are patched current with latest OS patches and successfully run the same simple app under grails 1.1.x. The test I ran on each server consisted of deploying a grails 1.2 app, attempting to undeploy/redeploy the app and then try to shutdown glassfish. In each instance I receive: java.lang.NullPointerException CLI157 Could not stop the domain domain1. and have to kill the process manually and restart the glassfish server.
Hide
Michael Mellinger added a comment -

I am consistently getting this on v2.1.

java.lang.NullPointerException
CLI157 Could not stop the domain domain1.

So far v2.1.1 seems stable. It might because I don't have other apps deployed to the server, and it is a clean install of GF.

Show
Michael Mellinger added a comment - I am consistently getting this on v2.1. java.lang.NullPointerException CLI157 Could not stop the domain domain1. So far v2.1.1 seems stable. It might because I don't have other apps deployed to the server, and it is a clean install of GF.
Hide
Mike Gaston added a comment -

Also consistently reproduced issue on:

Ubuntu 9.10, java 1.6.0_17, grails 1.2 rc1 & glassfish 2.1.1
Solaris 10 x86, java 1.6.0_17, grails 1.2 rc1 & glassfish 2.1.1

I used fresh install of OS, java, grails & glassfish with default configs and did notice on all platforms
that as soon as I deploy a 1.2 app I get messages in server.log that the app has been deployed and that Spring framework is loading but then all logging to server.log stops and I get grails dependency_failed errors in jvm.log (I will attach the jvm.log files from Mac and Linux to the ticket)

Show
Mike Gaston added a comment - Also consistently reproduced issue on: Ubuntu 9.10, java 1.6.0_17, grails 1.2 rc1 & glassfish 2.1.1 Solaris 10 x86, java 1.6.0_17, grails 1.2 rc1 & glassfish 2.1.1 I used fresh install of OS, java, grails & glassfish with default configs and did notice on all platforms that as soon as I deploy a 1.2 app I get messages in server.log that the app has been deployed and that Spring framework is loading but then all logging to server.log stops and I get grails dependency_failed errors in jvm.log (I will attach the jvm.log files from Mac and Linux to the ticket)
Hide
Mike Gaston added a comment -

Attaching jvm.log files.

Show
Mike Gaston added a comment - Attaching jvm.log files.
Hide
Mike Gaston added a comment -

I grabbed the development snapshot of 1.2.0 this morning and the problem is resolved on all of the platforms that I mentioned in previous comments.

Show
Mike Gaston added a comment - I grabbed the development snapshot of 1.2.0 this morning and the problem is resolved on all of the platforms that I mentioned in previous comments.
Hide
Graeme Rocher added a comment -

I'll mark this as closed then. Thanks for confirming

Show
Graeme Rocher added a comment - I'll mark this as closed then. Thanks for confirming

People

Vote (5)
Watch (6)

Dates

  • Created:
    Updated:
    Resolved: