openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ognjen Blagojevic (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OPENJPA-2016) OpenJPA sometimes incorrectly complains about wrong number of parameters
Date Wed, 22 Jun 2011 14:01:48 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-2016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053270#comment-13053270
] 

Ognjen Blagojevic commented on OPENJPA-2016:
--------------------------------------------

Query executes fine, it is just the problem with the log messages (which heavily burden my
log files).

> OpenJPA sometimes incorrectly complains about wrong number of parameters
> ------------------------------------------------------------------------
>
>                 Key: OPENJPA-2016
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2016
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.1.0, 2.2.0
>         Environment: Windows XP, Sun JDK 1.6.0_24, Maven 2.2.1
>            Reporter: Ognjen Blagojevic
>         Attachments: discriminatorParameter.patch
>
>
> OpenJPA sometimes incorrectly complains about wrong number of parameters, e.g.:
> "47  test  WARN   [main] openjpa.Runtime - Supplied user parameters "[name, nameDiscriminator]"
do not match expected parameters "[name]" for the prepared query "PreparedQuery: [SELECT o
FROM simple o WHERE ((:nameDiscriminator=false) OR (o.name = :name))] --> [SELECT t0.ID,
t0.NAME, t0.VALUE FROM SIMPLE_ENTITY t0 WHERE (1=0 OR t0.NAME = ?)]".
> I will add the patch to demonstrate the behavior. Run test at openjpa-persistence-jdbc,
e.g:
> mvn -Dtest=TestQueryParameters test-compile test
> The query is intentionally executed twice, since only second execution yields warning
message.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message