Java Connection to SqlServer using SQLServerDatasource

Please HELP,
I have this
import javax.sql.DataSource;
import java.io.IOException;
import java.sql.Connection;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import java.sql.SQLException;
import javax.naming.*;
import java.rmi.RemoteException;
import java.rmi.Remote;
import com.microsoft.sqlserver.jdbc.*;
public class AvocatData
      private SQLServerConnectionPoolDataSource dataSource;
     private Connection conn;
     public AvocatData()
     public void init() throws SQLException
     try{
                Context lContext = new InitialContext();
               dataSource=(SQLServerConnectionPoolDataSource)lContext.                                                       lookup("java:comp/env/jdbc/vladHotel");
              conn=dataSource.getConnection();
           }catch(Exception ex){ex.printStackTrace();
}and give this error:
javax.naming.NoInitialContextException:Need to specify class name in enviroment or system property,or as an applet paramater,or in an application resource file:java.naming.factory.initial

Gateway for ODBC 10g or 11g is only supported with SQL Server Authentication, not Windows authentication.
If your SQL Server is only configured for Windows authentication, you have no other way to change the configuration of the SQL Server to support the Mixed Mode (both Windows authentication and SQL Server authentication).
Regards,
--Mireille                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Connecting to sqlserver using named pipe

    I would like to connect to mssql (running on same PC as SQL Developer) using named pipes.
    The host is listed in the Windows Service Manager as \\SX3102971\SIMSLOCAL
    I have gone to the 'Oracle' tab, selected 'Advanced' and in the 'Custom JDBC URL'
    entered
    jdbc:jtds:sqlserver:\\SX3102971\SIMSLOCAL;namedPipe=true;user=<username>;password=<password>
    where <username> and <password> are the true values.
    I receive a message
    Staus : Failure -Invalid connection information specified. Verify the URL format for the specified driver.
    Can anyone advise on what may be wrong?
    Also, can SQLDeveloper handle blank passwords?
    The database is installed as part of a third party application, which sets the default dba logon with no password. SQL Developer states that a password is required. For the example above I have created my own log on.

    Hi,
    I managed to solve the problem. So don't worry about it.
    For others who are looking for the solution...
    - I have referred to the http://www.qint.de/joria/doc/jdbc/jtds.html.
    - I have changed the URL element in IDEConnections.xml file located under where SQLDEVELOPER software is installed.
    - The URL must look like the following ...
    <URL>jdbc:jtds:sqlserver://\\.\;namedPipe=true;instance=<name of the database - without the server name>;</URL>
    Hope this helps.
    Regards
    Raja
    Message was edited by:
    rajaram_r

  • Connection to sqlserver

    what folder does the jar file for the sqlserver jdbc drivers go? The documentation says [JRE_HOME]/lib, but the Oracle drivers are in oc4j\jdbc\lib folder.

    Hi JD;
    I didn't install SQLServer 2000/2005 BUT what I installed in my laptop was small version of SQLServer called "SQLServer Express" same as Oracle XE.
    This is what I did to accomplish the task on SQLServer Express:
    1) Downloaded latest version of SQLServer JDBC driver from Microsoft website
    2) Set up login connection to SQLServer using "SQLServer Authenication" NOT windows.
    3) Create AdventureWorks or Nortwind schema downloaded from Microsoft website.
    4) Create a user thru SQLServer Management Studio is like ORACLE DB console.
    5) test the connection from SQLServer
    6) test the connextion using XMLP JDBC connection
    Also to make more spicier I did the connection to MS-ACCESS using ODBC:JDBC driver BUT the Query Builder didn't work but my small sqlscript worked for a demo to clients.
    Here are the link to achieve:
    http://download.microsoft.com/download/d/8/6/d865cf0c-c44b-401b-b426-b3bf5c628112/SQLServerDatabasesAndSamplesOverview.htm
    http://www.oracle.com/technology/products/jdev/howtos/bc4j/bc_psqlserverwalkthrough.html
    HTH
    Shaun S

  • Connecting Oracle to MS SqlServer using Microsoft SQL Server ODBC Driver

    Hello,
    I have just downloaded the newly released Microsoft® SQL Server® ODBC Driver for Linux and trying to configure it to connect to SqlServer Database from Oracle using DG4ODBC
    Below are my config files:
    # odbcinst -j
    unixODBC 2.3.1
    DRIVERS............: /etc/odbcinst.ini
    SYSTEM DATA SOURCES: /etc/odbc.ini
    FILE DATA SOURCES..: /etc/ODBCDataSources
    USER DATA SOURCES..: /usr/oracle/.odbc.ini
    SQLULEN Size.......: 8
    SQLLEN Size........: 8
    SQLSETPOSIROW Size.: 8
    cat /etc/odbcinst.ini
    [SQL Server Native Client 11.0]
    Description = Microsoft SQL Server ODBC Driver V1.0 for Linux
    Driver = /opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1720.0
    #UsageCount = 1
    Fileusage = 1
    Dontdlclose = 1
    [ODBC]
    Trace = ON
    Tracefile = /tmp/mstestodbc.log
    cat /usr/oracle/.odbc.ini
    [DEFAULT]
    Driver = SQL Server Native Client 11.0
    [MSTEST]
    Driver = SQL Server Native Client 11.0
    Description = Microsoft SQL Server ODBC Driver V1.0 for Linux
    Servername = ret2axxx
    Database = testdb
    Port = xxxx
    And when I am trying to do an ODBC test using isql I am getting the below error.
    # iusql -v MSTEST username password
    [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_DBC failed
    [ISQL]ERROR: Could not SQLDriverConnect
    Any help is much appreciated!!
    Thanks,
    Steve.

    Thanks Kgronau for your response.
    I have made changes to the ODBC.ini file still getting the same error
    [MSTEST]
    Driver = /opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1720.0
    #Driver = SQL Server Native Client 11.0
    Description = Microsoft SQL Server ODBC Driver V1.0 for Linux
    #Address = ret2axxx
    Server = ret2axxx, <port>
    Database = testdb
    and when I am trying to export odbcinst.ini export ODBCINSTINI=/etc/odbcinst.ini
    in odbcinst -j output it shows the wrong information.
    :~ $ odbcinst -j
    unixODBC 2.3.1
    DRIVERS............: /etc//etc/odbcinst.ini
    SYSTEM DATA SOURCES: /etc/odbc.ini
    FILE DATA SOURCES..: /etc/ODBCDataSources
    USER DATA SOURCES..: /usr/oracle/.odbc.ini
    SQLULEN Size.......: 8
    SQLLEN Size........: 8
    SQLSETPOSIROW Size.: 8
    And when export odbcinst.ini as export ODBCINSTINI=odbcinst.ini it shows the correct path.
    :~ $ odbcinst -j
    unixODBC 2.3.1
    DRIVERS............: /etc/odbcinst.ini
    isql -v mstest username password
    [IM005][unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_DBC failed
    [ISQL]ERROR: Could not SQLConnect
    Thanks,
    Steve.

  • SQLJ connection to SQLServer

    Hello,
    Is it possible using SQLJ to connect to sqlserver? When I try, I am getting error:
    java.lang.IllegalArgumentException: SQLJ programs translated with the option -codegen=oracle must be run under Oracle JDBC 9.0.0 or higher. If the Oracle JDBC driver is wrapped, then the wrapper must implement all of the oracle.jdbc.OracleXxxx interfaces. Alternatively, you can translate SQLJ programs either with -codegen=iso or with -codegen=jdbc.
    Code
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
              Oracle.connect("jdbc:microsoft:sqlserver://10.10.10.10:1433;DatabaseName=zzz;User=123;Password=1234",true);
    #sql iterator SeatCursor1(Timestamp CLOSE_DATE, String TERMINAL_PRODUCT_NUMBER,String NAME,String TANK_CODE,int OPENING_PHYSICAL_GROSS_QTY,int CLOSING_PHYSICAL_GROSS_QTY);
    SeatCursor1 sc;
    #sql sc = { select  CLOSE_DATE ,TERMINAL_PRODUCT_NUMBER,NAME,TANK_CODE,OPENING_PHYSICAL_GROSS_QTY,CLOSING_PHYSICAL_GROSS_QTY from cbv by CLOSE_DATE desc};

    Cosmos,
    I don't use SQLJ, but it's just a sort of "shorthand" for JDBC code, so pardon me if this is a silly suggestion, but why don't you just write pure JDBC code -- without using SQLJ?
    [Note that below code is uncompiled and untested.]
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    String url = "jdbc:microsoft:sqlserver://10.10.10.10:1433/zzz";
    String user = "123";
    String password = "1234";
    Connection c =  = DriverManager.getConnection(url, user, password);
    Statement s = c.createStatement();
    String sqlQuery = "select ...";
    ResultSet rs = s.executeQuery(sqlQuery);
    while (rs.next()) {
      // Process the result set
    }If you haven't already done so, I suggest looking at the JDBC Database Access trail in the Java Tutorial:
    http://java.sun.com/docs/books/tutorial/jdbc/index.html
    Good Luck,
    Avi.

  • PI 7.11: Cannot connect to server using message server:...

    Hello Guys,
    we make the Application Management for a Customer PI System.
    Scenario:
    - the SAP Gui Connection to the ABAP Stack is routed via SAPRouter and Works fine.
      SAP Gui -> our SAP Router -> VPN Box from Customer -> Firewall Customer -> ABAP Stack PI System
    - WebAccess its working fine, the Customer use Webdispatcher on every PI Server...
      Browser -> VPN Box from Customer -> Firewall Customer -> Java Stack (Port: 5xx00 btw. 81xx (Webdispatcher))
    Problem:
    Our Problem ist, we can not proceed the Integration Builder or the ESB, the Java Web Start works fine and open the Logon Screen Correctly -> but i fill the Logon Screen with my User name and Password and press Logon come the follwing Error:
    "Cannot connect to server using message server: ms://<hostname>.<domain>:8134/P4"
    In the Details from the Error Message:
    "<hostname>.<domain>:53404 Reason: com.sap.engine.services.rmi_p4.P4IOException:
    Cannot open connection to host: <IP-Adress of Central Instance> and Port: 53404"
    The Customer says, the Firewall is open with the IP Adresses and P4 Port but i dont think so...
    Can everybody help me, or have tips for me! I have checked a lot of OSS Messages (PI High Availabilty etc... its all correct on the System)
    Sorry for my bad English
    Best Regards,
    Markus

    Hi Markus,
    did you check if the browser is using a proxy? (In this case your scenario unfortunately won't work).
    P4-port should generally be routed via a proxy (described in the help.sap.com), but within the PI-Tools(JNLP) the proxy-usage is not implemented.  There is even a SAP-note that describes how to check the JavaWebStart-Proxyconfiguration, but this won't help either.
    If there is a proxy defined in the browser everything is working fine till you pass the logon-screen but even with the correct "javaws"-settings you won't be able to go on.
    (This problem is pretty bad if you do have developers and the SAP-servers seperated because of security issues. I'm hoping that this malfunction will be solved with upcoming patches.)
    Solution: Establish a connection without any proxy in between.
      E.g.: a terminal server in the same network
    It would be helpful to find more people with the same problem to force a fix from SAP for that.
    If anyone else is having problems with this, please add a comment to this thread.
    Best regards
    Christian

  • SAP Java Connectivity Builder -NoClassDefFoundError com.sap.aii...Reference

    Hi there,
    I'm trying to generate Java Proxies for SAPJCO using the SAP Java Connectivity Builder (JCB). I got it from the NetWeaver 6.20 Release. The tool installs and runs properly but after putting in the connection properties and klicking "next", the application hangs. When activating System output, I get the error shown below.
    I already tried to put all jar files contained in the C:\JBuilder5\lib\ext directiry into the classpath (but none of them contains the class mentioned).
    Which is the right (standalone) tool for generating Java Proxies for a standalone Java application?
    If it is JCB, is there a bug on the version I use (NetWeaver Release 6.20)?
    Any help would be apreciated.
    C:\JBuilder5>java -Dlog.handler.FileLog=FileHandler,log.txt -Dlog.logger.com=ALL,FileLog -cp lib/ext/aii_basis.jar;lib/e
    xt/aii_ifr_core.jar;lib/ext/aii_ifr_jbtool.jar;lib/ext/aii_lcraccess.jar;lib/ext/aii_msg_runtime.jar;lib/ext/aii_proxy_g
    en.jar;lib/ext/aii_proxy_rt.jar;lib/ext/aii_util.jar;lib/ext/aii_util_log.jar;lib/ext/lcrclient.jar;lib/ext/logging.jar;
    lib/ext/SapIdeHelp.jar;lib/ext/SapIdeJBUtil.jar;lib/ext/SapIdeJspInsight.jar;lib/ext/SapIdeTaglibReflection11.jar;lib/ex
    t/SapIdeTracing.jar;lib/ext/SapIdeUtil.jar;lib/ext/SAPJ2EEEngineJBuilderPlugin.jar;lib/ext/sapjco.jar;lib/ext/SAPmdi.jar
    ;lib/ext/servlet.jar;lib/ext/tc_sec_core.jar com.sap.aii.ifr.tool.jbuilder.JBuilderTool
    #0 12:35:37 [main] DEBUG com.sap.aii.util.misc.api.AIIProperties: Initial AIIProperties
            com.sap.aii.client = true
    #1 12:35:37 [main] FINE com.sap.aii.util.misc.api.AIIProperties: changed Property "com.sap.aii.standalone" from "null" t
    o "true"
    #2 12:35:37 [main] FINE com.sap.aii.util.misc.api.AIIProperties: changed Property "com.sap.aii.xml.parserFactory" from "
    null" to "com.inqmy.lib.jaxp.SAXParserFactoryImpl"
    #3 12:35:37 [main] FINE com.sap.aii.util.misc.api.AIIProperties: changed Property "com.sap.aii.xml.transformerFactory" f
    rom "null" to "com.inqmy.lib.jaxp.TransformerFactoryImpl"
    #4 12:35:46 [AWT-EventQueue-0] DEBUG com.sap.aii.ifr.upload.client.SAPNavigationPane: New file is C:\Documents and Setti
    ngs\kalkoo1\Desktop\t.jar
    #5 12:36:08 [AWT-EventQueue-0] FINER com.sap.aii.ifr.upload.client.R3LogonScreen: setting for Client : 010
    #6 12:36:08 [AWT-EventQueue-0] FINER com.sap.aii.ifr.upload.client.R3LogonScreen: setting for Logon Name : kalkoo1
    #7 12:36:08 [AWT-EventQueue-0] FINER com.sap.aii.ifr.upload.client.R3LogonScreen: setting for Password : #########
    #8 12:36:08 [AWT-EventQueue-0] FINER com.sap.aii.ifr.upload.client.R3LogonScreen: setting for Language : EN
    #9 12:36:08 [AWT-EventQueue-0] FINER com.sap.aii.ifr.upload.client.R3LogonScreen: setting for Host name: bgstsapedai01.s
    t.behr.de
    #10 12:36:08 [AWT-EventQueue-0] FINER com.sap.aii.ifr.upload.client.R3LogonScreen: setting for System number : 20
    #11 12:36:08 [AWT-EventQueue-0] INFO com.sap.aii.ifr.upload.client.R3LogonScreen: trying to establish connection
    #12 12:36:08 [AWT-EventQueue-0] FINEST com.sap.aii.ifr.util.IdentityCheck: Looking up identity
    #13 12:36:08 [AWT-EventQueue-0] DEBUG com.sap.aii.ifr.util.IdentityCheck: Results of identity check: isIFRServer: false;
    isIFRRMIClient: false; isStandaloneIFR: true
    #14 12:36:08 [AWT-EventQueue-0] FINEST com.sap.aii.ifr.util.IdentityCheck: Checking IdentityCheck.isIFRServer. Result: f
    alse
    #15 12:36:08 [AWT-EventQueue-0] INFO com.sap.aii.ifr.upload.sap.SAPConnection: connecting to system 20 on bgstsapedai01.
    st.behr.de via JCo
    #16 12:36:09 [AWT-EventQueue-0] DEBUG com.sap.aii.ifr.upload.sap.SAPUploadSource: init MDI to System bgstsapedai01.st.be
    hr.de (system=20, client=010) (BasisRelease: 620)
    #17 12:36:09 [AWT-EventQueue-0] DEBUG com.sap.aii.ifr.upload.UploadBuffer: new UploadBuffer
    Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/sap/aii/ifr/client/editor/Reference
            at java.lang.Class.getDeclaredMethods0(Native Method)
            at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
            at java.lang.Class.getDeclaredMethod(Unknown Source)
            at java.awt.Component.isCoalesceEventsOverriden(Unknown Source)
            at java.awt.Component.access$100(Unknown Source)
            at java.awt.Component$2.run(Unknown Source)
            at java.awt.Component$2.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.awt.Component.checkCoalescing(Unknown Source)
            at java.awt.Component.<init>(Unknown Source)
            at java.awt.Container.<init>(Unknown Source)
            at javax.swing.JComponent.<init>(Unknown Source)
            at javax.swing.JTree.<init>(Unknown Source)
            at javax.swing.JTree.<init>(Unknown Source)
            at com.sap.aii.ifr.navigation.IFRJTree.<init>(IFRJTree.java:84)
            at com.sap.aii.ifr.navigation.IFRTreePane.buildPane(IFRTreePane.java:123)
            at com.sap.aii.ifr.navigation.IFRTreePane.<init>(IFRTreePane.java:33)
            at com.sap.aii.ifr.upload.client.SAPNavigationPane.<init>(SAPNavigationPane.java:43)
            at com.sap.aii.ifr.upload.client.SAPBrowser.setIsConnected(SAPBrowser.java:252)
            at com.sap.aii.ifr.upload.client.SAPBrowser$ConnectAction.actionPerformed(SAPBrowser.java:594)
            at com.sap.aii.ifr.upload.client.SAPBrowser$NextAction.actionPerformed(SAPBrowser.java:536)
            at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
            at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
            at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
            at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
            at java.awt.Component.processMouseEvent(Unknown Source)
            at javax.swing.JComponent.processMouseEvent(Unknown Source)
            at java.awt.Component.processEvent(Unknown Source)
            at java.awt.Container.processEvent(Unknown Source)
            at java.awt.Component.dispatchEventImpl(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Window.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.EventQueue.dispatchEvent(Unknown Source)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.run(Unknown Source)

    Hi,
    >> Error :- java.lang.NoClassDefFoundError: com/sap/aii/security/proxy/KeystoreHelp
    1) Can you check the class path  you have mentioned  is correctly
    2) Setting of the Java in your system ( Desk top /Lap top ) check the Proxy settings
    3) Re start the J2EE engine in the server
    Regards
    Agasthuri Doss

  • How can I open an AS400 connection w/o using the ODBC in the Control Panel

    Hi.
    Is it possible that i manipulate the ODBC settings in Windows NT using Java?
    I've been using the Client Access ODBC Driver (32 bit) of IBM to connect to AS400 database. Normally i would just configure my DSN and input the default library inside the Server tab that i would be using . All was working perfectly. But i was informed that the default library would vary depending on the data inputed in the library database.
    As in, in our SQL Server they have there a tbl_library where in lib_type is one of it's field. This(lib_type) is where they can specify which library my program would be opening. So in this case, I can't just manually configure my DSN library when retrieving data from AS400 because it would always vary.
    Thank you very much for your time.
    -marlin
    ps.
    Btw, i am doing a servlet for this connectivity.

    If you use the JDBC driver that's included in the AS/400 Toolbox for Java you don't need to use ODBC at all, you can access the AS/400 directly. See this link:
    http://www-1.ibm.com/servers/eserver/iseries/toolbox/

  • How to create a iview in eclipse for connecting  R/3 using JCA?

    Hi everybody,
           I want to create a iview in eclipse for connecting  R/3 using JCA. Can any body send me java code for this purpose. i tried one example from sdn in eclipse but i did't get any code for the same.
    thanking you
    Rajendra

    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/sap connector examples download.htm

  • Crystal XI R2, Salesforce 3.0, Windows 7 64-bit, Java connection error

    All,
    I've got the same problem as this thread -- Re: CR XI R2: Salesforce 3.0 driver on Windows 7 64-bit?
    Crystal XI R2, Salesforce 3.0 downloaded from the Crystal page.  Using Windows 7 64-bit.  Have applied SP 5 per another thread.
    Continue to get JAVA error.  Java being used is 1.4 as installed by Crystal in the Crystal program directory.
    thanks, jhb

    Don,
    Still no go.  I get the same error.
    I uninstalled SP6, SP5, Salesforce Connector, and Crystal XI R2 SP2 and then re-installed everything.
    1) Crystal XI R2 SP2
    2) Salesforce connector 3.0
    3) SP5
    4) SP6
    Still get the same Java Connection error.  I've also disabled Windows Firewall.  I'm not behind a proxy.  I've tried with and without the security token.
    thanks, jhb

  • Oracle Java connectivity

    Hi,
    I have installed Oracle 10g on Fedora Core 6. I've been trying to connect to the database via java using jdk1.5(using both drivers, classes12.jar and ojdbc14.jar). But its giving an error Network Adapter Failed. Can any one shed some light on this. Individually both are working fine, oracle 10g and jdk1.5
    Thanks in advance
    Shanky

    Yeah....i was tryin to connect from the same system. And also i have checked the version of java to be jdk1.6. Are there any new drivers from oracle side for jdk1.6?
    Also which oracle driver should be used for jdk1.5?
    And btw....what is tnsping?
    I am able to connect to Oracle using SQL*Plus normally. What is meant by name resolution?
    Thanks in advance for your patience
    Regards
    Shanky

  • Connection Timeout error using Stubs

    Hi
    We are trying to connect to the CRM On Demand through one of our applications using the client Stub mechanism. But everytime we get the below error.
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
    faultString: WSWS3713E: Connection to the remote host secure-ausomxbta.crmondemand.com:443 failed.Received the following error: java.net.ConnectException: Connection timed out: no further information.
    faultActor: null
    faultDetail:
    WSWS3713E: Connection to the remote host secure-ausomxbta.crmondemand.com:443 failed.Received the following error: java.net.ConnectException: Connection timed out: no further information
         at com.ibm.ws.webservices.engine.transport.http.HttpOutboundChannelConnection.connect(HttpOutboundChannelConnection.java:936)
         at com.ibm.ws.webservices.engine.transport.http.HttpsOutboundChannelConnection.connect(HttpsOutboundChannelConnection.java:210)
         at com.ibm.ws.webservices.engine.transport.http.HTTPSender.invoke(HTTPSender.java:586)
         at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:249)
         at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:249)
         at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:336)
         at com.ibm.ws.webservices.engine.client.Connection.invokeEngine(Connection.java:937)
         at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:731)
         at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:680)
         at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:502)
         at com.ibm.ws.webservices.engine.client.Stub$Invoke.invoke(Stub.java:1007)
    We are using the URL as https://secure-ausomxbta.crmondemand.com/Services/Integration and the port as 443 in the QName object and setting in the Stub.
    Any help or lead would be of great help. Thanks in advance.
    Regards
    PM

    obvious question - can the machine you are running the code on actually reach the URL on that port? Did you verify with wireshark that you are making a request to that endpoint?
    Thanks

  • SSL Error while Consuming Java build SOAP services using Dotnet Console App

    Hi, I want to consume a SOAP service developed in JAVA. I don't have any control on Service side. I have to just consume the SOAP service using my client Application which is in DotNet Console Application using C#. Here is the detail about the service:
    1. The service has SSL configured.
    2. End point looks like: https://xyz.com:443
    3. I am able to connect the service using SOAP UI Tool by configuring the Tool with the certs given by Java developer.
    4. Basically there are two certs used, one for "client authentication" purpose and the second cert is for "WS security" purpose.
    5. When i add the WSDL to my client app as a service Reference, the generated App.config file looks as shown below:
    <configuration>
    system.serviceModel>
    <bindings>
    <basicHttpBinding>
    <binding name="Hello_HTTPBinding">
    </binding>
    </basicHttpBinding>
    </bindings>
    <client>
    <endpoint address="http://localhost:8080/" binding="basicHttpBinding"
    bindingConfiguration="Hello_HTTPBinding"
    contract="Proxy_Hello" name="Hello_HTTPPort" />
    </client>
    </system.serviceModel>
    </configuration>
    6. Basically I need to pass two certs, one cert used for "client authentication" purpose and the second cert is used for "WS security purpose".
    7. I have changed the above client configuration as below marked in RED color text:
    <configuration>
    system.serviceModel>
    <bindings>
    <basicHttpBinding>
    <binding name="Hello_HTTPBinding">
    <security mode="TransportWithMessageCredential" >
    <transport clientCredentialType="Certificate" proxyCredentialType="Basic" realm="" />
    <message clientCredentialType="Certificate" algorithmSuite="Basic128" />
    </security>
    </binding>
    </basicHttpBinding>
    </bindings>
    <client>
    <endpoint address="https://xyz.com:443"
    binding="basicHttpBinding"
    bindingConfiguration="Hello_HTTPBinding"
    contract="Proxy_Hello" name="Hello_HTTPPort" behaviorConfiguration="NewBehavior"/>
    </client>
    <behaviors>
    <endpointBehaviors>
    <behavior name="NewBehavior">
    <clientCredentials >
    <clientCertificate findValue="clientxyz.com" storeLocation="CurrentUser" storeName="My" x509FindType="FindBySubjectName" />
    <serviceCertificate>
    <defaultCertificate findValue="helloabc.com" storeLocation="CurrentUser" storeName="My" x509FindType="FindBySubjectName"/>
    </serviceCertificate>
    </clientCredentials>
    </behavior>
    </endpointBehaviors>
    </behaviors>
    </system.serviceModel>
    </configuration>
    8. I am assuming the cert required for WS security  will be passed using in<serviceCertificate> element, but not fully sure....correct me if I am wrong.
    9. By creating proxy object of the service when I am trying to call the required method I am getting this Error: "Could not establish
    secure channel for SSL/TLS with authority "******xyz.com."
    10. Its working perfect in SOAP UI Tool, generating the Raw XML as shown below in ORANGE color Text:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:gw-headers-100" xmlns:urn1="urn:gw-util-100">
    <soapenv:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <wsse:BinarySecurityToken EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"
    wsu:Id="X509-35309F239B754D9BA414230227616161">
    aaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbccccccccccccccccccccc********dddddddddddd*****eeeeeeeeee
    </wsse:BinarySecurityToken>
    <ds:Signature Id="SIG-2" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
    <ds:SignedInfo>
    <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
    <ec:InclusiveNamespaces PrefixList="soapenv urn urn1" xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    </ds:CanonicalizationMethod>
    <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
    <ds:Reference URI="#id-1">
    <ds:Transforms>
    <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
    <ec:InclusiveNamespaces PrefixList="urn urn1" xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    </ds:Transform>
    </ds:Transforms>
    <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
    <ds:DigestValue>
    abcabcabcabc******gggggg
    </ds:DigestValue>
    </ds:Reference>
    </ds:SignedInfo>
    <ds:SignatureValue>gggggg888******8sdsdsdss</ds:SignatureValue>
    <ds:KeyInfo Id="KI-38488AAAA222">
    <wsse:SecurityTokenReference wsu:Id="STR-ggggjj57557575">
    <wsse:Reference URI="#X509-74747477" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
    </wsse:SecurityTokenReference>
    </ds:KeyInfo>
    </ds:Signature>
    </wsse:Security>
    </soapenv:Header>
    <soapenv:Body wsu:Id="id-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <urn1:xxxxxxx>
    </urn1:xxxxxx>
    </soapenv:Body>
    </soapenv:Envelope>
    11. Using Dotnet Tracing I am able to see the Request XML generated from the console Application as shown below in BLUE color text: But getting the SSL error as: Could not establish secure channel
    for SSL/TLS with authority "******xyz.com.
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Header>
    <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <u:Timestamp u:Id="_0" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <u:Created>2015-02-04T04:19:29.825Z</u:Created>
    <u:Expires>2015-02-04T04:24:29.825Z</u:Expires>
    </u:Timestamp>
    <o:BinarySecurityToken>
    <!-- Removed-->
    </o:BinarySecurityToken>
    <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
    <SignedInfo>
    <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
    <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></SignatureMethod>
    <Reference URI="#_0">
    <Transforms>
    <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></Transform>
    </Transforms>
    <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>
    <DigestValue>aaaaaa****dddddd=</DigestValue>
    </Reference>
    </SignedInfo>
    <SignatureValue>ssssddddd888fffff****=</SignatureValue>
    <KeyInfo>
    <o:SecurityTokenReference>
    <o:Reference ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" URI="#uuid-93e09c54-aee8-4f45-a8a4-d63d8a2d63fb-1"></o:Reference>
    </o:SecurityTokenReference>
    </KeyInfo>
    </Signature>
    </o:Security>
    </s:Header>
    </s:Envelope>
    12. I want to Generate the Request XML from my Dotnet console Application simiar to the SOAP UI generated XML(refer #10).. Also want to get rid of SSL error....Appreciate your Suggestion..

    Hi tksdotnet,
    This forum is used to discuss the questions about the WCF web service, for java web services questions, it will be better to post in this forum:
    #WCF, ASMX and other Web Services:
    http://forums.asp.net/28.aspx/1?WCF+ASMX+and+other+Web+Services .
    Thanks for your understanding.
    Best Regards,
    Amy Peng
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Unable to connect to Oracle using OCI Drivers on Linux

    Hi Everyone!
    I am facing a peculiar issue while using Instant Client on Linux ( 64Bit ) running on Red Hat 4.1.
    I have downloaded the instant client version 10.2.0.3(.zip) .so files from the below URL
    http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxx86_64soft.html
    UPloaded all the files to a directory under /opt and changed the .bash_profile file, the latest content looks like
    ORACLE_HOME=/opt/instantclient_10_2
    export ORACLE_HOME
    PATH=$PATH:$ORACLE_HOME
    export PATH
    TNS_ADMIN=/opt/instantclient_10_2
    export TNS_ADMIN
    LD_LIBRARY_PATH=/opt/instantclient_10_2
    export LD_LIBRARY_PATH
    PATH=$PATH:$LD_LIBRARY_PATH
    export PATH
    CLASSPATH=/opt/instantclient_10_2:/opt/instantclient_10_2/ojdbc.jar
    export CLASSPATH
    Java.library.path=/opt/instantclient_10_2
    export Java.library.path
    As i have downloaded the Sqlplus utility as well, i am able to connect to the Oracle FARM via sqlplus.
    On the other hand, i am unable to connect to the same database via the application. It constantly gives me the following exception,
    java.lang.UnsatisfiedLinkError: no ocijdbc10 in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
    at java.lang.Runtime.loadLibrary0(Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1030)
    at oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:3138)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:3134)
    at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:220)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:438)
    at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:131)
    at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:77)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:752)
    at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:296)
    at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:220)
    at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:164)
    at com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection(DSManagedConnectionFactory.java:105)
    at com.sun.enterprise.resource.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:68)
    at com.sun.enterprise.resource.AbstractResourcePool.createSingleResource(AbstractResourcePool.java:891)
    at com.sun.enterprise.resource.AbstractResourcePool.createResourceAndAddToPool(AbstractResourcePool.java:1752)
    at com.sun.enterprise.resource.AbstractResourcePool.createResources(AbstractResourcePool.java:917)
    at com.sun.enterprise.resource.AbstractResourcePool.initPool(AbstractResourcePool.java:225)
    at com.sun.enterprise.resource.AbstractResourcePool.internalGetResource(AbstractResourcePool.java:516)
    at com.sun.enterprise.resource.AbstractResourcePool.getResource(AbstractResourcePool.java:443)
    at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:248)
    at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:176)
    at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:327)
    at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:235)
    at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
    at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158)
    at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:108)
    at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113)
    at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79)
    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:922)
    at org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:984)
    at org.springframework.jdbc.object.StoredProcedure.execute(StoredProcedure.java:117)
    at com.gecf.uk.pca.dcs.util.SystemParametersDAO$SysParamsStoredProcedure.execute(SystemParametersDAO.java:150)
    at com.gecf.uk.pca.dcs.util.SystemParametersDAO.getSystemParametersList(SystemParametersDAO.java:67)
    at com.gecf.uk.pca.dcs.util.SystemParametersDAO.getSystemParametersMap(SystemParametersDAO.java:94)
    at com.gecf.uk.pca.dcs.util.SystemParameters.loadParameters(SystemParameters.java:44)
    at com.gecf.uk.pca.dcs.util.SystemParameters.<init>(SystemParameters.java:33)
    at com.gecf.uk.pca.dcs.util.SystemParameters.getInstance(SystemParameters.java:72)
    at org.apache.jsp.common.secure.mypayment_jsp._jspService(mypayment_jsp.java from :86)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at com.gecf.uk.pca.dcs.web.util.SessionFilter.doFilter(SessionFilter.java:97)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    |#]
    I have used the classes12.jar and ojdbc.jar which came with the download and nothing seems to work. A bit surprising when sqlplus works and not the application. I suspect there could be an issue with the driver class. I have been struggling to figure this out for days now...
    Can anyone please share their thoughts if something similar was observed earlier please.
    Any quick help will highly be appreciated.

    ORACLE_HOME=/opt/instantclient_10_2
    export ORACLE_HOMEYou don't set ORACLE_HOME with Instant Client.
    PATH=$PATH:$LD_LIBRARY_PATH
    export PATHThis is unnecessary.
    CLASSPATH=/opt/instantclient_10_2:/opt/instantclient_10_2/ojdbc.jar
    export CLASSPATHThis is wrong.
    It should be:
    CLASSPATH=/opt/instantclient_10_2/ojdbc14.jar:<whatever else you need there>
    Java.library.path=/opt/instantclient_10_2
    export Java.library.pathThis is useless; java.library.path is not an environment variable.
    java.lang.UnsatisfiedLinkError: no ocijdbc10 in java.library.pathThe case is pretty clear. You want to use the OCI driver (your URL starts with "jdbc:oracle:oci:"), so the Java Virtual Machine is looking for libocijdbc10.so in the Java library path but cannot find it.
    What is also clear is that the program does not use the CLASSPATH environment variable you set, because then it would never have found the Oracle Driver.
    So it seems that your program is ignoring the environment you set (which would explain why it also ignores LD_LIBRARY_PATH which you set correctly).
    You must have the environment variables set and exported in the shell that starts the "java" executable.
    Also, check that there is no other ojdbc14.jar on this machine (use "find").
    To help you debug your problem, let me explain how Sun Java sets Java library path on Linux:
    - If you start java with "java -Djava.library.path=/some/dir:/other/dir ...", the Java library path is set to exactly that value.
    - If you do not specify -Djava.library.path, the Java library path is taken from the environment variable LD_LIBRARY_PATH.
    - Directories listed in /etc/ld.so.conf have no influence on the Java library path (which gave me quite a headache in the beginning).
    Do you really need the OCI Driver? If you can do with the Thin Driver (i.e., use an URL that starts with "jdbc:oracle:thin:") you don't need any shared libraries at all.
    Yours,
    Laurenz Albe

  • Dblink to SqlServer using more than one user...

    Hi All,
    I'm in a migration project, SqlServer to Oracle. I'm using the Transparent Gateway to connect from Oracle to SqlServer, using the database link process.
    When I created the dblink I used the SA (SqlServer sysdba user), and in the future tests I need to connec with others users, not SA.
    Anyone knows how can I create a dblink to connect with more than one user?
    Thanks,
    Gustavo.

    you need to create a new database link.

Maybe you are looking for

  • Creation of Sales Order through EDI

    Hi Can anybody explain in detail the configuration steps involved in creating the sales order through EDI. If possible with screen shots. Points will be rewarded. Thanking you chan

  • Dll issue, works in release.exe but not in debug mode.

    I have an issue with a dll that was previously working in both released and in debug mode.  Now if I create a released .exe it functions.  If I run it in debug mode the call to the dll function never returns.  eventually whatever is occurring behind

  • IDVD slideshow photo resolution

    iMac G5   Mac OS X (10.4.3)   From previous posts, it seems that iDVD photo resolution is always less than viewing a iPhoto slideshow while in that application. So here is my question: When I use the option of sharing the photos, iDVD creates a "slid

  • Shuffle icon from most recent update rendered next to useless !!

    I love my 64g touch very much. I do construction work & it is vital to the work day. Well since the most recent update which i downloaded & installed like 2 weeks ago the "shuffle" icon is a choice between either shuffle or repeat 1 song over & over

  • Superdrive won't read or burn DVDs

    A few days ago I tried backing up my iTunes by using the File- Back up to Discs. The first go round never really got started as I discovered I wasn't using the appropriate DVDs. ( They were 16X). I went out and got some new DVD-rs 1X-16X and tried ag