Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] open issues (was: Problem after import of existing plugin projects)

Hello,

I spent some time investigating the problem and finally I think, there's stil a 
big classpath problem/misconception/misunderstanding ...
... not only from eclipselink, but on integration with eclipse.

The point, that the testcases succeed in a new plugin is only true, if that 
plugin has no jpa-facade. If I create a JPA-project or add a jpa-facade to a 
eclipse-rcp-plugin is the same: the testcase fails with the exception from my 
first post.

The testcase succeeds from an eclipse-rcp-plugin without any eclipselink 
relation - just reffering eclipse.persistence.* plugins from MANIFEST.MF

I think the biggest problem is the access to persistence.xml from various 
scenarious.
Creating a JPA-project, the persistence.xml is located at META-INF wich is 
located at the root of the project. With this constellation even the dali 
tools fail:

Exception in thread "main" javax.persistence.PersistenceException: No 
Persistence provider for EntityManager named xyz
	at javax.persistence.Persistence.createEntityManagerFactory(Unknown Source)
	at org.eclipse.jpt.jpa.eclipselink.core.ddlgen.Main.execute(Main.java:76)
	at org.eclipse.jpt.jpa.eclipselink.core.ddlgen.Main.main(Main.java:64)

Same is true with adding JPA-facade to a plugin.

After adding JPA-facade to the plugin, persistence.xml will be created in the 
top-level META-INF, but the plugins classloader does not allow access to that 
directory. 
Creating a META-INF in the src-directory and moving persistence.xml to that 
location causes eclipse to crash.
So only a copy will work - but having the same file at various locations in the 
same plugin is really ugly.
Anyway - after cloning persistence.xml into a directory inside the classpath, 
dali tools work from this plugin too, but the testcase fails with the 
stacktrace from my first post.
Don't remember, how I succeeded that testcase from a plugin with jpa-facade.

Another issue is the packaging of eclipselink. 

Using the indigo-packages from download-site, that include eclipselink, 
there's no support for using eclipselink in plugins, but the overview shows 
RCP/Platform and Eclipslink checked.

>From my experience, eclipse-sites are quite invidious to newcomers (except 
this ML of cause!), so its a big challenge to get an installation, where 
things work as expected (especially with the huge amount of documentation that 
is wrong and outdated ...). 
For example: why is eclipselink grouped with Webservice-/JEE-stuff?
If I want to develop 2-tier rcp applications, I have no reason to look into 
that group. My first try from the toplevel groups would have been 'database 
development' ...


Just a few thoughts of a developer, that loves eclipse and eclipselink and 
feels sad with current situation ...


kind regards

Gero


Back to the top