sorry, my mistake. I pasted the corrected SQL query. The generated one
does not have a space between the table name and the opening parenthesis
"(", as you can see: "CREATE TABLE user(user_id INTEGER NOT NULL,login
VARCHAR(250) BINARY, password_ VARCHAR(250) BINARY, first_name
VARCHAR(250) BINARY, last_name VARCHAR(250) BINARY, gender VARCHAR(250)
BINARY, email VARCHAR(250) BINARY, school_id INTEGER, CONSTRAINT pk_user
PRIMARY KEY (user_id))" --__--__-- Message: 8 Date: Wed, 12 Nov 2003
13:30:22 +0200 From: Alexey Loubyansky <[EMAIL PROTECTED]> To:
[EMAIL PROTECTED] Subject: Re: [JBoss-user] Problem with
SQL query for MySQL Reply-To: [EMAIL PROTECTED] As far as
I remember, Rafal's problem was "no space after table name". What's your
problem? I just executed your DDL in MySql w/o problems. Paul Ekeland
wrote:
Hello,
I have exactly the same problem as Rafal, but with the following
JBoss-generated query:
"CREATE TABLE user (user_id INTEGER NOT NULL,login VARCHAR(250) BINARY,
password_ VARCHAR(250) BINARY, first_name VARCHAR(250) BINARY, last_name
VARCHAR(250) BINARY, gender VARCHAR(250) BINARY, email VARCHAR(250)
BINARY, school_id INTEGER, CONSTRAINT pk_user PRIMARY KEY (user_id))"
I downloaded the latest JBoss 3.2.3RC1, released today but unfortunately
with the same result..
Were your modification taken in account in this release or is it a
different problem?
Thanks,
Paul
Branch_3_2
Rafal Kedziorski wrote:
> At 20:24 28.10.2003 +0200, Alexey Loubyansky wrote:
> >> It is fixed now.
> > > In main cvs branch?
> > > Regards,
> Rafal
> > >> alex
>>
>> Rafal Kedziorski wrote:
>>
>>> hi,
>>> I'm using MySQL 4.0.13 and 4.0.14 (4.0.16 I will test tomorrow) and
>>> JBoss 3.2.2. And I have problems with this query (generated by JBoss):
>>> insert into user(class_id, retail_id, mandant_id, language_id, >>>
user_data_id, nickname, login_name, password, status, creation_date, >>>
last_login_date) values ('35F7A660096411D89BC0D1907F000001', '1234', >>>
2, 1, null, null, '[EMAIL PROTECTED]', 'demo', 8, '2003-10-28 >>> 17:31:36',
null)
>>> but the same query with space after user
>>> insert into user (class_id, retail_id, mandant_id, language_id, >>>
user_data_id, nickname, login_name, password, status, creation_date, >>>
last_login_date) values ('35F7A660096411D89BC0D1907F000001', '1234', >>>
2, 1, null, null, '[EMAIL PROTECTED]', 'demo', 8, '2003-10-28 >>> 17:31:36',
null)
>>> works.
>>> This exception is shown:
>>> 17:31:36,406 ERROR [UserEntityBean] Could not create entity >>>
java.sql.SQLException: Syntax error or access violation, message >>>
from server: "You have an error in your SQL syntax. Check the manual
>>> that corresponds to your MySQL server version for the right syntax
to >>> use near 'user(class_id, retail_id, mandant_id, language_id, >>>
user_data_id" at >>>
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1651) at >>>
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:889) at >>>
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:956) at >>>
com.mysql.jdbc.Connection.execSQL(Connection.java:1874) at >>>
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1700
>>> ) at >>>
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1569
>>> ) at >>>
org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:321)
>>> at >>>
org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand.executeInsert(JDBCMySQLCreateCommand.java:66)
>>> at >>>
org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.performInsert(JDBCAbstractCreateCommand.java:295)
>>> at >>>
org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbstractCreateCommand.java:144)
>>> at >>>
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:518)
>>> at >>>
org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:208)
>>> at >>>
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:269)
>>> at >>>
org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:580)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >>>
Method) at >>>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>> at >>>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>> at java.lang.reflect.Method.invoke(Method.java:324) at >>>
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1042)
>>> at >>>
org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88)
>>> at >>>
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:197)
>>> at >>>
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:214)
>>>
>>> ...
>>>
>>> Regards,
>>> Rafal
>>>
>>> -------------------------------------------------------
>>> This SF.net email is sponsored by: SF.net Giveback Program.
>>> Does SourceForge.net help you be more productive? Does it
>>> help you create better code? SHARE THE LOVE, and help us help
>>> YOU! Click Here: http://sourceforge.net/donate/
>>> _______________________________________________
>>> JBoss-user mailing list
>>> [EMAIL PROTECTED]
>>> https://lists.sourceforge.net/lists/listinfo/jboss-user
>>
>>
>>
>>
>>
>> -------------------------------------------------------
>> This SF.net email is sponsored by: SF.net Giveback Program.
>> Does SourceForge.net help you be more productive? Does it
>> help you create better code? SHARE THE LOVE, and help us help
>> YOU! Click Here: http://sourceforge.net/donate/
>> _______________________________________________
>> JBoss-user mailing list
>> [EMAIL PROTECTED]
>> https://lists.sourceforge.net/lists/listinfo/jboss-user
> > > > > -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive? Does it
> help you create better code? SHARE THE LOVE, and help us help
> YOU! Click Here: http://sourceforge.net/donate/
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user