Loadjava fails; create java source succeeds

When using loadjava to load a Java class into the database I receive the following error:
C:\OEMNT\bin>loadjava -user us/pw@db -verbose -resolve HelloWorld.class
initialization complete
loading : HelloWorld
Error while loading HelloWorld
ORA-00942: table or view does not exist
creating : HelloWorld
Error while creating class HelloWorld
ORA-29506: invalid query derived from USING clause
ORA-00942: table or view does not exist
resolver :
resolving: HelloWorld
Error while resolving class HelloWorld
ORA-04043: object HelloWorld does not exist
loadjava: 3 errors
When using the CREATE JAVA SOURCE command from SQL the Java source + Class is created without problems.
It seems loadjava wants to insert or check something in a table. But what table?

Hi,
Omitting -jarasresource is the first step.
You probably need to specify -recursivejars in cas there are jars in your jars.
Also use -genmissing option in case some classes are still missing in the jars files you've loaded.
Kuassi http://db360.blogspot.com

Similar Messages

  • JAVA NOT INSTALLED.. error while creating java source

    Hi All,
    I am trying to create java sources in oracle database lke
    create or replace and compile java source named rnp as
    public class RNP as
    import java.util.GregorianCalendar;
    public class calcrnp {
    But it is throwing an error : JAVA NOT INSTALLED..
    I am not getting any clue regarding this...
    Can any please help me..
    Thanks
    Ashok

    How about
    create or replace java source named "rnp" as
    import java.util.GregorianCalendar;
    public class calcrnp {
    /K.

  • Problem with creating JAVA Source. please help

    Dear all
    how are you.
    In fact I have made a simple java class that return a string which represents the screen size . for example 800/600 or 1024/768 or others
    but I face error ORA-29541 class string.string could not be resolved
    This what i made
    first i created my JAVA Source
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "ScreenProperty" AS
    import java.lang.Object;
    import java.awt.*;
    public class ScreenProperty
    int w;
    int h;
    public static String getScreenSize()
    w = Toolkit.getDefaultToolkit().getScreenSize().width;
    h = Toolkit.getDefaultToolkit().getScreenSize().height;
    return w+"/"+h;
    SQL>Operation 160 succeeded.
    this means the the java source created successfuly
    and I'm sure that my java code is correct
    then i created a fuction to call this java source as fellow
    SQL> create or replace function f_get_screen_size
    return varchar2
    as language java
    name 'ScreenProperty.getScreenSize() return java.lang.String';
    Function created.
    the I Issued this sql statement to return the result that should be varchar2 that represent the sceen size(1024/768)
    SQL> select f_get_screen_size from dual;
    ORA-29541 class string.string could not be resolved.
    I do not know what is the reason for this error
    and when i searched the documentation for this error i found
    ORA-29541 class string.string could not be resolved
    Cause: An attempt was made to execute a method in a Java class that had not been previously and cannot now be compiled or resolved successfully.
    Action: Adjust the call or make the class resolvable
    I need to know what is the problem.
    And is there another way to load this class other than making JAVA SOURCE
    please help

    before drawing hands of clock you could fill a circle/oval with certain color, then you'd have that kind of circle that has been filled as backgound.
    you may change those dots to be small lines for 12, 3, 6 and 6 o'clock and then have small dots represent 1, 2, 4, 5, 7, 8, 10 and 11 o'clock
    anyhow, you should study that code and see how you can modify it whitout breaking it but having it look different.
    better yet would be trying to understand how it works, what any line there means and then recreate your own... this way you would learn more....
    and if there are some methods or anything you don't understand, then look them up from API documentation
    good luck.

  • Creating java sources

    My Oracle version is 10.2 eneterprise edition on RHEL 5
    The below code is a working code .It fails in my machine showing error .
    Can some one tell why
    CREATE or replace JAVA SOURCE NAMED "MyTimestamp"
    AS
    import java.lang.String;
    import java.sql.Timestamp;
    public class MyTimestamp
    public static String getTimestamp()
    return (new Timestamp(System.currentTimeMill is())). toString();
    ERROR at line 1:
    ORA-29536: badly formed source: Encountered "is" at line 7, column 51.
    Was expecting one of:
    "instanceof" ...
    ">" ...
    "<" ...
    what's the mistake i am doing

    I tried your code and got the same error. Then noticed that you have some spaces in {font:CourierNew}"System.currentTimeMill is())). toString();"{font}. One space after "Mill" and one before the toString.
    I removed that and it worked for me
    me@mydb> CREATE or replace JAVA SOURCE NAMED "MyTimestamp"
      2  AS
      3
      4  import java.lang.String;
      5  import java.sql.Timestamp;
      6  public class MyTimestamp
      7  {
      8          public static String getTimestamp()
      9          {
    10                  return (new Timestamp(System.currentTimeMillis())).toString();
    11          }
    12  };
    13  /
    Java created.-Shreyas.

  • Help on creating java source code

    I am new to java, and I have the java 1.4.2 and java 5.0 and I am having problem creating programs that will allow a user to run a program that requires their input. I can not find the class or package that needs to be imported and instiated for this to be possible....

    Using the System.in stream, you can easily grab command-line input from the user.
    import java.io.*;
    public class Example {
         public Example() throws IOException {
              BufferedReader b = new BufferedReader(new InputStreamReader(System.in));
              System.out.print("What is your name? ");
              String name = b.readLine();
              System.out.println("You entered: \""+name+"\"");
         public static void main(String args[]) {
              try {
                   new Example();
              catch (IOException e) {
                   e.printStackTrace();
    }

  • Java source / oracle.sql.BLOB.createTemporary

    Hi!
    I want to write some java-code (CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED...)
    where I want to return an image as blob.
    For doing that I have to initialize the blob in the java-code -correct?
    I see many examples like
    oracle.sql.BLOB.createTemporary(conn, false,oracle.sql.BLOB.DURATION_CALL)
    In PL/SQL there is some similar:
    dbms_lob.createtemporary(lob_loc => xmlclob, cache => TRUE, dur => dbms_lob.SESSION);
    If I have to initialize the blob in the java source, how to do that?
    I don't want an connection to an remote database, the java-code will be in the database, so can I call createTemporary without >conn<?
    (Oracle 10gR2, Windows, Linux, AIX)
    The picture will be generated calling other java-code loaded with loadjava.
    The java-source I want to write will be wrapped with PL/SQL.
    Greetings
    Bjørn

    Hi!
    It seems you can do this:
              try {
                   conn = new OracleDriver().defaultConnection();                graphblob = oracle.sql.BLOB.createTemporary(conn, false,oracle.sql.BLOB.DURATION_CALL); // must init
                   System.out.println("Blob is init");
              } catch ( java.sql.SQLException sEx ) {
                   throw new RuntimeException ("No connection", sEx);
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:1285601748584
    http://www.unix.org.ua/orelly/oracle/guide8i/ch09_08.htm
    /Bjoern

  • How to use java source in Oracle when select by sqlplus.

    How to use java source in Oracle when select by sqlplus.
    I can create java source in Oracle
    import java.util.*;
    import java.sql.*;
    import java.util.Date;
    public class TimeDate
         public static void main(String[] args)
    public String setDate(int i){
    GregorianCalendar calendar = new GregorianCalendar();
    calendar.setTime(new Date((long)i*1000));
    System.out.println("Dateline: "
    + calendar.get(Calendar.HOUR_OF_DAY) + ":"
    + calendar.get(Calendar.MINUTE) + ":"
    + calendar.get(Calendar.SECOND) + "-"
    + calendar.get(Calendar.YEAR) + "/"
    + (calendar.get(Calendar.MONTH) + 1) + "/"
    + calendar.get(Calendar.DATE));
    String n = calendar.get(Calendar.YEAR) + "/" + (calendar.get(Calendar.MONTH) + 1) + "/" + calendar.get(Calendar.DATE);
         System.out.print(n);
         return n;
    I have table name TEST
    ID DATE_IN
    1 942685200
    2 952448400
    When I write jsp I use method setDate in class TimeDate
    The result is
    ID DATE_IN
    1 1999/11/16
    2 2003/7/25
    Thanks you very much.

    It is unclear where you are having a problem.  Is your issue at runtime (when the form runs in the browser) or when working in the Builder on the form?
    Also be aware that you will need to sign your jar and include some new manifest entries.  Refer to the Java 7u51 documentation and blogs that discuss the changes.
    https://blogs.oracle.com/java-platform-group/entry/new_security_requirements_for_rias
    http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/manifest.html

  • How to view record from java source table

    hi,
    i had created a table as
    CREATE JAVA SOURCE NAMED "Hello" AS
    public class Hello {
    public static String hello() {
    return "Hello World"; } };
    also it compiled but i dont've idea to view the record from it
    can u help me

    Please check the following script --
    create or replace and resolve java source named "Hello"
    as
    import java.io.*;
    import java.sql.*;
    import java.math.*;
    import oracle.sql.*;
    import oracle.jdbc.driver.*;
    public class Hello extends Object
        public static String Display()
        throws IOException
            return "Hello World";
    create or replace procedure Hello(v_str  out varchar2)
    is
       language java
       name 'Hello.Display(java.lang.String) return String';
    create or replace procedure HDisplay
    is
    x  varchar2(400);
    begin
      Hello(x);
      dbms_output.put_line('String is: '||x);
    end;And, from sql prompt --
    exec HDisplay;N.B.: Not Tested...
    Regards.
    Satyaki De.
    Message was edited by:
    Satyaki_De

  • Viewing Java Source File

    Why do we get a line saying 'create or replace' at the top when viewing java source shouldn't this read, as a minimum, 'create java source named "java object name" as'

    Bump
    I'm also still getting this in 919; any response from the team?
    thanks,
    William

  • Decompilation errors java source "java/sql/Date"

    Hi,
    I've decompiled a Contoller file and inside the new created java source file
    there is a line like
    <b>
    Class aclass2[] = {
    java/sql/Date, java/lang/Integer, java/lang/String, java/lang/String
    </b>
    But this line can't be compiled in a new file version. What is the equivalent to this or how can I change it, so that
    the java file can compiled properly.
    Thanks a a lot and regards
    Robert
    Edited by: user2979718 on 17.05.2010 02:05

    Hi Robert,
    Try with Class aclass2[] = {
    java.sql.Date, java.lang.Integer, java.lang.String, java.lang.String
    Hope this will resolve your issue.
    Regards,
    Reetesh Sharma

  • APEX fails with Java stored procedure that creates a JDBC connection

    Hello!
    We are facing a strange problem since we have upgraded from Oracle 10g and Apache to Oracle 11g with Embedded Gateway.
    Here is what we do:
    ** APEXX calls a PL/SQL package function "OPEN_CONNECTION" that wraps a Java stored procedure called "openConnection".*
    FILE_READER_REMOTE_API.openConnection(user, password, host, port, service);
    ** The Java stored procedures "openConnection" opens a JDBC connection to an other database:*
    public class FileReaderRemote {
    private static Connection conn = null;
    private static DefaultContext remoteContext = null;
    public static void openConnection(String user, String password, String host, String port, String service) throws SQLException {
    // Load the Oracle JDBC driver
    DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
    java.util.Properties props = new java.util.Properties();
    props.put ("user", user);
    props.put ("password", password);
    //props.put ("database", "//" + host + ":" + port + "/" + service);
    props.put ("database", host + ":" + port + ":" + service);
    props.put("v$session.program", "FileReaderRemote2");
    // Connect to the database
    remoteContext = Oracle.getConnection("jdbc:oracle:thin:", props);
    This procedure used to work fine before the upgrade, but now we see the following:
    * It still works when called directly from TOAD or SQL*Plus, even under the user ANONYMOUS.
    * When called from APEX and the target database is Oracle 11g, it still works.
    * When called from APEX and the target database is Oracle 10g, it takes several minutes and we receive this error:
    *"Socket read timed out"*
    We have tested the following workaround:
    We have created a database link to our own database and called the stored procedure through that database link.
    FILE_READER_REMOTE_API.openConnection*@loopback*(user, password, host, port, service);
    This works, but is not really an option.
    I hope some one of you can explain this strange behaviour to me.
    Best regards,
    Matthias

    You wrote
    "Java stored procedures -- by definition - are stored in the 8i rdbms. !!"
    From the Oracle8i Java Stored Procedures Developer's Guide
    Release 8.1.5
    A64686-01
    "If you create Java class files on the client side, you can use loadjava to upload them into the RDBMS. Alternatively, you can upload Java source files and let the Aurora JVM compile them. In most cases, it is best to compile and debug programs on the client side, then upload the class files for final testing within the RDBMS"
    This means that you can create shared classes that are used on both the client and server side. The source does not need to reside within the server (according to their documentation). Please also note the following from the Oracle8i JDBC Developer's Guide and Reference Release 8.1.5 A64685-01 for using the getConnection() method on the server:
    "If you connect to the database with the DriverManager.getConnection() method, then use the connect string jdbc:oracle:kprb:. For example:
    DriverManager.getConnection("jdbc:oracle:kprb:");
    Note that you could include a user name and password in the string, but because you are connecting from the server, they would be ignored."
    So if you're coding a shared class that is to run on both the client and server side, you might do something like this:
    Connection conn =
    DriverManager.getConnection(
    System.getProperty("oracle.server.version") == null
    ? "jdbc:oracle:thin:@hostname:1521:ORCL"
    : "jdbc:oracle:kprb:"),
    "youruserid","yourpassword");
    As stated earlier, the userid and password are supposedly ignored for server connections retrieved in this manner. I haven't tried this yet, but it is documented by Oracle.
    Regards,
    Steve
    null

  • Create SAP Source System Failed

    Hi all,
    We are using NetWeaver 2004s BI and try to connect to ECC 5.0. I tried to create SAP source system but got error message saying "RFC user logon failed". When I check RFC destination in ECC 5.0 for BI, the test connection is ok, but the remote logon will pop up another logon screen asking for id and password. I am pretty sure that the id and password in RFC destination is correct. The RFC destination in BI is ok. Can you help me out with this? Thanks a lot in advance.

    Hi,
    Check the Default Logon <b>Client</b> for ECC 5.0
    and verifiy that the User is in the Same Client
    Each RFC destination has a mapped user for specific Client..Check the Client and User in the same client
    regards
    Happy Tony
    Message was edited by: Happy Tony

  • The command oracg fails to generate Java source files

    I tried to use the command 'oracg -schema Openshipments.xdr' to generate Java source files from
    XML schema file Openshipments.xdr . Although the schema file is valid, the command oracg fails with following error messages :
    file:/D:/romel/project/UPS/doc/Openshipments.xdr<Line 6, Column 47>:
    XSD-2026: (Error) Invalid attribute 'name' in element 'element'
    file:/D:/romel/project/UPS/doc/Openshipments.xdr<Line 6, Column 47>:
    XSD-2030: (Error) Element 'schema' has invalid namespace:
    'urn:schemas-microsoft-com:xml-data'
    file:/D:/romel/project/UPS/doc/Openshipments.xdr<Line 6, Column 47>:
    XSD-2027: (Error) Invalid element 'ElementType' in 'schema'
    file:/D:/romel/project/UPS/doc/Openshipments.xdr<Line 6, Column 47>:
    XSD-2027: (Error) Invalid element 'ElementType' in
    'schema'file:/D:/romel/project/UPS/doc/Openshipments.xdr<Line 6, Column
    47>: XSD-2027: (Error) Invalid element 'ElementType' in 'schema'
    file:/D:/romel/project/UPS/doc/Openshipments.xdr<Line 6, Column 47>:
    XSD-2027: (Error) Invalid element 'ElementType' in 'schema'
    file:/D:/romel/project/UPS/doc/Openshipments.xdr<Line 6, Column 47>:
    XSD-2027: (Error) Invalid element 'ElementType' in 'schema'
    file:/D:/romel/project/UPS/doc/Openshipments.xdr<Line 6, Column 47>:
    XSD-2027: (Error) Invalid element 'ElementType' in
    'schema'file:/D:/romel/project/UPS/doc/Openshipments.xdr<Line 6, Column
    47>: XSD-2027: (Error) Invalid element 'ElementType' in 'schema'
    file:/D:/romel/project/UPS/doc/Openshipments.xdr<Line 6, Column 47>:
    XSD-2027: (Error) Invalid element 'ElementType' in 'schema'
    ...... the above line is repeated many times
    Error: Schema Class Generator failed to generate classes.
    oracle.xml.parser.schema.XSDException: Invalid attribute 'name' in
    element 'element'

    Your schema is not a valid XML Schema. Please check up with the syntax.
    Thanks.

  • Fail to open java source file

    i just learn about java. but i find that i fail to open the java source that i had download from the net. do i need addition software to open it? if i had installed the jbuilder already?

    You should be able to open any .java file in Wordpad or Notepad. JBuilder just makes the code look pretty.

  • Message "Failed to create Java Virtual Machine" after starting Design Studio 1.2 SP1

    Hi experts,
    after I installed the SP1 of Design Studio 1.2 I become the Message "Failed to create java virtual machine" and I´m not able to start the Design Studio.
    My java version is 1.7
    My SapDesignStudio.ini File (C:\Program Files\SAP BusinessObjects\Design Studio) looks like as follow:
    -startup
    plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
    --launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20130521-0416
    -name
    SAP
    BusinessObjects
    Design
    Studio
    -vmargs
    -Xmx1024m
    -Xms256m
    -XX:PermSize=32m
    -XX:MaxPermSize=512m
    -XX:+HeapDumpOnOutOfMemoryError
    -Dfile.encoding=UTF-8
    -Dosgi.requiredJavaVersion=1.6
    -Djava.net.preferIPv4Stack=true
    -Djdk.xml.entityExpansionLimit=0
    -Djavax.net.ssl.trustStoreProvider=SunMSCAPI
    -Djavax.net.ssl.trustStoreType=Windows-ROOT
    -Dorg.osgi.framework.os.name=win32
    Any ideas or experiences?
    Many thanks and regards,
    Michael

    Hello Max,
    many thanks for your reply and your in my case absolutely correct answer!
    In respect to your solution proposal I have renamed my Analysis-workspace folder to "Analysis-workspace-V0"
    After I have started the Design Studio 1.2 SP1 a new Analysis workspace folder was created with the typical standard name "Analysis-workspace"
    So I have my old Design Studio Application and an new empty Analysis folder.
    By the way, in my case in addition to the folder rename it was necessary to change the -Xmx Value (SapDesignStudio.ini File) a little bit lower as in standard (in the DS1.2 SP1 setting) 1024m. To become not the Message "Failed to create Java Virtual Machine" I have changed the -Xmx Value from 1024m to 512m.
    Now I´m able to start the Design Studio 1.2 SP1 as expected without Message and without breaks down after 5-6 seconds during the startup.
    Thanks again!
    Best regards,
    Michael

Maybe you are looking for

  • How to install and run weblogic on windows via Cygwin?

    As subject.

  • Need help about PDF conversion

    I have red words in a text box using publisher. How come the text show up as black after PDF conversion in Adobe?

  • Photoshop/Iphoto problem

    Photoshop is not offered in the Preferences--Advanced--Edit menu. I have Photoshop Elements11 running on my MAcBook Air.  What's up?

  • Looking for a digital audio recorder

    I returned an olympus ds-2 digital voice recorder because I was told by one of the olympus techs that it would not work with a mac, and the media addition of the pc is also not compatible. It is interesting that after removing garage band at olympus'

  • Batch Scheduling of reports with parameters

    I've been searching the doc and have come up empty so far on this -- how do I take a Discoverer workbook/sheet that accepts a customer account parameter and set it up as a scheduled report? The trick here is that I want to schedule 100s of these thin