Can't connect to MSSQL using jdbc type 4

My settings in the server are the followings:
Data source class name : com.microsoft.jdbc.sqlserver.SQLServerDriver
Resource Type: javax.sql.DataSource
And in the properties, i have added
DatabaseName: jdbc:microsoft:sqlserver://SQL_SERVER:1433;DatabaseName=Borrar
Because i have downloaded the jdbc driver type 4 sp3 from microsoft site, in the AppSrv-->JVM Settings --> Path Settings -->Classpath Suffix I have the following:
C:/Sun/AppServer/pointbase/lib/pbclient.jar
C:/Sun/AppServer/pointbase/lib/pbembedded.jar
C:/Sun/AppServer/domains/domain1/lib/classes/msbase.jar
C:/Sun/AppServer/domains/domain1/lib/classes/msutil.jar
C:/Sun/AppServer/domains/domain1/lib/classes/mssqlserver.jar
Using this configuration, when i press the button "Ping" when i'm configurating the connection pool, i have this message:
" An error has occurred.
Operation 'pingConnectionPool' failed in 'resources' Config Mbean. "
Anyone can help me ??

Since nobody posted the solution and I happened to found one, I want to contribute with the following information. Hope this helps:
In order to create a connection pool for MSSQLServer
you have to:
1. Copy these files to the lib carpet inside domains/domain/DOMAIN_NAME/:
mssqlserver.jar,
msutil.jar,
msbase.jar.
You can find them in www.microsoft as a single package. Just look for JDBC Driver.
2. In the administrator console of the AppServer, go to:
Application Server -> JVM Settings -> Path Settings -> Classpath Suffix -> , and right there add the path for the previous files.
Press 'Save' and restart the server.
3. Go to JDBC -> Connection Pools -> New...
Resource Type: javax.sql.DataSource'
Database vendor: (none) (Dont select anything here).
Press Next.
4. In the field for Datasource ClassName, add
com.microsoft.jdbcx.sqlserver.SQLServerDataSource
(Here is where I`ve been having problems. I used to put com.microsoft.sqlserver.SQLServerDriver).
5. The way to find out that the server found de library is through the attributes. You have to see exactly, among others:
DatabaseName, SelectMethod, Password, User, PortNumber,ServerName.
If you see: Port. It means the path to the library is wrong.
6. Inform exactly the previous fields:
DatabaseName= yourDBName
SelectMethod=cursor
Password=yourDBPassword
User=yourDBUser
PortNumber=1433
ServerName=yourServerName
7. That�s it. Press finish. and then select the connection you just created and hit ping. You shouldnt see the annoying message about some "MBEAN bla bla bla".
Good luck. Greetings from Costa Rica.

Similar Messages

  • Help: Connecting Tomcat to CA-IDMS Using JDBC Type 4 Drivers (JNDI)

    Hi there,
    I have a rather interesting / complex problem......creating a connection to CA-IDMS from Tomcat using JDBC type 4 drivers (CA provide the type 4 driver).
    We have a zSeries 9 IBM mainframe running CA-IDMS r16.1, and I need to connect to the IDMS from Tomcat (running on Linux) using the JDBC Type 4 drivers provided by CA.
    At this stage I am struggling with the actual setup and configuration of Tomcat’s server.xml and web.xml files. These are the files where the JDBC configuration is set (I think). I have to setup the CA-IDMS part of the configuration, but that is a different problem. Basically there is a TCP/IP listener on the IDMS, waiting for incoming connections from the JDBC type 4 driver.
    I set up a Tomcat to MySQL connection using MySQL Connector / J, which is a similar kind of process to what I am trying to achieve with IDMS. MySQL connector / J came with a jar file which is placed in Tomcat’s lib folder, and then the JDBC setup for the web application is created in Tomcat's server.xml and web.xml files. You can then connect to the MySQL database using JSP and the configured JDBC driver / connection. The CA-IDMS Server comes with an idmsjdbc.jar file, which I think is the JDBC typr 4 driver. I think it needs to be placed in the Tomcat /lib folder, but I don’t know how to set up the configuration.
    There is a JDBC DriverManager which allows JDBC drivers to connect to CA-IDMS. The DriverManager recognises the following syntax:
    jdbc:idms://hostname:port/database
    This allows the JDBC driver running within Tomcat to connect to the IDMS which is running on the IDM mainframe. CA IDMS r16 supports direct connections from the Type 4 JDBC driver to the Central Version on IDMS. "hostname" is the DNS name or IP address of the machine where the CV is running, and "port" is the IP port that was specified for the listener PTERM (setup on the IDMS side).
    There is a caidms.properties file for the JDBC driver, which is used to specify user ID, password, and optional accounting information. It can also be used to specify physical connection information, allowing an application to connect to a CA-IDMS database without requiring the definition of an ODBC style data source. However, I don’t know where to place this file within the Tomcat setup.
    There is also an IdmsDataSource class. I don’t know where to configure this or how to set it up; the CA-IDMS Server manual states the following:
    This class implements the JDBC DataSource interface. It is used with an application server (Tomcat) providing Java Naming and Directory Interface (JNDI) naming service to establish a connection to a CA IDMS database. IdmsDataSource properties conform to the Java Beans naming conventions and are implicitly defined by public “setter” and “getter” methods. For example, the “description” property, which is required for all DataSource implementations, is set using the setDescription(String) method. The application server may use the java.lang.reflection methods to discover DataSource properties and provide an interface to set them, or may simply require that they are defined in some configuration file. IdmsDataSource properties are used to specify the connection parameters. These properties are the equivalent of the DriverPropertyInfo attributes described in the previous section and can be used to completely define the parameters needed to connect to a database. Like a URL, an IdmsDataSource object can also reference an “ODBC” style data source name, where the connection parameters are defined in the configuration file on Linux.
    Is there anyone that can try to point me in the right direction to setting up the JDBC connection? I am totally new to Java and so the instructions are not making much sense at the moment. Any help, hints, tips…..anything will be greatly appreciated as I have just hit a brick wall here. I can't find much to do with setting up the CA-IDMS Server JDBC type 4 driver online either....if anyone can point me to some resources that would also be extremely useful.
    Kind regards
    Jp

    You say you've managed to get the JDBC driver working
    in an application but not in a JSP. You also say that
    the error you get is
    "com.microsoft.jdbc.sqlserver.SQLServerDriver".
    I'd be willing to bet that the exception that you have
    got is a ClassNotFoundException. I.E. your application
    server hasn't found the JDBC driver classes. The
    application server probably doesn't use your current
    CLASSPATH to look for classes. It will be setup within
    the application server in some way and you'll need to
    check your app server documentation to see how it is
    done.
    Try replacing
    e.printStackTrace();with
    e.printStackTrace(out);to get a full stack trace of your error.
    ColTried it. Got this error when I tried to run the JSP.
    Incompatible type for method. Can't convert javax.servlet.jsp.JspWriter to java.io.PrintWriter.
              e.printStackTrace(out);
    I'm currently using Apache Tomcat 4.0.3 as my JSP/Servlet Container.
    I'm also using Type 4 MS SQL Server 2000 JDBC driver version 2.0 on my NT4.0 Server.
    Do I need to set my JDBC driver in my container? if so, how do I do that?

  • Connecting to Oracle using JDBC

    Hi all,
    I am a new to Oracle. I am trying to connect to Oracle using JDBC
    The URL with which I tried to connect was:
    jdbc:oracle:oci8:@myServiceName,user='myLogin',password='myPassword'
    I get an error (ORA-12154)
    - TNS could not resolve service name
    When I use the same userid, password and service and connect thru' SQL*Plus it goes thru'. Is there any parameter which I am missing. Can anyone throw some light on this. I am held up with this issue badly.
    Thanks for all your help and time.
    Regards,
    Latha

    Hi Latha,
    Please try to use thin and add port number.
    m_conn = DriverManager.getConnection("jdbc:oracle:thin:@" + hostURL + ":" + port + ":" + database, user, password);
    Hong
    null

  • Can I connect multiple displays using a mac mini

    Can I connect 2 displays using the mac mini? If so, are there any accessories that I need? Are there certain monitors or connections that I should use?

    Hello,
    Assuming this is a 2012 Mini...
    2nd Display Support:
    Dual/Mirroring*
    2nd Max. Resolution:
    2560x1600*
    Details:
    *This model simultaneously supports 1920x1200 on an HDMI or a DVI display (using the included HDMI-to-DVI adapter) and 2560x1600 on a Thunderbolt or Mini DisplayPort display or even a VGA display (with an optional Mini DisplayPort-to-VGA adapter, which is compatible with the Thunderbolt port).
    http://www.everymac.com/systems/apple/mac_mini/specs/mac-mini-core-i7-2.6-late-2 012-specs.html
    If you need more...
    http://eshop.macsales.com/item/NewerTech/VIDU3HDMIDV/
    http://eshop.macsales.com/item/NewerTech/VIDU2DVIA/

  • Ipad2 -can i connect to internet  using a data card

    ipad2 -can i connect to internet  using a data card

    This article:
    http://edcommunity.apple.com/ali/story.php?itemID=18585&version=6330&pageID=1582 9
    depending on your experience level should tell you all you need to know.
    You don't need mobile me, you just need to know your mac's ip and have vnc
    client software of some sort running on the machine you are travelling with.
    Read the entire article, as once you get past the part about monitoring multiple machines there is some useful info.

  • Problem:I can't get oracle MajorVersion using jdbc in 9.2.0.1.0!

    I can't get oracle MajorVersion using jdbc in 9.2.0.1.0,how can i do and how many oracl version can't get MajorVersion?
    thanks,erveryone! online waiting

    What errors are you getting? Can you post the codew you are using to get MajorVersion.

  • Help !! I can't connect to server using connection manager

    Hello :
    i hava three machine,i use connection manager on Oracle 8.1.7
    i can't connect to server using connection manager
    1.lsnrctl start (Server)
    2.svmrgrl (Server)
    start (Server)
    3.cmctl start (Middle tier)
    4.sqlplus scott/tiger@test (client)
    ORA-12564
    Please help my!
    ---- CLIENT (sqlnet.ora)
    USE_CMAN = TRUE
    NAMES.DIRECTORY_PATH= (TNSNAMES)
    ---- CLIENT (tnsname.ora)
    (DESCRIPTION =
    (SOURCE_ROUTE = YES)
    (ADDRESS = (PROTOCOL = TCP)(HOST = orcl-middler)(PORT = 1610))
    (ADDRESS = (PROTOCOL = TCP)(HOST = orcl-db)(PORT = 1521))
    (CONNECT_DATA =
    (SID = bigbear)
    ---- MIDDLE TIER(cman.ora)
    CMAN = (ADDRESS_LIST =
    (ADDRESS =
    (PROTOCOL = TCP)
    (HOST = orcl-middler)
    (PORT = 1610)
    ---- SERVER (listener.ora)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = orcl-db)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (ORACLE_HOME = /u01/app/oracle/product/8.1.7)
    (SID_NAME = bigbear)
    ---- SERVER (init.ora)
    MTS_DISPATCHERS = "(PROTOCOL = TCP)(DISPATCHERS=10)(MULTIPLE=ON)"
    MTS_MAX_DISPATCHERS=20
    MTS_MAX_SERVERS = 30
    MTS_SERVERS = 10
    MTS_SERVICE = bigbear
    db_name = "bigbear"
    db_domain = intumit.com
    instance_name = bigbear
    service_names = bigbear.intumit.com

    midder tier must config hosts
    because dispatcher have listener information
    midder tier must know ipaddress
    Ex. on midder tier
    /etc/hosts
    192.168.10.1 orcl-middler
    from client to server it's ok

  • Can I connect with Database using Session Bean

    Hi,
    I am new to EJB. I have small doubt.
    can I connect with Database using Session Bean.
    Regards,
    Murali.

    Double post of http://forum.java.sun.com/thread.jspa?threadID=687239&tstart=0

  • I can't connect to AppStore using wifi (iPhone - iOS6)...HELP!

    That's incredible... from one week I can't connect to AppStore using WIFI anymore... just using 3G.
    So I don't download apps anymore!
    How can be that possible?? Anyother had the same problem??
    I've already reset conncetivity setting... and it doesn't still work!
    Please HELP!
    thanks a lot

    In the course of your troubleshooting to date, have you worked through the following document?
    iPhone, iPad, iPod touch: Unknown error containing '0xE' when connecting to a Windows PC

  • I can not connect to wifi using iphone 4s

    I can not connect to wifi using iphone 4s

    If this is you home wifi try resetting the router.  Turn if off at the wall wait a minute and turn it back on.  Are you sure you have the right password?

  • Can not deploy a report using JDBC connection on CR2008 Server

    Hi Group,
    I have a report created with JDBC connection. When I tried to add it to CR2008 server, it gives an error - "An unexpected error has occurred ". Basically I want to add a report to a public folder via CMC. I am using adminstrator account.
    Then I thought I need to add JDBC driver into CR2008 server. so I put oracle jdbc jar into CR2008 server classpath and add JDBC connection info into CRConfig.xml. but I still got the same error.
    I also tried:
    - Change the report to use native Oracle driver rather than JDBC. The deployment succeeded (but this is not what I want)
    - Add a data source connection via Business View Manager, but no luck.
    I know how to use/change jdbc connection with programtic way, but I just want to know if I want to use built-in components in CR2008 server without any coding the reports can be deployed and managed.
    Thanks in advance.
    Dennis

    Hello Will,
    Crystal Reports supports connections to JDBC/JNDI out of the box, and have done so for a while, whether stand-alone or published to Enterprise.
    To specify where the server would search for the JDBC driver jar files, you'd change the classpath tag found in the CRConfig.xml file found on the machine where the Crystal Reports Page or Job Server is running. 
    For early Crystal Enterprise 10 and before, it used Java Native Interface (JNI) to start the Java process to retrieve the data from the JDBC connection.
    For later Crystal Enterprise 10 and later, it starts off a "Java Server" process, and communicates to the Crystal Reports process via CORBA TCP/IP connection.
    Commonissues that may arise:  (1) CRConfig.xml not configured properly, (2) unable to start or communicate to the "Java Server" because of permissions or firewall.
    Note that this is a separate connectivity map from using ADO or ADO.NET.
    Sincerely,
    Ted Ueda

  • Database Link to MSSQL using JDBC

    Hi, i'm trying to create a database link from Oracle on Solaris to a MSSQL database. We don't have ODBC installed on the server so i'm hoping to use JDBC to connect. Is that possible? Can someone tell me the format to use for the connection string. Thanks...

    It is not possible to create a database link using JDBC.
    You could load the SQL Server Type 4 JDBC driver into the Oracle JVM and then write a Java stored procedure that accesses the remote database if you would like. But Heterogeneous Services with Generic Connectivity, which allows you to create database links to non-Oracle databases, only supports ODBC and OLE DB.
    Justin

  • Can't connect to MSSQL database

    Hi,
    I'm very new to J2EE. I've been trying to get my JSPs to access my MSSQL database. I'm using JBoss as the application server.
    Here's what I've done:
    1. Downloaded and installed the MSSQL 2000 JDBC driver.
    2. Edited the \server\default\deploy\mssql-ds.xml file:
    <datasources>
    <local-tx-datasource>
    <jndi-name>MSSQLDS</jndi-name>
    <connection-url>jdbc:microsoft:sqlserver://server1:1433;DatabaseName=Test;User=sa;Password=passwd;SelectMethod=Cursor</connection-url>
    <driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
    <DatabaseName>Test</DatabaseName>
    <user-name>sa</user-name>
    <password>passwd</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. I edited the "C:\jboss\bin\run.bat" file and inserted into the second line:
    "set CLASSPATH=c:\mssql_jdbc_driver\lib\mbase.jar;c:\mssql_jdbc_driver\lib\msutil.jar;c:\mssql_jdbc_driver\lib\mssqlserver.jar;"
    where C:\mssql_jdbc_driver is the folder where my *.jar files are located.
    4. I created a .jsp page like this:
    -----Start test.jsp -----------
    <%
    try {
    String sDBDriver = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
    String sConnStr = "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=multiplex;User=sa;Password=secret;";
    Class.forName(sDBDriver);
    java.sql.Connection conn = java.sql.DriverManager.getConnection(sConnStr);
    java.sql.Statement stmt = conn.createStatement();
    java.sql.ResultSet rs = stmt.executeQuery("select 'Multiplex' As Name");
    while (rs.next()) { %>
    <%= rs.getString("Name") %><br>
    <%}
    catch (ClassNotFoundException cnfe)
    System.err.println("Unable to load MSSQL database driver!");
    System.err.println("ClassNotFoundException: " + cnfe.getMessage());
    %>
    ------End test.jsp -----------------------
    5. But then when I run test.jsp, I get a ClassNotFoundException saying its not able to load the MSSQL driver.
    Have I missed out some configuration step? I've been searching all avenues of support for 3 days but still can't get it working. Can someone help, please?
    Thanks!

    Thanks for your replies.
    The database should be "Test", sorry.
    I find the JBoss documentation isn't very beginner-friendly. And I can't get a reply from the JBoss forums. Does anyone who has worked with JBoss know where I should define the CLASSPATH for the MSSQL jar files?
    Actually if someone could point me to step-by-step instructions on how to set up a database connection to MSSQL from JBoss in a Windows environment, I would be very very grateful...

  • Can't connect to MSSQL

    I've been using MSSQL with java servlet programming. It seems like the connection to MSSQL is not working. Here are the codes.
    package coreservlets;
    import java.*;
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class RunMssql extends HttpServlet {
         Connection connection = null;
    public String username = "libsys";
    public String password = "123456";
    public String url = "jdbc:microsoft:sqlserver://localhost:1433;databaseName=libsys;selectMethod=cursor;";
         public void init()
              try
                   Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
                   //loading a driver
         connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;databaseName=libsys;selectMethod=cursor;","libsys","123456");
                   //connecting to a database
              catch (Exception a)
                   a.printStackTrace();
         public void doGet(HttpServletRequest request,
    HttpServletResponse response) throws ServletException, IOException
              doProcess(request,response);
    public void doPost(HttpServletRequest request,
    HttpServletResponse response) throws ServletException, IOException
         doProcess(request,response);
         public void doProcess(HttpServletRequest request,
    HttpServletResponse response) throws ServletException, IOException
              try{
              init();
    DatabaseMetaData dm = null;
              ResultSet rs = null;
              response.setContentType("text/html");
              PrintWriter out = response.getWriter();
              out.println("<HTML>");
              out.println("<BODY>");
              out.println(connection);
              if (connection != null) {
                   out.println("<BR>Connected Successfully");
              out.println("</BODY>");
              out.println("</HTML>");
              catch (Exception e)
                   System.err.println(e);
    Please help to rectify it. Thanks.
    Message was edited by:
    wesleygch

    I show you my program again.
    package coreservlets;
    import java.*;
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Connect extends HttpServlet{
    private Connection con = null;
    private final String url = "jdbc:microsoft:sqlserver://";
    private final String serverName= "localhost";
    private final String portNumber = "1433";
    private final String databaseName= "libsys";
    private final String userName = "libsys";
    private final String password = "123456";
    // Informs the driver to use server a side-cursor,
    // which permits more than one active statement
    // on a connection.
    private final String selectMethod = "cursor";
    // Constructor
    public Connect(){}
    private String getConnectionUrl(){
    return url+serverName+":"+portNumber+";databaseName="+databaseName+";selectMethod="+selectMethod+";";
    private Connection getConnection(){
    try{
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    con = DriverManager.getConnection(getConnectionUrl(),userName,password);
    }catch(Exception e){
    e.printStackTrace();
    System.out.println("Error Trace in getConnection() : " + e.getMessage());
    return con;
    Display the driver properties, database details
    public void doGet(HttpServletRequest request,
    HttpServletResponse response) throws ServletException, IOException
                   getConnection();
    doPost(request,response);
         public void doPost(HttpServletRequest request,
    HttpServletResponse response) throws ServletException, IOException
                        response.setContentType("text/html");
                        PrintWriter out = response.getWriter();
              DatabaseMetaData dm = null;
              ResultSet rs = null;
              try{
              con= this.getConnection();
              if(!con.isClosed()){
                                       out.println("Get Connected");
              dm = con.getMetaData();
              out.println(con);
              out.println("Driver Information");
              out.println("\tDriver Name: "+ dm.getDriverName());
              out.println("\tDriver Version: "+ dm.getDriverVersion ());
              out.println("\nDatabase Information ");
              out.println("\tDatabase Name: "+ dm.getDatabaseProductName());
              out.println("\tDatabase Version: "+ dm.getDatabaseProductVersion());
              out.println("Avalilable Catalogs ");
              rs = dm.getCatalogs();
              while(rs.next()){
              out.println("\tcatalog: "+ rs.getString(1));
              rs.close();
              rs = null;
              closeConnection();
              }else System.out.println("Error: No active Connection");
              }catch(Exception e){
              e.printStackTrace();
    dm=null;
    private void closeConnection(){
    try{
    if(con!=null)
    con.close();
    con=null;
    }catch(Exception e){
    e.printStackTrace();
    after I run it in the browser. It shows nothing. Anywhere can help to improve this to make it connected.
    Message was edited by:
    wesleygch

  • How can i connect multiple forms using swings or applets(AWT) & with D-Base

    Hello Friends,
    I am Sreedhar from Hyderabad. working as a java developer in a small organization. I got a challenge to work on java stand alone (desktop) application. Basically our company is based on SCM(Supply Chain Management), I never work before using swings and AWT. now my present challenge is to develope an application on swings and AWT using Net Beans IDE. but i am unble find the code to connect one form to another form, i want to develop similar application like a web application , suppose if i click on OK button it has to connect next form. in the next for it has to take user name and password should allow me to access main form. please help me about this topic, if anybody interested i can send u the screen shots and i can post to ur mail. please help me as soon as possible,

    sreedharkommuru wrote:
    Hello Friends,
    I am Sreedhar from Hyderabad. working as a java developer in a small organization. I got a challenge to work on java stand alone (desktop) application. Basically our company is based on SCM(Supply Chain Management), I never work before using swings and AWT. now my present challenge is to develope an application on swings and AWT using Net Beans IDE. but i am unble find the code to connect one form to another form, i want to develop similar application like a web application , suppose if i click on OK button it has to connect next form. in the next for it has to take user name and password should allow me to access main form. please help me about this topic, if anybody interested i can send u the screen shots and i can post to ur mail. please help me as soon as possible,There is no magic, you need to spend a good amount of time in tutorials, here is a good one to start off with:
    [The Really Big Index|http://java.sun.com/docs/books/tutorial/reallybigindex.html]
    Here are a few tips:
    1 - Do not mix AWT and SWING: it'll just cause you headaches in the long run that you cannot fix without refactoring to properly not mix the 2 together.
    2 - You use JDBC to access the database
    3 - You make accessors/constructors to pass parameters that you need from one form to another.
    Have fun.

Maybe you are looking for