Schema export does not honor DS mapping
---------------------------------------

         Key: EJBTHREE-90
         URL: http://jira.jboss.com/jira/browse/EJBTHREE-90
     Project: EJB 3.0
        Type: Bug
    Versions: Preview 4    
 Environment: Linux, JDK 1.5.0_01, JBoss 4.0.1sp1
    Reporter: Jens Elkner


I've setup the DefaultDS to use mysqldb and hus to use the mySQL mappings.
Trying the callback example listed in the ebj3 docs, I get the following error:

18:58:40,341 INFO  [DatasourceConnectionProvider] Using datasource: 
java:/DefaultDS
18:58:40,345 ERROR [SchemaExport] Unsuccessful: create table CUSTOMER (id 
integer generated by default as identity (start with 1), STATE varchar(255), 
FIRST varchar(255), LAST varchar(255), STREET varchar(255), CITY varchar(255), 
ZIP varchar(255), primary key (id))
18:58:40,345 ERROR [SchemaExport] 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 'generated by default as identity (start with 1), STATE 
varchar(255), FIRST varch' at line 1
18:58:40,345 INFO  [SchemaExport] schema export complete
18:58:40,348 INFO  [Dialect] Using dialect: org.hibernate.dialect.HSQLDialect
18:58:40,348 INFO  [Configuration] processing extends queue
...

So the schema stuff uses HSQLDB mappings, insteadof the given mapping in the DS 
descriptor and finally produces invalid MySQL statements:

<datasources> 
    <local-tx-datasource> 
        <jndi-name>DefaultDS</jndi-name> 
        <connection-url>jdbc:mysql://localhost:3306/web</connection-url> 
        <driver-class>com.mysql.jdbc.Driver</driver-class> 
        <user-name>foo</user-name> 
        <password>bar</password> 
        <connection-property name="autoReconnect">true</connection-property>
        <connection-property name="autoReconnectForPools"
            >true</connection-property>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
        <metadata>
            <type-mapping>mySQL</type-mapping>
        </metadata>
    </local-tx-datasource> 
</datasources>



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to