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 #1073581] Thu, 25 July 2013 05:22
Yang Long is currently offline Yang Long
Messages: 2
Registered: July 2013
Junior Member
We have encountered a problem in using eclipseLink when we do intensive reading operations.
This exception occurs now and then in production environment and is not reproducible in a simple test.

Here is the stacktrace:
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) //derivedExpressions has a null elemment


at org.eclipse.persistence.internal.expressions.ObjectExpression.postCopyIn(ObjectExpression.java:470) // derivedExpressions is the member field of ObjectExpression.


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



I think the problem is in
org.eclipse.persistence.internal.expressions.DataExpression.copyCollection(DataExpression.java:132) //derivedExpressions has a null elemment


at org.eclipse.persistence.internal.expressions.ObjectExpression.postCopyIn(ObjectExpression.java:470) // derivedExpressions is the member field of ObjectExpression.


In EclipseLink they use a NonSynchronizedVector,which I think maybe is the problem,but I can not find how the problem generated.

Has anyone encounter this problem before?

[Updated on: Fri, 26 July 2013 09:15]

Report message to a moderator

Previous Topic:Range Partition Across multiple level relationships
Next Topic:Optimization for sequence ID
Goto Forum:
  


Current Time: Fri Oct 24 23:18:47 GMT 2014

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

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