Not finding persistence.xml from linked resource [message #638309] |
Wed, 10 November 2010 14:01  |
Eclipse User |
|
|
|
I have a linked resource that points to my projects files. The files reside in 3 separate projects in my source control app.
When creating the project, I removed the "src" folder and
then went back into the Properties -> Build Path and
linked in a "JAVA" directory as the "src" folder.
This is the link I created: "src --> JAVA"
This is the linked dir structure:
JAVA
src1
classes
build.xml
src2
classes
build.xml
META-INF
persistence.xml
I thought the Eclipse would look under the source folder(s) for a "META-INF" folder to get the persistence.xml file. This is not working - I keep getting a "No persistence.xml found" error. I tried linking in the META-INF and still could not get it to work. I also tried setting it as a source folder, and still could not be found.
I did find a way to make it work. I linked in each src directory with separate links. The problem with this is having to link in all the other files/folders (build.xml, properties, lib folder). I tried to link them in with another link, and use "Exlusion pattern" to remove the src directory(ies), but this didn't seem to work. I read that the "Inclusion/Exclusion" patterns do not work with linked resources. This leaves me to have to link in all files/folders separately. Can be done, but what a pain.
Can anybody tell me if I'm doing something wrong in linking the entire JAVA directory (and not finding persistence.xml).
Is there a different solution to link in all files excluding the source files as described by the method of linking in each source file separately?
Thanks for the help (if any)
|
|
|
Re: Not finding persistence.xml from linked resource [message #638576 is a reply to message #638309] |
Thu, 11 November 2010 11:40   |
Eclipse User |
|
|
|
Firstly, Larry, since you are talking about configuring EclipseLink metadata within the Eclipse IDE, I'd like to refer you to the Dali forum:
http://www.eclipse.org/forums/index.php?t=thread&frm_id= 113
Dali is the Eclipse project that provides tooling for EclipseLink/JPA/JAXB metadata configuration.
Secondly, the short answer is that it *should* work, but it depends a little on what version of Dali/WTP you're using and how you have your project configured.
The most likely solution is that in the process of removing your source folder and re-adding/linking it, you lost the deploy path mapping for your "src" folder. In your project properties, under the "Deployment Assembly" node you should see an entry that maps the "/src" source path to the "/" deploy path. If not, add it, and the persistence.xml should be found. If not, please respond with the version of Dali/WTP you're using and whatever other details you can give us about how your project is configured (over in the Dali forum, kindly).
Thanks
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03570 seconds