Java application in Oracle

I'm writing an Java application which is triggered by a table update. The application need call some classes which are packaged in a .jar file. Now, I use Java stored procedure to create the trigger but how can I import the .jar file?? I try to use loadjava but some errors are prompted. I would like to know whether it is possible to use database trigger to initiate a java application (with many classes) and the method to implement such application.
Thx in advance.

Hi Avi,
Thanks for your reply. Here is the error message when I load the .jar into Oracle.
C:\TEMP>loadjava -u scott/tiger@ORCL C:\Temp\javaOracle.jar
Error while creating acbbinding/oracl/SCOTT/Tables/EMPPackage/Record
ORA-29533: attempt to overwrite class or resource acbbinding/oracl/SCOTT/Tables/EMPPackage/Record while defining or compiling SCOTT.acbbinding/oracl/SCOTT/Tables/EMPPackage/Record
Error while creating acbbinding/oracl/SCOTT/Tables/EMP
ORA-29533: attempt to overwrite class or resource acbbinding/oracl/SCOTT/Tables/EMP while defining or compiling SCOTT.acbbinding/oracl/SCOTT/Tables/EMP
Error while creating acbbinding/ODBCException
ORA-29533: attempt to overwrite class or resource acbbinding/ODBCException while defining or compiling SCOTT.acbbinding/ODBCException
Error while creating class acbbinding/ODBCException1
ORA-29537: class or resource cannot be created or dropped directly
loadjava: 4 errors
There are similar errors in loading other .jar files. Could you tell me what's the problem?
I also can write the Java Stored Procedure and trigger it successfully. The problem is whether I can pass some information , say the updated record which initiate the trigger, to other class in the .jar files.
Thanks for you kindly help again.

Similar Messages

  • How to deploy a POJO or a java application in oracle ESB?

    hi,
    I m beginner in oracle ESB.
    please someone tell me how to deploy a POJO or a java application in oracle ESB?
    thank you.
    Peter.

    The short answer is "you wouldn't"
    The long answer is that you would expose your Java Application or POJO as a Web Service then virtualise it through the ESB.
    If you're wanting to learn more about SOA, ESB and BPEL have you been to this site http://download.oracle.com/docs/cd/B31017_01/index.htm

  • Connecting Java application to Oracle Database with JDBC

    How can I connect my Java application using Oracle 11g database?
    Please provide the steps involved along with the coding.

    What kind of Java application? Stand alone/desktop? Or web? Do you need dedicated, individual connections, or connection pooling for 10,000 concurrent users?
    You'll find a few clues in This Article [This Article|http://javawebdb.com/2012/01/30/connecting-a-java-servlet-to-a-database/]

  • Is it possible to deploy Java application in Oracle 9iAS

    We have a stadard 3-tier system implemented in Java with a presentation-tier(servlets, JSP), middle-tier(business logic, transactions) and a data-tier(Java classes that hold all SQL and so on).
    NB We're NOT using EJB's!
    For the moment we are running Oracle HTTP server with Apache, Jserv, Ojsp and JRE 1.2.2.
    We are now interested in using Oracle 9iAS as application server and we have a few questions about it.
    1) Is it possible to to run our Java-code inside Oracle 9iAS?
    2) If it is possible, should we run the servlets and JSP there too?
    Regards Peter

    An interesting fact about 9iAS - unless you do some work to change things around, 9iAS = Apache/JServ. So yes you can deploy your app to it. However, OJSP is a technet product so don't expect any tech support. And Oracle won't let you upgrade JServ to Tomcat, so don't expect Servlet 2.2. And if you want to use Orace Servlet Engine to get Servlet 2.2, you might run into some deployment and performance issues. Read my posting in the 9i Application Server forum.
    If, however, you try and meet with more success than I have so far, I will be happy to learn from your experience <grin>.
    John H.

  • I cant connect to my java application to oracle 11

    i am posting my question after alot of research and alot of google stuff .
    i have an oracle 11g 11.1.0.6.0 that is installed on my Laptop all i am trying to do is to connect my java application to the database
    i am geting this exception : java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection .
    the listener is giving me an error as i show below .
    i cant telnet the port also 1521 .
    i couldnt connect also through sql developer .
    the microsoft windows firewall is off .
    the code that i am using to connect :
    Connection con=null ;
    try{
    Class.forName("oracle.jdbc.driver.OracleDriver");
    System.out.println("The driver has been loaded");
    con=DriverManager.getConnection("jdbc:oracle:thin:@AMRO-PC:1521:XE", "aa" , "aa");
    System.out.println("Connection was established");
    catch (Exception e)
    System.out.println(e.toString() );
    }//catch
    my tnsnames.ora is like this
    XE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Amro-PC)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    the full stacktrace :
    java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:458)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
    at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at Main.main(Main.java:31)
    Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
    at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:392)
    at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:434)
    at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:687)
    at oracle.net.ns.NSProtocol.connect(NSProtocol.java:247)
    at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1102)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:320)
    ... 7 more
    Caused by: java.net.UnknownHostException: //localhost
    at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
    at java.net.InetAddress$1.lookupAllHostAddr(Unknown Source)
    at java.net.InetAddress.getAddressesFromNameService(Unknown Source)
    at java.net.InetAddress.getAllByName0(Unknown Source)
    at java.net.InetAddress.getAllByName(Unknown Source)
    at java.net.InetAddress.getAllByName(Unknown Source)
    at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:117)
    at oracle.net.nt.ConnOption.connect(ConnOption.java:133)
    at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:370)
    ... 12 more
    the listener.ora
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = D:\oracle\app\oracle\product\11.2.0\server)
    (PROGRAM = extproc)
    (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = D:\oracle\app\oracle\product\11.2.0\server)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = Amro-PC)(PORT = 1521))
    DEFAULT_SERVICE_LISTENER = (XE)
    it gives me an error when I try to start the listener through LSNCTRL that says :
    Message 1070 not found; No message file for product=NETWORK, facility=TNSTNS-125
    60: Message 12560 not found; No message file for product=NETWORK, facility=TNS
    TNS-00530: Message 530 not found; No message file for product=NETWORK, facility
    =TNS
    And when I try to see the status of the Listener it says :
    Message 1053 not found; No message file for product=NETWORK, facility=TNSTNS-125
    41: Message 12541 not found; No message file for product=NETWORK, facility=TNS
    TNS-12560: Message 12560 not found; No message file for product=NETWORK, facili
    ty=TNS
    TNS-00511: Message 511 not found; No message file for product=NETWORK, facilit
    y=TNS
    32-bit Windows Error: 61: Unknown error
    So please can someone help me ?! Thanks in advance
    Edited by: 913402 on Feb 9, 2012 12:10 AM

    You put the machine name as the host name. I would put the (internal) network address of the laptop there and try again - and make sure that Oracle is actually listening on your internal network address in stead of only the localhost. Or are you running the java application on the same laptop? Then you can simply use 'localhost' as the host name.

  • Calling java application from Oracle forms button

    Hi all,
    I have a problem. The idea is to call Java desktop application when button is pressed. I have used this (above) line of code, but there is no results. When I start form in local everything is fine but when I start from server it doesn't work. Does anyone has that kind of problem and how is solved?
    Thanks in advance.
    __Code is:__
    DECLARE
    v_path VARCHAR2(1000);
    BEGIN
    v_path:= '\\location\Java_Application.jar';
    HOST(v_path);
    END;

    First, please start here:
    http://blogs.oracle.com/shay/2007/03/02/
    As for what you are doing and the problem, it will be difficult to give an exact reason, but here are a few comments which will apply regardless of the platform, version, and installation type.
    1. In most case, when calling HOST from Forms the shell that is started does not include all of the system environment variables. This means for example, if a java.exe is needed (on Windows), you would need to specify its path as part of the call or use a batch file rather than calling a command or app directly. The batch file would first set all the needed environment variables (i.e. PATH, CLASSPATH, etc)
    2. If you are running a newer version of Forms, you have a middle tier. This is were your HOST call will be executed. So, if you are expecting this to occur on the client it will not work. You would need WebUtil for client side calls.
    3. Calling a network resource (i.e. shared drive) is not permitted on Windows platforms when called from a Windows Service. Doing so can be seen as a security vulnerability. This can be overridden, but I would suggest that doing so is not a good idea. All files needed to run your app should be made available locally. If files exist on a remote machine, they should be temporarily brought to the machine (e.g. using ftp, sftp, etc) where they are needed and removed later if necessary. If you are running a newer version of Forms, the Forms runtime process belongs to a Windows Service, even if indirectly as a child.
    4. Calling a jar directly is not the proper way to call a java app. Refer to the following:
    http://download.oracle.com/javase/tutorial/deployment/jar/run.html

  • Deploying Oracle Express and Java Application in one installation

    Is there a way to deploy a Java application using Oracle express as the back end in one installation? So in other words, rather than installing oracle express separately from the application, we are looking to install from one executable including both the java application and all the necessary components for oracle express to run.
    Your help is greatly appreciated.
    Thank you,
    Mahmoud

    Hello,
    you can install the database using a response file. Depending on the installer of your Java application you could create a kind of meta-installer that creates a response file for the database as well as one response/parameter file for your application installer and hence run both in one step.
    See the [url http://download.oracle.com/docs/cd/E17781_01/install.112/e18802/toc.htm#BABCCGCF]corresponding section of the Installation Guide for details on the response file.
    -Udo

  • How to deploy Java Application to AS?

    Hello there,
    I created Java Application, created Java Web Start (JNLP) Deployment Descriptors and everything works just fine when I am running application locally (using Run Manager in JDeveloper).
    How do I publish this Java Application to Oracle Application Server to start it using Java Web Start since there are no Java Web Start Deployment Descriptors to publish Application to Oracle Application Server?
    Or is there any other (easier, better) way to Deploy Java Application to Oracle Appplication Server?
    I searched otn.oracle.com but I cant find anything usefull, maybe it is me, please help me :)...
    Thanks,
    -Andrej

    From the JDeveloper technical papaers page:
    http://otn.oracle.com/products/jdev/collateral/papers/10g/adfjclientbcwebstart.pdf

  • Java appl. with oracle on Linux

    Hello all,
    I would like to ask how to connect my Java application to
    Oracle on Linux. Is there any JDBC driver ?
    null

    Hi Mark,
    I am also running Oracle 8.0.5 in my RD6.0 machine.
    I installed Developer2000 into my win98 machine.
    I tried to login using the developer2000 into the
    oracle running under linux but connection cannot
    go through. I don't know the reason to this. Though
    I can use the SQL*Plus to connect to this database
    from win98, can you figure out what is wrong with
    my setup?
    Thanks,
    -Paul
    Mark Kirkwood (guest) wrote:
    : Hi all,
    : I thought you guys might be interested to know that this stuff
    : is used out there...
    : I work for a Government property management company ( Housing
    : New Zealand ), and they were looking at downsizing their
    systems
    : infrastructure. A subset of the business was picked to pilot a
    : downsized system.
    : We ported from :
    : "thin client" : Citrix Winframe, Developer 2000, HPUX , Oracle
    : 7.3
    : to a :
    : client server : Win95, Developer 2000, RedHat 6.0, Oracle
    8.0.5SE
    : Instead of running 80 users on :
    : 80 P300 PCs, Winframe Client +
    : 1 4xP200 Winframe/NT, Developer 2000 +
    : 1 HP-PA/Risc, HPUX ,Oracle 7.3.3
    : We are running 5 users on :
    : 5 P300 PC Win95, Developer 2000 +
    : 1 P300 PC RedHat 6.0, Oracle 8.0.5, samba
    : ( Obviously this was the pilot subset ! )
    : Although this represents a "step backwards" in deployment
    : architecture ( 3 tier - 2 tier ), it represented a decrease in
    : cost infrastructure per user ( No Winframe/NT License, No
    : expensive Proprietry hardware, only 1 ( Cheap ) propritary o/s
    : Win95 ).
    : We went live with this beast on 1 Aug.
    : The Redhat box has been rebooted once since them - not by us (
    : Power outage at the site ).
    : The server is just idling with 5 concurrent connections.
    : Oracle 8.0.5/Redhat is rock solid as far as we can tell !
    : ( with the right patches ....
    : for those interested they are
    : 8.0.5.1 patchset
    : redo log async write - bug 882446
    : glibc patch
    : setuid security patch
    : Cheers
    : Mark
    null

  • How can i invoke an Oracle Report w/in a Java application?

    I have a custom java application that I would like to integrate with a report tool. I am reviewing Oracle Reports but I was not sure how I would integrate an Oracle Report.
    I have read that I can use Active-X but. Has anyone ever done this? Also - is there any support for a java bean?
    I am also wondering how I could pass in report parameters.
    It is my understanding that Oracle will generate either pdf or html output which could be viewed through the browser or adobe acrobat reader.
    Is this correct?
    Please advise.
    Thanks in advance.

    Bonnie,
    I create a URL that calls Oracle Reports Server running under IAS, using PDF or html as the output. The Java code calls up the commandline and starts the default browser with the specified URL, which then talks to Oracle Reports Server... and voila... the report shows up in your browser!
    have fun...
    void execURL ( String pURL )
    System.out.println(pURL);
    if (System.getProperty("os.name").equals("Windows NT") )
    try
    Runtime.getRuntime().exec("cmd /c start "+pURL);
    catch (Exception e1) {System.out.println(e1.getMessage()); }
    else
    try
    Runtime.getRuntime().exec("start "+pURL);
    catch (Exception e2) {System.out.println(e2.getMessage());}
    null

  • How to invoke A CORBA-Java Client Application, from Oracle???

    Hi,
    I have a CORBA-Java Client Application, which takes the input parameters from a Oracle table and calls the CORBA Server, passes these parameters to the C++ Server Application and gets the results back thorugh CORBA.
    My problem is, this java application needs to be invoked, when ever there is a new record in the Oracle table.
    I am not sure if i can use Java Stored Procedures in Oracle in this case, because my app is in Sun JVM and i am using BEA WebLogic Enterprise 5.1 for the CORBA.
    Is there any other way by which i can invoke this app, when a new record is updated in the Oracle table?
    Currently, i have just put a TIMER in my java App, to check the oracle table in every few seconds, to see if there is a new reocrd. If it finds a new record it invokes the corresponding class(corba class), or else just keep sending a messsage that no new record is available.
    The problems i am facing in this method are as follows;
    1. Unnecessarily, the application has to keep on running if there is no request coming frequently.
    2. When there is a new record found, the Corba Class is called and the whole process (till it gets the result back from the server) takes about 20 - 30 secs. But within this period, if there is another record coming into Oracle table, my timer class doesnt invoke another corba class....(though i am using multithreading by using the RemidTask method in the timer.schedule.
    (timer.schedule(new RemindTask(),10,5*1000);)
    3. Also, if during the first call, there is some error, then the whole process exits, instead of another process running parallely (when a second new record is found).
    So how does this timer class act like a multithreading process?
    Well, i hope i am not confusing....Please let me know if anyone wants bit more elaboration on this.
    It would be really helpful if someone can suggest some answer to my problem.
    Thanks in advance.

    Thank you very much Keith.
    Though i am really getting a hope of solving this problem, from you answer, i am actually not 100% sure if i understood your reply properly.
    First of all, about
    1. "use the update stored procedure to place the updated record (or unique index) onto an Oracle Application Queue."
    -- Why do i need to put the record in the AQ. (Frankly speaking, at this moment i dont have much idea about AQ, probably i can learn more about it from oracle technet site? Or would u suggest anything else?)
    Then,
    2."Your app then waits on this queue and for each new message, consumes it, gets the data required from the AQ load (e.g the index and or record), and fires off the CORBA class"
    -- How does my application stay in the queue? and gets the data from the queue?
    Of course, as far as i understand, i am going through the same principle...keeping on running a timer class, which keeps on checking the table for a new record, and when it finds, it calls the CORBA class.
    Of course, i feel there should be a difference in running the timer continuosly and staying in queue. However i am totally unaware, how can i make my java app to wait in the queue and waits for a new record?
    Can you please elaborate your answer a bit more, because i dont know about the AQ, that you have mentioned.
    Thank you very much in advance for your time. But please know that it will be of great help to me and hence will be higly appreciated.
    Regards,
    Subhasree.

  • Issue in Oracle 11g Database Change Notification  for Java application

    Hi,
    I am trying to use Oracle's Database Change Notification in Java application.
    I followed the sample application (+DBChangeNotification.java+ , Example 29-2), provided in the following link:
    +[http://download.oracle.com/docs/cd/B28359_01/java.111/b31224/dbmgmnt.htm#CHDEJECF]+
    I am able to see that the Registration of the SQL query is successful.
    But, when I do changes to the table registered, notifications are not received in the Listener class (+DCNDemoListener.java+).
    Ideally, the method DCNDemoListener.onDatabaseChangeNotification() should be invoked on any insert/update to the registered table. But this method is not getting invoked.
    The execution has stopped in the following line of DBChangeNotification.java Class.
    this.wait();
    +==> The application was WAITing indefinitely in this line, as the NOTIFY() from DCNDemoListener.java was not executed.+
    I am using VPN to connect to Oracel server. Remote Oracle Server is protected my firewall. Is this the reason for not sending the notifications from Oracle server?
    The version of software used are given below:
    Oracle Client - Oracle 11.1.0
    JDK - 1.6
    Oracle JDBC Driver - ojdbc6.jar
    Can someone help me to resolve this issue?
    Thanks in Advance.
    Regards
    Sam
    Edited by: Ponsu on Apr 7, 2011 10:41 PM

    Hi,
    I am having similar issue. Where you able to resolve it.
    I am also using the same example you were using.
    I am using the following version.
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    Compatibility: 11.2.0.0.0
    I do not see any notification coming back from the DB.
    Appreciate your help.
    Thanks & regards,
    Ebe

  • Sort order in Java Application (deploy in Oracle oc4j container)

    I have a Java application deploy in Oracle OC4J container (EAR file).
    In my Java application (jsp), I have a SQL statement who return data but the
    sort order is wrong. The letters "é" and all characters with accents
    appears at the end of the result.
    I tried many things to change the sort order (NLS parameters in database
    and OAS10g parameter files).
    When I use SQL*plus on database server, that's working.
    The sort order is wrong when I use the java application.
    Somebody can tell me what and where is the NLS parameters to change ?
    Thanks
    Robin

    Robin,
    I'm only guessing, but it could either be related to the java locale or the CHARSET attribute of the HTML header -- and nothing to do with the NLS parameters.
    Maybe you should try the Globalization Support forum?
    Good Luck,
    Avi.

  • Using oracle personal for developing java application?

    Can I use Oracle 9i Personal Edition for developing Java applications? Does it provide a JDBC Type 4 driver?
    Thanks a lot.
    [email protected]

    SIR I WANT TO UPLOAD MY DEVELOPER FORMS BY USING ORACLE 8I SERVER?
    CAN U TELL ME THE PROCEDURE IN DETAIL?
    I WILL BE THANKFUL TO U
    MY EMAIL ADDRESS IS [email protected]

  • How to deploy java bean in Oracle Applications?

    There is a Oracle Applications Forms FNDMNMNU.fmb which calls a Java Bean to show TreeView.
    The Bean Area uses the implementation class of AppletAdapter.class. Do you know that we have to use the same AppletAdapter class so that we can connect to Oracle database?
    In the form of FNDMNMNU.fmb, the java bean is called like this.
    fndaplt.applet_init('FND_MENUS.TREE_VIEWER',
    'FS',
    'oracle.apps.fnd.functionSecurity.client.FunctionTreeViewer',
    l_list_id);
    Do you know what 'FS' means ?
    Thank you very much in advance!
    It is my first time to use Java Bean in Oracle Applications!

    HI srini ,
    my application version 12.0.4 and database is 10.2.0.4
    and i want to restrict the No of users
    exp i have have 500 users and i want restrict to 100 only
    how can i do that please explain
    Thanks,
    Sudheer

Maybe you are looking for