Trying to add JNDI entry in JBoss

J

jo

i have followed the instructions on the following url. But I still
could not create a JNDI entry that points to my local MSSQL Server DB.

http://forum.java.sun.com/thread.jspa?threadID=626778&tstart=-1

I received the following error message after i start up JBoss. Any idea
what is missing or what i have done wrong? I can see
RARDeployment.class is inside jboss-jcs.sar in a path that is the same
as ManagedConnectionPool.class. And ManagedConnectionPool seems to be
installed and configured ok.

The JBoss version is 3.2.4

Thanks,
Jo

==================
10:44:47,125 ERROR [URLDeploymentScanner] Incomplete Deployment
listing:
Packages waiting for a deployer:
org.jboss.deployment.DeploymentInfo@8aa6a5fb {
url=file:/C:/jboss-3.2.4-pav/server/default/deploy/jboss-web.xml }
deployer: null
status: null
state: INIT_WAITING_DEPLOYER
watch: file:/C:/jboss-3.2.4-pav/server/default/deploy/jboss-web.xml
lastDeployed: 1128980687110
lastModified: 1128980687110
mbeans:

Incompletely deployed packages:
org.jboss.deployment.DeploymentInfo@8aa6a5fb {
url=file:/C:/jboss-3.2.4-pav/server/default/deploy/jboss-web.xml }
deployer: null
status: null
state: INIT_WAITING_DEPLOYER
watch: file:/C:/jboss-3.2.4-pav/server/default/deploy/jboss-web.xml
lastDeployed: 1128980687110
lastModified: 1128980687110
mbeans:

MBeans waiting for other MBeans:
ObjectName: jboss.jca:service=LocalTxCM,name=MSSQLDS
state: CONFIGURED
I Depend On: jboss.jca:service=ManagedConnectionPool,name=MSSQLDS
jboss.jca:service=CachedConnectionManager
jboss:service=TransactionManager

Depends On Me:
ObjectName: jboss.jca:service=ManagedConnectionPool,name=MSSQLDS
state: CONFIGURED
I Depend On: jboss.jca:service=ManagedConnectionFactory,name=MSSQLDS

Depends On Me: jboss.jca:service=LocalTxCM,name=MSSQLDS

ObjectName: jboss.jca:service=ManagedConnectionFactory,name=MSSQLDS
state: CONFIGURED
I Depend On: jboss.jca:service=RARDeployment,name=JBoss
LocalTransaction JDBC Wrapper

Depends On Me: jboss.jca:service=ManagedConnectionPool,name=MSSQLDS


MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM:
ObjectName: jboss.jca:service=RARDeployment,name=JBoss LocalTransaction
JDBC Wrapper
state: NOTYETINSTALLED
I Depend On:
Depends On Me:
jboss.jca:service=ManagedConnectionFactory,name=MSSQLDS
=====================
 
J

Jon Martin Solaas

jo said:
i have followed the instructions on the following url. But I still
could not create a JNDI entry that points to my local MSSQL Server DB.

http://forum.java.sun.com/thread.jspa?threadID=626778&tstart=-1

I received the following error message after i start up JBoss. Any idea
what is missing or what i have done wrong? I can see
RARDeployment.class is inside jboss-jcs.sar in a path that is the same
as ManagedConnectionPool.class. And ManagedConnectionPool seems to be
installed and configured ok.

The JBoss version is 3.2.4

Try to use the mssql-ds.xml example file that comes with your version of
JBoss and not one that is for jboss 4 and mysql.
 
J

jo

Jon,

I've copied the mssql-ds.xml from the original JBoss 3.2.4 package to
JBossHome\server\default\deploy, modified the DB name and login info.
After stop and start of JBoss, I still get the same error message. Any
clues?

Thanks,
Jo
 
J

Jon Martin Solaas

jo said:
Jon,

I've copied the mssql-ds.xml from the original JBoss 3.2.4 package to
JBossHome\server\default\deploy, modified the DB name and login info.
After stop and start of JBoss, I still get the same error message. Any
clues?

Thanks,
Jo

Make sure the driver class specified in msssql-ds.xml actually exist
inside the driver jar you have installed in the lib directory of jboss.

Try to start jboss with neither mssql-ds.xml nor your app. deployed.
Then, while jboss runs, deploy the mssql-ds.xml first (just copy into
the deploy dir.). What happens? If no error messages, deploy the app.
This will help you figure out if it's the datasource definition that is
wrong, or something in your application.

Also, if you post your xml-files, someone may see what's wrong.

Finally; Which jdbc-driver for MSSQL-server are you actually using?
Several versions exist, are you sure the example datasource xml file is
for your exact driver implementation (iNet, Microsoft etc. etc. ...)
 
J

jo

I am sure the driver class jar file is in the lib directory. The
crystal reports that I created can connect to SQLServer2000 DB both
from the JBoss Application and from within Crystal Report by using JDBC
URL. The trouble is I need to change the connection from JDBC url to
JNDI, so the connection info won't need to be hardcoded into crystal or
the app.
Following your suggestions. I moved both the app and mssql-ds.xml out
of JBoss folder and run it, it starts fine. Then I move mssql-ds.xml
back to jboss\server\default\deploy and the same error message appears
(RARDeployment NOTYETINSTALLED).So I guess it has nothing to do with
the app.
The driver I use is called JTDS (filename jtds-1.1.jar,
http://jtds.sourceforge.net/). My xml file content is listed below.
I used the mssql-ds.xml from jboss as a template, modified
"connection-url", "driver-class", "user-name" and "password".

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

<!--
=====================================================================
-->
<!--
-->
<!-- JBoss Server Configuration
-->
<!--
-->
<!--
=====================================================================
-->

<!-- $Id: mssql-ds.xml,v 1.1.1.1 2004/06/15 17:52:39 hzhang Exp $ -->

<!--
======================================================================-->
<!-- New ConnectionManager setup for Microsoft SQL Server 2000
driver -->
<!-- You may download the latest Microsoft JDBC driver from
*Microsoft* -->
<!--
http://msdn.microsoft.com/downloads...S/027/001/779/msdncompositedoc.xml&frame=true
-->
<!--
=====================================================================
-->

<datasources>
<local-tx-datasource>

<jndi-name>MSSQLDS</jndi-name>

<connection-url>jdbc:jtds:sqlserver://consolereporting/my_db;instance=my_instance;user=x;password=y</connection-url>
<driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>
<user-name>x</user-name>
<password>y</password>
<!-- 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>
-->

</local-tx-datasource>

</datasources>
===========================

Note:
- consolereporting is defined in host file as my current IP address.
- I've used the same connection-url and driver-class text in my crystal
reports and they works fine. So I am pretty sure they are correct.


Thanks,
Jo
 
J

jo

I just downloaded JBoss 3.2.5 (zip) and simply unzipped into C:\, and
run. No modification at all. It runs ok. Then I drop the mssql-ds.xml
into the deploy folder and It is taking well. I check jmx-console
JNDIView.list() and the entry is there.

So everything seems to be in order even though i haven't copy any JTDS
driver to this deployment at all.

It proved that the mssql-ds.xml is probably correct and something is
missing in the JBoss 3.2.4 deployment. I am aware of the 3.2.4
deployment is being customised by the rest of the dev team. So things
could be missing from deployment. Is there anyway I can tell what is
missing (should have been deployed)? I think it must be some standard
library or xml files (certainly won't be the driver).

Cheers,
Jo
 
J

jo

Jon,

After some triaI and error, I think I've found the missing files. They
are
jboss-common-jdbc-wrapper.jar in JBoss\Server\Default\Lib
jboss-local-jdbc.rar in JBoss\Server\Default\Deploy

Thank you very much for your help =D
Jo
 
J

Jon Martin Solaas

jo said:
Jon,

After some triaI and error, I think I've found the missing files. They
are
jboss-common-jdbc-wrapper.jar in JBoss\Server\Default\Lib
jboss-local-jdbc.rar in JBoss\Server\Default\Deploy

They sound somewhat relevant to your problem ... :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top