INVALID Java Source/Class - 8i

Hi,
When I loaded the example java source:
public class Oscar {
// return a quotation from Oscar Wilde
public static String quote() {
return "I can resist everything except temptation.";
and looked at the table USER_OBJECTS for the result I find them to be in an invalid status:
Object Name Object Type Status Timestamp
Oscar JAVA CLASS INVALID 2002-01-09:16:18
Oscar JAVA SOURCE INVALID 2002-01-09:16:17
What could be happening? Thanks in advance for your help.
Harish

Harish,
You need to resolve your class when loading it for it to become valid. At this point you can do the following:
ALTER JAVA CLASS "name" RESOLVE;
You can also do this when loading Java Source from SQL*Plus as follows:
CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "name" AS
<java code>
Or, if you prefer loadjava, use the -resolve flag
Hope this helps,
-Dan Barr
http://www.compuware.com/products/numega/dbpartner/dbpordebug.htm
Debug Java in the Oracle Database

Similar Messages

  • Drop java class and java source

    Hi,
    When I query user_objects I get some java class and java source objects
    select * from user_objects where object_type like 'JAVA %';
    How do I drop these java source and java class objects from the database
    I tried using the following command
    drop java class /4a524d89_AutoTransliteratorPk
    drop java source AutoTransliteratorPkg
    But I get error ORA-29501: invalid or missing Java source, class, or resource name
    Please someone help me in dropping these objects
    thanks
    saaz

    was the java source all caps or was it exactly AutoTransliteratorPkg. If its exactly AutoTransliteratorPkg then try this
    drop java source "AutoTransliteratorPkg"

  • 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

  • IMPDP to import  JAVA CLASS  and JAVA SOURCE from .DMP file

    hi,
    I have a schema X, In that schema some of the *"JAVA CLASS" and "JAVA SOURCE"* objects are missing ..
    The procedures ,functions..etc objects were updated at X schema..
    I have 1 dmp file of Y schema , containing the missing "JAVA CLASS" and "JAVA SOURCE" s.. Can I import the the same to the schema X using IMPDP
    i tried using INCLUDE clause but it is not working
    eg:
    impdp john1/john1@me11g22 directory=datadump dumpfile=DEVF2WAR.DMP remap_schema=devf2war:john INCLUDE="JAVA CLASS","JAVA CLASS"but error..
    ORA-39001: invalid argument value
    ORA-39041: Filter  "INCLUDE" either identifies all object types or no object types.regards,
    jp

    Hello,
    You should type JAVA_CLASS and JAVA_SOURCE (use underscore instead of space).
    impdp john1/john1@me11g22 directory=datadump dumpfile=DEVF2WAR.DMP remap_schema=devf2war:john INCLUDE="JAVA_CLASS","JAVA_CLASS"Best Regards,
    Gokhan Atil
    If this question is answered, please mark appropriate posts as correct/helpful and the thread as closed. Thanks

  • Only to import  JAVA CLASS  and JAVA SOURCE  from .DMP file using IMPDP

    hi,
    I have a schema X, In that schema some of the *"JAVA CLASS" and "JAVA SOURCE"* objects are missing ..
    The procedures ,functions..etc objects were updated at X schema..
    I have 1 dmp file of Y schema , containing the missing "JAVA CLASS" and "JAVA SOURCE" s.. Can I import the the same to the schema X using IMPDP
    i tried using INCLUDE clause but it is not working
    eg:
    impdp john1/john1@me11g22 directory=datadump dumpfile=DEVF2WAR.DMP remap_schema=devf2war:john INCLUDE="JAVA CLASS","JAVA CLASS"but error..
    ORA-39001: invalid argument value
    ORA-39041: Filter  "INCLUDE" either identifies all object types or no object types.regards,
    jp

    Double post: IMPDP to import  JAVA CLASS  and JAVA SOURCE from .DMP file
    Already replied.
    Regards
    Gokhan

  • More than one class in single java source file?

    Is there a way to define more than one class in single java source file?
    I get a duplicate class definition error for each extra class, but I am sure there is a way to handle this in JDeveloper.
    Anyone knows how ?

    Please post the question in jdeveloper forum at
    JDeveloper and ADF
    for quick response.
    Regards,
    Anupama
    http://otn.oracle.com/sample_code/content.html

  • To view database Java Source and Class code in SQL Developer - Do this...

    I've wanted something like this for a while.. Hope this helps someone else...
    Make a master detail report...
    1. Click the reports tab.
    2. Right click on "user defined reports" and select "add report"
    3. Type "Java Source Object and Class Code" into the name field.
    4. Make sure "Style" is set to "Table".
    5. Paste this code into the "SQL" window.
    select OBJECT_NAME, OBJECT_TYPE, to_char(created,'DD-MON-YYYY HH24:MI:SS') Created, to_char(LAST_DDL_TIME,'DD-MON-YYYY HH24:MI:SS') "Last DDL", STATUS
         from user_objects
        where object_type in ('JAVA SOURCE')
        order by object_name6. Click "Add child"
    7. Make sure "Style" is set to "Code" in the child.
    8. Paste the following code into the SQL window of the child.
    select text from user_source where name = :OBJECT_NAME order by line9. Click Apply..
    10. Enjoy...
    no semicolons after the sql....
    Message was edited by:
    slugo

    Mark,
    Thanks Check this out people can now subscribe to the public reports out no the exchange.
    http://krisrice.blogspot.com/2007/10/marks-post-on-forums-got-me-to-do.html
    -kris

  • Do we have INCLUDE=JAVA CLASS AND INCLUDE=JAVA SOURCE OPTION IN DATA PUMP

    Hi All ,
    Can any one please tell me ,
    how to import only java class and java source from datapump export file.
    Include=java class or include=java source is not working ..
    Thanks in advance,
    Sanjeev.

    Duplicate post.
    datapump include option.
    Lock this thread

  • Converting class files into java source codes

    Dear Friends,
    It is true that conversion of class files to its java source codes is possible through some software. I want to know, is there any way to protect my java source codes from viewing or copying illegally by other persons ?
    If I create JAR file from java files, can it be also convertible back to source codes ?
    Avi

    You can use code obfuscators in order to protect your code. And yes a jar file can also be decompiled.
    http://www.retrologic.com/
    http://www.2lkit.com/products/2LKitObf/
    http://www.codingart.com/codeshield.html
    http://www.drjava.de/obfuscator/

  • Enhancement Request: Actions for JAVA Sources (compile to CLASS)

    Hi All,
    I would like to change my JAVA Source in the DATABASE and compile it again. At the moment I can see only the code but have no actions to compile and generate it to classes. Is this planned for a future release? AS a LAYOUT idea ... if classes can not be displayed I would suggest to remove them from the tree - they are not needed to display as far as I can see a compiled SOURCE. Will Raptor provide this for the future??
    Message was edited by:
    Frank C. Hoffmann
    Message was edited by:
    Frank C. Hoffmann

    I'm seeing the same problem; it will let me view Java code, and edit it in the editor, but there's no way of saving it back to the database, or compiling (or debugging or etc...)
    Also, if I try and run java in via the sql window I get:
    Error starting at line 1 in command:
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "whatever" AS
    Error report:
    Non supported SQL92 token at position: 227:
    Don't really know what that error message is for; is that column or row? I can't see either displayed for the sql window anyway. No clue what token it's talking about either - would be useful for it to give a better error message than that.
    thanks,
    William

  • Do we have to separate java source files and class files after compiled..

    Hi,
    I really confussed with this:
    I have compiled java source files into a package and tried to use but the classes can not be found. Should I separate class and source files after compiled with packages names. I hope you understand what i mean.
    Thank you
    So Jag

    You can choose to separate the source files or not. It sounds like your problem has to do with Classpath and packages.
    If the file c:\base\compute\engine\mysourcefile.java starts with the statement "package engine;" then the fully qualified name of the class is is engine.mysourcefile. If the file c:\base\compute\client\mysourcefile.java starts with the statement "package client;" then its fully qualified name is client.mysourcefile.
    In your source files, whenever you refer to a class from another class, the compiler needs the fully qualified class name. You can either import the class or use the fully qualified name. In order for the compiler to find the class, the c:\base\compute directory must be in the Classpath (assuming the package definitions from above).
    Finally, to launch an application given the above, the command would be "java client.mysourcefile" assuming the main method is in client.mysourcefile.

  • Invalid java class problem

    Hi , I have found this invalid java class in my schema portal30 : 3334f18_HttpProviderDispatche
    In which way can I recompile it , or eventually change it with a new one ?
    Thanks
    Max

    hi,
    Go to your portal navigator and try compiling the class. If you get compilation errors,you can load that class to your database using loadjava utility.
    --Sriram                                                                                                                                                                                                                                                                                                                                               

  • Java Library classes source code

    Hi all,
    Does anyone know where I could find source codes for java library classes. The ones that i am especially interested in finding are the inputStream, inputStreamReader, and BuferedReader classes.
    Thanks and regards,
    Green

    Does anyone know where I could find source codes for
    java library classes. The ones that i am especially
    interested in finding are the inputStream,
    inputStreamReader, and BuferedReader classes.http://java.sun.com/j2se/downloads/index.html

  • Is there any way to retrieve java source ie(.java) from java class (.class)

    I Lost my all java source file during system crash.But i have all class files.I want to get source files
    ie all .java files from that class.Is there any way to get my source from complied classs.
    Help me!!

    The short answer is no! But unofficially you can. The possibility (and the limitations) of the decompilation come from the class file format's being well-defined and open (available). So I do not think decompilation is very much "unofficial".
    You might, howebver, think decompilation is "unofficial", because there is no decomplier bundled with the "official" JDK (SDK): javap is useful but provides less than the decompilers.

  • Java source and class locked, unable to drop or replace

    Because Oracle 9i does not come with an FTP implementation, I installed the apache.commons.net package into the database, and implemented static java wrappers to allow me to publish the code.
    After thoroughly testing the code under JDeveloper, I deployed the code to the database.
    The code hung, establising a lock on one or more classes. Besides not knowing how to debug and java packages inside the Oracle database (eg, why did the code fail in the first place?), I have no idea how to unlock the source or class of my java objects.
    How does one find what process is locking the java source and/oir class?

    Try something like:
    select s.username, pr.pid, pr.spid from
    x$kglpn p, x$kglob o, v$process pr, v$session s
    where p.kglpnhdl = o.kglhdadr
    and pr.addr = s.paddr
    and p.kglpnuse = s.saddr
    and o.kglnaobj = dbms_java.shortname('fully/qualified/ClassName');

Maybe you are looking for

  • Standard Cash and Bank Reports

    Hi All, Can anyone please let me know if we have standard reports for the below mentioned scenerios...as i m getting a hard time looking for the same...i knw i am asking for more...i will appriciate your extended kind support CASH AND BANK 1. Periodi

  • Cloning 11.5.10.2 from RHEL3 to RHEL5

    Hi My application is running fine on RHEL3 and can to cloned to the same OS. Now I got new servers and wanted to shift on RHEL5. I can INSTALL a new instance on it using Rapid Wizard which works fine but when I try to clone my existing instance it gi

  • Mac not starting up after installing Logitech Control Center

    Hello, Since I installed Logitech Control Center I am not able to start my Macbook. The single mode revealed issues mentionning Logitech classes. The disk tool is not able to repair the disk. Booting on a snow leopard CD and using Disk Tool from ther

  • Reader is doulbe typed and hard to read but prints fine, how to fix

    when I get an adobe reader file open it appears to be double typed and hard to read but prints out fine. How do I fix this, anyone

  • Issue on saving using datasheet view

    Hi, My list contains few mutiple selection metadata columns. When I edit the document properties using data sheet view, the below specified error is displayed. "Changes to the current row cannot be saved due to invalid data or missing data in require