Hi,
 
    We are trying to pull a release together and have run into an
issue now that we are starting to test off of our developer machines
using an installer and jars rather than running from the classpath.
   
    We are using JOnAS 2.0 on NT. The problem is related to how we
specify our beans in the jonas.properties file. If we specify the
beans with a jar as such:
 
jonas.beans.descriptors d:\\p4src\\runner\\java\\dr_content_services_jonas_server.jar, \
                        d:\\p4src\\runner\\java\\dr_view_services_jonas.jar, \
                        ...
 
We have a problem. If we specify them with the XML file directly as such:
 
jonas.beans.descriptors d:\\p4src\\runner\\java\\com\\virtual\\runner\\ejb\\content\\ejb-jar.xml, \
                        d:\\p4src\\runner\\java\\com\\virtual\\runner\\ejb\\viewer\\ejb-jar.xml, \
                        ...
 
We don't have a problem. In BOTH cases the beans deploy fine and JOnAS starts
up and is happy. Some of the beans use other beans and this is where we have the
problem. In the case where we specify the jars rather than the .xml files
we get a class cast exception casting the home object we found from JNDI to it's
home interface.
 
         Object obj = caster.castHomeInterface(
            ic.lookup(_runnerLocation.getJNDIName()), SPIServerHome.class); /* this did the PortableRemoteObject.narrow() */
         spiHome = (SPIServerHome)obj;     <----- error here
 
When we use reflection to ask the object that we get back what it's interfaces are
it says it implements the SPIServerHome interface, but we still get a class cast exception
trying to cast to this interface.
 
The weird thing is this error appears to be caused by how we specify the beans. We can
simply switch the .jar specification to the .xml specification and rerun the server in the
exact same environment (classpath, VM, etc.) and the problem goes away.
 
Running with the jonas.properties file specified with .xml files is not a great option
for us because it means we need .xml files somewhere on the file system for all of
our beans. We really need to be able to run with the .xml files in jars.
 
I can't imagine specifying .xml versus .jar is the direct cause of the problem. I
think it's causing a side effect that is causing our problem, but I can't think of any
logical thing that would be causing this.
 
Any ideas?
 
Thanks,
Sean
 

Reply via email to