I'm using SapDB with the Orion Application Server, and after moving an application from Postgres to SapDB I'm gettingg the following error when executing a finder EJB methd:

com.evermind[Orion/1.6.0 (build 10770)].server.rmi.OrionRemoteException: Transaction was rolled back: Database error: com.sap.dbtech.jdbc.exceptions.DatabaseException: SAP DBTech SQL: [-7016] (at 365) Parameter spec not allowed in this context; nested exception is:
com.sap.dbtech.jdbc.exceptions.DatabaseException: SAP DBTech SQL: [-7016] (at 365) Parameter spec not allowed in this context

The query is originally an EJB-QL query, but Orion tells me that the generated SQL is the following:

select bug1.id, bug1.shortDescription, bug1.detailedDescription,
bug1.publicDescription, bug1.notesField, bug1.submittedDate,
bug1.closedDate, bug1.stateField, bug1.type, bug1.priority,
bug1.reportedVersion, bug1.fixedVersion, bug1.submitter,
bug1.ownerField, bug1.category, bug1.lastModified,
bug1.duplicateField, bug1.attachmentFileGroupId
from Bug bug1
where ((? is null) or bug1.category = ?)
and (bug1.priority >= ? and (bug1.priority <= ?
and (((? is null) or bug1.submitter = ?)
and (((? = false and ((? is null) or bug1.ownerField = ?))
or (? = true and (bug1.ownerField is null)))
and ((? = true and bug1.stateField = 0)
or ((? = true and bug1.stateField = 1)
or ((? = true and bug1.stateField = 2)
or (? = true and bug1.stateField = 3))))))))

The question marks are set up by the EJB container using a PreparedStatement. These are the relevant data types (Java types in parentheses):

id: int (long)
priority: int (int)
stateField: int (int)
submitter: varchar (String)
ownerField: varchar (String)
category: varchar (String)

Does anyone have any ideas on where to start digging? I tried the same query, with some random values filled in in place of the question marks and I can't reproduce the problem.

Thanks is advance



_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to