Hi Niclas, > Before trying to un-nest this situation I have a few questions; > > 1. "I have a main block which establishes a connection to a J2EE server", does > that mean you are running Merlin outside the J2EE container or you have > Merlin inside the J2EE container? If inside, then which container are we > talking about? And HOW are you starting up the Merlin system, i.e. in a > Stateful Session Bean or as some extension to the container?
Outside the container. The application is a Swing client - connecting to a session bean - the bean is deployed in JBoss. > 2. Are you using Magic to build the block? Or is the block hand assembled? Hand assembled. I'm using Maven to build the application. > 3. Can you forward an excerpt of the block xml that shows the problem you are > seeing? If the block is auto-generated by Magic, can you send the build.xml > for it as well? This is the main component's block.xml : <container name="NGCS"> <classloader> <classpath> <repository> <resource id="ngcs:NC.Core" version="1.0-rc1"/> <!-- <resource id="ngcs:NS.GroundHandling.Interfaces" version="1.0-rc1"/> --> <resource id="jboss:jboss-client" version="3.2.1"/> <resource id="jboss:jboss-j2ee" version="3.2.1"/> </repository> </classpath> </classloader> <component name="Application" class="com.ngcs.client.impl.MainWindow"/> </container> (The commented out file contains the Home interface for the EJB). This is the secondary block's block.xml. This block is dynamically loaded by Main. <?xml version="1.0"?> <container name="GroundHandling"> <classloader> <classpath> <repository> <resource id="ngcs:NC.Core" version="1.0-rc1"/> <resource id="ngcs:NS.GroundHandling.Interfaces" version="1.0-rc1"/> <resource id="jboss:jboss-j2ee" version="3.2.1"/> </repository> </classpath> </classloader> <component name="ULDBuildup" class="com.ngcs.client.groundhandling.ULDBuildupPanel"/> </container> The only module who uses the Home interface present in the NS.GroundHandling.Interfaces Jar is the ULDBuildupPanel class. Main does not have anything to do with this EJB. But since the InitialContext is established by Main, when I try looking up the EJB from the ULDBuildupPanel's start(), etc., I get a ClassNotFoundException (Home Interface). If I uncomment the above line in Main's block.xml, it works fine... ..Only explanation I could come up with is that Main's classloader is the parent, this classloader has loaded the JNDI InitialContext. But somewhere inside JBoss's client code is a Class.forName() or ClassLoader.getClass() specifying the Home interface's class name. This call fails because the Main block's ClassLoader never sees the Home interface (theory tested out by adding the NS.GroundHandling.Interfaces Jar to Main's classpath.. works fine...). Hope I'm getting the point across?? Brgds, R. Saravanan > Cheers > Niclas --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]