ExpressionBuilder is null when there are concurrent request [message #1129366] |
Tue, 08 October 2013 11:02  |
Eclipse User |
|
|
|
Hi,
We get lots of NullPointerException in and()/or() method of class org.eclipse.persistence.expressions.Expression espcially when there are large number of concurrent request. We are not reusing or caching expressions, expression builders. We get these errors intermittently.
1. Caused by: java.lang.NullPointerException
at org.eclipse.persistence.expressions.Expression.and(Expression.java:207)
2. Caused by: java.lang.NullPointerException
at org.eclipse.persistence.expressions.Expression.or(Expression.java:3193)
3. Exception data: java.lang.NullPointerException at org.eclipse.persistence.internal.descriptors.ObjectBuilder.extractPrimaryKeyFromExpression(ObjectBuilder.java:1725)
4. Caused by: java.lang.NullPointerException at org.eclipse.persistence.internal.expressions.QueryKeyExpression.rebuildOn(QueryKeyExpression.java:636) at org.eclipse.persistence.internal.expressions.CompoundExpression.rebuildOn(CompoundExpression.java:298)
at org.eclipse.persistence.expressions.Expression.and(Expression.java:208)
Expressions that we create are simple (not even parralel expression)
e.g. ExpressionBuilder builder = new ExpressionBuilder();
Expression exp = builder.get( "field1").equal( xyz).and(
builder.get( "field2" ).isNull()).and(
builder.get( "field3").equal(abc))
If we look inside and(Expression theExpression), or(Expression theExpression) method of Expression class, it is trying to ensure that same expression builder is getting used >>
if ((theExpression.getBuilder() != base) && ((base == this) || (theExpression.getBuilder().getQueryClass() == null))) {
expressionToUse = theExpression.rebuildOn(base);
}
Somehow theExpression.getBuilder() is coming as null.
OR
extractPrimaryKeyFromExpression() method of ObjectBuilder: expression.getBuilder() is coming as null.
Does any one has any idea about these issues?
For some other issue, I have seen suggestions for turning query cache off i.e. descriptor.getQueryManager().setExpressionQueryCacheMaxSize(0);
There is Expression query cache in DescriptorQueryManager. Is this a known issue?
Appreciate any suggestions...
Thanks & Regards.
|
|
|
|
|
|
|
|
Re: ExpressionBuilder is null when there are concurrent request [message #1219557 is a reply to message #1148775] |
Wed, 04 December 2013 10:51  |
Eclipse User |
|
|
|
Radhakrishnan, Amod, Chris,
I am experiencing the same issue on Websphere 8.5.5.0 and we have noticed that the issue still happens with 8.5.5.1 but less frequently. I was wondering if any of you had any information on other solutions at the WebSphere or IBM JVM level (patch, upgrade, etc...).
I would also be interested in any solution/workaround on how to write the build the expression to go around this issue (Radhakrishnan mentioned a workaround on the BaseExpression, but that seem to involve a code change to the EclipseLink class).
Thanks in advance for any info,
Sincerely,
Reda.
|
|
|
Powered by
FUDForum. Page generated in 0.04050 seconds