Iview modification: java class compilation ?

Hello,
I have downloaded from the portal the .par of the iview I want to modify.
I have extracted from this .par file one class for modification. I have decompiled this class using JavaDecompiler and I have modified the code.
My question is to know how I could now compile this modified class?
When it will be done I will put this class in the JAR file with the no modified classes.
Thanks for yout help,
Regards,
Jerome.

Hi Jerome,
First, welcome on SDN! About your question:
You have (at least) two options: Create a pure Java project in NWDS/Eclipse and compile the modified class, later on use some tool like WinRAR to exchange the original class with the modified one (dirty approach).
Or: Create a portal application project, remove the decompiled class from the privat lib jar / lib jar, put these modified JARs into the target lib directories, and put the decompiled Java file into the appropriate src section.
This way, the non-modified original class files as well as your modified class get together into the destination PAR. This one is also deployable from NWDS (clean approach).
Hope it helps
Detlev
PS: Please consider rewarding points for helpful answers on SDN. Thanks in advance!

Similar Messages

  • Java Class (Compiled with JDK6_u12) that works with UCCX 9.0.2, don´t work with UCCX 10.5

    I have a Java Class (Compiled with JDK6_u12) that works with UCCX 9.0.2, after upgrade it don´t work with UCCX 10.5
    I get the error message: "Failed to access the WSDL at: https://www.brightnavigator.se/brightservice/brightservice.asmx?WSDL. It failed with: Got java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty while opening stream from https://www.brightnavigator.se/brightservice/brightservice.asmx?WSDL.; nested exception is: javax.xml.ws.WebServiceException: Failed to access the WSDL at: https://www.brightnavigator.se/brightservice/brightservice.asmx?WSDL. It failed with: Got java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty while opening stream from https://www.brightnavigator.se/brightservice/brightservice.asmx?WSDL. (line: 1, col: 47)
    Does anyone know about this ?

    Did you ever find a resolution to this issue? I have a similar issue after upgrading from 7 to 10.5. I have loaded all provided certificates to the tomcat-trust store, restarted Tomcat Services and still get the same error
    Thanks

  • Problem When Import Java Class -compilation error

    Hi all
    I made a java class that has methods to return Screen width and Height .
    package tarek;
    import java.awt.Dimension;
    import java.awt.Toolkit;
    public class Screen
    Dimension dim ;
    public Screen()
    dim = Toolkit.getDefaultToolkit().getScreenSize();
    public double getWidth()
    double w = dim.getWidth();
    return w;
    public double getHeight()
    double h=dim.getHeight();
    return h;
    I made the jar file " screen.jar" and make it ready to use in form builder
    I opened form builder and make import java class (From program>import java class>choose the class anc click import)
    The class now imported successfully and the PL/SQL package body is:
    PACKAGE Screen /* tarek.Screen */ IS
    -- DO NOT EDIT THIS FILE - it is machine generated!
    -- Constructor for signature ()V
    FUNCTION new RETURN ORA_JAVA.JOBJECT;
    -- Method: getHeight ()D
    FUNCTION getHeight(
    obj ORA_JAVA.JOBJECT) RETURN NUMBER;
    -- Method: getWidth ()D
    FUNCTION getWidth(
    obj ORA_JAVA.JOBJECT) RETURN NUMBER;
    END;
    Now I made a button on the form and i WRITE THIS CODE TO INVOKE THE CLASS on when_button_pressed
    DECLARE
         vScreen_Class ORA_JAVA.JOBJECT;     
    BEGIN
         vScreen_Class := SCREEN.NEW;
    END;
    My problem is I have compilation error
    error 306 AT LINE 5 , COLUMN 25
    wrong number or types of argument in call to "NEW"
    I do not know what is the reason of this compilation error?
    Is it because the method in java return "double datatype" while in oracle return "number datatype"
    Please help
    Edited by: [email protected] on Dec 28, 2009 10:24 AM

    Sarah, I ca not move my thread to JDeveloper because it is not java issue. The problem is with my PL/SQL code and the way I make Import Java class to forms Builder. The Java code is OK.
    Andreas Thank you so much for replying. In fact I made a full compile "Ctrl+Alt+K". but still error
    The following is the package Body
    PACKAGE BODY Screen IS
    -- DO NOT EDIT THIS FILE - it is machine generated!
    args JNI.ARGLIST;
    -- Constructor for signature ()V
    FUNCTION new RETURN ORA_JAVA.JOBJECT IS
    BEGIN
    args := NULL;
    RETURN (JNI.NEW_OBJECT('tarek/Screen', '()V', args));
    END;
    -- Method: getHeight ()D
    FUNCTION getHeight(
    obj ORA_JAVA.JOBJECT) RETURN NUMBER IS
    BEGIN
    args := NULL;
    RETURN JNI.CALL_DOUBLE_METHOD(FALSE, obj, 'tarek/Screen', 'getHeight', '()D', args);
    END;
    -- Method: getWidth ()D
    FUNCTION getWidth(
    obj ORA_JAVA.JOBJECT) RETURN NUMBER IS
    BEGIN
    args := NULL;
    RETURN JNI.CALL_DOUBLE_METHOD(FALSE, obj, 'tarek/Screen', 'getWidth', '()D', args);
    END;
    BEGIN
    NULL;
    END;
    ---------------------------------------------------------------------------------

  • How do I call a simple java class from a bpel process?

    Hi.
    In JDeveloper 10.1.4.3.0 I've created a simple java class that does an ftp get operation followed by an unzip. The class uses some 3rd part libraries (jars).
    I want to use a simple bpel process to schedule a daily execution of this java class, and deploy it all to our SOA-server, - and was looking into using the <bpelx:exec> function.
    The java class and the bpel process is all stored in the same JDeveloper project.
    How do I put this together so that both my java class and the necessary jars are available to the bpel process?
    I've looked into the JavaExecSample.bpel, and it's says something about "...the class com.otn.samples.javaexec.CreditCalculator is locally packaged with this BPEL process".
    How do I do that?
    Can I make it and test it all locally from my workstation (only JDeveloper installed, I guess there's nothing that can execute the bpel code?), or do I have to compile class etc (make war-file?) and deploy to SOA server (BPEL-INF/lib or classes?) before anything can be tested?
    (I guess all this is simple, once you know how, but being a newbie to this I need a shove in the right direction :-)
    Regards,
    -Haakon-

    To create a java class and dependent jars inside the BPEL process project you need to do the following:
    1. Right click on your BPEL process project and select New and then Java Class from the Items.
    2. Make the BPEL process project, JDeveloper would compile the java classes and add them into the BPEL suite case jar, see the output folder and check the BPEL suite case jar file for java classes and dependent jars.
    You can test your Java classes from JDeveloper IDE, no need to deploy the classes on SOA server. When you make the BPEL project it compiles .bpel files and Java classes. You can test your classes once .bpel file and java classes compiled successfully.
    Regards,
    Dharmendra
    http://soa-howto.blogspot.com

  • Error while compiling java class (ora-29535 source requires recompilation)

    Hello. I`m new with oracle and i`m having a problem with java classes. Few days ago i loaded java classes (loadjava) from jar file(biojava3-structure-3.0.2.jar) and compiled ( everything compiled with status valid). Now i`m writing my own class and i can`t import classes from biojava3. I`m getting error:
    Projekt:7: cannot access org.biojava.bio.structure.Atom
    bad class file: null
    class file has wrong version 50.0, should be 49.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    import org.biojava.bio.structure.Atom;
    I have tryed to change jdk version in netbeans from 1.7 to 1.6. I created java class in sql plus That still not resolved my problem.
    Please help me.

    consider posting in Java forum instead of Database forum
    https://forums.oracle.com/forums/category.jspa?categoryID=285

  • Bursting Java Concurrent Program Class Compiling Error

    Hi,
    I am trying to compile the Java Class that Tim has provided in his blog to create the Bursting JCP. I am using R12, so that would be XMLP 5.6.3. As far as I can work out the patch that has been developed for the seeded Bursting JCP is not yet available for R12, so I am trying to create one myself from Tim's examples.
    I do not pretend to be a Java expert, or even pretend to have more than and very very very basic knowledge of it, so I am hoping someone will be able to tell me why I am getting the following error when I try to compile it:
    $ javac XMLPReportBurst.java
    XMLPReportBurst.java:220: cannot find symbol
    symbol : constructor OADocumentProcessor(java.io.InputStream,java.io.InputStream,java.lang.String)
    location: class oracle.apps.xdo.oa.util.OADocumentProcessor
    OADocumentProcessor dp = new OADocumentProcessor(ctlFile,fis,"/home/applmgr/tmp");
    ^
    1 error
    The Java Class that I am using can be seen below, and the error seems to be occurring at line 220:
    package oracle.apps.xdo.oa.cp;
    import java.sql.SQLException;
    import java.sql.Connection;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.io.PrintWriter;
    import java.io.StringWriter;
    import oracle.jdbc.driver.OracleResultSet;
    import oracle.jdbc.driver.OraclePreparedStatement;
    import oracle.jdbc.driver.OracleCallableStatement;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.util.NameValueType;
    import oracle.apps.fnd.util.ParameterList;
    import oracle.apps.fnd.cp.request.CpContext;
    import oracle.apps.fnd.cp.request.ReqCompletion;
    import oracle.apps.fnd.cp.request.LogFile;
    import oracle.apps.fnd.cp.request.JavaConcurrentProgram;
    import oracle.apps.fnd.cp.request.RemoteFile;
    import oracle.apps.xdo.XDOException;
    import oracle.apps.xdo.oa.util.OADocumentProcessor;
    import oracle.apps.xdo.batch.BurstingListener;
    import java.util.Properties;
    import java.util.Vector;
    public class XMLPReportBurst implements JavaConcurrentProgram, BurstingListener
    public static final String RCS_ID=
    "$Header: JCP4XMLPublisher.java 115.34 2006/01/09 16:54:58 bgkim noship $";
    public static final boolean RCS_ID_RECORDED =
    VersionInfo.recordClassVersion(RCS_ID, "oracle.apps.xdo.oa.cp");
    // Global Reference to pCpContext
    private CpContext ccntxt;
    private LogFile lfile;
    private boolean debug = false;
    private Connection mJConn;
    public void runProgram(CpContext pCpContext)
    lfile = pCpContext.getLogFile();
    lfile.writeln("XML Report Publisher 5.0",0);
    ccntxt = pCpContext;
    // get the JDBC connection object
    mJConn = pCpContext.getJDBCConnection();
    // get parameter list object from CpContext
    ParameterList lPara = pCpContext.getParameterList();
    // get ReqCompletion object from CpContext
    ReqCompletion lRC = pCpContext.getReqCompletion();
    String Params = null;
    int lrequestId = 0;
    String ltemplatecode = null;
    String lApplShortName = null;
    String lLocale = null;
    String lDebug = "N";
    String lOutFormat = null;
    String tmplLang = null;
    String tmplTerr = null;
    int reqid = pCpContext.getReqDetails().getRequestId();
    // Parse Parameters
    while (lPara.hasMoreElements())
    NameValueType aNVT = lPara.nextParameter();
    Params += aNVT.getName() + ":" + aNVT.getValue();
    if ( aNVT.getName().equals("ReportRequestID") )
    lrequestId = Integer.parseInt(aNVT.getValue());
    else if ( aNVT.getName().equals("DebugFlag") )
    lDebug = aNVT.getValue();
    debug = (lDebug.equals("Y")) ? true : false;
    if (debug)
    lfile.writeln("Request ID: "+reqid ,1);
    lfile.writeln("All Parameters: " + lPara.getString(),1);
    lfile.writeln("Report Req ID: "+ lrequestId,1);
    lfile.writeln("Debug Flag: " + lDebug,1);
    try
    lfile.writeln("Updating request description",0);
    String lSqls = "update FND_CONCURRENT_REQUESTS " +
    "set DESCRIPTION='Bursting ' || " +
    " ( select USER_CONCURRENT_PROGRAM_NAME " +
    " from FND_CONC_REQ_SUMMARY_V " +
    " where request_id= :1 ) " +
    "where request_id = :2 ";
    OracleCallableStatement lStmt2 =
    (OracleCallableStatement)mJConn.prepareCall(lSqls);
    lStmt2.setInt(1,lrequestId);
    lStmt2.setInt(2,reqid);
    lStmt2.execute();
    lStmt2.close();
    mJConn.commit();
    if (debug) lfile.writeln("Updated description",0);
    /* Obtain Input xml file from RemoteFile object by lrequestId */
    lfile.writeln("Retrieving XML request information",0);
    lSqls = "select OUTFILE_NODE_NAME, OUTFILE_NAME from " +
    "FND_CONCURRENT_REQUESTS " +
    "where request_id= :1";
    OraclePreparedStatement lStmt1 =
    (OraclePreparedStatement)mJConn.prepareStatement(lSqls);
    lStmt1.setInt(1,lrequestId);
    OracleResultSet lRslt = (OracleResultSet)lStmt1.executeQuery();
    lRslt.next();
    String cNode=lRslt.getString(1);
    String outf=lRslt.getString(2);
    lRslt.close();
    lStmt1.close();
    if (debug) lfile.writeln("Node Name:" + cNode,1);
    lfile.writeln("Preparing parameters",0);
    // PDF output file (Outfile of this request)
    String outputfilename = pCpContext.getOutFile().getFileName();
    if (debug) lfile.writeln(lOutFormat+" output =" + outputfilename, 1);
    OutputStream fout = new FileOutputStream(outputfilename);
    RemoteFile rf = new RemoteFile (pCpContext, cNode, outf, "TEXT");
    String inputfilename = rf.getFile().getAbsolutePath();
    if (debug) lfile.writeln("inputfilename =" + inputfilename, 1);
    if ( inputfilename == null || inputfilename.equals("") )
    lRC.setCompletion(ReqCompletion.ERROR,
    "Error has occured. Please check the log file");
    // Input stream from XML data file ( Outfile of XML generating request)
    InputStream fis = new FileInputStream(inputfilename);
    InputStream ctlFile = new FileInputStream("\\home\\applmgr\\InvoiceBatchBurst.xml");
    lfile.writeln("Starting burst ...",1);
    OADocumentProcessor dp = new OADocumentProcessor(ctlFile,fis,"/home/applmgr/tmp");
    lfile.writeln("Bursting initiated ... ",1);
    dp.registerListener(this);
    lfile.writeln("Listener created ...",1);
    Properties prop= new Properties();
    lfile.writeln("Properties set ...",1);
    prop.put("user-variable:EMAILP","[email protected]");
    dp.setConfig(prop);
    lfile.writeln("Config set ...",1);
    dp.process();
    lfile.writeln("Bursting complete",1);
    fis.close();
    fout.close();
    lRC.setCompletion(ReqCompletion.NORMAL, "Request Completed Normal");
    catch (SQLException e)
    lfile.writeln("--SQLException",1);
    //lfile.writeln(e.getMessage(),1);
    lfile.writeln(getErrorStack(e),1);
    lRC.setCompletion(ReqCompletion.ERROR, e.getMessage());
    catch (XDOException e)
    lfile.writeln("--XDOException",1);
    //lfile.writeln(e.getMessage(),1);
    //lfile.writeln(sw.toString(),1);
    lfile.writeln(getErrorStack(e),1);
    lRC.setCompletion(ReqCompletion.ERROR, e.getMessage());
    catch (Exception e)
    lfile.writeln("--Exception",1);
    lfile.writeln(e.getMessage(),1);
    lfile.writeln(getErrorStack(e),1);
    lRC.setCompletion(ReqCompletion.ERROR, e.getMessage());
    finally
    pCpContext.releaseJDBCConnection();
    private String getErrorStack(Exception exc) {
    StringWriter sw = new StringWriter();
    PrintWriter pw = new PrintWriter(sw);
    try
    exc.printStackTrace(pw);
    pw.flush();
    pw.close();
    sw.close();
    return sw.toString();
    catch (Exception e)
    return null;
    public void beforeProcess(){
    if (debug) lfile.writeln("==============Start of Bursting Process=================",0);
    public void afterProcess()
    if (debug) lfile.writeln("==============End of Bursting Process=================",0);
    public void beforeProcessRequest(int requestIndex)
    if (debug)
    lfile.writeln(" ========Start of Process Request",0);
    lfile.writeln(" Request Index +requestIndex",0);
    public void afterProcessRequest(int requestIndex)
    if (debug) lfile.writeln(" ========End of Process Request",0);
    public void beforeProcessDocument(int requestIndex,int documentIndex)
    if (debug){
    lfile.writeln(" ========Start of Process Document",0);
    lfile.writeln(" Request Index "+requestIndex,0);
    lfile.writeln(" Document Index " +documentIndex,0);
    public void afterProcessDocument(int requestIndex,int documentIndex,Vector documentOutputs)
    if (debug){
    lfile.writeln(" ========End of Process Document",0);
    lfile.writeln(" Outputs :"+documentOutputs,0);
    public void beforeDocumentDelivery(int requestIndex,int documentIndex,String deliveryId)
    if (debug){
    lfile.writeln(" ========Start of Delivery",0);
    lfile.writeln(" Request Index "+requestIndex,0);
    lfile.writeln(" Document Index " +documentIndex,0);
    lfile.writeln(" DeliveryId " +deliveryId,0);
    public void afterDocumentDelivery(int requestIndex,int documentIndex,String deliveryId,Object deliveryObject,Vector attachments)
    if (debug){
    lfile.writeln(" ========End of Delivery",0);
    lfile.writeln(" Attachments : "+attachments,0);
    I hope you can help me as this is an on going issue for me that I need to try and get resolved.
    I look forward to hearing any suggestions.
    Regards,
    Cj

    Hi,
    Yes you have one more field in the Data Definition tab that reads Bursting Control File just after the 3 you mentioned .You can upload the control file here.
    However both this functionality and the Bursting Concurrent Program will be available once you have applied the patch for 5.6.3..
    I've been looking too for anyone who has a writeup on the the way this Program can be used.As of now I am just following the Read Me available with this Patch.
    It has some samples...
    Let me know if this helps.
    Regards,
    Lavina

  • How can I compile and run other java classes from within an application?

    Hello there everyone! I really hope that someone can help me. I am writing a program that must be able to compile and run other java classes that are in different files, much like development environments like Kawa or Forte allow you to do.
    There has to be a way of doing this ( I hope!! ), but i can't seem to find it!!
    I have tried using this command to compile:
    Runtime.getRuntime().exec ("c:\\programs\\javac className.java");
    ...and this one to run:
    Runtime.getRuntime().exec ("c:\\programs\\java className");
    ...but neither works!!! I can compile and run classes that are in the same file as my application, but I can't get it to work at all for files in different directories or files.
    PLEASE, PLEASE, PLEASE help me - i've run out of ideas, and i need this to be working in 3 days!!!
    Thank you very much for any help anyone can give me, I really appreciate it!! Thanks again!!
    Adrian ( ...in distress!! )

    public class JavaCompiler{
       public static void main(String[] args)throws Exception{ //sorry bout the laziness
          if(args == null || args.length != 1){
             System.out.println("Usage: java JavaCompiler MyClass.java");
             System.exit(0);
          String className = args[0];
          Runtime rt = Runtime.getRuntime();
          Process p = rt.exec("javac " + className); //consider setting cpath for this
          p.waitFor();
          //now try to run after it is done.
          p = rt.exec("java " + className.substring(0, (className.length() - ".java".length()));
          p.waitFor();
          //do some other stuff
    }This should get you going. You may consider looking into the System.getProperty() method in order to determine the type of OS it is running on in order to findo out what command to run. I know that the sun tool listed above is nice, but by my understanding the sun tools provided are not guaranteed to stay the same. I'm no expert on this matter, but that is one of the reasons there is no API documentation for those tools. Also, I don't believe those tools come packaged with the JRE. (Of course if you are making an IDE it will be expected that the user has an sdk installed. Good luck with figuring this thing out.

  • Compiling java classes from JDeveloper

    Hi guys... perhaps this thred need to be created in JDeveloper fourm, it so please let me know.
    I generated the classes from a web service which complie without errors and exedcute correctly. When trying to compile the main stub in Oracle database, I get an error "CONNOT RESOLVE SYMBOL" reviewing the java class, I see that extends the wrapper generated by Jdev. So I try to complie the extendable class, after trying to generate and compile it in the database, I get the error: "class$ is reserved for internal use" The code has the next line:
    static java.lang.Class class$(java.lang.String param1)
    Is this error launched from the oracle database? My guess is that maybe Im missing some library or something and thats why I can create the such Java Name procedures. But I will like if anyone could guide me through this exception.
    Thanks
    JP

    Do you have .jar (or the .class) files created after the compile from JDeveloper?
    If you do, you can load all of them using the command line utility loadjava:
    $ loadjava
    loadjava: Usage: loadjava [-definer] [-encoding encoding] [-force] [-genmissing] [-genmissingjar jar] [-grant grants] [-help] [-nousage] [-noverify] [-oci8] [-order] [-resolve] [-resolver resolver] [-schema schema] [-synonym] [-thin] [-tableschema schema] [-user user/password@database] [-verbose] classes..jars..resources..properties...
    $

  • Compiler ignores changes in a java class

    Hi,
    I made changes to the java class code, compiles correctly and not execute this new java code. The new code is ignored for the jdeveloper. I tried with several version like jdk1.4.2_06, jdk1.4.2_12,jdk1.4.2_13,jdk1.4.2_17. I need to work with 1.4.2.
    Thanks in advance.

    Hi,
    too many missing information make it hard to give any useful answer to this
    - which version of JDeveloper
    - what is the java code you compile
    - in which context do you execute the code ?
    Frank

  • Unable to compile the java class in the SQL PLUS

    Hi Team,
    I am unable to compile the java class in the SQL PLUS in dev1 and dev2. It is giving the following error.
    But the same class get Compiled in the Toad(Tool) without any error and working fine. Could someone help me
    What to do for this for your reference ,Attaching the java class file.
    “ORA-29536: badly formed source: Encountered "<EOF>" at line 1, column 28.
    Was expecting one of:
    ----------------------Here is the Java class Code.....................
    create or replace and compile java source named "XXVM_ZipFileUtil_Ela"
    as
    import java.math.BigDecimal;
    import java.util.zip.Deflater;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipOutputStream;
    import oracle.sql.*;
    import oracle.jdbc.*;
    import java.sql.*;
    import java.io.*;
    public class XXVM_ZipFileUtil_Ela
    public static oracle.sql.BLOB getZipFile(
    oracle.sql.CHAR zipFilePathCHAR, oracle.sql.CHAR zipFileNameCHAR,
    int fileBufferSize, int zipFileBufferSize,
    boolean deleteZipFile, java.sql.Array fileNames, java.sql.Array fileContents, java.sql.Array fileContentsLength)
    throws IllegalArgumentException, FileNotFoundException, IOException, java.sql.SQLException
    String zipFilePath = (zipFilePathCHAR == null) ? null : zipFilePathCHAR.stringValue();
    String zipFileName = (zipFileNameCHAR == null) ? null : zipFileNameCHAR.stringValue();
    String zipPathAndFileName = new String(
    new String(zipFilePath == null || zipFilePath == "" ? "/tmp/" : zipFilePath) +
    new String(zipFileName == null || zipFileName == "" ? System.currentTimeMillis() + ".zip" : zipFileName));
    byte[] buffer = new byte[fileBufferSize == 0 ? 100000000 : fileBufferSize];
    try
    Connection conn = DriverManager.getConnection("jdbc:default:connection:");
    oracle.sql.CLOB[] fileContentsCLOB = (oracle.sql.CLOB[])fileContents.getArray();
    String[] fileNamesString = (String[])fileNames.getArray();
    BigDecimal[] fileContentsLengthNumber = (BigDecimal[])fileContentsLength.getArray();
    ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(zipPathAndFileName));
    zipOut.setLevel(Deflater.DEFAULT_COMPRESSION);
    for (int i = 0; i < fileNamesString.length; i++) {
    System.out.println(i);
    zipOut.putNextEntry(new ZipEntry(fileNamesString));
    InputStream asciiStream = fileContentsCLOB[i].getAsciiStream(1L);
    int asciiReadCount = asciiStream.read(buffer,0,fileContentsLengthNumber[i].intValue());
    zipOut.write(buffer, 0, fileContentsLengthNumber[i].intValue());
    zipOut.closeEntry();
    zipOut.close();
    byte zipFileContents[] = new byte[zipFileBufferSize == 0 ? 100000000 : zipFileBufferSize];
    FileInputStream zipIn = new FileInputStream(zipPathAndFileName);
    int byteCount = zipIn.read(zipFileContents);
    zipIn.close();
    byte returnFileContents[] = new byte[byteCount];
    System.arraycopy(zipFileContents,0,returnFileContents,0,byteCount);
    String returnFileContentsString = new String(returnFileContents);
    if (deleteZipFile)
    boolean deletedFile = (new File(zipPathAndFileName)).delete();
    oracle.sql.BLOB returnFileContentsBLOB = null;
    returnFileContentsBLOB = BLOB.createTemporary(conn, true, BLOB.DURATION_SESSION);
    returnFileContentsBLOB.open(BLOB.MODE_READWRITE);
    //OutputStream tempBlobWriter = returnFileContentsBLOB.getBinaryOutputStream();
    OutputStream tempBlobWriter = returnFileContentsBLOB.setBinaryStream(1);
    tempBlobWriter.write(returnFileContents);
    tempBlobWriter.flush();
    tempBlobWriter.close();
    returnFileContentsBLOB.close();
    return returnFileContentsBLOB;
    catch (IllegalArgumentException ex) {
    ex.printStackTrace();
    throw ex;
    catch (FileNotFoundException ex) {
    ex.printStackTrace();
    throw ex;
    catch (IOException ex)
    ex.printStackTrace();
    throw ex;
    catch (java.sql.SQLException ex)
    ex.printStackTrace();
    throw ex;

    860411 wrote:
    Hi Team,
    I am unable to compile the java class in the SQL PLUS in dev1 and dev2. It is giving the following error.
    But the same class get Compiled in the Toad(Tool) without any error and working fine. Could someone help me
    What to do for this for your reference ,Attaching the java class file.
    “ORA-29536: badly formed source: Encountered "<EOF>" at line 1, column 28.
    Was expecting one of:
    I believe the error message is clear and self-explanatory.
    ----------------------Here is the Java class Code.....................
    create or replace and compile java source named "XXVM_ZipFileUtil_Ela"
    as
    import java.math.BigDecimal;
    import java.util.zip.Deflater;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipOutputStream;
    import oracle.sql.*;
    import oracle.jdbc.*;
    import java.sql.*;
    import java.io.*;
    public class XXVM_ZipFileUtil_Ela
    public static oracle.sql.BLOB getZipFile(
    oracle.sql.CHAR zipFilePathCHAR, oracle.sql.CHAR zipFileNameCHAR,
    int fileBufferSize, int zipFileBufferSize,
    boolean deleteZipFile, java.sql.Array fileNames, java.sql.Array fileContents, java.sql.Array fileContentsLength)
    throws IllegalArgumentException, FileNotFoundException, IOException, java.sql.SQLException
    String zipFilePath = (zipFilePathCHAR == null) ? null : zipFilePathCHAR.stringValue();
    String zipFileName = (zipFileNameCHAR == null) ? null : zipFileNameCHAR.stringValue();
    String zipPathAndFileName = new String(
    new String(zipFilePath == null || zipFilePath == "" ? "/tmp/" : zipFilePath) +
    new String(zipFileName == null || zipFileName == "" ? System.currentTimeMillis() + ".zip" : zipFileName));
    byte[] buffer = new byte[fileBufferSize == 0 ? 100000000 : fileBufferSize];
    try
    Connection conn = DriverManager.getConnection("jdbc:default:connection:");
    oracle.sql.CLOB[] fileContentsCLOB = (oracle.sql.CLOB[])fileContents.getArray();
    String[] fileNamesString = (String[])fileNames.getArray();
    BigDecimal[] fileContentsLengthNumber = (BigDecimal[])fileContentsLength.getArray();
    ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(zipPathAndFileName));
    zipOut.setLevel(Deflater.DEFAULT_COMPRESSION);
    for (int i = 0; i < fileNamesString.length; i++) {
    System.out.println(i);
    zipOut.putNextEntry(new ZipEntry(fileNamesString));
    InputStream asciiStream = fileContentsCLOB[i].getAsciiStream(1L);
    int asciiReadCount = asciiStream.read(buffer,0,fileContentsLengthNumber[i].intValue());
    zipOut.write(buffer, 0, fileContentsLengthNumber[i].intValue());
    zipOut.closeEntry();
    zipOut.close();
    byte zipFileContents[] = new byte[zipFileBufferSize == 0 ? 100000000 : zipFileBufferSize];
    FileInputStream zipIn = new FileInputStream(zipPathAndFileName);
    int byteCount = zipIn.read(zipFileContents);
    zipIn.close();
    byte returnFileContents[] = new byte[byteCount];
    System.arraycopy(zipFileContents,0,returnFileContents,0,byteCount);
    String returnFileContentsString = new String(returnFileContents);
    if (deleteZipFile)
    boolean deletedFile = (new File(zipPathAndFileName)).delete();
    oracle.sql.BLOB returnFileContentsBLOB = null;
    returnFileContentsBLOB = BLOB.createTemporary(conn, true, BLOB.DURATION_SESSION);
    returnFileContentsBLOB.open(BLOB.MODE_READWRITE);
    //OutputStream tempBlobWriter = returnFileContentsBLOB.getBinaryOutputStream();
    OutputStream tempBlobWriter = returnFileContentsBLOB.setBinaryStream(1);
    tempBlobWriter.write(returnFileContents);
    tempBlobWriter.flush();
    tempBlobWriter.close();
    returnFileContentsBLOB.close();
    return returnFileContentsBLOB;
    catch (IllegalArgumentException ex) {
    ex.printStackTrace();
    throw ex;
    catch (FileNotFoundException ex) {
    ex.printStackTrace();
    throw ex;
    catch (IOException ex)
    ex.printStackTrace();
    throw ex;
    catch (java.sql.SQLException ex)
    ex.printStackTrace();
    throw ex;
    The last two lines above should be
    /Srini

  • Suffering an complie error when trying to compile java class in EBS11i

    Hi,
    When I trying to compile java classes with which imported the HttpServletResponse class, will get the follow error message:
    package javax.servlet does not exist
    cannot resolve symbol
    symbol : class HttpServletResponse
    It seems the javax.servlet package is not included in the classpath. But I checked the $CLASSPATH, it seems no problem.
    echo $CLASSPATH
    /u02/applvis/viscomn/util/java/1.4/j2sdk1.4.2_04/lib/tools.jar:/u02/applvis/viscomn/util/java/1.4/j2sdk1.4.2_04/lib/dt.jar:/u02/applvis/viscomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/charsets.jar:/u02/applvis/viscomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/rt.jar:/u02/applvis/viscomn/java/appsborg2.zip:/u02/applvis/visora/8.0.6/forms60/java:/u02/applvis/viscomn/java
    Does anyone know the reason?
    environment: ebs 11i
    Thanks&Regards,
    Xiaofeng

    resolved this issue.
    1. Edit $APPL_TOP/admin/adovars.env file -
    Add the following jar files to the AF_CLASSPATH line -
    Full path of /...../iAS/Apache/Jsdk/lib/jsdk.jar
    Full path of /...../iAS/Apache/Jserv/libexec/ApacheJServ.jar
    2. Bounce the concurrent manager in order to have the changes take effect.

  • Workshop error during compilation of Java class

    Hi,
    I am starting to use Workshop for development. I am getting the following error when I start the debugger.
    I am trying to compile a Java class and don't know how to proceed. Any help is appreciated.
    build:
    Deleting directory C:\DOCUME~1\name\LOCALS~1\Temp\wlw-temp-23835\wlw_compile55184
    Created dir: C:\DOCUME~1\name\LOCALS~1\Temp\wlw-temp-23835\wlw_compile55184
    C:\bea\user_projects\applications\CVXMLBeansApplication\CVXMLBeansClient\
    ERROR: XMLBeansClient.java:12: The package of this type does not match its location on the source path: .
    ERROR: 1 error(s), 0 warning(s).
    BUILD FAILED
    ERROR: Errors found.

    I found the answer nested in the documentation. I had to create folders that mirror the package structure and then place the source file in its appropriate folder.

  • Simple Java class using SQLJ not compiling.

    Hello all, I have a simple Java class that is using SQLJ. It will not compile though. I am not sure what I should set for classpath. Any ideas? This is what I have so far.
    set PATH=C:\jdk1.2.2\bin;c:\oracle\ora81\jdbc\bin;
    set CLASSPATH="C:\oracle\ora81\jdbc\lib\classes12.zip;C:\oracle\ora81\sqlj\lib\runtime12.zip;C:\oracle\ora81\sqlj\lib\translator.zip;C:\jdk1.2.2\lib\*.*"
    then
    javac SQLJTester.java
    Here is my .java file ---
    import java.io.*;
    import java.sql.*;
    import sqlj.runtime.*;
    import sqlj.runtime.ref.*;
    public class SQLJTester {
    public static void update() throws Exception {
    java.sql.Timestamp timeNow;
    #sql {
    BEGIN
    :timeNow := sysdate;
    END
    public static void main (String[] args) {
    try {
    SQLJTester.update();
    System.out.println ("Updated successfully");
    catch (Exception e) {
    System.out.println ("Caught an exception.");
    Thanks ahead for your time,
    Justin

    When sqlj files are compiled and translted to java file with them the file with extension .ser is also generated. browsers do not recognise this .ser files they only understand .class files which the download using <codebase> instead of class path. so thats why you r not able to use sqlj in servlet. try to customize the profile. Now can some one inform how to use sqlj from eclipse. does it support?. i need to downoad sqlj.exe for that. if anyone has idea from where i can download sqlj.exe pls inform me at [email protected]

  • Re-compile Oracle 11i Internet Expenses Java Classes

    Due to business requirement, we are required to re-compile Oracle 11i Internet Expenses java classes. Fortunately all files are fine, except of one for "Expense Details" screen.
    Under directory */comn/java/oracle/apps/ap/oie/server/, there is a JAVA class file DetailAMImpl.java. When I re-compile it, I got errors as below:
    $> javac DetailAMImpl.java
    DetailAMImpl.java:506: cannot resolve symbol
    symbol : method copyFrom (oracle.apps.ap.oie.server.ExpenseReportLinesVORowImpl,oracle.jbo.domain.Number,oracle.jbo.domain.Number)
    location: interface oracle.jbo.Row
    row.copyFrom(expensereportlinesvorowimpl, new Number(-10), expensereportlinesvorowimpl.getDistributionLineNumber());
    ^
    DetailAMImpl.java:508: cannot resolve symbol
    symbol : method setReportLineId (oracle.jbo.domain.Number)
    location: interface oracle.jbo.Row
    row.setReportLineId(expensereportlinesvorowimpl.getReportLineId().multiply(-1));
    ^
    DetailAMImpl.java:512: cannot resolve symbol
    symbol : method getReportLineId ()
    location: interface oracle.jbo.Row
    expenseallocationsvoimpl.duplicateDistributionsByLine(expensereportlinesvorowimpl.getReportLineId(), row.getReportLineId());
    ^
    DetailAMImpl.java:525: cannot resolve symbol
    symbol : method bIsEmpty ()
    location: interface oracle.jbo.Row
    if(row.bIsEmpty())
    ^
    4 errors
    $>
    It seems I am missing one Java class file that contains View object "ROW". Could you please advise me what is the missing file, and where can I get it?
    Many Thanks.

    Hi,
    I suggest to ask this question on one of the Oracle Applications forums, or better, address this issue with customer support at metalink.oracle.com
    Frank

  • Compiling java classes into dll

    Hi,
    Just trying to find out is there anyway I can compile the java classes into dll?
    If I am to use JNI and C++, will the dll compiled be able to work well in a platform that does not have JVM?
    Thank you.

    Hi,
    Just trying to find out is there anyway I can
    an compile the java classes into dll?
    No, but you can start the jvm and run your main class from a dll using jni. And, if you do that, you'll of course need a JVM on the client that'll be running your code.

Maybe you are looking for