Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335667 - FileNotFoundException in JPA Diagramm editor
Summary: FileNotFoundException in JPA Diagramm editor
Status: RESOLVED WORKSFORME
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: Diagram Editor (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.0 M7   Edit
Assignee: Stefan Dimov CLA
QA Contact: Stefan Dimov CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-28 05:07 EST by Dmitry Geraskov CLA
Modified: 2011-04-13 05:09 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Geraskov CLA 2011-01-28 05:07:26 EST
I created jpa project with Hibernate platform, added necessary libraries to class path (they are located in a different project CaveatEmptor), created 2 entities and opened jpa diagramm editor. It was empty. After this I tried to add an entity on the diagramm and got the exception:

java.io.FileNotFoundException: \CaveatEmptor\lib\thirdparty-all.jar (The system cannot find the path specified)
	at java.util.zip.ZipFile.open(Native Method)
	at java.util.zip.ZipFile.<init>(ZipFile.java:114)
	at java.util.jar.JarFile.<init>(JarFile.java:135)
	at java.util.jar.JarFile.<init>(JarFile.java:72)
	at org.eclipse.jpt.ui.diagrameditor.internal.feature.CreateJPAEntityFeature.isPersistenceProviderLibraryInClasspath(CreateJPAEntityFeature.java:193)
	at org.eclipse.jpt.ui.diagrameditor.internal.feature.CreateJPAEntityFeature.checkIsSetPersistenceProviderLibrary(CreateJPAEntityFeature.java:218)
	at org.eclipse.jpt.ui.diagrameditor.internal.feature.CreateJPAEntityFeature.create(CreateJPAEntityFeature.java:122)
	at org.eclipse.graphiti.features.impl.AbstractCreateFeature.execute(AbstractCreateFeature.java:100)
	at org.eclipse.graphiti.internal.command.GenericFeatureCommandWithContext.execute(GenericFeatureCommandWithContext.java:64)
	at org.eclipse.graphiti.internal.command.GFPreparableCommand.doExecute(GFPreparableCommand.java:37)
	at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)

The CaveatEmptor project is in the workspace.
Comment 1 Stefan Dimov CLA 2011-04-13 05:09:59 EDT
I've tried to reproduce the problem, but I wasn't able to. I've tried adding the JPA hibernate API to the project classpath (as a library) and then the editor worked fine. 

First, I've created an user library and added to it the hibernate-jpa-2.0-api-1.0.0.Final.jar and then I've added this library as JPA implementation from the JPA project property page. (It also can be done during the JPA project creation from the wizard.) 

This is the correct way to add the JPA API implementation to the JPA enabled project. I don't know if you are using that way, but it should work. I'm closing this bug now, but if you feel that the problem still exists please reopen it and describe in a little more details how to reproduce the problem.