Hello, my system settings:
Weblogic 8.1 sp6
SQL Server 2005
EJBGEN
JDBC Driver (weblogic.jdbc.sqlserver.S
QLServerDr
iver (sp6))
I have Entity EJB's that's running on Oracle for years using standard EJB-QL. Now that we are migrating our application to use SQL Server 2005, I am getting a deployment error which puzzle's me and the BEA support engineers.
All I have changed is the <database-type> tag value from Oracle to SQLServer2000. The SQL Server drive doesn't seem to like the "?1 IS NULL" statement. I have also tried Microsoft's JDBC 1.0 & 1.2 driver with the same result. Any ideas? Thanks.
+++ My EJB-QL.
ejbgen:finder
signature = "ProductHierarchyLocal findByParentAndChild(java.
lang.Integ
er parentProductId,
java.lang.Integer childProductId)"
ejb-ql = "SELECT DISTINCT OBJECT(o)
FROM ProductHierarchyEJB o
WHERE o.accountProductL.id = ?2
AND (o.parentL.accountProductL
.id = ?1 OR
(o.parentL IS NULL AND ?1 IS NULL))"
+++ DEPLOYMENT ERROR MESSAGE.
[EJB:011082]Error while reading 'META-INF/ejb-jar.xml' or 'META-INF/weblogic-cmp-rdb
ms-jar.xml
'. The error was:
Query:
EJB Name: ProductHierarchyEJB
Method Name: findByParentAndChild
Parameter Types: (java.lang.Integer, java.lang.Integer)
SELECT DISTINCT OBJECT(o ) FROM ProductHierarchyEJB o WHERE o.accountProductL.id = ?2 AND ( o.parentL.accountProductL.
id = ?1 OR ( o.parentL IS NULL AND =>> ?1 <<= IS NULL ) )
[EJB:013083]The argument to IS [NOT] NULL Must be a single valued path expression.
for example a proper argument might be:
'WHERE employee.manager IS NULL' where an employee can only have one manager.
We found an IS [NOT] NULL argument '?1 ' which is not a single valued path expression.
Start Free Trial