aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes EJB QL in OAS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB QL in OAS" Watch "EJB QL in OAS" New topic
Author

EJB QL in OAS

allen turner
Greenhorn

Joined: Oct 04, 2001
Posts: 15
Hi,

I have an ejb ql that looks like
[SELECT OBJECT(a) From EntityUseDescriptionEntityBean a, EntityUseEntityBean e WHERE a.entityUseLongDescription LIKE ?1 AND a.localeCode=?2 AND e.entityUseId = a.entityUseId AND e.effectiveDate <= ?3 AND (e.sunsetDate is null OR e.sunsetDate > ?3) AND (e.organizationId is null OR e.organizationId = ?4)]

this is what i have in the orion-ejb-jar.xml


"SELECT a.ENTITY_USE_ID, a.LOCALE_CODE, a.ENTITY_USE_DESC, a.CREATED_BY, a.CREATED_DATE, a.UPDATED_BY, a.UPDATED_DATE FROM ENTITY_USE_DESC a , ENTITY_USE e WHERE ((a.ENTITY_USE_DESC LIKE '?1' ) AND (a.LOCALE_CODE = '?2' ) AND (e.ENTITY_USE_ID = a.ENTITY_USE_ID ) AND (e.EFFECTIVE_DATE <= ? ) AND ((e.SUNSET_DATE IS NULL ) OR (e.SUNSET_DATE > ? )) AND ((e.OU_ID IS NULL ) OR (e.OU_ID = ? )))

the 4 parameters are being passed properly and I am able to print the values but some how the value are not getting set properly in the QL. I used P6spy to look at the query that is being generated. and this is what it looks like

SELECT a.ENTITY_USE_ID, a.LOCALE_CODE, a.ENTITY_USE_DESC, a.CREATED_BY, a.CREATED_DATE, a.UPDATED_BY, a.UPDATED_DATE FROM ENTITY_USE_DESC a , ENTITY_USE e WHERE ((a.ENTITY_USE_DESC LIKE ''2002-02-21'1' ) AND (a.LOCALE_CODE = ''2002-02-21'2' ) AND (e.ENTITY_USE_ID = a.ENTITY_USE_ID ) AND (e.EFFECTIVE_DATE <= 3 ) AND ((e.SUNSET_DATE IS NULL ) OR (e.SUNSET_DATE > null )) AND ((e.OU_ID IS NULL ) OR (e.OU_ID = null )))

so if you see the values are not being populated properly. what am i doing wrong here. and interesting point is that this works perfectly fine in websphere and weblogic.
But OC4J somehow does not seem to like that query, i dont know why!!!
any suggestions...
thanks in advance
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB QL in OAS