![]() |
![]() |
|
Welcome
Guest
| Register
| Login
|
| Index | Recent Threads | Unanswered Threads | Who's Online | User List | Help |
|
|
| No member browsing this thread |
|
Thread Status: Active Total posts in this thread: 4 |
|
| Author |
|
|
Novice Joined: Jul 27, 2007 Post Count: 41 Status: Offline |
Context: A register with a "name" field and contains a "ABCDEF" value This work: name.toLowerCase().startsWith('ABC') // ok This do not work: name.toLowerCase().startsWith('A') // occour a scalar exception And this work: name.toLowerCase().startsWith(\"A\") // ok And this work too: name.toLowerCase().indexOf('A') == 0 // ok BUG: Query with startsWith() method using a single quote and a just one character. ---------------------------------------- +----------------------+ | Reinaldo - Brazil | +----------------------+ |
||
|
|
Expert Belgium Joined: Mar 12, 2004 Post Count: 3033 Status: Offline |
Whats the error? ---------------------------------------- Erik Bengtson ![]() |
||
|
|
Novice Joined: Jul 27, 2007 Post Count: 41 Status: Offline |
Exception in thread "main" org.jpox.store.expression.ScalarExpression$MethodInvocationException: Exception occurred invoking method startsWith(Ch aracterLiteral "?") at org.jpox.store.expression.ScalarExpression.callMethod(ScalarExpression.java:777) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compilePrimary(JDOQLQuery.java:1906) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileUnaryExpressionNotPlusMinus(JDOQLQuery.java:1760) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileUnaryExpression(JDOQLQuery.java:1741) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileMultiplicativeExpression(JDOQLQuery.java:1694) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileAdditiveExpression(JDOQLQuery.java:1671) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileRelationalExpression(JDOQLQuery.java:1631) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileEqualityExpression(JDOQLQuery.java:1603) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileAndExpression(JDOQLQuery.java:1591) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileExclusiveOrExpression(JDOQLQuery.java:1579) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileInclusiveOrExpression(JDOQLQuery.java:1567) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileConditionalAndExpression(JDOQLQuery.java:1555) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileConditionalOrExpression(JDOQLQuery.java:1537) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileExpression(JDOQLQuery.java:1514) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileExpressionFromString(JDOQLQuery.java:1475) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileFilter(JDOQLQuery.java:1314) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.performCompile(JDOQLQuery.java:924) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.executionCompile(JDOQLQuery.java:897) at org.jpox.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:497) at org.jpox.store.query.Query.executeWithMap(Query.java:959) at org.jpox.store.query.Query.executeWithArray(Query.java:932) at org.jpox.store.query.Query.execute(Query.java:855) at com.total.dincash.main.EcfTest.main(EcfTest.java:86) NestedThrowablesStackTrace: org.jpox.store.expression.ScalarExpression$IllegalArgumentTypeException: Illegal argument type: CharacterLiteral "?" at org.jpox.store.expression.StringExpression.startsWithMethod(StringExpression.java:478) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.jpox.store.expression.ScalarExpression.callMethod(ScalarExpression.java:740) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compilePrimary(JDOQLQuery.java:1906) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileUnaryExpressionNotPlusMinus(JDOQLQuery.java:1760) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileUnaryExpression(JDOQLQuery.java:1741) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileMultiplicativeExpression(JDOQLQuery.java:1694) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileAdditiveExpression(JDOQLQuery.java:1671) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileRelationalExpression(JDOQLQuery.java:1631) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileEqualityExpression(JDOQLQuery.java:1603) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileAndExpression(JDOQLQuery.java:1591) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileExclusiveOrExpression(JDOQLQuery.java:1579) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileInclusiveOrExpression(JDOQLQuery.java:1567) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileConditionalAndExpression(JDOQLQuery.java:1555) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileConditionalOrExpression(JDOQLQuery.java:1537) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileExpression(JDOQLQuery.java:1514) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileExpressionFromString(JDOQLQuery.java:1475) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.compileFilter(JDOQLQuery.java:1314) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.performCompile(JDOQLQuery.java:924) at org.jpox.store.rdbms.query.JDOQLQuery$Compiler.executionCompile(JDOQLQuery.java:897) at org.jpox.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:497) at org.jpox.store.query.Query.executeWithMap(Query.java:959) at org.jpox.store.query.Query.executeWithArray(Query.java:932) at org.jpox.store.query.Query.execute(Query.java:855) at com.total.dincash.main.EcfTest.main(EcfTest.java:86)---------------------------------------- +----------------------+ | Reinaldo - Brazil | +----------------------+ |
||
|
|
Novice Joined: Jul 27, 2007 Post Count: 41 Status: Offline |
It's really a bug? ---------------------------------------- +----------------------+ | Reinaldo - Brazil | +----------------------+ |
||
|
|
|
|
|
Current timezone is GMT Dec 3, 2008 12:59:11 AM |