|
Re: EntityManagerFactory (Eclipselink RCP) return NullPointerException [message #962510 is a reply to message #962113] |
Mon, 29 October 2012 05:31 |
Ed Merks Messages: 33216 Registered: July 2009 |
Senior Member |
|
|
Better to ask on the EclipseLink forum:
http://www.eclipse.org/forums/eclipse.rt.eclipselink
On 29/10/2012 2:18 AM, Azi Azwady Jamaludin wrote:
> Greetings,
>
> I'm developing RCP application integrating Eclipselink JPA. The RCP
> project named as mamsys-dispose.
>
> I've also creates a separate project for JPA and I've generates the
> entities using Eclipselink and convert it to Plug-in project. I also
> put my EntityManagerFactory and models in this project (JPA). I then
> put the plug-in as required plug-in at mamsys-dispose (MANIFEST-MF >
> Dependencies)
>
> I'm referring to the Comics example and note that the example is old
> and I've made a number of configuration such as using Activator
> (org.eclipse.persistence.jpa.osgi) as the classloader. The emf
> (instance) in Comics example refers to null but in my application, emf
> is not referring to null (EntityManagerFactory emf;). Only at
> createEntityManager, I put:-
> if (emf == null)
> init();
>
> But I'm still got these stack trace:-
>
> java.version=1.6.0_35
> java.vendor=Apple Inc.
> BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
> Framework arguments: -application org.eclipse.mamsys-dispose.application
> Command-line arguments: -application
> org.eclipse.mamsys-dispose.application -data
> /Users/azwady/eclipseRCPproj/../runtime-org.eclipse.mamsys-dispose.application
> -dev
> file:/Users/azwady/eclipseRCPproj/.metadata/.plugins/org.eclipse.pde.core/org.eclipse.mamsys-dispose.application/dev.properties
> -os macosx -ws cocoa -arch x86_64 -consoleLog
>
> !ENTRY org.eclipse.core.jobs 4 2 2012-10-29 04:59:32.852
> !MESSAGE An internal error occurred during: "Init View...".
> !STACK 0
> java.lang.NullPointerException
> at
> org.eclipse.mamsysdispose.model.connection.MamsysEntityManagerFactory.createEntityManager(MamsysEntityManagerFactory.java:54)
> at
> org.eclipse.mamsysdispose.model.CreateCaseModel.<init>(CreateCaseModel.java:24)
> at
> org.eclipse.mamsysdispose.views.viewparts.NewCaseView$2$1.run(NewCaseView.java:162)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
>
> What is missing here?. **BTW, I'm creating this application on my
> Macbook and using Eclipse RCP Juno SR1.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.05306 seconds