<text removed>
>
> Mark
>
> Armin Waibel <arminw <at> apache.org> wrote:
> Mark Spritzler wrote:
>
> > No there is only one jar file which is wrapped into the .war file that is
deployed.
> >
>
> Mark to verify my assumption, can you change line 558 in MetadataManager
> to force a log message, e.g.
>
> Object temp = iterator.next();
> log.error("## Test: " + temp.getClass);
> descriptor = (JdbcConnectionDescriptor) temp;
>
> then we can decide it's a bug in OJB or a class loader problem.
>
> regards,
> Armin
>
> > Mark
> >
> > Armin Waibel wrote:
> > Hi Mark,
> >
> >
> >>java.lang.ClassCastException at
> >>org.apache.ojb.broker.metadata.MetadataManager.buildDefaultKey(
> >>MetadataManager.java:558) at
> >>org.apache.ojb.broker.metadata.MetadataManager.init(
> >>MetadataManager.java:164) at
> >
> >
> > Here is the source code:
> > private PBKey buildDefaultKey()
> > {
> > List descriptors = connectionRepository().getAllDescriptor();
> > JdbcConnectionDescriptor descriptor;
> > for (Iterator iterator = descriptors.iterator(); iterator.hasNext();)
> > {
> > #### ===> descriptor = (JdbcConnectionDescriptor) iterator.next();
> > if (descriptor.isDefaultConnection())
> > ....
> >
> > this is really strange, because it's guaranteed that all iterated
> > objects are instance of class JdbcConnectionDescriptor. So I think it
> > could be a class loader problem. Is there more than one ojb.jar file in
> > classpath?
> >
> > regards,
> > Armin
<text removed>
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!.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]