Deploying SQLJ classes as Java Stored Procedures using JDeveloper 10g

Hello,
I have defined a SQLJ class, MwaSqljDao.sqlj, in JDeveloper. When I right click on the SQLJ class and "make" the class. It appears to succeed.
However when I attempt to build the project in which the SQLJ class is a member of, a class that uses the SQLJ class has the following compile error:
- MwaSqljDao not found.
After a little digging it appears JDeveloper is able to compile the .sqlj file to a .java file in the classes output directory. However it does not take it to the next step of compiling the .java file into a .class file.
Is SQLJ still a main stream Oracle technology? Or has it been cast to way side to make way for other technology?
If SQLJ is still a supported Oracle technology how do go about compiling the SQLJ class using JDeveloper?
My goal is to deploy SQLJ into JServer as a Java Stored Procedure class.
Thank you,
Rob

Excellent.
Especially that you resolved it and even more so that you posted the solution.
I do wonder whether you would have gotten help (faster) has you asked in a JDeveloper-related forum such as " Forum Home » Developer Tools » JDeveloper and ADF" at JDeveloper and ADF

Similar Messages

  • Error while deploying a Java Stored Procedure using JDeveloper

    Hi,
    I was going thru the Oracle By Example article: "Developing SQL and PL/SQL with JDeveloper". (http://www.oracle.com/technology/obe/obe9051jdev/ide1012/plsqlobe/obeplsql.htm)
    One of the items in this article is - "Creating and Deploying a Java Stored Procedure"
    I was able to create a java class, compile it. Created a deployment profile. created a pl/sql wrapper. While trying to deploy the java stored procedure, I am getting the following error:
    Invoking loadjava on connection 'hr_conn' with arguments:
    -order -resolve -thin
    errors : class package1/mypackage/JavaStoredProc
    ORA-29521: referenced name java/lang/StringBuilder could not be found
    The following operations failed
    class package1/mypackage/JavaStoredProc: resolution
    oracle.aurora.server.tools.loadjava.ToolsException: Failures occurred during processing
         at oracle.aurora.server.tools.loadjava.LoadJava.process(LoadJava.java:863)
         at oracle.jdeveloper.deploy.tools.OracleLoadjava.deploy(OracleLoadjava.java:116)
         at oracle.jdeveloper.deploy.tools.OracleLoadjava.deploy(OracleLoadjava.java:46)
         at oracle.jdevimpl.deploy.OracleDeployer.deploy(OracleDeployer.java:97)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:474)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:361)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:285)
         at oracle.jdevimpl.deploy.StoredProcProfileDt$Action$1.run(StoredProcProfileDt.java:383)
    #### Deployment incomplete. #### Oct 27, 2005 1:38:56 PM
    Appreciate your help on this..

    I am using Jdeveloper 10.1.3 Early Access Version. JDK comes with it. I also have another JDK on my machine (JDK1.4.2_09)

  • Java Stored Procedure using XSU on 9i Lite

    I have create Java Stored Procedure using XML SQL Utility to return results in XML format. I have tested the stored procedure on the development machine (with SDK and Webtogo)without any problem. When I tested it on the client machine (with only the lite database for Window download from the webtogo server as part of the setup), there's an error [POL-8035] no such attribute or method when I call the procedure through MSQL. However, after calling the stored procedure the 3rd times, it will return the results in XML. Once I logout after that, I will have to call the same SP 3 times (always 3 times) before I get the results.
    I'm running on Win2000, Oracle lite 5.0.1. with jdk 1.3.1 - same for the development machine.
    I'm using the same xsu12.jar file.
    What did I miss?

    Nothing?
    No one? No ideias?
    Regards,
    Flavio Matiello

  • How to call java stored procedure using RMI?

    Is it possible to make a call to java stored procedure using RMI. ?
    How can I run the RMI registry on the Oracle Server ?

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Thomas Grounds ([email protected]):
    Is it possible to make a call to java stored procedure using RMI. ?
    In principle it is possible. See the Java-Doc.s of Oracle 8.1.6.
    I have successful granted the java.net.SocketPermissions in my USER_JAVA_POLICY view (see Doc.) Now I was able to use the RMI-Sockets, but following
    failure try to connect to RMI-Object via RMIregistry an Oracle Error occurs
    ORA-03113: end-of-file on communication channel
    and after that my Oracle Connection is closed.
    How can I run the RMI registry on the Oracle Server ?<HR></BLOCKQUOTE>
    I think you do not need the RMI registry on Oracle Server. It should be possible to start the RMI registry wherever you want in your network and access it via the right registry string.
    Ciao
    Margit
    null

  • How to deploy signed jars/classes in Java Stored Procedure

    I am using java encryption API in my java application that I want to deploy as java stored procedure. The API is kept in the signed jar files.
    The Application is running in the MS-DOS environment but not in Oracle8i.
    It gives me following error.
    java.lang.ExceptionInInitializerError: java.lang.SecurityException: Cannot set
    up certs for trusted CAs
    at javax.crypto.b.<clinit>([DashoPro-V1.2-120198])
    at javax.crypto.KeyGenerator.getInstance([DashoPro-V1.2-120198])
    at DesKey.GenerateKey(DesKey.java:63)
    declare
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.ExceptionInInitializerError
    ORA-06512: at line 4
    (Note: I have enabled the java output in SQL Plus editor otherwise it will give only the second part of error that starts from ERROR at line 1:)
    please guide me how to solve this problem.
    Salman Hameed
    null

    Salman,
    If you do not get a reply on this forum, I recommend you post this question on the Oracle JVM discussion forum as well.
    In addition, I would recommend checking the documentation for Oracle8i. The Oracle8i Java Developer's Guide, the Java Stored Procedures Guide, and the JDBC Developer's guide may have some information on this topic. You can get to this doc from the OTN Documentation page. Click on Oracle8i, then General Documentation, Release 2 (8.1.6), then scroll down to see the link for the Oracle8i Java Developer's documetation. All of the books mentioned above are available from that link.

  • Deploy package with Java Stored Procedure without JDeveloper

    I have a set of Java Stored Procedures deployed as a package on a Oracle 8i server. Everything works fine in my development environment, and now I would like to deploy the same package in the customers runtime environment. Both environments are running Oracle 8i rel 2 on NT.
    Is there a simple way to use the JDeveloper .prf deployment profile without installing JDeveloper in the customers environment?
    If not, can I the get the .jar files and .sql scripts from JDeveloper to create the call specs and package bodys?
    I guess JDeveloper must have this information, and my idea was then to write a script using loadjava and SQL*Plus.
    Regards,
    Tom Bjerre

    you would not be able to take just the deployment profile and run it outside JDeveloper.
    You would be able to create archive of all java classes in the package using Deployment Wizard in JDeveloper.
    Then you can load the jar file using the utilities in 8i.
    JDeveloper does generate the SQL for CALL specs etc ., at the deployment time and it is printed in MEssage Viewer along with other information.
    Hope that info is useful for you
    raghu

  • How to debug java stored procedures using jdwp with Eclipse IDE?

    I need to debug the java stored procedures loaded in Oracle 9.2.0.6. The java files are loaded into the database using dbms_java.loadjava('-force -debug -verbose -resolve lib/java_stored_procs.jar'); The jar contains .java files and the database resolves and compiles them into .class files. Works fine but I need to debug the code. I am tried of the println method since takes too much and too many iterations.
    My IDE is Eclipse 3.1. I want to use the jdwp for debugging in my IDE. Any one who knows the exact steps?
    Thanks a lot.

    I need to debug the java stored procedures loaded in Oracle 9.2.0.6. The java files are loaded into the database using dbms_java.loadjava('-force -debug -verbose -resolve lib/java_stored_procs.jar'); The jar contains .java files and the database resolves and compiles them into .class files. Works fine but I need to debug the code. I am tried of the println method since takes too much and too many iterations.
    My IDE is Eclipse 3.1. I want to use the jdwp for debugging in my IDE. Any one who knows the exact steps?
    Thanks a lot.

  • How to call EJB deployed on OC4J from java stored procedure?

    Hello,
    I'd like to call EJB from java stored procedure. My example works fine from command line, but the problem seems to be with deployment of this code into database. Especialy I'm wondering how to reference jars like oc4jclient.jar, ejb.jar, ... from java stored procedure.
    Is there some example how to do that ?
    Can You help me please ?
    Many thanks,
    Radim Kolek,
    Eurotel Prague.

    Hi,
    You may want to check up this thread
    Calling JBoss EJBs from Java stored procedure
    Hope this helps,
    Sujatha.
    OTN Group.

  • Help Needed in Creating Java Class and Java Stored Procedures

    Hi,
    Can anyone tell how can i create Java Class, Java Source and Java Resource in Oracle Database.
    I have seen the Documents. But i couldn't able to understand it correctly.
    I will be helpful when i get some Examples for creating a Java Class, Java Source and Stored Procedures with Java with details.
    Is that possible to Create a Java class in the oracle Database itself ?.
    Where are the files located for the existing Java Class ?..
    Help Needed Please.
    Thanks,
    Murali.v

    Hi Murali,
    Heres a thread which discussed uploading java source file instead of runnable code on to the database, which might be helpful :
    Configure deployment to a database to upload the java file instead of class
    The files for the java class you created in JDev project is located in the myworks folder in jdev, eg, <jdev_home>\jdev\mywork\Application1\Project1\src\project1
    Hope this helps,
    Sunil..

  • Calling Stored Procedure Using OSB 10g R3

    Hi Guys,
    I wanted to know what is the best way to call a Stored Proc from OSB 10 g R3.
    I am using MS SQL 2005 server.

    The DB Adapter does, in fact, support SQL Server in 10.1.3.x. The adapter configuration wizard does not support SQL Server so a command-line utility is necessary in order to generate the BPEL artifacts (XSD and WSDL). Once the artifacts are created, it is very easy to create a partner link to a SQL Server stored procedure. The adapter runtime has no restrictions beyond what is stated in the documentation. Note that the wizard will support SQL Server in 11g.

  • Strangely behaving Java Stored Procedure using Sockets

    Hi,
    I have a java class which connects to 10.x.x.x:2100 to interact with a server to download some files using a custom protocol.
    After using it for once and immediately invoking it again causes it to just return without actually invoking the java class.After say,1 minute if the same call is made it is invoked properly.
    The call to the pl/sql wrapper is made from a .net application in an asynchronous callback.
    What could be the cause.Did anyone run into this anytime.?
    Thanks

    Without a code example to run, it would be ahrd to say what is happening. It looks like there is an issue with blocking v.s. unblocking i/o that gets resolved after a wait period. If you can get me an example, I iwll take a look.

  • Java Stored Procedure using OCI

    The RoomsInformationProcedure example code has errors !!!
    The RoomsInformationProcedure.java doesn't work because the second query is incorrect:
    // Query to find out total number of available rooms for a given Room Type
    // and Hotel ID
    stmt = connection.prepareStatement("SELECT TOTAL_"+ roomType +
    " FROM room_availability WHERE " +
    " hot_id = TO_NUMBER(?) AND " +
    " booking_date = ( SELECT MAX(booking_date) " +
    " FROM room_availability " +
    " WHERE hot_id = TO_NUMBER(?) )" );
    stmt.setString(1,hotelId); // Bind Input Hotel ID Parameter
    stmt.setString(2,hotelId); // Bind Input Hotel ID Parameter ! ERROR !
    stmt.setString(2,roomType); // Bind Input Room Type !OK !
    Also review the columns name in the table.

    No, the code is correct and it works as expected.
    Here is why :
    a) The relational table room_availability has following columns :
    Name Null? Type
    HOT_ID NOT NULL NUMBER(10)
    BOOKING_DATE NOT NULL DATE
    BOOKED_SGLB NOT NULL NUMBER(4)
    BOOKED_DBLE NOT NULL NUMBER(4)
    BOOKED_QEEN NOT NULL NUMBER(4)
    BOOKED_KING NOT NULL NUMBER(4)
    BOOKED_SUIT NOT NULL NUMBER(4)
    BOOKED_OTHR NOT NULL NUMBER(4)
    TOTAL_SGLB NOT NULL NUMBER(4)
    TOTAL_DBLE NOT NULL NUMBER(4)
    TOTAL_QEEN NOT NULL NUMBER(4)
    TOTAL_KING NOT NULL NUMBER(4)
    TOTAL_SUIT NOT NULL NUMBER(4)
    TOTAL_OTHR NOT NULL NUMBER(4)
    b) When you want to get total number of rooms for room type 'SGLB', for hotel with hot_id '7080', the above query becomes
    select TOTAL_SGLB FROM room_availability WHERE hot_id = 7080 AND
    booking_date = ( SELECT MAX(booking_date) FROM room_availability
    where hot_id = 7080)
    which returns expected value.
    Note that : the roomType is appended to the sql query and is not binded to the prepared statement.
    -- Regards
    OTN Team

  • Error loading Java Stored Procedure

    When I attempt to deploy a java stored procedure using JDeveloper I get the following error: "ORA-29545: badly formed class: User has attempted to load a class (TestingJava.Testerama) into a restricted package. Permission can be granted using dbms_java.grant_permission(<user>, LoadClassInPackage...". I have attempted to grant the proper permissions but get a "java.lang.SecurityException: policy table update" error. The user granting the permissions has the Java_Admin role. What do I do?
    null

    I think u dont've previleges to run
    the procedure.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by arunr12:
    hi I am calling java stored procedure from jdbc. i am getting wierd exceptions:
    CallableStatement cstmt = conn.prepareCall("begin SEND_MAIL(?,?,?);end;");
    cstmt.setString(1,"[email protected]");
    cstmt.setString(2,"Mail from Stored Proc");
    cstmt.setString(3,"This is test mail from Oracle8i");
    cstmt.execute();
    i am getting following Exception:
    java.sql.SQLException: ORA-29532: Java call terminated by uncaught Java exception: java.security.AccessControlException: the Permission (java.util.PropertyPermission * read,write) has not been granted by dbms_java.grant_permission to SchemaProtectionDomain(ISTORE_CUST|PolicyTableProxy(ISTORE_CUST))
    ORA-06512: at "ISTORE_CUST.SEND_MAIL", line 0
    ORA-06512: at line 1
    <HR></BLOCKQUOTE>
    null

  • SQLJ and Java Stored Procedures

    Hi,
    Am very sorry, if I am taxing you too much with Java Stored Procedures!!
    However, I have struggling with it for more than 3 days or so.So please bear with me
    I am facing a peculiar problem on the subject.
    I have deployed a Java Stored Procedure using Connection name as "JDBC" through JDev.
    My client calls the Stored procedure getDept as follows:
    int deptNo = 0;
    String deptName = null,
    deptLoc = null;
    #sql {
    call sample.getDept( :out deptNo,
    :out deptName,
    :out deptLoc)
    In my project properties , in SQLJ tab, when I select "JDBC" as my connectionName, and leave the ContextName blank(i.e. DefaultContext), I get the following error :
    Error: [26] Not Found: SAMPLE.GETDEPT There is no stored procedure with this name
    When I leave the ConnectionName as blank (which I suppose means donot do online checking!!), it compiles OK.
    Howvever, it is not able to run my SQLJ file!!
    Cannot figure out why this is happening.Please help!!
    TIA
    Sandeep
    null

    Looks like Java stored procedure don't support the return of result sets to the client. Given the complexity and non-generic 'cursor ref' approach that Oracle has always implemented, I guess it is not too surprising. I suggest throwing the select into a work table and pulling the rows from there. If you are in a COM capable environment, you can use 0040 to get back a Dynaset, but be aware, it is live!
    Good luck.
    Cal

  • ORA-04030: out of process memory when using Java Stored Procedures

    Hello,
    I have a problem using Java Stored Procedures in Oracle 10g.
    My Java application performs http posts to a webservice and the response is parsed in order to populate some DB tables.
    There is a scheduled job which calls the Java Stored Procedure every x minutes.
    No matter of the 'x minutes' values - after about 160 - 200 calls I get this error:
    ORA-04030: out of process memory when trying to allocate 1048620 bytes (joxp heap,f:OldSpace)
    ORA-04030: out of process memory when trying to allocate 2097196 bytes (joxp heap,f:OldSpace)
    The job stops just while is posting the http request. The weird thing is that almost each time the first http post request I get this error:
    java.net.ConnectException: Connection refused
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
         at java.net.Socket.connect(Socket.java:426)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(DashoA6275)
         at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:140)
         at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:130)
         at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
         at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
         at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
         at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
         at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
    and the second try works fine.
    So, The out of process memory occured each time just before getting such an error, and I suspect to be a connection between these errors.
    Tech details:
    1. OS: WinXP
    2. Oracle 10.1.0.2.0
    3. To perform http post I use HttpClient 3.1 from Apache.
    4. I checked the http connection to be closed each time, and this is done.
    5. I checked the oracle statement and connection to be closed each time and this is done
    6. The JVM error (logged in .trc files of Oracle) is:
    java.lang.OutOfMemoryError
         at java.lang.Thread.start(Native Method)
         at sun.security.provider.SeedGenerator$ThreadedSeedGenerator.run(SeedGenerator.java:297)
    DB Settings details:
    Starting up ORACLE RDBMS Version: 10.1.0.2.0.
    System parameters with non-default values:
    processes = 200
    sessions = 225
    shared_pool_size = 159383552
    large_pool_size = 8388608
    java_pool_size = 104857600
    nls_language = AMERICAN
    control_files = C:\ORACLE\PRODUCT\10.1.0\ORADATA\XXXXXX\CONTROL01.CTL, C:\ORACLE\PRODUCT\10.1.0\ORADATA\XXXXXX\CONTROL02.CTL, C:\ORACLE\PRODUCT\10.1.0\ORADATA\XXXXXX\CONTROL03.CTL
    db_block_size = 8192
    db_cache_size = 29360128
    compatible = 10.1.0
    fal_client = XXXXXX
    fal_server = XXXXXXs
    log_buffer = 524288
    log_checkpoint_interval = 100000
    db_files = 70
    db_file_multiblock_read_count= 32
    db_recovery_file_dest = C:\oracle\product\10.1.0\flash_recovery_area
    db_recovery_file_dest_size= 2147483648
    standby_file_management = AUTO
    undo_management = AUTO
    undo_tablespace = undotbs_01
    undo_retention = 14400
    remote_login_passwordfile= EXCLUSIVE
    db_domain =
    dispatchers = (PROTOCOL=TCP) (SERVICE=XXXXXXXDB)
    remote_dependencies_mode = SIGNATURE
    job_queue_processes = 4
    parallel_max_servers = 5
    background_dump_dest = C:\ORACLE\PRODUCT\10.1.0\ADMIN\XXXXXX\BDUMP
    user_dump_dest = C:\ORACLE\PRODUCT\10.1.0\ADMIN\XXXXXX\UDUMP
    max_dump_file_size = 10240
    core_dump_dest = C:\ORACLE\PRODUCT\10.1.0\ADMIN\XXXXXX\CDUMP
    sort_area_size = 1048576
    sort_area_retained_size = 1048576
    db_name = XXXXXX
    open_cursors = 500
    optimizer_mode = FIRST_ROWS
    pga_aggregate_target = 25165824
    Any help would be appreciated. Thanks.
    Can be a problem with JVM threading under Oracle ?

    The server prcess failed to allocate more memory for large objects ( in Oldspace).
    If you Google ORA-04030, you will see several recommendations to work around this.
    The Java VM in the database already has HttpClient, i don't know why you are loading the Apache HttpClient but this might not be the surce of the problem.
    Kuassi http://db360.blogspot.com

Maybe you are looking for

  • How to upload multiple .CSV files in the same time.

    Hi Legends, Can anyone please help me to resolve my issue? This is very urgent and critical. Description: We have two users.1)edw_user_dump 2)prd_udm. We need to upload the xx.csv file at the same time for these two users in oracle forms. we have dif

  • Won't Sync Purchased Music

    My iPod won't sync music that has been legitimately purchased with an itunes music card. I lost about 50 songs - with my iTune player saying they weren't "authorized" to be played on my iPod. Can anyone share some advice?

  • How to change document dimensions and scale image proportionally?

    Hi there, I've created over a hundred files in Photoshop for placement in a book I'm making with software provided by the printer that uses templates of set sizes. My big mistake was to make all the files in Photoshop at A4 size (21cm X 29.7cm) where

  • Can i use alter command in script

    type1=`sqlplus -s scott/tiger@home <<EOF1 spool file1.sql alter table $v_tabname add(col1 number(10)); but select * from $v_tabname; is working in side the unix script spool off; EOF1` alter table $v_tabname add(col1 number(10)); command is not worki

  • Acrobat Reader über Registry einstellen.....

    Hi, ich bin dringend auf der Suche nach den Registry Einträgen, die der AcrobatReader vornimmt, die die BrowserIntegration an und auschalten. Ich ändern nach der Installation des Readers die Registry über ein kleines Progi. Diese beiden Werte habe ic