deployment error-- error while running ejbc -- fatal error from EJB Compile
Hi,
I'm using Sun Studio 5.0 Standard Edition with Sun Application Server 7.0.
I have an EJB QL:
<ejb-ql>SELECT OBJECT(M) FROM ErrorMessage M WHERE M.applicationId = ?1</ejb-ql>which gives error while deploying EJB.
Removing where clause as:
<ejb-ql>SELECT OBJECT(M) FROM ErrorMessage M </ejb-ql>
EJB deploys successfully.
Could any in this forum help me out reason of the error; or what is wrong with the "where" clause that EJB isn't getting depolyed?
Thanks,
S.K
[567 byte] By [
S.Ka] at [2007-11-27 5:56:52]

# 2
Hi Karthik,
Thanks for your reply. I looked into the admin server log.
Here is part of the log:
Caused by: com.sun.jdo.spi.persistence.support.ejb.ejbqlc.EJBQLException: Invalid EJBQL query
Bean:ErrorMessage
Method: TYP_EPIC_TEST.app.ejb.entity.ErrorMessage findByApplicationId(java.math.BigDecimal)
EJBQL: SELECT OBJECT(M) FROM ErrorMessage M WHERE M.applicationId=?1
Error: column(59): Invalid argument(s) for '='.
at com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCod
-
I'm not able to figure out what is wrong with the query. "applicationId' is the cmp field in the "ErrorMessage " which is abstract schema.
S.Ka at 2007-7-12 16:28:18 >

# 3
From the error message it looks like ejbql compiler is rejecting '=?1' expression.Have you tried executing with a literal value in the where clause to see if it works? Also, does it happen only when the parameter type is java.math.BigDecimal?
# 4
Hi Karthick,
I changed data type from BigDecimal to String; provided hard coded value. It doesn't work with when there is "Where" clause. However, it works when there is no "Where" clause.
What's worng with this EJB-QL:
SELECT OBJECT(p) FROM ErrorMessage p WHERE p.applicationId = ?1
Have you encounterd this type of error with Sun One?
Thanks
S.Ka at 2007-7-12 16:28:18 >

# 5
I myself have not seen this error. Have you tried running the appserver in debug mode or set the log level to a more FINER level and check the logs?
Some references i came across:
- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4813066
- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4706311
- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4711751
- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4681252
(This bug was present in Studio 4 but you are using Studio 5; so this probably does not apply to your case).