Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: configuring ASA Datasource with Jboss

2 views
Skip to first unread message

Greg Fenton

unread,
Mar 10, 2005, 2:58:47 PM3/10/05
to
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
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/

us...@domain.invalid

unread,
Mar 10, 2005, 2:42:17 PM3/10/05
to
Hi everyone,

I'm having some difficulty connecting Adaptive Server Anywhere 9 with
JBoss 4. I've copied the JConnect jar file to the jboss \lib directory
and I've also created an xml file for ASA. I think the problem may lie
with my xml file which I've included below, any help would be greatly
appreciated.

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

unread,
Mar 10, 2005, 3:19:59 PM3/10/05
to
Greg Fenton wrote:

> 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)

Greg Fenton

unread,
Mar 10, 2005, 9:40:37 PM3/10/05
to
us...@domain.invalid wrote:
> 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.

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?

Matthew Chestnut

unread,
Mar 11, 2005, 9:11:20 AM3/11/05
to
In JBoss 3, I used the following in my sybase-service.xml file. The
"mydb?" is just a place-holder and, I believe, and be any text.

<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>

abbey

unread,
Mar 13, 2005, 4:13:02 PM3/13/05
to
Hi greg, thanks for your all your help, I finally managed to get
everything to work, I found this document very helpful and might be of
use to anyone else having the same problem.
http://www.onjava.com/pub/a/onjava/2004/02/25/jbossjdbc.html?page=last&x-maxdepth=0

Thanks again.

Greg Fenton

unread,
Mar 13, 2005, 5:19:36 PM3/13/05
to

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,

Matthew Chestnut

unread,
Mar 14, 2005, 9:28:23 AM3/14/05
to
And another location for information...

http://www.jboss.org/wiki/Wiki.jsp?page=SetUpASybaseDatasource

0 new messages