users@glassfish.java.net

RuntimeException after relocating Glassfish installation

From: <forums_at_java.net>
Date: Mon, 30 Jan 2012 23:44:40 -0600 (CST)

I have a working (no exceptions on startup) installation of Glassfish 3.1.1
with all my applications deployed.  I wanted to relocate it so I copied and
pasted the Glassfish directory (glassfish-3.1.1), along with my domain, and
deleted the osgi-cache directory from my domain.  This is the way I used to
do it with Glassfish 3.1 and never had this issue.  When I start my domain
at this new location none of my applications load.  I see the following
exception for each of my applications:

[#|2012-01-30T21:28:28.658-0800|SEVERE|oracle-glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=10;_ThreadName=Thread-3;|Exception
while invoking class org.glassfish.extras.osgicontainer.OSGiDeployer load
method
java.lang.RuntimeException: Unable to determine bundle corresponding to
application location
/Users/me/Documents/glassfish-3.1.1/glassfish/domains/mydomain/applications/my-app
    at
org.glassfish.extras.osgicontainer.OSGiDeployer.getApplicationBundle(OSGiDeployer.java:128)
    at
org.glassfish.extras.osgicontainer.OSGiDeployer.load(OSGiDeployer.java:68)
    at
org.glassfish.extras.osgicontainer.OSGiDeployer.load(OSGiDeployer.java:62)
    at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:186)
    at
org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:257)
    at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
    at
com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:375)
    at
com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:219)
    at
com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131)
    at
com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
    at
com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
    at
com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
    at
com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
    at
com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:76)
    at
com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:253)
    at
com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:145)
    at
com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:136)
    at
com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
    at
com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63)
    at
com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishImpl.start(OSGiGlassFishImpl.java:69)
    at
com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:117)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
    at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)

The workaround I'm using to get the relocated server to work is KEEPING the
osgi-cache directory from the original Glassfish location but
correcting/replacing all the file paths in the .info, .properties, and
.location files.

Is there a better/different way to relocate an installation of Glassfish
3.1.1?


--
[Message sent by forum member 'shralpfx']
View Post: http://forums.java.net/node/883131