openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dick" <michael.d.d...@gmail.com>
Subject What we have so far
Date Tue, 18 Jul 2006 20:00:21 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message