• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Urgent help needed : MS-SQL 2K DataSource Configuration

 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi !
Could anyone tell me what are the steps involved in configuring MS-SQL 2K driver in JBoss. These are the steps I have followed :
1. Put the JDBC driver for the database in <jboss-home>/server/default/lib/.
2. Write up the DS file (mssql-ds.xml) containing following contents and copied in <jboss-home>/server/default/deploy :
<datasources>
<local-tx-datasource>
<jndi-name>MSSQLDS</jndi-name>
<connection-url>jdbc:JSQLConnect://192.168.1.12:1433/database=BankAccount/user=sa/password=sa</connection-url>
<driver-class>com.jnetdirect.jsql.JSQLDriver</driver-class>
<user-name>sa</user-name>
<password>sa</password>

<min-pool-size>100</min-pool-size>
<max-pool-size>1000</max-pool-size>
<blocking-timeout-millis>5000</blocking-timeout-millis>
</local-tx-datasource>
</datasources>
3.Edit standardjbosscmp-jdbc.xml.
a) Change the <datasource> with following line :
<datasource>java:/MSSQLDS</datasource>
b) Change the datasource mapping with following line :
<datasource-mapping>MS SQLSERVER2000</datasource-mapping>
Here is the code thru which I'm looking up the datasource :
ctx.lookup("java:/MSSQLDS");
Is there something wrong or Am I missing some step ???
While trying to acquire the datasource , it gives me following exception :
javax.naming.NameNotFoundException: MSSQLDS not bound
Pls. help.
 
Author
Posts: 367
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Some places to start:
Check the server log to see if your datasource is being deployed. Are there any errors? Does it say that it deployed the datasource successfully? (it's not stuck looking for drivers or anything)
If you are having trouble finding the output in the log, wait for the server to come up and then touch the datasource file so it will get redeployed. You'll be able to find the info you need more easily that way.
Do you see it the datasource in the JNDI View in the jmx console? (it should show up under jboss.jca) Does the name look like what you expect?
 
Sam Cala
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I tried deploying mssql-ds.xml and the log displays these errors :
09:17:40,263 INFO [MainDeployer] Starting deployment of package: file:/D:/JBoss
3/server/default/deploy/mssql-ds.xml
09:17:40,279 INFO [MainDeployer] deployment waiting for deployer: file:/D:/JBos
s3/server/default/deploy/mssql-ds.xml
09:17:40,279 INFO [MainDeployer] Deployment of package: file:/D:/JBoss3/server/
default/deploy/mssql-ds.xml is waiting for an appropriate deployer.
09:17:40,279 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean ope
ration 'checkIncompleteDeployments()'
Cause: Incomplete Deployment listing:
Packages waiting for a deployer:
[org.jboss.deployment.DeploymentInfo@40fe3f46 { url=file:/D:/JBoss3/server/defau
lt/deploy/jms/jms-ds.xml }
deployer: null
status: null
state: INIT_WAITING_DEPLOYER
watch: file:/D:/JBoss3/server/default/deploy/jms/jms-ds.xml
lastDeployed: 1061869561513
lastModified: 1061869561498
mbeans:
, org.jboss.deployment.DeploymentInfo@c3e9df4f { url=file:/D:/JBoss3/server/defa
ult/deploy/mssql-ds.xml }
deployer: null
status: null
state: INIT_WAITING_DEPLOYER
watch: file:/D:/JBoss3/server/default/deploy/mssql-ds.xml
lastDeployed: 1061869660279
lastModified: 1061869660263
mbeans:
]Incompletely deployed packages:
[org.jboss.deployment.DeploymentInfo@dc5d0b9a { url=file:/D:/JBoss3/server/defau
lt/deploy/jboss-local-jdbc.rar }
deployer: org.jboss.resource.RARDeployer@ad
status: null
state: FAILED
watch: file:/D:/JBoss3/server/default/deploy/jboss-local-jdbc.rar
lastDeployed: 1061869560904
lastModified: 1061869560732
mbeans:
, org.jboss.deployment.DeploymentInfo@eab91e62 { url=file:/D:/JBoss3/server/defa
ult/deploy/jboss-xa-jdbc.rar }
deployer: org.jboss.resource.RARDeployer@ad
status: null
state: FAILED
watch: file:/D:/JBoss3/server/default/deploy/jboss-xa-jdbc.rar
lastDeployed: 1061869561138
lastModified: 1061869560998
mbeans:
, org.jboss.deployment.DeploymentInfo@57e458f2 { url=file:/D:/JBoss3/server/defa
ult/deploy/jms/jms-ra.rar }
deployer: org.jboss.resource.RARDeployer@ad
status: null
state: FAILED
watch: file:/D:/JBoss3/server/default/deploy/jms/jms-ra.rar
lastDeployed: 1061869561388
lastModified: 1061869561232
mbeans:
, org.jboss.deployment.DeploymentInfo@40fe3f46 { url=file:/D:/JBoss3/server/defa
ult/deploy/jms/jms-ds.xml }
deployer: null
status: null
state: INIT_WAITING_DEPLOYER
watch: file:/D:/JBoss3/server/default/deploy/jms/jms-ds.xml
lastDeployed: 1061869561513
lastModified: 1061869561498
mbeans:
, org.jboss.deployment.DeploymentInfo@c3e9df4f { url=file:/D:/JBoss3/server/defa
ult/deploy/mssql-ds.xml }
deployer: null
status: null
state: INIT_WAITING_DEPLOYER
watch: file:/D:/JBoss3/server/default/deploy/mssql-ds.xml
lastDeployed: 1061869660279
lastModified: 1061869660263
mbeans:
]MBeans waiting for classes:
<none>
MBeans waiting for other MBeans:
[ObjectName: jboss.jca:service=ConnectionFactoryDeployer
state: FAILED
I Depend On:
Depends On Me: javax.xml.transform.TransformerConfigurationException: javax.xml
.transform.TransformerException: javax.xml.transform.TransformerException: Fail
ed calling setMethod method, ObjectName: jboss.mq:service=InvocationLayer,type=H
TTP
state: CONFIGURED
I Depend On: jboss.mq:service=Invoker
jboss.web:service=WebServer
Depends On Me: , ObjectName: jboss.mq.destination:service=Topic,name=testTopic
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Topic,name=securedTop
ic
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Topic,name=testDurabl
eTopic
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=testQueue
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=A
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=B
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=C
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=D
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=ex
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=JVM
state: CONFIGURED
I Depend On: jboss.mq:service=Invoker
Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=RMI
state: CONFIGURED
I Depend On: jboss.mq:service=Invoker
Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=OIL
state: CONFIGURED
I Depend On: jboss.mq:service=Invoker
Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=UIL
state: CONFIGURED
I Depend On: jboss.mq:service=Invoker
Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=OIL2
state: CONFIGURED
I Depend On: jboss.mq:service=Invoker
Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=UIL2
state: CONFIGURED
I Depend On: jboss.mq:service=Invoker
Depends On Me: , ObjectName: jboss.mq:service=Invoker
state: CONFIGURED
I Depend On: jboss.mq:service=TracingInterceptor
Depends On Me: jboss.mq:service=InvocationLayer,type=HTTP
jboss.mq:service=InvocationLayer,type=JVM
jboss.mq:service=InvocationLayer,type=RMI
jboss.mq:service=InvocationLayer,type=OIL
jboss.mq:service=InvocationLayer,type=UIL
jboss.mq:service=InvocationLayer,type=OIL2
jboss.mq:service=InvocationLayer,type=UIL2
, ObjectName: jboss.mq:service=TracingInterceptor
state: CONFIGURED
I Depend On: jboss.mq:service=SecurityManager
Depends On Me: jboss.mq:service=Invoker
, ObjectName: jboss.mq:service=SecurityManager
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
Depends On Me: jboss.mq.destination:service=Topic,name=testTopic
jboss.mq.destination:service=Topic,name=securedTopic
jboss.mq.destination:service=Topic,name=testDurableTopic
jboss.mq.destination:service=Queue,name=testQueue
jboss.mq:service=TracingInterceptor
jboss.mq.destination:service=Queue,name=DLQ
, ObjectName: jboss.mq:service=DestinationManager
state: CONFIGURED
I Depend On: jboss.mq:service=PersistenceManager
jboss.mq:service=StateManager
Depends On Me: jboss.mq.destination:service=Topic,name=testTopic
jboss.mq.destination:service=Topic,name=securedTopic
jboss.mq.destination:service=Topic,name=testDurableTopic
jboss.mq.destination:service=Queue,name=testQueue
jboss.mq.destination:service=Queue,name=A
jboss.mq.destination:service=Queue,name=B
jboss.mq.destination:service=Queue,name=C
jboss.mq.destination:service=Queue,name=D
jboss.mq.destination:service=Queue,name=ex
jboss.mq:service=SecurityManager
jboss.mq.destination:service=Queue,name=DLQ
, ObjectName: jboss.mq:service=PersistenceManager
state: CONFIGURED
I Depend On: jboss.mq:service=MessageCache
jboss.jca:service=LocalTxCM,name=DefaultDS
Depends On Me: jboss.mq:service=DestinationManager
, ObjectName: jboss.mq.destination:service=Queue,name=DLQ
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
Depends On Me: ]

Pls. help ! Whats the problem ? How should I proceed ?
 
norman richards
Author
Posts: 367
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Great. So, now you know you have a deployment problem, not a lookup problem like you originally posted.
The next step to debugging the problem should be to get rid of everything except the problem. First, undeploy your application and remove the changes to standardjbocsscmp-jdbc.xml. You really don't want to edit that file anyways. I recommend putting the default datasource definitions in the jbosscmp-jdbc.xml file in your ejb jar. Regardless, of your final decision, back out the change now as it is only causing the other problems to be magnified.
You should be left with only a base install and your datasource xml file. Removing the datasource file should allow the server, come up without errors, right? (if not, go back and see what else you changed or revert to a fresh install and work forward again)
Assuming you've done all that, you'll still have a problem when you deploy your file. Look at this line:

Deployment of package: file:/D:/JBoss3/server/
default/deploy/mssql-ds.xml is waiting for an appropriate deployer.


Everything that gets deployed has to have a deployer. WARs, EARs, datasources, etc... This is telling you that none of the deployers installed knows how to deal with a ds.xml. This most likely indicates that you are on JBoss 3.0.x and not 3.2.x. The ds.xml files were added in 3.2. You need a normal -service.xml for 3.0.
If this is the case, look in your docs/examples/jca directory for some samples. The jsql-service.xml might be a good one to base yours off of...
 
Sam Cala
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Believe me Norman - I'm frustrated now...
I had JBoss 3.2.1 and was using *-ds.xml files. When I wasnt able to get Datasource working on 3.2.1, I switched to 3.0.2 and tried *-service.xml files.
Though with 3.0.2 and *-service.xml files, I was able to see the following lines at http://localhost:8080/jmx-console/index.jsp :
name=msSQLDS,service=LocalTxCM
name=msSQLDS,service=LocalTxDS
name=msSQLDS,service=LocalTxPool
These lines, according to me , indicates that my DataSource named 'msSQLDS' has been registered. But unfortunately I'm not being able to get datasource from my EJB (BMP) by saying :
javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup("java:comp/msSQLDS");
I have also tried using "java:msSQLDS" and "java:env/msSQLDS".
Also , I tried :
Enumeration enum = ctx.list("/");
while (enum.hasMoreElements())
System.out.println(" -- " + enum.nextElement() );
which prints all other namings except msSQLDS (though it is getting printed in jmx-console) :
14:30:09,655 INFO [STDOUT] -- UIL2XAConnectionFactory: org.jboss.mq.SpyXAConn
ctionFactory
14:30:09,655 INFO [STDOUT] -- topic: org.jnp.interfaces.NamingContext
14:30:09,655 INFO [STDOUT] -- jmx:vkhattar:rmi: org.jboss.jmx.adaptor.rmi.RMI
daptorImpl
14:30:09,655 INFO [STDOUT] -- queue: org.jnp.interfaces.NamingContext
14:30:09,655 INFO [STDOUT] -- ConnectionFactory: org.jboss.mq.SpyConnectionFa
tory
14:30:09,655 INFO [STDOUT] -- RMIConnectionFactory: org.jboss.mq.SpyConnectio
Factory
14:30:09,655 INFO [STDOUT] -- UserTransaction: org.jboss.tm.usertx.client.Cli
ntUserTransaction
14:30:09,655 INFO [STDOUT] -- ejb: org.jnp.interfaces.NamingContext
14:30:09,655 INFO [STDOUT] -- invokers: org.jnp.interfaces.NamingContext
14:30:09,655 INFO [STDOUT] -- jmx: org.jnp.interfaces.NamingContext
14:30:09,655 INFO [STDOUT] -- UILXAConnectionFactory: org.jboss.mq.SpyXAConne
tionFactory
14:30:09,655 INFO [STDOUT] -- AccountBean: $Proxy30
14:30:09,655 INFO [STDOUT] -- UILConnectionFactory: org.jboss.mq.SpyConnectionFactory
Pls. Help.
 
Sam Cala
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Norman,
I'm posting relevant code here, pls. try helping...
ejb-jar.xml
<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<enterprise-beans>
<entity>
<description>Entity Bean ( BMP )</description>
<display-name>AccountBean</display-name>
<ejb-name>AccountBean</ejb-name>
<home>encompass.interfaces.AccountHome</home>
<remote>encompass.interfaces.Account</remote>
<ejb-class>encompass.ejb.AccountBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>encompass.ejb.AccountPK</prim-key-class>
<reentrant>False</reentrant>
<resource-ref>
<res-ref-name>msSQLDS</res-ref-name>
<jndi-name>msSQLDS</jndi-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</entity>
</enterprise-beans>
</ejb-jar>

jboss.xml
<?xml version = '1.0' encoding = 'windows-1252'?>
<jboss>
<enterprise-beans>
<entity>
<ejb-name>AccountBean</ejb-name>
<resource-ref>
<res-ref-name>msSQLDS</res-ref-name>
<resource-name>AccountDBResource</resource-name>
</resource-ref>
</entity>
<resource-managers>
<resource-manager>
<res-name>AccountDBResource</res-name>
<res-jndi-name>msSQLDS</res-jndi-name>
</resource-manager>
</resource-managers>
</enterprise-beans>
</jboss>

mssqldb-service.xml
<?xml version="1.0" encoding="UTF-8"?>
<server>
<mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" name="jboss.jca:service=LocalTxCM,name=msSQLDS">
<depends optional-attribute-name="ManagedConnectionFactoryName">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=msSQLDS">
<attribute name="JndiName">msSQLDS</attribute>
<attribute name="ManagedConnectionFactoryProperties">
<properties>
<config-property name="ConnectionURL" type="java.lang.String">jdbc:JSQLConnect://localhost:1433/databaseName=BankAccount</config-property>
<config-property name="DriverClass" type="java.lang.String">com.jnetdirect.jsql.JSQLDriver</config-property>
<config-property name="UserName" type="java.lang.String">sa</config-property>
<config-property name="Password" type="java.lang.String">sa</config-property>
</properties>
</attribute>
<depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper</depends>
</mbean>
</depends>
<depends optional-attribute-name="ManagedConnectionPool">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=msSQLDS">
<attribute name="MinSize">0</attribute>
<attribute name="MaxSize">50</attribute>
<attribute name="BlockingTimeoutMillis">5000</attribute>
<attribute name="IdleTimeoutMinutes">15</attribute>
<attribute name="Criteria">ByContainer</attribute>
</mbean>
</depends>
<depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
<depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
<attribute name="TransactionManager">java:/TransactionManager</attribute>
<!--make the rar deploy! hack till better deployment-->
<depends>jboss.jca:service=RARDeployer</depends>
</mbean>
</server>
login-config.xml
<application-policy name = "msSQLDS">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
<module-option name = "principal">sa</module-option>
<module-option name = "userName">sa</module-option>
<module-option name = "password">sa</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=msSQLDS</module-option>
</login-module>
</authentication>
</application-policy>

EJB (BMP)
Context ctx = new InitialContext(System.getProperties());
javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup("java:msSQLDS");
Pls. advise if I hv made anything wrong or if some additional step needs to be taken.
Rgds,
 
Sam Cala
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I must mention that on JBoss startup, I'm also getting following exceptions :
1.
element; - nested throwable: (java.lang.IllegalAccessException: Class java.lang.reflect.Method can not access a member of class org.jboss.resource.RARMetaData wi
th modifiers "private"))
at org.jboss.resource.RARDeployer.init(RARDeployer.java:148)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:679)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:615)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591)
at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
2.
15:00:28,472 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean ope
ration 'checkIncompleteDeployments()'
Cause: Incomplete Deployment listing:
Packages waiting for a deployer:
<none>
Incompletely deployed packages:
[org.jboss.deployment.DeploymentInfo@dc5d0b9a { url=file:/D:/JBoss3/server/defau
lt/deploy/jboss-local-jdbc.rar }
deployer: org.jboss.resource.RARDeployer@88
status: null
state: FAILED
watch: file:/D:/JBoss3/server/default/deploy/jboss-local-jdbc.rar
lastDeployed: 1061976625206
lastModified: 1061976625159
mbeans:
, org.jboss.deployment.DeploymentInfo@eab91e62 { url=file:/D:/JBoss3/server/defa
ult/deploy/jboss-xa-jdbc.rar }
deployer: org.jboss.resource.RARDeployer@88
status: null
state: FAILED
watch: file:/D:/JBoss3/server/default/deploy/jboss-xa-jdbc.rar
, org.jboss.deployment.DeploymentInfo@d7100093 { url=file:/D:/JBoss3/server/defa
ult/deploy/jms-ra.rar }
deployer: org.jboss.resource.RARDeployer@88
status: null
state: FAILED
watch: file:/D:/JBoss3/server/default/deploy/jms-ra.rar
lastDeployed: 1061976625425
lastModified: 1061976625409
Depends On Me: , ObjectName: jboss.jca:service=XaTxDS,name=jmsra
state: CONFIGURED
I Depend On: jboss.jca:service=RARDeployment,name=JMS Adapter
Depends On Me: jboss.jca:service=XaTxCM,name=jmsra
, ObjectName: jboss.jca:service=LocalTxCM,name=msSQLDS
state: CONFIGURED
I Depend On: jboss.jca:service=LocalTxDS,name=msSQLDS
jboss.jca:service=LocalTxPool,name=msSQLDS
jboss.jca:service=CachedConnectionManager
jboss.security:service=JaasSecurityManager
jboss.jca:service=RARDeployer
Depends On Me: , ObjectName: jboss.jca:service=LocalTxDS,name=msSQLDS
state: CONFIGURED
I Depend On: jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC
Wrapper
jboss:service=Hypersonic
Depends On Me: jboss.jca:service=LocalTxCM,name=msSQLDS
]
15:00:28,472 INFO [URLDeploymentScanner] Started
15:00:28,472 INFO [MainDeployer] Deployed package: file:/D:/JBoss3/server/defau
lt/conf/jboss-service.xml
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Norman,
I have a similar problem to the one described here, only I don't get any problem when deploying.
I am using JBoss 3.2.3, SQL Server 2000, jdk 1.4.
The service is deployed, no errors in jboss.jca or in the console window:
name=MSSQLDS,service=LocalTxCM
but I get the same not bound error:
javax.naming.NameNotFoundException: MSSQLDS not bound

here's my jbosscmp-jdbc.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jbosscmp-jdbc PUBLIC
"-//JBoss//DTD JBOSSCMP-JDBC 3.2//EN"
"http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_2.dtd">
<jbosscmp-jdbc>
<defaults>
<datasource>java:/MSSQLDS</datasource>
<datasource-mapping>MS SQLSERVER2000</datasource-mapping>
<create-table>false</create-table>
<remove-table>false</remove-table>
<read-only>false</read-only>
<read-time-out>300000</read-time-out>
<row-locking>false</row-locking>
</defaults>
</jbosscmp-jdbc>
contents of mssql-ds.xml in D:\jboss-3.2.3\server\default\deploy directory:
<datasources>
<local-tx-datasource>
<jndi-name>MSSQLDS</jndi-name>
<connection-url>jdbc:microsoft:sqlserver://A5102:1433;DatabaseName=pubs</connection-url>
<driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
<user-name>jdbc_user</user-name>
<password>jdbc_user</password>
</local-tx-datasource>
</datasources>

and the call
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
env.put(Context.PROVIDER_URL, "localhost:1099");
env.put("java.naming.factory.url.pkgs",
"org.jboss.naming rg.jnp.interfaces");
//initialContext = new InitialContext();
initialContext = new InitialContext(env);
// look up Employee EJB using given JNDI name
Object homeObject = initialContext.lookup("java:/MSSQLDS");
// get EmployeeHome interface
employeeHome = (EmployeeHome)PortableRemoteObject.narrow(
homeObject, EmployeeHome.class);
Please help! If you need some more info on the problem, please let me know.
Thank you,
Anatoli
[ February 23, 2004: Message edited by: Anatoli Titarev ]
CLASSPATH:
D:\j2sdk1.4.0\lib\tools.jar;D:\jboss-3.2.3\client\jboss-j2ee.jar;D:\j2sdk1.4.0\lib\ext\jndi.
jar;D:\j2sdk1.4.0\lib\ext\fscontext.jar;D:\j2sdk1.4.0\lib\ext\providerutil.jar;D:\Anatoli\Java\Microsoft SQL Server 2000
Driver for JDBC\lib\msbase.jar;D:\Anatoli\Java\Microsoft SQL Server 2000 Driver for JDBC\lib\mssqlserver.jar;D:\Anatoli
\Java\Microsoft SQL Server 2000 Driver for JDBC\lib\msutil.jar;D:\jboss-3.2.3\client\log4j.jar;D:\jboss-3.2.3\client\jbo
ss-common-client.jar;D:\jboss-3.2.3\client\jbossall-client.jar;D:\jboss-3.2.3\client\jboss-client.jar;D:\jboss-3.2.3\cli
ent\jnet.jar
[ February 23, 2004: Message edited by: Anatoli Titarev ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic