I'm upgrading my application from ojb-1.0.rc1 to .rc4.
I've replaced old ojb jar and all needed library with new release's jar.
I've replaced old ojb.properties with new standard ojb.properties.
I haven't replaced my repository.xml.

The following code is my PersistenceBroker instantiation

import org.apache.ojb.broker.PersistenceBroker;
import org.apache.ojb.broker.PersistenceBrokerFactory;
import org.apache.ojb.broker.PersistenceBrokerException;

public class OrderBF {

private PersistenceBroker broker;

 public OrderBF() {
   broker = null;
   try{
     broker = PersistenceBrokerFactory.defaultPersistenceBroker();
   }
   catch (java.lang.Throwable t){
     t.printStackTrace();
   }
 }


This is my error message:


[BOOT] ERROR: The specified class "org.apache.ojb.broker.cache.ObjectCacheDefaultImpl" does not implement the interface org.apache.ojb.broker.cache.ObjectCache, which is a requirement for the key "ObjectCacheClass". Using default class org.apache.ojb.broker.cache.ObjectCacheDefaultImpl

[BOOT] ERROR: The specified class "org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl" does not implement the interface org.apache.ojb.broker.accesslayer.ConnectionFactory, which is a requirement for the key "ConnectionFactoryClass". Using default class org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl

[BOOT] ERROR: The specified class "org.apache.ojb.odmg.locking.LockManagerDefaultImpl" does not implement the interface org.apache.ojb.odmg.locking.LockManager, which is a requirement for the key "LockManagerClass". Using default class org.apache.ojb.odmg.locking.LockManagerDefaultImpl

[BOOT] ERROR: The specified class "org.apache.ojb.odmg.locking.InMemoryLockMapImpl" does not implement the interface org.apache.ojb.odmg.locking.LockMap, which is a requirement for the key "LockMapClass". Using default class org.apache.ojb.odmg.locking.PersistentLockMapImpl

[BOOT] ERROR: The specified class "org.apache.ojb.broker.util.logging.PoorMansLoggerImpl" does not implement the interface org.apache.ojb.broker.util.logging.Logger, which is a requirement for the key "LoggerClass". Using default class org.apache.ojb.broker.util.logging.PoorMansLoggerImpl

[BOOT] ERROR: The specified class "org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessImpl" does not implement the interface org.apache.ojb.broker.metadata.fieldaccess.PersistentField, which is a requirement for the key "PersistentFieldClass". Using default class org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldPrivilegedImpl

[BOOT] ERROR: The specified class "org.apache.ojb.broker.core.PersistenceBrokerImpl" does not implement the interface org.apache.ojb.broker.PersistenceBroker, which is a requirement for the key "PersistenceBrokerClass". Using default class org.apache.ojb.broker.core.PersistenceBrokerImpl

[BOOT] ERROR: The specified class "org.apache.ojb.odmg.collections.DListImpl" does not implement the interface org.apache.ojb.broker.ManageableCollection, which is a requirement for the key "OqlCollectionClass". Using default class org.apache.ojb.odmg.collections.DListImpl

java.lang.ClassCastException

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 eo.bf.OrderBF.<init>(OrderBF.java:67)[BOOT] ERROR: Error in instantiation of PersistenceBrokerFactory class class org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl, try to use default PersistenceBrokerFactory implementation

null



at eo.jdo.business.test.TestOrder.testFindAllStepsByIdOrder(TestOrder.java:58)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at junit.framework.TestCase.runTest(TestCase.java:154)

at junit.framework.TestCase.runBare(TestCase.java:127)

at junit.framework.TestResult$1.protect(TestResult.java:106)

at junit.framework.TestResult.runProtected(TestResult.java:124)

at junit.framework.TestResult.run(TestResult.java:109)

at junit.framework.TestCase.run(TestCase.java:118)

at junit.framework.TestSuite.runTest(TestSuite.java:208)

at junit.framework.TestSuite.run(TestSuite.java:203)

at junit.swingui.TestRunner$16.run(TestRunner.java:623)

java.lang.ExceptionInInitializerError

at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.buildDefaultKey(Unknown Source)

at org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.<init>(Unknown Source)

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 eo.bf.OrderBF.<init>(OrderBF.java:67)

at eo.jdo.business.test.TestOrder.testFindAllStepsByIdOrder(TestOrder.java:58)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at junit.framework.TestCase.runTest(TestCase.java:154)

at junit.framework.TestCase.runBare(TestCase.java:127)

at junit.framework.TestResult$1.protect(TestResult.java:106)

at junit.framework.TestResult.runProtected(TestResult.java:124)

at junit.framework.TestResult.run(TestResult.java:109)

at junit.framework.TestCase.run(TestCase.java:118)

at junit.framework.TestSuite.runTest(TestSuite.java:208)

at junit.framework.TestSuite.run(TestSuite.java:203)

at junit.swingui.TestRunner$16.run(TestRunner.java:623)

Caused by: 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

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)

... 20 more

Caused by: org.apache.ojb.broker.metadata.MetadataException: Could not instantiate FieldConversion class using default constructor

at org.apache.ojb.broker.metadata.FieldDescriptor.setFieldConversionClassName(Unknown Source)

at org.apache.ojb.broker.metadata.RepositoryXmlHandler.startElement(Unknown Source)

at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)

at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)

at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source)

at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)

at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)

at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)

at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)

at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

at org.apache.ojb.broker.metadata.RepositoryPersistor.readMetadataFromXML(Unknown Source)

at org.apache.ojb.broker.metadata.RepositoryPersistor.buildRepository(Unknown Source)

at org.apache.ojb.broker.metadata.RepositoryPersistor.readDescriptorRepository(Unknown Source)

... 23 more

Caused by: java.lang.ClassCastException

... 38 more


Tnx in advance!!!


_________________________________________________________________
Comunica in un �altra dimensione con MSN Extra Storage! http://www.msn.it/msnservizi/es/?xAPID=534&DI=1044&SU=http://hotmail.it/&HL=HMTAGTX_Comunica



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



Reply via email to