Re: Re[2]: [JBoss-user] Error compiling ejbql
You should try this : select object(r) from Role as r where r.role_desc= ?1 HTH Sebastien - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 18, 2002 12:24 PM Subject: Re: Re[2]: [JBoss-user] Error compiling ejbql > > Thanks Alex, > > That works!!! > > But I still have more question for another findBy. > > 17:17:02,411 WARN [ServiceController] Problem starting service > jboss.j2ee:servi > ce=EJB,jndiName=RoleRemoteHome > org.jboss.deployment.DeploymentException: Error compiling ejbql; - nested > throwa > ble: (org.jboss.ejb.plugins.cmp.ejbql.TokenMgrError: Lexical error at line > 1, co > lumn 52. Encountered: after : "") > > Another findByDescription > > > > findByDescription > > java.lang.String > > > Local > select object(r) from Role as r where role_desc > = ? > > > What should I change? > > -phu > > > > > Alex Loubyansky > <[EMAIL PROTECTED]> To: "[EMAIL PROTECTED]" > Sent by: <[EMAIL PROTECTED]> > [EMAIL PROTECTED]cc: > eforge.net Subject: Re[2]: [JBoss-user] Error compiling ejbql > No Phone Info Available > > 09/18/2002 02:07 PM > Please respond to jboss-user > > > > > > > PSsc> What is r? Should I define it before using? Could you give me an > example? > > r is defined in the EJB-QL statement, e.g. 'Role as r'. > > alex > > PSsc> -phu > > > > > PSsc> Dain Sundstrom > PSsc> <[EMAIL PROTECTED]>To: > [EMAIL PROTECTED] > PSsc> Sent by:cc: > PSsc> [EMAIL PROTECTED]Subject: > Re: [JBoss-user] Error compiling ejbql > PSsc> eforge.net > PSsc> No Phone Info Available > > PSsc> 09/18/2002 11:55 AM > PSsc> Please respond to jboss-user > > > > > > > PSsc> SELECT OBJECT(r) FROM Role as r > > PSsc> The 'as' is optional > > PSsc> -dain > > PSsc> Dmitri Colebatch wrote: > >> I _think_ the ejbql should be something like > >> > >> SELECT r FROM Role AS r > >> > >> hth > >> dim > >> > >> - Original Message - > >> From: <[EMAIL PROTECTED]> > >> To: <[EMAIL PROTECTED]> > >> Sent: Wednesday, September 18, 2002 2:01 PM > >> Subject: [JBoss-user] Error compiling ejbql > >> > >> > >> > >>>Got error when deploy application. Can anyone help? > >>> > >>>10:33:21,317 INFO [RoleEJB] Table 'role_map' already exists > >>>10:33:21,337 WARN [ServiceController] Problem starting service > >>>jboss.j2ee:servi > >>>ce=EJB,jndiName=RoleRemoteHome > >>>org.jboss.deployment.DeploymentException: Error compiling ejbql; - > nested > >>>throwa > >>>ble: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered > "" > >>>at lin > >>>e 1, column 18. > >>>Was expecting one of: > >>>"AS" ... > >>> ... > >>>) > >>>at > >>> > >> > >> > PSsc> > org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.java:46) > > > >> > >>>Definition in ejb-jar.xml > >>> > >>> > >>>User Role Entity Bean > >>>RoleEJB > >>>occs.RoleRemoteHome > >>>occs.RoleRemote > >>>occs.RoleBean > >>>Container > >>>java.lang.Integer > >>>False > >>>2.x > >>>Role > >>> > >>>roleID > >>> > >>> > >>>roleDesc > >>> > >>>roleID > >>> > >>> > >>>findAll > >
Re: Re[2]: [JBoss-user] Error compiling ejbql
Thanks Alex, That works!!! But I still have more question for another findBy. 17:17:02,411 WARN [ServiceController] Problem starting service jboss.j2ee:servi ce=EJB,jndiName=RoleRemoteHome org.jboss.deployment.DeploymentException: Error compiling ejbql; - nested throwa ble: (org.jboss.ejb.plugins.cmp.ejbql.TokenMgrError: Lexical error at line 1, co lumn 52. Encountered: after : "") Another findByDescription findByDescription java.lang.String Local select object(r) from Role as r where role_desc = ? What should I change? -phu Alex Loubyansky <[EMAIL PROTECTED]> To: "[EMAIL PROTECTED]" Sent by: <[EMAIL PROTECTED]> [EMAIL PROTECTED]cc: eforge.net Subject: Re[2]: [JBoss-user] Error compiling ejbql No Phone Info Available 09/18/2002 02:07 PM Please respond to jboss-user PSsc> What is r? Should I define it before using? Could you give me an example? r is defined in the EJB-QL statement, e.g. 'Role as r'. alex PSsc> -phu PSsc> Dain Sundstrom PSsc> <[EMAIL PROTECTED]>To: [EMAIL PROTECTED] PSsc> Sent by:cc: PSsc> [EMAIL PROTECTED]Subject: Re: [JBoss-user] Error compiling ejbql PSsc> eforge.net PSsc> No Phone Info Available PSsc> 09/18/2002 11:55 AM PSsc> Please respond to jboss-user PSsc> SELECT OBJECT(r) FROM Role as r PSsc> The 'as' is optional PSsc> -dain PSsc> Dmitri Colebatch wrote: >> I _think_ the ejbql should be something like >> >> SELECT r FROM Role AS r >> >> hth >> dim >> >> - Original Message - >> From: <[EMAIL PROTECTED]> >> To: <[EMAIL PROTECTED]> >> Sent: Wednesday, September 18, 2002 2:01 PM >> Subject: [JBoss-user] Error compiling ejbql >> >> >> >>>Got error when deploy application. Can anyone help? >>> >>>10:33:21,317 INFO [RoleEJB] Table 'role_map' already exists >>>10:33:21,337 WARN [ServiceController] Problem starting service >>>jboss.j2ee:servi >>>ce=EJB,jndiName=RoleRemoteHome >>>org.jboss.deployment.DeploymentException: Error compiling ejbql; - nested >>>throwa >>>ble: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "" >>>at lin >>>e 1, column 18. >>>Was expecting one of: >>>"AS" ... >>> ... >>>) >>>at >>> >> >> PSsc> org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.java:46) >> >>>Definition in ejb-jar.xml >>> >>> >>>User Role Entity Bean >>>RoleEJB >>>occs.RoleRemoteHome >>>occs.RoleRemote >>>occs.RoleBean >>>Container >>>java.lang.Integer >>>False >>>2.x >>>Role >>> >>>roleID >>> >>> >>>roleDesc >>> >>>roleID >>> >
Re[2]: [JBoss-user] Error compiling ejbql
PSsc> What is r? Should I define it before using? Could you give me an example? r is defined in the EJB-QL statement, e.g. 'Role as r'. alex PSsc> -phu PSsc> Dain Sundstrom PSsc> <[EMAIL PROTECTED]>To: [EMAIL PROTECTED] PSsc> Sent by:cc: PSsc> [EMAIL PROTECTED]Subject: Re: [JBoss-user] Error compiling ejbql PSsc> eforge.net PSsc> No Phone Info Available PSsc> 09/18/2002 11:55 AM PSsc> Please respond to jboss-user PSsc> SELECT OBJECT(r) FROM Role as r PSsc> The 'as' is optional PSsc> -dain PSsc> Dmitri Colebatch wrote: >> I _think_ the ejbql should be something like >> >> SELECT r FROM Role AS r >> >> hth >> dim >> >> - Original Message - >> From: <[EMAIL PROTECTED]> >> To: <[EMAIL PROTECTED]> >> Sent: Wednesday, September 18, 2002 2:01 PM >> Subject: [JBoss-user] Error compiling ejbql >> >> >> >>>Got error when deploy application. Can anyone help? >>> >>>10:33:21,317 INFO [RoleEJB] Table 'role_map' already exists >>>10:33:21,337 WARN [ServiceController] Problem starting service >>>jboss.j2ee:servi >>>ce=EJB,jndiName=RoleRemoteHome >>>org.jboss.deployment.DeploymentException: Error compiling ejbql; - nested >>>throwa >>>ble: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "" >>>at lin >>>e 1, column 18. >>>Was expecting one of: >>>"AS" ... >>> ... >>>) >>>at >>> >> >> PSsc> org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.java:46) >> >>>Definition in ejb-jar.xml >>> >>> >>>User Role Entity Bean >>>RoleEJB >>>occs.RoleRemoteHome >>>occs.RoleRemote >>>occs.RoleBean >>>Container >>>java.lang.Integer >>>False >>>2.x >>>Role >>> >>>roleID >>> >>> >>>roleDesc >>> >>>roleID >>> >>> >>>findAll >>> >>> >>>Local >>>select * from Role >>> >>> >>> PSsc> --- PSsc> This SF.NET email is sponsored by: AMD - Your access to the experts PSsc> on Hammer Technology! Open Source & Linux Developers, register now PSsc> for the AMD Developer Symposium. Code: EX8664 PSsc> http://www.developwithamd.com/developerlab PSsc> ___ PSsc> JBoss-user mailing list PSsc> [EMAIL PROTECTED] PSsc> https://lists.sourceforge.net/lists/listinfo/jboss-user PSsc> --- PSsc> This SF.NET email is sponsored by: AMD - Your access to the experts PSsc> on Hammer Technology! Open Source & Linux Developers, register now PSsc> for the AMD Developer Symposium. Code: EX8664 PSsc> http://www.developwithamd.com/developerlab PSsc> ___ PSsc> JBoss-user mailing list PSsc> [EMAIL PROTECTED] PSsc> https://lists.sourceforge.net/lists/listinfo/jboss-user -- Best regards, Alex Loubyansky --- This SF.NET email is sponsored by: AMD - Your access to the experts on Hammer Technology! Open Source & Linux Developers, register now for the AMD Developer Symposium. Code: EX8664 http://www.developwithamd.com/developerlab ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user