Cant create JDBC Connections in RMI Server

I am having a pretty weird problem which I am struggling with for the last three days. In the main method of the Server object, following three things are supposed to happen:
1) Creation of a JDBC Connection
2) Creation of a Remote Object and then publishing the same to Registry.
3) Creation of another JDBC Connection (exactly same as in step1)
step 1 and 2 successfully executes and the third one always errors out. I just simply get a NullPointerException.
If I comment out step 2, step 3 executes successfully. Can someone please tell me the mystery? I need your response really urgently so please help me.
TIA
Code Snippet:
 public static void main(String[] args) {
  System.setSecurityManager(new RMISecurityManager());
  try {
   Properties dbProps = new Properties();
   dbProps.put("user", "SDAWOODI");
   dbProps.put("password", "SDAWOODI");
   java.sql.Connection connection =    java.sql.DriverManager.getConnection("jdbc:oracle:thin:@wonder.cisco.com:1521:ODSDEV", dbProps);
  catch (Exception sqle) {
   System.out.println("[11111]"+sqle.toString());
  Properties props = new Properties();
  props.put("java.rmi.server.codebase", rmiCodeBase);
  System.setProperties(props);
  try {
   SchedulerRImpl schedulerR = new SchedulerRImpl(ssce_sch1);
   String nameStr = "s-sce-scheduler";
   try {
    Naming.bind(nameStr, schedulerR);
    if (Scheduler.m_debug_flag) System.out.println("[Scheduler.main] Scheduler bound with RMI registry!!!");
   catch (AlreadyBoundException abe) {
    if (Scheduler.m_debug_flag) System.out.println("[Scheduler.main] Scheduler is already bound with RMI registry ... trying RE-bind ...");
    try {
     Naming.rebind(nameStr, schedulerR);
     if (Scheduler.m_debug_flag) System.out.println("[Scheduler.main] Scheduler RE-bound with RMI registry!!!");
    catch (Exception e) {
     if (Scheduler.m_debug_flag) System.out.println("[Scheduler.main] Rcheduler RE-binding failed :(((");
  catch (Exception e) {
   if (Scheduler.m_debug_flag) System.out.println("[Scheduler.main] SchedulerR instantiation failed:((( : "+e.toString());
  Properties dbProps2 = new Properties();
  dbProps2.put("user", "SDAWOODI");
  dbProps2.put("password", "SDAWOODI");
  try {
   java.sql.Connection connection2 = java.sql.DriverManager.getConnection("jdbc:oracle:thin:@wonder.cisco.com:1521:ODSDEV", dbProps2);
   if (connection2==null) {
   System.out.println("connection is NULL");
  else {
   System.out.println("connection is NOT null");
 catch (Exception sqle2) {
  System.out.println("[22222]"+sqle2.toString());
}

In reply to reply #4:
You can also quote the other part of my reply when it comes to snippets. There are so many pieces of code missing from your snippet that I simply cannot guess what is wrong. (Please do not put your entire class structures here.)
We get connections in many different classes at many different times. It is after all an application that does user work and the user work involves database accesses. Some of those accesses are before RMI (to establish repositories, etc). Most are after.
This URL (jdbc:oracle:thin:@wonder.cisco.com:1521:ODSDEV) appears to use a network connection (yes?). Is the 1521 a port? Are you trying to reuse this port? (the first conn uses the same URL). What port does RMI use?
There is nothing in your snippet that stands out obviously as "this is wrong".
RMI uses networking. JDBC uses networking.
Try substituting some other networking code in place of the RMI code and see if you still get a null trying the second connection. As you say, if you leave out the RMI code the second get.conn works.
Try leaving out the first get.conn. Do the RMI and second get.conn.
Try this and try that and try some more. I once had this problem with a network printer that would not print. The code was fine. The URL was fine. The response from the network and printer were both fine. The damn thing just wasn't printing. Turns out there was this bit, yes a single bit, in one word of a property called the "start print bit". If this bit wasn't on, nothing happened. I tried every combination until I finally found it.
I wish you the best.

Similar Messages

  • Unable to create dynamic JDBC Connections in RMI Server

    Hi,
    Goal: Using Swing client to connect to a variety of JDBC databases via RMI dynamically....
    J2SE : 1.4.2
    J2EE: 1.31
    Databases: Oracle 9i(R2), MySQL 4.0, MS Access 2000
    Platform : Windows 2000 SP4 (Professional and Server)
    I have a working client-server application using RMI to connect to a single database. I want the ability
    to create JDBC connections dynmically by invoking a RMI method after it has been bound. Presently
    I am getting null pointers. Anybody offer any solutions or work arounds?

    Goal: Using Swing client to connect to a variety of
    JDBC databases via RMI dynamically....Actually what u want from the client swing is to form a Form using the datamodel from the database, invoke query as the client is allowed and wants and update changes. I hope I got it right, thats what u want.
    Actually as per my knowledge goes thats what any Database 3-tier program should do.
    I have a working client-server application using RMI
    to connect to a single database. I want the ability
    to create JDBC connections dynmically by invoking a
    RMI method after it has been bound. Presently
    I am getting null pointers. Anybody offer any
    solutions or work arounds?Database connections are only needed as long as the query to the database are being processed. So for ur solution if u have a RMI method that, will invoke first, the database connection and then process the query and then disconnect it , would be enough. When multiple clients will call the method there will be multiple connections to the database as they can have threads working or if u want one process at a time u can sycronize the method. This RMI method will only return the result set of the query and that would be enough for ur solution. Now to be able to say why ur getting null pointers I would need the code u r using.

  • How to create JDBC connection in J2ME with MS-SQL server?

    I need to have database connection in PDA with SQL server,as i am new to J2ME ,i dont know how to create jdbc connection on J2ME device.Please help me out with this problem........

    I need to have database connection in PDA with SQL server,as i am new to J2ME ,i dont know how to create jdbc connection on J2ME device.Please help me out with this problem........

  • Problem while creating JCA connection to MDM server

    Hi All,
    I have restarted my mdm connector(com.sap.mdm.tech.connector) along with the applications related to Enrichment Controller. All applications restarted successfully. After that I tried accessing the URL
    http://MDMSERVER:50000/MDM_EnrichmentController/WorkflowPolling?process=Monitor
    but I am getting following exception in this page
    Polling Repository
        name=Vijaybabu_Repo_on_MDMSERVER, status=No repository connection, error description=com.sap.mdm.net.ConnectionException: Problem while creating JCA connection to MDM server MDMSERVER
            Enrichment Request Threads
    Could somebody help me pointing if something I have missed..
    Thanks and Regards,
    Manoj

    hi Swarna,
    I have verified the repository and found 0 fatal errors, 0 non-fatal erros and 0 warnings. I also checked the MDM Factory and Connector service is running fine.
    The detailed exception is
    Sep 2, 2008 12:49:40 PM com.sap.mdm.logging.MdmLogger error
    SEVERE: Problem while creating JCA connection to MDM server 'KOLAPON'
    com.sap.mdm.net.ConnectionException: Can not resolve JCA connection
         at com.sap.mdm.internal.session.JcaConnectionUtil.getJcaConnection(JcaConnectionUtil.java:119)
         at com.sap.mdm.internal.session.JcaConnectionUtil.getJcaConnectionAccessor(JcaConnectionUtil.java:62)
         at com.sap.mdm.internal.session.JcaConnectionAccessor.reserveConnection(JcaConnectionAccessor.java:70)
         at com.sap.mdm.internal.session.JcaConnectionAccessor.reserveConnection(JcaConnectionAccessor.java:59)
         at com.sap.mdm.repository.commands.GetRepositoryStatusCommand.execute(GetRepositoryStatusCommand.java:67)
         at com.sap.mdm.enrichment.common.ECAdminUtils.getRepositoryStatus(ECAdminUtils.java:125)
         at com.sap.mdm.enrichment.common.EnrichmentUtils.validateRepostiryConfiguration(EnrichmentUtils.java:889)
         at com.sap.mdm.enrichment.common.EnrichmentUtils.getCatalogManager(EnrichmentUtils.java:144)
         at com.sap.mdm.enrichment.workflowpolling.PollingThread.getCatalogManager(PollingThread.java:166)
         at com.sap.mdm.enrichment.workflowpolling.PollingThread.run(PollingThread.java:102)
    Caused by: com.sapportals.connector.connection.ConnectionFailedException: Connection Failed: "ConnectionManager" is closed. Possible reasons: 1) connector "MDM Factory" is stopped or not started, 2) Connector service is stopped or has not been started.
         at com.sap.mdm.connector.connection.MdmConnectionFactory.getConnectionEx(MdmConnectionFactory.java:223)
         at com.sap.mdm.internal.session.JcaConnectionUtil.getJcaConnection(JcaConnectionUtil.java:108)
         ... 9 more
    Caused by: com.sap.engine.services.connector.exceptions.BaseResourceException: "ConnectionManager" is closed. Possible reasons: 1) connector "MDM Factory" is stopped or not started, 2) Connector service is stopped or has not been started.
         at com.sap.engine.services.connector.jca.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:122)
         at com.sap.mdm.connector.connection.MdmConnectionFactory.getConnectionEx(MdmConnectionFactory.java:213)
         ... 10 more
    Regards,
    Manoj
    Edited by: Manoj Kumar Nanda on Sep 2, 2008 9:21 AM

  • Some times on Tomcat start up it creates SSL error while JDBC connection to SQL server

    We are using Apache Tomcat 6 and SQL server 2008 on production. In the application in ServletContextListner we make DB connection to read some property from DB. When we restart the Tomcat 6.0 in that case sometimes it does not gets DB connection till 5 to
    10 minutes. It does not happen every time. We are using JNDI for getting the Datasource objectand using SQL JDBC 3.0 driver. We get following error in log
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "Connection reset by peer: socket write error".)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
    at com.rightwave.util.RWDBConnectionManager.getConnection(RWDBConnectionManager.java:145)
    at com.rightwave.util.RWDataBaseDAO.executeQuery(RWDataBaseDAO.java:306)
    at com.rightwave.util.RWDataBaseDAO.executeQuery(RWDataBaseDAO.java:289)
    at com.rightwave.admin.RWApplicationContext.setMConfigurationProperties(RWApplicationContext.java:226)
    at com.rightwave.admin.RWAdminApplicationContext.initialize(RWAdminApplicationContext.java:85)
    at com.rightwave.admin.RWServletContextListener.contextInitialized(RWServletContextListener.java:186)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627)
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "Connection reset by peer: socket write error".
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1368)
    at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1412)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1058)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:833)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:716)
    at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:841)
    at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
    at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
    ... 31 more
    Caused by: java.io.IOException: Connection reset by peer: socket write error
    at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.ensureSSLPayload(IOBuffer.java:500)
    at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.readInternal(IOBuffer.java:570)
    at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.read(IOBuffer.java:562)
    at com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream.readInternal(IOBuffer.java:757)
    at com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream.read(IOBuffer.java:745)
    at com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown Source)
    at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1379)
    ... 39 more
    Urgent help will be appreciated. 

    So, you've got a network error.. Check your physical layer.

  • Creating jdbc connection pool in weblogic 8.x server using oracle database

    Hi
    i am having oracle 9.2.0 and weblogic 8.1. i am new to oracle and jdbc connection pool. can any one explain how to make connection pool in weblogic.
    what will be the host name, port number??
    can any one explain
    regards,
    sekar.r

    The host name is the name or IP address of the machine running Oracle.
    The port number is the port the DBMS is listening on for connection requests.

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

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

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

  • JDBC connection to SQL Server 2000 Service Pack 4

    Hello Everyone,
    I'm trying to do a simple application which save some values into a MS SQL Server 2000 Database's Table.
    The source code I've written is:
    package Logging;
    import com.brekeke.net.sip.sv.session.*;
    import com.brekeke.net.sip.sv.session.plugins.*;
    import java.io.*;
    import java.util.*;
    import java.sql.*;
    public class Logging extends AccountingBase {
    public int eventSessionStart( EventStat evstat, String[] argprm )
    int ris =0;
    int line=999;
    try {
    EventStat a;
    a = evstat ;
    String username;
    username=a.urlCaller;
    String callee;
    callee=a.urlCallee;
    Statement stmt = null;
    try {
    line=1;
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    line=2;
    Connection conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://BSSQL:1433;DataBaseName=Test;User=sa;Password=biesse");
    line=3;
    // Create and execute an SQL statement that returns some data.
    String SQL = "INSERT INTO log VALUES ('" + a.urlCaller + "','" + a.urlCallee + "')";
    line=4;
    stmt = conn.createStatement();
    line=5;
    line=stmt.executeUpdate(SQL);
    line=10;
    catch (Exception e) {
    e.printStackTrace();
    finally {
    if (stmt != null) try { stmt.close(); } catch(Exception e) {}
    File f = new File("c:/prova.txt");
    FileOutputStream fos=new FileOutputStream(f);
    PrintStream ps=new PrintStream(fos);
    ps.println(line);
    ps.println(a.urlCaller);
    ps.println(a.urlCallee);
    fos.close();
    catch ( Exception ex ) {
    return ris;
    The problem is that into the Table no value is written, no problem compiling it and into the file prova.txt I can see only the value line=1 written!
    So there should be something wrong in the connection.
    I've already installed the JDBC drivers for SQL Server 2000 and I've addedd into the libraries the "msbase.jar, the mssqlserver.jar and the msutil.jar".
    But nothjng written into the Database :-(
    Can you help me please?
    Thank you very much in advance,
    Best Regards
    Francesco

    Hi,
    Yes i am able to connect from ISQL. Only connecting from JDBC is a problem.

  • Pooled jdbc connection(s), and server resources

    Hello All,
    I am curious about the difference between jdbc connections in a connections pool, and 'stand alone' connection. I have Oracle 9.2
    To describe...
    In my application server (WebLogic) I have a connection pool, with 10 connections. Does this take less server resources than 10 separate connections? I notice that there are still 10 server processes appearing.
    thanks!
    JM
    the jdbc Programmer's Guide and Reference says...
    (( start quote ))
    A pooled connection instance encapsulates a physical connection to a database. This
    database would be the one specified in the connection properties of the connection
    pool data source instance used to produce the pooled connection instance.
    A pooled connection instance is an instance of a class that implements the standard
    javax.sql.PooledConnection interface. The getConnection() method
    specified by this interface returns a logical connection instance that acts as a
    temporary handle to the physical connection, as opposed to encapsulating the
    physical connection, as does a non-pooling connection instance:
    (( end quote ))
    ...I had the impression that a connection pool of 10, results in one 'physical' connection. But it appears not!

    No, and yes...
    A pool of 10 connections creates 10 physical database connections, which require exactly the same resources as 10 connections from a standalone Java app or 10 connections from SQL*Plus.
    The connection pool, however, allows those 10 physical connections to server one the order of 100 logical connections (in an average OLTP application). If you have a JSP page that opens a connection, runs a couple of DML statements, and closes the connection, having a connection pool greatly reduces the load on the database because it does not have to create a new physical connection for every JSP page-- the JSP page gets a connection from the pool, uses it for a bit, and returns it to the pool where it can be assigned to another JSP page. Because each user only needs the connection a small percentage of the time, you can server many physical users with only 1 physical database connection.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Unable to create a connection to application server

    I am using JDev 10.1.3.0.3
    I also have standalone OC4J10.1.3 installed on my system.
    I am trying to create a connection to the application server by providing the correct username,pwd of the OC4J instance.I've alo checked correctness of rmi port.My oc4j instance is using port 8889 for http.But on saying test connection,it continues to test forever without returning any messages.

    Hi,
    the ormi port - the default is 23791 - is what you need, not the http port. The password should be the one of oc4jadmin (assuming you run OC4J 10.1.3)
    Frank

  • Cannot create new connection to SQL Server

    When I try to create a connection from Oracle Sql Developer to SQL Server I get the following message:
    Status: Failure -I/O Error: SSO Failed; Native SSPI Library not loaded. Check the java.library.path system property.

    check if you installed JTDS driver. If not,
    - go to http://sourceforge.net/project/showfiles.php?group_id=33291,
    - extract the jar file,
    - copy it to a convenient location (SQL Developer subfolder would be preferable)
    - start sql developer and go to properties
    - expand Database, go to Third Party JDBC drivers and add the .jar file above.
    - recheck the connection.
    Good luck,
    Andrei

  • Enable SSL between oracle JDBC Connection in weblogic server.

    Hi ALL,
    I have an requirement to enable SSL Mechanism in weblogic JDBC Connection Pool.we are using Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production and Driver as "jdbc:oracle:thin@..." / oracle.jdbc.OracleDriver.
    weblogic server 8.1 SP4
    can anybody know what are the steps / configuration has to be done for enable Oracle Advanced Security encryption on the JDBC Oracle Thin driver with a WebLogic JDBC Connection Pool.
    Thanks,
    Karthik,

    Hi,
    I changed the code as given below. Still getting the same error. Can I migrate my question to jdbc section? I am new to this forum.
    import java.sql.*;
    public class jdbc {
    public static void main(String[] args) throws ClassNotFoundException, SQLException
    Class.forName("oracle.jdbc.driver.OracleDriver");
    String url = "jdbc:oracle:thin:@localhost:1521:xe";
    Connection conn =
    DriverManager.getConnection(url,"jestin","jj");
    conn.setAutoCommit(false);
    Statement stmt = conn.createStatement();
    ResultSet rset =
    stmt.executeQuery("select BANNER from SYS.V_$VERSION");
    while (rset.next()) {
    System.out.println (rset.getString(1));
    stmt.close();
    System.out.println ("Ok.");
    jestinjoy@debian:~/java$ javac -classpath /usr/lib/java/ jdbc.java
    jestinjoy@debian:~/java$ java jdbc
    Exception in thread "main" java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:169)
         at jdbc.main(jdbc.java:7)
    same error when I give the command without classpath

  • ABAP statement for JDBC connection to SQL server

    Hi Gurus,
    i need to connect a WebDynpro abap to a SQL server.
    My OS is Unix so i cannot use a ODBC connection.
    Can anyone help me to know if it's possible to write an abap statement to connect the SQL server by JDBC connection?
    thanks a lot
    Regards
    Claudio.

    Hi,
          ELSEIF SCREEN-GROUP2 = 'PRO'.
          clear: list.
          if screen-name = 'ZAVBAK-ZZPROMO_ID'.
            exec sql.
       commit
              set connection :'CBREPOSITORYPRD'
            endexec.
            exec sql.
              CONNECT TO :'CBREPOSITORYPRD'
            endexec.
            exec sql.
              COMMIT
            endexec
          EXEC SQL.
              OPEN C1 FOR
              SELECT CutterRewardsUserListid,
                     SAPAccountNumber,
                     PromoID,
                     FirstName,
                     LastName
                     FROM CutterRewardsUserList
                     WHERE SAPAccountNumber = :XVBPA-KUNNR ORDER BY PromoID
            ENDEXEC.
            DO.
              EXEC SQL.
                FETCH NEXT C1 INTO :WA5
              ENDEXEC.
              IF SY-SUBRC = 0.
                PERFORM UPDATE_LIST.
              ELSE.
                EXIT.
              ENDIF.
            ENDDO.
            EXEC SQL.
              CLOSE C1
            ENDEXEC.

  • Do we need to create ODBC connection on sql server-cube for OLAP connection?

    need to create olap connection sql server cube .....?

    Hi Wafa,
    Thanks for quick reply.
    Actually i don't have username or password.if you don't mind can you share me the document of this thread: 1623999 - How to make a connection to Microsoft SQL Server Analysis
    Services in Business Objects Enterprise 4.0
    please i want to fixed this issues so help me
    Regards
    Mustafa

  • What can't client connect to RMI server on same machine?

    I'm trying to get a client to connect to an RMI server that resides on the same machine, but it's not working. When run, I get the following exception:
    java.rmi.ConnectException: Connection refused to host: 121.0.0.55; nested exception is:
    java.net.ConnectException: Connection refused
    java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120)
    at java.net.Socket.<init>(Socket.java:273)
    at java.net.Socket.<init>(Socket.java:100)
    at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:25)
    The machine in question is a Solaris 8 system running Java 1.3. I've checked all the networking permissions, and they seem to be ok. Any ideas as to what might be causing this?

    Thanks for the reply! Dumb question: How do I start the registry? I see debugging code that indicates that the server is [probably] being started.
    Usually this means that the registry isn't running or
    the server isn't running.

Maybe you are looking for

  • APP edit proposal showing the follwing error

    Hi gurus while doing APP after creation of payment proposal, when i click the edit proposal button i am getting the following error. please follow the bellow help topic below. how to resolve the problem. Company codes CARL/CARL do not appear in propo

  • RAW  file converting to jpg?

    How to I convert a RAW file to a JPG format without opening the RAW file in ACR? Richard Cooper

  • Masking password on command line

    anyone know how to mask password from command line input before version 1.4 ? thx

  • Wanted : used copy of DW CS3 for Mac

    This is a long shot, but if anyone has a copy of DW CS3 for Mac they would like to get rid of, please PM me, thanks.

  • Why in the world won't it charge?

    okay...need help fast! my pretty pink ipod mini is in trouble...it won't charge! i kept it in my bag for about 2 weeks without being recharged...then i plugged it into my computer and left it overnight. it didn't respond AT ALL. i then tried the 5 R'