Hi,
Did you explicitly put in the classpath:
- the directory where find the properties files (repository*, OJB.properties ...)
- possibly, the directory where you build your classes.
Often, it's a solution to resolve much problems.


Regards,
Alexandre



Fiona Magner wrote:

Hi there:
I'm a newbie trying to get started with OJB. I have created ojb-blank to start a new project. However in this new project I have tried to set up a simple application using the PersistenceBorkerFactory and also using ODMG. With each I am getting an error complaining that the class for org.apache.ojb.tutorial1.product cannot be found. I have removed all references to these tutorial classes in the repository_***.xml files and also removed references to junit and jdo and ejb in repository.xml. However I am still getting this problem :( I would appreciate any help you would have on the problem. Here is part of the error that I get (it happens when I try to call PersistenceBrokerFactory.defaultPersistenceBroker() with PB or db.open("OJB", Database.OPEN_READ_WRITE) with ODMG).
Regards,
Fiona


Caused by: org.apache.ojb.broker.metadata.MetadataException: Class org.apache.ojb.tutorial1.Product could not be found in the classpath. This could cause unexpected behaviour of OJB, please remove or comment out this class descriptor in the repository.xml file.

at org.apache.ojb.broker.metadata.RepositoryXmlHandler.startElement(RepositoryXmlHandler.java:206)

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

at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(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(RepositoryPersistor.java:309)

at org.apache.ojb.broker.metadata.RepositoryPersistor.buildRepository(RepositoryPersistor.java:264)

at org.apache.ojb.broker.metadata.RepositoryPersistor.readDescriptorRepository(RepositoryPersistor.java:176)

at org.apache.ojb.broker.metadata.MetadataManager.init(MetadataManager.java:148)

... 8 more

Caused by: java.lang.ClassNotFoundException: org.apache.ojb.tutorial1.Product

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at org.apache.ojb.broker.util.ClassHelper.getClass(ClassHelper.java:30)

at org.apache.ojb.broker.util.ClassHelper.getClass(ClassHelper.java:98)

at org.apache.ojb.broker.metadata.RepositoryXmlHandler.startElement(RepositoryXmlHandler.java:199)

... 21 more




-- Alexandre BOISSEAU Université de Rennes1


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



Reply via email to