Run a java class in Oracle db to connect to Sybase

Hi All, I'm looking for a way to connect to Sybase database at no-license-cost (meaning Oracle Gateway or similar 3rd party products), first coming idea was JDBC, I know I can run a java class in Oracle, the simple idea is to write a java class which connects to Sybase via JDBC thin driver and return the resultset of given query in a java class, the resultset will be presented in Oracle Apex framework.  Does anyone know if this can be done or not, and how?  Any howto articles are welcomed.
Henry

Henry:
To connect to Sysbase or MsSQL Server you could use jTDS open source driver.
http://sourceforge.net/projects/jtds/
upload above driver (jar file) using loadjava, and grants the port connection using dbms_java.grant_permission procedure.
Because jTDS is pure java driver (mode 4) is possible to use directly inside the RDBMS.
Best regards, Marcelo.
PD: Latest jtds driver is compiled against 1.6 sources, but oldest version will work with 1.5 for 11g.

Similar Messages

  • Java class in oracle apps forms

    java class in oracle apps forms
    We developed a java class and its running perfectly on local machine (Over the web through java applet ) But when we deployed it in apps and run with the client machine its not running .so please suggest where we put our java class files and how to run it in apps? Is there any API's .
    regards,
    krishna

    Hi user;
    What is your Client Operayting system, what is your browser?
    This error happens for one client or for all? Did you try to login from one other machine(for instance XP) and dif. browser version?
    Please check below which could be helpful for your issue:
    FRM-92101:
    Recommended Browsers for Oracle E-Business Suite Release 12 [ID 389422.1]
    FRM-92101: There Was a Failure in the Forms Server During Startup After Fresh R12 Installation [ID 429627.1]
    R12 fresh install FORMS DO NOT LAUNCH - FRM-92101/500 [ID 427714.1]
    FRM-92101: Forms Server oracle.forms.net.ConnectionException: Forms session <1> failed during startup: no response from runtime process [ID 880088.1]
    Also check:
    http://onlineappsdba.com/index.php/2009/06/15/frm-92101-with-internet-explorer-8-how-to-uninstall-ie8/
    Re: R12 database and JRE Issue
    Regard
    Helios

  • Running a Java Class in Apps Server?

    Does anyone have a clue how to just simply run an existing *.class using Oracle Apps Server as the web server listener?
    I'm assuming there is some default path that I should place my *.class file in??? Or some unique way to call it from the <applet> tag???
    null

    Thanks your response. I'm on sp3.
    The application is "Factory".
    The Java Project in "Factory".
    In the Java project there is a folder "pac", in that folder there is a class with a main method called "ProviderClient"
    In the "Factory" Java project properties/debugger window, Build before debugging is checked, also Create new process. Main class: pac.ProviderClient
    Home directory: C:/bea/user_projects/MyApps/Factory/Factory/
    (It was put there autopmatically when I clicked Browse as you said).
    When I run I get:
    Trying to create process and attach to 3640...
    Starting process in C:\bea\user_projects\MyApps\Factory\Factory
    C:\bea\jdk142_04\bin\javaw.exe -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=3640,suspend=y,server=y -classpath "C:\bea\user_projects\MyApps\Factory\APP-INF\lib\Factory.jar;C:\bea\user_projects\MyApps\Factory\EJBs.jar;C:\bea\jdk142_04\jre\lib\rt.jar;C:\bea\jdk142_04\jre\lib\jsse.jar;C:\bea\jdk142_04\jre\lib\jce.jar;C:\bea\jdk142_04\lib\tools.jar;C:\bea\weblogic81\server\lib\knex.jar;C:\bea\weblogic81\common\lib\log4j.jar;C:\bea\weblogic81\server\lib\debugging.jar;C:\bea\weblogic81\javelin\lib\javelin.jar;C:\bea\weblogic81\server\lib\wlw-lang.jar;C:\bea\weblogic81\server\lib\weblogic.jar;C:\bea\weblogic81\common\eval\pointbase\lib\pbserver44.jar;C:\bea\weblogic81\common\eval\pointbase\lib\pbclient44.jar;C:\bea\weblogic81\server\lib\webservices.jar;C:\bea\weblogic81\server\lib\webserviceclient.jar;C:\bea\weblogic81\server\lib\webserviceclient+ssl.jar;C:\bea\weblogic81\server\lib\wli.jar;C:\bea\weblogic81\server\lib\xbean.jar;C:\bea\weblogic81\server\lib\wlxbean.jar;C:\bea\weblogic81\server\lib\xqrl.jar;C:\bea\weblogic81\server\lib\netui\netui-compiler.jar" pac.ProviderClient
    Process started
    After a long time I get "Could not attach to debuggee process.
    Debugging Finished"
    What am I doing wrong?

  • How can I compile and run other java classes from within an application?

    Hello there everyone! I really hope that someone can help me. I am writing a program that must be able to compile and run other java classes that are in different files, much like development environments like Kawa or Forte allow you to do.
    There has to be a way of doing this ( I hope!! ), but i can't seem to find it!!
    I have tried using this command to compile:
    Runtime.getRuntime().exec ("c:\\programs\\javac className.java");
    ...and this one to run:
    Runtime.getRuntime().exec ("c:\\programs\\java className");
    ...but neither works!!! I can compile and run classes that are in the same file as my application, but I can't get it to work at all for files in different directories or files.
    PLEASE, PLEASE, PLEASE help me - i've run out of ideas, and i need this to be working in 3 days!!!
    Thank you very much for any help anyone can give me, I really appreciate it!! Thanks again!!
    Adrian ( ...in distress!! )

    public class JavaCompiler{
       public static void main(String[] args)throws Exception{ //sorry bout the laziness
          if(args == null || args.length != 1){
             System.out.println("Usage: java JavaCompiler MyClass.java");
             System.exit(0);
          String className = args[0];
          Runtime rt = Runtime.getRuntime();
          Process p = rt.exec("javac " + className); //consider setting cpath for this
          p.waitFor();
          //now try to run after it is done.
          p = rt.exec("java " + className.substring(0, (className.length() - ".java".length()));
          p.waitFor();
          //do some other stuff
    }This should get you going. You may consider looking into the System.getProperty() method in order to determine the type of OS it is running on in order to findo out what command to run. I know that the sun tool listed above is nice, but by my understanding the sun tools provided are not guaranteed to stay the same. I'm no expert on this matter, but that is one of the reasons there is no API documentation for those tools. Also, I don't believe those tools come packaged with the JRE. (Of course if you are making an IDE it will be expected that the user has an sdk installed. Good luck with figuring this thing out.

  • Running a Java Class in Workshop

    I'm trying to run a Java class with a public static void main method in Workshop. As instructed I opened the properties for the Java project, under the debbuger tab, checked Build before debugging. Then under "Create new process settings", in the Main Class box put the class with the main method with proper package structure. Clicked Ok. When I click the start button, the project builds, the process starts, the last message in the Output box is "Process Started" but then nothing happens. No System.out.println statements show. If I set breakpoints it never gets there. No values ever get set or changed in the Locals box. What am I missing?

    Thanks your response. I'm on sp3.
    The application is "Factory".
    The Java Project in "Factory".
    In the Java project there is a folder "pac", in that folder there is a class with a main method called "ProviderClient"
    In the "Factory" Java project properties/debugger window, Build before debugging is checked, also Create new process. Main class: pac.ProviderClient
    Home directory: C:/bea/user_projects/MyApps/Factory/Factory/
    (It was put there autopmatically when I clicked Browse as you said).
    When I run I get:
    Trying to create process and attach to 3640...
    Starting process in C:\bea\user_projects\MyApps\Factory\Factory
    C:\bea\jdk142_04\bin\javaw.exe -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=3640,suspend=y,server=y -classpath "C:\bea\user_projects\MyApps\Factory\APP-INF\lib\Factory.jar;C:\bea\user_projects\MyApps\Factory\EJBs.jar;C:\bea\jdk142_04\jre\lib\rt.jar;C:\bea\jdk142_04\jre\lib\jsse.jar;C:\bea\jdk142_04\jre\lib\jce.jar;C:\bea\jdk142_04\lib\tools.jar;C:\bea\weblogic81\server\lib\knex.jar;C:\bea\weblogic81\common\lib\log4j.jar;C:\bea\weblogic81\server\lib\debugging.jar;C:\bea\weblogic81\javelin\lib\javelin.jar;C:\bea\weblogic81\server\lib\wlw-lang.jar;C:\bea\weblogic81\server\lib\weblogic.jar;C:\bea\weblogic81\common\eval\pointbase\lib\pbserver44.jar;C:\bea\weblogic81\common\eval\pointbase\lib\pbclient44.jar;C:\bea\weblogic81\server\lib\webservices.jar;C:\bea\weblogic81\server\lib\webserviceclient.jar;C:\bea\weblogic81\server\lib\webserviceclient+ssl.jar;C:\bea\weblogic81\server\lib\wli.jar;C:\bea\weblogic81\server\lib\xbean.jar;C:\bea\weblogic81\server\lib\wlxbean.jar;C:\bea\weblogic81\server\lib\xqrl.jar;C:\bea\weblogic81\server\lib\netui\netui-compiler.jar" pac.ProviderClient
    Process started
    After a long time I get "Could not attach to debuggee process.
    Debugging Finished"
    What am I doing wrong?

  • Can we run a java class in a external server through abap program?

    Dear Experts,
    Can we run a java class in an external server ( other than application server and client system )?
    I have tried running it in the client system through a program and it works.
    But i have the requirement of running it in another system. Can it be done?

    Hi,
    If this is the case I think you can call this web service from SAP and triger the execution of the application on the "external server".
    SAP is behaving as a client in this case.
    Another alternative:
    "have tried running it in the client system through a program and it works." please elaborate.
    Regards.

  • Getting an error msg while trying to run the java class from CMC

    Hi All,
    I am getting an error, while trying to run the java .class file, that which is imoported into CMC.
    Error msg:
    Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at com.crystaldecisions.sdk.plugin.desktop.program.internal.ProgramWrapper.main(ProgramWrapper.java:49)
    I have imported .class file into CMC and trying to invoke the .class file by another java program from eclipse..When i tried to invoke the .class in cmc, i am getting an error msg, mentioned above. I thought there might be version conflict. So i changed the java complier version to 1.5 in my Eclipse. After that is done again i am facing the same problem.
    Can anyone help me to resolve this issue?
    Thanks in Advance.

    i have installed BO SDK 3.1 , Service pack 3. It comes woth JDK 1.5 version. i have not done any chnages to it. I impoprted all the jar files related to BO into eclipse.
    1)  Actually, i am writing java code on eclipse. When i run code from the eclipse, it creates a session to cmc and creates folder structure what i need.
    2)  But the thing is, that code needs to run, when i import the .class file into cmc. The process how i imported the .class file to cmc.
    Manage> Add> Program File-->Java (Check Box). In this way i added java class file from the eclipse workspace (class file from the bin directory).
    3) So when i run the .class file externally by another java program or also when i log in to CMC and run that .class file, the instance shows sucess, but when i see the logfile i am getting an exception that which i mentioned above.
    If my method is worng can you please let me know the stepts how to run java program in cmc.
    Thanks in Advance

  • Oracle Gateway Not Connecting to Sybase database

    Hi,
    I'm trying to setup an oracle gateway to connect to Sybase database. I followed in details the instructions but still can connect successfully. The Oracle database is in RAC environment. Below are the steps I took:
    The oracle gateway and oracle database are in the same server while Sybase is on a separate unix box.
    1. create an initdg4sybs.ora file
    # This is a customized agent init file that contains the HS parameters
    # that are needed for the Database Gateway for Sybase
    # HS init parameters
    HS_FDS_CONNECT_INFO=[999.99.108.99]:4527/common ## IP address of sybase server
    HS_FDS_TRACE_LEVEL=ON
    HS_FDS_RECOVERY_ACCOUNT=RECOVER
    HS_FDS_RECOVERY_PWD=RECOVER
    2. create a listener on the oracle gateway home
    # listener.ora Network Configuration File: /u03/app/oracle/gateway/11.2/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    LISTENER_DG4SYSBS =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1543))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 99.999.155.26)(PORT = 1543)(IP = FIRST)) #IP address of oracle gateway (node A)
    (ADDRESS = (PROTOCOL = TCP)(HOST = 99.999.155.24)(PORT = 1543)(IP = FIRST)) #IP address of oracle gateway (node B)
    SID_LIST_LISTENER_DG4SYSBS=
    (SID_LIST=
    (SID_DESC=
    (SID_NAME=dg4sybs)
    (ORACLE_HOME=/u03/app/oracle/gateway/11.2)
    (ENVS="LD_LIBRARY_PATH=/u03/app/oracle/gateway/11.2/dg4sybs/driver/lib:/u03/app/oracle/gateway/11.2/lib")
    (PROGRAM=dg4sybs)
    ADR_BASE_LISTENER = /u03/app/oracle/gateway/11.2
    TRACE_LEVEL_LISTENER_DG4SYSBS = OFF
    TRACE_FILE_LISTENER_DG4SYSBS = /u03/app/oracle/gateway/11.2/network/admin/LISTENER_DG4SYBS.trc
    INBOUND_CONNECT_TIMEOUT_LISTENER_DG4SYSBS=0
    3. create tnsnames.ora in oracle database home
    dg4sybs =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 99.999.155.26)(PORT = 1543)) #IP address of Node A
    (CONNECT_DATA =
    (SERVER = DEDICATED) #added for single node test
    (SID = dg4sybs)
    (HS=OK)
    4. create database link
    create database link dg4sybs connect to "user" identified by "password" using 'dg4sybs'
    5. when testing the connection; i'm getting below error message. tried all the setup based my research and couldn't make it work.
    SQL> select * from dual@dg4sybs
    2 /
    select * from dual@dg4sybs
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    Process ID: 7427
    Session ID: 495 Serial number: 787
    I perform above settings on a standalone database running in windows and successfully connect to the sybase. In UNIX setup, been unsuccessful. Can someone please help.
    Also, below is the trace file error message:
    Oracle Corporation --- THURSDAY OCT 18 2012 10:57:55.747
    Heterogeneous Agent Release
    11.2.0.1.0
    Oracle Corporation --- THURSDAY OCT 18 2012 10:57:55.745
    Version 11.2.0.1.0
    HOSGIP for "HS_FDS_TRACE_LEVEL" returned "ON"
    ODBCINST set to "/u03/app/oracle/gateway/11.2/dg4sybs/driver/dg4sybs.loc"
    RC=-1 from HOSGIP for "LD_LIBRARY_PATH_64"
    Setting LD_LIBRARY_PATH_64 to "/u03/app/oracle/gateway/11.2/dg4sybs/driver/lib"
    HOSGIP for "HS_FDS_SHAREABLE_NAME_ICU" returned "/u03/app/oracle/gateway/11.2/dg4sybs/driver/lib/libHGicu23.so"
    HOSGIP for "HS_FDS_SHAREABLE_NAME_INST" returned "/u03/app/oracle/gateway/11.2/dg4sybs/driver/lib/libodbcinst.so"
    HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/u03/app/oracle/gateway/11.2/dg4sybs/driver/lib/libodbc.so"
    HOSGIP for "HS_OPEN_CURSORS" returned "50"
    HOSGIP for "HS_FDS_FETCH_ROWS" returned "100"
    HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536"
    HOSGIP for "HS_NLS_NUMERIC_CHARACTER" returned ".,"
    HOSGIP for "HS_KEEP_REMOTE_COLUMN_SIZE" returned "OFF"
    HOSGIP for "HS_FDS_DELAYED_OPEN" returned "TRUE"
    HOSGIP for "HS_FDS_WORKAROUNDS" returned "0"
    HOSGIP for "HS_FDS_MBCS_TO_GRAPHIC" returned "FALSE"
    HOSGIP for "HS_FDS_GRAPHIC_TO_MBCS" returned "FALSE"
    HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
    HOSGIP for "HS_FDS_TRANSACTION_LOG" returned "HS_TRANSACTION_LOG"
    HOSGIP for "HS_FDS_TIMESTAMP_MAPPING" returned "DATE"
    HOSGIP for "HS_FDS_DATE_MAPPING" returned "DATE"
    HOSGIP for "HS_FDS_CHARACTER_SEMANTICS" returned "FALSE"
    HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
    HOSGIP for "HS_FDS_RESULTSET_SUPPORT" returned "FALSE"
    HOSGIP for "HS_FDS_RSET_RETURN_ROWCOUNT" returned "FALSE"
    HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
    HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
    using ro as default value for "HS_FDS_DEFAULT_OWNER"
    HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
    SQL text from hgopars, id=1, len=20 ...
    00: 53454C45 4354202A 2046524F 4D202244 [SELECT * FROM "D]
    10: 55414C22 [UAL"]
    hgopars, line 526: calling SQLNumResultCols got sqlstate 42S02
    SQL text from hgopars, id=2, len=57 ...
    00: 53454C45 43542027 58272046 524F4D20 [SELECT 'X' FROM ]
    10: 2264626F 222E2273 79737573 65727322 ["dbo"."sysusers"]
    20: 20413120 57484552 45204131 2E226E61 [ A1 WHERE A1."na]
    30: 6D65223D 2764626F 27 [me"='dbo']
    Deferred open until first fetch.
    HS Agent received unexpected RPC disconnect
    Network error 1003:  NCR-01003: NCRS: Read error.
    Edited by: gonzroman on Oct 18, 2012 11:03 AM

    -=-=-=-=-=- tnsnames.ora on the UNIX side
    GTW_C100_COMN =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.124.155.26)(PORT = 1543)) #IP address of jrc1suvip01a
    #(ADDRESS = (PROTOCOL = TCP)(HOST = 10.124.155.24)(PORT = 1543)) #IP address of jrc1sudb01a
    (CONNECT_DATA =
    (SERVER = DEDICATED) # added for single configuration
    (SID = dg4sybs_comn_c100)
    (HS=OK)
    -=-=-=-=-=- listener.ora of the GATEWAY
    LISTENER_DG4SYSBS =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1543))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.124.155.26)(PORT = 1543)(IP = FIRST)) #IP address of jrc1suvip01a
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.124.155.24)(PORT = 1543)(IP = FIRST)) #IP address of jrc1sudb01a
    #(ADDRESS = (PROTOCOL = TCP)(HOST = jrc1suvip01a)(PORT = 1543))
    SID_LIST_LISTENER_DG4SYSBS=
    (SID_LIST=
    (SID_DESC=
    (SID_NAME=dg4sybs)
    (ORACLE_HOME=/u03/app/oracle/gateway/11.2)
    (ENVS="LD_LIBRARY_PATH=/u03/app/oracle/gateway/11.2/dg4sybs/driver/lib:/u03/app/oracle/gateway/11.2/lib")
    (PROGRAM=dg4sybs)
    (SID_DESC=
    (SID_NAME=dg4sybs_comn_c100)
    (ORACLE_HOME=/u03/app/oracle/gateway/11.2)
    (ENVS="LD_LIBRARY_PATH=/u03/app/oracle/gateway/11.2/dg4sybs/driver/lib:/u03/app/oracle/gateway/11.2/lib")
    (PROGRAM=dg4sybs)
    ADR_BASE_LISTENER = /u03/app/oracle/gateway/11.2
    TRACE_LEVEL_LISTENER_DG4SYSBS = OFF
    TRACE_FILE_LISTENER_DG4SYSBS = /u03/app/oracle/gateway/11.2/network/admin/LISTENER_DG4SYBS.trc
    INBOUND_CONNECT_TIMEOUT_LISTENER_DG4SYSBS=0
    -=-=-=-=- initdg4sybs_comn_c100.ora parameter
    # This is a customized agent init file that contains the HS parameters
    # that are needed for the Database Gateway for Sybase
    # HS init parameters
    #HS_FDS_CONNECT_INFO=[glb0pod29.aexeo.citco.com]:4100/common
    HS_FDS_CONNECT_INFO=[209.87.108.99]:4527/common
    HS_FDS_TRACE_LEVEL=ON
    HS_FDS_RECOVERY_ACCOUNT=RECOVER
    HS_FDS_RECOVERY_PWD=RECOVER
    -=-=-=-=- gateway listener status
    jrc1sudb01a:/u03/app/oracle/gateway/11.2/dg4sybs/admin $ lsnrctl status LISTENER_DG4SYSBS
    LSNRCTL for Solaris: Version 11.2.0.1.0 - Production on 20-OCT-2012 13:09:05
    Copyright (c) 1991, 2009, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1543)))
    STATUS of the LISTENER
    Alias LISTENER_DG4SYSBS
    Version TNSLSNR for Solaris: Version 11.2.0.1.0 - Production
    Start Date 18-OCT-2012 13:16:24
    Uptime 1 days 23 hr. 52 min. 41 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /u03/app/oracle/gateway/11.2/network/admin/listener.ora
    Listener Log File /u03/app/oracle/gateway/11.2/log/diag/tnslsnr/jrc1sudb01a/listener_dg4sysbs/alert/log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1543)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.124.155.26)(PORT=1543)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.124.155.24)(PORT=1543)))
    Services Summary...
    Service "dg4sybs" has 1 instance(s).
    Instance "dg4sybs", status UNKNOWN, has 1 handler(s) for this service...
    Service "dg4sybs_comn_c100" has 1 instance(s).
    Instance "dg4sybs_comn_c100", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    -=-=-=-=-=- tnsping output
    jrc1sudb01a:/u03/app/oracle/product/11.2.0.3/network/admin $ tnsping dg4sybs
    TNS Ping Utility for Solaris: Version 11.2.0.3.0 - Production on 20-OCT-2012 13:11:28
    Copyright (c) 1997, 2011, Oracle. All rights reserved.
    Used parameter files:
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.124.155.24)(PORT = 1543)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = dg4sybs)) (HS=OK))
    OK (10 msec)
    jrc1sudb01a:/u03/app/oracle/product/11.2.0.3/network/admin $ tnsping GTW_C100_COMN
    TNS Ping Utility for Solaris: Version 11.2.0.3.0 - Production on 20-OCT-2012 13:11:35
    Copyright (c) 1997, 2011, Oracle. All rights reserved.
    Used parameter files:
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.124.155.26)(PORT = 1543)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = dg4sybs_comn_c100)) (HS=OK))
    OK (0 msec)

  • Unable to get database connection  from loaded java class in oracle

    Hi all,
    I am trying to call java class method from oracle function, but getting below exception, while creating connection.
    SQL> select charge_calculation(1,'2011-06-01', 'E') from dual;
    select charge_calculation(1,'2011-06-01', 'E') from dual
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.ExceptionInInitializerError
    inside main method
    inside main method1
    inside main method2
    inside main method3
    inside main method3
    Exception in thread "Root Thread" java.lang.ExceptionInInitializerError
    at javax.crypto.Cipher.getInstance(DashoA12275)
    at oracle.security.o5logon.O5LoginClientHelper.decryptAES(Unknown Source
    at oracle.security.o5logon.O5LoginClientHelper.generateOAuthResponse(Unk
    nown
    Source)
    at
    oracle.jdbc.driver.T4CTTIoauthenticate.marshalOauth(T4CTTIoauthenticate.java)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:367)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:
    501)
    at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:203)
    at
    oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
    at java.sql.DriverManager.getConnection(DriverManager.java)
    at java.sql.DriverManager.getConnection(DriverManager.java:187)
    at SPEodPricing.spEodPricing(SPEODPRICING:98)
    at SPEodPricing.main1(SPEODPRICING:47)
    Caused by: java.lang.SecurityException: Cannot set up certs for trusted CAs
    at javax.crypto.SunJCE_b.<clinit>(DashoA12275)
    ... 13 more
    Caused by: java.security.PrivilegedActionException: java.io.IOException
    at java.security.AccessController.doPrivileged(Native Method)
    ... 14 more
    Caused by: java.io.IOException
    at java.io.FileOutputStream.writeBytes(Native Method)
    at java.io.FileOutputStream.write(FileOutputStream.java)
    at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:177)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:165)
    at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:43)
    at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:70)
    at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.ja
    va:102)
    at
    sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:1
    24)
    at javax.crypto.SunJCE_d.a(DashoA12275)
    at javax.crypto.SunJCE_b.g(DashoA12275)
    at javax.crypto.SunJCE_b.e(DashoA12275)
    at javax.crypto.SunJCE_q.run(DashoA12275)
    ... 15 more
    SQL> select charge_calculation(1,'2011-06-01', 'E') from dual;
    select charge_calculation(1,'2011-06-01', 'E') from dual
    ERROR at line 1:
    ORA-29549: class BBVA_MERGED.SPEodPricing has changed, Java session state
    cleared
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64
    bit Production
    With the Partitioning, Real Application Clusters, OLAP, Data Mining
    and Real Application Testing options
    JAVA Sample code:-
    public String method1(int pi_ctry_id,String pi_cur_busi_date ,String pi_eod_bod_flag)
    System.out.println("inside main method1");
    CachedRowSet tmplcrs                = null;
    HashMap resMap                              = new HashMap();
              Double ln_candidate_extra           = 0.0;
              Double ln_calculate_on_val          = 0.0;
              int lv_calculate_on                = 0;
              int lv_cand_attribute                = 0;
    // int pi_ctry_id                          = 0;
    // String pi_cur_busi_date           = null;
    int pi_bch_id                          = 0;
    // String pi_eod_bod_flag               = null;
    Date ldt_cur_busi_date          = null;
    Date lstr_next_calc_date     = null;
    int li_bch_id                         = 0;
    int li_chg_ac_branch               = 0;
    int calFrequency                     = 0;
    DbUtils dbObj = new DbUtils();
    Map reqMap = new HashMap();
    CachedRowSet updtcrs                = null;
    Connection conn = null;
              try
    System.out.println("inside main method2");
                   reqMap.put("pi_ctry_id", ""+pi_ctry_id);
                   reqMap.put("pi_cur_busi_date", ""+pi_cur_busi_date);
                   reqMap.put("pi_eod_bod_flag", ""+pi_eod_bod_flag);
    System.out.println("inside main method3");
                   Class.forName("oracle.jdbc.driver.OracleDriver");
    // Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@10.1.56.85:1521:orcl", "bbva_merged", "bbva_merged");
    // conn = DriverManager.getConnection("jdbc:oracle:thin:@10.1.50.104:1521:cmsdb6", "bbva_base", "bbva_base");
    System.out.println("inside main method3");
    conn = DriverManager.getConnection("jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.50.129)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.50.130)(PORT = 1521))(LOAD_BALANCE = yes)(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = BBVASIT)))", "BBVA_MERGED", "BBVA_MERGED");
    conn.setAutoCommit(false);
    System.out.println("inside main method4");
    }

    29532, 00000, "Java call terminated by uncaught Java exception: %s"
    // *Cause: A Java exception or error was signaled and could not be
    //          resolved by the Java code.
    // *Action: Modify Java code, if this behavior is not intended.

  • Java class in oracle forms

    Hello experts,
                        I am new in oracle forms.I am using oracle forms 11g with weblogic 10.3.5 at windows 7.Someone please clear me that the injection of java programing in oracle forms is through BEANS item only or I can use it(java class) as a part of my oracle forms.I mean I have a Java class.Could I use this java class inside my oracle forms without using Beans Item.
    Thank You
    regards
    aaaditya

    In forms you can use java in two different ways
    1. On the client-side. Using java-beans you can extend the client-functionality of forms. The code will run on the client-computer in the context of the applet.
    2. On the server-side. Using the java-importer you can build a PL/SQL-wrapper around a java-class and so use the java-code in your forms-PL/SQL
    What is your reuqirement?

  • Java class in Oracle 8i.

    Hi All,
    I have tried to create a java class in Oracle8i but it throws some errors like:
    NAMED "MyTime"
    ERROR at line 3:
    ORA-29516: Aurora assertion failure: Assertion failure at eox.c:187
    Uncaught exception Root of all Java exceptions:
    The program is :
    CREATE OR REPLACE
    JAVA SOURCE
    NAMED "MyTime"
    AS
    import java.lang.String;
    import java.sql.Timestamp;
    public class MyTime
    public static String getTime()
    return (new Timestamp(System.currentTimeMillis())).toString();
    Please give a solution ASAP.
    If anybody knows give me more information about how the classes are created in the database and how itz get compiled.
    Thanks in advance.
    Rajesh

    Anurag,
    Here's an example of one I wrote which is VERY simple. Sometimes it helps to crawl before tou walk. You can execute the following using SQL*Plus:
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "RuntimeExample" AS public class RuntimeExample {
    public static String runNotepad() {
    String returnValue = null;
    Runtime r = Runtime.getRuntime();
    long totalMemory = r.totalMemory();
    try {
         Process p = r.exec("notepad.exe");
         returnValue = p.toString();
         } catch (Exception e) {
              System.out.println("Exception calling Runtime.exec()->" + e);
         /* You can get creative here and
         1) Use p.waitFor() to block while the process is running,
         2) Send the command to be executed as a parameter to the method, etc. */
         return returnValue;
    Notice that I return the string equivalent of Process p. This tells you if a process was really started.
    Hope this helps,
    -Dan
    http://www.compuware.com/products/numega/dbpartner/dbpordebug.htm
    Debug PL/SQL and Java in the Oracle Database

  • How to run a Java class in JDeveloper - with Input parameters

    Folks,
    I need to run Forms 10g trace and do not have access to the Dos command line (no Programs-ACcessories-Comand prompt). I am allowed to run Batch files though.
    So really I need to run class "oracle.forms.diagnostics.Xlate", but need to give Input Parameter to this class. I know to load JDeveloper and open this class, but when I execute it it gives me the following error.
    My question is HOw do I input the File name to this Class when I execute it from JDeveloper.
    ERROR: You must specify an input datafile
    Exception in thread main
    java.lang.NoClassDefFoundError: oracle/forms/registry/MessageManager
         at oracle.forms.diagnostics.Xlate.printUsage(Unknown Source)
         at oracle.forms.diagnostics.Xlate.readArgs(Unknown Source)
         at oracle.forms.diagnostics.Xlate.<init>(Unknown Source)
         at oracle.forms.diagnostics.Xlate.main(Unknown Source)
    Process exited with exit code 1.

    To specify program arguments
    1. Select Tools>Project Properties.
    2. Select Run/Debug.
    3 Select the Default Configuration and select Edit.
    4. Specify the program arguments in the Program Arguments field.

  • Error while importing java class into oracle forms 10g

    Hi
    I have generated a web service client using jdeveloper 10g. It consists of complex type methods. I am trying to import the class files using java importer in oracle form 10g. I am able import all of them successfully except one. That one is the main method. Please see the error and suggest me how to overcome this error.
    Exception occurred: java.lang.NoClassDefFoundError: oracle/jdeveloper/webservices/runtime/WrappedDocLiteralStub
    Thanks in advance

    Do you see oracle/jdeveloper listed in "Import Java Classes" when you try to import?
    If not, make sure you add C:\DevSuiteHome_1\jdev\lib\jdev.jar to FORMS_BUILDER_CLASSPATH in registry
    Also excetion indicates: oracle/jdeveloper/webservices/runtime/WrappedDocLiteralStub
    If you typing it - type: oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub

  • Running a java class from a windows shortcut?

    I am currently running a program I have written from a batch file for which I have created a shortcut. I have recently however modified my shortcut to include a variable that i pass to the main method in the program through the batch file - all this works fine.
    It did however get me thinking - why can't I do away with the batch file??
    Below is the batch file code that loads my software:
    Echo Off
    CLS
    SET CLASSPATH=.;"C:\Program Files\Java\j2re1.4.2_03\bin"
    SET Path="C:\Program Files\Java\j2re1.4.2_03\bin"
    C:
    CD\
    CD "Program Files\My App"
    start "My App" javaw My_App %1
    And the two shortcut strings that call the batch file:
    "C:\Program Files\My App\My_App.bat" var1
    "C:\Program Files\My App\My_App.bat" var2
    What I have been trying to do however, is do all of the above from the shortcut
    I have added the following code to a shortcut:
    Target:
    C:\WINDOWS\system32\cmd.exe /c SET CLASSPATH=.;"C:\Program Files\Java\j2re1.4.2_03\bin" && SET Path="C:\Program Files\Java\j2re1.4.2_03\bin" && start javaw "My App" My_App
    Start In:
    "C:\Program Files\My App"
    All of the relevant paths are set correctly, and it calls the main java class file from the directory from where it resides, but I get a popup error message stating:
    Java Virtual Machine
    Error: Could not fing Java 2 Runtime Environment.
    Has anybody got any ideas on how to fix this please??

    Either I'm misunderstanding, or ?
    You don't need to set classpath if all you need for a classpath is the directory that contains the classfile - the Start in combined with -cp . // that's -cp followed by a periodsets the classpath to that value, and Windows will create a fully qualified path to javaw.
    You entries in the shortcut shouldn't have to be any more than what I typed.

  • Running/Compiling *.java file in Oracle Sql Developer

    I want to compile/run java 5.0 files in Oracle sql developer1.1.2.25 on Fedora 5 platform.
    I have added javac as an enternal tool to compile java programs. Tools-->External Tools-->New
    I have also added java: /usr/java/jre1.5.0_10/bin/java as an external tool to run the complied programs
    I am able to compile the java programs, but i am not able to run them.
    I am providing ${file.name.no.ext} as an argument to java.
    Java-Log Output is:
    /usr/java/jre1.5.0_10/bin/java Writer2
    Exception in thread "main" java.lang.NoClassDefFoundError: Writer2
    However, if i run the same program in Linux terminal, i get the correct output:
    [root@localhost java]# which java
    /usr/java/jre1.5.0_10/bin/java
    [root@localhost java]# /usr/java/jre1.5.0_10/bin/java Writer2
    12
    howdy
    folks
    How can i make Oracle Sql Developer run the java program?

    I will echo the use jdev comment..
    Regardless, you may want to check the execute in directory.. or add a -cp parameter.
    Eric

Maybe you are looking for

  • How to retreive lost work after FXP X crashes

    So normally when final cut 7 crashes I would search in spotlight for the autosaved file which was being saved every 5 minutes and reopen the project. Now I have just lost hours of work with FCP X after a crash. I see in the final cut events folder th

  • RFC: Remote debugging

    Hi, is there a possibility to call a RFC function module and start online in debug mode in the target system? Please answer the question, nothing else, thank you. Regards, Clemens Li

  • XSLT Tranformation - XSL in a separate file?

    I'm using XSLT Tranformation service to transform an incoming XML document to a different format.  I've tested this successfully using a literal value for my XSL, but I'd like to store the XSL in a separate file rather than storing it as a literal st

  • Reader 11.0.09 freezing upon opening

    Since updating to Adobe Reader version 11.0.09, user's are seeing freezing (not responding) when trying to scroll up/down or use the menus. This happens for about 30 seconds before it begins to work normally. It seems to be related to this newer vers

  • Button pops link in a new window

    Hello everyone, This is a rather simple question for all gurus out there, but it seems a bit hard to find on documentation. How can you open a link in a new window with a button in a flash form? I want a button on my form to pop a new window with the