> 
> Hi,
> 
> I'm having exactly the same problem. Modified the source to read:
> 
> List descriptors = connectionRepository().getAllDescriptor();
>         org.apache.ojb.broker.metadata.JdbcConnectionDescriptor descriptor;
>         for (Iterator iterator = descriptors.iterator(); iterator.hasNext();)
>         {
>           Object temp = iterator.next();
>           log.error("### Test 2: " + temp.getClass());
>             descriptor =
> (org.apache.ojb.broker.metadata.JdbcConnectionDescriptor) temp;
> 
> The output in the Jboss log reads:
> 
> 2004-05-31 22:01:52,970 ERROR [org.apache.ojb.broker.metadata.MetadataManager]
> ### Test 2: class org.apache.ojb.metadata.JdbcConnectionDescriptor
> 
> It's really weird since temp is exactly the same class as both the descriptor
> variable and the cast!.
> 

Seems like the problem was not with OJB, but with Jboss. 

Used the code from 
http://www.javaworld.com/javaworld/javaqa/2003-07/01-qa-0711-classsrc.html
to find out where the class were loaded from.

The classes for the objects from the iterator were loaded from:
jboss/server/all/tmp/deploy/tmp2436VideoStore.ear

The class of the descriptor variable was loaded from:
jboss/server/all/tmp/deploy/tmp2604VideoStore.ear

For some reason JBoss was loading code from different ear files during the same
session. Stopping JBoss to clean the tmp directory fixed the problem.

Cheers




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to