[JBoss-user] [Persistence CMP/JBoss] - Re: EJB-QL Finder method error

2004-06-13 Thread pumuckel
I think I solved the problem.
I used a MySQL 4.0.15 DB. This DB does not support subqueries. 
MySQL 4.1.x should do it, but at this is at the moment at alpha stage.
I tried it with MSSQL DB and it worked.

Does anybody know if Postgres does support subqueries?

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3838593#3838593

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3838593


---
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: EJB-QL Finder method error

2004-06-12 Thread pumuckel
Sorry that I waited that long for an answer (I did not notice your answer loubyansky)

The output  in DEBUG mode is as follows :

  | 2004-06-12 23:00:52,057 DEBUG [org.apache.struts.action.RequestProcessor]  Looking 
for Action instance for class moduledb.actions.ModStudAction
  | 2004-06-12 23:00:52,057 DEBUG [org.apache.struts.action.RequestProcessor]   
Creating new Action instance
  | 2004-06-12 23:00:52,067 TRACE [org.jboss.system.Registry] lookup 
-1275511181=jboss.j2ee:jndiName=moduledb/ModuleManager,service=EJB
  | 2004-06-12 23:00:52,067 TRACE [org.jboss.system.Registry] lookup 
-1275511181=jboss.j2ee:jndiName=moduledb/ModuleManager,service=EJB
  | 2004-06-12 23:00:52,077 DEBUG 
[org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.ModuleBean#findByPrimaryKey] 
Executing SQL: SELECT id FROM ModuleBean WHERE id=?
  | 2004-06-12 23:00:52,107 DEBUG 
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.ModuleBean] Executing SQL: 
SELECT name, description, ectsCredits, content, grade, link, literature, objectives, 
semester, abbreviation, remarks, activityConfirmation, examType, learnType FROM 
ModuleBean WHERE (id=?)
  | 2004-06-12 23:00:52,207 TRACE [org.jboss.system.Registry] lookup 
-1275511181=jboss.j2ee:jndiName=moduledb/ModuleManager,service=EJB
  | 2004-06-12 23:00:52,207 DEBUG 
[org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.ModuleBean#findByPrimaryKey] 
Executing SQL: SELECT id FROM ModuleBean WHERE id=?
  | 2004-06-12 23:00:52,237 DEBUG 
[org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.UserBean#findByModule] Executing SQL: 
SELECT t0_u.id FROM UserBean t0_u WHERE ((t2_u_takenModules_RELATION_TABLE.UserBean IS 
 NOT NULL AND t2_u_takenModules_RELATION_TABLE.ModuleBean=?))
  | 2004-06-12 23:00:52,297 DEBUG 
[org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.UserBean#findByModule] Find failed
  | java.sql.SQLException: General error,  message from server: Unknown table 
't2_u_takenModules_RELATION_TABLE' in where clause
  | at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1905)
  | at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109)
  | at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203)
  | at com.mysql.jdbc.Connection.execSQL(Connection.java:2090)
  | 

Thanks for any help in advance

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3838575#3838575

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3838575


---
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: EJB-QL Finder method error

2004-06-11 Thread pumuckel
I have go tables for the entity beans and the relationship. 
But no table t2_u_takenModules_RELATION_TABLE is created.
The table created from jboss for this relation is called Module_taken_Student_takes.

Is there a possibility that i can specifiy the sql query by my own instead letting it 
create via QL?

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3838468#3838468

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3838468


---
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: EJB-QL Finder method error

2004-06-11 Thread loubyansky
What query is generated/executed?
You could use declared-sql in jbosscmp-jdbc.xml. It's covered in CMP docs. But this is 
a configuration problem.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3838474#3838474

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3838474


---
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: EJB-QL Finder method error

2004-06-10 Thread gorano
No bug. No workaround. You just have to get the syntax right.

If you want someone to help you out, you have to list the related parts from both 
jboss.xml and jbosscmp-jdbc.xml.

/G

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3838380#3838380

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3838380


---
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: EJB-QL Finder method error

2004-06-10 Thread pumuckel
Thanks for your fast reply.

The jboss.xml:

  | ?xml version=1.0 encoding=UTF-8?
  | jboss
  | security-domainjava:/jaas/moduledb2/security-domain
  | enterprise-beans
  | session
  | ejb-nameUserManager/ejb-name
  | jndi-namemoduledb/UserManager/jndi-name
  | ejb-local-ref
  | ejb-ref-nameejb/UserBean/ejb-ref-name
  | jndi-namemoduledb/UserBean/jndi-name
  | /ejb-local-ref
  | ejb-local-ref
  | ejb-ref-nameejb/ModuleBean/ejb-ref-name
  | jndi-namemoduledb/ModuleBean/jndi-name
  | /ejb-local-ref
  | /session
  | session
  | ejb-nameAdministration/ejb-name
  | jndi-namemoduledb/Administration/jndi-name
  | ejb-local-ref
  | ejb-ref-nameejb/UserBean/ejb-ref-name
  | jndi-namemoduledb/UserBean/jndi-name
  | /ejb-local-ref
  | ejb-local-ref
  | ejb-ref-nameejb/ModuleBean/ejb-ref-name
  | jndi-namemoduledb/ModuleBean/jndi-name
  | /ejb-local-ref
  | /session
  | session
  | ejb-nameModuleManager/ejb-name
  | jndi-namemoduledb/ModuleManager/jndi-name
  | ejb-local-ref
  | ejb-ref-nameejb/UserBean/ejb-ref-name
  | jndi-namemoduledb/UserBean/jndi-name
  | /ejb-local-ref
  | ejb-local-ref
  | ejb-ref-nameejb/ModuleBean/ejb-ref-name
  | jndi-namemoduledb/ModuleBean/jndi-name
  | /ejb-local-ref
  | /session
  | entity
  | ejb-nameUserBean/ejb-name
  | jndi-namemoduledb/UserBean/jndi-name
  | /entity
  | entity
  | ejb-nameModuleBean/ejb-name
  | jndi-namemoduledb/ModuleBean/jndi-name
  | /entity
  | entity
  | ejb-nameRatingBean/ejb-name
  | jndi-namemoduledb/RatingBean/jndi-name
  | /entity
  | entity
  | ejb-nameFieldOfStudyBean/ejb-name
  | jndi-namemoduledb/FieldOfStudyBean/jndi-name
  | /entity
  | /enterprise-beans
  | /jboss
  | 

jbosscmp-jdbc.xml:

  | ?xml version=1.0 encoding=UTF-8?
  | !DOCTYPE jbosscmp-jdbc PUBLIC -//JBoss//DTD JBOSSCMP-JDBC 3.0//EN
  |http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_0.dtd;
  | jbosscmp-jdbc
  | defaults
  | datasourcejava:/MySqlDS/datasource
  | datasource-mappingmySQL/datasource-mapping
  | create-tabletrue/create-table
  | remove-tablefalse/remove-table
  | !--
  | datasourcejava:/DefaultDS/datasource
  | datasource-mappingHypersonic SQL/datasource-mapping
  | create-tabletrue/create-table
  | remove-tablefalse/remove-table
  | --
  | /defaults
  | enterprise-beans
  | entity
  | ejb-nameModuleBean/ejb-name
  | cmp-field
  | field-namedescription/field-name
  | !--column-nameDESCRIPTION/column-name--
  | jdbc-typeVARCHAR/jdbc-type
  | sql-typeTEXT/sql-type
  | /cmp-field
  | cmp-field
  | field-namecontent/field-name
  | jdbc-typeVARCHAR/jdbc-type
  | sql-typeTEXT/sql-type
  | /cmp-field
  | cmp-field
  | field-namecontent/field-name
  | jdbc-typeVARCHAR/jdbc-type
  | sql-typeTEXT/sql-type
  | /cmp-field
  | cmp-field
  | field-nameliterature/field-name
  | jdbc-typeVARCHAR/jdbc-type
  | sql-typeTEXT/sql-type
  | /cmp-field
  | cmp-field
  | field-nameobjectives/field-name
  | jdbc-typeVARCHAR/jdbc-type
  | sql-typeTEXT/sql-type
  | /cmp-field
  | cmp-field
  | field-nameremarks/field-name
  | jdbc-typeVARCHAR/jdbc-type
  | sql-typeTEXT/sql-type
  |