openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Perham <mper...@us.ibm.com>
Subject Re: using JDBCBrokerFactory
Date Tue, 22 Aug 2006 21:31:10 GMT





Marc, you got me.  I brewed my own jar because I really didn't want to
spend 1-2 hours figuring out how the jars all fit together.  So I unzipped
openjpa*.zip and then zipped everything back into a single
openjpa-0.9.0.jar.  The only problem I had was multiple
META-INF/services/org.apache.openjpa.conf.ProductDerivation files.  Would
this cause such a problem?  Its contents are:

org.apache.openjpa.persistence.jdbc.JDBCPersistenceProductDerivation

which seems reasonable to me.

The test persistence.xml gets the exact same error message.  I'm using an
IBM-internal drop of the code from about 2 weeks ago.

mike


"Marc Prud'hommeaux" <mprudhomapache@gmail.com> wrote on 08/22/2006
02:45:00 PM:

> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message