Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » Error: No persistence.xml file in project
Error: No persistence.xml file in project [message #434876] Thu, 24 April 2008 20:00 Go to next message
Eclipse UserFriend
Originally posted by: ari.meyer.gmail.com

Hi,

I'm using Dali 1.0.2 (latest release available, apparently), and followed
the "Create New JPA Project wizard" (from the Getting Started guide)
several times now to try to get everything working correctly. I'm able to
generate entites, but I keep getting this error: "No persistence.xml file
in project", even though Dali auto-generated it into src/META-INF. Any
ideas? I've even tried moving the META-INF dir directly under the project
folder, as I saw in another online guide, but it still can't seem to find
persistence.xml.

Note: in the wizard I have selected "Annotated classes must be listed in
the persistence.xml", and left "Create orm.xml" unchecked. I'm using
OpenJPA as my provider.

Thanks,
Ari
Re: Error: No persistence.xml file in project [message #434878 is a reply to message #434876] Thu, 24 April 2008 20:34 Go to previous messageGo to next message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Ari,

Take a look at the org.eclipse.wst.common.component file in your
project_home/.settings folder. There should be a source-path defined.
Perhaps you could post the contents of that file.

This isn't something we have encountered in our own testing, so I am
interested to figure out what might be going wrong.

Neil

Ari wrote:

> Hi,

> I'm using Dali 1.0.2 (latest release available, apparently), and followed
> the "Create New JPA Project wizard" (from the Getting Started guide)
> several times now to try to get everything working correctly. I'm able to
> generate entites, but I keep getting this error: "No persistence.xml file
> in project", even though Dali auto-generated it into src/META-INF. Any
> ideas? I've even tried moving the META-INF dir directly under the project
> folder, as I saw in another online guide, but it still can't seem to find
> persistence.xml.

> Note: in the wizard I have selected "Annotated classes must be listed in
> the persistence.xml", and left "Create orm.xml" unchecked. I'm using
> OpenJPA as my provider.

> Thanks,
> Ari
Re: Error: No persistence.xml file in project [message #434880 is a reply to message #434878] Thu, 24 April 2008 21:46 Go to previous messageGo to next message
Ari Meyer is currently offline Ari MeyerFriend
Messages: 136
Registered: July 2009
Senior Member
Hi Neil,

Here it is:

<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="P2V3_JPA">
<wb-resource deploy-path="/" source-path="/src/main/java"/>
<wb-resource deploy-path="/" source-path="/src/main/resources"/>
<wb-resource deploy-path="/" source-path="/src/test/java"/>
</wb-module>
</project-modules>

Also, I'm using Maven with the Eclipse plugin to configure my Build Path
-- not sure if that's a problem, since it alters my .classpath.

Best,
Ari

Neil Hauge wrote:
> Ari,
>
> Take a look at the org.eclipse.wst.common.component file in your
> project_home/.settings folder. There should be a source-path defined.
> Perhaps you could post the contents of that file.
>
> This isn't something we have encountered in our own testing, so I am
> interested to figure out what might be going wrong.
> Neil
>
> Ari wrote:
>
>> Hi,
>
>> I'm using Dali 1.0.2 (latest release available, apparently), and
>> followed the "Create New JPA Project wizard" (from the Getting Started
>> guide) several times now to try to get everything working correctly.
>> I'm able to generate entites, but I keep getting this error: "No
>> persistence.xml file in project", even though Dali auto-generated it
>> into src/META-INF. Any ideas? I've even tried moving the META-INF
>> dir directly under the project folder, as I saw in another online
>> guide, but it still can't seem to find persistence.xml.
>
>> Note: in the wizard I have selected "Annotated classes must be listed
>> in the persistence.xml", and left "Create orm.xml" unchecked. I'm
>> using OpenJPA as my provider.
>
>> Thanks,
>> Ari
>
>
Re: Error: No persistence.xml file in project [message #434882 is a reply to message #434880] Fri, 25 April 2008 19:12 Go to previous messageGo to next message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Ari,

I think this explains the problem. Your src/ folder is not in the source
path, so we don't see the persistence.xml in meta-inf. Add another
source-path for /src/ and that should fix it.

<wb-resource deploy-path="/" source-path="/src"/>

Neil

Ari Meyer wrote:

> Hi Neil,

> Here it is:

> <?xml version="1.0" encoding="UTF-8"?>
> <project-modules id="moduleCoreId" project-version="1.5.0">
> <wb-module deploy-name="P2V3_JPA">
> <wb-resource deploy-path="/" source-path="/src/main/java"/>
> <wb-resource deploy-path="/" source-path="/src/main/resources"/>
> <wb-resource deploy-path="/" source-path="/src/test/java"/>
> </wb-module>
> </project-modules>

> Also, I'm using Maven with the Eclipse plugin to configure my Build Path
> -- not sure if that's a problem, since it alters my .classpath.

> Best,
> Ari

> Neil Hauge wrote:
>> Ari,
>>
>> Take a look at the org.eclipse.wst.common.component file in your
>> project_home/.settings folder. There should be a source-path defined.
>> Perhaps you could post the contents of that file.
>>
>> This isn't something we have encountered in our own testing, so I am
>> interested to figure out what might be going wrong.
>> Neil
>>
>> Ari wrote:
>>
>>> Hi,
>>
>>> I'm using Dali 1.0.2 (latest release available, apparently), and
>>> followed the "Create New JPA Project wizard" (from the Getting Started
>>> guide) several times now to try to get everything working correctly.
>>> I'm able to generate entites, but I keep getting this error: "No
>>> persistence.xml file in project", even though Dali auto-generated it
>>> into src/META-INF. Any ideas? I've even tried moving the META-INF
>>> dir directly under the project folder, as I saw in another online
>>> guide, but it still can't seem to find persistence.xml.
>>
>>> Note: in the wizard I have selected "Annotated classes must be listed
>>> in the persistence.xml", and left "Create orm.xml" unchecked. I'm
>>> using OpenJPA as my provider.
>>
>>> Thanks,
>>> Ari
>>
>>
Re: Error: No persistence.xml file in project [message #434884 is a reply to message #434882] Sat, 26 April 2008 07:21 Go to previous message
Ari Meyer is currently offline Ari MeyerFriend
Messages: 136
Registered: July 2009
Senior Member
Yep, that did it! I think this should be documented, particularly since
this source path folders are often changed by developers. Considering
Maven's popularity, perhaps Dali could offer at least the option of
using Maven's conventions, like having META-INF under
/src/main/resources when generating these files.

Thanks for the help!
Ari

Neil Hauge wrote:
> Ari,
>
> I think this explains the problem. Your src/ folder is not in the
> source path, so we don't see the persistence.xml in meta-inf. Add
> another source-path for /src/ and that should fix it.
>
> <wb-resource deploy-path="/" source-path="/src"/>
>
> Neil
>
> Ari Meyer wrote:
>
>> Hi Neil,
>
>> Here it is:
>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <project-modules id="moduleCoreId" project-version="1.5.0">
>> <wb-module deploy-name="P2V3_JPA">
>> <wb-resource deploy-path="/" source-path="/src/main/java"/>
>> <wb-resource deploy-path="/" source-path="/src/main/resources"/>
>> <wb-resource deploy-path="/" source-path="/src/test/java"/>
>> </wb-module>
>> </project-modules>
>
>> Also, I'm using Maven with the Eclipse plugin to configure my Build
>> Path -- not sure if that's a problem, since it alters my .classpath.
>
>> Best,
>> Ari
>
>> Neil Hauge wrote:
>>> Ari,
>>>
>>> Take a look at the org.eclipse.wst.common.component file in your
>>> project_home/.settings folder. There should be a source-path
>>> defined. Perhaps you could post the contents of that file.
>>>
>>> This isn't something we have encountered in our own testing, so I am
>>> interested to figure out what might be going wrong. Neil
>>>
>>> Ari wrote:
>>>
>>>> Hi,
>>>
>>>> I'm using Dali 1.0.2 (latest release available, apparently), and
>>>> followed the "Create New JPA Project wizard" (from the Getting
>>>> Started guide) several times now to try to get everything working
>>>> correctly. I'm able to generate entites, but I keep getting this
>>>> error: "No persistence.xml file in project", even though Dali
>>>> auto-generated it into src/META-INF. Any ideas? I've even tried
>>>> moving the META-INF dir directly under the project folder, as I saw
>>>> in another online guide, but it still can't seem to find
>>>> persistence.xml.
>>>
>>>> Note: in the wizard I have selected "Annotated classes must be
>>>> listed in the persistence.xml", and left "Create orm.xml"
>>>> unchecked. I'm using OpenJPA as my provider.
>>>
>>>> Thanks,
>>>> Ari
>>>
>>>
>
>
Re: Error: No persistence.xml file in project [message #610522 is a reply to message #434876] Thu, 24 April 2008 20:34 Go to previous message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Ari,

Take a look at the org.eclipse.wst.common.component file in your
project_home/.settings folder. There should be a source-path defined.
Perhaps you could post the contents of that file.

This isn't something we have encountered in our own testing, so I am
interested to figure out what might be going wrong.

Neil

Ari wrote:

> Hi,

> I'm using Dali 1.0.2 (latest release available, apparently), and followed
> the "Create New JPA Project wizard" (from the Getting Started guide)
> several times now to try to get everything working correctly. I'm able to
> generate entites, but I keep getting this error: "No persistence.xml file
> in project", even though Dali auto-generated it into src/META-INF. Any
> ideas? I've even tried moving the META-INF dir directly under the project
> folder, as I saw in another online guide, but it still can't seem to find
> persistence.xml.

> Note: in the wizard I have selected "Annotated classes must be listed in
> the persistence.xml", and left "Create orm.xml" unchecked. I'm using
> OpenJPA as my provider.

> Thanks,
> Ari
Re: Error: No persistence.xml file in project [message #610523 is a reply to message #434878] Thu, 24 April 2008 21:46 Go to previous message
Ari Meyer is currently offline Ari MeyerFriend
Messages: 136
Registered: July 2009
Senior Member
Hi Neil,

Here it is:

<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="P2V3_JPA">
<wb-resource deploy-path="/" source-path="/src/main/java"/>
<wb-resource deploy-path="/" source-path="/src/main/resources"/>
<wb-resource deploy-path="/" source-path="/src/test/java"/>
</wb-module>
</project-modules>

Also, I'm using Maven with the Eclipse plugin to configure my Build Path
-- not sure if that's a problem, since it alters my .classpath.

Best,
Ari

Neil Hauge wrote:
> Ari,
>
> Take a look at the org.eclipse.wst.common.component file in your
> project_home/.settings folder. There should be a source-path defined.
> Perhaps you could post the contents of that file.
>
> This isn't something we have encountered in our own testing, so I am
> interested to figure out what might be going wrong.
> Neil
>
> Ari wrote:
>
>> Hi,
>
>> I'm using Dali 1.0.2 (latest release available, apparently), and
>> followed the "Create New JPA Project wizard" (from the Getting Started
>> guide) several times now to try to get everything working correctly.
>> I'm able to generate entites, but I keep getting this error: "No
>> persistence.xml file in project", even though Dali auto-generated it
>> into src/META-INF. Any ideas? I've even tried moving the META-INF
>> dir directly under the project folder, as I saw in another online
>> guide, but it still can't seem to find persistence.xml.
>
>> Note: in the wizard I have selected "Annotated classes must be listed
>> in the persistence.xml", and left "Create orm.xml" unchecked. I'm
>> using OpenJPA as my provider.
>
>> Thanks,
>> Ari
>
>
Re: Error: No persistence.xml file in project [message #610525 is a reply to message #434880] Fri, 25 April 2008 19:12 Go to previous message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Ari,

I think this explains the problem. Your src/ folder is not in the source
path, so we don't see the persistence.xml in meta-inf. Add another
source-path for /src/ and that should fix it.

<wb-resource deploy-path="/" source-path="/src"/>

Neil

Ari Meyer wrote:

> Hi Neil,

> Here it is:

> <?xml version="1.0" encoding="UTF-8"?>
> <project-modules id="moduleCoreId" project-version="1.5.0">
> <wb-module deploy-name="P2V3_JPA">
> <wb-resource deploy-path="/" source-path="/src/main/java"/>
> <wb-resource deploy-path="/" source-path="/src/main/resources"/>
> <wb-resource deploy-path="/" source-path="/src/test/java"/>
> </wb-module>
> </project-modules>

> Also, I'm using Maven with the Eclipse plugin to configure my Build Path
> -- not sure if that's a problem, since it alters my .classpath.

> Best,
> Ari

> Neil Hauge wrote:
>> Ari,
>>
>> Take a look at the org.eclipse.wst.common.component file in your
>> project_home/.settings folder. There should be a source-path defined.
>> Perhaps you could post the contents of that file.
>>
>> This isn't something we have encountered in our own testing, so I am
>> interested to figure out what might be going wrong.
>> Neil
>>
>> Ari wrote:
>>
>>> Hi,
>>
>>> I'm using Dali 1.0.2 (latest release available, apparently), and
>>> followed the "Create New JPA Project wizard" (from the Getting Started
>>> guide) several times now to try to get everything working correctly.
>>> I'm able to generate entites, but I keep getting this error: "No
>>> persistence.xml file in project", even though Dali auto-generated it
>>> into src/META-INF. Any ideas? I've even tried moving the META-INF
>>> dir directly under the project folder, as I saw in another online
>>> guide, but it still can't seem to find persistence.xml.
>>
>>> Note: in the wizard I have selected "Annotated classes must be listed
>>> in the persistence.xml", and left "Create orm.xml" unchecked. I'm
>>> using OpenJPA as my provider.
>>
>>> Thanks,
>>> Ari
>>
>>
Re: Error: No persistence.xml file in project [message #610526 is a reply to message #434882] Sat, 26 April 2008 07:21 Go to previous message
Ari Meyer is currently offline Ari MeyerFriend
Messages: 136
Registered: July 2009
Senior Member
Yep, that did it! I think this should be documented, particularly since
this source path folders are often changed by developers. Considering
Maven's popularity, perhaps Dali could offer at least the option of
using Maven's conventions, like having META-INF under
/src/main/resources when generating these files.

Thanks for the help!
Ari

Neil Hauge wrote:
> Ari,
>
> I think this explains the problem. Your src/ folder is not in the
> source path, so we don't see the persistence.xml in meta-inf. Add
> another source-path for /src/ and that should fix it.
>
> <wb-resource deploy-path="/" source-path="/src"/>
>
> Neil
>
> Ari Meyer wrote:
>
>> Hi Neil,
>
>> Here it is:
>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <project-modules id="moduleCoreId" project-version="1.5.0">
>> <wb-module deploy-name="P2V3_JPA">
>> <wb-resource deploy-path="/" source-path="/src/main/java"/>
>> <wb-resource deploy-path="/" source-path="/src/main/resources"/>
>> <wb-resource deploy-path="/" source-path="/src/test/java"/>
>> </wb-module>
>> </project-modules>
>
>> Also, I'm using Maven with the Eclipse plugin to configure my Build
>> Path -- not sure if that's a problem, since it alters my .classpath.
>
>> Best,
>> Ari
>
>> Neil Hauge wrote:
>>> Ari,
>>>
>>> Take a look at the org.eclipse.wst.common.component file in your
>>> project_home/.settings folder. There should be a source-path
>>> defined. Perhaps you could post the contents of that file.
>>>
>>> This isn't something we have encountered in our own testing, so I am
>>> interested to figure out what might be going wrong. Neil
>>>
>>> Ari wrote:
>>>
>>>> Hi,
>>>
>>>> I'm using Dali 1.0.2 (latest release available, apparently), and
>>>> followed the "Create New JPA Project wizard" (from the Getting
>>>> Started guide) several times now to try to get everything working
>>>> correctly. I'm able to generate entites, but I keep getting this
>>>> error: "No persistence.xml file in project", even though Dali
>>>> auto-generated it into src/META-INF. Any ideas? I've even tried
>>>> moving the META-INF dir directly under the project folder, as I saw
>>>> in another online guide, but it still can't seem to find
>>>> persistence.xml.
>>>
>>>> Note: in the wizard I have selected "Annotated classes must be
>>>> listed in the persistence.xml", and left "Create orm.xml"
>>>> unchecked. I'm using OpenJPA as my provider.
>>>
>>>> Thanks,
>>>> Ari
>>>
>>>
>
>
Previous Topic:Any guidelines (now or planned) for extenders?
Next Topic:EclipseUML 2008 is now fully Dali Compliant
Goto Forum:
  


Current Time: Fri Apr 26 16:48:27 GMT 2024

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

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

Back to the top