openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Prud'hommeaux <mprud...@apache.org>
Subject Re: using JDBCBrokerFactory
Date Tue, 22 Aug 2006 19:45:00 GMT
Mike-

That's a lousy error message, but I'm not sure what it causing it. Do  
you have all of the openjpa-*.jar files in your CLASSPATH? It almost  
sounds like one of the META-INF/services/ files that reports the  
available metadata factories is not being found. How did you create  
the jars? Did you use "mvn package", or some other mechanism?

Also, if you try the persistence.xml file that is used with the test  
cases (openjpa-persistence-jdbc/target/test-classes/META-INF/ 
persistence.xml), do you see anything different?


On Aug 22, 2006, at 12:25 PM, Mike Perham wrote:

>
>
>
>
> I'm trying to get a Spring-loaded OpenJPA-based EMF working.   
> Here's my
> configuration and the error I'm seeing:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <persistence xmlns="http://java.sun.com/xml/ns/persistence"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
> http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
>     version="1.0">
>     <persistence-unit name ="spm">
>
> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</ 
> provider>
>             <properties>
>                   <property name="openjpa.BrokerFactory"
>
> value="org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory" />
>             </properties>
>     </persistence-unit>
> </persistence>
>
> Caused by: java.lang.NullPointerException
>         at
> org.apache.openjpa.meta.MetaDataRepository.setMetaDataFactory 
> (MetaDataRepository.java:180)
>         at
> org.apache.openjpa.meta.MetaDataRepository.endConfiguration 
> (MetaDataRepository.java:1289)
>         at
> org.apache.openjpa.jdbc.meta.MappingRepository.endConfiguration 
> (MappingRepository.java:1172)
>         at
> org.apache.openjpa.lib.conf.Configurations.configureInstance 
> (Configurations.java:306)
>         at
> org.apache.openjpa.lib.conf.Configurations.configureInstance 
> (Configurations.java:231)
>         at
> org.apache.openjpa.lib.conf.PluginValue.instantiate 
> (PluginValue.java:99)
>         at
> org.apache.openjpa.lib.conf.ObjectValue.instantiate 
> (ObjectValue.java:70)
>         at
> org.apache.openjpa.conf.OpenJPAConfigurationImpl.getMetaDataRepository 
> Instance(OpenJPAConfigurationImpl.java:853)
>
> I presume I'm missing a property.  Is there a list of properties  
> which need
> to/can be set here?
>
> mike


Mime
View raw message