Problem Connecting To MS SQL Server Via JSP

Please advise !
My envoironment is Windows 2000, j2sdk1.4.1_02, Java Web Services Developer Pack 1.1.
I have set my system variables as below :
JAVA_HOME : C:\j2sdk1.4.1_02
CATALINA_HOME : C:\jwsdp-1.1
CLASSPATH : %JAVA_HOME%\lib;%CATALINA_HOME%\lib;.
PATH : %JAVA_HOME%\bin;
I have copied all the *.jar files from "C:\jwsdp-1.1\jaxp-1.2.2\lib\endorsed" to "C:\j2sdk1.4.1_02\jre\lib".
I have download and install the Microsoft SQL Server 2000 Driver for JDBC. I copied msbase.jar, msutil.jar, mssqlserver.jar to "C:\j2sdk1.4.1_02\lib".
I have created database call "test" in my local SQL server.
I have created table call "Conferences"
I have created those file :
ConnectionBean.java
import java.sql.*;
import javax.sql.*;
import javax.naming.*;
import javax.servlet.http.*;
public class ConnectionBean implements HttpSessionBindingListener {
     private Connection connection;
     private Statement statement;
     private static final String driver="com.microsoft.jdbc.sqlserver.SQLServerDriver";
     private static final String dbURL="jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=test;"; // database address/database name
     private static final String login="sa";
     private static final String password="";
     public ConnectionBean()
     try {
          Class.forName(driver);
          connection=DriverManager.getConnection(dbURL,login,password);
          statement=connection.createStatement();
     catch (ClassNotFoundException e) {
          System.err.println("ConnectionBean : driver unavailable");
          connection = null;
     catch (SQLException e) {
          System.err.println("ConnectionBean : driver not loaded");
          connection = null;          
public static void main(String args[]){
     ConnectionBean nb = new ConnectionBean();
     public Connection getConnection()
     return connection;
     public void commit() throws SQLException
     connection.commit();
     public void rollback() throws SQLException
     connection.rollback();
     public void setAutoCommit (boolean autoCommit) throws SQLException
     connection.setAutoCommit(autoCommit);
     public ResultSet executeQuery (String sql) throws SQLException
     return statement.executeQuery(sql);
     public int executeUpdate(String sql) throws SQLException
     return statement.executeUpdate(sql);
     public void valueBound(HttpSessionBindingEvent event)
     System.err.print("Connection: in the valueBound method");
try
          if (connection == null || connection.isClosed())
          connection=DriverManager.getConnection(dbURL,login,password);
          statement=connection.createStatement();
     catch (SQLException e) { connection = null; }
     public void valueUnbound(HttpSessionBindingEvent event)
     try
connection.close();
catch (SQLException e) { }
finally
connection = null;
     protected void finalize()
     try
     connection.close();
catch (SQLException e) { }
conference.jsp
<%@ page import="java.sql.*" %>
<jsp:useBean id="connection" class"ConnectionBean" scope="session" />
<html>
<body>
<center>
<font size="+2" face="arial"><b>Conference Registration</b></font>
<form action="shuttle.jsp" method="post">
<table border=1 bgcolor="tan" width="50%" align="center">
<tr><td>
<table border="0" bgcolor="white" cellspacing=0 width="100%"
<tr bgcolor="tan">
<th>?</th><th>City</th><th>Tickets Remaining</th><tr>
<%
Strign sql = "SELECT * FROM Conferences";
ResultSet results = connection.executeQuery(sql);
while (results.next()){
if (results.getInt("seats") > 0) {
%>
<td>
<input type="radio" name="show"
value="<%= results.getString("id") %>">
</td>
<% } else { %>
<td>?</td>
<% } %>
<td><%= results.getString("city") %></td>
<td align="center"><%= results.getString("seats") %></td>
</tr>
<% } %>
</table>
</td></tr></table>
<p>
<input type="submit" value="Next Choose Shuttle)">
</form>
</center>
</body>
</html>
I created 2 folder call "WEB-INF" and "classes" in my web server directory.
I have compiled the ConnectionBean.java and copied the ConnectionBean.class to my "classes" folder.
But i get an error like this :
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.compiler.ParseException: /conference.jsp(1,34) Attribute class has no value
     at org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:563)
     at org.apache.jasper.compiler.JspReader.parseTagAttributesBean(JspReader.java:616)
     at org.apache.jasper.compiler.Parser$Bean.accept(Parser.java:654)
     at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
     at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
     at org.apache.jasper.compiler.Parser.parse(Parser.java:1099)
     at org.apache.jasper.compiler.ParserController.parse(ParserController.java:213)
     at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210)
     at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
     at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
     at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:646)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:646)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
     at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2349)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:646)
     at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:644)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:171)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:644)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:646)
     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:644)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
     at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:376)
     at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
     at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:518)
     at java.lang.Thread.run(Thread.java:536)
It look like cant find the class, I have try copied ConnectionBean.class to "C:\jwsdp-1.1\common\classes", but still came out a some error message.
I'm very sad and demotivate because i have try so many time and i still cant make it.
Please help ! thank you.
regards.

What's creating the connection and putting it into the session scope?
I'd start looking at the docs to figure out how to set up a data source for your app.
I know how to do it for Tomcat 4.1.24. Does Tomcat come bundled with the Java Web Services Developer Pack 1.1? If so, check this out:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html

Similar Messages

  • How to connect to MS SQL server using JSP?

    Hi, i am new to JSP so i would like to know what is the code to create a connection to MS SQL server.
    I am using jakarta-tomcat 4 as my server.
    sorry for any inconvenient....
    pls help me....

    This works to start off with but there are more sophisticated/ different ways of doing things,for instance it's best not to access the db via your jsp, rather do this logic in JavaBeans, Servlets or use Struts.Therefore, it's best that you consult with others and find out which is best way to go about creating your web apps.
    Here's some code:
    In my jsp's I access the bean below , instantiate a statement object and go on from there:
    *SOME of the code in the JSP's.
    //create bean instance
    <jsp:useBean id='dbConn' class='projectsevenhouses.DatabaseConnectionBean ' scope='session' />
    //instantiate statement
    Statement st = dbConn.getConnection().createStatement();
    * JavaBean
    package projectsevenhouses;
    public class DatabaseConnectionBean implements Serializable {   
    private Connection conn;
    private Statement st;
    private String dbURL = "jdbc:odbc:datasource";
    private static String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
    /** Creates a new instance of DatabaseConnectionBean */
    public DatabaseConnectionBean() {
    makeConnection();
    public void setDatabaseName(String dbName) {
    dbURL = dbName;
    private void makeConnection() {
    try {
    Class.forName(driver);
    conn = DriverManager.getConnection(dbURL,"sa","");
    } catch (SQLException e) {
    System.out.println("SQL Cause ->" + e.toString());
    } catch (ClassNotFoundException cnf) {
    System.out.println("Class Not Found:" + cnf);
    public Connection getConnection() {
    if (conn == null) {
    makeConnection();
    return conn;
    public void setCloseConnection(boolean close) {
    if (close) {
    try {
    conn.close();
    } catch (Exception e) {
    conn = null;
    Hope it gives u an idea...
    Ciao
    Ushanta

  • Having problems connecting Coldfusion10 with sql server express 2012

    Hi,
    I am having problems setting up a datasource for a local sql express 2012 server. Its running as the default instance. Connections are working with ODBC and client told just not Coldfusion.
    When I try to set up a connection using the sql driver I get this error:
    Connection verification failed for data source: Leaf
    java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver]Error establishing socket to host and port: 127.0.0.1:1433. Reason: Invalid argument: connect
    The root cause was that: java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver]Error establishing socket to host and port: 127.0.0.1:1433. Reason: Invalid argument: connect
    When I try a Socket connection with an ODBC connection I setup in windows I get this error:
    Connection verification failed for data source: LeafDB
    java.sql.SQLException: [Macromedia][SequeLink JDBC Driver]Internal network error, connection closed.
    The root cause was that: java.sql.SQLException: [Macromedia][SequeLink JDBC Driver]Internal network error, connection closed.
    Any ideas?
    Thanks,

    Hi Rossco199,
    The issue is likely caused by you not having yet assigned port 1433 in SQL Express itself. Follow the procedure described on the following page, and you should solve the problem: http://www.tensixconsulting.com/2012/02/sqlserverexception-the-tcpip-connection-to-the-hos t-port-1433-has-failed/
    In particular, remember to assign port 1433 to 127.0.0.1 and to IPAll. Also set 'Active' and 'Enabled' to 'Yes' for the IP 127.0.0.1. While you're at it, if 'Named Pipes' is disabled, you should right-click on it and select 'enable'. Afterwards, restart the Windows service 'SQL Server(SQLEXPRESS)'.
    It is advisable to allow ColdFusion server authentication. However, the SQL Express server is configured by default to allow only Windows authentication. This conflict may lead to errors.
    Should you then encounter the dreaded Error 233: "No process is on the other end of the pipe", proceed as follows. Open the tool Microsoft SQL Server Management Studio. Right-click on the name of your database server, then on Properties. In the user interface that opens, click on Security. Select the combined 'SQL Server and Windows Authentication mode'. Restart the service 'SQL Server(SQLEXPRESS)'.

  • BC4J connect to Microsoft SQL*Server via Allaire Jrun JDBC

    This post is in answer to Matteo Tamburini's questions about
    connecting to SQL*Server using the allaire jdbc drivers.
    see Re: Version 10.1.0.3.03 of Oracle Data Provider for .NET
    These drivers are available for download from Macromedia at:
    http://www.macromedia.com/v1/Handlers/index.cfm?ID=22399&Method=Full
    They are shipped as one jar file: jrun_drivers.jar
    I installed it into <jdev_home>\lib
    To make a connection from designtime, follow (roughly)
    the steps in the HowTo walkthrough:
    Notice that the JDBC driver class is:
    allaire.jrun.jdbc.JRunDriver
    and the URL is something like:
    jdbc:jrun:sqlserver://machinenane:1433;Selectmethod=cursor
    There are two gotchas:
    1. the Selectmethod=cursor is important
    2. you will get an error saying that the class
    allaire/jrun/servlet/JRunSE
    can't be found.
    Indeed - that package is not to be found inside the .jar
    file; I suspect it is a rogue import in the source.
    The workaround is to ask the VM not to verify classes - do this
    by specifying -Xverify:none in the Java Options box of the
    "Runner" tab of project properties.
    I did successfully test a project deployed as a JSP inside OC4J:
    the caveats are that you have to enter the jar file location
    in j2ee\home\config\application.xml (as in Matteo's thread)
    and that the -Xverify:none switch needs to go on the CLIENT
    project, because it launches the embedded OC4J
    hope all this helps, Karl McHorton (BC4J Development)

    Well, you must have tested to make sure that the socket value is indeed the correct value. But with that error, and you are certain that the socket value is correct, then it becomes difficult.

  • *** URGENT *** Problems Connecting to MS SQL Server 2000

    Hi guys,
    I'm rather new to SQL Server and whenever I try to connect to my tables in SQL Servers through jdbc-odbc bridge and ODBC DSN it's Ok. BUT when I try the Microsoft or Merant driver I get log in problem. The server requires a trusted connection and won't accept my username/password. Please help out of misery. I read through some documentation and it mentioned setting up application roles, but I can't get it working. Those expert on the subject please provide a sample connection url, mine is:
    String url = "jdbc:microsoft:sqlserver://localhost:1433;User=Administrator;Password=****;SendStringParametersAsUnicode=true";The jdbc error is:
    Exception in thread "main" java.sql.SQLException: [Microsoft][SQLServer 2000 Dri
    ver for JDBC][SQLServer]Login failed for user 'Administrator'. Reason: Not assoc
    iated with a trusted SQL Server connection.
    Thanks in advance.

    The problem could be caused by one of two things.
    The first reason could be that the 'Administrator' user is not set up with a SQL Server only password.
    Another possible reason is that SQL Server is not setup to use SQL Server passwords, only Windows NT Authentication.
    Open Enterprise Manager, expand your database and select users. Check the properties of the 'Administrator' user and make sure that it is set with SQL Server password. Also, check the properties of the SQL Server instance - right click on the SQL Server name, select properties and select the security tab. Make sure that SQL Server and Windows NT is selected and not just Windows NT.
    Hope this helps.
    Sudha

  • Problem connecting to godaddy exchange server via outlook client

    I am pretty much having a very similar problem here:
    https://social.technet.microsoft.com/Forums/exchange/en-US/437c5f8d-3a42-4689-90b4-13fd2749373f/go-daddy-ucc-certificate-exrca-can-only-validate-the-certificate-chain-using-the-root-certificate?forum=exchangesvr3rdpartyappslegacy
    When I set up in outlook, I have noticed this in advanced connection settings:
    the URL is required
    mail.ex4.secureserver.net
    Then check connect SSL only
    Only connect to proxy servers with this principal name
    msstd:mail.ex4.secureserver.net
    When I use the connect principal, it works fine, but otherwise if it is not checked, it won't connect to the server.
    http://www.experts-exchange.com/Software/Server_Software/Email_Servers/Exchange/Q_26423254.html
    However, when I restart outlook, because I have multiple exchange accounts, they keep becoming "unchecked".
    Everything worked fine about 48 hours ago, and now... all these problems.
    Here is my log from the testing site:
    Connectivity Test Failed
    Test Details
        Testing Outlook connectivity.
         The Outlook connectivity test failed.
        Additional Details
    Elapsed Time: 3897 ms.
        Test Steps
        Testing RPC over HTTP connectivity to server mail.ex4.secureserver.net
         RPC over HTTP connectivity failed.
        Additional Details
    HTTP Response Headers:
    Content-Type: text/html
    Server: Microsoft-IIS/7.5
    WWW-Authenticate: Negotiate,NTLM
    X-Powered-By: ASP.NET
    Date: Fri, 13 Feb 2015 01:07:27 GMT
    Content-Length: 58
    Elapsed Time: 3897 ms.
        Test Steps
        Attempting to resolve the host name mail.ex4.secureserver.net in DNS.
         The host name resolved successfully.
        Additional Details
    IP addresses returned: 72.167.83.115
    Elapsed Time: 95 ms.
        Testing TCP port 443 on host mail.ex4.secureserver.net to ensure it's listening and open.
         The port was opened successfully.
        Additional Details
    Elapsed Time: 110 ms.
        Testing the SSL certificate to make sure it's valid.
         The certificate passed all validation requirements.
        Additional Details
    Elapsed Time: 461 ms.
        Test Steps
        The Microsoft Connectivity Analyzer is attempting to obtain the SSL certificate from remote server mail.ex4.secureserver.net on port 443.
         The Microsoft Connectivity Analyzer successfully obtained the remote SSL certificate.
        Additional Details
    Remote Certificate Subject: CN=mail.ex4.secureserver.net, O="Starfield Technologies, LLC.", L=Scottsdale, S=AZ, C=US, Issuer: SERIALNUMBER=10688435, CN=Starfield Secure Certification Authority, OU=http://certificates.starfieldtech.com/repository,
    O="Starfield Technologies, Inc.", L=Scottsdale, S=Arizona, C=US.
    Elapsed Time: 356 ms.
        Validating the certificate name.
         The certificate name was validated successfully.
        Additional Details
    Host name mail.ex4.secureserver.net was found in the Certificate Subject Common name.
    Elapsed Time: 0 ms.
        Certificate trust is being validated.
         The certificate is trusted and all certificates are present in the chain.
        Test Steps
        The Microsoft Connectivity Analyzer is attempting to build certificate chains for certificate CN=mail.ex4.secureserver.net, O="Starfield Technologies, LLC.", L=Scottsdale, S=AZ, C=US.
         One or more certificate chains were constructed successfully.
        Additional Details
    A total of 1 chains were built. The highest quality chain ends in root certificate OU=Starfield Class 2 Certification Authority, O="Starfield Technologies, Inc.", C=US.
    Elapsed Time: 39 ms.
        Analyzing the certificate chains for compatibility problems with versions of Windows.
         Potential compatibility problems were identified with some versions of Windows.
        Additional Details
    The Microsoft Connectivity Analyzer can only validate the certificate chain using the Root Certificate Update functionality from Windows Update. Your certificate may not be trusted on Windows if the "Update Root Certificates" feature isn't enabled.
    Elapsed Time: 5 ms.
        Testing the certificate date to confirm the certificate is valid.
         Date validation passed. The certificate hasn't expired.
        Additional Details
    The certificate is valid. NotBefore = 11/29/2012 8:39:18 PM, NotAfter = 11/29/2015 8:39:18 PM
    Elapsed Time: 0 ms.
        Checking the IIS configuration for client certificate authentication.
         Client certificate authentication wasn't detected.
        Additional Details
    Accept/Require Client Certificates isn't configured.
    Elapsed Time: 232 ms.
        Testing HTTP Authentication Methods for URL https://mail.ex4.secureserver.net/rpc/rpcproxy.dll?mail.ex4.secureserver.net:6002.
         The HTTP authentication methods are correct.
        Additional Details
    The Microsoft Connectivity Analyzer found all expected authentication methods and no disallowed methods. Methods found: Negotiate, NTLM
    HTTP Response Headers:
    Content-Type: text/html
    Server: Microsoft-IIS/7.5
    WWW-Authenticate: Negotiate,NTLM
    X-Powered-By: ASP.NET
    Date: Fri, 13 Feb 2015 01:07:27 GMT
    Content-Length: 58
    Elapsed Time: 146 ms.
        Attempting to ping RPC proxy mail.ex4.secureserver.net.
         RPC Proxy was pinged successfully.
        Additional Details
    Elapsed Time: 224 ms.
        Attempting to ping the MAPI Mail Store endpoint with identity: mail.ex4.secureserver.net:6001.
         The attempt to ping the endpoint failed.
          Tell me more about this issue and how to resolve it
        Additional Details
    The RPC_S_SERVER_UNAVAILABLE error (0x6ba) was thrown by the RPC Runtime process.
    Elapsed Time: 2626 ms.

    Here is another test from the autodiscover:
        The Microsoft Connectivity Analyzer is attempting to test Autodiscover for [email protected].
         Autodiscover was tested successfully.
        Additional Details
    Elapsed Time: 1745 ms.
        Test Steps
        Attempting each method of contacting the Autodiscover service.
         The Autodiscover service was tested successfully.
        Additional Details
    Elapsed Time: 1745 ms.
        Test Steps
        Attempting to test potential Autodiscover URL https://MYDOMAIN.com:443/Autodiscover/Autodiscover.xml
         Testing of the Autodiscover URL was successful.
        Additional Details
    Elapsed Time: 1745 ms.
        Test Steps
        Attempting to resolve the host name MYDOMAIN.com in DNS.
         The host name resolved successfully.
        Additional Details
    IP addresses returned: xx.168.xx.74
    Elapsed Time: 59 ms.
        Testing TCP port 443 on host MYDOMAIN.com to ensure it's listening and open.
         The port was opened successfully.
        Additional Details
    Elapsed Time: 60 ms.
        Testing the SSL certificate to make sure it's valid.
         The certificate passed all validation requirements.
        Additional Details
    Elapsed Time: 197 ms.
        Test Steps
        The Microsoft Connectivity Analyzer is attempting to obtain the SSL certificate from remote server MYDOMAIN.com on port 443.
         The Microsoft Connectivity Analyzer successfully obtained the remote SSL certificate.
        Additional Details
    Remote Certificate Subject: CN=MYDOMAIN.com, OU=Domain Control Validated, Issuer: CN=Starfield Secure Certificate Authority - G2, OU=http://certs.starfieldtech.com/repository/, O="Starfield Technologies, Inc.", L=Scottsdale, S=Arizona, C=US.
    Elapsed Time: 132 ms.
        Validating the certificate name.
         The certificate name was validated successfully.
        Additional Details
    Host name MYDOMAIN.com was found in the Certificate Subject Common name.
    Elapsed Time: 0 ms.
        Certificate trust is being validated.
         The certificate is trusted and all certificates are present in the chain.
        Test Steps
        The Microsoft Connectivity Analyzer is attempting to build certificate chains for certificate CN=MYDOMAIN.com, OU=Domain Control Validated.
         One or more certificate chains were constructed successfully.
        Additional Details
    A total of 2 chains were built. The highest quality chain ends in root certificate OU=Starfield Class 2 Certification Authority, O="Starfield Technologies, Inc.", C=US.
    Elapsed Time: 27 ms.
        Analyzing the certificate chains for compatibility problems with versions of Windows.
         Potential compatibility problems were identified with some versions of Windows.
        Additional Details
    The Microsoft Connectivity Analyzer can only validate the certificate chain using the Root Certificate Update functionality from Windows Update. Your certificate may not be trusted on Windows if the "Update Root Certificates" feature isn't enabled.
    Elapsed Time: 4 ms.
        Testing the certificate date to confirm the certificate is valid.
         Date validation passed. The certificate hasn't expired.
        Additional Details
    The certificate is valid. NotBefore = 7/2/2014 2:30:01 AM, NotAfter = 7/2/2015 2:30:01 AM
    Elapsed Time: 0 ms.
        Checking the IIS configuration for client certificate authentication.
         Client certificate authentication wasn't detected.
        Additional Details
    Accept/Require Client Certificates isn't configured.
    Elapsed Time: 673 ms.
        Attempting to send an Autodiscover POST request to potential Autodiscover URLs.
         The Microsoft Connectivity Analyzer successfully retrieved Autodiscover settings by sending an Autodiscover POST.
        Additional Details
    Elapsed Time: 754 ms.
        Test Steps
        The Microsoft Connectivity Analyzer is attempting to retrieve an XML Autodiscover response from URL https://MYDOMAIN.com:443/Autodiscover/Autodiscover.xml for user [email protected].
         The Autodiscover XML response was successfully retrieved.
        Additional Details
    Autodiscover Account Settings
    XML response:
    <?xml version="1.0"?>
    <Autodiscover xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
    <Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
    <User>
    <DisplayName>[email protected]</DisplayName>
    </User>
    <Account>
    <AccountType>email</AccountType>
    <Action>settings</Action>
    <Protocol>
    <Type>IMAP</Type>
    <Server>MYDOMAIN.com</Server>
    <Port>993</Port>
    <DirectoryPort>0</DirectoryPort>
    <ReferralPort>0</ReferralPort>
    <SSL>on</SSL>
    <DomainRequired>off</DomainRequired>
    <SPA>off</SPA>
    <AuthRequired>on</AuthRequired>
    <LoginName>[email protected]</LoginName>
    </Protocol>
    <Protocol>
    <Type>SMTP</Type>
    <Server>MYDOMAIN.com</Server>
    <Port>465</Port>
    <DirectoryPort>0</DirectoryPort>
    <ReferralPort>0</ReferralPort>
    <SSL>on</SSL>
    <DomainRequired>off</DomainRequired>
    <SPA>off</SPA>
    <AuthRequired>on</AuthRequired>
    <LoginName>[email protected]</LoginName>
    </Protocol>
    </Account>
    </Response>
    </Autodiscover>
    HTTP Response Headers:
    Keep-Alive: timeout=15, max=256
    Connection: Keep-Alive
    Content-Length: 1227
    Content-Type: application/xml; charset="UTF-8"
    Date: Fri, 13 Feb 2015 01:14:56 GMT
    Server: Apache/2.2.27 (Unix) mod_ssl/2.2.27 OpenSSL/1.0.1e-fips DAV/2 mod_bwlimited/1.4 mod_fcgid/2.3.9
    Elapsed Time: 754 ms.

  • Trying to connect to Microsoft SQL Server via JDBC

    This is what I've got:
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
                   con = DriverManager.getConnection(
                             "jdbc:microsoft:sqlserver://databasename:1433", "user", "pass");This is what I get:
    java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriverDoes anyone know what I'm doing wrong?

    Well, you must have tested to make sure that the socket value is indeed the correct value. But with that error, and you are certain that the socket value is correct, then it becomes difficult.

  • Problem with Connection to SQL Server via Servlet (in iPlanet 6 App Server)

    Hi ,
    I am using the iPlanet ApplicationServer 6.0 SP2 for development & testing of an internet application.
    I am facing a problem when I am trying to connect to MS SQL SERVER via the native jdbcodbc driver (obdc32.dll). The error is something like this :
    [26/Jul/2001 11:50:35:7] warning: DriverConnect: (28000): [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '\'.(DB Error: 18456)
    [26/Jul/2001 11:50:35:7] warning: ODBC-027: CreateConn: failed to create connection [new connection]: DSN=fadd,DB=cashbook,USER=test,PASS=xxxxxxxxx
    [26/Jul/2001 11:50:35:7] error: DATA-108: failed to create a data connection wit
    h any of specified drivers
    Error in connecting to the Database for cirrus :java.sql.SQLException: failed to
    create a data connection with any of specified drivers
    java.sql.SQLException: failed to create a data connection with any of specified
    drivers
    at com.netscape.server.jdbc.Driver.afterVerify(Unknown Source)
    at com.netscape.server.jdbc.Driver.connect(Unknown Source)
    at com.netscape.server.jdbc.DataSourceImpl.getConnection(Unknown Source)
    at gefa.util.DBConnection.jdbcConnectionOpen(DBConnection.java:65)
    at gefa.servlet.ServUpload.doPost(ServUpload.java:45)
    at gefa.servlet.ServUpload.doGet(ServUpload.java:29)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
    Source)
    at com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unkno
    wn Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
    at com.kivasoft.thread.ThreadBasic.run(Native Method)
    at java.lang.Thread.run(Thread.java:479)
    I have configured a DSN with the name "fadd" on the machine with the application server and it used NT authentication. I have supplied an NT userid and password that has appropriate rights on the database "cashbook".
    When I write a java standalone program, it does connect but via a servlet it does not connect.
    Can some guide me with this problem please ?
    Anything one might have observed in the past ? (may be specific to iPlanet ?)
    Thanks a lot in advance
    ~Sunil

    I'm using iPlanet App server as well and experiencing similar problem. I load my SQL Server driver by Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"), then use DriverManager.getDriver() to obtain the Driver.
    However, the Driver returned is not the SQLServerDriver as expected. The Driver returned is com.netscape.server.jdbc.Driver! And then when I do Driver.getConnection("jdbc:microsoft:sqlserver://MyServer"), it throws an SQLException saying that it doesn't accept a jdbc:microsoft:sqlserver subprotocol. Well, of course it doesn't, it's not a microsoft Driver at all.
    I suspect the problem is that the netscape Driver's acceptsURL() method ALWAYS returns true in iPlanet app server, thus when you getDriver(), the netscape Driver is always returned (and always returned as the first one since it's default?). Thus even though the same piece of code works fine as a standalone application, it just doesn't work on iPlanet app server.
    My work around is:
    Class.forName("my.Driver");
    Enumeration enu = DriverManager.getDrivers();
    Driver useThis = null;
    while (enu.hasMoreElements()) {
    Driver d = (Driver)enu.nextElement();
    if (d.getClass().toString().indexOf("my.Driver") > -1) {
    useThis = d;
    Mind that my above code does not have an performance issue. If you look into the source code of how DriverManager get a Driver for a particular URL, it also loads the whole set of available Drivers, then call acceptsURL() method on each of them to find the first "suitable" one. Thus time complexity is the same.
    I know this is not a very elegant solution and it defeats the purpose of having a DriverManager. Does any one else has a better way to solve this problem, like a way to specify the priority of each Driver so that SQLServerDriver is returned before the netscape Driver?
    Thanks a lot.

  • How do I create a connection string to sql server?

    Hi All,
       I am currently connecting to a SQL Server via ODBC DSN connection. I am wondering how do I create a connection string directly to a sql server without a DSN connection?
    Thank you in advance.

    If you have SQL Server or client installed in your machine you can directly connect to SQL server using native connection. When you create new report you can see the option create new connection, here you can see SQL Server. Expand it and enter the connection details where you will be directly connected to SQL Server without ODBC connection.
    Regards,
    Raghavendra

  • How can i connect to a SQL Server 2000 database usgin JSP?

    I need (URGENT) to connect to SQL Server 2000 databse using JSP. I do not know how to program using JSP, so if anyone has any code snippet please let me see it. What i need is to give my site some login/password security.
    Anyone?
    Thx.

    just create an ODBC of your database from control pannel -> administrative tools -> data sources (ODBC) ,double click it .....
    go to the tab SYstem DSN , click on ADD button. select the driver for your connection. it will be the last one in the list "SQL Server".
    click Next then give ur DSN name there, description and Server Name , on next give your username and password of SQL server. when it will be connected to the server celect your database from there and hence there will be an ODBC bridge same as in case of MS Access.
    code for connecting to ODBC is
    // DSN-NAME same as in System DSN.
    // username and password are of your databse
    try
              url = "jdbc:odbc:DSN-NAME";
              Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
              connect = DriverManager.getConnection( url,"username","password" );
              catch ( ClassNotFoundException cnfex ) {
                        setErrorMsg( cnfex.getMessage() );
              catch ( SQLException sqlex ) {
                        setErrorMsg( sqlex.getMessage() );
              catch ( Exception ex ) {
                        setErrorMsg( ex.getMessage() );
    Now you are connected to the SQL Server ..... use connect object for further processing .........

  • Connection pooling with SQL Server 2008 and Tomcat 6.0

    Hello Everybody,
    I'm creating a web application using struts 2.0 , tomcat 6.0 and sql server 2008.
    Everything works fine but i'm unable to create connection pooling with sql server 2008.Please help me to solve this issue.
    Code for this is as foolows:
    in my META-INF/context.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/spas" docBase="spas"
    debug="5" reloadable="true" crossContext="true">
    <Resource
    name="jdbc/spas_new"
    auth="Container"
    type="javax.sql.DataSource"
    maxActive="20"
    maxIdle="10"
    maxWait="-1"
    user="spas_user"
    password="spas123"
    driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
    url="jdbc:sqlserver://HGL-0053\dbo:1433;databaseName=spas_new;responseBuffering=adaptive;"/>
    </Context>
    in my web.xml
    <resource-ref>
    <description>SQL Server Datasource</description>
    <res-ref-name>jdbc/spas_new</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    and in my ConnectionThread.java file i've used:
    Context ctx = new InitialContext();
    if(ctx == null )
    throw new Exception("Sorry! No Context Exception");
    DataSource ds = (DataSource)ctx.lookup("java:/comp/env/jdbc/spas_new");
    System.out.println("ds:"+ds);
    conn=ds.getConnection();
    Following is the exception:
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Login failed for user ''.)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
    at login.V_SPAS_ConnectionThread.getConnection(V_SPAS_ConnectionThread.java:87)
    at org.apache.jsp.login.v_005fspas_005flogin_005fpage_jsp._jspService(v_005fspas_005flogin_005fpage_jsp.java:95)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
    at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
    at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
    at org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:1023)
    at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:345)
    at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
    at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:694)
    at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:665)
    at org.apache.jsp.index_jsp._jspService(index_jsp.java:54)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at login.V_SPAS_SecurityCheckFilter.doFilter(V_SPAS_SecurityCheckFilter.java:108)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user ''.

    Hi Karthikeyan,
    This is not the issue at all. I can open the management studio by the same login id and password and also i can make the database jdbc connection from plain java file.
    It does not give me any problem by them.
    I'm unable to find the actual problem. May be i'm missing something in connection pooling.
    Please help.
    Regards
    Mina

  • The WSUS administration console was unable to connect to the WSUS Server via the remote API. (Server 2k8)

    I have installed a new server for WSUS on Server 2k8, This is a stand alone server on Internet No client system is connected on this server as I have to copy these updates to my LAN which never connects to internet. (Previously I was using server 2k3. for
    online & server 2008 on my LAN , now I have changed the server for Online)
    Wsus has finished the synchronization & downloaded updates of around 67GB & its downloading more updates. The server shows me some updates are waiting to approved. but when I click the link for those updates I get following error message.
    error code is as follows -
    The WSUS administration console was unable to connect to the WSUS Server via the remote API.
    Verify that the Update Services service, IIS and SQL are running on the server. If the problem persists, try restarting IIS, SQL, and the Update Services Service.
    System.Net.WebException -- The operation has timed out
    Source
    System.Web.Services
    Stack Trace:
       at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
       at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
       at Microsoft.UpdateServices.Internal.DatabaseAccess.ApiRemotingCompressionProxy.GetWebResponse(WebRequest webRequest)
       at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
       at Microsoft.UpdateServices.Internal.ApiRemoting.ExecuteSPSearchUpdates(String updateScopeXml, String preferredCulture, Int32 publicationState)
       at Microsoft.UpdateServices.Internal.DatabaseAccess.AdminDataAccessProxy.ExecuteSPSearchUpdates(String updateScopeXml, String preferredCulture, ExtendedPublicationState publicationState)
       at Microsoft.UpdateServices.Internal.BaseApi.Update.SearchUpdates(UpdateScope searchScope, ExtendedPublicationState publicationState, UpdateServer updateServer)
       at Microsoft.UpdateServices.Internal.BaseApi.UpdateServer.GetUpdates(UpdateScope searchScope)
       at Microsoft.UpdateServices.UI.AdminApiAccess.UpdateManager.GetUpdates(ExtendedUpdateScope filter)
       at Microsoft.UpdateServices.UI.AdminApiAccess.BulkUpdatePropertiesCache.GetAndCacheUpdates(ExtendedUpdateScope updateScope, ComputerTargetScope computerTargetScope)
       at Microsoft.UpdateServices.UI.SnapIn.Pages.UpdatesListPage.GetListRows()
    I Have tried desabling the firewall,disabling the antivirus protection. Tried by changing the default rule Please Help.

    Hi Sagar,
    First, please check if the RAM is exhausted. When there is not enough RAM, this issue may occurs.
    Please try to run iisreset on the WSUS server, then try to reconnect.
    Also, please try to run the server cleanup wizard to remove the unused update.
    Best Regards.
    Steven Lee Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Failure - Cannot connect to Microsoft SQL Server on localhost

    Hi!
    I have a sqlserver installation on localhost and I want to connect with sqldeveloper.
    I fill connection name, username, password, hostname: localhost port: 1433
    and then click on retrieve database.
    I get the following error message: "Status: Failure - Cannot connect to Microsoft
    SQL Server on localhost"
    I don't know the reason. I can use another connection to another ms sql server
    and it's no problem, but can't connect to localhost.
    I have special signs in my computername, for example a "-". Is this the problem?
    How can I solve it?
    Thank you
    Andreas

    I am able to successfully connect to my local SQLEXPRESS instance using the following settings:
    Hostname: localhost
    Port: 1433/DBName;instance=SQLEXPRESS
    Even though I use this to connect, I cannot open a tcp connection to port 1433 via telnet. I believe this goes hand in hand with specifying the instance. As I understand it, there are two ways to specify the port, one is directly, the other is through a named instance (another port is used as a service to look up the correct port). SQL Server 2005 appears to prefer named instances instead of specific ports. When "instance" is specified, the port can actually be any number, the driver apparently ignores it.
    The Retrieve database (list) appears to be only for informational purposes. I have to specify the database in the Port field (DBName) regardless of what I have selected in this list.
    Hope this helps!
    PS: Retrieve database will give that error until instance is specified in my case.
    Edited by: flszen on Feb 4, 2009 1:29 PM

  • I have problem with login in sql Server give me support .pre login handshake

    I have problem with login in sql Server give me support .pre login handshake

    The following threads are on the same topic:
    http://www.sql-server-performance.com/forum/threads/pre-login-handshake-error-when-connecting-to-db.687/
    http://stackoverflow.com/questions/12308340/sql-server-2000-connection-error-pre-login-handshake
    http://dbaspot.com/sqlserver-server/458011-error-occurred-during-pre-login-handshake-microsoft-sql-server-error-10054-a.html
    Kalman Toth Database & OLAP Architect
    IPAD SELECT Query Video Tutorial 3.5 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Error message when trying to connect to a SQL Server Database

    All:
    I get the following message when I try to connect to a SQL Server Database within a form:
    "Connection for Source DataConnection failed because the environment is not trusted"
    Can anyone help me solve this problem?
    Thanks,
    BR

    Hi Brian,
    In Acrobat, security concerns dictate that you cannot specify an ODBC connection string by using the Driver=; syntax. Therefore, the client computer using the form needs to have a DSN pre-configured for ODBC connections.
    Denver
    Adobe Enterprise Developer Support

Maybe you are looking for

  • How can I decline a single update for a PC.

    Hi, How can I decline an update for a single PC? One of the updates keeps failing and I can't stop it. I don't want to decline it for everyone because other machines will need it. I can't see the option. Thanks

  • Hanging on Start up.

    Hello I am new to MSI forums. I just put together a new pc. Everything works great until I install the Nvidia nforce 4 drivers after I install them it will not boot. It will hang or freeze at the windows login screen with the blue bar on the bottom.

  • Storing iStore purchases on iCloud

    I have purchased several HD films & programmes recently and my iTunes library which is on an external hard drive is getting very full I need to free up space on my external hard drive & wondered if I need to store them elsewhere ie iCloud, in order t

  • Develop t-code

    Hi Gurus,     I am new to MDE.     In our Warehous we use Mobile Data Entry.We recently carreed  out Inventory counting in our warehouse.       I want to display inventory data(On RF terminal)  in the report regarding the when we scan bin  for this w

  • [SOLVED]pacman Dependency problem-error: failed to prepare transaction

    Hi There, Got an issue with pacman after doing a pacman - Syu I get the below error jase : /home/jase > sudo pacman -Syu :: Synchronizing package databases... core is up to date extra is up to date community is up to date kdemod-legacy is up to date