|
I've got a very strange error cropping up when I try to run a simple
test program for OJB. Note that I can build and execute the JUnit
tests using the distribution and things work fine. However, when I
construct a simple batch file to include all the jar files from the ojb
"lib" directory and add in the directory that contains the properties
files I get a NullPointer exception during the parse due to
"isolation-level" being null. Now this appears to be an internal table
lookup, so I'm not sure how it can fail. Also, I copied the
repository.xml file from the OJB distribution as my starting point, so
the isolation-level attribute is being properly specified. I've
attached the debug output and the exception trace below. Any help or
insights would be appreciated. Thanks. --
Senior Vice President and CTO
Health Language, Inc. |
[org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl] DEBUG: PersistenceBroker pool will be setup with the following configuration # Trace object of class org.apache.commons.pool.impl.GenericKeyedObjectPool$Config: # maxIdle -1 # maxActive 100 # maxWait 2000 # whenExhaustedAction 0 # testOnBorrow false # testOnReturn false # testWhileIdle false # timeBetweenEvictionRunsMillis -1 # numTestsPerEvictionRun 10 # minEvictableIdleTimeMillis 1000000
[org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl] INFO: Create
PersistenceBroker instance pool, pool configuration was {whenExhaustedAction=0, ma
xIdle=-1, maxActive=100, maxWait=2000, removeAbandoned=false,
numTestsPerEvictionRun=10, testWhileIdle=false, minEvictableIdleTimeMillis=1000000,
testOnReturn=f
alse, logAbandoned=false, removeAbandonedTimeout=300,
timeBetweenEvictionRunsMillis=-1, testOnBorrow=false}
[org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: startDoc
[org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: > class-descriptor
[org.apache.ojb.broker.metadata.RepositoryXmlHandler] DEBUG: isolation-level: null
java.lang.ExceptionInInitializerError
at
org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.getDefaultKey(PersistenceBrokerFactoryBaseImpl.java:114)
at
org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker(PersistenceBrokerFactoryBaseImpl.java:196)
at
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(PersistenceBrokerFactory.java:104)
at com.staffmix.nurse.play.Application.<init>(Application.java:25)
at com.staffmix.nurse.play.Application.main(Application.java:56)
Caused by: org.apache.ojb.broker.metadata.MetadataException: Can not read repository
class descriptor data, using repository: repository_user.xml: Exception when reading
metadata information, please check your repository.xml file
at
org.apache.ojb.broker.metadata.MetadataManager.init(MetadataManager.java:135)
at
org.apache.ojb.broker.metadata.MetadataManager.<init>(MetadataManager.java:121)
at
org.apache.ojb.broker.metadata.MetadataManager.<clinit>(MetadataManager.java:110)
... 5 more
Caused by: org.apache.ojb.broker.metadata.MetadataException: Exception when reading
metadata information, please check your repository.xml file
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:558)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:318)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
at
org.apache.ojb.broker.metadata.RepositoryPersistor.readMetadataFromXML(RepositoryPersistor.java:343)
at
org.apache.ojb.broker.metadata.RepositoryPersistor.buildRepository(RepositoryPersistor.java:300)
at
org.apache.ojb.broker.metadata.RepositoryPersistor.readDescriptorRepository(RepositoryPersistor.java:215)
at
org.apache.ojb.broker.metadata.MetadataManager.init(MetadataManager.java:131)
... 7 more
_ _
__ (_)| |_
/ _\| || _ \ ~ be persistent ~
\__/| ||___/ v. 1.0.rc5
/_/
Welcome to the OJB PB tutorial application
[0] List all Person entries
[1] Enter a new person
[2] Edit a person entry
[3] Delete a person entry
[4] Quit Application
type in number to select a use case
4
Exception in thread "main" java.lang.NullPointerException
at com.staffmix.nurse.play.Application.run(Application.java:93)
at com.staffmix.nurse.play.Application.main(Application.java:57)
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
