users@glassfish.java.net

Re: Glassfish 3.0.1 keeps running old app version after deploying new version

From: Noah White <emailnbw_at_gmail.com>
Date: Fri, 7 Sep 2012 09:38:12 -0400

Another option, short of re-installing GF which affects other apps and resources (JDBC connection pools etc.) would be to undeploy your application, then shutdown GF and then go to $GF_HOME/glassfish/domains/domain1 (or whatever domain you have deployed your app to) and then look in the Applications folder and delete your apps folder in there if its still there. Next, in the domain folder there is a folder named generated. Underneath that are four folders, ejb, jsp, policy and xml. Look in each of these folder and check to make sure there isn't a folder with the name of your app. If you see one then delete it. These steps will remove all the old code.


Finally, in the config directory edit the domain.xml file and remove any <application-ref> and <application> nodes associated with your application. You can locate these because <application-ref > will have a ref attribute with a value of the name of your app and <application > will have a context-root attribute corresponding to your apps context root. Undeploying the app will remove these entries from the domain.xml so honestly they should not be there but if you are running into a problem they might be.


-Noah

On Sep 7, 2012, at 9:22 AM, Hong Zhang <hong.hz.zhang_at_oracle.com> wrote:

> This is strange, undeploying an application should remove the application from service, and you tried restarting server which should remove anything that's in the memory. If you install a fresh GlassFish and try to deploy the new version directly, do you see exceptions?
>
> On 9/5/2012 6:47 AM, forums_at_java.net wrote:
>> Hi, we are using Glassfish 3.0.1 open source edition to serve some .WAR web
>> services. We had a bug on a previous version of one of the .WAR web services
>> that caused a null pointer exception on a given line of the source code. We
>> have fixed the bug in the last version of our .WAR web service, so the line
>> numbers in new and old source code files do not match anymore. We undeployed
>> the previous version and deployed the new one. Oddly, the application still
>> returns the same exception at the same line of the source code. It looks like
>> the application is still running the previous WAR file. Tried to restart
>> Glassfish service, to shutdown and restart the server, but nothing worked. We
>> have even tried to restore older versions that still did not have the bug,
>> but the exception is launched again and again, always at the same line.
>> Glassfish monitoring is enabled, but there is no error logged at all. Any
>> ideas? Thanks a lot in advance, jalons
>>
>> --
>>
>> [Message sent by forum member 'jalons']
>>
>> View Post: http://forums.java.net/node/889874
>>
>>