You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Michael Dick <mi...@gmail.com> on 2006/07/18 22:00:21 UTC

What we have so far

Hi all,

I've been trying to run some basic tests with the recent code drop.  I've
been able to get an EntityMangerFactory and EntityManager, but I'm getting
stuck when I connect to a database.  I had to add some properties to
persistence.xml to create the emf and em. Here's the relevant code :
 <properties>
            <property name="openjpa.BrokerFactory"  <!-- I tried
org.apache.openjpa.BrokerFactory but it didn't work for me -->
                value="
org.apache.openjpa.abstractstore.AbstractStoreBrokerFactory" />

            <property
                name="org.apache.openjpa.abstractstore.AbstractStoreManager"
                value="org.apache.openjpa.xmlstore.XMLStoreManager" />
</properties>

I was also able to get the PCEnhancer to run against some entity classes.
The only obstacle there was getting the classpath set up appropriately.

When I try to find or persist an entity I get an exception like this :

<0|false|0.0.1> org.apache.openjpa.persistence.PersistenceException: null
    at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:820)
    at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:703)
    at org.apache.openjpa.kernel.DelegatingBroker.find(DelegatingBroker.java
:176)
    at org.apache.openjpa.persistence.EntityManagerImpl.find(
EntityManagerImpl.java:303)
    . . .
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
RemoteTestRunner.java:386)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
RemoteTestRunner.java:196)
Caused by: java.lang.NullPointerException
    at java.io.File.<init>(File.java:220)
    at org.apache.openjpa.xmlstore.XMLFileHandler.getFile(
XMLFileHandler.java:113)
    at org.apache.openjpa.xmlstore.XMLFileHandler.load(XMLFileHandler.java
:77)
    at org.apache.openjpa.xmlstore.XMLStore.getMap(XMLStore.java:77)
    at org.apache.openjpa.xmlstore.XMLStore.getData(XMLStore.java:56)
    at org.apache.openjpa.xmlstore.XMLStoreManager.initialize(
XMLStoreManager.java:105)
    at org.apache.openjpa.kernel.DelegatingStoreManager.initialize(
DelegatingStoreManager.java:108)
    at org.apache.openjpa.kernel.ROPStoreManager.initialize(
ROPStoreManager.java:57)
    at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:842)
    at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:794)
    ... 22 more

Is this expected with the code that is currently in SVN, or do I just need
some more configuration properties?

Thanks,
-- 
-Michael Dick

Re: What we have so far

Posted by Craig L Russell <Cr...@Sun.COM>.
Works for me as well on MacOSX 10.4.

mvn test -Dtest=TestPersistence
...
12627  INFO   [main] org.apache.openjpa.jdbc.JDBC - Using dictionary  
class "org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache Derby  
10.1.2.1 ,Apache Derby Embedded JDBC Driver 10.1.2.1).

java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-112)
Java HotSpot(TM) Client VM (build 1.5.0_06-64, mixed mode, sharing)

So far, so good.

Craig

On Jul 20, 2006, at 1:30 PM, Michael Dick wrote:

> Hi Patrick,
>
> It's running smoothly for me now, thanks for all the hard work you  
> the rest
> of the team have put in.
>
> -Mike
>
> On 7/19/06, Patrick Linskey <pl...@bea.com> wrote:
>>
>> Hi,
>>
>> You should now be able to see things running end-to-end by running  
>> 'mvn
>> test -Dtest=TestPersistence'. This'll run against an auto-configured
>> Derby db.
>>
>> -Patrick
>>
>> --
>> Patrick Linskey
>> BEA Systems, Inc.
>>
>> > -----Original Message-----
>> > From: Michael Dick [mailto:michael.d.dick@gmail.com]
>> > Sent: Tuesday, July 18, 2006 3:10 PM
>> > To: open-jpa-dev@incubator.apache.org
>> > Subject: Re: What we have so far
>> >
>> > Thanks Patrick,
>> >
>> > Are there any other pieces of code that I'd need to get
>> > running to XML? I'm happy to keep experimenting with what we
>> > have, unless you know there's something missing (I'd rather
>> > not distract you from dropping the JDBC code).
>> >
>> >
>> > Regards,
>> >
>> >
>> > On 7/18/06, Patrick Linskey <pl...@bea.com> wrote:
>> > >
>> > > I don't think that anyone has actually tried to wire up the
>> > XML store
>> > > manager at runtime based on the code in the svn repository.
>> > Right now,
>> > > we're focussed mostly on getting the JDBC code drop ready,
>> > and so have
>> > > been neglecting any polishing / testing / etc. of the code
>> > that *is*
>> > > in the repo.
>> > >
>> > > -Patrick
>> > >
>> > > --
>> > > Patrick Linskey
>> > > BEA Systems, Inc.
>> > >
>> > > > -----Original Message-----
>> > > > From: Michael Dick [mailto:michael.d.dick@gmail.com]
>> > > > Sent: Tuesday, July 18, 2006 1:00 PM
>> > > > To: open-jpa-dev@incubator.apache.org
>> > > > Subject: What we have so far
>> > > >
>> > > > Hi all,
>> > > >
>> > > > I've been trying to run some basic tests with the recent
>> > code drop.
>> > > > I've been able to get an EntityMangerFactory and
>> > EntityManager, but
>> > > > I'm getting stuck when I connect to a database.  I had to
>> > add some
>> > > > properties to persistence.xml to create the emf and em.
>> > Here's the
>> > > > relevant code :
>> > > >  <properties>
>> > > >             <property name="openjpa.BrokerFactory"  <!-- I  
>> tried
>> > > > org.apache.openjpa.BrokerFactory but it didn't work for me -->
>> > > >                 value="
>> > > > org.apache.openjpa.abstractstore.AbstractStoreBrokerFactory" />
>> > > >
>> > > >             <property
>> > > >
>> > > > name="org.apache.openjpa.abstractstore.AbstractStoreManager"
>> > > >
>> > value="org.apache.openjpa.xmlstore.XMLStoreManager"
>> > > > /> </properties>
>> > > >
>> > > > I was also able to get the PCEnhancer to run against some  
>> entity
>> > > > classes.
>> > > > The only obstacle there was getting the classpath set up
>> > > > appropriately.
>> > > >
>> > > > When I try to find or persist an entity I get an
>> > exception like this :
>> > > >
>> > > > <0|false|0.0.1>
>> > > > org.apache.openjpa.persistence.PersistenceException: null
>> > > >     at
>> > org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:820)
>> > > >     at
>> > org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:703)
>> > > >     at
>> > > >
>> > org.apache.openjpa.kernel.DelegatingBroker.find 
>> (DelegatingBroker.jav
>> > > > a
>> > > > :176)
>> > > >     at org.apache.openjpa.persistence.EntityManagerImpl.find(
>> > > > EntityManagerImpl.java:303)
>> > > >     . . .
>> > > >     at  
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
>> > > > RemoteTestRunner.java:386)
>> > > >     at
>> > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
>> > > > RemoteTestRunner.java:196)
>> > > > Caused by: java.lang.NullPointerException
>> > > >     at java.io.File.<init>(File.java:220)
>> > > >     at org.apache.openjpa.xmlstore.XMLFileHandler.getFile(
>> > > > XMLFileHandler.java:113)
>> > > >     at
>> > > >
>> > org.apache.openjpa.xmlstore.XMLFileHandler.load(XMLFileHandler.java
>> > > > :77)
>> > > >     at
>> > org.apache.openjpa.xmlstore.XMLStore.getMap(XMLStore.java:77)
>> > > >     at
>> > org.apache.openjpa.xmlstore.XMLStore.getData(XMLStore.java:56)
>> > > >     at org.apache.openjpa.xmlstore.XMLStoreManager.initialize(
>> > > > XMLStoreManager.java:105)
>> > > >     at
>> > org.apache.openjpa.kernel.DelegatingStoreManager.initialize(
>> > > > DelegatingStoreManager.java:108)
>> > > >     at org.apache.openjpa.kernel.ROPStoreManager.initialize(
>> > > > ROPStoreManager.java:57)
>> > > >     at
>> > > >
>> > org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java: 
>> 842)
>> > > >     at
>> > org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:794)
>> > > >     ... 22 more
>> > > >
>> > > > Is this expected with the code that is currently in SVN, or  
>> do I
>> > > > just need some more configuration properties?
>> > > >
>> > > > Thanks,
>> > > > --
>> > > > -Michael Dick
>> > > >
>> > >
>> >  
>> _____________________________________________________________________ 
>> _
>> > > _
>> > > Notice:  This email message, together with any attachments, may
>> > > contain information  of  BEA Systems,  Inc.,  its
>> > subsidiaries  and
>> > > affiliated entities,  that may be confidential,  proprietary,
>> > > copyrighted  and/or legally privileged, and is intended
>> > solely for the
>> > > use of the individual or entity named in this message. If
>> > you are not
>> > > the intended recipient, and have received this message in error,
>> > > please immediately return this by email and then delete it.
>> > >
>> >
>> >
>> >
>> > --
>> > -Michael Dick
>> >
>> _____________________________________________________________________ 
>> __
>> Notice:  This email message, together with any attachments, may  
>> contain
>> information  of  BEA Systems,  Inc.,  its subsidiaries  and   
>> affiliated
>> entities,  that may be confidential,  proprietary,  copyrighted   
>> and/or
>> legally privileged, and is intended solely for the use of the  
>> individual
>> or entity named in this message. If you are not the intended  
>> recipient,
>> and have received this message in error, please immediately return  
>> this
>> by email and then delete it.
>>
>
>
>
> -- 
> -Michael Dick

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


RE: What we have so far

Posted by Patrick Linskey <pl...@bea.com>.
Cool! It's good to know that it works on other peoples' machines too.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc.  

> -----Original Message-----
> From: Michael Dick [mailto:michael.d.dick@gmail.com] 
> Sent: Thursday, July 20, 2006 1:31 PM
> To: open-jpa-dev@incubator.apache.org
> Subject: Re: What we have so far
> 
> Hi Patrick,
> 
> It's running smoothly for me now, thanks for all the hard 
> work you the rest of the team have put in.
> 
> -Mike
> 
> On 7/19/06, Patrick Linskey <pl...@bea.com> wrote:
> >
> > Hi,
> >
> > You should now be able to see things running end-to-end by running 
> > 'mvn test -Dtest=TestPersistence'. This'll run against an 
> > auto-configured Derby db.
> >
> > -Patrick
> >
> > --
> > Patrick Linskey
> > BEA Systems, Inc.
> >
> > > -----Original Message-----
> > > From: Michael Dick [mailto:michael.d.dick@gmail.com]
> > > Sent: Tuesday, July 18, 2006 3:10 PM
> > > To: open-jpa-dev@incubator.apache.org
> > > Subject: Re: What we have so far
> > >
> > > Thanks Patrick,
> > >
> > > Are there any other pieces of code that I'd need to get 
> running to 
> > > XML? I'm happy to keep experimenting with what we have, 
> unless you 
> > > know there's something missing (I'd rather not distract you from 
> > > dropping the JDBC code).
> > >
> > >
> > > Regards,
> > >
> > >
> > > On 7/18/06, Patrick Linskey <pl...@bea.com> wrote:
> > > >
> > > > I don't think that anyone has actually tried to wire up the
> > > XML store
> > > > manager at runtime based on the code in the svn repository.
> > > Right now,
> > > > we're focussed mostly on getting the JDBC code drop ready,
> > > and so have
> > > > been neglecting any polishing / testing / etc. of the code
> > > that *is*
> > > > in the repo.
> > > >
> > > > -Patrick
> > > >
> > > > --
> > > > Patrick Linskey
> > > > BEA Systems, Inc.
> > > >
> > > > > -----Original Message-----
> > > > > From: Michael Dick [mailto:michael.d.dick@gmail.com]
> > > > > Sent: Tuesday, July 18, 2006 1:00 PM
> > > > > To: open-jpa-dev@incubator.apache.org
> > > > > Subject: What we have so far
> > > > >
> > > > > Hi all,
> > > > >
> > > > > I've been trying to run some basic tests with the recent
> > > code drop.
> > > > > I've been able to get an EntityMangerFactory and
> > > EntityManager, but
> > > > > I'm getting stuck when I connect to a database.  I had to
> > > add some
> > > > > properties to persistence.xml to create the emf and em.
> > > Here's the
> > > > > relevant code :
> > > > >  <properties>
> > > > >             <property name="openjpa.BrokerFactory"  
> <!-- I tried 
> > > > > org.apache.openjpa.BrokerFactory but it didn't work for me -->
> > > > >                 value="
> > > > > 
> org.apache.openjpa.abstractstore.AbstractStoreBrokerFactory" />
> > > > >
> > > > >             <property
> > > > >
> > > > > name="org.apache.openjpa.abstractstore.AbstractStoreManager"
> > > > >
> > > value="org.apache.openjpa.xmlstore.XMLStoreManager"
> > > > > /> </properties>
> > > > >
> > > > > I was also able to get the PCEnhancer to run against 
> some entity 
> > > > > classes.
> > > > > The only obstacle there was getting the classpath set up 
> > > > > appropriately.
> > > > >
> > > > > When I try to find or persist an entity I get an
> > > exception like this :
> > > > >
> > > > > <0|false|0.0.1>
> > > > > org.apache.openjpa.persistence.PersistenceException: null
> > > > >     at
> > > org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:820)
> > > > >     at
> > > org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:703)
> > > > >     at
> > > > >
> > > 
> org.apache.openjpa.kernel.DelegatingBroker.find(DelegatingBroker.jav
> > > > > a
> > > > > :176)
> > > > >     at org.apache.openjpa.persistence.EntityManagerImpl.find(
> > > > > EntityManagerImpl.java:303)
> > > > >     . . .
> > > > >     at 
> > > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
> > > > > RemoteTestRunner.java:386)
> > > > >     at
> > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
> > > > > RemoteTestRunner.java:196)
> > > > > Caused by: java.lang.NullPointerException
> > > > >     at java.io.File.<init>(File.java:220)
> > > > >     at org.apache.openjpa.xmlstore.XMLFileHandler.getFile(
> > > > > XMLFileHandler.java:113)
> > > > >     at
> > > > >
> > > 
> org.apache.openjpa.xmlstore.XMLFileHandler.load(XMLFileHandler.java
> > > > > :77)
> > > > >     at
> > > org.apache.openjpa.xmlstore.XMLStore.getMap(XMLStore.java:77)
> > > > >     at
> > > org.apache.openjpa.xmlstore.XMLStore.getData(XMLStore.java:56)
> > > > >     at org.apache.openjpa.xmlstore.XMLStoreManager.initialize(
> > > > > XMLStoreManager.java:105)
> > > > >     at
> > > org.apache.openjpa.kernel.DelegatingStoreManager.initialize(
> > > > > DelegatingStoreManager.java:108)
> > > > >     at org.apache.openjpa.kernel.ROPStoreManager.initialize(
> > > > > ROPStoreManager.java:57)
> > > > >     at
> > > > >
> > > 
> org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:842)
> > > > >     at
> > > org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:794)
> > > > >     ... 22 more
> > > > >
> > > > > Is this expected with the code that is currently in 
> SVN, or do I 
> > > > > just need some more configuration properties?
> > > > >
> > > > > Thanks,
> > > > > --
> > > > > -Michael Dick
> > > > >
> > > >
> > > 
> ____________________________________________________________________
> > > __
> > > > _
> > > > Notice:  This email message, together with any attachments, may 
> > > > contain information  of  BEA Systems,  Inc.,  its
> > > subsidiaries  and
> > > > affiliated entities,  that may be confidential,  proprietary, 
> > > > copyrighted  and/or legally privileged, and is intended
> > > solely for the
> > > > use of the individual or entity named in this message. If
> > > you are not
> > > > the intended recipient, and have received this message 
> in error, 
> > > > please immediately return this by email and then delete it.
> > > >
> > >
> > >
> > >
> > > --
> > > -Michael Dick
> > >
> > 
> ______________________________________________________________________
> > _
> > Notice:  This email message, together with any attachments, may 
> > contain information  of  BEA Systems,  Inc.,  its 
> subsidiaries  and  
> > affiliated entities,  that may be confidential,  proprietary,  
> > copyrighted  and/or legally privileged, and is intended 
> solely for the 
> > use of the individual or entity named in this message. If 
> you are not 
> > the intended recipient, and have received this message in error, 
> > please immediately return this by email and then delete it.
> >
> 
> 
> 
> --
> -Michael Dick
> 
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

Re: What we have so far

Posted by Michael Dick <mi...@gmail.com>.
Hi Patrick,

It's running smoothly for me now, thanks for all the hard work you the rest
of the team have put in.

-Mike

On 7/19/06, Patrick Linskey <pl...@bea.com> wrote:
>
> Hi,
>
> You should now be able to see things running end-to-end by running 'mvn
> test -Dtest=TestPersistence'. This'll run against an auto-configured
> Derby db.
>
> -Patrick
>
> --
> Patrick Linskey
> BEA Systems, Inc.
>
> > -----Original Message-----
> > From: Michael Dick [mailto:michael.d.dick@gmail.com]
> > Sent: Tuesday, July 18, 2006 3:10 PM
> > To: open-jpa-dev@incubator.apache.org
> > Subject: Re: What we have so far
> >
> > Thanks Patrick,
> >
> > Are there any other pieces of code that I'd need to get
> > running to XML? I'm happy to keep experimenting with what we
> > have, unless you know there's something missing (I'd rather
> > not distract you from dropping the JDBC code).
> >
> >
> > Regards,
> >
> >
> > On 7/18/06, Patrick Linskey <pl...@bea.com> wrote:
> > >
> > > I don't think that anyone has actually tried to wire up the
> > XML store
> > > manager at runtime based on the code in the svn repository.
> > Right now,
> > > we're focussed mostly on getting the JDBC code drop ready,
> > and so have
> > > been neglecting any polishing / testing / etc. of the code
> > that *is*
> > > in the repo.
> > >
> > > -Patrick
> > >
> > > --
> > > Patrick Linskey
> > > BEA Systems, Inc.
> > >
> > > > -----Original Message-----
> > > > From: Michael Dick [mailto:michael.d.dick@gmail.com]
> > > > Sent: Tuesday, July 18, 2006 1:00 PM
> > > > To: open-jpa-dev@incubator.apache.org
> > > > Subject: What we have so far
> > > >
> > > > Hi all,
> > > >
> > > > I've been trying to run some basic tests with the recent
> > code drop.
> > > > I've been able to get an EntityMangerFactory and
> > EntityManager, but
> > > > I'm getting stuck when I connect to a database.  I had to
> > add some
> > > > properties to persistence.xml to create the emf and em.
> > Here's the
> > > > relevant code :
> > > >  <properties>
> > > >             <property name="openjpa.BrokerFactory"  <!-- I tried
> > > > org.apache.openjpa.BrokerFactory but it didn't work for me -->
> > > >                 value="
> > > > org.apache.openjpa.abstractstore.AbstractStoreBrokerFactory" />
> > > >
> > > >             <property
> > > >
> > > > name="org.apache.openjpa.abstractstore.AbstractStoreManager"
> > > >
> > value="org.apache.openjpa.xmlstore.XMLStoreManager"
> > > > /> </properties>
> > > >
> > > > I was also able to get the PCEnhancer to run against some entity
> > > > classes.
> > > > The only obstacle there was getting the classpath set up
> > > > appropriately.
> > > >
> > > > When I try to find or persist an entity I get an
> > exception like this :
> > > >
> > > > <0|false|0.0.1>
> > > > org.apache.openjpa.persistence.PersistenceException: null
> > > >     at
> > org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:820)
> > > >     at
> > org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:703)
> > > >     at
> > > >
> > org.apache.openjpa.kernel.DelegatingBroker.find(DelegatingBroker.jav
> > > > a
> > > > :176)
> > > >     at org.apache.openjpa.persistence.EntityManagerImpl.find(
> > > > EntityManagerImpl.java:303)
> > > >     . . .
> > > >     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
> > > > RemoteTestRunner.java:386)
> > > >     at
> > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
> > > > RemoteTestRunner.java:196)
> > > > Caused by: java.lang.NullPointerException
> > > >     at java.io.File.<init>(File.java:220)
> > > >     at org.apache.openjpa.xmlstore.XMLFileHandler.getFile(
> > > > XMLFileHandler.java:113)
> > > >     at
> > > >
> > org.apache.openjpa.xmlstore.XMLFileHandler.load(XMLFileHandler.java
> > > > :77)
> > > >     at
> > org.apache.openjpa.xmlstore.XMLStore.getMap(XMLStore.java:77)
> > > >     at
> > org.apache.openjpa.xmlstore.XMLStore.getData(XMLStore.java:56)
> > > >     at org.apache.openjpa.xmlstore.XMLStoreManager.initialize(
> > > > XMLStoreManager.java:105)
> > > >     at
> > org.apache.openjpa.kernel.DelegatingStoreManager.initialize(
> > > > DelegatingStoreManager.java:108)
> > > >     at org.apache.openjpa.kernel.ROPStoreManager.initialize(
> > > > ROPStoreManager.java:57)
> > > >     at
> > > >
> > org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:842)
> > > >     at
> > org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:794)
> > > >     ... 22 more
> > > >
> > > > Is this expected with the code that is currently in SVN, or do I
> > > > just need some more configuration properties?
> > > >
> > > > Thanks,
> > > > --
> > > > -Michael Dick
> > > >
> > >
> > ______________________________________________________________________
> > > _
> > > Notice:  This email message, together with any attachments, may
> > > contain information  of  BEA Systems,  Inc.,  its
> > subsidiaries  and
> > > affiliated entities,  that may be confidential,  proprietary,
> > > copyrighted  and/or legally privileged, and is intended
> > solely for the
> > > use of the individual or entity named in this message. If
> > you are not
> > > the intended recipient, and have received this message in error,
> > > please immediately return this by email and then delete it.
> > >
> >
> >
> >
> > --
> > -Michael Dick
> >
> _______________________________________________________________________
> Notice:  This email message, together with any attachments, may contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
> entities,  that may be confidential,  proprietary,  copyrighted  and/or
> legally privileged, and is intended solely for the use of the individual
> or entity named in this message. If you are not the intended recipient,
> and have received this message in error, please immediately return this
> by email and then delete it.
>



-- 
-Michael Dick

RE: What we have so far

Posted by Patrick Linskey <pl...@bea.com>.
Hi,

You should now be able to see things running end-to-end by running 'mvn
test -Dtest=TestPersistence'. This'll run against an auto-configured
Derby db.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc.  

> -----Original Message-----
> From: Michael Dick [mailto:michael.d.dick@gmail.com] 
> Sent: Tuesday, July 18, 2006 3:10 PM
> To: open-jpa-dev@incubator.apache.org
> Subject: Re: What we have so far
> 
> Thanks Patrick,
> 
> Are there any other pieces of code that I'd need to get 
> running to XML? I'm happy to keep experimenting with what we 
> have, unless you know there's something missing (I'd rather 
> not distract you from dropping the JDBC code).
> 
> 
> Regards,
> 
> 
> On 7/18/06, Patrick Linskey <pl...@bea.com> wrote:
> >
> > I don't think that anyone has actually tried to wire up the 
> XML store 
> > manager at runtime based on the code in the svn repository. 
> Right now, 
> > we're focussed mostly on getting the JDBC code drop ready, 
> and so have 
> > been neglecting any polishing / testing / etc. of the code 
> that *is* 
> > in the repo.
> >
> > -Patrick
> >
> > --
> > Patrick Linskey
> > BEA Systems, Inc.
> >
> > > -----Original Message-----
> > > From: Michael Dick [mailto:michael.d.dick@gmail.com]
> > > Sent: Tuesday, July 18, 2006 1:00 PM
> > > To: open-jpa-dev@incubator.apache.org
> > > Subject: What we have so far
> > >
> > > Hi all,
> > >
> > > I've been trying to run some basic tests with the recent 
> code drop.  
> > > I've been able to get an EntityMangerFactory and 
> EntityManager, but 
> > > I'm getting stuck when I connect to a database.  I had to 
> add some 
> > > properties to persistence.xml to create the emf and em. 
> Here's the 
> > > relevant code :
> > >  <properties>
> > >             <property name="openjpa.BrokerFactory"  <!-- I tried 
> > > org.apache.openjpa.BrokerFactory but it didn't work for me -->
> > >                 value="
> > > org.apache.openjpa.abstractstore.AbstractStoreBrokerFactory" />
> > >
> > >             <property
> > >
> > > name="org.apache.openjpa.abstractstore.AbstractStoreManager"
> > >                 
> value="org.apache.openjpa.xmlstore.XMLStoreManager" 
> > > /> </properties>
> > >
> > > I was also able to get the PCEnhancer to run against some entity 
> > > classes.
> > > The only obstacle there was getting the classpath set up 
> > > appropriately.
> > >
> > > When I try to find or persist an entity I get an 
> exception like this :
> > >
> > > <0|false|0.0.1>
> > > org.apache.openjpa.persistence.PersistenceException: null
> > >     at 
> org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:820)
> > >     at 
> org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:703)
> > >     at
> > > 
> org.apache.openjpa.kernel.DelegatingBroker.find(DelegatingBroker.jav
> > > a
> > > :176)
> > >     at org.apache.openjpa.persistence.EntityManagerImpl.find(
> > > EntityManagerImpl.java:303)
> > >     . . .
> > >     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
> > > RemoteTestRunner.java:386)
> > >     at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
> > > RemoteTestRunner.java:196)
> > > Caused by: java.lang.NullPointerException
> > >     at java.io.File.<init>(File.java:220)
> > >     at org.apache.openjpa.xmlstore.XMLFileHandler.getFile(
> > > XMLFileHandler.java:113)
> > >     at
> > > 
> org.apache.openjpa.xmlstore.XMLFileHandler.load(XMLFileHandler.java
> > > :77)
> > >     at 
> org.apache.openjpa.xmlstore.XMLStore.getMap(XMLStore.java:77)
> > >     at 
> org.apache.openjpa.xmlstore.XMLStore.getData(XMLStore.java:56)
> > >     at org.apache.openjpa.xmlstore.XMLStoreManager.initialize(
> > > XMLStoreManager.java:105)
> > >     at 
> org.apache.openjpa.kernel.DelegatingStoreManager.initialize(
> > > DelegatingStoreManager.java:108)
> > >     at org.apache.openjpa.kernel.ROPStoreManager.initialize(
> > > ROPStoreManager.java:57)
> > >     at
> > > 
> org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:842)
> > >     at 
> org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:794)
> > >     ... 22 more
> > >
> > > Is this expected with the code that is currently in SVN, or do I 
> > > just need some more configuration properties?
> > >
> > > Thanks,
> > > --
> > > -Michael Dick
> > >
> > 
> ______________________________________________________________________
> > _
> > Notice:  This email message, together with any attachments, may 
> > contain information  of  BEA Systems,  Inc.,  its 
> subsidiaries  and  
> > affiliated entities,  that may be confidential,  proprietary,  
> > copyrighted  and/or legally privileged, and is intended 
> solely for the 
> > use of the individual or entity named in this message. If 
> you are not 
> > the intended recipient, and have received this message in error, 
> > please immediately return this by email and then delete it.
> >
> 
> 
> 
> --
> -Michael Dick
> 
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

Re: What we have so far

Posted by Michael Dick <mi...@gmail.com>.
Thanks Patrick,

Are there any other pieces of code that I'd need to get running to XML? I'm
happy to keep experimenting with what we have, unless you know there's
something missing (I'd rather not distract you from dropping the JDBC code).


Regards,


On 7/18/06, Patrick Linskey <pl...@bea.com> wrote:
>
> I don't think that anyone has actually tried to wire up the XML store
> manager at runtime based on the code in the svn repository. Right now,
> we're focussed mostly on getting the JDBC code drop ready, and so have
> been neglecting any polishing / testing / etc. of the code that *is* in
> the repo.
>
> -Patrick
>
> --
> Patrick Linskey
> BEA Systems, Inc.
>
> > -----Original Message-----
> > From: Michael Dick [mailto:michael.d.dick@gmail.com]
> > Sent: Tuesday, July 18, 2006 1:00 PM
> > To: open-jpa-dev@incubator.apache.org
> > Subject: What we have so far
> >
> > Hi all,
> >
> > I've been trying to run some basic tests with the recent code
> > drop.  I've
> > been able to get an EntityMangerFactory and EntityManager,
> > but I'm getting
> > stuck when I connect to a database.  I had to add some properties to
> > persistence.xml to create the emf and em. Here's the relevant code :
> >  <properties>
> >             <property name="openjpa.BrokerFactory"  <!-- I tried
> > org.apache.openjpa.BrokerFactory but it didn't work for me -->
> >                 value="
> > org.apache.openjpa.abstractstore.AbstractStoreBrokerFactory" />
> >
> >             <property
> >
> > name="org.apache.openjpa.abstractstore.AbstractStoreManager"
> >                 value="org.apache.openjpa.xmlstore.XMLStoreManager" />
> > </properties>
> >
> > I was also able to get the PCEnhancer to run against some
> > entity classes.
> > The only obstacle there was getting the classpath set up
> > appropriately.
> >
> > When I try to find or persist an entity I get an exception like this :
> >
> > <0|false|0.0.1>
> > org.apache.openjpa.persistence.PersistenceException: null
> >     at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:820)
> >     at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:703)
> >     at
> > org.apache.openjpa.kernel.DelegatingBroker.find(DelegatingBroker.java
> > :176)
> >     at org.apache.openjpa.persistence.EntityManagerImpl.find(
> > EntityManagerImpl.java:303)
> >     . . .
> >     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
> > RemoteTestRunner.java:386)
> >     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
> > RemoteTestRunner.java:196)
> > Caused by: java.lang.NullPointerException
> >     at java.io.File.<init>(File.java:220)
> >     at org.apache.openjpa.xmlstore.XMLFileHandler.getFile(
> > XMLFileHandler.java:113)
> >     at
> > org.apache.openjpa.xmlstore.XMLFileHandler.load(XMLFileHandler.java
> > :77)
> >     at org.apache.openjpa.xmlstore.XMLStore.getMap(XMLStore.java:77)
> >     at org.apache.openjpa.xmlstore.XMLStore.getData(XMLStore.java:56)
> >     at org.apache.openjpa.xmlstore.XMLStoreManager.initialize(
> > XMLStoreManager.java:105)
> >     at org.apache.openjpa.kernel.DelegatingStoreManager.initialize(
> > DelegatingStoreManager.java:108)
> >     at org.apache.openjpa.kernel.ROPStoreManager.initialize(
> > ROPStoreManager.java:57)
> >     at
> > org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:842)
> >     at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:794)
> >     ... 22 more
> >
> > Is this expected with the code that is currently in SVN, or
> > do I just need
> > some more configuration properties?
> >
> > Thanks,
> > --
> > -Michael Dick
> >
> _______________________________________________________________________
> Notice:  This email message, together with any attachments, may contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
> entities,  that may be confidential,  proprietary,  copyrighted  and/or
> legally privileged, and is intended solely for the use of the individual
> or entity named in this message. If you are not the intended recipient,
> and have received this message in error, please immediately return this
> by email and then delete it.
>



-- 
-Michael Dick

RE: What we have so far

Posted by Patrick Linskey <pl...@bea.com>.
I don't think that anyone has actually tried to wire up the XML store
manager at runtime based on the code in the svn repository. Right now,
we're focussed mostly on getting the JDBC code drop ready, and so have
been neglecting any polishing / testing / etc. of the code that *is* in
the repo.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc.  

> -----Original Message-----
> From: Michael Dick [mailto:michael.d.dick@gmail.com] 
> Sent: Tuesday, July 18, 2006 1:00 PM
> To: open-jpa-dev@incubator.apache.org
> Subject: What we have so far
> 
> Hi all,
> 
> I've been trying to run some basic tests with the recent code 
> drop.  I've
> been able to get an EntityMangerFactory and EntityManager, 
> but I'm getting
> stuck when I connect to a database.  I had to add some properties to
> persistence.xml to create the emf and em. Here's the relevant code :
>  <properties>
>             <property name="openjpa.BrokerFactory"  <!-- I tried
> org.apache.openjpa.BrokerFactory but it didn't work for me -->
>                 value="
> org.apache.openjpa.abstractstore.AbstractStoreBrokerFactory" />
> 
>             <property
>                 
> name="org.apache.openjpa.abstractstore.AbstractStoreManager"
>                 value="org.apache.openjpa.xmlstore.XMLStoreManager" />
> </properties>
> 
> I was also able to get the PCEnhancer to run against some 
> entity classes.
> The only obstacle there was getting the classpath set up 
> appropriately.
> 
> When I try to find or persist an entity I get an exception like this :
> 
> <0|false|0.0.1> 
> org.apache.openjpa.persistence.PersistenceException: null
>     at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:820)
>     at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:703)
>     at 
> org.apache.openjpa.kernel.DelegatingBroker.find(DelegatingBroker.java
> :176)
>     at org.apache.openjpa.persistence.EntityManagerImpl.find(
> EntityManagerImpl.java:303)
>     . . .
>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
> RemoteTestRunner.java:386)
>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
> RemoteTestRunner.java:196)
> Caused by: java.lang.NullPointerException
>     at java.io.File.<init>(File.java:220)
>     at org.apache.openjpa.xmlstore.XMLFileHandler.getFile(
> XMLFileHandler.java:113)
>     at 
> org.apache.openjpa.xmlstore.XMLFileHandler.load(XMLFileHandler.java
> :77)
>     at org.apache.openjpa.xmlstore.XMLStore.getMap(XMLStore.java:77)
>     at org.apache.openjpa.xmlstore.XMLStore.getData(XMLStore.java:56)
>     at org.apache.openjpa.xmlstore.XMLStoreManager.initialize(
> XMLStoreManager.java:105)
>     at org.apache.openjpa.kernel.DelegatingStoreManager.initialize(
> DelegatingStoreManager.java:108)
>     at org.apache.openjpa.kernel.ROPStoreManager.initialize(
> ROPStoreManager.java:57)
>     at 
> org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:842)
>     at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:794)
>     ... 22 more
> 
> Is this expected with the code that is currently in SVN, or 
> do I just need
> some more configuration properties?
> 
> Thanks,
> -- 
> -Michael Dick
> 
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.