Help required using sybase ASE 12.5 with ejb3 trailer
fire-fly Jan 10, 2006 4:16 AMHi 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, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@6d12a9, cl=org.jboss.mx.loading.UnifiedClassLoader3@8543aa{ 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.