db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Leppik <dlep...@vocalabs.com>
Subject [OJB] Issue #OJB174 - RepositoryPersistor can't construct public static nested cla...
Date Fri, 30 May 2003 17:41:48 GMT
You can view the issue detail at the following URL:
<http://scarab.werken.com/scarab/issues/id/OJB174>

Type :        Defect
Issue Id :    OJB174
Reported by: David Leppik
             dleppik - (dleppik@vocalabs.com)

Details:

Platform: All
Operating system: Suse
Summary: RepositoryPersistor can't construct public static nested classes
Description: I have a class with a nested FieldConversion so I can construct a typesafe enum
(as described in "Effective Java" by J. Bloch).  Trying to use the FieldConversion throws
an exception. The stack trace is below.  I've tested to verify that the class can be constructed
outside of its parent. I've also verified that changing it to a top-level class is an effective
(though ugly) workaround.

I can provide source code to reproduce this if necessary.

Stack trace:

java.lang.ExceptionInInitializerError: org.apache.ojb.broker.metadata.MetadataException: Could
not instantiate FieldConversion class using default constructor: com.vocalabs.crm.ContactEvent.SQLConversion
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:524)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
        at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
        at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:396)
        at org.apache.ojb.broker.metadata.RepositoryPersistor.buildRepository(Unknown Source)
        at org.apache.ojb.broker.metadata.RepositoryPersistor.readDescriptorRepository(Unknown
Source)
        at org.apache.ojb.broker.metadata.MetadataManager.init(Unknown Source)
        at org.apache.ojb.broker.metadata.MetadataManager.<init>(Unknown Source)
        at org.apache.ojb.broker.metadata.MetadataManager.<clinit>(Unknown Source)
        at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.buildDefaultKey(Unknown
Source)
        at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.<init>(Unknown
Source)
        at java.lang.Class.newInstance0(Native Method)
        at java.lang.Class.newInstance(Class.java:232)
        at org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.init(Unknown Source)
        at org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.<clinit>(Unknown
Source)
        at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown
Source)
        at com.vocalabs.crm.DBContext.login(DBContext.java:71)
        at com.vocalabs.crm.ArchiveableTest.testLoad(ArchiveableTest.java:26)
        at com.vocalabs.crm.ContactEventTest.main(ContactEventTest.java:42)
rethrown as org.apache.ojb.broker.metadata.MetadataException: Could not read repository class
descriptor data, using repository: repository.xml: Could not instantiate FieldConversion class
using default constructor: com.vocalabs.crm.ContactEvent.SQLConversion
        at org.apache.ojb.broker.metadata.MetadataManager.init(Unknown Source)
        at org.apache.ojb.broker.metadata.MetadataManager.<init>(Unknown Source)
        at org.apache.ojb.broker.metadata.MetadataManager.<clinit>(Unknown Source)
        at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.buildDefaultKey(Unknown
Source)
        at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.<init>(Unknown
Source)
        at java.lang.Class.newInstance0(Native Method)
        at java.lang.Class.newInstance(Class.java:232)
        at org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.init(Unknown Source)
        at org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.<clinit>(Unknown
Source)
        at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown
Source)
        at com.vocalabs.crm.DBContext.login(DBContext.java:71)
        at com.vocalabs.crm.ArchiveableTest.testLoad(ArchiveableTest.java:26)
        at com.vocalabs.crm.ContactEventTest.main(ContactEventTest.java:42)



Mime
View raw message