Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Re sourceBundle error

Very odd.  It seems to be caused by the class loader for,

ExceptionMessageGenerator.class.getClassLoader()

being null.  I'm not sure how this could be, but my guess would be a Spring
issue.
If you remove Spring from the issue, do you still get the null-pointer?



aledbf wrote:
> 
> Hi, I'm having problems with the message error extraction.
> Here are two examples: the first is because a mandatory field is missing
> (USER_FK) and the secons is related to a bad formed named query.
> 
> Java: jdk 1.6.20
> OS: OSX 10.6 and  Ubuntu 10.04
> Server: Apache Tomcat 6.0.29 and 7.0.2
> Framework: Spring Framework 3.0.4, EclipseLink 2.1.1 (libraries from Maven
> repositories)
> 
> 
> [EL Finest]: 2010-09-22
> 13:13:28.759--UnitOfWork(1296450955)--Thread(Thread[http-8080-exec-1,5,main])--Execute
> query InsertObjectQuery(cl.PluginAsincrono@97067d53)
> [EL Finest]: 2010-09-22
> 13:13:28.759--UnitOfWork(1296450955)--Thread(Thread[http-8080-exec-1,5,main])--Execute
> query ValueReadQuery(sql="SELECT NOW()")
> [EL Finer]: 2010-09-22
> 13:13:28.759--ClientSession(2132512504)--Connection(1783069945)--Thread(Thread[http-8080-exec-1,5,main])--Begin
> batch statements
> [EL Fine]: 2010-09-22
> 13:13:28.759--ClientSession(2132512504)--Connection(1783069945)--Thread(Thread[http-8080-exec-1,5,main])--INSERT
> INTO PLUGIN_ASINCRONO (ID_PK, ENABLED, VERSION, USER_FK) VALUES (?, ?, ?,
> ?)
> [EL Fine]: 2010-09-22
> 13:13:28.759--ClientSession(2132512504)--Connection(1783069945)--Thread(Thread[http-8080-exec-1,5,main])--
> bind => [e2d982ef-6bfc-4ddc-b3a8-b7437a7792de, true, 1, null]
> [EL Finer]: 2010-09-22
> 13:13:28.76--ClientSession(2132512504)--Connection(1783069945)--Thread(Thread[http-8080-exec-1,5,main])--End
> Batch Statements
> [EL Finest]: 2010-09-22
> 13:13:28.76--ClientSession(2132512504)--Thread(Thread[http-8080-exec-1,5,main])--reconnecting
> to external connection pool
> [EL Fine]: 2010-09-22
> 13:13:28.772--ClientSession(2132512504)--Thread(Thread[http-8080-exec-1,5,main])--SELECT
> 1
> [EL Warning]: 2010-09-22
> 13:13:58.165--UnitOfWork(1296450955)--Thread(Thread[http-8080-exec-1,5,main])--[EL
> Warning]: 2010-09-22
> 13:14:04.547--UnitOfWork(1296450955)--Thread(Thread[http-8080-exec-1,5,main])--java.lang.NullPointerException
> 	at java.util.ResourceBundle.getBundle(ResourceBundle.java:950)
> 	at
> org.eclipse.persistence.exceptions.i18n.ExceptionMessageGenerator.getHeader(ExceptionMessageGenerator.java:95)
> 	at
> org.eclipse.persistence.exceptions.EclipseLinkException.printStackTrace(EclipseLinkException.java:165)
> 	at
> org.eclipse.persistence.logging.DefaultSessionLog.log(DefaultSessionLog.java:150)
> 	at
> org.eclipse.persistence.internal.sessions.AbstractSession.log(AbstractSession.java:2653)
> 	at
> org.eclipse.persistence.internal.sessions.AbstractSession.logThrowable(AbstractSession.java:3827)
> 	at
> org.eclipse.persistence.internal.sessions.AbstractSession.handleException(AbstractSession.java:2298)
> 	at
> org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1378)
> 	at
> org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1273)
> 	at
> org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1233)
> 	at
> org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.getTimestampFromServer(DatasourcePlatform.java:292)
> 	at
> org.eclipse.persistence.history.HistoryPolicy.getCurrentTime(HistoryPolicy.java:162)
> 	at
> org.eclipse.persistence.history.HistoryPolicy.logicalInsert(HistoryPolicy.java:734)
> 
> 
> java.lang.NullPointerException: null
> 	at java.util.ResourceBundle.getBundle(ResourceBundle.java:950)
> ~[na:1.6.0_20]
> 	at
> org.eclipse.persistence.exceptions.i18n.ExceptionMessageGenerator.buildMessage(ExceptionMessageGenerator.java:47)
> ~[na:2.1.1.v20100817-r8050]
> 	at
> org.eclipse.persistence.exceptions.TransactionException.errorGettingExternalTransaction(TransactionException.java:63)
> ~[na:2.1.1.v20100817-r8050]
> 	at
> org.eclipse.persistence.transaction.AbstractTransactionController.getTransaction(AbstractTransactionController.java:211)
> ~[na:2.1.1.v20100817-r8050]
> 	at
> org.eclipse.persistence.internal.jpa.transaction.JTATransactionWrapper.setRollbackOnlyInternal(JTATransactionWrapper.java:76)
> ~[na:2.1.1.v20100817-r8050]
> 	at
> org.eclipse.persistence.internal.jpa.EntityManagerImpl.setRollbackOnly(EntityManagerImpl.java:1706)
> ~[na:2.1.1.v20100817-r8050]
> 	at
> org.eclipse.persistence.internal.jpa.EJBQueryImpl.setRollbackOnly(EJBQueryImpl.java:1242)
> ~[na:2.1.1.v20100817-r8050]
> 	at
> org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:718)
> ~[na:2.1.1.v20100817-r8050]
> 	at
> org.springframework.orm.jpa.JpaTemplate$9.doInJpa(JpaTemplate.java:315)
> ~[spring-orm-3.0.4.RELEASE.jar:3.0.4.RELEASE]
> 	at org.springframework.orm.jpa.JpaTemplate$9.doInJpa(JpaTemplate.java:1)
> ~[spring-orm-3.0.4.RELEASE.jar:3.0.4.RELEASE]
> 	at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:183)
> ~[spring-orm-3.0.4.RELEASE.jar:3.0.4.RELEASE]
> 	at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:146)
> ~[spring-orm-3.0.4.RELEASE.jar:3.0.4.RELEASE]
> 	at org.springframework.orm.jpa.JpaTemplate.find(JpaTemplate.java:306)
> ~[spring-orm-3.0.4.RELEASE.jar:3.0.4.RELEASE]
> 	at org.springframework.orm.jpa.JpaTemplate.find(JpaTemplate.java:302)
> ~[spring-orm-3.0.4.RELEASE.jar:3.0.4.RELEASE]
> 
> Any ideas?
> Thanks in advance.
> 


-----
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://old.nabble.com/ResourceBundle-error-tp29820315p29826948.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top