Java re-compilation error!!!!

Hi All,
I had got a set of .class files from a software provider.
When i tried to run a command it used to give an error.
I tried to contact that vendor but in vain.....
So i decided to decompile the class files to get the reason for error.
I took 1 class file which i was getting as error. I extracted all the .java files, in that class file. Now when i try to recompile them i'm getting an error
symbol not declared!!!!!!
And i checked in the source file. The variables are not declared in the file. How did it compile before??? Why it is not compiling now. Please help me out. I'm very new to java.
Thanking you,
Venki

[email protected] wrote:
Note: DataBrokerClass.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details. Pardon me for asking a silly question, but did you compile with the "-deprecation" option?
If yes, what was the command output?
The error message you wrote that you are getting: "cannot resolve symbol", usually indicates that the relevant Oracle JDBC driver was not included in the classpath of the compiler command.
Which JDBC driver are you using?
How are you compiling this class?
From the command line, using "javac"?
From some IDE?
I assume that "advointCfgHhcRecArrOut" is an instance of "oracle.sql.ARRAY"?
Please verify.
Good Luck,
Avi.

Similar Messages

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

  • Java Adapter Compile Error - Missing Libraries

    I am trying to convert my project from being deployed on Flex Data Services 2 To LiveCycle Data Services. I dont know very much about java and have hit a snag when trying to recompile my custom java adaptor.
    It compiles fine under a FDS2 project, but when compiled under a LCDS deployment on JRun, Eclipse gives me the following error when trying to compile:
    Project PTSChat_Java is missing required library: lib/commons-codec.jar
    Project PTSChat_Java is missing required library: lib/commons-httpclient.jar
    The project cannot be built until build path errors are resolved
    It appears that the libraries have been renamed to commons-codec-1.3.jar & commons-httpclient-3.0.1.jar in LCDS, but I am not sure where to update these references? They are not direct library imports in my java code.
    As a shot in the dark, I tried just copying the old FDS2 libraries back over to the WEB-INF\lib\ DIR since there are named differently. It resolved the missing library error, but then I got a compile error with service cannot be resolved in references to my MessageService msgService = (MessageService) service; java code. I quickly realized this is not the correct path to head down.
    Does anyone have any clues what I may be doing wrong? Any help is much appreciated.
    Thanks!

    I resovled the problems I was having.
    I was able to figure out how to change the library linking in eclipse and switched the commons-codec-1.3.jar & commons-httpclient-3.0.1.jar in the place of commons-codec.jar & commons-httpclient.jar libraries previously used with the project (properties:libraries).
    I was not able to correct the service cannot be resolved. Everything I did kept crashing and dropping my connection tot he channel. I ended up just switching the code in my java adapter from:
    MessageService msgService = (MessageService) service
    to
    MessageBroker broker = MessageBroker.getMessageBroker(null);
    MessageService msgService = (MessageService) broker.getService("message-service");
    This appears to be working as desired for my use of the java adapter for the session management & logging. I am not really certain why the "service" became undefined between FDS2 & LCDS, something must have been depreciated or changed around.

  • User defined java function-compilation error! Activation cancelled

    Hi all!
    I have written an User defined Function in java for converting XML to PDF which is available at this blog:
    /people/divya.vidyanandanprabhu/blog/2005/06/28/converting-xml-to-pdf-using-xi
    I added both dom4j-1.6.1.jar and itext-1.4.1.jar files in (XIserver machine)D:/usr/sap/....server0/bin.
    When i try to activate in IR, i got the following error.
    Activation of the change list canceled Check result for Message Mapping test | http://httpadp.com/send:  Starting compilation  Source code has syntax error:  D:/usr/sap/QN7/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map7bf962e0f21411daae8a00111120e6db/source/com/sap/xi/tf/_test_.java:3: package com.xml2pdf does not exist import com.sap.aii.mappingtool.tf3.;import com.sap.aii.mappingtool.tf3.rt.;import java.util.;import java.io.; import java.lang.reflect.*;import com.xml2pdf.XmlToPdf; ^ D:/usr/sap/QN7/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map7bf962e0f21411daae8a00111120e6db/source/com/sap/xi/tf/_test_.java:51: cannot resolve symbol symbol : class XmlToPdf location: class com.sap.xi.tf._test_ XmlToPdf x = new XmlToPdf("D:
    qf
    source
    Input.xml", "D:
    qf
    target
    Output.pdf"); ^ D:/usr/sap/QN7/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map7bf962e0f21411daae8a00111120e6db/source/com/sap/xi/tf/_test_.java:51: cannot resolve symbol symbol : class XmlToPdf location: class com.sap.xi.tf._test_ XmlToPdf x = new XmlToPdf("D:
    qf
    source
    Input.xml", "D:
    qf
    target
    Output.pdf");

    Hi
    My java program is:
    import com.xml2pdf.XmlToPdf;
    public String testing(String a,String b,String c,Container container){
    XmlToPdf  x = new XmlToPdf("D:
    qf
    source
    Input.xml", "D:
    qf
    target
    Output.pdf");
      x.Convet();
      return "";
    Can you please figureout any errors in my prg.
    I have imported the 2(itext-1.4.1 and dom4j-1.6.1) jars into Imported Archives in my scenario in IR.
    I placed these jars in D:/usr/sap/..../server0/bin
    also. I followed the blog thoroughly and carefully.
    Thanks a lot for your suggestion.

  • Java package compile errors

    I use a batch file to compile a java package. And I got the following errors:
    TabPages: Java: 29: Cannot solve symbol
    Symbol: class JSPFactory
    Location: package JSP
    JSPFactory = javax.Servlet.jsp.JSPFactory.getDefaulfFactory();
    Note: Some input files use or override a deprecated APT.
    Note: Recompile with -deprecation for details.
    I am using New Atlanta servletExec 3.1 and IIS server. Can anyone help me figure our the above errors? Thanks!

    if I add the "set classpath=".,C:/javax" to the begining of the batch file, will this override the classpath that I set in the Environment window? I am worried about this since we have a bunch of environment variables already been set there.
    I tried to add the ";c:\javax" at the end of the classpath on my Environment window, and rebooted the server, but still got the same error message. Did I have some syntax error? What does the dot before ";C:/javax" mean? I deleted it when I added them to the classpath.
    It will cause too much trouble to add the "javac XXX.java -classpath=".;C"/javax" to each file that needs this package because we don't have a single command for compiling a single java file. We have a huge amount of java files and we just use a single "javac -d" to compile every file under several folders. Our batch file is as follows:
    del /F/Q ..\classes
    javac -d ..\classes *.java htmltool\html\*.java ises\*.java DropDown\*.java frmselection\*.java grid\*.java treeView\*.java reportTreeMenu\*.java hs\types\*.java
    del /F ..\lib\grid.jar
    del /F ..\lib\TreeView.jar
    cd ..\classes
    jar cf ..\lib\grid.jar grid
    rmdir /S/Q grid
    jar cf ..\lib\TreeView.jar treeView
    rmdir /S/Q treeView
    cd ..\javasrc
    Another thing is that: we have exact the same classpath and batch file on another server which works fine, and its classpath doesn't include explicitly stuff like";c:\javax", but we never have prolbem compiling the java source. So do I miss something else?

  • Java 3d compilation errors

    When I try to compile most of the demo examples of the Java3d API I get an error:
    in thread "main" ...... : no such method

    Are you sure you get that problem when you try to compile, not when you try to run it?

  • Java Servlet compile error

    I have written a little servlet program. When it is compiled, I get errors saying "javax.servlet does not exist".
    I have J2EE SDK 1.4 installed. Does the error mean the classpath is missing? Appreciate advise.

    Hi !
    I had same error yesterday. But later I was able to compile the servlet by setting CLASSPATH.
    Set CLASSPATH as follows if you have installed J2EE AppServer in c:\
    1. Locate j2ee.jar in the directory you installed J2EE AppServer which can be in:
    C:\Sun\AppServer\lib\j2ee.jar
    2. Go to My Computer properties
    3. Click on the Environmental variable button of Advanced tab
    4. If you already have CLASSPATH variable then click on Edit button else click on New to set the CLASSPATH as follows:
    CLASSPATH=C:\Sun\AppServer\lib\j2ee.jar
    I think this should work for you.
    Goodluck,
    Anurag

  • Redirecting java compilation errors to a file

    Hi,
    How do I redirect java compilation errors to a file while using a dos environment ? Help needed asap.
    Gayathri

    javac FileName.java 2> errorFileName

  • Java Compile Error  Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 14  for iOS

    When compiling one of my projects, I am getting this error suddenly:
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 14
              at adobe.abc.GlobalOptimizer$InputAbc.readCode(GlobalOptimizer.java:1510)
              at adobe.abc.GlobalOptimizer$InputAbc.readBody(GlobalOptimizer.java:682)
              at adobe.abc.GlobalOptimizer$InputAbc.readBodies(GlobalOptimizer.java:403)
              at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:326)
              at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcodeImpl(AOTCompiler.java:472)
              at com.adobe.air.ipa.BitcodeGenerator.main(BitcodeGenerator.java:82)
    Compilation failed while executing : ADT
    but only when targeting iOS. fo Android only, it works fine. Anyone have any ideas? I also logged it as a bug.

    I get the I/O exception while reading: D:\Java\HelloApplet (The system cannot find the file specified). I have previously compiled HelloApplet.java into HelloApplet.class using javac.exe
    the two include statements in the sample HelloApplet I'm using are
    import java.applet.*;
    import java.awt.*;
    I also have a ComponentEventTest.java file which I've made into a class with these two
    include statements:
    import java.awt.*;
    import java.awt.event.*;
    I can however compile .java files which have no include statements.
    I take it that my classpath is not set correctly. Like I said earlier, I'm using winxp
    and trying to set the classpath variable under system. I have tried under user too. The path names I've tried setting are C:\Program Files\Java\jdk1.5.0_02\, C:\Program Files\Java\jdk1.5.0_02\lib, C:\Program Files\Java\jdk1.5.0_02\include, and C:\Program Files\Java\jdk1.5.0_02\;C:\Program Files\Java\jdk1.5.0_02\lib;C:\Program Files\Java\jdk1.5.0_02\include.
    How can I correct this? If it's possible, I would like to set a variable in windows
    versus having to type extra commands at the command prompt everytime I try
    to run a java class with java.exe. Any help would be much appreciated

  • Deployment Error -- JSP Compilation Error: java.lang.OutOfMemoryError -- nu

    When I deploy WAR files with the precompile jsp option, I receive the following error:
    Deployment Error -- JSP Compilation Error: java.lang.OutOfMemoryError -- null
    Is there a way for me to precompile my jsp's without using this process? Once this blows up, the admin server gets hosed. This is very frustrating. Any suggestions would be appreciated.
    Regards,
    Joshua

    You need little more memory :-), use java param -mx512M.
    You can adjust it in OC Server properties
    AS > OC4J_home(demo) > Server Properties
    section Multiple VM Configuration, Command Line Options
    Java Options: -mx512M
    Zajo

  • Java compile error for removed API

    Hi,
    What are the Java compile errors for API that has been removed?
    As I understand it, API elements are deprecated and not removed from the API immediately, but will be removed in future releases or after so many years.
    When Java code is compliled in a higher Java version, and the API has finally been removed - what are the errors that will be ouput in the log?
    Thank you for your time.

    WalterLaan wrote:
    And if you recompile one with a method removed that the other use and then run the other you would get a NoSuchMethodError (or more generally just an error sub class of LinkageError).
    Not that you should be catching those unless you accept classes from the user (as plugins).Presumably you mean he should not be catching them?
    @OP: In general, you should not catch unchecked exceptions. These are RuntimeException, Error, and their descendants. There are exceptions, such as at "layer boundaries," or when you don't want errors in one module/application/plugin/etc. to affect or prevent processing in others.

  • Compiling Errors by Dummy java programmer

    All,
    I'm trying to learn Java as a dummer. I teaching myslef by using this book: Introduction to Java programming: comprehensive version/Y. Daniel Liang.--6 th ed.
    I copied the following source code and tried to compile it and have the error below. Am confused! where am I going wrong?
    // This application program prints Welcome to Java!
    public class Welcome {
         public static void main(String[] args) {
              System.out.printIn("Welcome to Java!") ;
    C:\j2sdk1.4.2_19>cd javafiles
    C:\j2sdk1.4.2_19\javafiles>javac Welcome
    C:\j2sdk1.4.2_19\javafiles>javac Welcome.java
    Welcome.java:7: cannot resolve symbol
    symbol : method printIn (java.lang.String)
    location: class java.io.PrintStream
    System.out.printIn("Welcome to Java!") ;
    ^
    1 error
    C:\j2sdk1.4.2_19\javafiles>

    You wrote "printIn" instead of "println".
    Um, that should be a lowercase L, not an upper case i.

  • Simple Java created with compilation errors.

    Hi,
    While I am using Oracle for many years (currently 9.2.0.6.0) I am completely new to Java in the database.
    I found a very simple example to get started (please see SQL*Plus dump below) ... but I get a compilation error. Can anyone tell what I am doing wrong?
    SQL> CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED Fibonacci AS
    2 public class Fibonacci
    3 {
    4 public static int fib (int n)
    5 {
    6 if (n == 1 || n == 2)
    7 return 1;
    8 else
    9 return fib(n - 1) + fib(n - 2);
    10 }
    11 }
    12 /
    Warning: Java created with compilation errors.
    SQL> show errors java source Fibonacci
    No errors.
    SQL>
    (It must be a simple thing, the example I found seems correct, but what about grants, settings etc.)
    Thanks in advance,
    Stefan

    Stefan,
    I cannot see anything in your code that would cause a compilation error. However, according to the example in the "Oracle 9i SQL Reference", it looks like you need to enclose the name in double quotes, as in:
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "Fibonacci" AS ...Alternatively (and this is the way I do it), you could compile the class outside of the database, and load the compiled class file. Just create a file called "Fibonacci.java" (that contains your java code), compile it, and then use the "loadjava" tool to load the "Fibonacci.class" file into the database. Please refer to the Oracle 9i Java Developer's Guide for more details.
    Good Luck,
    Avi.

  • I am able to compile a java file in eclipse inspite of compilation errors shown in eclipse and a .class file is generated

    Hi,
    I had a java file with compilation errors as shown in eclipse IDE.
    But the class file is still generated in the classes folder on building and pressing clean the project.
    I confirmed that the class file has an updated time stamp and also that a System.out.println() statement that i added was indeed printed out when this class was encountered during the running of a web application in which this class was called somewhere.
    (The java class has no subclasses and it is a single class with public modifier).
    How does it happen so?
    Regards,
    Karthik.

    As far as I know, the java code is compiled in Eclipse as soon as you save it. i.e. press CTRL+SHIFT+s
    as far as the build is concerned, in case you have a build file where you specify how to make a jar file, the location the jsr file is to be placed, only then you have to build the project. However again, as far as just simple compile is concerned as soon as you save the files are compiled. And show you the errors if any in the tasks window.

  • Compiling error on Java I/O

    My first time to write a very simple Java progam. Any one could help me on this comipling error? Thanks in advance!
    Compiling ERROR:
    ================
    C:\java\class>javac hw01.java
    hw01.java:43: cannot resolve symbol
    symbol : variable in
    location: class hw01
    while((line = in.readLine()) != null ) {
    ^
    1 error
    SOURCE CODE:
    ============
    *     Program name: hw01.java
    *     Author:
    *     Description: Simple I/O and computation
    *     Date: 12/08/2002
    *     compile: javac hw01.java
    *     usage: java hw01 <infile> <utfile>
    *     <infile> - input file
    *     operator operand1 operand2
    *          ex. + 1 1
    * <outfile> - output file
    * operand1 operator operand2 = result
    *          ex. 1 + 1 = 2
    import java.io.*;
    import java.util.*;
    public class hw01 {
         // Open input file and output file
         public static void main(String[] args) throws IOException {
              if (args.length == 2) {
                   // Open File for Reading
                   File inFile = new File(args[0]);
                   FileReader in = new FileReader(inFile);
                   // Open File for Writing
                   File outFile = new File(args[1]);
                   FileWriter out = new FileWriter(outFile);
              } else {
                   System.out.println("java command <arg1> <arg2>");
              // Get operation, operand1 and operand2 for each line
              String line = null;
              while((line = in.readLine()) != null ) {
                   //String op; String op1; String op2; String result;
                   // Get operation and operands
                   //stringTokenizer t = new StringTokenizer(line);
                   //op = t.nextToken().charAt(0);
                   //op1 = Integer.valueOf(t.nextToken()).intValue();
                   //op2 = Integer.valueOf(t.nextToken()).intValue();
                   // Compute math operation
                   //if( op == '+' ) {
                   //     result = op1 + op2;
                   // } else if( op == '-' ) {
                   //     result = op1 - op2;
                   //} else if( op == '*' ) {
                   //     result = op1 * op2;
                   //} else if( op == '/' ) {
                   //     result = op1 / op2;
                   // Print out the result
                   //system.out.println(op1 + op + op2 + "=" + result);
              // Close infile
              // in.close();
              // System.out.println("");
              // Close outFile
              // out.close();

    The compiling error is fixed. The revised working source code hw01.java is provided below. Can someone help the remining question below?
    PROBLEM/Question:
    =================
    The output only goes to the console. How code should be changed to allow output to a specified file from command line.
    SOURCE FILE (without Compiling error):
    =====================================
    *     Program name: hw01.java
    *     Author:
    *     Description: Simple I/O and computation
    *     Date: 12/08/2002
    *     compile: javac hw01.java
    *     usage: java hw01 <infile> <utfile>
    * example: java hw01 hw1data.txt hw1out.txt
    *     <infile> - input file
    *     operator operand1 operand2
    *          ex. + 1 1
    * <outfile> - output file
    * operand1 operator operand2 = result
    *          ex. 1 + 1 = 2
    import java.io.*;
    import java.util.*;
    public class hw01 {
         // Open input file and output file
         public static void main(String[] args) throws IOException {
              FileReader in = null;
              FileWriter out = null;
              BufferedReader br = null;
              System.out.println("input File Name = " + args[0]);
              System.out.println("output File Name = " + args[1]);
              if (args.length == 2) {
                   // Open File for Reading
                   File inFile = new File(args[0]);
                   in = new FileReader(inFile);
                   br = new BufferedReader(in);
                   // Open File for Writing
                   File outFile = new File(args[1]);
                   out = new FileWriter(outFile);
              } else {
                   System.out.println("java command <arg1> <arg2>");
              // Get operation and operands for each line
              String line = null;
         char op;
              int op1, op2;
              int result = 0;
              while((line = br.readLine()) != null ) {
                   // Get operation and operands
                   StringTokenizer t = new StringTokenizer(line);
                   op = t.nextToken().charAt(0);
                   op1 = Integer.valueOf(t.nextToken()).intValue();
                   op2 = Integer.valueOf(t.nextToken()).intValue();
                   // Compute math operation and print result
                   if( op == '+' ) {
                        result = op1 + op2;
                        System.out.println(op1 + " + " + op2 + " = " + result);
                   } else if( op == '-' ) {
                        result = op1 - op2;
                        System.out.println(op1 + " - " + op2 + " = " + result);
                   } else if( op == '*' ) {
                        result = op1 * op2;
                        System.out.println(op1 + " * " + op2 + " = " + result);
                   } else if( op == '/' ) {
                        result = op1 / op2;
                        System.out.println(op1 + " / " + op2 + " = " + result);
              // Close infile
              in.close();
              // Close outFile
              out.close();
    }

Maybe you are looking for

  • Yoga 2 11. Virtual keyboard in Tablet mode

    Hi. Yoga 2 11 and Windows 8.1 is entirley new to me, so please excuse my lack of knowledge. When PC is asleep in tablet mode, I cannot get the virtual keyboard in order to log in. When I try to type, it pops up for a second or so (varies in time), bu

  • WebDynpro development : KM reference - PortalApplicationNotFoundException

    Hello All, I have created a WebDynpro application where i would read an XML in KM folder and display the content.But, when i *** the sharing reference "PORTAL:sap.com/com/sap.km.application" as WebDynpro sharing reference, i get teh application but w

  • Insert asterisk(*) for amount field (Very Urgent)

    Hi all, I want to insert asterisk() for amount field REGUD-SWNET(15C) in SAP script. ie suppose amount is 1000.00 rest of the length should be filled by asterisk() infrount of amount. ie ********1000.00 it has display like this. Your help ll be rewar

  • MARS 5.2.7 integration with ACS 4.1

    Hello I cannot find any documentation I can follow to integrate MARS with ACS. I mean I want to use ACS to authenticate user in MARS. Any of you know if MARS 5.2.7 has this feature? If yes can please give some info where to find docs? Thank you reall

  • How to get data using JDOM

    Hi, I have this xml file stored in operator.xml <Operator>      <Customer>           <Name>sam</Name>           <Street>albert str.</Street>           <ZipCode>45454</ZipCode>           <City>NY</City>           <Country>USA</Country>           <EMai