Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Leopard SWT JPA Problem
Leopard SWT JPA Problem [message #242772] Tue, 11 December 2007 09:40
Eclipse UserFriend
Originally posted by: reg.hill-labs.co.nz

Hi,

I have a couple of SWT apps that use JPA 3 for persistence and they all
worked fine under Windows and OS X Tiger... then... I upgraded to Leopard
(yes, that seems to have been a big mistake!).

Now quite a few of my apps don't run.

I have made a sample app that runs in the console, initializes my JPA
stuff just fine... but as soon as I add the Mac SWT library it then fails
when I am creating the entity manager factory as follows:

private EntityManagerFactory emf =
persistence.createEntityManagerFactory("TestJPA");

private EntityManager em = emf.createEntityManager();

Fails with the following exception:
java.lang.NullPointerException
at javax.persistence.Persistence.findAllProviders(Persistence.j ava:65)
at
javax.persistence.Persistence.createEntityManagerFactory(Per sistence.java:48)
at
javax.persistence.Persistence.createEntityManagerFactory(Per sistence.java:33)
at Store.<init>(Store.java:14)
at Store.getInstance(Store.java:22)
at Main.main(Main.java:18)

Remove the SWT library and it works again.

I still had the Java 6SE pre-release laying around so tried it with that,
it worked but complained about not having the carbon swt libraries, and
they seemed to be where they should be, so I gave up on that (ps. I am a
bit of a newbie...)

Has anyone had JPA stuff working in an SWT application? If so, how do you
do it?

Regards
Colin
Previous Topic:tag library descriptor?
Next Topic:Configuring selection of text with double click
Goto Forum:
  


Current Time: Sun Jun 30 13:45:47 GMT 2024

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

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

Back to the top