Olivia Jones

Greenhorn
+ Follow
since Feb 12, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Olivia Jones

Hi,
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
("java:comp/env/jdbc/BSCDSN");
Connection connection=ds.getConnection();
return connection;

2. standardjbosscmp-jdbc.xml
<datasource>java:/DefaultDS</datasource>
<datasource-mapping>Hypersonic SQL</datasource-mapping>
3. extract of mssql-ds.xml
<datasources>
<local-tx-datasource>
<jndi-name>MSSQLDS</jndi-name>
<connection-url>jdbc:microsoft:sqlserver://192.168.100.18:1433;DatabaseName=BSCProdServer
</connection-url>
<driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
<user-name>sa</user-name>
<password>sa</password>
4. after deploying mssql-ds.xml(Jboss log)
09:39:06,796 INFO [MainDeployer] Starting deployment of package:
file:/C:/jboss-3.2.3/server/all/deploy/mssql-ds.xml
09:39:06,875 INFO [RARDeployment] Started
jboss.jca:service=ManagedConnectionFactory,name=MSSQLDS
09:39:06,875 INFO [JBossManagedConnectionPool] Started
jboss.jca:service=ManagedConnectionPool,name=MSSQLDS
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:
file:/C:/jboss-3.2.3/server/all/deploy/mssql-ds.xml
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.
20 years ago