Do not use on any
shared computer
August 29, 2008 07:03pm pdt
 
[x]
Attachment Details

Ejbgen not working with SQL Server

Tags: BEA Weblogic  8.1, EJBGEN, We found an IS [NOT] NULL argument '?1 ' which is not a single valued path expression.
Hello, my system settings:

Weblogic 8.1 sp6
SQL Server 2005
EJBGEN
JDBC Driver (weblogic.jdbc.sqlserver.SQLServerDriver (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.Integer 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-rdbms-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 your free trial to view this solution
Question Stats
Zone: Software
Question Asked By: yienyew
Question Asked On: 04.15.2008
Participating Experts: 3
Points: 500
Views: 0
Translate:
Loading Advertisement...
 
[+][-]Expert Comment by momi_sabag

Rank: Guru

Expert Comment by momi_sabag:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by chapmandew

Rank: Genius

Expert Comment by chapmandew:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by yienyew
Author Comment by yienyew:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by greensunie
Expert Comment by greensunie:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080723-EE-VQP-34 / EE_QW_2_20070628