Hi there
I had a sybase database call db_name. An user call cokanew which alias to dbo. 
The user was test via isql login and able to create and drops table.

It was also tested using jisql.jar.

The $JBOSS_HOME/server/default/deploy/sybase-ds.xml is:-


  <local-tx-datasource>
    <jndi-name>jdbc/SybaseDB</jndi-name>
    <!-- jndi-name>SybaseDB</jndi-name -->
    <!-- Sybase jConnect URL for the database.
    NOTE: The hostname and port are made up values. The optional
          database name is provided, as well as some additinal Driver
          parameters.
    -->
    
<connection-url>jdbc:sybase:Tds:genesis:5000/db_name?JCONNECT_VERSION=6</connection-url>
    <driver-class>com.sybase.jdbc2.jdbc.SybDataSource</driver-class>
    <!-- driver-class>com.sybase.jdbc3.jdbc.SybDataSource</driver-class -->
    <user-name>cokanew</user-name>
    abc123
    
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter</exception-sorter-class-name>
        <!-- sql to call when connection is created
        <new-connection-sql>some arbitrary sql</new-connection-sql>
        -->

        <!-- sql to call on an existing pooled connection when it is obtained 
from pool
        <check-valid-connection-sql>some arbitrary 
sql</check-valid-connection-sql>
        -->

      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml 
(optional) -->
      
         <type-mapping>Sybase</type-mapping>
      
  </local-tx-datasource>




The EJB3/dd/persistance/persistance.xml is :-

<?xml version="1.0" encoding="UTF-8"?>

<entity-manager>

  cal
  <jta-data-source>java:/jdbc/SybaseDB</jta-data-source>
  
    
   
  

</entity-manager>


The error message:-
The error message:-

2006-01-10 17:37:54,376 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] 
Unsuccessful: create table fund (id int identity not null, name varchar(255) 
null, growthrate double precision not null, primary key (id))
2006-01-10 17:37:54,376 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] 
Identity field 'id' must be a numeric with a scale of 0 and not null allowed.

2006-01-10 17:37:54,376 DEBUG [org.hibernate.tool.hbm2ddl.SchemaUpdate] create 
table investor (id int identity not null, name varchar(255) null, startAge int 
not null, endAge int not null, primary key (id))

.
.
.
2006-01-10 17:38:30,887 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] 
setRepository, [EMAIL PROTECTED], [EMAIL PROTECTED] url=null ,addedOrder=0}
2006-01-10 17:38:30,891 ERROR 
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/EJB3Trail].[jsp]]
 Servlet.service() for servlet jsp threw exception
javax.ejb.EJBException: null; CausedByException is:
        could not execute query
        at 
org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:46)
        at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:70)
        at 
org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:134)


I try both jConnect-5_5 and jConnect-6_0, both has the same error.

Please help.
Thanks in advance.



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3916618#3916618

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3916618


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to