Alter java source compile hangs on cpu

When trying to compile java on the database, the session hangs, and is consuming massive CPU.
Statements executed:
create or replace java source named "hw" as
public class hw {public static String helloWho(String ename) {return "Hello "+ename;}}
alter java source "hw" compile
This worked before. Same problem occurs when using javaload. I tried this in a newly created schema aswell. Any ideas?
Db is a 11.2.0.1.0
Regards, Jan

Jan Leers wrote:
When trying to compile java on the database, the session hangs, and is consuming massive CPU.
Statements executed:
create or replace java source named "hw" as
public class hw {public static String helloWho(String ename) {return "Hello "+ename;}}
alter java source "hw" compile
This worked before. Same problem occurs when using javaload. I tried this in a newly created schema aswell. Any ideas?
Db is a 11.2.0.1.0
Regards, Jandoes code do DML?
does code do COMMIT?

Similar Messages

  • 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

  • ORA-24344 with JAVA SOURCE

    Hello,
    I try to recompile java stored procedures.
    I do it like this :
    ALTER JAVA SOURCE MY_JAVA_SOURCE_NAME compile;
    And I get the following error : ORA-24344: success with compilation error
    But if i do this it works.
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED MY_JAVA_SOURCE_NAME
    as
    My Java Code......
    Can anybody help me in just recompiling java source ?
    Edited by: Zabo on Mar 29, 2012 4:44 AM
    Edited by: Zabo on Apr 2, 2012 7:21 AM

    Zabo wrote:
    Hello,
    I try to recompile java stored procedures.
    I do it like this :
    ALTER JAVA SOURCE MY_JAVA_SOURCE_NAME compile;
    And I get the following error : ORA-24344: success with compilation error
    But if i do this it works.
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED MY_JAVA_SOURCE_NAME
    as
    My Java Code......
    Can anybody help me in just recompiling java source ?
    Edited by: Zabo on Mar 29, 2012 4:44 AM
    Edited by: Zabo on Apr 2, 2012 7:21 AM*Cause:  A sql/plsql compilation error occurred.
    // *Action: Return OCI_SUCCESS_WITH_INFO along with the error code
    It is a challenge to debug code that can not be seen
    Handle:     Zabo
    Status Level:     Newbie
    Registered:     Mar 22, 2007
    Total Posts:     149
    Total Questions:     31 (19 unresolved)
    why so many unanswered questions?
    Edited by: sb92075 on Apr 2, 2012 7:24 AM

  • Java Source to IA-32 Compilation

    One of the features of Java that Sun has always pushed is cross-platform compatability. Thus the need for a VM. However, if I'm only writing an application for Windows, is there a way to compile my Java source code directly to a binary executable compatible with the IA-32 architecture(Intel)? I realize the JVM is more than just an interpreter for byte code, but the JVM can also be a drag on performance.

    There are tools that can be purchased that will do that. The question is, "why?" Why use java for windows only code? As for the JVM a drag on perfomance, in the old days sure. Now it is negligible. Things like the hotspot VM do smart compiles to machine code inline and a bunch of other tricks. The most common reason why some java apps run slow is the ancient one. Basically that the java programmer that wrote it didnt know what he was doing. Examples: People that use GUI builder tools like that in JBuilder (Id love to throw all those dorks out the window). People that program in an OO language in a non OO fasion. People that believe that they will just go get a bigger cpu instead of refactoring the code to make it efficient.
    The average code block in my department gts rewritten something like 5 times. If you look at the old stuff it is so stable and efficient that running JUnit on it is almost a waste of time and its classes are excluded from all JProbe tests.
    Just what kind of project are you trying to code anyway ?

  • Error in compiling java source code in a package

    hi all...
    am having a problem in compiling a java source code:
    i have a class named 'Test' in the package 'packone'....
    i have another class named 'getTest' in the same package....
    in the class getTest i am taking a reference to Test class...
    on compiling i am getting the following error....
    cannot resolve symbol
    symbol : class Test
    The source code for the two classes are :
    package packone;
    public class Test{
    and
    package packone;
    public class getTest{
    public void me(){
         Test t = new Test();
    i have included the directory path in the classpath....
    still its not compiling .....
    please help
    thanks....

    Assume the current directory structure:
    C:\
    C:\packone...and that your classes are named Test & GetTest.
    My guess is that you're compiling within the directory C:\packone using the command "javac GetTest.java", which is wrong; You must use a path corresponding to the package-name.
    Move your command-line cursor to C:\ and type "javac packone\GetTest.java" and you'll be fine...
    Regards,
      /Håkan

  • How to compile in Java Source???

    Hello,
    I'm studying a way to compile java files to class files in the java source. I have use the sun.tools.javac.Main to do this, but I have noticed that it aint recomended to use. I also wan't to get the possible errors from the compiler (if java file was wrongly made). The problem using the sun.tools.javac.Main is that it won't guarantee that it works in every platform or in future releases of JDK. Does the JDK 1.4 even support it? (My IDE environment prevents to use JDK 1.4). So the question is: is there a way to compile on the fly (to memory or to class files)? Do I really have to run some external process that compiles the file and then try to get somehow possible errors? That seems to me litle too indecent to use. Any suggestions?
    Thanks,
    Petri Tuomaala

    Hi guys,
    I have also needed to compile Java source from within a Java application. Here is the best solution I came up with:
    Process proc = Runtime.getRuntime().exec( "
    C:\\Temp\\Jikes -bootclasspath C:\\jdk\\jre\\lib\\rt.jar C:\\Java\\com\\sts\\utility\\Utility.java" );
    BufferedReader br = new BufferedReader( new InputStreamReader( proc.getErrorStream() ) );
    String line = null;
    while( (line = br.readLine()) != null ) {
    System.out.println( line );
    proc.waitFor();
    I used Jikes http://oss.software.ibm.com/developerworks/opensource/jikes/ because it compiled my source quicker than Javac did - 250 millseconds for Jikes compared to 2750 milliseconds for Javac.

  • Compiling a java source in pl/sql developer - problems

    Hi,
    i'm using pl/sql developer and i created a javasource like this:
    import net.sf.jasperreports.engine.JRException;
    import net.sf.jasperreports.engine.JasperFillManager;
    create or replace and compile java source named Test as
    import net.sf.jasperreports.engine.JasperPrint;
    import net.sf.jasperreports.view.JasperViewer;
    import persistencia.JdbcDaoFactory;
    * @author igor.simoes
    public class ProcessoRelController {
    the problem is: when i compile the source, an error is displayed(canno't find symbol) in the first line (import net.sf.jasperreports.engine.JRException;)
    i wanna know how can i make the oracle JVM see the package(.jar) that contains net.sf.jasperreports.engine.JRException class, and the others classes in the import statement..
    thank's
    Igor Simões

    Hi,
    Refer the 'Implementing the report service' section in the following article: http://java.dzone.com/articles/java-reporting-part-2
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.util.HashMap;
    import net.sf.jasperreports.engine.JRException;
    import net.sf.jasperreports.engine.JRExporterParameter;
    import net.sf.jasperreports.engine.JasperCompileManager;
    import net.sf.jasperreports.engine.JasperExportManager;
    import net.sf.jasperreports.engine.JasperFillManager;
    import net.sf.jasperreports.engine.JasperPrint;
    import net.sf.jasperreports.engine.JasperReport;
    import net.sf.jasperreports.engine.export.JRXlsExporter;
    public static Connection establishConnection()
    Connection connection = null;
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    String oracleURL = "jdbc:oracle:thin:@localhost:1521:mySID";
    connection = DriverManager.getConnection(oracleURL,"username","password");
    connection.setAutoCommit(false);
    catch(SQLException exception)
    exception.printStackTrace();
    return connection;
    -Priyanka

  • Forte compile error java source files must have a .java suffix

    Hello Guru's,
    I am using Forte for Java release 2.0 build 1160, and Java SDK 1.3.1.
    When I try to compile a project in Forte I get the following error :
    "fastjavac: java source files must have a .java suffix C:\Program"
    I have looked at the source files and they do hav .java suffix!
    If this is not the correct form can someone point me in the right direction. If this is a correct forum then help is very much appreciated.
    Cheers...Harki

    Hi,
    Try to compile like this:
    javac yourfile.java
    Hope this helps you.
    Cheers.....Dinesh

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

  • Compile java source trough SQLPLUS (SP2-0317: expected symbol name is m...)

    Hello,
    I have a problem to compile java stored procedure trough SQLPLUS...
    After connection on my DB I execute script which includes many java sources for example:
    SPOOL INS-2870-2012.lst
    PROMPT 'EncoderJava'
    set def off
    set def &
    @@nsEUCStatistics.java
    @@nsVerifier.java
    @@nsICharsetDetectionObserver.java
    @@nsSJISVerifier.java
    @@Big5Statistics.java
    @@EncodingDetector.java
    @@EUCJPStatistics.java
    @@EUCKRStatistics.java
    spool offThe error I get is:
    SP2-0317: expected symbol name is missing
    Enter value for 0xff:
    old  33:                   (s*v.stFactor()+(((v.cclass()[((b&0xFF)>>v.eidxSft4bits)])
    new  33:
    Enter value for v:
    old  34:                   >> ((b & v.eSftMsk4bits) << v.eBitSft4bits))
    new  34:
    Enter value for v:
    old  35:                   & v.eUnitMsk4bits ))&0xFF)
    new  35:
    Enter value for 0xff:
    old  37:                   (s*v.stFactor()+(((v.cclass()[((b&0xFF)>>v.eidxSft4bits)])
    new  37:
    Enter value for v:
    old  38:                   >> ((b & v.eSftMsk4bits) << v.eBitSft4bits))
    new  38:
    Enter value for v:
    old  39:                   & v.eUnitMsk4bits ))&0xFF)
    new  39:
    Enter value for v:
    old  40:                & v.eSftMsk4bits) << v.eBitSft4bits)) & v.eUnitMsk4bits )
    new  40:
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "org/mozilla/intl/chardet/nsVerifier" AS
    ERROR at line 1:
    ORA-29536: badly formed source: Encountered ">>" at line 32, column 18.
    Was expecting one of:
    "#sql" ...
    "boolean" ...
    "byte" ...
    "char" ...
    "double" ...
    "false" ...
    "float" ...
    "int" ...
    "long" ...
    "new" ...
    "null" ...
    "short" ...
    "super" ...
    "this" ...
    "true" ...
    "void" ...
    <INTEGER_LITERAL> ...
    <FLOATING_POINT_LITERAL> ...
    <CHARACTER_LITERAL> ...
    <STRING_LITERAL> ...
    <IDENTIFIER> ...
    "~" ...
    "++" ...
    "+" ...
    "-" ...If I execute java stored procedure in TOAD as script all works fine..
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "org/mozilla/intl/chardet/nsVerifier" AS
    package org.mozilla.intl.chardet ;
    import java.lang.*;
    public abstract class nsVerifier {
         static final byte eStart = (byte)0;
         static final byte eError = (byte)1;
         static final byte eItsMe = (byte)2;
         static final int eidxSft4bits = 3;
         static final int eSftMsk4bits = 7;
         static final int eBitSft4bits = 2;
         static final int eUnitMsk4bits = 0x0000000F;
         nsVerifier() {
         public abstract String charset() ;
         public abstract int stFactor()   ;
         public abstract int[] cclass()   ;
         public abstract int[] states()   ;
         public abstract boolean isUCS2() ;
         public static byte getNextState(nsVerifier v, byte b, byte s) {
             return (byte) ( 0xFF &
              (((v.states()[((
                 (s*v.stFactor()+(((v.cclass()[((b&0xFF)>>v.eidxSft4bits)])
                 >> ((b & v.eSftMsk4bits) << v.eBitSft4bits))
                 & v.eUnitMsk4bits ))&0xFF)
              >> v.eidxSft4bits) ]) >> (((
                 (s*v.stFactor()+(((v.cclass()[((b&0xFF)>>v.eidxSft4bits)])
                 >> ((b & v.eSftMsk4bits) << v.eBitSft4bits))
                 & v.eUnitMsk4bits ))&0xFF)
              & v.eSftMsk4bits) << v.eBitSft4bits)) & v.eUnitMsk4bits )
    /What I'am doing wrong or how to run my script to load "java source" on my db... (without loadjava)...
    regards

    Hi,
    peterv6i.blogspot.com wrote:
    Hello,
    I have a problem to compile java stored procedure trough SQLPLUS...
    After connection on my DB I execute script which includes many java sources for example:
    SPOOL INS-2870-2012.lst
    PROMPT 'EncoderJava'
    set def off
    The command above tells SQL*Plus not to scan for substitution variables, and to treat the character that marks substitution variables (which is & by default) as a normal character.
    set def &That completely reverses the previous SET DEF command: it tells SQL*Plus to treat & as a special character that marks substitution variables.
    Perhaps you meant to issue the second SET DEF command after running all the scripts, like this:
    set def off
    -- & has no special meaning at this point
    @@nsEUCStatistics.java
    @@nsVerifier.java
    @@nsICharsetDetectionObserver.java
    @@nsSJISVerifier.java
    @@Big5Statistics.java
    @@EncodingDetector.java
    @@EUCJPStatistics.java
    @@EUCKRStatistics.java
    -- Resume default beahvior of &
    set def &
    spool offThis way, & will have no special meaning while you run all those .java files, but it will resume having it's special meaning as the substitution variable marker after that, so you can run other scripts which use that feature later in the same session.

  • Error while compiling the ejb java source files.................

    hi,
    i am new to ejb.......
    i have got error while compiling the ejb java source files............
    while compiling..........of this three i ahve got err in ejb home interface....
    ejb remote interface - succeded
    ejb bean class - succeded
    ejb home interface - error
    the error..............is in the return type of the ejb create() method in ejb home interface(which is the type of remote interface).
    the error message is cannot resolve symbol

    Hi,
    thanks for ur reply .....
    i have done enough searching in all sites including sun forum but in vain
    i have pasted my error below...
    can u plz predict anything from it
    D:\>path=%path%;c:\j2sdk1.4.2_12\bin;
    D:\>set classpath=%classpath%;d:\Sun\AppServer\lib\j2ee.jar;
    D:\>javac d:\Librarys\Library.java
    D:\>javac d:\Librarys\LibraryBean.java
    D:\>javac d:\Librarys\LibraryHome.java
    d:\Librarys\LibraryHome.java:8: cannot resolve symbol
    symbol : class Library
    location: interface Librarys.LibraryHome
    public Library create(String id, String name, String address, String phoneNo
    ) throws RemoteException, CreateException;
    ^
    d:\Librarys\LibraryHome.java:9: cannot resolve symbol
    symbol : class Library
    location: interface Librarys.LibraryHome
    public Library findByPrimaryKey(String id) throws FinderException, RemoteExc
    eption;
    ^
    2 errors
    thanks in advance...

  • How to compile a java source from a java program

    Hi .
    I would like to know how to compile my java source from inside an execution of a java program.
    Is there another way than rather use :
    Runtime.getRuntime().exec("javac myFile"); ?

    you can and cann't use the source code of javac... or maybe use jikes...

  • Package Compilation Hangs

    Hi,
    I want to compile a package. But it hangs, i wait long time but unable to compile it. Any session does not use that package. Do you have any idea? Where to start to check? How can i analyze it?
    Thanks...

    I cehecked from the script. Noone has executed the package. And then i tried to compile the package.
    SQL> alter package p compile;it hangs again.
    When i run the script i saw some packages that is called inside the package p
    TYPE      OWNER                     NAME                             SID  SERIAL
    PACKAGE   SYS                       DBMS_LOCK                        269      21
    PACKAGE   SYS                       DBMS_OUTPUT                      269      21
    PACKAGE   SYS                       DBMS_STANDARD                    269      21
    PACKAGE   SYS                       STANDARD                         269      21
    PACKAGE   SYS                       STANDARD                         269      21
    PACKAGE   MENNAN                    E                                269      21
    PACKAGE   MENNAN                    U                                269      21
    PROCEDURE MENNAN                    A                                269      21Then i checked from unix, relevant oracle process has take %99 of CPU
      PID USERNAME PRI NICE  SIZE   RES STATE   TIME    CPU COMMAND
    103889 oracle    51    0  399M   31M run     9:11 99.90% oracleThen i try to kill the session; but unfortunately i could not.
    SQL> alter system kill session '269,21';
    alter system kill session '269,21'
    ERROR at line 1:
    ORA-00031: session marked for killDo you have any idea?
    Thanks...

  • Any way to search for casts in java source code?

    Anyone know of a decent way to search your java source files to find all the casts?
    I ended up doing a simple text search for
         " = ("(quote marks not included) which works for my code because I am strict about writing my casts with spaces like
         String s = (String) iterator.next();Unfortunately, the above search has all kinds of problems with both false positives and negatives. It picks up lots of irrelevant lines like
         int index = (number > 0) ? 0 : 1;as well as misses casts that appear nested inside expressions like
         ((String) iter.next()).charAt(...)I suppose that one could do a regular expression search for any pair of open and close parens which bound non-blank text, but that would pick up even more non-cast expressions in typical java code.
    I think that the only way to properly do this is to have a tool which understands java syntax.
    Anyone know of an IDE which will do this? Does IntelliJ or Netbeans support this kind of search?
    In case you are wondering why I am interested in this, it is because I am refactoring some code to fully use generics, and searching for casts is one source of identifying candidates for genericity.

    cliffblob wrote:
    Better late than never?Yes!
    cliffblob wrote:
    ...The answer I found to ID unnecessary casts was, using Eclipse IDE, In compiler error and warning preferences to warn on unnecessary casts.Thanks for pointing IDEs out. I just opened IntelliJ, and going back to at least version 7.04 (maybe earlier) they have an inspection for "Redundant type cast".
    cliffblob wrote:
    I would still be interested to know if there is a way to identify casts in general in your source, perhaps now four years later there is a way?The only solutions that I can think of are either a complicated regex search, or you must use some tool like an IDE that understand Java syntax and can determine if a cast is happening.

  • Getting all the members (variables, methods AND method bodies) of a java source file

    For a project I want to programmatically get access to the members of java source file (member variables, methods etc) as well as to the source code of those members. My question is what is the best method for this? So far I have found the following methods:
    Use AST's provided by the Java Source API and Java Tree API, as discussed in the following posts:
    http://today.java.net/pub/a/today/2008/04/10/source-code-analysis-using-java-6-compiler-apis.html
    http://weblogs.java.net/blog/timboudreau/archive/2008/02/see_java_code_t.html
    http://netbeans.dzone.com/announcements/new-class-visualization-module
    This has the disadvantage that the classes actually have to be compilable. When I look at the Netbeans Navigator view however, it provides me with a nicely formatted UI list, regardless of the "compilable" state of the class.
    Thus I started looking at how to do this... The answer appears to be through the use of tools such as JavaCC: https://javacc.dev.java.net/
    ANTLR: http://www.antlr.org/
    which are lexers and parsers of source code. However, since the Navigator panel already does this, couldn't I use part of this code to get me the list of variables and methods in a source file? Does the Navigator API help in this regard?
    Another route seems to be through tools such as
    BeautyJ: http://beautyj.berlios.de/
    which run on top of JavaCC if I am correct, and which has the ability to provide a clean view on your java code (or an XML view). However, BeautyJ does not seem to be too actively developed, and is only j2se1.4 compatible.
    I hope someone can shed a light on the best way to go about what I want to achieve. Somebody already doing this?
    (I crossposted on the Netbeans forums too, hope this is OK...)

    I'm currently developing a LaTeX editor(MDI) and I do the same thing, but I don't know what exactly do you need.

Maybe you are looking for

  • Video card question.

    Hi, I just bought a new macbook pro. I got the cheapest one; http://store.apple.com/us/browse/home/shopmac/family/macbookpro?mco=MTM3NjU5MzU Now that I have a computer that isn't from the start of this decade I'm looking for one of those new games to

  • Install Leopard from a .DMG on an external drive?

    Hey guys, last night I got my copy of Leopard, and then the SuperDrive on my 17" 1.33 GHz PowerBook decided to take a dump. It doesn't read anything anymore - not a brand new Leopard disc, a Tiger disc, the System Restore discs, or the Transformers D

  • No low battery warning on new Macbook Pro (Mid 2012)

    Hello! I just purchased my macbook pro this saturday and it's my first mac. I've noticed that I do not receive a low battery warning at all. What can I do about this?

  • Music App: Playlist name doesn't display under folder

    I believe I have found a small but annoying bug in Music App.  I have my playlists organized into folders in itunes.  After sync'ing playlists in those folders to my iphone 6 (ios 8.1), when you select the folder, and then a playlist, instead of show

  • Customizing Reader 10.1 install

    I recently downloaded the Reader 10.1 update.  I use the Adobe X Customization tool to customize the initial install package for 10.01 to remove auto update, etc.  However, when I install the 10.1 update, it removes all my customizations!  How can I