Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » EclipseLink Bug in DatabaseQuery.checkPrepare
EclipseLink Bug in DatabaseQuery.checkPrepare [message #1074197] Fri, 26 July 2013 05:06 Go to next message
Yang Long is currently offline Yang Long
Messages: 2
Registered: July 2013
Junior Member
This very rare bug happens sometimes in our environment during very intensive batch jobs and this exception occurs now and then in production environment and is not reproducible in a simple test.
We use a namedQuery to read an Object under multithreading environment.

NullPointerException is thrown here:
at org.eclipse.persistence.internal.expressions.DataExpression.copyCollection(DataExpression.java:132)

stackTrace:

Caused by: Exception [EclipseLink-6168] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.QueryException
Exception Description: Query failed to prepare, unexpected error occurred: [java.lang.NullPointerException].

Internal Exception: java.lang.NullPointerException
Query: ReadAllQuery(name="ResourceAclData.getAclForOneResource" referenceClass=ResourceAclData sql="SELECT ID, OWNER_USER_ID, RESOURCE_ID, RESOURCE_TYPE_ID, VERSION FROM RESOURCE_ACL WHERE ((RESOURCE_TYPE_ID = ?) AND (RESOURCE_ID = ?))")


at org.eclipse.persistence.exceptions.QueryException.prepareFailed(QueryException.java:1555)
at org.eclipse.persistence.queries.DatabaseQuery.checkPrepare(DatabaseQuery.java:625)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.checkPrepare(ObjectLevelReadQuery.java:823)
at org.eclipse.persistence.queries.DatabaseQuery.checkPrepare(DatabaseQuery.java:575)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:812)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1040)
at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:392)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1128)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2871)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1516)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1498)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1463)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:485)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getSingleResult(EJBQueryImpl.java:773)
at oracle.oats.common.beans.security.PermissionsManagerBean.getAcl(PermissionsManagerBean.java:924)
at oracle.oats.common.beans.security.PermissionsManagerBean.getEffectivePermissions(PermissionsManagerBean.java:309)
at sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.oracle.pitchfork.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:103)
at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:42)
at sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.oracle.pitchfork.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:109)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(Unknown Source)
at com.sun.proxy.$Proxy183.getEffectivePermissions(Unknown Source)
at oracle.oats.common.beans.security.PermissionsManagerBean_k0rprm_PermissionsManagerLocalImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:31)
at oracle.oats.common.beans.security.PermissionsManagerBean_k0rprm_PermissionsManagerLocalImpl.getEffectivePermissions(Unknown Source)
at oracle.oats.common.security.perf.ee.test.CommonSecurityPerfTest$8.run(CommonSecurityPerfTest.java:565)
at oracle.oats.test.beans.BeanTestDriverBean.runTest(BeanTestDriverBean.java:102)
at sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.oracle.pitchfork.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:103)
at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:49)
at sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.oracle.pitchfork.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:109)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(Unknown Source)
at com.sun.proxy.$Proxy185.runTest(Unknown Source)
at oracle.oats.test.beans.BMBeanTestDriverBean_hogcei_BeanTestDriverLocalImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:31)
at oracle.oats.test.beans.BMBeanTestDriverBean_hogcei_BeanTestDriverLocalImpl.runTest(Unknown Source)
at oracle.oats.common.test.harness.ee.WlsPerfTestHarness$WlsPerfTestJavaSampler.runTest(WlsPerfTestHarness.java:586)
at oracle.oats.common.test.harness.jmeter.custom.CustomJMeterSampler.sample(CustomJMeterSampler.java:80)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:428)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
at oracle.oats.common.test.harness.jmeter.custom.CustomJMeterThreadGroup$1.run(CustomJMeterThreadGroup.java:99)
at oracle.oats.common.utilities.wls.work.WorkManagerExecutorService$6.call(WorkManagerExecutorService.java:479)
at oracle.oats.common.utilities.wls.work.WorkManagerExecutorService$5.call(WorkManagerExecutorService.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at oracle.oats.common.utilities.wls.work.WorkManagerExecutorService$WorkFutureTask.run(WorkManagerExecutorService.java:299)
... 2 more

Caused by: java.lang.NullPointerException
at org.eclipse.persistence.internal.expressions.DataExpression.copyCollection(DataExpression.java:132)
at org.eclipse.persistence.internal.expressions.ObjectExpression.postCopyIn(ObjectExpression.java:470)
at org.eclipse.persistence.expressions.Expression.registerIn(Expression.java:3597)
at org.eclipse.persistence.expressions.ExpressionBuilder.registerIn(ExpressionBuilder.java:350)
at org.eclipse.persistence.expressions.Expression.copiedVersionFrom(Expression.java:966)


at org.eclipse.persistence.internal.expressions.BaseExpression.postCopyIn(BaseExpression.java:63)
at org.eclipse.persistence.internal.expressions.DataExpression.postCopyIn(DataExpression.java:350)
at org.eclipse.persistence.internal.expressions.ObjectExpression.postCopyIn(ObjectExpression.java:469)
at org.eclipse.persistence.internal.expressions.QueryKeyExpression.postCopyIn(QueryKeyExpression.java:245)
at org.eclipse.persistence.expressions.Expression.registerIn(Expression.java:3597)
at org.eclipse.persistence.expressions.Expression.copiedVersionFrom(Expression.java:966)



at org.eclipse.persistence.internal.expressions.CompoundExpression.postCopyIn(CompoundExpression.java:263)
at org.eclipse.persistence.expressions.Expression.registerIn(Expression.java:3597)
at org.eclipse.persistence.expressions.Expression.copiedVersionFrom(Expression.java:966)

at org.eclipse.persistence.internal.expressions.CompoundExpression.postCopyIn(CompoundExpression.java:263)
at org.eclipse.persistence.expressions.Expression.registerIn(Expression.java:3597)
at org.eclipse.persistence.expressions.Expression.copiedVersionFrom(Expression.java:966)


at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.buildBaseSelectionCriteria(ExpressionQueryMechanism.java:133)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.buildBaseSelectStatement(ExpressionQueryMechanism.java:198)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.buildBaseSelectStatement(ExpressionQueryMechanism.java:185)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.buildNormalSelectStatement(ExpressionQueryMechanism.java:501)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.prepareSelectAllRows(ExpressionQueryMechanism.java:1616)
at org.eclipse.persistence.queries.ReadAllQuery.prepareSelectAllRows(ReadAllQuery.java:707)
at org.eclipse.persistence.queries.ReadAllQuery.prepare(ReadAllQuery.java:644)
at org.eclipse.persistence.queries.DatabaseQuery.checkPrepare(DatabaseQuery.java:613)
... 70 more



This very rare bug happens sometimes in our environment during very intensive batch jobs and this exception occurs now and then in production environment and is not reproducible in a simple test.

Did anyone occur this problem before?

[Updated on: Fri, 26 July 2013 05:13]

Report message to a moderator

Re: EclipseLink Bug in DatabaseQuery.checkPrepare [message #1121496 is a reply to message #1074197] Mon, 30 September 2013 13:35 Go to previous messageGo to next message
Sivakumar Murugesan is currently offline Sivakumar Murugesan
Messages: 1
Registered: September 2013
Junior Member
We have the same error in prod only during heavy loads.Any patch for this defect plz?
Re: EclipseLink Bug in DatabaseQuery.checkPrepare [message #1121566 is a reply to message #1121496] Mon, 30 September 2013 15:14 Go to previous message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

2.3 is an old release, it is likely that it has already been fixed in the latest release.

Try upgrading to the latest 2.5.x release or build to confirm if the issue still exists.

If it does, please log a bug and vote for it. You could also request a backport of the fix to 2.3.x, if you have a support agreement for EclipseLink, follow it up with your support provider.


James : Wiki : Book : Blog : Twitter
Previous Topic:postgresql calling a function on delete
Next Topic:Bug for replication partition policy in XML configuration
Goto Forum:
  


Current Time: Tue Jul 22 09:30:21 EDT 2014

Powered by FUDForum. Page generated in 0.02734 seconds