Hi Ross,

[EMAIL PROTECTED] wrote:
I have moved further along.

Now I get Class not found in reference to one of my classes from
repository_user.xml

Am I correct in thinking that I need to create these classes by hand, that
they are not generated by OJB as I had thought.

YES! Ojb does not generate persistent classes on the fly!
Please refer to http://db.apache.org/ojb/howto-build-mappings.html for details.



Also are these simply bean type objects with getter and setter methods for each field.

OJB supports POJO-style entity objects. getters and setters would be nice, but we'll do without them.


cheers,
Thomas

Regards

Ross Rotherham
----- Original Message ----- From: "Alen Ribic" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, July 30, 2003 1:37 PM
Subject: Re: Setup Question




place your class descriptors there.
in other words you should define there class fields to DB table field
mappings for persistence, etc.
--Alen

----- Original Message -----
From: "Durham David Contr 805 CSS/SCBE" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, July 30, 2003 7:17 PM
Subject: RE: Setup Question


what's in the file: repository_user.xml?





-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 30, 2003 11:31 AM
To: OJB Users List; Armin Waibel
Subject: Re: Setup Question


Have put junit.jar in class path and the following is the repository.xml. Still get same error.

<?xml version="1.0" encoding="UTF-8"?>

<!-- This is a sample metadata repository for the ObJectBridge System.

Use this file as a template for building your own mappings-->

<!-- defining entities for include-files -->

<!DOCTYPE descriptor-repository SYSTEM "repository.dtd" [

<!ENTITY database SYSTEM "repository_database.xml">

<!ENTITY internal SYSTEM "repository_internal.xml">

<!ENTITY user SYSTEM "repository_user.xml">

]>

<descriptor-repository version="1.0"
isolation-level="read-uncommitted">

<!-- include all used database connections -->

&database;

<!-- include ojb internal mappings here -->

&internal;

<!-- include mappings for JUnit tests -->

<!-- This could be removed (with <!ENTITY entry), if junit
test suite was not used -->

<!-- &junit; -->

<!-- include user defined mappings here -->

&user;

<!-- include mappings for the EJB-examples -->

<!-- &ejb; -->

<!-- include mappings for the JDO tutorials -->

<!-- &jdo; -->

</descriptor-repository>

Regards

Ross Rotherham
----- Original Message -----
From: "Armin Waibel" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, July 30, 2003 12:07 PM
Subject: Re: Setup Question



Hi,

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, July 30, 2003 5:32 PM
Subject: Setup Question



Am having various issues with setting up OJB.

Currently have built cofig files
db-ojb-1.0.rc3/schema/project-schema.xml
db-ojb-1.0.rc3/docs/user_repository.xml
   copy of same src/test/org/apache/ojb/user_repository.xml

have removed junit, ejb and jdo from repository.xml


I don't think so, because MetadataManager try to load


org.apache.ojb.broker.Article

which is part of junit_repository.xml. So take care not to include "unkown" classes in repository, or add junit jar to classpath.

regards,
Armin


prepare-testdb generates db without issue

when I move the class files to my project (struts in

tomcat4.1), I


get the

following error which seems to say that the ant main is still
reading

in


some of the tutorial/test version?

Need help to move past this point.

Thanks

java.lang.ExceptionInInitializerError:

java.lang.ClassNotFoundException:


org.apache.ojb.broker.Article
at


org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoad

er
.jav

a:1428)
at


org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoad

er
.jav

a:1274)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at

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


at

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


at


org.apache.ojb.broker.metadata.RepositoryXmlHandler.startElement(Repos

it
oryX

mlHandler.java:224)
at


org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXPa

rs
er.j

ava:459)
at


org.apache.xerces.impl.XMLNamespaceBinder.startElement(XMLNamespaceBin

de
r.ja

va:572)
at


org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidato

r.
java

:727)
at


org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement

(X
MLDo

cumentFragmentScannerImpl.java:759)
at


org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentD

is
patc

her.dispatch(XMLDocumentFragmentScannerImpl.java:1477)
at


org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XML

Do
cume

ntFragmentScannerImpl.java:329)
at


org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java

:5
25)

at


org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java

:5
81)

at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at


org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.ja

va
:111

4)
at


org.apache.ojb.broker.metadata.RepositoryPersistor.buildRepository(Rep

os
itor

yPersistor.java:296)
at


org.apache.ojb.broker.metadata.RepositoryPersistor.readDescriptorRepos

it
ory(

RepositoryPersistor.java:207)
at


org.apache.ojb.broker.metadata.MetadataManager.init(MetadataManager.ja

va
:85)

at

org.apache.ojb.broker.metadata.MetadataManager.(MetadataManager.java:7

6)

at

org.apache.ojb.broker.metadata.MetadataManager.(MetadataManager.java:6

7)

at


org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.buildDe

fa
ultK

ey(PersistenceBrokerFactoryDefaultImpl.java:139)
at


org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.(Persis

te
nceB

rokerFactoryDefaultImpl.java:110)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:232)
at


org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.init(Persis

te
nceB

rokerFactoryFactory.java:94)
at


org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.(Persistenc

eB
roke

rFactoryFactory.java:71)
at


org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroke

r(
Pers

istenceBrokerFactory.java:102)
at


com.bowtech.web.actions.SeminarAddAction.execute(SeminarAddAction.java

:3
4)

Regards

Ross





--------------------------------------------------------------------


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







---------------------------------------------------------------------

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





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



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





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





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




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



Reply via email to