[jboss-user] [Installation, Configuration & DEPLOYMENT] - Static variable gets shared in 2 applications

sada1977 do-not-reply at jboss.com
Fri May 22 02:01:41 EDT 2009


Hi, 

I have two turbine appliactions deployed in JBoss 4.0.4GA default profile. Actually turbine jar is packaged seperately in 2 ears but still static variables in turbine servlet are getting shared between 2 applications. 

I have added jboss-app.xml in meta-inf of both ear files e.g. 
<jboss-app> 
<loader-repository> 
test:loader=test.ear 
<loader-repository-config> 
java2ParentDelegation=false 
</loader-repository-config> 
</loader-repository> 
</jboss-app> 

After adding above, applications are not getting deployed. It throws exception like, 
java.lang.NoClassDefFoundError: java/lang/Object
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
	at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:672)
	at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:652)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
I am not getting why this is not working? 
Can anybody gives solution? 

If I add above jboss-app.xml for test applications having only servlet(common to both) then it works fine (static var is not getting shared). But it doesn't work for my turbine application where there are too many jars ejbs etc. 

Please give suggestions if anybody has. 

Thanks in advance. 


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232621#4232621

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232621



More information about the jboss-user mailing list