You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Bill Bug <Wi...@drexel.edu> on 2003/02/21 23:40:11 UTC
Can't run Tutorial1 - Product not in OJB Repository?
Hi All,
I'm having trouble getting the tutorials running.
I'm using my locally installed PostgreSQL v7.3 RDBMS and have changed
the appropriate parameters:
in build.properties
profile=postgresql
in profile/postgresql.profile
# D A T A B A S E S E T T I N G S
dbmsName = PostgreSQL
jdbcLevel = 1.0
urlProtocol = jdbc
urlSubprotocol = postgresql
#urlDbalias = OBJ
urlDbalias = ojb
databaseDriver = org.postgresql.Driver
As you can see, I had to change the urlDbalias to lowercase, because my
PostgreSQL installation forced the database name to lowercase and was
case sensitive. If I didn't do this, I got an error during the
'create-db' task claiming the database "OJB" wasn't in the system
catalog.
I followed the Quick Start instructions and ran:
bin/build.sh junit
For the most part, this ran fine. It certainly built the core & test
tables and INSERTed data into them. All the tests passed, but there
were a few errors. When running the odmg tests 2 errors were reported
though it also reported 0 failures . A truncated version of the stdout
from the 'junit' task is given below.
When I try to run the 4 persistance commands in Tutorial1, I keep
getting the following error:
org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException:
org.apache.ojb.tutorial1.Product not found in OJB Repository
even though I can see via the Postgresql command line interface - psql
- that the Product table clearly exists in the database.
I'd appreciate any help you can offer.
BTW, I haven't had any luck getting the installation to work with the
default database included with the Jakarta-OJB package - hsqldb.
Thanks for your help.
Cheers,
Bill Bug
JUNIT task output
project-create-db-classpath:
project-datasql-classpath:
[echo] +-----------------------------------------------+
[echo] | |
[echo] | Generating SQL from data XML ! |
[echo] | enJoy! |
[echo] | |
[echo] +-----------------------------------------------+
[echo] taking build.properties from: build.properties
[torque-datasql] Using contextProperties file:
/Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-0.9.9/
build.properties
[torque-datasql] Using classpath
[torque-datasql] Generating to file
/Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-0.9.9/
target/src/sql/ojbtest-data.sql
[torque-datasql] Resolver: used database.dtd from
org.apache.torque.engine.database.transform package
[torque-datasql] Resolver: used
/Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-0.9.9/
src/schema/ojbtest-data.dtd
project-insert-sql:
[torque-insert-sql] Our new url -> jdbc:postgresql://localhost/ojb
[torque-insert-sql] Executing file:
/Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-0.9.9/
target/src/sql/ojbtest-schema.sql
(...
INSERT reports deleted
...)
junit-no-compile-no-prepare:
[junit] Running org.apache.ojb.broker.AllTests
[junit] Tests run: 174, Failures: 0, Errors: 0, Time elapsed:
203.016 sec
[junit] Running org.apache.ojb.odmg.AllTests
[junit] [BOOT] INFO: OJB.properties:
file:/Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-
0.9.9/target/test/ojb/OJB.properties
[junit] Tests run: 147, Failures: 0, Errors: 2, Time elapsed:
62.603 sec
[junit] TEST org.apache.ojb.odmg.AllTests FAILED
[junit] Running org.apache.ojb.soda.AllTests
[junit] [BOOT] INFO: OJB.properties:
file:/Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-
0.9.9/target/test/ojb/OJB.properties
[junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 9.131
sec
junit-no-compile:
junit:
BUILD SUCCESSFUL
Total time: 6 minutes 58 seconds
Bill Bug
Senior Analyst/Ontological Engineer
Computer Vision Laboratory for Vertebrate Brain Mapping
Department of Neurobiology & Anatomy
Drexel University College of Medicine
2900 Queen Lane
Philadelphia, PA 19129
215 991 8430 (ph)
Re: Can't run Tutorial1 - Product not in OJB Repository?
Posted by Bill Bug <Wi...@drexel.edu>.
Many thanks, Armin.
Once I uncommented the '&user' in
'/src/test/org/apache/ojb/repository.xml' and commented out the
class-descriptor for 'org.apache.ojb.tutorial4.Product' in
'/src/test/org/apache/ojb/repository_user.xml'.
As long as I ran the 'with-jdori' ant task, it wasn't necessary to
comment out the 'org.apache.ojb.tutorial5.Product' class-descriptor.
Thank again for the valuable reference.
Cheers,
Bill
On Saturday, February 22, 2003, at 12:38 PM, Armin Waibel wrote:
> Hi Bill,
>
> see
> http://archives.apache.org/eyebrowse/ReadMsg?listName=ojb-
> user@jakarta.a
> pache.org&msgNo=5382
>
> is fixed in CVS.
>
> regards,
> Armin
>
> ----- Original Message -----
> From: "Bill Bug" <Wi...@drexel.edu>
> To: "OJB Users List" <oj...@db.apache.org>
> Sent: Saturday, February 22, 2003 6:20 PM
> Subject: Re: Can't run Tutorial1 - Product not in OJB Repository?
>
>
>> Hi again,
>>
>> I realized it might be useful to see the full stack track reported
> when
>> I try to access the test table - Product - using Tutorial1:
>>
>> org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException:
>> org.apache.ojb.tutorial1.Product not found in OJB Repository
>> at
>>
> org.apache.ojb.broker.metadata.DescriptorRepository.getDescriptorFor(De
> s
>> criptorRepository.java:305)
>> at
>>
> org.apache.ojb.broker.metadata.DescriptorRepository.getDescriptorFor(De
> s
>> criptorRepository.java:318)
>> at
>>
> org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQue
> r
>> y(PersistenceBrokerImpl.java:1228)
>> at
>>
> org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQue
> r
>> y(PersistenceBrokerImpl.java:1363)
>> at
>>
> org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQue
> r
>> y(PersistenceBrokerImpl.java:1389)
>> at
>>
> org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQue
> r
>> y(PersistenceBrokerImpl.java:1376)
>> at
>>
> org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.getCollectio
> n
>> ByQuery(DelegatingPersistenceBroker.java:294)
>> at
>>
> org.apache.ojb.tutorial1.UCListAllProducts.apply(UCListAllProducts.java
> :
>> 36)
>> at
> org.apache.ojb.tutorial1.Application.run(Application.java:90)
>> at
>> org.apache.ojb.tutorial1.Application.main(Application.java:58)
>>
>> Is it possible there's a problem with the way in which my
>> postgresql.jar JDBC driver implements metadata lookups? I've read
>> something about this on the web before, and it seems to be responsible
>> for the fact that though I can logon to my Postgresql database using
>> the NetBeans database plug-in, I'm completely unable to bring up the
>> entities in the database due to what NetBeans reports as metadata
>> problems.
>>
>> I should note that apart from these metadata issues, the
> postgresql.jar
>> I'm using works fine. Standard JDBC Statements that SELECT, INSERT,
>> UPDATE & DELETE all work fine. Plus, as I mentioned in the first
> post,
>> the Jakarta-OJB 'junit' ant task has no problem building the core &
>> test OJB entities and filling them with data.
>>
>> Thanks very much again to all for any advice, references or other
>> insights offered.
>>
>> Cheers,
>> Bill Bug
>>
>> On Friday, February 21, 2003, at 05:40 PM, Bill Bug wrote:
>>
>>> Hi All,
>>>
>>> I'm having trouble getting the tutorials running.
>>>
>>> I'm using my locally installed PostgreSQL v7.3 RDBMS and have
> changed
>>> the appropriate parameters:
>>>
>>> in build.properties
>>> profile=postgresql
>>>
>>> in profile/postgresql.profile
>>> # D A T A B A S E S E T T I N G S
>>> dbmsName = PostgreSQL
>>> jdbcLevel = 1.0
>>> urlProtocol = jdbc
>>> urlSubprotocol = postgresql
>>> #urlDbalias = OBJ
>>> urlDbalias = ojb
>>> databaseDriver = org.postgresql.Driver
>>>
>>> As you can see, I had to change the urlDbalias to lowercase, because
>>> my PostgreSQL installation forced the database name to lowercase and
>>> was case sensitive. If I didn't do this, I got an error during the
>>> 'create-db' task claiming the database "OJB" wasn't in the system
>>> catalog.
>>>
>>> I followed the Quick Start instructions and ran:
>>>
>>> bin/build.sh junit
>>>
>>> For the most part, this ran fine. It certainly built the core &
> test
>>> tables and INSERTed data into them. All the tests passed, but there
>>> were a few errors. When running the odmg tests 2 errors were
> reported
>>> though it also reported 0 failures . A truncated version of the
>>> stdout from the 'junit' task is given below.
>>>
>>> When I try to run the 4 persistance commands in Tutorial1, I keep
>>> getting the following error:
>>>
>>> org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException:
>>> org.apache.ojb.tutorial1.Product not found in OJB Repository
>>>
>>> even though I can see via the Postgresql command line interface -
> psql
>>> - that the Product table clearly exists in the database.
>>>
>>> I'd appreciate any help you can offer.
>>>
>>> BTW, I haven't had any luck getting the installation to work with
> the
>>> default database included with the Jakarta-OJB package - hsqldb.
>>>
>>> Thanks for your help.
>>>
>>> Cheers,
>>> Bill Bug
>>>
>>>
>>> JUNIT task output
>>>
>>> project-create-db-classpath:
>>>
>>> project-datasql-classpath:
>>> [echo] +-----------------------------------------------+
>>> [echo] | |
>>> [echo] | Generating SQL from data XML ! |
>>> [echo] | enJoy! |
>>> [echo] | |
>>> [echo] +-----------------------------------------------+
>>> [echo] taking build.properties from: build.properties
>>> [torque-datasql] Using contextProperties file:
>>> /Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-
>>> 0.9.9/build.properties
>>> [torque-datasql] Using classpath
>>> [torque-datasql] Generating to file
>>> /Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-
>>> 0.9.9/target/src/sql/ojbtest-data.sql
>>> [torque-datasql] Resolver: used database.dtd from
>>> org.apache.torque.engine.database.transform package
>>> [torque-datasql] Resolver: used
>>> /Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-
>>> 0.9.9/src/schema/ojbtest-data.dtd
>>>
>>> project-insert-sql:
>>> [torque-insert-sql] Our new url -> jdbc:postgresql://localhost/ojb
>>> [torque-insert-sql] Executing file:
>>> /Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-
>>> 0.9.9/target/src/sql/ojbtest-schema.sql
>>>
>>> (...
>>> INSERT reports deleted
>>> ...)
>>>
>>> junit-no-compile-no-prepare:
>>> [junit] Running org.apache.ojb.broker.AllTests
>>> [junit] Tests run: 174, Failures: 0, Errors: 0, Time elapsed:
>>> 203.016 sec
>>> [junit] Running org.apache.ojb.odmg.AllTests
>>> [junit] [BOOT] INFO: OJB.properties:
>>>
> file:/Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-
>>> 0.9.9/target/test/ojb/OJB.properties
>>> [junit] Tests run: 147, Failures: 0, Errors: 2, Time elapsed:
>>> 62.603 sec
>>> [junit] TEST org.apache.ojb.odmg.AllTests FAILED
>>> [junit] Running org.apache.ojb.soda.AllTests
>>> [junit] [BOOT] INFO: OJB.properties:
>>>
> file:/Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-
>>> 0.9.9/target/test/ojb/OJB.properties
>>> [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed:
> 9.131
>>> sec
>>>
>>> junit-no-compile:
>>>
>>> junit:
>>>
>>> BUILD SUCCESSFUL
>>> Total time: 6 minutes 58 seconds
>>>
>>>
>>>
>>>
>>> Bill Bug
>>> Senior Analyst/Ontological Engineer
>>>
>>> Computer Vision Laboratory for Vertebrate Brain Mapping
>>> Department of Neurobiology & Anatomy
>>> Drexel University College of Medicine
>>> 2900 Queen Lane
>>> Philadelphia, PA 19129
>>> 215 991 8430 (ph)
>>>
>>>
>>
>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>>
>>>
>> Bill Bug
>> Senior Analyst/Ontological Engineer
>>
>> Computer Vision Laboratory for Vertebrate Brain Mapping
>> Department of Neurobiology & Anatomy
>> Drexel University College of Medicine
>> 2900 Queen Lane
>> Philadelphia, PA 19129
>> 215 991 8430 (ph)
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
Bill Bug
Senior Analyst/Ontological Engineer
Computer Vision Laboratory for Vertebrate Brain Mapping
Department of Neurobiology & Anatomy
Drexel University College of Medicine
2900 Queen Lane
Philadelphia, PA 19129
215 991 8430 (ph)
Re: Can't run Tutorial1 - Product not in OJB Repository?
Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi Bill,
see
http://archives.apache.org/eyebrowse/ReadMsg?listName=ojb-user@jakarta.a
pache.org&msgNo=5382
is fixed in CVS.
regards,
Armin
----- Original Message -----
From: "Bill Bug" <Wi...@drexel.edu>
To: "OJB Users List" <oj...@db.apache.org>
Sent: Saturday, February 22, 2003 6:20 PM
Subject: Re: Can't run Tutorial1 - Product not in OJB Repository?
> Hi again,
>
> I realized it might be useful to see the full stack track reported
when
> I try to access the test table - Product - using Tutorial1:
>
> org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException:
> org.apache.ojb.tutorial1.Product not found in OJB Repository
> at
>
org.apache.ojb.broker.metadata.DescriptorRepository.getDescriptorFor(Des
> criptorRepository.java:305)
> at
>
org.apache.ojb.broker.metadata.DescriptorRepository.getDescriptorFor(Des
> criptorRepository.java:318)
> at
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer
> y(PersistenceBrokerImpl.java:1228)
> at
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer
> y(PersistenceBrokerImpl.java:1363)
> at
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer
> y(PersistenceBrokerImpl.java:1389)
> at
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer
> y(PersistenceBrokerImpl.java:1376)
> at
>
org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.getCollection
> ByQuery(DelegatingPersistenceBroker.java:294)
> at
>
org.apache.ojb.tutorial1.UCListAllProducts.apply(UCListAllProducts.java:
> 36)
> at
org.apache.ojb.tutorial1.Application.run(Application.java:90)
> at
> org.apache.ojb.tutorial1.Application.main(Application.java:58)
>
> Is it possible there's a problem with the way in which my
> postgresql.jar JDBC driver implements metadata lookups? I've read
> something about this on the web before, and it seems to be responsible
> for the fact that though I can logon to my Postgresql database using
> the NetBeans database plug-in, I'm completely unable to bring up the
> entities in the database due to what NetBeans reports as metadata
> problems.
>
> I should note that apart from these metadata issues, the
postgresql.jar
> I'm using works fine. Standard JDBC Statements that SELECT, INSERT,
> UPDATE & DELETE all work fine. Plus, as I mentioned in the first
post,
> the Jakarta-OJB 'junit' ant task has no problem building the core &
> test OJB entities and filling them with data.
>
> Thanks very much again to all for any advice, references or other
> insights offered.
>
> Cheers,
> Bill Bug
>
> On Friday, February 21, 2003, at 05:40 PM, Bill Bug wrote:
>
> > Hi All,
> >
> > I'm having trouble getting the tutorials running.
> >
> > I'm using my locally installed PostgreSQL v7.3 RDBMS and have
changed
> > the appropriate parameters:
> >
> > in build.properties
> > profile=postgresql
> >
> > in profile/postgresql.profile
> > # D A T A B A S E S E T T I N G S
> > dbmsName = PostgreSQL
> > jdbcLevel = 1.0
> > urlProtocol = jdbc
> > urlSubprotocol = postgresql
> > #urlDbalias = OBJ
> > urlDbalias = ojb
> > databaseDriver = org.postgresql.Driver
> >
> > As you can see, I had to change the urlDbalias to lowercase, because
> > my PostgreSQL installation forced the database name to lowercase and
> > was case sensitive. If I didn't do this, I got an error during the
> > 'create-db' task claiming the database "OJB" wasn't in the system
> > catalog.
> >
> > I followed the Quick Start instructions and ran:
> >
> > bin/build.sh junit
> >
> > For the most part, this ran fine. It certainly built the core &
test
> > tables and INSERTed data into them. All the tests passed, but there
> > were a few errors. When running the odmg tests 2 errors were
reported
> > though it also reported 0 failures . A truncated version of the
> > stdout from the 'junit' task is given below.
> >
> > When I try to run the 4 persistance commands in Tutorial1, I keep
> > getting the following error:
> >
> > org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException:
> > org.apache.ojb.tutorial1.Product not found in OJB Repository
> >
> > even though I can see via the Postgresql command line interface -
psql
> > - that the Product table clearly exists in the database.
> >
> > I'd appreciate any help you can offer.
> >
> > BTW, I haven't had any luck getting the installation to work with
the
> > default database included with the Jakarta-OJB package - hsqldb.
> >
> > Thanks for your help.
> >
> > Cheers,
> > Bill Bug
> >
> >
> > JUNIT task output
> >
> > project-create-db-classpath:
> >
> > project-datasql-classpath:
> > [echo] +-----------------------------------------------+
> > [echo] | |
> > [echo] | Generating SQL from data XML ! |
> > [echo] | enJoy! |
> > [echo] | |
> > [echo] +-----------------------------------------------+
> > [echo] taking build.properties from: build.properties
> > [torque-datasql] Using contextProperties file:
> > /Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-
> > 0.9.9/build.properties
> > [torque-datasql] Using classpath
> > [torque-datasql] Generating to file
> > /Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-
> > 0.9.9/target/src/sql/ojbtest-data.sql
> > [torque-datasql] Resolver: used database.dtd from
> > org.apache.torque.engine.database.transform package
> > [torque-datasql] Resolver: used
> > /Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-
> > 0.9.9/src/schema/ojbtest-data.dtd
> >
> > project-insert-sql:
> > [torque-insert-sql] Our new url -> jdbc:postgresql://localhost/ojb
> > [torque-insert-sql] Executing file:
> > /Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-
> > 0.9.9/target/src/sql/ojbtest-schema.sql
> >
> > (...
> > INSERT reports deleted
> > ...)
> >
> > junit-no-compile-no-prepare:
> > [junit] Running org.apache.ojb.broker.AllTests
> > [junit] Tests run: 174, Failures: 0, Errors: 0, Time elapsed:
> > 203.016 sec
> > [junit] Running org.apache.ojb.odmg.AllTests
> > [junit] [BOOT] INFO: OJB.properties:
> >
file:/Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-
> > 0.9.9/target/test/ojb/OJB.properties
> > [junit] Tests run: 147, Failures: 0, Errors: 2, Time elapsed:
> > 62.603 sec
> > [junit] TEST org.apache.ojb.odmg.AllTests FAILED
> > [junit] Running org.apache.ojb.soda.AllTests
> > [junit] [BOOT] INFO: OJB.properties:
> >
file:/Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-
> > 0.9.9/target/test/ojb/OJB.properties
> > [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed:
9.131
> > sec
> >
> > junit-no-compile:
> >
> > junit:
> >
> > BUILD SUCCESSFUL
> > Total time: 6 minutes 58 seconds
> >
> >
> >
> >
> > Bill Bug
> > Senior Analyst/Ontological Engineer
> >
> > Computer Vision Laboratory for Vertebrate Brain Mapping
> > Department of Neurobiology & Anatomy
> > Drexel University College of Medicine
> > 2900 Queen Lane
> > Philadelphia, PA 19129
> > 215 991 8430 (ph)
> >
> >
>
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: ojb-user-help@db.apache.org
> >
> >
> Bill Bug
> Senior Analyst/Ontological Engineer
>
> Computer Vision Laboratory for Vertebrate Brain Mapping
> Department of Neurobiology & Anatomy
> Drexel University College of Medicine
> 2900 Queen Lane
> Philadelphia, PA 19129
> 215 991 8430 (ph)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>
Re: Can't run Tutorial1 - Product not in OJB Repository?
Posted by Bill Bug <Wi...@drexel.edu>.
Hi again,
I realized it might be useful to see the full stack track reported when
I try to access the test table - Product - using Tutorial1:
org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException:
org.apache.ojb.tutorial1.Product not found in OJB Repository
at
org.apache.ojb.broker.metadata.DescriptorRepository.getDescriptorFor(Des
criptorRepository.java:305)
at
org.apache.ojb.broker.metadata.DescriptorRepository.getDescriptorFor(Des
criptorRepository.java:318)
at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer
y(PersistenceBrokerImpl.java:1228)
at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer
y(PersistenceBrokerImpl.java:1363)
at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer
y(PersistenceBrokerImpl.java:1389)
at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer
y(PersistenceBrokerImpl.java:1376)
at
org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.getCollection
ByQuery(DelegatingPersistenceBroker.java:294)
at
org.apache.ojb.tutorial1.UCListAllProducts.apply(UCListAllProducts.java:
36)
at org.apache.ojb.tutorial1.Application.run(Application.java:90)
at
org.apache.ojb.tutorial1.Application.main(Application.java:58)
Is it possible there's a problem with the way in which my
postgresql.jar JDBC driver implements metadata lookups? I've read
something about this on the web before, and it seems to be responsible
for the fact that though I can logon to my Postgresql database using
the NetBeans database plug-in, I'm completely unable to bring up the
entities in the database due to what NetBeans reports as metadata
problems.
I should note that apart from these metadata issues, the postgresql.jar
I'm using works fine. Standard JDBC Statements that SELECT, INSERT,
UPDATE & DELETE all work fine. Plus, as I mentioned in the first post,
the Jakarta-OJB 'junit' ant task has no problem building the core &
test OJB entities and filling them with data.
Thanks very much again to all for any advice, references or other
insights offered.
Cheers,
Bill Bug
On Friday, February 21, 2003, at 05:40 PM, Bill Bug wrote:
> Hi All,
>
> I'm having trouble getting the tutorials running.
>
> I'm using my locally installed PostgreSQL v7.3 RDBMS and have changed
> the appropriate parameters:
>
> in build.properties
> profile=postgresql
>
> in profile/postgresql.profile
> # D A T A B A S E S E T T I N G S
> dbmsName = PostgreSQL
> jdbcLevel = 1.0
> urlProtocol = jdbc
> urlSubprotocol = postgresql
> #urlDbalias = OBJ
> urlDbalias = ojb
> databaseDriver = org.postgresql.Driver
>
> As you can see, I had to change the urlDbalias to lowercase, because
> my PostgreSQL installation forced the database name to lowercase and
> was case sensitive. If I didn't do this, I got an error during the
> 'create-db' task claiming the database "OJB" wasn't in the system
> catalog.
>
> I followed the Quick Start instructions and ran:
>
> bin/build.sh junit
>
> For the most part, this ran fine. It certainly built the core & test
> tables and INSERTed data into them. All the tests passed, but there
> were a few errors. When running the odmg tests 2 errors were reported
> though it also reported 0 failures . A truncated version of the
> stdout from the 'junit' task is given below.
>
> When I try to run the 4 persistance commands in Tutorial1, I keep
> getting the following error:
>
> org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException:
> org.apache.ojb.tutorial1.Product not found in OJB Repository
>
> even though I can see via the Postgresql command line interface - psql
> - that the Product table clearly exists in the database.
>
> I'd appreciate any help you can offer.
>
> BTW, I haven't had any luck getting the installation to work with the
> default database included with the Jakarta-OJB package - hsqldb.
>
> Thanks for your help.
>
> Cheers,
> Bill Bug
>
>
> JUNIT task output
>
> project-create-db-classpath:
>
> project-datasql-classpath:
> [echo] +-----------------------------------------------+
> [echo] | |
> [echo] | Generating SQL from data XML ! |
> [echo] | enJoy! |
> [echo] | |
> [echo] +-----------------------------------------------+
> [echo] taking build.properties from: build.properties
> [torque-datasql] Using contextProperties file:
> /Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-
> 0.9.9/build.properties
> [torque-datasql] Using classpath
> [torque-datasql] Generating to file
> /Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-
> 0.9.9/target/src/sql/ojbtest-data.sql
> [torque-datasql] Resolver: used database.dtd from
> org.apache.torque.engine.database.transform package
> [torque-datasql] Resolver: used
> /Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-
> 0.9.9/src/schema/ojbtest-data.dtd
>
> project-insert-sql:
> [torque-insert-sql] Our new url -> jdbc:postgresql://localhost/ojb
> [torque-insert-sql] Executing file:
> /Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-
> 0.9.9/target/src/sql/ojbtest-schema.sql
>
> (...
> INSERT reports deleted
> ...)
>
> junit-no-compile-no-prepare:
> [junit] Running org.apache.ojb.broker.AllTests
> [junit] Tests run: 174, Failures: 0, Errors: 0, Time elapsed:
> 203.016 sec
> [junit] Running org.apache.ojb.odmg.AllTests
> [junit] [BOOT] INFO: OJB.properties:
> file:/Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-
> 0.9.9/target/test/ojb/OJB.properties
> [junit] Tests run: 147, Failures: 0, Errors: 2, Time elapsed:
> 62.603 sec
> [junit] TEST org.apache.ojb.odmg.AllTests FAILED
> [junit] Running org.apache.ojb.soda.AllTests
> [junit] [BOOT] INFO: OJB.properties:
> file:/Users/Shared/Downloads/Development/Java/jakarta/jakarta-ojb-src-
> 0.9.9/target/test/ojb/OJB.properties
> [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 9.131
> sec
>
> junit-no-compile:
>
> junit:
>
> BUILD SUCCESSFUL
> Total time: 6 minutes 58 seconds
>
>
>
>
> Bill Bug
> Senior Analyst/Ontological Engineer
>
> Computer Vision Laboratory for Vertebrate Brain Mapping
> Department of Neurobiology & Anatomy
> Drexel University College of Medicine
> 2900 Queen Lane
> Philadelphia, PA 19129
> 215 991 8430 (ph)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
Bill Bug
Senior Analyst/Ontological Engineer
Computer Vision Laboratory for Vertebrate Brain Mapping
Department of Neurobiology & Anatomy
Drexel University College of Medicine
2900 Queen Lane
Philadelphia, PA 19129
215 991 8430 (ph)