[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] v. 1.0.2 EntityManagerFactoryImpl throwing null pointer exception on connection
|
Hi Gordon,
If EclipseLink is following the expected code path, the structConverters
should be initialized inside the "if (state == STATE_PREDEPLOYED) {" code block
below where the structConverters variable is being defined on the following line:
structConverters = processor.getStructConverters();
If you are not getting into that if statement and still getting to
"addStructConverters(session, structConverters)" something strange is occurring
with your deployment. It is hard to say what the problem is without more
information about the symptoms of the problem you are seeing.
-Tom
Gordon Ferguson wrote:
Hello,
I'm using the SE approach and testing my 'recovery after error' logic.
I see the exception listed below. I looked at the code and found
EntityManagerSetupImpl.deploy() method initializes
structConverters to null in l.189
Then, in l. 319 passes that null to addStructConverters(...) which tries
to add to the (null) List.
List<StructConverter> structConverters = null;
SO, I'm wondering if this is just a coding typo or if I need to dig deeper
into why I'm in this state?
Any suggestions would be appreciated.
Thanks,
Gordon
Listing:
[EL Info]: 2008.10.30 11:53:03.781--ServerSession(653967)--EclipseLink,
version: Eclipse Persistence Services - 1.0.2 (Build 20081024)
Exception in thread "main" [EL Info]: 2008.10.30
11:53:10.328--ServerSession(653967)--file:/D:/projs/costar-1.3/jclass/-True-DevDev
login successful
costar.dbaccess.DbAccessException: Could not access database.
at
costar.dbaccess.jpa.CoStarJpaAccess.privateInit(CoStarJpaAccess.java:82)
at costar.dbaccess.jpa.CoStarJpaAccess.<init>(CoStarJpaAccess.java:53)
at
costar.dbaccess.jpa.test.JpaConnectionCheckerChecker.main(JpaConnectionCheckerChecker.java:104)
Caused by: java.lang.NullPointerException
at
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.addStructConverters(EntityManagerSetupImpl.java:319)
at
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:249)
at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:69)
at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:118)
at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:112)
at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:100)
at costar.dbaccess.jpa.CostarJpaFacade.<init>(CostarJpaFacade.java:47)
at
costar.dbaccess.jpa.CoStarJpaAccess.privateInit(CoStarJpaAccess.java:80)
... 2 more
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users