Yeah, I've never been a great fan of Java magical factories, it's usually a
pain to debug.

Thanks,
Matthieu

On 4/9/07, Marc Prud'hommeaux <[EMAIL PROTECTED]> wrote:


Glad you got it fixed. It's annoying that
javax.persistence.Persistence doesn't provide more of a clue as to
why it failed.



On Apr 9, 2007, at 2:57 PM, Matthieu Riou wrote:

> I thought I had OpenJPA correctly placed but actually it wasn't
> copied at
> the right place. Thanks for the hint!
>
> Matthieu
>
> On 4/9/07, Marc Prud'hommeaux <[EMAIL PROTECTED]> wrote:
>>
>> Matthieu-
>>
>> Hmm ... the persistence.xml file is fine (I just tried it locally). I
>> think the error "No Persistence provider for EntityManager named ode-
>> store" is coming from javax.persistence.Persistence not being able to
>> load org.apache.openjpa.persistence.PersistenceProviderImpl.
>>
>> Are you sure the OpenJPA jar (and all its required dependencies) are
>> in your CLASSPATH? Can you send us the setting of your classpath?
>>
>> If you write a main() method that just tries "new
>> org.apache.openjpa.persistence.PersistenceProviderImpl()", what
>> happens?
>>
>>
>>
>> On Apr 9, 2007, at 12:25 PM, Matthieu Riou wrote:
>>
>> > The System.out gives me the correct path to the URL:
>> >
>> > file:/home/dusty/Dev/Projects/ode/bpel-store/target/classes/META-
>> > INF/persistence.xml
>> >
>> > The corresponding file contains:
>> >
>> > <persistence xmlns="http://java.sun.com/xml/ns/persistence";
>> >    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>> >    version="1.0">
>> >    <persistence-unit name="ode-store">
>> >
>> > <provider>org.apache.openjpa.persistence.PersistenceProviderImpl
>> > </provider>
>> >        <class>org.apache.ode.store.jpa.ProcessConfDaoImpl</class>
>> >        <class>org.apache.ode.store.jpa.ProcessConfPropertyDaoImpl</
>> > class>
>> >        <class>org.apache.ode.store.jpa.DeploymentUnitDaoImpl</
>> class>
>> >        <class>org.apache.ode.store.jpa.VersionTrackerDAOImpl</
>> class>
>> >    </persistence-unit>
>> > </persistence>
>> >
>> > Thanks,
>> > Matthieu
>> >
>> > On 4/9/07, Marc Prud'hommeaux <[EMAIL PROTECTED]> wrote:
>> >>
>> >> Matthieu-
>> >>
>> >> Note that there shouldn't be any problem with running against a
>> >> directory versus a jar (I do it all the time), so there is
>> probably
>> >> some environment issue.
>> >>
>> >> Can you post your persistence.xml? If you write a little main()
>> >> method that just does: System.out.println(getClass().getResource
>> ("/
>> >> META-INF/persistence.xml"), what does it show?
>> >>
>> >>
>> >>
>> >> On Apr 9, 2007, at 11:54 AM, Matthieu Riou wrote:
>> >>
>> >> > Hi,
>> >> >
>> >> > I'm having some difficulties testing a module that uses
>> persistent
>> >> > classes.
>> >> > In that case the classes aren't loaded from a jar but are
>> directly
>> >> > in the
>> >> > classpath and so does the persistence.xml.  However I always get
>> >> "No
>> >> > Persistence provider for EntityManager named ode-store". I've
>> tried
>> >> > several
>> >> > things:
>> >> >
>> >> > - placing persistence.xml in a META-INF subdirectory of a
>> directory
>> >> > directly
>> >> > in my classpath
>> >> > - placing persistence.xml in a directory directly in my
>> classpath
>> >> > - renaming my persistence.xml to openjpa.xml and placing its
>> >> directory
>> >> > directly in my classpath
>> >> > - setting the openjpa.properties system property to the
>> location of
>> >> > the
>> >> > openjpa.xml
>> >> >
>> >> > None of these worked, same error message. I guess I'm missing
>> >> > something but
>> >> > can't spot what, any idea?
>> >> >
>> >> > Thanks!
>> >> > Matthieu
>> >>
>> >>
>>
>>


Reply via email to