Is there anything like a stack trace or something in the JBoss logs?
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
Thanks for your time.
Abbey.
sybase-ds.xml
<datasources>
<local-tx-datasource>
<jndi-name>jdbc/SybaseDB</jndi-name>
<connection-url>jdbc:sybase:Tds:localhost:2638/jboss</connection-url>
<driver-class>com.sybase.jdbc2.jdbc.SybDataSource</driver-class>
<user-name>dba</user-name>
<password>sql</password>
<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) -->
<metadata>
<type-mapping>Sybase</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
> us...@domain.invalid wrote:
>
>> I'm having some difficulty connecting Adaptive Server Anywhere 9 with
>> JBoss 4.
>
>
> Is there anything like a stack trace or something in the JBoss logs?
>
> greg.fenton
Hello Greg,
The stack trace from JBoss I'm getting when I deploy the app is posted
below. Does that mean I can eliminate my sybase-ds.xml file as the cause
of the problem, Thanks.
Abbey.
1sp1/server/default/deploy/RosterApp.ear
20:09:25,264 INFO [EjbModule] Deploying RosterBean
20:09:25,374 INFO [EjbModule] Deploying TeamBean
20:09:25,389 INFO [EjbModule] Deploying LeagueBean
20:09:25,405 INFO [EjbModule] Deploying PlayerBean
20:09:25,561 INFO [EJBDeployer] Deployed:
file:/C:/jboss-4.0.1sp1/jboss-4.0.1sp1/server/d
efault/tmp/deploy/tmp2018RosterApp.ear-contents/roster-ejb.jar
20:09:25,639 ERROR [EntityContainer] Starting failed
jboss.j2ee:jndiName=local/TeamBean,se
rvice=EJB
org.jboss.deployment.DeploymentException: Error in jbosscmp-jdbc.xml :
datasource-mapping
sybDB not found
at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.<init>(JDBCEntityMet
aData.java:495)
at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.<init>(JDBCAppl
icationMetaData.java:312)
at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoade
r.java:75)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStor
eManager.java:721)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManag
er.java:409)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:353
)
at
org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:15
7)
at
org.jboss.ejb.EntityContainer.startService(EntityContainer.java:340)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.jav
a:272)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport
.java:222)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
va:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:14
4)
I can't say for sure, but nothing was obviously wrong in there. That
being said, I have not used JBoss in quite a while.
> org.jboss.deployment.DeploymentException: Error in jbosscmp-jdbc.xml :
> datasource-mapping
> sybDB not found
The file you posted was <jndi-name>jdbc/SybaseDB</jndi-name>, not
sybDB. Does that help in some way?
<properties>
<config-property name="ConnectionURL"
type="java.lang.String">jdbc:sybase:Tds:localhost:2638/mydb?SERVICENAME=asademo</config-property>
<config-property name="DriverClass"
type="java.lang.String">com.sybase.jdbc2.jdbc.SybDriver</config-property>
<config-property name="UserName"
type="java.lang.String">dba</config-property>
<config-property name="Password"
type="java.lang.String">sql</config-property>
</properties>
Thanks again.
I'm glad that you know have it working using jConnect. However,
jConnect uses TDS which is not a "native" interface to ASA. You might
consider trying to configure the iAnywhere JDBC driver just to see if it
works. I unfortunately won't have an opportunity to try this
configuration anytime in the near future.
If you do try it, please post back and tell us how it went.
Thanks,
http://www.jboss.org/wiki/Wiki.jsp?page=SetUpASybaseDatasource