[JBoss-user] [Persistence CMP/JBoss] - Re: Foreign key referencing not the primary key
anonymous wrote : | Is it permitted for the foreign key to point not to the primary key of the one side but to a common CMP field? | No, the foreign key constraint must be with a primary key. anonymous wrote : | Moreover, I'd like to make this relationship unidirectional to the one side, using a Collection typed CMR field. | How this could be accomplished using XDoclet? | Here is it: |* @ejb.interface-method |* @ejb.relation |*name=BeanA in relation with BeanB |*role-name=BeanA-has-many-BeanB |*target-ejb=BeanB |*target-role-name = BeanB-has-one-BeanA |* |* @jboss.target-relation |* fk-column = The column name in the table for BeanB |* related-pk-field = The BeanA cmp field name (primary key) |*/ | public abstract java.util.Collection getBeanBs(); | | |/** | * @ejb.interface-method | */ | public abstract void setBeanBs(java.util.Collection arg); | View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3837239#3837239 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3837239 --- 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: ParseException when creating CMP tables on 3.2.4RC2 and
I don't know about 3.2.4RC2 but 4.0.0DR4 implements the EJB-QL 2.1 spec, means that hte ORDER BY clause is supported. Your table name Order is in conflict with the ORDER reserved word. Change the table name and it will be OK View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3837298#3837298 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3837298 --- 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: ParseException when creating CMP tables on 3.2.4RC2 and
Sorry, Order is not the table name but the abstract schema name of your bean. So change the abstract schema name instead. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3837309#3837309 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3837309 --- 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: Mapping Entity Beans to Database Tables
abcolson, For the abstract schema name, it's your bug, not the container. And it's for the QuestionCategory bean, not the Question bean. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3837035#3837035 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3837035 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: Mapping Entity Beans to Database Tables
After looking carefully at your traces, I agree with you. The error concerns the findByprimaryKey on your QuestionBean. And the SQL string refers to a question table which is your bean name. The datasource mapping for the QuestionBean is missing, and the datasource and datasource mapping for the QuestionCategorybean is also missing. Try to specify the datasource mapping to PostgreSQL3 OR PostgreSQL 7.2, depends on your version in the jboss.persistence tag I don't understand you don't have a deployment error. With JBoss 3.2.3, I have a deployment error Error in jbosscmp-jdbc.xml : datasource-mapping not found if I do the same thing. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3837042#3837042 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3837042 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: Mapping Entity Beans to Database Tables
No matter the matching between table names and bean name, or field name and column name, all the mapping is done in jbosscmp-jdbc.xml. I think the problem is the space in your Question Categories. This don't work, even in sql. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836956#3836956 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836956 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: Mapping Entity Beans to Database Tables
I don't know which findByPrimaryKey throws an error, but the second one (for QuestionCategory bean) has an error. Your bean abstract schema name is QuestionCategory not QuestionCategorybean. It's surprising you have no errors at deployment. But as says Erik, you can remove both. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836988#3836988 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836988 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: Mapping Entity Beans to Database Tables
anonymous wrote : | I think maybe all the words didn't come through. I am unclear on what exactly you suggest removing. | You don't need to define the findByPrimarykey finder. The container knows how to implement it. anonymous wrote : | I think this might be a slip in terminology. It appears to be either a PostgresQL message or a java message i.e. | | BTW, when I create a view called question which is simply a SELECT * FROM Questions the table is mapped but then I get field mapping errors (makes sense if it is the same mapping pattern problem) | The only term in your code where question is referenced is your entity bean name (and it has nothing to do with an SQL string) and your table name Question Categories (which has to do with sql string). The error log talks about a relation but there is no relation in your descriptor snippets. So the error text is useless. anonymous wrote : | I don't think this is the problem. PostgresQL seems to be case sensitive and translates everything you type in a sql statement to lowercase unless you put it in quotes. Same goes for spaces. So in PostgresQL, | SELECT * FROM Question Categories works fine. | I agree with you for the database, but when I try myself on my computer, the container don't put the quotes and throws an error. anonymous wrote : | Do you mean QuestionCategoryBean (upper case B)? | No, the EJB spec from SUN says that the where clause in EJB-QL must refers to the abstract schema name of your bean, which is QuestionCategory, not QuestionCategoryBean. So your EJB-QL should be | SELECT OBJECT(qcb) FROM QuestionCategory qcb WHERE qcb.id = ?1 | You think that the error is for your questions bean. I think the error is for your QuestionCategory bean. Try to activate cmp plugin traces to see the generated SQL in jboss log file. Add | category name=org.jboss.ejb.plugins | priority value=TRACE class=org.jboss.logging.XLevel/ | /category | in Log4j.xml View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3837004#3837004 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3837004 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: MySQL 4/JBoss 3.2.3 and CMP 2.0
Erik, Sorry, you teach me something, but I try both and cannot see a valuable difference. Alex, I apologize if you don't like my comments byt I can proove what I say. The only error I make is that (you are right) the SQL generated for testing the entity existence is the same for the databases). I make this mistake because I anticipate with the error in this topic. But here is it: I have an entity bean: | entity | description![CDATA[PharmaML Client]]/description | display-namePhML_ClientBean/display-name | | ejb-namePhML_Client/ejb-name | | homePharmaML_EJB.interfaces.PhML_ClientHome/home | remotePharmaML_EJB.interfaces.PhML_Client/remote | local-homePharmaML_EJB.interfaces.PhML_ClientLocalHome/local-home | localPharmaML_EJB.interfaces.PhML_ClientLocal/local | | ejb-classPharmaML_EJB.pkg.PhML_ClientBean/ejb-class | persistence-typeContainer/persistence-type | prim-key-classPharmaML_EJB.pkg.ClientPK/prim-key-class | reentrantFalse/reentrant | cmp-version2.x/cmp-version | abstract-schema-namePhML_Client/abstract-schema-name | cmp-field | description![CDATA[]]/description | field-namecliId/field-name | /cmp-field | cmp-field | description![CDATA[]]/description | field-namecliAddr/field-name | /cmp-field | cmp-field | description![CDATA[]]/description | field-namecliCode/field-name | /cmp-field | cmp-field | description![CDATA[]]/description | field-namecliCp/field-name | /cmp-field | cmp-field | description![CDATA[]]/description | field-namecliFax/field-name | /cmp-field | cmp-field | description![CDATA[]]/description | field-namecliFlagsup/field-name | /cmp-field | cmp-field | description![CDATA[]]/description | field-namecliMail/field-name | /cmp-field | cmp-field | description![CDATA[]]/description | field-namecliRsnscl/field-name | /cmp-field | cmp-field | description![CDATA[]]/description | field-namecliSiret/field-name | /cmp-field | cmp-field | description![CDATA[]]/description | field-namecliTel/field-name | /cmp-field | cmp-field | description![CDATA[]]/description | field-namecliVille/field-name | /cmp-field | cmp-field | description![CDATA[]]/description | field-nameetabCode/field-name | /cmp-field | | query | query-method |method-namefindByClientCode/method-name |method-params | method-paramjava.lang.String/method-param |/method-params | /query-method | ejb-ql![CDATA[SELECT OBJECT(a) FROM PhML_Client AS a WHERE a.cliCode = ?1]]/ejb-ql | /query | !-- Write a file named ejb-finders-PhML_ClientBean.xml if you want to define extra finders. -- | /entity | My primary key class is | public class ClientPK implements java.io.Serializable { | | public Long cliID; | | public ClientPK() { | } | | public ClientPK(Long id) { | cliID = id; | //cliCode = code; | } | | public int hashCode() | { | return String.valueOf(cliID).hashCode(); | } | | | | public boolean equals(Object prod) | { | return ((ClientPK)prod).cliID.equals(cliID); | } | /** | * @return | */ | public Long getCliID() { | return cliID; | } | | /** | * @param long1 | */ | public void setCliID(Long long1) { | cliID = long1; | } | | } | As you see, only one field in the primary key class. here is the log with MSSQL2000 (trying to create a new entity, table is already created) : the WHERE clause is empty | 2004-05-30 11:16:58,821 TRACE [org.jboss.ejb.plugins.LogInterceptor] Start method=create | 2004-05-30 11:16:58,821 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Current transaction in MI is null | 2004-05-30 11:16:58,821 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TX_REQUIRED for create | 2004-05-30 11:16:58,821 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Thread came in with tx null | 2004-05-30 11:16:58,821 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Starting new tx TransactionImpl:XidImpl [FormatId=257, GlobalId=bureau//27,
[JBoss-user] [Persistence CMP/JBoss] - Re: MySQL 4/JBoss 3.2.3 and CMP 2.0
And I continue about compound primary key errors: To be clear, I never use it myself (I always use normalized schemas). But I try this: The same example as above with public String cliCode; in the primary key class (so 2 fields). The database creation in mySQL: | 2004-05-30 12:23:47,844 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.PhML_Client] Executing SQL: CREATE TABLE TD_CLIENT (CLI_ID BIGINT, CLI_ADDR VARCHAR(250) BINARY, CLI_CODE VARCHAR(250) BINARY NOT NULL, CLI_CP VARCHAR(250) BINARY, CLI_FAX VARCHAR(250) BINARY, CLI_FLAGSUP TINYINT NOT NULL, CLI_MAIL VARCHAR(250) BINARY, CLI_RSNSCL VARCHAR(250) BINARY, CLI_SIRET VARCHAR(250) BINARY, CLI_TEL VARCHAR(250) BINARY, CLI_VILLE VARCHAR(250) BINARY, ETAB_CODE VARCHAR(250) BINARY, CONSTRAINT pk_TD_CLIENT PRIMARY KEY (CLI_CODE)) | 2004-05-30 12:23:47,924 INFO [org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.PhML_Client] Created table 'TD_CLIENT' successfully. | is false (only 1 primary key). Then I delete the table and create another manually with: | CREATE TABLE TD_CLIENT (CLI_ID BIGINT, CLI_ADDR VARCHAR(250) BINARY, CLI_CODE VARCHAR(250) BINARY NOT NULL, CLI_CP VARCHAR(250) BINARY, CLI_FAX VARCHAR(250) BINARY, CLI_FLAGSUP TINYINT NOT NULL, CLI_MAIL VARCHAR(250) BINARY, CLI_RSNSCL VARCHAR(250) BINARY, CLI_SIRET VARCHAR(250) BINARY, CLI_TEL VARCHAR(250) BINARY, CLI_VILLE VARCHAR(250) BINARY, ETAB_CODE VARCHAR(250) BINARY, CONSTRAINT pk_TD_CLIENT PRIMARY KEY (CLI_ID,CLI_CODE)) | I have then my table with 2 primary keys (cliId and cliCode). Then I create the first entity (id=25000, code=) | 2004-05-30 13:07:52,026 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.PhML_Client] Executing SQL: SELECT COUNT(*) FROM TD_CLIENT WHERE CLI_CODE=? | 2004-05-30 13:07:52,176 TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.PhML_Client#cliCode] Set parameter: index=1, jdbcType=VARCHAR, value= | and the second one (id=25001,code=) The entity exist SQL is always the same: | 2004-05-30 13:11:21,757 TRACE [org.jboss.ejb.plugins.LogInterceptor] Start method=create | 2004-05-30 13:11:21,757 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Current transaction in MI is null | 2004-05-30 13:11:21,757 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TX_REQUIRED for create | 2004-05-30 13:11:21,757 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Thread came in with tx null | 2004-05-30 13:11:21,757 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Starting new tx TransactionImpl:XidImpl [FormatId=257, GlobalId=bureau//23, BranchQual=] | 2004-05-30 13:11:21,757 TRACE [org.jboss.ejb.plugins.EntityInstancePool] Get instance [EMAIL PROTECTED] PharmaML_EJB.pkg.PhML_ClientBean | 2004-05-30 13:11:21,767 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.PhML_Client] Executing SQL: SELECT COUNT(*) FROM TD_CLIENT WHERE CLI_CODE=? | 2004-05-30 13:11:21,767 TRACE [org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.PhML_Client#cliCode] Set parameter: index=1, jdbcType=VARCHAR, value= | 2004-05-30 13:11:21,788 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TxInterceptorCMT: In finally | 2004-05-30 13:11:21,798 TRACE [org.jboss.ejb.plugins.LogInterceptor] End method=create | And I have the error : Entity with primary key [EMAIL PROTECTED] already exists. Which is false of course because my primary key is a compound one ! This is not a bug ? View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836880#3836880 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836880 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: MySQL 4/JBoss 3.2.3 and CMP 2.0
Absolutly right Erik. Thanks you ! And you solve by the way the error of this topic where rberehoudougou uses a productId cmp field and a productID in its primary key class : the same d lower and upper case. Probably a bad natural reflex on the keyboard (the timing for pressing shift when you go fast). I apologize for not thinking before drawing sometimes. So, don't be severe on me, just call back me to order when i'm in delirium. I'm going to scourge myself in the cellar, hopping not reiterate. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836882#3836882 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836882 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: adding record to CMR field
My address is ironbirdy40 at yahoo dot com. I rely on you not to be victim of spamming noise. But what happens with the new code ? the same thing or errors ? Put both entity beans, and the client, then I can test it in my computer. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836885#3836885 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836885 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: MySQL 4/JBoss 3.2.3 and CMP 2.0
It should be | category name=org.jboss.ejb.plugins | priority value=TRACE class=org.jboss.logging.XLevel/ | /category | View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836803#3836803 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836803 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: adding record to CMR field
As your method is only viewed on the remote interface, does the QuestionEntity a local interface of question ? I not, It can't work because you can only work with local interfaces on CMR getters and setters (It's the spec). View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836817#3836817 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836817 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: MySQL 4/JBoss 3.2.3 and CMP 2.0
I think I got it ! Your primary key class have only one field, and unfortunatly for you, JBoss 3.2.3 is bugged : where the primary key class has only one field, the generated SQL for testing a entity existence before its creation is incomplete (the formet depends for each database : with MSSQL, the WHERE clause is empty). So you have two solutions: 1) Migrate to another version of JBoss (I don't know the one which solve this) 2) As your primary key class contains a single field, you don't need it. Just declare the productID field as the primary key of the bean. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836820#3836820 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836820 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: adding record to CMR field
Also your relationship looks strange ! | @ejb:persistent-field | @jboss:column-name name=questions | are tags for cmp fields. This means that you create both a CMR and a CMP field with the same name. I don't advise you to do that. I'm surprising you got no errors during deployment. Can you post your descriptors ? View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836835#3836835 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836835 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: adding record to CMR field
As I say to you before, two bad things: 1) Your LectureEntity bean has a cmp field named questions, and a cmr field named also questions. Remove the tags I indicate before: | @ejb:persistent-field | @jboss:column-name name=questions | or rename one of them (cmp or cmr) and put the appropriate getter and setter. 2) The QuestionEntity (addQuestion parameter) is a remote interface. You cannot set a cmr field with a remote interface (only a local). For that, you have two solutions: 2.1 : retrieve a local interface from your client if you can and change your method: | public void addQuestion(QuestionEntityLocal question) { | this.getQuestions().add(question); | } | 2.2 : if you can't, just pass the primary key and retrieve a local interface in the method: Add an ejb-ref to your bean: | * @ejb.ejb-ref | * ejb-name=QuestionEntity | * view-type=local | Then in your method: | public void addQuestion(Long questionId) { | try { | javax.naming.Context ic = new InitialContext(); | Object obj = ic.lookup(Your Question bean JNDI name); | // Something like java:comp/env/ejb/QuestionEntityLocal | QuestionEntityLocalHome Home = (QuestionEntityLocalHome)PortableRemoteObject.narrow(obj,QuestionEntityLocalHome.class); | QuestionEntityLocal question = Home.findByPrimaryKey(questionId); | this.getQuestions().add(question); | } catch(Exception e) { | // Error handling | } | } | View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836847#3836847 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836847 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: column
Like you, I cannot see any errors in your descriptors. If you are sure there is no cmp-field in jbosscmp-jdbc.xml named company, we are facing up to a big mystery ? Activate cmp engine traces in log4j.xml to see what happens: Simply adds: |category name=org.jboss.ejb.plugins.cmp | priority value=TRACE/ |/category | in the appropriate section. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836596#3836596 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836596 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: question about changing column name generated by ejb
All the fields mapping (cmp and cmr with column names) are defined in jbosscmp-jdbc.xml For a relationship, you can specify a column-name tag in the key-field tag within the appropriate ejb-relationship-role tag. If you are using XDoclet (the best way): | @jboss.relation | fk-column=your column name | View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836597#3836597 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836597 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: Why the detail locals are not loading
Even beans are loaded ot not, the collection size is always the total count because the container get the ID's list before loading the beans. If the size is 0, then probably your relationship is not correctly defined. So, post the relevant snippets (descriptors, code) in order to investigate. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836600#3836600 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836600 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: Nulls in CMR where clause
revendicative means claiming your truth at the expense of those of others This forum is for helping each other to make everyone find its truth (means the way where its application works). Blaming J2EE, JBoss, ER designers or ER models got nothing to do with this forum. So, finallly, make a choice between a DynamicSQL statement or adding views, or whatever belongs to Erik. Nothing we can do more than that. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836612#3836612 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836612 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: Why the detail locals are not loading
As your relation is defined through a value object, I cannot help you because I don't use it. But are you sure you are reach your bean through the generated value object class ? I suggest you to look at this topic too: http://www.jboss.org/index.html?module=bbop=viewtopict=49921 I Hope it helps. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836626#3836626 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836626 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: column
No millerm1, you can do that without any problem, I use it myself when I want to create entity beans which have non null foreign keys (setting up a dummy value in ejbCreate, the settting-up the cmr field in ejbPostCreate) View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836638#3836638 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836638 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: Why the detail locals are not loading
No, definitively, I don't see any error in your descriptors. Perhaps the error is a database issue. You are using MySQL 5.0.0A which is not a stable version. Try with the production release 4.0.X. Perhaps the datasource-mapping tag in jbosscmp-jdbc is not set, or the mySQL mapping is not compatible with the 5.0.X version. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836640#3836640 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836640 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: Problems if i try to access the members
Your bean seems to be a BMP one, and I suspect a transaction issue in your NPE, like your beans are not yet loaded at the end of the finder. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836641#3836641 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836641 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: lookup problem...
Are you sure your server is accessible from your client machine. Don't you have a firewall between both ? I always use myself this code snippet and it works fine: | Properties prop = new Properties(); | prop.put(Context.INITIAL_CONTEXT_FACTORY, org.jnp.interfaces.NamingContextFactory); | prop.put(Context.PROVIDER_URL, jnp://ServerName Here:1099); | prop.put(Context.URL_PKG_PREFIXES, org.jboss.naming.client); | Context context = new InitialContext(prop); | | Object ref = context.lookup(bean JNDI name Here); | myBeanhome = (BeanHome) PortableRemoteObject.narrow(ref, BeanHome.class); | View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836722#3836722 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836722 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: postgres and foreign key relation problems
have a look on this topic: http://www.jboss.org/index.html?module=bbop=viewtopicp=3831917#3831917 View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836425#3836425 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836425 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: Nulls in CMR where clause
You are too much revendicative to exchange with both of you. When you want to justify yourself so much, it's suspect for me. Continue to consider everyone as newbie while you seems to stand yourself on some cloud, nobody's care. Nice to meet you too, but not too much ! View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836538#3836538 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836538 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: Error on calling create(primary_key) fun from client
Not enough info to investigate ! Post your descriptors. The error cause can be you forgot the primkey-field tag for your entity in ejb-jar.xml View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836221#3836221 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836221 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: MySQL 4/JBoss 3.2.3 and CMP 2.0
The simple IT DOES NOT WORK let you alone against your problem ! View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836222#3836222 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836222 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: MySQL 4/JBoss 3.2.3 and CMP 2.0
My first post means : Post your descriptors (ejb-jar.xml and jbosscmp-jdbc.xml) and the full error log as possible. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836238#3836238 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836238 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: Nulls in CMR where clause
??? What do you say ? You can get null values rows in EJB-QL testing by IS NULL. For example the EJB-QL query | * @ejb.finder | * view-type=remote | * signature=java.util.Collection findCustomers(Pharma_EJB.interfaces.Pharma_Customer customer) | * query=SELECT DISTINCT OBJECT(c) FROM Pharma_User c WHERE c.customer IS NULL OR c.customer=?1 | generates the following SQL | Executing SQL: SELECT DSITINCT t0_c.IND_ID FROM TD_USER t0_c, TD_CUSTOMER t1_c_customer WHERE (t0_c.CLI_ID IS NULL) OR ((t1_c_customer.CLI_ID=?) AND t0_c.CLI_ID=t1_c_customerCLI_ID) | Where is the problem ? The spec says explicitly that the null values do not participate in the relation, so you must test it with IS NULL explicitly (snippet from the spec): anonymous wrote : | Path expression navigability is composed using ?inner join? semantics. That is, if the value of a non-terminal | cmr-field in the path expression is null, the path is considered to have no value, and does not participate | in the determination of the result. | View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836249#3836249 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836249 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Installation Configuration] - Re: JBoss on IBM Mainframe (ZSeries)
Hi Matteo, Please let me know if it works. I'm very interrested. Thanks. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836250#3836250 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836250 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: Error compiling EJB-QL statement NoSuchMethodError
Post your descriptors (ejb-jar.xml and jbosscmp-jdbc.xml) View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836262#3836262 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836262 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: Relationships over different jar's
http://www.jboss.org/index.html?module=bbop=viewtopict=49941 View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836277#3836277 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836277 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: Error compiling EJB-QL statement NoSuchMethodError
Post the whole entity declaration (fields) from ejb-jar and I don't understand the remainder: I don't give a shit about standardjbosscmp-jdbc.xml, its a system file ! I ask you jbosscmp-jdbc.xml. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836289#3836289 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836289 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: Nulls in CMR where clause
You can do what you want with DynamicSQL, which is specific to JBoss. But the J2EE spec do not address your needs. Even in any language (PL-SQL, T-SQL, C++ or whatever), you need to build dynamically your SQL string to do what you want. Why do you want the container do the job for you ? View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836294#3836294 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836294 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: Relationships over different jar's
jdwn wrote : I watched the other topic (already watched it in a previous search), but it's surprising me that it's impossible to have relationships over different jar's. You watch badly ! View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836297#3836297 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836297 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: MySQL 4/JBoss 3.2.3 and CMP 2.0
Hi, I think your have a problem with the primary key of the Product entity, not the database. Do you have a compound primary key ? (Why the primary key class is declared as cmptest.ProductPK ?) The error says that probably there is no field between SELECT and FROM:the SQL query is like this SELECT FROM products t0_a WHERE (t0_a.productId IS NOT NULL) The container mismatch with your primary key definition. PS : I use myself JBoss 3.2.3 and MySQL 4.0.17 and it works fine. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836321#3836321 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836321 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: jboss/oracle/xdoclet auto-increment
Not tutorial but many topics in this forum (you can use search before posting) http://www.jboss.org/index.html?module=bbop=viewtopict=49321 http://www.jboss.org/index.html?module=bbop=viewtopict=47787 View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836323#3836323 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836323 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: Nulls in CMR where clause
anonymous wrote : | Because I am using container managed persistence (CMP) and EJB-QL is a the Query Language? | EJB-QL query is for persistence with additional features, not complex queries. I agree with you that the spec is not adapted with professional applications. I work in industry and many times I cannot rely on the spec OR THE CONTAINER to satisfy my customers. anonymous wrote : | To obtain database vendor indepedence. The application is 100% compatible today with MySQL, DB2, Oracle, SQL Server and any other database that provides a compliant JDBC driver and a configuration in the J2EE server. The differences between them that that JDBC doesn't handle, JBoss handles through CMP configurations. | Just for persistence, you means. And your query, even implemented in SQL, is 100% compatible with all the databases because SQL address the database compatibility before java and J2EE. anonymous wrote : | To develop using a Java database interface that's independent of the underying database technology. JBoss and other vendors just happened to be using JDBC/relational to implement CMP today because relational databases are still popular. But there's nothing in the spec to prevent them from adding an object database engine for CMP down the road. I won't have to change a single line of code to be able to use object databases when this happens, since I never use SQL in the application. | No its false, because SUN impose its certification and any vendor must comply if he want to keep its customers. But do you experiment vendor compatibility ? I do. Normally, the Container Managed means that you can migrate from one vendor to another. And it's often difficult, and I can tell you that you spend more time to be 100% vendor compatible that 100% database compatible, even if the containers and EJB-QL are limited. You have always to separate the system level (the container) from the business level (you). The frontier is not always where you want ! View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836328#3836328 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836328 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: curious SQL-Statements when loading related data
No you were not dreaming, or we were all dreaming. But it seems that the server falls down many times actually. Its not Alex who tells you the on-find strategy but me. But Alex post after me saying that you should keep your on-load strategy, I don't know why. on-load load the beans one by one on-find load a page size each time on bean is not in current page Do you remove some options in your datasource file (pool size or something like this) ? View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836330#3836330 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836330 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: finderMethod only works with a few result Elements (smal
Hi westmeier, You comfort me because my account also got lost, so I was asking myself if I was running on a third dimension (like in a bad movie but so real ;-). So, You says that you are using the 3.2.4 version. I have seen other recent topics (but some are destroyed now) about the 3.2.4 version problems. Do you try the 3.2.3 version ? I confirm that it works fine with 1000 elements in a collection retreived from a finder usins the XA driver. Normally, the SelectMethod=Cursor is the default if you do not change it in the -ds file. I think also that specifying read-ahead option with a fixed page-size on version 3.2.4 can help, because there is some differences between two versions on this subject. Alex (loubyansky), the JBoss CMP guru says on the previous topic that the version 3.2.3 was bugged for on-find read-ahead option for single object finder. But for both topics, everything works fine with 3.2.3 version, and is ugly or crashes with 3.2.4 version. So, conclude yourself. Iron, the metallic bird from Atlantica. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3835743#3835743 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3835743 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: finderMethod only works with a few result Elements (smal
Hi again, You should use XDoclet to generate the descriptors. The tag is : anonymous wrote : | @jboss.read-ahead | strategy=on-find | page-size=what you want | View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3835747#3835747 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3835747 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: curious SQL-Statements when loading related data
Hi, Before the crash, We said in this topic that lafr was using the 3.2.4 version, and I said that it was working fine in the 3.2.3 version. So, which version has most bugs ? View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3835749#3835749 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3835749 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: finderMethod only works with a few result Elements (smal
After a look at your descriptors, We can say that you are not using the XA driver. Try to cut out the | min-pool-size2/min-pool-size | max-pool-size20/max-pool-size | tags. You are already using a read-ahead opion: read-ahead | on-load | page-size1000/page-size | eager-load-group*/eager-load-group | /read-ahead | But why are you using the on-load option ? With the number of beans you are loading, on-find is better I think. You can put also this read-ahead tag within the query tag of your finder if you want using on-find just for the finder. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3835755#3835755 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3835755 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: Seeking Clarification (fk constraints)
You are a little bit lazy, but nice and relevant. I read the specs and your understanding is perfectly right. So blame SUN, not JBOSS. My opinion is that the spec is unperfect for relationships and many features are ugly. For example, when you get a collection of child entities with a CMR getter, the container first get all the id's, then retreive all the fields with a WHERE clause like that: (ID=?) OR (ID=?) and so on with all the child Id's. You can imagine with 1000 childs. So, I suggest you a third solution: Do not use relationships. Just get childs with a finder taking the foreign key as parameter, then you can remove them without hurting the database relational integrity. Also, the finder will be faster than the CMR getter. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3835800#3835800 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3835800 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: problem with creating a record on DB with EJB cmp 2.0
What a shitload of parameters in your create method ! Post your code and descriptors. The error is in the bean creation. How is defined your primary key ? View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3836035#3836035 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3836035 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [HTTPD, Servlets JSP] - Re: Default page not found when precompiled
Your precompiled jsp page must be mapped as a servlet with a / as url-pattern. Use jsp-page instead of servlet-class in the declaration. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3835957#3835957 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3835957 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: Problem, when
| java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Die Datenbank hat ein unspezifizierter Fehler zurckgegeben | ??? English please ! Transation type not required ? Do you try with JBoss 3.2.3 (3.2.4 series not stable for me) ? Try also to specify read-ahead option with a fixed page-size. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3835977#3835977 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3835977 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149alloc_id66op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: Problem, when
It works fine for me under JBoss 3.2.3 with a collection of 1000 elements (with the MSSQL XA driver). So for me 3 solutions: 1) JDBC XA procedures perhaps not installed 2) CMP engine for JBoss 3.2.4 bugged (other topics in this forum seems to prove that). 3) Use read-ahead with fixed page size to prevent the CMP engine making its own choices. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3835983#3835983 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3835983 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: SQL not generating properly
primkey-field=id is missing in the @ejb.bean tag. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3835910#3835910 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3835910 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: Problem with One to One Unidirectional Relationship
I suggest you to adopt a pragmatic method. Nothing's logical in all this. The first error talks about the getCid() getter, nothing to do with the usertDetails field. So: - Keep a known configuration of your beans and relationships (DO NOT CHANGE BETWEEN POSTS). - Activate CMP plugin traces adding | category name=org.jboss.ejb.plugins | priority value=TRACE class=org.jboss.logging.XLevel/ | /category | in Log4j.xml - Post the server log file content (or the appropriate snippet if too long) - Post your exact descriptors (from your post : what the USER_ID column got to do with relationships ???) View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3835916#3835916 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3835916 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: Bean not found for relation
It is perfectly defined in the spec and the descriptor schema: | xsd:complexType name=ejb-nameType | xsd:annotation | xsd:documentation | The ejb-nameType specifies an enterprise beans name. It is | used by ejb-name elements. This name is assigned by the | ejb-jar file producer to name the enterprise bean in the | ejb-jar files deployment descriptor. The name must be | unique among the names of the enterprise beans in the same | ejb-jar file.There is no architected relationship between the used | ejb-name in the deployment descriptor and the JNDI name that | the Deployer will assign to the enterprise beans home. | The name for an entity bean must conform to the lexical | rules for an NMTOKEN. | Example: | ejb-nameEmployeeService/ejb-name | /xsd:documentation | /xsd:annotation | For the ejb-name, you can use a path name relative to the referencing ejb-jar file. Appends the ejb-name of the referenced bean to the path name separated by #. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3835926#3835926 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3835926 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149alloc_id66op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: curious SQL-Statements when loading related data
Your descriptors are OK, means using default values. Do you try on JBoss 3.2.3 ? I have seen many peculiarities for the ejb plugin on JBoss 3.2.4 series. Perhaps try also to optimize loading. Is your problem occurs after a long run or from the start ? View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3835768#3835768 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3835768 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: My records from database is getting deleted during retri
anonymous wrote : | I am jboss3.2.3 with mysql. I am observing a behaviour which does not make sense. | | I am creating an entity object and then trying to retrieve it through session facade. Sometime findByPrimaryKey() is iving me Object Not Found exception and also deleting the row from the database. | Quite curious and unbelievable ! I don't think that the container itself delete the row from the database. More logical, you get a Object Not Found exception because the row was deleted before. Look at your code, and post it if needed. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3835769#3835769 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3835769 --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user