I suppose, there is no error in the EJB-QL, because I have tried the query 
"SELECT OBJECT(p) FROM RecipePos AS p WHERE p.color = '999'", and if there is 
no record with the color 999, the finder-method doesn't throw an exception. But 
when I create one record with color 999, the finder-method breaks:

TransactionRolledbackLocalException in method:
public abstract java.lang.Integer 
entitybeans.interfaces.RecipePosLocal.getRecipePs(),
causedBy: java.sql.SQLException: Unexpected token in statement
[SELECT recipePosPK, side, workDesc, machine, count, color, recipeDesc, comment 
FROM RECIPEPOS WHERE (recipeId=? AND recipePs=?)]
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement

There is only one "(recipeId=? AND recipePs=?)" in the WHERE-clause, and this 
indicates, that JBoss knows that there is only one record with the color 999. 
Hence the query should work correct, but JBoss seems to have problems to 
replace the placeholders ? in the PreparedStatement with the real values. But 
how can I influence this behavior?

recipeId and recipePs are Integers, and I have replaced it through Strings, but 
this doesn't work, too.

I assume, there is only a little bagatelle in my program which is not correct, 
but I cannot find the error.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3900426#3900426

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3900426


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to