geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomasz Mazan <win...@wp.pl>
Subject Module dependencies and classloaders
Date Wed, 26 Sep 2007 15:18:14 GMT

I'm trouble with module dependencies and classloaders - it's a big
aggravation during development.
I'll try to describe my application architecture:

CoreApplication.ear - main application
 |- ModuleDao.jar - contains EJB3 entities and DAO layer (SessionBeans)
 \- ModuleServices.jar - SessionBeans with business logic and WebServices

Dispatcher.jar - application that dispatches requests from CoreApplication
to subsystems
 Contains all dispatcher classes and compiles classes of EJB entities 

Using deployment descriptors I've defined dependencies, so CoreApplication
depends on Dispatcher.
So you see that EJB entities are included in 2 modules, and - what is
strange to me - CoreApplication uses those loaded with Dispatcher. I've
checked it changing those classes and redeploying CoreApplication. I tried
also put <hidden-classes> to deployment descriptors of:
- Core Application
- ModuleDao
- ModuleServices
but it caused exception like:

17:03:15,453 ERROR [OpenEJB] The bean instance null threw a system
exception:java.lang.LinkageError: Class core/dao/ejb3/Product violates
loader constraints
java.lang.LinkageError: Class core/dao/ejb3/Product violates loader
constraints
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
	at java.lang.Class.getDeclaredMethod(Class.java:1907)
	at java.io.ObjectStreamClass.getPrivateMethod(ObjectStreamClass.java:1354)
	at java.io.ObjectStreamClass.access$1700(ObjectStreamClass.java:52)
	at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:421)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:400)
	at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:297)
	at java.io.ObjectStreamClass.initProxy(ObjectStreamClass.java:491)
	at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1508)
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1463)
	at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
	at
org.apache.openejb.core.ivm.naming.CrossClassLoaderJndiReference.copy(CrossClassLoaderJndiReference.java:53)
	at
org.apache.openejb.core.ivm.naming.CrossClassLoaderJndiReference.getObject(CrossClassLoaderJndiReference.java:36)
	at
org.apache.openejb.core.ivm.naming.Reference.getContent(Reference.java:40)
	at org.apache.xbean.naming.context.ContextUtil.resolve(ContextUtil.java:61)
	at
org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.java:112)
	at
org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.java:597)
	at
org.apache.openejb.core.stateless.StatelessInstanceManager.fillInjectionProperties(StatelessInstanceManager.java:204)
	at
org.apache.openejb.core.stateless.StatelessInstanceManager.getInstance(StatelessInstanceManager.java:127)
	at
org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:156)
	at
org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:211)
	at
org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:65)
	at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:320)
	at
org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
	at $Proxy103.createCustomer(Unknown Source)
	

I would be happy to could redeploy changes in ejb3 entites (let's say - only
methods body) for CoreApplication.ear with no need to redeploying
Dispatcher. Is it possibly or should I entirelly change my way ?

regards
Beniamin
-- 
View this message in context: http://www.nabble.com/Module-dependencies-and-classloaders-tf4523003s134.html#a12903190
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message