Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » JPA dali, moving the persistence.xml
JPA dali, moving the persistence.xml [message #435550] Sat, 18 July 2009 21:06 Go to next message
harpritt is currently offline harprittFriend
Messages: 4
Registered: July 2009
Junior Member
Hi

This has been driving me nuts all day

Id like to use the JPA Dali web tool but am faced with the annoying
problem of the persistence.xml file location.

I use maven and the maven file structure, this means that my
persistence.xml must be located under
src/main/resources/META-INF/persistence.xml

unfortunatly the Dali Jpa tool seems only to want to look in src/META-INF

ive added src/main/resources/ to my source, looked at the files under
settings ...

please, can anyone help..... minoxodil will not help my hair loss..... grrr
Re: JPA dali, moving the persistence.xml [message #435551 is a reply to message #435550] Sat, 18 July 2009 21:15 Go to previous messageGo to next message
harpritt is currently offline harprittFriend
Messages: 4
Registered: July 2009
Junior Member
Ok..... sods law

as soon as i post my problem on the news group... i flipping well work out
the solution. How annoying!

The solution was to add src/main/resources to the source (under build
path) BEFORE i set up the JPA Facet

....BEFORE... AFTER.... BEFORE AFTER..... baaaaaaaa

anyway it works now...

hope it helps someone else.
Re: JPA dali, moving the persistence.xml [message #435554 is a reply to message #435551] Thu, 23 July 2009 16:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: buchholz-news.security.de

This does not help for me. I use a Galileo installation, also with maven2
plugin. I follow your instructions, but the "JPA Content" Descriptor is
empty and after selecting an Entity Class the "JPA Details" view
shows: "Details are not available for current selection".

Did you use the stable Maven Plugin or the development release?

harpritt wrote:

> Ok..... sods law
>
> as soon as i post my problem on the news group... i flipping well work out
> the solution. How annoying!
>
> The solution was to add src/main/resources to the source (under build
> path) BEFORE i set up the JPA Facet
>
> ...BEFORE... AFTER.... BEFORE AFTER..... baaaaaaaa
>
> anyway it works now...
>
> hope it helps someone else.
Re: JPA dali, moving the persistence.xml [message #435555 is a reply to message #435554] Fri, 24 July 2009 06:52 Go to previous messageGo to next message
Philippe Marschall is currently offline Philippe MarschallFriend
Messages: 121
Registered: July 2009
Senior Member
Jochen Buchholz wrote:
> This does not help for me. I use a Galileo installation, also with maven2
> plugin. I follow your instructions, but the "JPA Content" Descriptor is
> empty and after selecting an Entity Class the "JPA Details" view
> shows: "Details are not available for current selection".
>
> Did you use the stable Maven Plugin or the development release?

There are a couple of tricks to get Dali working with Maven. The first
is that it needs to be a WTP project (actually faceted). For this you
need to set <wtpversion> [1]. Then you need to add the jpt.jpa facet.
You can do this manually or with <additionalProjectFacets>. In the later
case you'll probably also need some configuration files, see
<additionalConfig>.

[1] http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse -mojo.html

Cheers
Philippe
Re: JPA dali, moving the persistence.xml [message #435582 is a reply to message #435555] Thu, 30 July 2009 11:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: buchholz-news.security.de

--nextPart1344033.xlZ5yCEqqc
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8Bit

<ver
Re: JPA dali, moving the persistence.xml [message #488450 is a reply to message #435554] Mon, 28 September 2009 17:20 Go to previous messageGo to next message
Gy is currently offline GyFriend
Messages: 2
Registered: September 2009
Junior Member
Hello,
you might want to add one more step to the described method:
1. Remove the Java Persistence facet.
2. Add the resources folder to the src
3. AT BUILD PATH -> ORDER AND EXPORT TAB, MOVE THE RESOURCES FOLDER TO THE TOP
4. Add Java Persistence facet.

When I followed these steps I managed to get it working.
Best regards,
Gyorgy
Re: JPA dali, moving the persistence.xml [message #508143 is a reply to message #488450] Sat, 16 January 2010 14:18 Go to previous messageGo to next message
Daniel Zwicker is currently offline Daniel ZwickerFriend
Messages: 2
Registered: July 2009
Junior Member
Hi,

I have solved the probelm with maven2 and eclipse JPA by removing the exclused: '**' from the src/main/resources entry in the classpath in the project properties. Instead I set the Includes to 'META-INF/persistence.xml'

For me its working even after e restart of eclipse.

Re: JPA dali, moving the persistence.xml [message #551534 is a reply to message #435550] Fri, 06 August 2010 20:53 Go to previous messageGo to next message
d. hartford is currently offline d. hartfordFriend
Messages: 27
Registered: July 2010
Junior Member
Thank you everyone who contributed this thread - all of these hints mattered (right up to and including the removing '**' exclusion entry in the classpath).
Re: JPA dali, moving the persistence.xml [message #616664 is a reply to message #435550] Sat, 18 July 2009 21:15 Go to previous messageGo to next message
harpritt is currently offline harprittFriend
Messages: 4
Registered: July 2009
Junior Member
Ok..... sods law

as soon as i post my problem on the news group... i flipping well work out
the solution. How annoying!

The solution was to add src/main/resources to the source (under build
path) BEFORE i set up the JPA Facet

....BEFORE... AFTER.... BEFORE AFTER..... baaaaaaaa

anyway it works now...

hope it helps someone else.
Re: JPA dali, moving the persistence.xml [message #616670 is a reply to message #435551] Thu, 23 July 2009 16:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: buchholz-news.security.de

This does not help for me. I use a Galileo installation, also with maven2
plugin. I follow your instructions, but the "JPA Content" Descriptor is
empty and after selecting an Entity Class the "JPA Details" view
shows: "Details are not available for current selection".

Did you use the stable Maven Plugin or the development release?

harpritt wrote:

> Ok..... sods law
>
> as soon as i post my problem on the news group... i flipping well work out
> the solution. How annoying!
>
> The solution was to add src/main/resources to the source (under build
> path) BEFORE i set up the JPA Facet
>
> ...BEFORE... AFTER.... BEFORE AFTER..... baaaaaaaa
>
> anyway it works now...
>
> hope it helps someone else.
Re: JPA dali, moving the persistence.xml [message #616672 is a reply to message #435554] Fri, 24 July 2009 06:52 Go to previous messageGo to next message
Philippe Marschall is currently offline Philippe MarschallFriend
Messages: 121
Registered: July 2009
Senior Member
Jochen Buchholz wrote:
> This does not help for me. I use a Galileo installation, also with maven2
> plugin. I follow your instructions, but the "JPA Content" Descriptor is
> empty and after selecting an Entity Class the "JPA Details" view
> shows: "Details are not available for current selection".
>
> Did you use the stable Maven Plugin or the development release?

There are a couple of tricks to get Dali working with Maven. The first
is that it needs to be a WTP project (actually faceted). For this you
need to set <wtpversion> [1]. Then you need to add the jpt.jpa facet.
You can do this manually or with <additionalProjectFacets>. In the later
case you'll probably also need some configuration files, see
<additionalConfig>.

[1] http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse -mojo.html

Cheers
Philippe
Re: JPA dali, moving the persistence.xml [message #617454 is a reply to message #435555] Thu, 30 July 2009 11:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: buchholz-news.security.de

--nextPart1344033.xlZ5yCEqqc
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8Bit

<ver
Re: JPA dali, moving the persistence.xml [message #617619 is a reply to message #435554] Mon, 28 September 2009 17:20 Go to previous messageGo to next message
Gy is currently offline GyFriend
Messages: 2
Registered: September 2009
Junior Member
Hello,
you might want to add one more step to the described method:
1. Remove the Java Persistence facet.
2. Add the resources folder to the src
3. AT BUILD PATH -> ORDER AND EXPORT TAB, MOVE THE RESOURCES FOLDER TO THE TOP
4. Add Java Persistence facet.

When I followed these steps I managed to get it working.
Best regards,
Gyorgy
Re: JPA dali, moving the persistence.xml [message #618690 is a reply to message #617619] Sat, 16 January 2010 14:18 Go to previous messageGo to next message
Daniel Zwicker is currently offline Daniel ZwickerFriend
Messages: 2
Registered: July 2009
Junior Member
Hi,

I have solved the probelm with maven2 and eclipse JPA by removing the exclused: '**' from the src/main/resources entry in the classpath in the project properties. Instead I set the Includes to 'META-INF/persistence.xml'

For me its working even after e restart of eclipse.
Re: JPA dali, moving the persistence.xml [message #619384 is a reply to message #435550] Fri, 06 August 2010 20:53 Go to previous messageGo to next message
d. hartford is currently offline d. hartfordFriend
Messages: 27
Registered: July 2010
Junior Member
Thank you everyone who contributed this thread - all of these hints mattered (right up to and including the removing '**' exclusion entry in the classpath).
Re: JPA dali, moving the persistence.xml [message #1751960 is a reply to message #435550] Tue, 17 January 2017 09:07 Go to previous message
Yunus Evren is currently offline Yunus EvrenFriend
Messages: 1
Registered: January 2017
Junior Member
For me, the problem was the JPA version difference between the persistence.xml and the JPA project facet.

persistence.xml was configured with
<persistence version="2.1" ......
whereas the JPA version in my project facets was configured as 2.0.
Previous Topic:Need your criticism
Next Topic:Thoughts on JPA 2.0 metamodel generation in Dali 3.0
Goto Forum:
  


Current Time: Tue Mar 19 08:24:34 GMT 2024

Powered by FUDForum. Page generated in 0.03046 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top