Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Libra » NPE trying to convert a JPA project into a OSGi project
NPE trying to convert a JPA project into a OSGi project [message #816177] Thu, 08 March 2012 14:19 Go to next message
Cristiano Gavião is currently offline Cristiano GaviãoFriend
Messages: 279
Registered: July 2009
Senior Member
Hi,

I've installed Libra and Dali in a Eclipse: 3.7.2 Build id: M20120208-0800

I've created a JPA project with a feel classes. I've created a diagram and have exported the classes to a derby database properly.

But I need to use this JPA project as a persistence bundle, so I tried to convert it.

This is the message that I got:

java.lang.NullPointerException
	at org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericPersistenceXml.registerRootStructureNode(GenericPersistenceXml.java:219)
	at org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericPersistenceXml.update(GenericPersistenceXml.java:115)
	at org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericRootContextNode.syncPersistenceXml(GenericRootContextNode.java:123)
	at org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericRootContextNode.updatePersistenceXml(GenericRootContextNode.java:157)
	at org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericRootContextNode.update(GenericRootContextNode.java:73)
	at org.eclipse.jpt.jpa.core.internal.AbstractJpaProject.update(AbstractJpaProject.java:1905)
	at org.eclipse.jpt.jpa.core.GenericJpaProjectManager$2.execute(GenericJpaProjectManager.java:452)
	at org.eclipse.jpt.common.core.internal.utility.JobSynchronizer$SynchronizationJob.run(JobSynchronizer.java:160)
	at org.eclipse.jpt.common.core.internal.utility.CallbackJobSynchronizer$CallbackSynchronizationJob.run(CallbackJobSynchronizer.java:137)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


After that I can't open diagram and export to database anymore...
Am I missing something ?

regards,

Cristiano
Re: NPE trying to convert a JPA project into a OSGi project [message #816182 is a reply to message #816177] Thu, 08 March 2012 14:23 Go to previous messageGo to next message
Kaloyan Raev is currently offline Kaloyan RaevFriend
Messages: 201
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Cristiano,

Perhaps, it's better to post this question in the Dali forum: http://www.eclipse.org/forums/index.php/f/113/

Looking at the stack trace I don't see a direct relation to the Libra plugins - it's all Dali packages there.

Greetings,
Kaloyan
Re: NPE trying to convert a JPA project into a OSGi project [message #816198 is a reply to message #816182] Thu, 08 March 2012 14:43 Go to previous messageGo to next message
Cristiano Gavião is currently offline Cristiano GaviãoFriend
Messages: 279
Registered: July 2009
Senior Member
Hi Kaloyan,

Is the "Convert to OSGi Bundle Project" added by Libra project, no?

If yes, it seems to me a Libra problem because the error was throwing in this function and Dali stop to work after the conversion attempt...

regards
Re: NPE trying to convert a JPA project into a OSGi project [message #816208 is a reply to message #816198] Thu, 08 March 2012 14:57 Go to previous message
Cristiano Gavião is currently offline Cristiano GaviãoFriend
Messages: 279
Registered: July 2009
Senior Member
More info,

I've updated Libra bundles from the Latest Indigo maintenance build: http://download.eclipse.org/libra/maintenance.

After that I could open the created JPA diagram without errors.
But when tried to export classes to database I got this:

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


Previous Topic:By using warproduct, Compilation errors occurred during the operation
Next Topic:Classes not exposed under Eclipse Indigo (STS)
Goto Forum:
  


Current Time: Tue Apr 16 09:21:52 GMT 2024

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

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

Back to the top