INVALID java classes

Earliar I posted a question looking for help with
deployment/redeployment that suddenly when bad and after some investigation I noticed that a high percentage of my Java classes under Oracle/HTTPClient are invalid.
This can't be normal, what steps should I take to correct
this
Regard
David

David --
I don't have a good answer, however you might want to try this question on the Database JVM forum here: Java in the Oracle Database
Thanks,
Rob
Team JDev

Similar Messages

  • 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                                                                                                                                                                                                                                                                                                                                               

  • Invalid Java classes in Portal30 schema

    Hi,
    we have lots of (14-15) invalid java classes in portal30 schema. How do I make them valid?
    It is urgent !!!!!
    Thanks
    Vikas

    Put all of them in one jar.
    Then load the single jar.

  • How to download a java class from database to file system

    Hi All,
    We have one invalid java class in database. We need to verify what is the functionality of this class. So we planned to download this class to file system. Then we need decompile it to source. But we are not able to identify the right command to download the java class from database.
    Please suggest me if any possible ways to acheive this.
    Thanks in advance....

    http://www.sql.ru/forum/actualthread.aspx?tid=747308
    http://download.oracle.com/docs/cd/B19306_01/java.102/b14187/appendixa.htm
    PROCEDURE export_source(name VARCHAR2, schema VARCHAR2, blob BLOB)
    PROCEDURE export_class(name VARCHAR2, schema VARCHAR2, blob BLOB)
    PROCEDURE export_resource(name VARCHAR2, schema VARCHAR2, blob BLOB)
    create table scott.t (id number, b blob);
    declare      
        b blob;
        begin
           dbms_lob.createTemporary(b, true, dbms_lob.CALL);
           dbms_java.export_class('sun/net/www/ParseUtil', user, b);
          dbms_output.put_line('length(b): '||length(b));
          insert into "SCOTT"."T" values(1,b);
        end;

  • 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

  • How do Java Class Objects get invalid?

    How do Java Classes get invalid in the database?

    What version of Oracle?
    Oracle provided or user created?
    Generally speaking if you modify the database objects a class depends on you can invalidate the object which in turn can invalidate dependend code/objects.
    More specifics are needed if you need a better response.
    HTH -- Mark D Powell --

  • Problem with servicegen and how to convert java classes to webservices

    I am a beginner and am trying to convert all my java code into webservices,I have
    a java class Test.java and number of other third party libraries and my own java
    files that are reffered in Test.java. I want to expose the public methods in Test.java
    as webservices.
    the serivegen part of My build.xml is as below
    <servicegen
    destEar="${APPLICATIONS}/${ear_file}"
    warName="${war_file}">
    <service
    javaClassComponents="com.verizon.Test"
    targetNamespace="${namespace}"
    serviceName="Test"
    serviceURI="/Test"
    generateTypes="True"
    expandMethods="True">
    </service>
    <classpath>
    <pathelement path="${build}"/>
    <pathelement path="${java.class.path}"/>
    </classpath>
    </servicegen>
    When i run ant it complains:
    [servicegen] weblogic.xml.schema.binding.BindingException: Invalid class received:
    interface org.apache.crimson.tree.ElementFactory loaded from file:/apps/opt/crimson.jar!/org/apache/crimson/tree/ElementFactory.class.
    All classes that will be serialized or deserialized must be non-interface, non-abstract
    classes that provide a public default constructor
    I have no clue,Why is Servicegen introspecting the third party class file also?I
    just need the public methods in Test.java exposed and Test.java will just use
    the third party library.
    also,is there a way to tell servicegen to include all these java files X,Y,Z to
    the war file/ear files but expose only the public methods of X in the WSDL.
    Please help
    thanks
    Suresh

    Hi Bruce,
    Thanks very much for the insight u provided.Yes one of my public methods was returning
    a element factory.
    But let me ask my question this way:
    Is there a way to tell servicegen to take only the specified public methods in
    a class to make them as webservices?
    by default servicegen is taking all the public methods..,i workaround i found
    is to deploy the webservice manually by writing the web-services.xml to include
    only the required public methods.
    thanks
    Suresh
    Bruce Stephens <[email protected]> wrote:
    Hi Suresh,
    Does your Test.java have a public method that returns the element
    factory of an XML document, like "public ElementFactory
    getElementFactory ();" or such?
    If so, you may want to check out the supported build-in and non-built-in
    data types:
    http://edocs.bea.com/wls/docs81/webserv/assemble.html#1060696
    Concerning your last question, you can use the excludeEJBs, includeEJBs
    (in combination with the ejbJar attribute) to specify which non-built-in
    data type components should be generated. Or if you use the
    javaClassComponents then simply use a comma separated list of class
    names.
    Hope this helps,
    Bruce
    suresh wrote:
    I am a beginner and am trying to convert all my java code into webservices,Ihave
    a java class Test.java and number of other third party libraries andmy own java
    files that are reffered in Test.java. I want to expose the public methodsin Test.java
    as webservices.
    the serivegen part of My build.xml is as below
    <servicegen
    destEar="${APPLICATIONS}/${ear_file}"
    warName="${war_file}">
    <service
    javaClassComponents="com.verizon.Test"
    targetNamespace="${namespace}"
    serviceName="Test"
    serviceURI="/Test"
    generateTypes="True"
    expandMethods="True">
    </service>
    <classpath>
    <pathelement path="${build}"/>
    <pathelement path="${java.class.path}"/>
    </classpath>
    </servicegen>
    When i run ant it complains:
    [servicegen] weblogic.xml.schema.binding.BindingException: Invalidclass received:
    interface org.apache.crimson.tree.ElementFactory loaded from file:/apps/opt/crimson.jar!/org/apache/crimson/tree/ElementFactory.class.
    All classes that will be serialized or deserialized must be non-interface,non-abstract
    classes that provide a public default constructor
    I have no clue,Why is Servicegen introspecting the third party classfile also?I
    just need the public methods in Test.java exposed and Test.java willjust use
    the third party library.
    also,is there a way to tell servicegen to include all these java filesX,Y,Z to
    the war file/ear files but expose only the public methods of X in theWSDL.
    Please help
    thanks
    Suresh

  • Java .class files low-level (hex) editing?

    Hello, all!
    I have a problem:
    There is an application (namely a J2ME instant messanger for Nokia mobiles). It is a non-commercial application. But unfortunately, there is a bad bug in the application. It is not even a bug, it is more a feature - but it does not support Russian (cyrillic) characters encoding. Russian characters in all incoming messages are displayed with a kind of hierogliphs.
    I wrote to developers (and not only I did - I know at least 3 russian people who also wrote a developer about this) - but unsuccessful. Developer keeps silent.
    So what I decided is to fix the bug by myself :) By decompilation, e t.c.
    Unfortunally, the midlet is hard obfuscated :( So it took me some hours of reading obfuscated code, and now I see some ways which I must try to solve the problem. I think I must write a code which processes the desired String variables (Despite obfuscation, I can see which Strings to process to obtain effect), and inject this code somewhere to be executed, and from where it could reach the desired Strings.
    But the great problem is that obfuscated classes produce a lot of erroneus code, which can not be compiled back. So I decide to reject the decompilation at all, or at least of the big classes (where it is a lot of errors, which I can not correct manually).
    In some moments, the application stores the desired Strings in the java.lang.Hashmap. So if I could place my processing code into the Hashmap methods, then I could easily process what I need.
    Evidently, I can not edit the real basic java classes. But why not to make the applicaton using my class with identical functionality, instead of java.jang.Hashmap?
    My idea now is to edit the .class file of the midlet (yeah, edit with notepad), replacing all the references to "java/lang/Hashmap" or "java.lang.Hasmap" with "java/lang/Fuckmap" and "java.lang.Fuckmap".
    So did I (replaced it in norepad).
    I read the Sun's documentation about .class file structure, and it seems that nothing is against it. There is no encryption, no checksums, e t.c.
    Then I produced "Fuckmap" class this way:
    import java.lang.Hashmap;
    class Fuckmap extends Hashmap {}
    (compiled and preverified it of course)
    And placed it into java/lang folder inside the application jar.
    I instead of working properly, I get the "Application error - invalid constant pool entry"). What do I do wrong?

    2 lexzeus, mlk:
    I understood you.
    I jave just tried it, and used "jaga/util/Fuckmap" (jaga, not java). But still the same ("Invalid constant pool entry). I tried two times (maybe I could make something wrong?), both times took "clean" jar package, e t.c.
    Do you really think jav.alang.Hashmap should help now? I have ony little hope :(

  • Errors generating Java classes from XML schema

    I received the following errors when generating Java classes from the schema located at: http://imsproject.org/xsd/ims_qti_rootv1p1.xsd and http://imsproject.org/xsd/ims_xml.xsd
    XML Spy v4 claims that the schema is well-formed and valid. Could this be a problem with the class generators, or is XML Spy not telling the truth?
    Thanks.
    D:\IMS_QTI\Java>java -classpath .;lib/xmlparserv2.jar;lib/xschema.jar;lib/classgen.jar oracle.xml.classgen.oracg -schema ims_qti_rootv1p1.xs
    d -outputDir src\com\icld\qti -package com.icld.qti -comment
    file:/D:/IMS_QTI/Java/ims_qti_rootv1p1.xsd<Line 235, Column 21>: XSD-2209: (Error) Duplicated definition for: 'attr.view'
    file:/D:/IMS_QTI/Java/ims_qti_rootv1p1.xsd<Line 303, Column 21>: XSD-2209: (Error) Duplicated definition for: 'grp.labels'
    file:/D:/IMS_QTI/Java/ims_qti_rootv1p1.xsd<Line 1834, Column -12236>: XSD-2209: (Error) Duplicated definition for: 'qtimetadatafield'
    file:/D:/IMS_QTI/Java/ims_qti_rootv1p1.xsd<Line 1834, Column -9642>: XSD-2209: (Error) Duplicated definition for: 'typeofsolutionType'
    file:/D:/IMS_QTI/Java/ims_qti_rootv1p1.xsd<Line 2252, Column -3019>: XSD-2026: (Error) Invalid attribute 'use' in element 'attribute'
    Error: Schema Class Generator failed to generate classes. oracle.xml.parser.schema.XSDException: Duplicated definition for: 'attr.view'

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jinyu Wang ([email protected]):
    Which version are you using? I can't reproduce the error with 9.0.2B version.<HR></BLOCKQUOTE>
    Thanks for having a look at the problem. I am using the 9.0.2.0B version with Java 2 Standard Edition Build 1.3.1-b24. The classgen -version option returns 9.0.2.0b-beta - and xmlparserv2.jar and xschema.jar are from the same distribution. Running the corresponding DTD from the same source work fine - I'm just havinf this problem with the XSD. Anything else I should look at?

  • Create java class/resource from binary blob in SQL statement

    Is there a way of creating a java class or resource from a binary blob in the CREATE JAVA CLASS statement? Something like:
    CREATE OR REPLACE JAVA CLASS
    USING BLOB 'CAFEBABE0000003100120A0004000D08000E07000F0700100100063C696E69743E010003282956010004436F646501000F4C696E654E756D6265725461626C6501000372756E01001428294C6A6176612F6C616E672F537472696E673B01000A536F7572636546696C6501001152657475726E537472696E672E6A6176610C0005000601001F546869732069732061206E657720737472696E67207269676874206865726501000C52657475726E537472696E670100106A6176612F6C616E672F4F626A65637401000F6175726F72615F6F70745F696E666F002100030004000000000002000100050006000100070000001D00010001000000052AB70001B10000000100080000000600010000000100090009000A000100070000001B00010000000000031202B0000000010008000000060001000000030002000B00000002000C00110000004C00000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009705070397050703';
    I've tried various combinations of casting & convert functions, all of them give an ORA-29506 error 'Invalid query derived from USING clause', and nothing useful is gained from google about this. Is there a way of specifying the class binary in this way?

    You can load Java classes into the database, then create a PL/SQL procedure or function in the database that calls that Java class.
    This leaves you with a standard PL/SQL procedure/function which you can call from Oracle Forms.
    Have a look at the database documentation on how to load a Java class: http://download.oracle.com/docs/cd/A91202_01/901_doc/java.901/a90210/toc.htm

  • ERROR: Invalid java version found: while runing Autoconfig

    Hi
    while upgrading EBS 12.1.3 Database from 11.1.0.7 to 11.2.0.2
    We got the below error on autoconfig.
    F:\app\mocppd\product\11.2.0\dbhome_1\appsutil>F:\app\mocppd\product\11.2.0\dbho
    me_1\appsutil\bin\adconfig.cmd contextfile=prod_srv-moc.xml
    Enter the APPS user password: apps
    cygwin warning:
      MS-DOS style path detected: F:\app\mocppd\product\11.2.0\dbhome_1\appsutil\bin
    \adconfig.pl
      Preferred POSIX equivalent is: /cygdrive/f/app/mocppd/product/11.2.0/dbhome_1/
    appsutil/bin/adconfig.pl
      CYGWIN environment variable option "nodosfilewarning" turns off this warning.
      Consult the user's guide for more details about POSIX paths:
        http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
    The log file for this session is located at: F:\app\mocppd\product\11.2.0\dbhome
    _1/appsutil/log/prod_srv-moc/02040321/adconfig.log
    AutoConfig is configuring the Database environment...
    AutoConfig will consider the custom templates if present.
            Using ORACLE_HOME location : F:\app\mocppd\product\11.2.0\dbhome_1
    ERROR: Invalid java version found:
            sh: F:appmocppdproduct11.2.0dbhome_1jdkjre/bin/java: No such file or dir
    ectory
    ERROR: Invalid java version found:
            sh: F:appmocppdproduct11.2.0dbhome_1jdkjre/bin/java: No such file or dir
    ectory
            Classpath                   :
    sh: - : invalid option
    Usage:  sh [GNU long option] [option] ...
            sh [GNU long option] [option] script-file ...
    GNU long options:
            --debug
            --debugger
            --dump-po-strings
            --dump-strings
            --help
            --init-file
            --login
            --noediting
            --noprofile
            --norc
            --posix
            --protected
            --rcfile
            --restricted
            --verbose
            --version
            --wordexp
    Shell options:
            -irsD or -c command or -O shopt_option          (invocation only)
            -abefhkmnptuvxBCHP or -o option
    Version Conflicts among development maintained and customized templates encounte
    red; aborting AutoConfig run.
    The logfile for this session is located at: F:\app\mocppd\product\11.2.0\dbhome_
    1/appsutil/log/prod_srv-moc/02040321/adconfig.logThanks
    Nawneet

    Hi Helios,
    I have changed the prod_srv-moc.xml script and executed the script.
    And now i got the below error.
    F:\app\mocppd\product\11.2.0\dbhome_1\appsutil>F:\app\mocppd\product\11.2.0\dbho
    me_1\appsutil\bin\adconfig.cmd contextfile=prod_srv-moc.xml
    Enter the APPS user password: apps
    cygwin warning:
    MS-DOS style path detected: F:\app\mocppd\product\11.2.0\dbhome_1\appsutil\bin
    \adconfig.pl
    Preferred POSIX equivalent is: /cygdrive/f/app/mocppd/product/11.2.0/dbhome_1/
    appsutil/bin/adconfig.pl
    CYGWIN environment variable option "nodosfilewarning" turns off this warning.
    Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
    The log file for this session is located at: F:/app/mocppd/product/11.2.0/dbhome
    _1/appsutil/log/prod_srv-moc/02040605/adconfig.log
    AutoConfig is configuring the Database environment...
    AutoConfig will consider the custom templates if present.
    Using ORACLE_HOME location : F:/app/mocppd/product/11.2.0/dbhome_1
    Classpath : :F:/app/mocppd/product/11.2.0/dbhome_1/jdb
    c/lib/ojdbc6.jar:F:/app/mocppd/product/11.2.0/dbhome_1/appsutil/java/xmlparserv2
    .jar:F:/app/mocppd/product/11.2.0/dbhome_1/appsutil/java:F:/app/mocppd/product/1
    1.2.0/dbhome_1/jlib/netcfg.jar:F:/app/mocppd/product/11.2.0/dbhome_1/jlib/ldapjc
    lnt11.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/apps/ad/tools/
    configuration/VersionConflictListGenerator
    Caused by: java.lang.ClassNotFoundException: oracle.apps.ad.tools.configuration.
    VersionConflictListGenerator
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    Could not find the main class: oracle.apps.ad.tools.configuration.VersionConflic
    tListGenerator. Program will exit.
    ERROR: Version Conflicts utility failed.
    Terminate.
    The logfile for this session is located at: F:/app/mocppd/product/11.2.0/dbhome_
    1/appsutil/log/prod_srv-moc/02040605/adconfig.log
    Thanks
    Nawneet

  • How get ddl of JAVA CLASS? dbms_meta.get_ddl do not work with java_source

    hi all,
    i can not generate the DDL of java class in 10g r2 as below.
    sys@RPTDB > select dbms_metadata.get_ddl('JAVA_SOURCE','BRStatus','HDADMIN') from dual;
    ERROR:
    ORA-31603: object "BRStatus" of type JAVA_SOURCE not found in schema "HDADMIN"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
    ORA-06512: at "SYS.DBMS_METADATA", line 2806
    ORA-06512: at "SYS.DBMS_METADATA", line 4333
    ORA-06512: at line 1
    actually, the object exists.
    sys@RPTDB > select object_name,object_type,owner from dba_objects where object_name='BRStatus';
    OBJECT_NAME OBJECT_TYPE OWNER
    BRStatus JAVA CLASS HDADMIN
    thanks for any inputs.

    sys@RPTDB > select dbms_metadata.get_ddl('JAVA SOURCE','BRStatus','HDADMIN') from dual;
    ERROR:
    ORA-31600: invalid input value JAVA SOURCE for parameter OBJECT_TYPE in
    function GET_DDL
    ORA-06512: at "SYS.DBMS_METADATA", line 2682
    ORA-06512: at "SYS.DBMS_METADATA", line 2733
    ORA-06512: at "SYS.DBMS_METADATA", line 4333
    ORA-06512: at line 1
    no rows selected
    did you really get right results with JAVA SOURCE? my version is 10g r2

  • 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"

  • Data Pump and Java Classes

    I tried importing the data from one schema to another but the Java classes that we use (via Java Stored Procedures) are showing up as invalid. Is there any reason why? We are using Oracle 10g R2. I tried resolving them by running the following sql, but that didn't work either:
    ALTER JAVA CLASS "<java_clss>" RESOLVER (("*" <schema_name>)(* PUBLIC)) RESOLVE;
    Any thoughts will be appreciated.

    There are two ways to instantiate a target's data. One is to use a native data loader or utility. In Oracle's case, Oracle Data Pump (not the "data pump" in GG) or SQL*Loader, as an example. The other way is to use GoldenGate's data pump.
    You can configure DDL synchronization for Oracle, but you have to turn off the recycle bin. See Chapter 13 in the admin guide.

  • How to invoke a 6 parameter java class within jsp

    i have just begun to learned jsp and java recently, so have the question below:
    Situation:
    My boss asked me to do a project for doing online data mining.
    He requested the thing below:
    1. Write a webpage by jsp with some textfield or pull down meun to get the parameter for getting the opinion and the parameter needed for the java class.
    2. When the user click the buttom in the website, then the java class have to be invoked.
    Questions:
    1. ask i put the .java in the server, i can simply use cmd and type the following command:
    java -Xmx800M P05context 1 1 3 6 F01xyz.txt F10xyz.txt
    which F01xyz is the prepared text file for the java class to read and the F10xyz.txt is the output file generated by the P05context.class
    but i don't know how to invoke the P05context.class by jsp
    My boss have suggested me two ways to do this:
    a. write a java virtual class to execute the java program.
    but i don't know how to write.
    i think conceptualy will be like this :
    public class run_java
    public void run java(parameter1,parameter2....,parameter6)
    //run the cmd command
    //java -Xmx800M P05context 1 1 3 6 F01xyz.txt F10xyz.txt
    b. write a javabean in the jsp. and i have try to use this code(at the end of the message:
    but the tomcat server reply a internal error to me
    how cani do ?
    the jsp file-->
    <jsp:useBean id="test" scope="session" class ="P05context" />
    <html>
    <head></head>
    <body>
    <% test.P05context(1,1,3,6,F01xyz.txt,F10xyz.txt); %>
    </body>
    </html>

    I still don't see why the form (the origin of the request) has to be a JSP, As you say, it might be static but forms I've written have usually had some kind of menu framework arround them and other variables. Also if the input is invalid you usually want to re-present the form, with an error message and the fields pre-populated according to what the user put in before. That does require a JSP and you may as well use the same JSP for an empty, as for a rejected request.
    the response to the form should be handled by a servlet. Both is HTML, but the
    form is static, and the reply dynamic. Using the combination; a servlet to do the data processing and a JSP to format the results is more flexible in a number of ways. For example, suppose you find the need to present the data form in, say, Greek? You don't want the processing to be duplicated in English and Greek versions of the results JSP.
    Suppose the boss wants to turn a graphics designer loose on your HTML. Don't want him mucking about with your processing code do you.
    The servlet typically takes the function of controller in the model/view/controller paradigm.
    Code in a servlet is cleaner, better formatted and easier to access with a debugger.

Maybe you are looking for