2 Replies Latest reply on Nov 5, 2004 1:39 AM by jboss_oops

    JBoss configuration for MS Sql 2000 Connection..

    Chetan Limbachiya Newbie

      Hi !!

      I downloaded the JDBC driver from Microsoft Website and copied to the lib directory and also modified some of the files as i found the doc from the net. Still i m not able to do the connectivity to the ms sql 2000 server.

      anybody did or have any step by step configure then please update me.

      I installed JBoss on Red hat linux 9.0
      JBoss ver. 3.2.5

      awaiting your help.
      Thanks in Advance
      Chetan Limbachiya

        • 1. Re: JBoss configuration for MS Sql 2000 Connection..
          Kabir Khan Master

          Post more details about what files you modified, how you are trying to use the data source and any stack traces

          • 2. Re: JBoss configuration for MS Sql 2000 Connection..
            jboss_oops Newbie

            Hi I am also trying to connect to MS SQL Server 2000. I am running JBOSS 3.2.4
            My Client code is not able to do the JNDI MApping..
            Here Below I am attaching the code which I have in my client code.

            import javax.naming.*;
            import javax.sql.*;
            import java.sql.*;
            import java.io.*;
            import java.util.*;

            class TestJdbcJBoss
            public static void main(String[] args) throws SQLException,IOException,ClassNotFoundException,NamingException
            Hashtable ht=new Hashtable();
            InitialContext ic=new InitialContext(ht);
            DataSource ds=(DataSource)ic.lookup("java:/MSSQLDS");
            Connection conn = ds.getConnection();
            Statement st=conn.createStatement();
            ResultSet rs=st.executeQuery("select * from testbd");

            This the error I am getting when I run my code
            Exception in thread "main" javax.naming.NameNotFoundException: MSSQLDS not bound
            at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
            at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
            at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
            at org.jnp.server.NamingServer.lookup(NamingServer.java:282)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
            at sun.rmi.transport.Transport$1.run(Transport.java:148)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
            at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
            at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
            at java.lang.Thread.run(Thread.java:536)
            at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
            at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
            at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
            at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
            at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:528)
            at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
            at javax.naming.InitialContext.lookup(InitialContext.java:347)
            at TestJdbcJBoss.main(TestJdbcJBoss.java:17)
            I have done all the settings and configuration has given in the below Link

            Please guide me where I am doing wrong..
            what all additional changes I have to do?
            Please do reply
            thanks :)