• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

EJB QL errors using ejbc

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting a weblogic.ejb20.cmp.rdbms.finders.IllegalExpressionException from ejbc claiming it cannot parse my EJB QL expression. It has a problem with the IN(...) part I think. I have included the line of code below. Is there a problem with the syntax?
< ![CDATA[FROM Employees AS e, IN(e.skills) AS s WHERE s.skill_id = ?1 AND s.skill_level > ?2 ]]>
for this example I have a one-to-many relationship (Employees->Skills) defined in ejb-jar.xml with cmr fields 'skills' (a Collection) & 'employee' respectively. skill_id & skill_level are both cmp fields in the Skills table.
in the weblogic-cmp-rdbms-jar.xml file i declare the foreign-key-column and key-column as employee_id (a column in both Employees and Skills)

[This message has been edited by Simon Elliot (edited July 30, 2001).]
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
were you able to fix, this problem. I'm trying to move my app from WL 6.1 sp3 to WL 7.0 sp 4 and I'm getting the same error in some of my ejbs with the IN(..) clause as well. Any hints?
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The ejb sql specified in WL 6.1 is not EJB 2.0 standard. BEA fixed that in later versions.
To fox this you need to add SELECT
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the BEA/WebLogic Forum...
 
Gus Delgado
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I still get the error: I re-created the deployment descriptors with 7.0

[java] ERROR: Error from ejbc: Error while reading 'META-INF/weblogic-cmp-r
dbms-jar.xml'. The error was:
[java]
[java] weblogic.ejb20.cmp.rdbms.finders.IllegalExpressionException:
[java] While trying to process Query
[java] Method Name: findLastInProgressByTicket
[java] Parameter Types: (java.lang.Integer, java.lang.String)
[java] EJB Query: SELECT p.lastRequest FROM ProcessBean p, IN (p.lastRe
quest) r WHERE r.ticket = ?1 AND r.processState = ?2
[java] )
[java] Invalid Expression: Finder: 'findLastInProgressByTicket', the SELECT
clause for a finder must return an EJB of type equal to the EJB that the finder
is written for. Expected EJB: 'RequestBean' but instead we found: 'ProcessBean'
here is the descriptor:
<query>
<query-method>
<method-name>findLastInProgressByTicket</method-name>
<method-params>
<method-param>java.lang.Integer</method-param>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>SELECT p.lastRequest FROM ProcessBean p, IN (p.lastRequest) r WHERE r.ticket = ?1 AND r.processState = ?2</ejb-ql>
</query>
<query>

any help is much appreciated
-Gus
 
Get me the mayor's office! I need to tell him about this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic