You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Fernando (JIRA)" <ji...@apache.org> on 2009/01/30 23:18:59 UTC
[jira] Created: (OPENJPA-886) Certain query failing after
svn:739123
Certain query failing after svn:739123
--------------------------------------
Key: OPENJPA-886
URL: https://issues.apache.org/jira/browse/OPENJPA-886
Project: OpenJPA
Issue Type: Bug
Components: kernel
Affects Versions: 2.0.0
Reporter: Fernando
Priority: Blocker
We were using the nightly snapshot builds, then this morning our app stopped working. A certain query ( it looks quite normal to me ), fails, and we have no clue what's going on.
The stack trace is below. It complains that a parameter type is not allowed, even though it has been working until that check-in. And the type is a normal Entity, related through a ManyToOne relationship from the other class.. The class code excerpts are below as well..
2009-01-30 11:43:31,349 [btpool0-1] DEBUG openjpa.Query - Executing query: [SELECT t0.JDOID, t0.CREATETIME, t0.BRACKET_JDOID, t0.GROUP0, t0.USER_JDOID FROM BRACKETEER t0 WHERE (t0.GROUP0 = ? AND t0.USER_JDOID = ?)] with parameters: {1=com.protrade.bracket.data.entities.User@b1406b[
fbId=578696943
appAdded=false
recruiter=<null>
numMinibrackets=0
numBrackets=0
createTime=1233343722122
idLong=9000
jdoId=<null>
jdoversion=0
], 0=<<BracketGroupId:BracketGroup:32>>}
2009-01-30 11:28:42,483 [btpool0-2] ERROR com.protrade.bracket.fbsite.filters.AppSubscriptionHandler - The specified parameter of type "class com.protrade.bracket.data.entities.User" is not a valid query parameter.
<openjpa-2.0.0-SNAPSHOT-r422266:739178 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: The specified parameter of type "class com.protrade.bracket.data.entities.User" is not a valid query parameter.
at org.apache.openjpa.jdbc.sql.DBDictionary.setUnknown(DBDictionary.java:1354)
at org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.executeQuery(SQLStoreQuery.java:314)
at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:997)
at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:846)
at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:777)
at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:525)
at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:274)
at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:284)
at com.protrade.common.persistence.JPAUtil.execute(JPAUtil.java:195)
at com.protrade.common.persistence.JPAUtil.execute(JPAUtil.java:170)
at com.protrade.common.persistence.JPAUtil.executeList(JPAUtil.java:155)
at com.protrade.common.persistence.JPADQuery.list(JPADQuery.java:24)
at com.protrade.common.persistence.BaseRootDAOBase.runListQueryWithListNCS(BaseRootDAOBase.java:272)
at com.protrade.common.persistence.BaseRootDAOBase.findByFieldsNCS(BaseRootDAOBase.java:199)
at com.protrade.common.persistence.BaseRootDAOBase.existsByFieldsNCS(BaseRootDAOBase.java:236)
at com.protrade.common.persistence.BaseDAOBase.existsByFieldsNCS(BaseDAOBase.java:144)
at com.protrade.bracket.data.BracketDao.isBracketeer(BracketDao.java:152)
@Entity
public class Bracketeer extends HBaseIdCreateTime implements IBracketeer {
...
@Persistent
@Externalizer( "getIdLong" )
private BracketGroupId group;
@ManyToOne
@JoinColumn( name = "USER_JDOID" )
private User user;
...
}
@Entity
public class User extends HBaseIdCreateTime implements UnifiedSocialUser {
...
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-886) Certain query failing after
svn:739123
Posted by "Catalina Wei (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Catalina Wei updated OPENJPA-886:
---------------------------------
Attachment: TestSetParameter.java
Pinaki,
The attached file contains a simple query string that could help you debugging the problem:
String query = "UPDATE CompUser e set e.name= ?1, e.age = ?2 WHERE e.userid = ?3";
int count = em.createQuery(query).
setParameter(1, "Shannon").
setParameter(2, 29).
setParameter(3, userid2).
executeUpdate();
You could add a version column to CompUser entity for non-user parameter.
> Certain query failing after svn:739123
> --------------------------------------
>
> Key: OPENJPA-886
> URL: https://issues.apache.org/jira/browse/OPENJPA-886
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Affects Versions: 2.0.0
> Reporter: Fernando
> Priority: Blocker
> Attachments: TestSetParameter.java
>
>
> We were using the nightly snapshot builds, then this morning our app stopped working. A certain query ( it looks quite normal to me ), fails, and we have no clue what's going on.
> The stack trace is below. It complains that a parameter type is not allowed, even though it has been working until that check-in. And the type is a normal Entity, related through a ManyToOne relationship from the other class.. The class code excerpts are below as well..
> 2009-01-30 11:43:31,349 [btpool0-1] DEBUG openjpa.Query - Executing query: [SELECT t0.JDOID, t0.CREATETIME, t0.BRACKET_JDOID, t0.GROUP0, t0.USER_JDOID FROM BRACKETEER t0 WHERE (t0.GROUP0 = ? AND t0.USER_JDOID = ?)] with parameters: {1=com.protrade.bracket.data.entities.User@b1406b[
> fbId=578696943
> appAdded=false
> recruiter=<null>
> numMinibrackets=0
> numBrackets=0
> createTime=1233343722122
> idLong=9000
> jdoId=<null>
> jdoversion=0
> ], 0=<<BracketGroupId:BracketGroup:32>>}
> 2009-01-30 11:28:42,483 [btpool0-2] ERROR com.protrade.bracket.fbsite.filters.AppSubscriptionHandler - The specified parameter of type "class com.protrade.bracket.data.entities.User" is not a valid query parameter.
> <openjpa-2.0.0-SNAPSHOT-r422266:739178 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: The specified parameter of type "class com.protrade.bracket.data.entities.User" is not a valid query parameter.
> at org.apache.openjpa.jdbc.sql.DBDictionary.setUnknown(DBDictionary.java:1354)
> at org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.executeQuery(SQLStoreQuery.java:314)
> at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:997)
> at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:846)
> at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:777)
> at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:525)
> at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:274)
> at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:284)
> at com.protrade.common.persistence.JPAUtil.execute(JPAUtil.java:195)
> at com.protrade.common.persistence.JPAUtil.execute(JPAUtil.java:170)
> at com.protrade.common.persistence.JPAUtil.executeList(JPAUtil.java:155)
> at com.protrade.common.persistence.JPADQuery.list(JPADQuery.java:24)
> at com.protrade.common.persistence.BaseRootDAOBase.runListQueryWithListNCS(BaseRootDAOBase.java:272)
> at com.protrade.common.persistence.BaseRootDAOBase.findByFieldsNCS(BaseRootDAOBase.java:199)
> at com.protrade.common.persistence.BaseRootDAOBase.existsByFieldsNCS(BaseRootDAOBase.java:236)
> at com.protrade.common.persistence.BaseDAOBase.existsByFieldsNCS(BaseDAOBase.java:144)
> at com.protrade.bracket.data.BracketDao.isBracketeer(BracketDao.java:152)
> @Entity
> public class Bracketeer extends HBaseIdCreateTime implements IBracketeer {
> ...
> @Persistent
> @Externalizer( "getIdLong" )
> private BracketGroupId group;
> @ManyToOne
> @JoinColumn( name = "USER_JDOID" )
> private User user;
> ...
> }
> @Entity
> public class User extends HBaseIdCreateTime implements UnifiedSocialUser {
> ...
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-886) Certain query failing after
svn:739123
Posted by "Fernando (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669055#action_12669055 ]
Fernando commented on OPENJPA-886:
----------------------------------
Catalina Wei commented that the stacktrace looked to be using a SQL query instead of a JPQL query ( which is what our code is expecting to use ). So I can only guess that the large checkin at svn:739123, might have a typo, that is executing the wrong code path.
I am sorry, but I don't have the JPQL query at the moment.. though I have logging turned up to TRACE, openjpa didn't seem to print it out..
but it's really straight forward.. something like (psedo code) "select * from ...Braketeer as this where this.group = :p0 and this.user = :p1"
> Certain query failing after svn:739123
> --------------------------------------
>
> Key: OPENJPA-886
> URL: https://issues.apache.org/jira/browse/OPENJPA-886
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Affects Versions: 2.0.0
> Reporter: Fernando
> Priority: Blocker
>
> We were using the nightly snapshot builds, then this morning our app stopped working. A certain query ( it looks quite normal to me ), fails, and we have no clue what's going on.
> The stack trace is below. It complains that a parameter type is not allowed, even though it has been working until that check-in. And the type is a normal Entity, related through a ManyToOne relationship from the other class.. The class code excerpts are below as well..
> 2009-01-30 11:43:31,349 [btpool0-1] DEBUG openjpa.Query - Executing query: [SELECT t0.JDOID, t0.CREATETIME, t0.BRACKET_JDOID, t0.GROUP0, t0.USER_JDOID FROM BRACKETEER t0 WHERE (t0.GROUP0 = ? AND t0.USER_JDOID = ?)] with parameters: {1=com.protrade.bracket.data.entities.User@b1406b[
> fbId=578696943
> appAdded=false
> recruiter=<null>
> numMinibrackets=0
> numBrackets=0
> createTime=1233343722122
> idLong=9000
> jdoId=<null>
> jdoversion=0
> ], 0=<<BracketGroupId:BracketGroup:32>>}
> 2009-01-30 11:28:42,483 [btpool0-2] ERROR com.protrade.bracket.fbsite.filters.AppSubscriptionHandler - The specified parameter of type "class com.protrade.bracket.data.entities.User" is not a valid query parameter.
> <openjpa-2.0.0-SNAPSHOT-r422266:739178 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: The specified parameter of type "class com.protrade.bracket.data.entities.User" is not a valid query parameter.
> at org.apache.openjpa.jdbc.sql.DBDictionary.setUnknown(DBDictionary.java:1354)
> at org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.executeQuery(SQLStoreQuery.java:314)
> at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:997)
> at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:846)
> at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:777)
> at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:525)
> at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:274)
> at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:284)
> at com.protrade.common.persistence.JPAUtil.execute(JPAUtil.java:195)
> at com.protrade.common.persistence.JPAUtil.execute(JPAUtil.java:170)
> at com.protrade.common.persistence.JPAUtil.executeList(JPAUtil.java:155)
> at com.protrade.common.persistence.JPADQuery.list(JPADQuery.java:24)
> at com.protrade.common.persistence.BaseRootDAOBase.runListQueryWithListNCS(BaseRootDAOBase.java:272)
> at com.protrade.common.persistence.BaseRootDAOBase.findByFieldsNCS(BaseRootDAOBase.java:199)
> at com.protrade.common.persistence.BaseRootDAOBase.existsByFieldsNCS(BaseRootDAOBase.java:236)
> at com.protrade.common.persistence.BaseDAOBase.existsByFieldsNCS(BaseDAOBase.java:144)
> at com.protrade.bracket.data.BracketDao.isBracketeer(BracketDao.java:152)
> @Entity
> public class Bracketeer extends HBaseIdCreateTime implements IBracketeer {
> ...
> @Persistent
> @Externalizer( "getIdLong" )
> private BracketGroupId group;
> @ManyToOne
> @JoinColumn( name = "USER_JDOID" )
> private User user;
> ...
> }
> @Entity
> public class User extends HBaseIdCreateTime implements UnifiedSocialUser {
> ...
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-886) Certain query failing after
svn:739123
Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pinaki Poddar resolved OPENJPA-886.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0
2.0.0-M1
> Certain query failing after svn:739123
> --------------------------------------
>
> Key: OPENJPA-886
> URL: https://issues.apache.org/jira/browse/OPENJPA-886
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Affects Versions: 2.0.0
> Reporter: Fernando
> Priority: Blocker
> Fix For: 2.0.0-M1, 2.0.0
>
> Attachments: TestSetParameter.java
>
>
> We were using the nightly snapshot builds, then this morning our app stopped working. A certain query ( it looks quite normal to me ), fails, and we have no clue what's going on.
> The stack trace is below. It complains that a parameter type is not allowed, even though it has been working until that check-in. And the type is a normal Entity, related through a ManyToOne relationship from the other class.. The class code excerpts are below as well..
> 2009-01-30 11:43:31,349 [btpool0-1] DEBUG openjpa.Query - Executing query: [SELECT t0.JDOID, t0.CREATETIME, t0.BRACKET_JDOID, t0.GROUP0, t0.USER_JDOID FROM BRACKETEER t0 WHERE (t0.GROUP0 = ? AND t0.USER_JDOID = ?)] with parameters: {1=com.protrade.bracket.data.entities.User@b1406b[
> fbId=578696943
> appAdded=false
> recruiter=<null>
> numMinibrackets=0
> numBrackets=0
> createTime=1233343722122
> idLong=9000
> jdoId=<null>
> jdoversion=0
> ], 0=<<BracketGroupId:BracketGroup:32>>}
> 2009-01-30 11:28:42,483 [btpool0-2] ERROR com.protrade.bracket.fbsite.filters.AppSubscriptionHandler - The specified parameter of type "class com.protrade.bracket.data.entities.User" is not a valid query parameter.
> <openjpa-2.0.0-SNAPSHOT-r422266:739178 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: The specified parameter of type "class com.protrade.bracket.data.entities.User" is not a valid query parameter.
> at org.apache.openjpa.jdbc.sql.DBDictionary.setUnknown(DBDictionary.java:1354)
> at org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.executeQuery(SQLStoreQuery.java:314)
> at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:997)
> at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:846)
> at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:777)
> at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:525)
> at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:274)
> at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:284)
> at com.protrade.common.persistence.JPAUtil.execute(JPAUtil.java:195)
> at com.protrade.common.persistence.JPAUtil.execute(JPAUtil.java:170)
> at com.protrade.common.persistence.JPAUtil.executeList(JPAUtil.java:155)
> at com.protrade.common.persistence.JPADQuery.list(JPADQuery.java:24)
> at com.protrade.common.persistence.BaseRootDAOBase.runListQueryWithListNCS(BaseRootDAOBase.java:272)
> at com.protrade.common.persistence.BaseRootDAOBase.findByFieldsNCS(BaseRootDAOBase.java:199)
> at com.protrade.common.persistence.BaseRootDAOBase.existsByFieldsNCS(BaseRootDAOBase.java:236)
> at com.protrade.common.persistence.BaseDAOBase.existsByFieldsNCS(BaseDAOBase.java:144)
> at com.protrade.bracket.data.BracketDao.isBracketeer(BracketDao.java:152)
> @Entity
> public class Bracketeer extends HBaseIdCreateTime implements IBracketeer {
> ...
> @Persistent
> @Externalizer( "getIdLong" )
> private BracketGroupId group;
> @ManyToOne
> @JoinColumn( name = "USER_JDOID" )
> private User user;
> ...
> }
> @Entity
> public class User extends HBaseIdCreateTime implements UnifiedSocialUser {
> ...
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.