[JBoss-user] [Persistence CMP/JBoss] - Re: Index already exists in statement

2004-10-06 Thread mbeyer73
I can't find this issue in the bug database. Don't you consider it as a bug?

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

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


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: Index already exists in statement

2004-06-02 Thread sbocquet
All is about the @jboss.relation dbindex=xxx tag for the relation tables.
It works with a mySQL database when you don't have the @jboss.relation 
dbindex=true tag set with XDoclet for the 2 fields of the relation 
(GROUPS  ROLES here... and USERS  GROUPS).
Can't remenber what this tag generate in ejb-jar.xml and jbosscmp-jdbc.xml, but this 
tag MUST not exist for those EJBs. If it's set to false, the bug appends, because 
the test done is !=null
So, it doesn't works when the flag is set to true or false, and works without the 
tag !!!

This is normal. If you look at jbosscmp-jdbc_3_2.dtd (can be found in 
the docs directory), it says :

!--
If present, the server will try to create an index on the column in the database 
called _index
--
!ELEMENT dbindex EMPTY

So the value is irrelevant and the presence of the tag is what counts. 

The only thing that I can spot as being wrong is that the createCMRIndex 
call in JDBCStartCommand should probably be inside the test 
if(relationMetaData.getCreateTable()). However, this code is only 
executed if the relation table did not exist. Which kind of puts us back 
at the drawing board.

I have also tried comparing the xdoclet relation definition you use with 
what I normally use and the only differences I see is that I normally 
use @jboss.target-relation and don't have a create-table anywhere (I 
have this defined in my defaults section, in the 
jbosscmp-jdbc-defaults.xml merge file.

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

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



---
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: Index already exists in statement

2004-06-01 Thread sbocquet
Hi,

Just try with mySQL database, and have the same error :


  | org.jboss.deployment.DeploymentException: Error while creating table; - nested 
throwable: (java.sql.SQLException: Invalid argument value,  message from server: 
Duplicate key name 'roleId_idx0')
  | 

So I think that this is a JBoss problem, and not a database problem...

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

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



---
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: Index already exists in statement

2004-05-31 Thread loubyansky
It seems like a JBossCMP bug. We don't drop index at undeploy. The code should be in 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStopCommand.


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

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



---
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: Index already exists in statement

2004-05-31 Thread sbocquet
Hi,

I'm surprise that JBoss drop the indexex at undeploy time !... I was thinking that if 
the table does not exist, it creates it, with the constraints and indexes, and if the 
table is already created, it just detects it, and uses it as it is.


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

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



---
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: Index already exists in statement

2004-05-31 Thread triathlon98
No, JBoss does not drop indexes.

It creates indexes on create-table.
It checks whether indexes exists and creates if they don't exist with alter-table.

So my guess is that you have alter-table set and that hsqldb does not implement the 
JDBC metadata calls properly.

Joachim

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

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



---
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: Index already exists in statement

2004-05-31 Thread sbocquet
Hi,

Perhaps, but It deploys the same ear two times... with no change in it. Just start and 
stop the server two times.
Can someone tests my ear if I send it to him, in order to see if it's a JBoss bug ?
I'm trying to debug JDBCStartCommand.java to see what it does, but it's quite 
difficult I'm not familiar with JbossCMP ;-)))


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

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



---
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: Index already exists in statement

2004-05-31 Thread triathlon98
Can you publish the defaults section in your jbosscmp-jdbc.xml file?

Joachim

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

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



---
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: Index already exists in statement

2004-05-31 Thread sbocquet
Here is it 


  |defaults
  |   datasourcejava:/DefaultDS/datasource
  |   datasource-mappingHypersonic SQL/datasource-mapping
  | 
  |   create-tabletrue/create-table
  |   remove-tablefalse/remove-table
  |   read-onlyfalse/read-only
  |   read-time-out30/read-time-out
  |   row-lockingfalse/row-locking
  |   pk-constrainttrue/pk-constraint
  |   fk-constraintfalse/fk-constraint
  |   preferred-relation-mappingforeign-key/preferred-relation-mapping
  |   read-ahead
  |  strategyon-load/strategy
  |  page-size1000/page-size
  |  eager-load-group*/eager-load-group
  |   /read-ahead
  |   list-cache-max1000/list-cache-max
  | 
  |   unknown-pk
  |  key-generator-factoryUUIDKeyGeneratorFactory/key-generator-factory
  |  unknown-pk-classjava.lang.String/unknown-pk-class
  |  jdbc-typeVARCHAR/jdbc-type
  |  sql-typeVARCHAR(32)/sql-type
  |   /unknown-pk
  | 
  |   entity-command name=default/
  | 
  |/defaults
  | 

the fk-constraint is set to false, but I think it is overridden by the EJB 
descriptor value, which is set to true.

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

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



---
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: Index already exists in statement

2004-05-31 Thread triathlon98
Ok, send me your ear and I will have a look, address is joachim at triathlon98.com

Joachim

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

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



---
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: Index already exists in statement

2004-05-31 Thread sbocquet
Hi,

In JDBCStartCommand.java...
It seems that JBossCMP doesn't detects that there is an index already created. It 
detects that the tables are created, but still try to create indexes. Can't understand 
why !

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

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



---
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: Index already exists in statement

2004-05-30 Thread erik777
It appears as though it creates the index the first time, but can't detect that it 
already exists the next time, since it's trying to create it again.  

I would try another database, such as MySQL, to try to determine if it's a JDBC 
problem.  If it works in MySQL or another database, then it is most likely a JDBC 
problem with HSQLDB.

If it iturns out to be a problem in other databases, and thus unlikely to be a 
specific JDBC problem, can you show the entire trace instead of just the first 3 
lines?  



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

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



---
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: Index already exists in statement

2004-05-30 Thread sbocquet
Hi,

I'm trying to install mySQL to do some testing...

Here is the complte log with HSQLDB

  | 2004-05-31 00:20:36,048 WARN  [org.jboss.system.ServiceController] Problem 
starting service jboss.j2ee:jndiName=ejb/bet4fun/Evenments,service=EJB
  | org.jboss.deployment.DeploymentException: Error while creating table; - nested 
throwable: (java.sql.SQLException: Index already exists in statement [CREATE INDEX 
roleId_idx0 ON GroupsRolesLink (roleId)])
  | at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.createIndex(JDBCStartCommand.java:305)
  | at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.createCMRIndex(JDBCStartCommand.java:527)
  | at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.execute(JDBCStartCommand.java:150)
  | at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:484)
  | at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:388)
  | at 
org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:152)
  | at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:342)
  | at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
  | at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)
  | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  | at java.lang.reflect.Method.invoke(Unknown Source)
  | at 
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
  | at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
  | at 
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
  | at $Proxy14.start(Unknown Source)
  | at org.jboss.system.ServiceController.start(ServiceController.java:394)
  | at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
  | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  | at java.lang.reflect.Method.invoke(Unknown Source)
  | at 
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
  | at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
  | at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
  | at $Proxy31.start(Unknown Source)
  | at org.jboss.ejb.EjbModule.startService(EjbModule.java:331)
  | at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
  | at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)
  | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  | at java.lang.reflect.Method.invoke(Unknown Source)
  | at 
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
  | at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
  | at 
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
  | at $Proxy14.start(Unknown Source)
  | at org.jboss.system.ServiceController.start(ServiceController.java:394)
  | at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
  | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  | at java.lang.reflect.Method.invoke(Unknown Source)
  | at 
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
  | at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
  | at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
  | at $Proxy12.start(Unknown Source)
  | at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:544)
  | at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
  | at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
  | at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
  | at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
  | at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
  | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  | at java.lang.reflect.Method.invoke(Unknown Source)
  | at 
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
  | at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
  | at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
  | at $Proxy6.deploy(Unknown Source)
  | at 
org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
  | at 
org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
  | at 
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
  | at 
org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
  | at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
  | at