Fwd: [platform-dev] Re: Platform development with Maven and JPA(EclipseLink)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Fwd: [platform-dev] Re: Platform development with Maven and JPA(EclipseLink)

ThSITC
... detto, for info.
Thomas.

-------- Original-Nachricht --------
Betreff: [platform-dev] Re: Platform development with Maven and JPA(EclipseLink)
Datum: Thu, 16 Jun 2011 18:53:48 +0200
Von: Slawomir [hidden email]
Antwort an: [hidden email]
An: [hidden email]


Hi,
I tried it with right click and combined with the properties solution 
from Stephen both doesn't work.  I've put my Definitions module and put 
the classes into the Business.Implementations module where the 
persistence unit is defined nothing worked. Now I will try to do the 
tutorial, maybe I then get a hint what went wrong.

By the way does someone know this:
"Warning - could not install some modules:
Business.Implementations NetBeans Module - The module derby was 
requested in version >= 10.4.2000000.689064 but only 10.4.2000000 was found.
Another module could not be installed due to the above problems. "
This is the error message when I try it with derby(not embedded). I just 
insert a dependency
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.4.2.0</version>
</dependency>

into the pom.xml. The first version number is the version in the 
Manifest file of derby but it's the osgi version why does netbeans 
bother? Is there a workaround or need I a derby version without the osgi 
definitions?
Regards
Slawomir

Am 16.06.2011 09:17, schrieb Libor Jelinek:
> Hello Slawomir,
> I learnt learned JPA in Maven-based NBP development from official
> http://platform.netbeans.org/tutorials/nbm-maven-crud.html.
>
> Simplified, there is no need to hack anything. Just right-click on
> package in module, ale select New Entity wizard. It will created
> persistence.xml (persistence unit) and add dependency to Eclipselink
> to your module's pom.xml.
>
> Libor
>
>
> 2011/6/15 Slawomir[hidden email]:
>>   Hi,
>> I want to build my first reallife App with Netbeans 7.0 Platform. I chosen
>> to use Maven as build tool, because I don't like it to easy. After some
>> stupid renaming action, which was my fault, I found my Modules in the Plugin
>> Window. So far so well... Than I wanted to connect to my database and here I
>> am after 3 days hacking:)
>> It fails at when I try to get the EntityManagerFactory and this is my code
>> for do so:
>> EntityManagerFactory emf = null;
>>         ClassLoader l = Lookup.getDefault().lookup(ClassLoader.class);
>>         try {
>>             URL u = l.getResource("META-INF/persistence.xml");
>>             Class c = Class.forName("org.postgresql.Driver");
>>              c =
>> Class.forName("org.eclipse.persistence.jpa.PersistenceProvider");
>>             emf =
>> Persistence.createEntityManagerFactory("com.mosesonline.tbff.TBFFPU");
>>         } catch (Exception e) {
>>             e.printStackTrace();
>>         }
>>         return emf.createEntityManager();
>> As you can see I try to find the xml, and the classes before I create the
>> emf and I find them the objects are filled with the right classes and urls.
>> But in the main line emf = ... an exception occurs "No Persistence provider
>> for EntityManager named com.mosesonline.tbff.TBFFPU".
>> To make your picture complete here is the persistence.xml :
>> <?xml version="1.0" encoding="UTF-8"?>
>> <persistence version="2.0" 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_2_0.xsd">
>> <persistence-unit name="com.mosesonline.tbff.TBFFPU"
>> transaction-type="RESOURCE_LOCAL">
>> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
>> <class>com.mosesonline.tbff.definitions.basics.Course</class>
>> <class>com.mosesonline.tbff.definitions.basics.Person</class>
>> <class>com.mosesonline.tbff.definitions.basics.Pupil</class>
>> <class>com.mosesonline.tbff.definitions.basics.SchoolClass</class>
>> <class>com.mosesonline.tbff.definitions.basics.Subject</class>
>> <class>com.mosesonline.tbff.definitions.basics.exams.Exam</class>
>> <class>com.mosesonline.tbff.definitions.basics.exams.ExamModifier</class>
>> <class>com.mosesonline.tbff.definitions.basics.exams.ExamTag</class>
>> <class>com.mosesonline.tbff.definitions.basics.exams.Task</class>
>> <class>com.mosesonline.tbff.definitions.basics.exams.types.Dictate</class>
>> <class>com.mosesonline.tbff.definitions.basics.roles.CourseExam</class>
>> <class>com.mosesonline.tbff.definitions.basics.roles.CourseExamParticipant</class>
>> <class>com.mosesonline.tbff.definitions.basics.roles.CourseParticipant</class>
>> <class>com.mosesonline.tbff.definitions.basics.roles.GuarantorRole</class>
>> <class>com.mosesonline.tbff.definitions.basics.roles.IsInClass</class>
>> <properties>
>> <property name="javax.persistence.jdbc.url"
>> value="jdbc:postgresql://localhost:5432/tbffDB"/>
>> <property name="javax.persistence.jdbc.password" value="tbff"/>
>> <property name="javax.persistence.jdbc.driver"
>> value="org.postgresql.Driver"/>
>> <property name="javax.persistence.jdbc.user" value="tbff"/>
>> <property name="eclipselink.target-database" value="sdfsdfsda"/>
>> <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
>> </properties>
>> </persistence-unit>
>> </persistence>
>>
>> Before I forget, I tried it with derby before but there was also a problem
>> with the version of the jar in Maven I had 10.4.2.0 but the platform didn't
>> start because netbeans looks for the OSGi version tag in the mainfest and
>> this was not the same. Have I to compile derby myself with the "right"
>> version tag like in maven? But this second question is not so important, I
>> wanted to use Postgres in production anyway so I can also test with it.
>> Thanks in advance for help.
>> Regards
>> Slawomir
>>
>>



--
Thomas Schneider (www.thsitc.com)

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Thomas Schneider, Vienna, Austria (Europe) :-)

www.thsitc.com
www.db-123.com
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [platform-dev] Re: Platform development with Maven and JPA(EclipseLink)

alansam
Ditto for what does this have to do with anything.  Please stop cross-posting from the NetBeans list.  Anyone interested in NetBeans should already be subscribed; those who aren't don't want to see this...

On 16 June 2011 10:06, Thomas Schneider <[hidden email]> wrote:
... detto, for info.
Thomas.

-------- Original-Nachricht --------
Betreff: [platform-dev] Re: Platform development with Maven and JPA(EclipseLink)
Datum: Thu, 16 Jun 2011 18:53:48 +0200
Von: Slawomir [hidden email]
Antwort an: [hidden email]
An: [hidden email]


Hi,
I tried it with right click and combined with the properties solution 
from Stephen both doesn't work.  I've put my Definitions module and put 
the classes into the Business.Implementations module where the 
persistence unit is defined nothing worked. Now I will try to do the 
tutorial, maybe I then get a hint what went wrong.

By the way does someone know this:
"Warning - could not install some modules:
Business.Implementations NetBeans Module - The module derby was 
requested in version >= 10.4.2000000.689064 but only 10.4.2000000 was found.
Another module could not be installed due to the above problems. "
This is the error message when I try it with derby(not embedded). I just 
insert a dependency
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.4.2.0</version>
</dependency>

into the pom.xml. The first version number is the version in the 
Manifest file of derby but it's the osgi version why does netbeans 
bother? Is there a workaround or need I a derby version without the osgi 
definitions?
Regards
Slawomir

Am 16.06.2011 09:17, schrieb Libor Jelinek:
> Hello Slawomir,
> I learnt learned JPA in Maven-based NBP development from official
> http://platform.netbeans.org/tutorials/nbm-maven-crud.html.
>
> Simplified, there is no need to hack anything. Just right-click on
> package in module, ale select New Entity wizard. It will created
> persistence.xml (persistence unit) and add dependency to Eclipselink
> to your module's pom.xml.
>
> Libor
>
>
> 2011/6/15 Slawomir[hidden email]:
>>   Hi,
>> I want to build my first reallife App with Netbeans 7.0 Platform. I chosen
>> to use Maven as build tool, because I don't like it to easy. After some
>> stupid renaming action, which was my fault, I found my Modules in the Plugin
>> Window. So far so well... Than I wanted to connect to my database and here I
>> am after 3 days hacking:)
>> It fails at when I try to get the EntityManagerFactory and this is my code
>> for do so:
>> EntityManagerFactory emf = null;
>>         ClassLoader l = Lookup.getDefault().lookup(ClassLoader.class);
>>         try {
>>             URL u = l.getResource("META-INF/persistence.xml");
>>             Class c = Class.forName("org.postgresql.Driver");
>>              c =
>> Class.forName("org.eclipse.persistence.jpa.PersistenceProvider");
>>             emf =
>> Persistence.createEntityManagerFactory("com.mosesonline.tbff.TBFFPU");
>>         } catch (Exception e) {
>>             e.printStackTrace();
>>         }
>>         return emf.createEntityManager();
>> As you can see I try to find the xml, and the classes before I create the
>> emf and I find them the objects are filled with the right classes and urls.
>> But in the main line emf = ... an exception occurs "No Persistence provider
>> for EntityManager named com.mosesonline.tbff.TBFFPU".
>> To make your picture complete here is the persistence.xml :
>> <?xml version="1.0" encoding="UTF-8"?>
>> <persistence version="2.0" 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_2_0.xsd">
>> <persistence-unit name="com.mosesonline.tbff.TBFFPU"
>> transaction-type="RESOURCE_LOCAL">
>> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
>> <class>com.mosesonline.tbff.definitions.basics.Course</class>
>> <class>com.mosesonline.tbff.definitions.basics.Person</class>
>> <class>com.mosesonline.tbff.definitions.basics.Pupil</class>
>> <class>com.mosesonline.tbff.definitions.basics.SchoolClass</class>
>> <class>com.mosesonline.tbff.definitions.basics.Subject</class>
>> <class>com.mosesonline.tbff.definitions.basics.exams.Exam</class>
>> <class>com.mosesonline.tbff.definitions.basics.exams.ExamModifier</class>
>> <class>com.mosesonline.tbff.definitions.basics.exams.ExamTag</class>
>> <class>com.mosesonline.tbff.definitions.basics.exams.Task</class>
>> <class>com.mosesonline.tbff.definitions.basics.exams.types.Dictate</class>
>> <class>com.mosesonline.tbff.definitions.basics.roles.CourseExam</class>
>> <class>com.mosesonline.tbff.definitions.basics.roles.CourseExamParticipant</class>
>> <class>com.mosesonline.tbff.definitions.basics.roles.CourseParticipant</class>
>> <class>com.mosesonline.tbff.definitions.basics.roles.GuarantorRole</class>
>> <class>com.mosesonline.tbff.definitions.basics.roles.IsInClass</class>
>> <properties>
>> <property name="javax.persistence.jdbc.url"
>> value="jdbc:postgresql://localhost:5432/tbffDB"/>
>> <property name="javax.persistence.jdbc.password" value="tbff"/>
>> <property name="javax.persistence.jdbc.driver"
>> value="org.postgresql.Driver"/>
>> <property name="javax.persistence.jdbc.user" value="tbff"/>
>> <property name="eclipselink.target-database" value="sdfsdfsda"/>
>> <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
>> </properties>
>> </persistence-unit>
>> </persistence>
>>
>> Before I forget, I tried it with derby before but there was also a problem
>> with the version of the jar in Maven I had 10.4.2.0 but the platform didn't
>> start because netbeans looks for the OSGi version tag in the mainfest and
>> this was not the same. Have I to compile derby myself with the "right"
>> version tag like in maven? But this second question is not so important, I
>> wanted to use Postgres in production anyway so I can also test with it.
>> Thanks in advance for help.
>> Regards
>> Slawomir
>>
>>



--
Thomas Schneider (www.thsitc.com)

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/





--
Can't tweet, won't tweet!

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Alan

--
Needs more cowbell.
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [platform-dev] Re: Platform development with Maven and JPA(EclipseLink)

Kermit Kiser
In reply to this post by ThSITC
I agree! This cross-posting is ruining the list. Please stop.

Alan Sampson <[hidden email]> wrote:

>Ditto for what does this have to do with anything.  Please stop
>cross-posting from the NetBeans list.  Anyone interested in NetBeans should
>already be subscribed; those who aren't don't want to see this...
>
>On 16 June 2011 10:06, Thomas Schneider <[hidden email]> wrote:
>
>> **
>> ... detto, for info.
>> Thomas.
>>
>> -------- Original-Nachricht --------  Betreff: [platform-dev] Re: Platform
>> development with Maven and JPA(EclipseLink)  Datum: Thu, 16 Jun 2011
>> 18:53:48 +0200  Von: Slawomir <[hidden email]><[hidden email]>  Antwort
>> an: [hidden email]  An: [hidden email]
>>
>> Hi,
>> I tried it with right click and combined with the properties solution
>> from Stephen both doesn't work.  I've put my Definitions module and put
>> the classes into the Business.Implementations module where the
>> persistence unit is defined nothing worked. Now I will try to do the
>> tutorial, maybe I then get a hint what went wrong.
>>
>> By the way does someone know this:
>> "Warning - could not install some modules:
>> Business.Implementations NetBeans Module - The module derby was
>> requested in version >= 10.4.2000000.689064 but only 10.4.2000000 was found.
>> Another module could not be installed due to the above problems. "
>> This is the error message when I try it with derby(not embedded). I just
>> insert a dependency
>> <dependency>
>> <groupId>org.apache.derby</groupId>
>> <artifactId>derby</artifactId>
>> <version>10.4.2.0</version>
>> </dependency>
>>
>> into the pom.xml. The first version number is the version in the
>> Manifest file of derby but it's the osgi version why does netbeans
>> bother? Is there a workaround or need I a derby version without the osgi
>> definitions?
>> Regards
>> Slawomir
>>
>> Am 16.06.2011 09:17, schrieb Libor Jelinek:
>> > Hello Slawomir,
>> > I learnt learned JPA in Maven-based NBP development from official
>> > http://platform.netbeans.org/tutorials/nbm-maven-crud.html.
>> >
>> > Simplified, there is no need to hack anything. Just right-click on
>> > package in module, ale select New Entity wizard. It will created
>> > persistence.xml (persistence unit) and add dependency to Eclipselink
>> > to your module's pom.xml.
>> >
>> > Libor
>> >
>> >
>> > 2011/6/15 Slawomir<[hidden email]> <[hidden email]>:
>> >>   Hi,
>> >> I want to build my first reallife App with Netbeans 7.0 Platform. I chosen
>> >> to use Maven as build tool, because I don't like it to easy. After some
>> >> stupid renaming action, which was my fault, I found my Modules in the Plugin
>> >> Window. So far so well... Than I wanted to connect to my database and here I
>> >> am after 3 days hacking:)
>> >> It fails at when I try to get the EntityManagerFactory and this is my code
>> >> for do so:
>> >> EntityManagerFactory emf = null;
>> >>         ClassLoader l = Lookup.getDefault().lookup(ClassLoader.class);
>> >>         try {
>> >>             URL u = l.getResource("META-INF/persistence.xml");
>> >>             Class c = Class.forName("org.postgresql.Driver");
>> >>              c =
>> >> Class.forName("org.eclipse.persistence.jpa.PersistenceProvider");
>> >>             emf =
>> >> Persistence.createEntityManagerFactory("com.mosesonline.tbff.TBFFPU");
>> >>         } catch (Exception e) {
>> >>             e.printStackTrace();
>> >>         }
>> >>         return emf.createEntityManager();
>> >> As you can see I try to find the xml, and the classes before I create the
>> >> emf and I find them the objects are filled with the right classes and urls.
>> >> But in the main line emf = ... an exception occurs "No Persistence provider
>> >> for EntityManager named com.mosesonline.tbff.TBFFPU".
>> >> To make your picture complete here is the persistence.xml :
>> >> <?xml version="1.0" encoding="UTF-8"?>
>> >> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" <http://java.sun.com/xml/ns/persistence>
>> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <http://www.w3.org/2001/XMLSchema-instance>
>> >> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
>> >> http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
>> >> <persistence-unit name="com.mosesonline.tbff.TBFFPU"
>> >> transaction-type="RESOURCE_LOCAL">
>> >> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
>> >> <class>com.mosesonline.tbff.definitions.basics.Course</class>
>> >> <class>com.mosesonline.tbff.definitions.basics.Person</class>
>> >> <class>com.mosesonline.tbff.definitions.basics.Pupil</class>
>> >> <class>com.mosesonline.tbff.definitions.basics.SchoolClass</class>
>> >> <class>com.mosesonline.tbff.definitions.basics.Subject</class>
>> >> <class>com.mosesonline.tbff.definitions.basics.exams.Exam</class>
>> >> <class>com.mosesonline.tbff.definitions.basics.exams.ExamModifier</class>
>> >> <class>com.mosesonline.tbff.definitions.basics.exams.ExamTag</class>
>> >> <class>com.mosesonline.tbff.definitions.basics.exams.Task</class>
>> >> <class>com.mosesonline.tbff.definitions.basics.exams.types.Dictate</class>
>> >> <class>com.mosesonline.tbff.definitions.basics.roles.CourseExam</class>
>> >> <class>com.mosesonline.tbff.definitions.basics.roles.CourseExamParticipant</class>
>> >> <class>com.mosesonline.tbff.definitions.basics.roles.CourseParticipant</class>
>> >> <class>com.mosesonline.tbff.definitions.basics.roles.GuarantorRole</class>
>> >> <class>com.mosesonline.tbff.definitions.basics.roles.IsInClass</class>
>> >> <properties>
>> >> <property name="javax.persistence.jdbc.url"
>> >> value="jdbc:postgresql://localhost:5432/tbffDB"/>
>> >> <property name="javax.persistence.jdbc.password" value="tbff"/>
>> >> <property name="javax.persistence.jdbc.driver"
>> >> value="org.postgresql.Driver"/>
>> >> <property name="javax.persistence.jdbc.user" value="tbff"/>
>> >> <property name="eclipselink.target-database" value="sdfsdfsda"/>
>> >> <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
>> >> </properties>
>> >> </persistence-unit>
>> >> </persistence>
>> >>
>> >> Before I forget, I tried it with derby before but there was also a problem
>> >> with the version of the jar in Maven I had 10.4.2.0 but the platform didn't
>> >> start because netbeans looks for the OSGi version tag in the mainfest and
>> >> this was not the same. Have I to compile derby myself with the "right"
>> >> version tag like in maven? But this second question is not so important, I
>> >> wanted to use Postgres in production anyway so I can also test with it.
>> >> Thanks in advance for help.
>> >> Regards
>> >> Slawomir
>> >>
>> >>
>>
>>
>>
>>
>> --
>> Thomas Schneider (www.thsitc.com)
>>
>> _______________________________________________
>> Ibm-netrexx mailing list
>> [hidden email]
>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>>
>>
>>
>
>
>--
>Can't tweet, won't tweet!
>
>_______________________________________________
>Ibm-netrexx mailing list
>[hidden email]
>Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [platform-dev] Re: Platform development with Maven and JPA(EclipseLink)

ThSITC
OK, will never do it again. FullStop. Thomas (and sorry).
====================================================
Am 16.06.2011 20:54, schrieb Kermit Kiser:

> I agree! This cross-posting is ruining the list. Please stop.
>
> Alan Sampson<[hidden email]>  wrote:
>
>> Ditto for what does this have to do with anything.  Please stop
>> cross-posting from the NetBeans list.  Anyone interested in NetBeans should
>> already be subscribed; those who aren't don't want to see this...
>>
>> On 16 June 2011 10:06, Thomas Schneider<[hidden email]>  wrote:
>>
>>> **
>>> ... detto, for info.
>>> Thomas.
>>>
>>> -------- Original-Nachricht --------  Betreff: [platform-dev] Re: Platform
>>> development with Maven and JPA(EclipseLink)  Datum: Thu, 16 Jun 2011
>>> 18:53:48 +0200  Von: Slawomir<[hidden email]><[hidden email]>   Antwort
>>> an: [hidden email]  An: [hidden email]
>>>
>>> Hi,
>>> I tried it with right click and combined with the properties solution
>>> from Stephen both doesn't work.  I've put my Definitions module and put
>>> the classes into the Business.Implementations module where the
>>> persistence unit is defined nothing worked. Now I will try to do the
>>> tutorial, maybe I then get a hint what went wrong.
>>>
>>> By the way does someone know this:
>>> "Warning - could not install some modules:
>>> Business.Implementations NetBeans Module - The module derby was
>>> requested in version>= 10.4.2000000.689064 but only 10.4.2000000 was found.
>>> Another module could not be installed due to the above problems. "
>>> This is the error message when I try it with derby(not embedded). I just
>>> insert a dependency
>>> <dependency>
>>> <groupId>org.apache.derby</groupId>
>>> <artifactId>derby</artifactId>
>>> <version>10.4.2.0</version>
>>> </dependency>
>>>
>>> into the pom.xml. The first version number is the version in the
>>> Manifest file of derby but it's the osgi version why does netbeans
>>> bother? Is there a workaround or need I a derby version without the osgi
>>> definitions?
>>> Regards
>>> Slawomir
>>>
>>> Am 16.06.2011 09:17, schrieb Libor Jelinek:
>>>> Hello Slawomir,
>>>> I learnt learned JPA in Maven-based NBP development from official
>>>> http://platform.netbeans.org/tutorials/nbm-maven-crud.html.
>>>>
>>>> Simplified, there is no need to hack anything. Just right-click on
>>>> package in module, ale select New Entity wizard. It will created
>>>> persistence.xml (persistence unit) and add dependency to Eclipselink
>>>> to your module's pom.xml.
>>>>
>>>> Libor
>>>>
>>>>
>>>> 2011/6/15 Slawomir<[hidden email]>  <[hidden email]>:
>>>>>    Hi,
>>>>> I want to build my first reallife App with Netbeans 7.0 Platform. I chosen
>>>>> to use Maven as build tool, because I don't like it to easy. After some
>>>>> stupid renaming action, which was my fault, I found my Modules in the Plugin
>>>>> Window. So far so well... Than I wanted to connect to my database and here I
>>>>> am after 3 days hacking:)
>>>>> It fails at when I try to get the EntityManagerFactory and this is my code
>>>>> for do so:
>>>>> EntityManagerFactory emf = null;
>>>>>          ClassLoader l = Lookup.getDefault().lookup(ClassLoader.class);
>>>>>          try {
>>>>>              URL u = l.getResource("META-INF/persistence.xml");
>>>>>              Class c = Class.forName("org.postgresql.Driver");
>>>>>               c =
>>>>> Class.forName("org.eclipse.persistence.jpa.PersistenceProvider");
>>>>>              emf =
>>>>> Persistence.createEntityManagerFactory("com.mosesonline.tbff.TBFFPU");
>>>>>          } catch (Exception e) {
>>>>>              e.printStackTrace();
>>>>>          }
>>>>>          return emf.createEntityManager();
>>>>> As you can see I try to find the xml, and the classes before I create the
>>>>> emf and I find them the objects are filled with the right classes and urls.
>>>>> But in the main line emf = ... an exception occurs "No Persistence provider
>>>>> for EntityManager named com.mosesonline.tbff.TBFFPU".
>>>>> To make your picture complete here is the persistence.xml :
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"<http://java.sun.com/xml/ns/persistence>
>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<http://www.w3.org/2001/XMLSchema-instance>
>>>>> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
>>>>> http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
>>>>> <persistence-unit name="com.mosesonline.tbff.TBFFPU"
>>>>> transaction-type="RESOURCE_LOCAL">
>>>>> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
>>>>> <class>com.mosesonline.tbff.definitions.basics.Course</class>
>>>>> <class>com.mosesonline.tbff.definitions.basics.Person</class>
>>>>> <class>com.mosesonline.tbff.definitions.basics.Pupil</class>
>>>>> <class>com.mosesonline.tbff.definitions.basics.SchoolClass</class>
>>>>> <class>com.mosesonline.tbff.definitions.basics.Subject</class>
>>>>> <class>com.mosesonline.tbff.definitions.basics.exams.Exam</class>
>>>>> <class>com.mosesonline.tbff.definitions.basics.exams.ExamModifier</class>
>>>>> <class>com.mosesonline.tbff.definitions.basics.exams.ExamTag</class>
>>>>> <class>com.mosesonline.tbff.definitions.basics.exams.Task</class>
>>>>> <class>com.mosesonline.tbff.definitions.basics.exams.types.Dictate</class>
>>>>> <class>com.mosesonline.tbff.definitions.basics.roles.CourseExam</class>
>>>>> <class>com.mosesonline.tbff.definitions.basics.roles.CourseExamParticipant</class>
>>>>> <class>com.mosesonline.tbff.definitions.basics.roles.CourseParticipant</class>
>>>>> <class>com.mosesonline.tbff.definitions.basics.roles.GuarantorRole</class>
>>>>> <class>com.mosesonline.tbff.definitions.basics.roles.IsInClass</class>
>>>>> <properties>
>>>>> <property name="javax.persistence.jdbc.url"
>>>>> value="jdbc:postgresql://localhost:5432/tbffDB"/>
>>>>> <property name="javax.persistence.jdbc.password" value="tbff"/>
>>>>> <property name="javax.persistence.jdbc.driver"
>>>>> value="org.postgresql.Driver"/>
>>>>> <property name="javax.persistence.jdbc.user" value="tbff"/>
>>>>> <property name="eclipselink.target-database" value="sdfsdfsda"/>
>>>>> <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
>>>>> </properties>
>>>>> </persistence-unit>
>>>>> </persistence>
>>>>>
>>>>> Before I forget, I tried it with derby before but there was also a problem
>>>>> with the version of the jar in Maven I had 10.4.2.0 but the platform didn't
>>>>> start because netbeans looks for the OSGi version tag in the mainfest and
>>>>> this was not the same. Have I to compile derby myself with the "right"
>>>>> version tag like in maven? But this second question is not so important, I
>>>>> wanted to use Postgres in production anyway so I can also test with it.
>>>>> Thanks in advance for help.
>>>>> Regards
>>>>> Slawomir
>>>>>
>>>>>
>>>
>>>
>>>
>>> --
>>> Thomas Schneider (www.thsitc.com)
>>>
>>> _______________________________________________
>>> Ibm-netrexx mailing list
>>> [hidden email]
>>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>>>
>>>
>>>
>>
>> --
>> Can't tweet, won't tweet!
>>
>> _______________________________________________
>> Ibm-netrexx mailing list
>> [hidden email]
>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>
>


--
Thomas Schneider (www.thsitc.com)
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Thomas Schneider, Vienna, Austria (Europe) :-)

www.thsitc.com
www.db-123.com