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 Magnus Strand <ma...@tim.se> on 2004/09/29 10:43:51 UTC

[JDO] Exception in Tutorial 5

Hi!

I get an exception when trying to run tutorial5 (JDO),
see below.

I am using the ojb-blank project with mysql on Win XP Pro.

Does anyone know why
the class
org.apache.ojb.tutorial5.Product
 does not implement javax.jdo.spi.PersistenceCapable?

Could it be some configuration problem with Product.jdo or OJB.properties?

     _  _
 __ (_)| |_
/ _\| || _ \  ~ be persistent ~
\__/| ||___/    v. 1.0.1
   /_/

Welcome to the OJB JDO RI tutorial application


[0] List all product entries
[1] Enter a new product
[2] Edit a product entry
[3] Delete a product entry
[4] Quit Application
type in number to select a use case
0
The list of available products:
[JDO] DEBUG: OjbStoreConnector.begin: connectionReadyForRelease=false
javax.jdo.JDOUserException: Class given to getExtent,
org.apache.ojb.tutorial5.Product,  does not implement 
javax.jdo.spi.PersistenceCapable
        at com.sun.jdori.common.PersistenceManagerImpl.getExtent(Unknown 
Source)

        at com.sun.jdori.common.query.QueryImpl.checkCandidates(Unknown 
Source)
        at com.sun.jdori.common.query.QueryImpl.execute(Unknown Source)
        at org.apache.ojb.tutorial5.UCListAllProducts.apply(Unknown Source)
        at org.apache.ojb.tutorial5.Application.run(Unknown Source)
        at org.apache.ojb.tutorial5.Application.main(Unknown Source)
Cannot close PersistenceManager while transaction is still active.

-- 
Regards,

Magnus Strand



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: [JDO] Exception in Tutorial 5

Posted by Magnus Strand <ma...@tim.se>.
Thanks a lot!!!

Now I have tutorial 5 up and running,

Magnus

Thomas Dudziak wrote:

> Magnus Strand wrote:
>
>> I get an exception when trying to run tutorial5 (JDO),
>> see below.
>>
>> I am using the ojb-blank project with mysql on Win XP Pro.
>>
>> Does anyone know why
>> the class
>> org.apache.ojb.tutorial5.Product
>> does not implement javax.jdo.spi.PersistenceCapable?
>>
>> Could it be some configuration problem with Product.jdo or 
>> OJB.properties?
>
>
> Seems to be that the persistent classes are not JDO-enhanced yet. The 
> build file of the ojb-blank project contains a target for this 
> purpose, which enhances the Product class of the jdo tutorial. So you 
> simply run
>
> ant build enhance-jdori
>
> and your problem should be solved.
>
> Tom
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>


-- 
Med vänliga hälsningar

Magnus Strand
System Developer, MSc

magnus.strand@tim.se
Direct: +46 40 601 57 16
Office: +46 40 601 57 00
Mobile: +46 704 20 57 16

Teknik i Media AB
Södra Förstadsgatan 2
SE-211 43 Malmö
Sweden


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: [JDO] Exception in Tutorial 5

Posted by Thomas Dudziak <to...@first.fhg.de>.
Magnus Strand wrote:

> I get an exception when trying to run tutorial5 (JDO),
> see below.
> 
> I am using the ojb-blank project with mysql on Win XP Pro.
> 
> Does anyone know why
> the class
> org.apache.ojb.tutorial5.Product
> does not implement javax.jdo.spi.PersistenceCapable?
> 
> Could it be some configuration problem with Product.jdo or OJB.properties?

Seems to be that the persistent classes are not JDO-enhanced yet. The 
build file of the ojb-blank project contains a target for this purpose, 
which enhances the Product class of the jdo tutorial. So you simply run

ant build enhance-jdori

and your problem should be solved.

Tom


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org