It's not a secret anymore!
The moose likes JBoss/WildFly and the fly likes JBoss MS SQL server connectivity problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss MS SQL server connectivity problems" Watch "JBoss MS SQL server connectivity problems" New topic

JBoss MS SQL server connectivity problems

Olivia Jones

Joined: Feb 12, 2004
Posts: 1
I am a new user of Jboss and currently working on an EJB based application on JBoss 3.2.3 with MS SQL server. I have been successful in deploying EJBs. But my problem is that I am not able to establish database connectivity. Could any of you please help me.
Here are the relevant details.
1.extract of the program to get connection:
import javax.naming.InitialContext;
import javax.sql.DataSource;
import java.sql.Connection;
InitialContext initctx=new InitialContext();
DataSource ds=(DataSource) initctx.lookup
Connection connection=ds.getConnection();
return connection;

2. standardjbosscmp-jdbc.xml
<datasource-mapping>Hypersonic SQL</datasource-mapping>
3. extract of mssql-ds.xml
4. after deploying mssql-ds.xml(Jboss log)
09:39:06,796 INFO [MainDeployer] Starting deployment of package:
09:39:06,875 INFO [RARDeployment] Started
09:39:06,875 INFO [JBossManagedConnectionPool] Started
09:39:06,921 INFO [MSSQLDS] Bound connection factory for resource adapter for ConnectionManager
'jboss.jca:service=LocalTxCM,name=MSSQLDS to JNDI name 'java:/MSSQLDS'
09:39:06,921 INFO [TxConnectionManager] Started jboss.jca:service=LocalTxCM,name=MSSQLDS
09:39:06,937 INFO [MainDeployer] Deployed package:
5.But during start up, the following error message is shown:
Depends On Me: org.jboss.deployment.DeploymentException: Error: can't find datasource:
java:/DefaultDS; - nested throwable: (javax.naming.NameNotFoundExceptio
: DefaultDS not bound)]
After I input information in the Login page of my application, I do not see any message in the Jboss log confirming JDBC connection being established. The application displays a customized an error message instead.
Any help in this regard is highly appreciated.
Thank You.
I agree. Here's the link:
subject: JBoss MS SQL server connectivity problems
It's not a secret anymore!