I've had a lot of trouble reproducing this problem, and haven't succeeded. 
Maybe something I changed on the way to getting anything to work incidently
fixed it.  What I did:

1. removed the incorrect classpath entry from the jboss-service.xml for
jmx-ejb-connector-server.jsr (the classes are in the jsr, you don't need a
classpath)

2. Added a jndi.properties file to the client directory so your test jar
would connect.  Added some stuff to my classpath so it would start.

At this point, step 3 in your jar gives ClassCastExceptions, no matter what
order I use to deploy/undeploy/redeploy the jsr and jar.

Further investigation reveals that the string to be looked up in jndi
(mOptions[0]) is empty or null.  I can't figure out what it is supposed to
be, so I stopped.

In the future you might consider writing your test code as JUnit unit
tests, descending from JBossTestCase, and running them from the testsuite
build.sh.  I have found for myself that this results in a much clearer idea
of what is working and what is not, and provides a reproducible way for
others to find problems and help solve them.

Thanks
david jencks


On 2001.09.13 16:00:20 -0400 Andreas Schaefer wrote:
> The problem is the following:
> 
> 1)
> - remove "deploy/lib/jmx-ejb-connector-server.jsr"
> - stop and start the JBoss server
> - deploy "jmx-ejb-adaptor.jar" to "deploy"
> - deploy "jmx-ejb-connector-server.jsr" to "deploy/lib"
>   where a Classloader will be created
> - copy jndi.properties to "client" and set URL
> - start "java -jar jmx-ejb-connector.jar" and let it run
>   until the notification listeners are registered
> some classes could not be found
> 
> 2)
> - stop the JBoss server
> - deploy "jmx-ejb-adaptor.jar" to "deploy"
> - deploy "jmx-ejb-connector-server.jsr" to "deploy/lib"
>   where a Classloader will be created
> - copy jndi.properties to "client" and set URL
> - stop and start the JBoss server
> - copy jndi.properties to "client" and set URL
> - start "java -jar jmx-ejb-connector.jar" and let it run
>   until the notification listeners are registered
> Now it is working.
> 
> Yes, the code is checked into CVS.
> 
> Andy
> 
> ----- Original Message -----
> From: "David Jencks" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, September 13, 2001 12:09 PM
> Subject: Re: [JBoss-dev] Dynamic Class loading for EJBs
> 
> 
> > I'm having a little trouble understanding what the problem is:
> >
> > is it
> >
> > deploy ejb-jar
> > deploy connector.jsr
> > ejb cannot find classes in connector.jsr
> >
> >
> > but
> >
> > deploy connector.jsr
> > deploy ejb-jar
> > ejb can find classes in connector.jsr
> >
> > ??
> >
> > Is the code with the problem checked in?  If you send it I'll take a
> look.
> >
> > thanks
> > david jencks
> >
> > On 2001.09.13 02:40:18 -0400 Andreas Schaefer wrote:
> > > Hi Geeks
> > >
> > > I run into a difficult problem when I tried to
> > > dynamically load classes for an EJB. In my
> > > case the EJB-Adaptor which does not know
> > > which client calls him and therefore cannot
> > > know which Stubs it has to load (RMI).
> > >
> > > I tried to create a simple JSR file containing
> > > these lines:
> > >   <classpath archives="
> > >     jmx-ejb-connector-server.jar
> > >   "/>
> > > The JSR then deployed create a ZClassLoader
> > > but the previously deployed EJB does not pick up
> > > the class. When the server is restarted I worked.
> > >
> > > Any ideas ?
> > >
> > > Andy
> > >
> > >
> > > _______________________________________________
> > > Jboss-development mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/jboss-development
> > >
> > >
> >
> > _______________________________________________
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-development
> >
> 
> 
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 
> 

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to