Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353254 - java.lang.NullPointerException when attempting to decrypt password
Summary: java.lang.NullPointerException when attempting to decrypt password
Status: CLOSED NOT_ECLIPSE
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-27 16:30 EDT by chia.chia338 CLA
Modified: 2022-06-09 10:28 EDT (History)
0 users

See Also:


Attachments
My JPA project files (7.61 KB, application/octet-stream)
2011-07-27 16:30 EDT, chia.chia338 CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description chia.chia338 CLA 2011-07-27 16:30:12 EDT
Created attachment 200475 [details]
My JPA project files

I tried to run a sample java 1.6 SE application from the Apress book Beginning Java EE 6 Platform with GlassFish 3 and got the following error. The  project has a Main class and an entity Book class. I used Eclipse Indigo to develop it. The database was Derby 10.8.2.1. (And EclipseLink JPA 2.3). The Java classes and the persistence.xml are in the attachment.

Thanks,
Chia

Here are the error: 

[EL Config]: The access type for the persistent class [class com.apress.javaee6.chapter02.Book] is set to [FIELD].
[EL Config]: The alias name for the entity class [class com.apress.javaee6.chapter02.Book] is being defaulted to: Book.
[EL Config]: The table name for entity [class com.apress.javaee6.chapter02.Book] is being defaulted to: BOOK.
[EL Config]: The column name for element [id] is being defaulted to: ID.
[EL Config]: The column name for element [title] is being defaulted to: TITLE.
[EL Config]: The column name for element [price] is being defaulted to: PRICE.
[EL Config]: The column name for element [illustrations] is being defaulted to: ILLUSTRATIONS.
[EL Config]: The column name for element [description] is being defaulted to: DESCRIPTION.
[EL Config]: The column name for element [isbn] is being defaulted to: ISBN.
[EL Config]: The column name for element [nbOfPage] is being defaulted to: NBOFPAGE.
[EL Severe]: java.lang.NullPointerException
	at java.util.ResourceBundle.getBundle(ResourceBundle.java:950)
	at org.eclipse.persistence.exceptions.i18n.ExceptionMessageGenerator.buildMessage(ExceptionMessageGenerator.java:47)
	at org.eclipse.persistence.exceptions.ValidationException.errorDecryptingPassword(ValidationException.java:856)
	at org.eclipse.persistence.internal.security.JCEEncryptor.decryptPassword(JCEEncryptor.java:124)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.updateLogins(EntityManagerSetupImpl.java:1572)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.updateSession(EntityManagerSetupImpl.java:1875)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:455)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:290)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:268)
	at com.apress.javaee6.chapter02.Main.main(Main.java:50)

Exception in thread "main" javax.persistence.PersistenceException: java.lang.NullPointerException
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:501)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:290)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:268)
	at com.apress.javaee6.chapter02.Main.main(Main.java:50)
Caused by: java.lang.NullPointerException
	at java.util.ResourceBundle.getBundle(ResourceBundle.java:950)
	at org.eclipse.persistence.exceptions.i18n.ExceptionMessageGenerator.buildMessage(ExceptionMessageGenerator.java:47)
	at org.eclipse.persistence.exceptions.ValidationException.errorDecryptingPassword(ValidationException.java:856)
	at org.eclipse.persistence.internal.security.JCEEncryptor.decryptPassword(JCEEncryptor.java:124)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.updateLogins(EntityManagerSetupImpl.java:1572)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.updateSession(EntityManagerSetupImpl.java:1875)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:455)
	... 5 more
Comment 1 chia.chia338 CLA 2011-07-27 16:32:59 EDT
I was able to connect to Derby via Eclipse and SQuirrel.
Comment 2 chia.chia338 CLA 2011-07-28 10:20:50 EDT
I'm closing this because the error only occurs when running the application from within Eclipse. It worked as expected when ran from command line.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:28:09 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink