Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JBoss MS SQL server connectivity problems  RSS feed

Olivia Jones
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!