users@glassfish.java.net

Re: Netbeans Automatic redeployment loops after upgrade to Glassfish 3.1.1

From: Tim Quinn <tim.quinn_at_oracle.com>
Date: Thu, 4 Aug 2011 16:21:17 -0500

This looks to be a side effect of a change in 3.1.1 that provides more
information to an admin client, such as the GlassFish admin console
and also IDEs.

Admin operations return status information in the HTTP response back
to the client. In the past a deployment that contained warnings (as
your redeployment does - thanks for providing that key piece of
information) was reported with a "success" status. Now it returns a
"warning" status, which means the deployment worked but some part of
the deployment reported a warning.

I am not sure why NetBeans is looping in this case, but I suspect it
has something to do with how it checks the reported status of the
operation that comes back from GlassFish.

- Tim

On Aug 4, 2011, at 9:24 AM, forums_at_java.net wrote:

> Hi.
>
> I had been working with GlassFish 3.1 and Netbeans 7with not much
> problems.
> I decided to upgrade to GF 3.1.1, so I went to Update Center and
> performed
> the update of all components that were there ready to be applied.
> Final
> Version is then 3.1.1-12.
>
> Now, I try to run the application I'm developing. Netbeans starts the
> deployment process and after a few seconds it says it fails. Below
> you can
> see the Netbeans Run log. Anyhow, the GF log shows all the
> deployment steps,
> and ends with a lines like :
>
> INFO: Initializing Mojarra 2.1.3 (FCS b02) for context '/
> TestCardServer'
> INFO: Instantiated an instance of
> org.hibernate.validator.engine.resolver.JPATraversableResolver.
> INFO: WEB0671: Loading application [TestCardServer] at [/
> TestCardServer]
>
> No more information is given. I open the browser and hit
> TestCardServer
> application, and there it is, running. So I start testing it. I can
> perform
> changes to the JSF pages without problem, and the changes are updated
> inmediately. But if I change the backing beans, Netbeans performs a
> redeployment. That will enter a never ending loop that requires me
> to restart
> netbeans (and the server of course) to be able to rerun application.
>
> This application is a very simple one that uses a couple of BUs, and
> will
> have some warnings at deployment as it will try to recreate the
> tables, but
> that was not affecting my work before when I had 3.1 that came with
> Netbeans
> 7. I mention this because the loop seems to be related to that, as
> it will
> logout of the BUs, then login and try the creation of tables, and
> then logout
> again and retry the whole thing after a few seconds. The application
> is never
> ready to work.
>
> The following is the log of the netbeans run. Attached I have the
> Glassfish
> log of the first deploy. The second attachement is the Glassfish log
> of the
> automatic redeploy netbeans tries to perform whenever I change a
> bean. They
> are basically the same, but the second one loops.
>
> Does anyone has an idea of what is happening?
>
> init:
> deps-module-jar:
> deps-ear-jar:
> deps-jar:
> Copying 4 files to
> D:\Dev\Avantica\Proyectos\PTT\JIRASVN\Enterprise\TestCards
> \TC2.0\TestCardServer\build\web
> library-inclusion-in-archive:
> library-inclusion-in-manifest:
> compile:
> compile-jsps:
> Starting GlassFish Server 3.1
> GlassFish Server 3.1 is running.
> Undeploying ...
> In-place deployment at
> D:\Dev\Avantica\Proyectos\PTT\JIRASVN\Enterprise\TestCards
> \TC2.0\TestCardServer\build\web
> Initializing...
> deploy?DEFAULT=D:\Dev\Avantica\Proyectos\PTT\JIRASVN\Enterprise
> \TestCards\TC2.0\TestCardServer\build
> \web&name=TestCardServer&force=true
> failed on GlassFish Server 3.1
>
> PER01003: Deployment encountered SQL Exceptions:
> PER01000: Got SQLException executing statement "CREATE TABLE
> PTTADMIN.USER_GROUPS (USER_NAME VARCHAR(16) NOT NULL, GROUP_NAME
> VARCHAR(16),
> PRIMARY KEY (USER_NAME))": java.sql.SQLException: Table/View
> 'USER_GROUPS'
> already exists in Schema 'PTTADMIN'.
> PER01000: Got SQLException executing statement "CREATE TABLE
> PTTADMIN.USERS (USER_NAME VARCHAR(16) NOT NULL, USER_PASS VARCHAR(16),
> PRIMARY KEY (USER_NAME))": java.sql.SQLException: Table/View 'USERS'
> already
> exists in Schema 'PTTADMIN'.
> Cannot create tables for application TestCardServer. The expected
> DDL file
> TestCardServer_TestCardServerPU_createDDL.jdbc is not available.
> (...)
> D:\Dev\Avantica\Proyectos\PTT\JIRASVN\Enterprise\TestCards
> \TC2.0\TestCardServer\nbproject\build-impl.xml:752:
> The module has not been deployed.
> at
> org
> .netbeans
> .modules
> .j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:187)
> at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:106)
> at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
> at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
> at
> sun
> .reflect
> .DelegatingMethodAccessorImpl
> .invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org
> .apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:
> 106)
> at org.apache.tools.ant.Task.perform(Task.java:348)
> at org.apache.tools.ant.Target.execute(Target.java:390)
> at org.apache.tools.ant.Target.performTasks(Target.java:411)
> at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
> at
> org
> .apache
> .tools
> .ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
> at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
> at
> org
> .apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:
> 284)
> at
> org
> .apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:
> 539)
> at
> org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:
> 154)
> BUILD FAILED (total time: 1 minute 20 seconds)
>
>
> --
>
> [Message sent by forum member 'wmartinez']
>
> View Post: http://forums.java.net/node/829349
>
>
>
> <First_Deploy.txt><Redeploy_Loop.txt>