Bugs item #984976, was opened at 2004-07-04 20:20
Message generated for change (Comment added) made by loubyansky
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=984976&group_id=22866

Category: JBossCMP
Group: v3.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Lars Kral (lkral)
Assigned to: Alexey Loubyansky (loubyansky)
Summary: DeploymentException and invalid EJB-QL statements

Initial Comment:
It seems JBoss gets mixed up when deploying an entity 
bean with an invalid EJB-QL statement. The 
DeploymentException is always reported for the last 
entity bean declared in the ejb-jar.xml .

Please have a look at the attached testcase. Although 
the invalid query belongs to the 'Test1' bean, JBoss 
shows another bean in the list of incomplete 
deployments:


18:04:32,634 ERROR [URLDeploymentScanner] 
Incomplete Deployment listing:
MBeans waiting for other MBeans:
ObjectName: jboss.j2ee:jndiName=Test2,service=EJB
 state: FAILED
 I Depend On:
 Depends On Me: MBeanException: 
org.jboss.deployment.DeploymentException: Error 
compiling EJB-QL statement 'SELECT OBJECT(o) FROM 
Test1 AS o WHERE o.value2 = ?1'; - nested throwable: 
(org.jboss.ejb.plugins.cmp.ejbql.UnknownPathException: 
Unknown terminal field: at line 1, column 47.  
Encountered: "value2" after: "o.")
Cause: org.jboss.deployment.DeploymentException: Error 
compiling EJB-QL statement 'SELECT OBJECT(o) FROM 
Test1 AS o WHERE o.value2 = ?1'; - nested throwable: 
(org.jboss.ejb.plugins.cmp.ejbql.UnknownPathException: 
Unknown terminal field: at line 1, column 47.  
Encountered: "value2" after: "o.")
ObjectName: 
jboss.j2ee:jndiName=Test2,plugin=pool,service=EJB
 state: CREATED
 I Depend On:
 Depends On Me:


Tested with: JBoss 3.2.5 / JDK 1.4.2 / SuSE 9.0

----------------------------------------------------------------------

>Comment By: Alexey Loubyansky (loubyansky)
Date: 2004-07-10 11:36

Message:
Logged In: YES 
user_id=543482

The 'new line' kind of problem is already fixed.

----------------------------------------------------------------------

Comment By: Doychin Bondzhev (doychin)
Date: 2004-07-09 15:54

Message:
Logged In: YES 
user_id=401323

Here is another problem I found with EJBQLParser

2004-07-09 14:34:58,937 DEBUG
[org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.AccountEnabledStatus#findByAccount]
EJB-QL: SELECT OBJECT(o)
FROM AccountEnabledStatus o
WHERE o.accountid=?1
2004-07-09 14:34:59,812 INFO  [STDOUT]
org.jboss.ejb.plugins.cmp.ejbql.ParseException: FROM not found
2004-07-09 14:34:59,812 INFO  [STDOUT]  at
org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.parse(EJBQLParser.java:39)

You don't see the problem here but in deploymnet descriptor 

FROM is on a new line and as result parser recives ejbql
string that contains /n before FROM.

Becouse the check that throws this exception actually looks
for " from " it can't find it. I fixed this by adding
.replaceAll("/n", " ");

at line 36 so it is now

String lowerCase = ejbql.toLowerCase().replaceAll("\n", " ");



----------------------------------------------------------------------

Comment By: Alexey Loubyansky (loubyansky)
Date: 2004-07-06 20:43

Message:
Logged In: YES 
user_id=543482

Right. That's because CMP engine is started after all the
EntityPersistenceManager's are created. Then it compiles
queries, resolves relationships, etc. If something goes
wrong the last started EJB container which provoked the
start of CMP engine will be reported as guilty. The message
reports what query is wrong and why though. So, I don't
consider it as a critical bug.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=984976&group_id=22866


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to