Compiling in dependency classes

Is there a way to compile in all classes used by a Servlet into it, so that the only file to distribute is the Servlet.
This is because I get the error:
java.lang.NoClassDefFoundError: java/util/logging/Logger
at adminServlet.(adminServlet.java:10)
When trying to use the j2sdk 1.4.0-beta3 "logger" class with a Servlet that is being run on Tomcat 4.0.1.
I have placed, jar files and the individual Logger class files all over the place to make sure that this is not just a classpath problem.

hello anybody home???????????????????????????

Similar Messages

  • How do you compile Flex-dependent classes with ASC?

    Hi,
    I've been trying unsuccessfully for most of the evening to compile a .as file that relies on mx.collections.ListCollectionView using asc. I figured I could just import the Flex framework SWCs from the command line with asc, but asc doesn't seem to respect SWCs - it only seems to respect .abc files.
    So, I've spent most of my time trying to compile the Flex framework into a single .abc file that I can import whenever I want to compile a class that relies on Flex. I figured I could make a base .as file with include statements for all of the Flex .as files (copying the approach I saw for files like builtin.as) and compile that, but all I seem to get are compiler errors - mostly "[Compiler] Error #1181: Forward reference to base class (base class name)."
    I have a feeling I'm doing this completely the wrong way. I'd very much appreciate any assistance that anybody can offer me.
    Thanks,
    - max

    <div class=Section1><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>I use MXMLC to compile my .as file projects.<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Alex Harui<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Flex SDK Developer<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><a href="http://www.adobe.com/"><span style='color:blue'>Adobe<br />Systems Inc.</span></a><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Blog: <a href="http://blogs.adobe.com/aharui"><span<br />style='color:blue'>http://blogs.adobe.com/aharui</span></a><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><br /><br /><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span<br />style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Maxim Porges<br />[mailto:[email protected]] <br><br /><b>Sent:</b> Monday, February 09, 2009 9:22 PM<br><br /><b>To:</b> [email protected]<br><br /><b>Subject:</b> How do you compile Flex-dependent classes with ASC?<o:p></o:p></span></p><br /><br /></div><br /><br /><p class=MsoNormal><o:p> </o:p></p><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>A new discussion was started by<br />Maxim Porges in <br><br /><br><br /><b>Developers</b> --<br><br />  How do you compile Flex-dependent classes with ASC?<br><br /><br><br />Hi, <br><br /><br><br />I've been trying unsuccessfully for most of the evening to compile a .as file<br />that relies on mx.collections.ListCollectionView using asc. I figured I could<br />just import the Flex framework SWCs from the command line with asc, but asc<br />doesn't seem to respect SWCs - it only seems to respect .abc files. <br><br /><br><br />So, I've spent most of my time trying to compile the Flex framework into a<br />single .abc file that I can import whenever I want to compile a class that<br />relies on Flex. I figured I could make a base .as file with include statements<br />for all of the Flex .as files (copying the approach I saw for files like<br />builtin.as) and compile that, but all I seem to get are compiler errors -<br />mostly &quot;[Compiler] Error #1181: Forward reference to base class (base<br />class name).&quot; <br><br /><br><br />I have a feeling I'm doing this completely the wrong way. I'd very much<br />appreciate any assistance that anybody can offer me. <br><br /><br><br />Thanks, <br><br /><br><br />- max <o:p></o:p></p><br /><br /><div class=MsoNormal><br /><br /><hr size=2 width=200 style='width:150.0pt' align=left><br /><br /></div><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>View/reply at <a<br />href="http://www.adobeforums.com/webx?13@@.59b7d5d2">How do you compile<br />Flex-dependent classes with ASC?</a><br><br />Replies by email are OK.<br><br />Use the <a<br />href="http://www.adobeforums.com/webx?280@@.59b7d5d2!folder=.3c060fa3">unsubscribe</a>< br />form to cancel your email subscription.<o:p></o:p></p><br /><br /></div>

  • How to compile the Java classes generated in JAXB

    I am using Windows 2000 Operating System. I found a xjc
    batch file on the sun's java forum.
    I used that to generate classes from XML. After generating
    the classes I could not compile
    the classes each depends on other AND THEY REQUIRE BOTH
    CLASS FILES.
    I will attach the schema file and dtd . Can you explaine me the problem.
    #<transactions.dtd>
    <?xml version="1.0" encoding="UTF-8"?>
    <!ELEMENT transactions (cardtocard*)>
    <!ELEMENT cardtocard (tocard, fromcard, fromcardver, amount, transdate, transid)
    >
    <!ELEMENT tocard (#PCDATA)>
    <!ELEMENT fromcard (#PCDATA)>
    <!ELEMENT fromcardver (#PCDATA)>
    <!ELEMENT amount (#PCDATA)>
    <!ELEMENT transdate (#PCDATA)>
    <!ELEMENT transid (#PCDATA)>
    transactions.xjs
    <xml-java-binding-schema>
    <element name="transactions" type="class" root="true"/>
    <element name="cardtocard" type="class"/>
    </xml-java-binding-schema>
    XML file
    ?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XML Spy v4.4 U (http://www.xmlspy.com)-->
    <transactions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="C:\My Documents\Xml\SVTConcord.xsd">
    <cardtocard>
    <tocard>1111222233334444</tocard>
    <fromcard>6666777788889999</fromcard>
    <fromcardver>567</fromcardver>
    <amount>100.00</amount>
    <transdate>2002-06-04 00:00:00.000</transdate>
    <transid>1111222202</transid>
    </cardtocard>
    </transactions>
    the XJC compiler for windows is
    @echo off
    echo JAXB Schema Compiler
    echo --------------------
    if "%JAVA_HOME%" == "" goto errorJVM
    if "%JAXB_HOME%" == "" goto errorJAXB
    set JAXB_LIB=%JAXB_HOME%\lib
    set JAXB_CLASSES=%JAXB_HOME%\classes
    echo %JAVA_HOME%\bin\java.exe -jar %JAXB_LIB%\jaxb-xjc-1.0-ea.jar %1 %2 %3 %4 %5
    %JAVA_HOME%\bin\java.exe -jar %JAXB_LIB%\jaxb-xjc-1.0-ea.jar %1 %2 %3 %4 %5
    goto end
    :errorJVM
    echo ERROR: JAVA_HOME not found in your environment.
    echo Please, set the JAVA_HOME variable in your environment to match the
    echo location of the Java Virtual Machine you want to use.
    echo For example:
    echo set JAVA_HOME=c:\jdk1.4.0_01
    goto end
    :errorJAXB
    echo ERROR: JAXB_HOME not found in your environment.
    echo Please, set the JAXB_HOME variable in your environment to match the
    echo location of the JAXB installation directory.
    echo For example:
    echo set JAXB_HOME=c:\jdk1.4.0_01\jaxb-1.0-ea
    :end

    When you compile the generated classes, be sure to put jaxb-rt-1.0-ea.jar in your classpath!

  • Compiler Errors With Class Definitions and Clients

    Hi there, I need help with some code, here it is.
    import java.util.*;
    import java.text.*;
    public class InvestCalc {
         //declaration of instance variables
         private double interest, principal;
         //default constructor, sets interest and principal to zero
         public InvestCalc() {
              interest = 0.0;
              principal = 0.0;
         //overloaded constructor
         public InvestCalc( double startInterest, double startPrincipal) {
              interest = startInterest;
              principal = startPrincipal;
         //accessor methods for instance variables
         public double getRate() {
              return interest;
         public double getPrincipal() {
              return principal;
         //mutator methods
         public void setRate(double newInterest) {
              interest = newInterest;
         public void setPrincipal(double newPrincipal) {
              principal = newPrincipal;
         //String toString() method
         public String toString() {
              return "Interest Rate: " + percent.format(interest) + ", Principal: " + DOLLAR_FORMAT.format(principal);     
         //futureValue(int year) method
         public double futureValue(int year) {
              double futureValue = Math.pow((1 + interest), year)*principal;
              return futureValue;
         //public static final class variables
         public static final int shortTerm = 5;
         public static final int middleTerm = 10;
         public static final int longTerm = 20;
         //public void display Table() method
         public void displayTable() {
              System.out.println("Year" + "\t" + "Interest Rate" + "\t\t" + "Principal" + "\t\t" + "Future Value");
              System.out.println(shortTerm + "\t" + percent.format(interest) + "\t\t\t" + DOLLAR_FORMAT.format(principal) + "\t\t" + DOLLAR_FORMAT.format(futureValue(shortTerm)));
              System.out.println(middleTerm + "\t" + percent.format(interest) + "\t\t\t" + DOLLAR_FORMAT.format(principal) + "\t\t" + DOLLAR_FORMAT.format(futureValue(middleTerm)));
              System.out.println(longTerm + "\t" + percent.format(interest) + "\t\t\t" + DOLLAR_FORMAT.format(principal) + "\t\t" + DOLLAR_FORMAT.format(futureValue(longTerm)));
         //formatting section
         public static final NumberFormat DOLLAR_FORMAT = NumberFormat.getCurrencyInstance();
         public static final DecimalFormat percent = new DecimalFormat("##0.00%");
    import java.util.*;
    public class InvestCalcApp {
          * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              //declare Scanner class and interest, principal vars
              Scanner input = new Scanner(System.in);          
              double interest, principal;     //vars for the interest rate and initial investment
              //instantiate a default object of the InvestCalc class
              InvestCalc value1 = new InvestCalc();
              System.out.println("Default InvestCalc Object");
              System.out.println(value1.toString()+ "\n");
              //query for interest and principal
              System.out.print("Enter an interest rate in decimal format: ");
              interest = input.nextDouble();
              System.out.print("Enter the initial investment value: ");
              principal = input.nextDouble();
              //change object and output
              value1.setRate(interest);
              value1.setPrincipal(principal);
              System.out.println("Updated InvestCalc Object");
              System.out.println(value1.toString());
              //test the futureValue method and the DOLLAR_FORMAT static class variable
              System.out.println("Value after 1 year " + InvestCalc.DOLLAR_FORMAT.format(value1.futureValue(1)) + "\n");     
              value1.displayTable();     
              //query for another interest and principal
              System.out.print("Enter another interest rate in decimal format: ");
              interest = input.nextDouble();
              System.out.print("Enter another initial investment value: ");
              principal = input.nextDouble();
              //instantiate an object of the InvestCalc class
              InvestCalc value2 = new InvestCalc(interest, principal);
              System.out.println("Non-Default InvestCalc Object");
              System.out.println(value2.toString()+ "\n");
              value2.displayTable();
    }When I compile InvestCalc.java it compiles; however, when I compile InvestCalcApp.java I receive 5 errors:
    InvestCalcApp.java:15: cannot find symbol
    symbol : class InvestCalc
    location: class InvestCalcApp
                     InvestCalc value1 = new InvestCalc();
    InvestCalcApp.java:15: cannot find symbol
    symbol : class InvestCalc
    location: class InvestCalcApp
                     InvestCalc value1 = new InvestCalc();
    InvestCalcApp.java:32: package InvestCalc does not exist
                                  System.out.println("Value after 1 year " + InvestCalc.DOLLAR_FORMAT.format(value1.futureValue(1)) + "\n");
    InvestCalcApp.java:42: cannot find symbol
    symbol : class InvestCalc
    location: class InvestCalcApp
                     InvestCalc value2 = new InvestCalc(interest, principal);
    InvestCalcApp.java:42: cannot find symbol
    symbol : class InvestCalc
    location: class InvestCalcApp
                     InvestCalc value2 = new InvestCalc(interest, principal);Sorry if that's a lot of reading, but I need help, I'm new at this and not quite sure what those errors mean. Thanks

    The errors mean the compiler can not find the InvestCalc class. The compiler looks for classes using the Classpath. It might work if you use a command likejavac -cp . InvestCalcApp.javaThis command tells javac to look in the current directory for dependent classes.

  • Error compiling the BPEL classes while configuring custom approval process

    Hi,
    I get the below error, but unable to fix this. Any one who did face this issue please share your thoughts to overcome this.
    Error(45,34): Failed to compile bpel generated classes.
    failure to compile the generated BPEL classes for BPEL process "ApprovalProcess" of composite "default/SelfRegistrationApproval!1.0"
    The class path setting is incorrect.
    Ensure that the class path is set correctly. If this happens on the server side, verify that the custom classes or jars which this BPEL process is depending on are deployed correctly. Also verify that the run time is using the same release/version.
    Thanks,
    Bhaskar

    You need to keep all the custom jars at three places :
    1) Soa ext , and make sao extension jar by running ant
    2) Bpel classpath
    3) in your project as an external referrence

  • 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

  • Dependent Class files of EJBs...

    I have few dependent class files related to all EJBs (for example common exceptione). Right now all these dependent classes are duplicated in all the EJB jars. Is there any way get rid out of this duplication (other than putting in to system class path). i.e one single jar containing all dependent class files should be deployed along with the (EJBs jars - dependent calsses) in the EAR file.
    Thanx in Adv,
    Potluri

    Hi,
    you can set a classapth in the MANIFEST.MF filewith the parameter Class-Path for relative URLs

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

  • Ojc will compile the following class. A bug?

    I thought that in Java classes cannot be declared protected. ojc will however compile the following class:
    protected class aclass
    The Sun java compiler prints the following error:
    aclass.java:1: modifier protected not allowed here
    protected class aclass
    Is this a known bug in the Oracle Java compiler?

    Yes, it seems we have a little bug in OJC, the protected access modifier should only be allowed for member classes. I filed a bug report and I'll fix it.
    Thanks!
    Keimpe Bronkhorst
    JDev Team

  • Dependent class not found in the classpath

    Hi, Recently I was implemented a Class that implement "CallbackHandler".
    This class help me to build a security header for a SOAP Message, but when I execute this one in a OC4J, I obtain the next error:
    oracle.classloader.util.AnnotatedClassNotFoundException:
    Dependent class: oracle.security.wss.WSSecurity
    Loader: oracle.ws.security:10.1.3
    Code-Source: /E:/jdeveloper/webservices/lib/wssecurity.jar
    Configuration: <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in E:\jdeveloper\j2ee\home\oc4j.jar
    This load was initiated at oracle.ws.security:10.1.3 using the Class.forName() method.
    The missing class is available from the following locations:
    I'm using JDeveloper 10.1.3.4. Any help?
    Edited by: user5540744 on 04-jul-2011 4:53

    Here is the work around:
    If you add the generated xxx_wsdl.jar to your buildpath in the ant build file, this warning goes away.

  • Flex Builder stops compile new ActionScript classes

    Hello,
    Does anyone knows what could cause Flex Builder 3.4 stops compiling NEW ActionScript classes? I have been working on Flex project for a while, we have some MXML and .as files (less than 200). This morning Flex Builder suddenly stopped detecting errors in new as classes, but not so for older classes. Thanks and appreciate your help.
    - Weiping

    Are your new classes referenced from the old code? Mxmlc employs a questionable form of "as-needed" linking, so classes that are not referenced from the main application are not even compiled. This referencing requirement is recursive; that is, any classes that are to be included have to be referenced from the main application, or from classes referenced by the main application, or from classes referenced by classes referenced by the main application, and so on. But if your new classes are not referenced at all from the old code, they will be ignored.

  • Compiling java package class referring a default package class.

    I am trying to compile a java class having a package defination referring a java class with a default package.
    The code for the default package class is .
    public class Test{.
    public static void main(String[] args){
    System.out.println("Hello World!");
    This class compiles fine.
    I have another class called PackJava, whose code is :
    package test;
    import Test;
    public class PackJava{
    public static void main(String[] args){
    Test test = new Test();
    System.out.println("Hello World!");
    I have Test file in the windows path
    D:\development\packagetest\example
    and the PackJava java file in the path
    D:\development\packagetest\example\test
    I have set the CLASSPATH environment varibale as
    D:\development\packagetest\example;.
    When I try to compile the PackJava from the
    D:\development\packagetest\example path giving the command as
    javac -classpath . test\PackJava.java
    or
    javac -classpath %CLASSPATH% test\PackJava.java
    it gives me error,
    Do any of you have an idea of the parameter i should pass
    to the -classpath option
    Thanks

    There is a way around all this. The classes in the default packages need to implement an interface with the methods require. The interface can be in any package you want ie. com.work.around.interf.MyInterface1. Next, make this interface available in a Singleton. - The only catch here is that, the main method must reside in default package as well. And o, on start of main, instantiate the class you want and put it in the singleton. There after, you may refer to it from the singleton.
    Enjoy.

  • Compile error on .class for an array.

    How do I write the code below correctly?
            final ArgumentCaptor<MessageToken[]> tokenArg = ArgumentCaptor.forClass(MessageToken[].class);

    How do I write the code below correctly?
    final ArgumentCaptor<MessageToken[]> tokenArg = ArgumentCaptor.forClass(MessageToken[].class);
    What is the exact compilation error?
    Note that since ArgumentCaptor is probably a custom class that only you or your team knows about, we will maybe not be able to help a lot, we will probably need that you give us the signature of its method forClass
    Note that the problem is not that the syntaxfor the array class MessageToken[].class is illegal in itself; the following compiles perfectly:
    public class TestClassLitteral {
        Class stringClass = String.class;
        Class stringArrayClass = String[].class;
    }

  • Assembling jar with dependent classes

    For efficient Applet use I'd like to copy selectively into a jar my applet classes plus all classes they are dependent on from a set of libraries, thus producing the minimum jar library with which the applets can run (obviously classes which are part of the standard JRE are not to be included.
    Now I can see, in outline, how to write a program to achieve this, but I have this feeling I've read about such a facility somewhere. I thought it was in ANT but I can't find it in the ANT documentation now. If someone knows of a utility (preferably free) that can do this please can you save me the trouble.

    Well, I think I've found one on sourceforge: http://genjar.sourceforge.net/
    I've also found out how to get dependant classes from a .class file relatively simply. Class references are listed in the Constants Table which is near the start of the .class file format. I've written a piece of code which seems to fetch them OK.
    package org.igis.assjar;
    * <p>Read a class file stream and return all the referenced classes from the
    * class.</p>
    * @author  malcolmm
    public class GetClassRefs {
        private static final byte CONSTANT_Class = 7;
        private static final byte CONSTANT_FieldRef = 9;
        private static final byte CONSTANT_MethodRef = 10;
        private static final byte CONSTANT_InterfaceMethodRef = 11;
        private static final byte CONSTANT_String = 8;
        private static final byte CONSTANT_Integer = 3;
        private static final byte CONSTANT_Float = 4;
        private static final byte CONSTANT_Long = 5;
        private static final byte CONSTANT_Double = 6;
        private static final byte CONSTANT_NameAndType = 12;
        private static final byte CONSTANT_Utfs = 1;
        private static final int [] lengths = new int[13];
        static {
            lengths[CONSTANT_Class] = 3;
            lengths[CONSTANT_FieldRef] = 5;
            lengths[CONSTANT_MethodRef] = 5;
            lengths[CONSTANT_InterfaceMethodRef] = 5;
            lengths[CONSTANT_String] = 3;
            lengths[CONSTANT_Integer] = 5;
            lengths[CONSTANT_Float] = 5;
            lengths[CONSTANT_Long] = 9;
            lengths[CONSTANT_Double] = 9;
            lengths[CONSTANT_NameAndType] = 5;
            lengths[CONSTANT_Utfs] = 1;
        private final static int magic = 0xcafebabe;
        String mainClass;
        String [] refs;
        /** Creates a new instance of GetClassRefs */
        public GetClassRefs(java.io.InputStream ins) throws java.io.IOException,java.lang.ClassFormatError {
            java.io.DataInputStream in = new java.io.DataInputStream(ins);
            Object[] constTable;
            int nRefs;
            if(in.readInt() != magic)
                throw new ClassFormatError("Bad class magic");
            in.skipBytes(4);
            int cpCount = in.readUnsignedShort();
            constTable = new Object[cpCount];
            nRefs = 0;
            for(int i = 1; i < cpCount; i++) {
                int tag = in.readUnsignedByte();
                switch(tag) {
                    case CONSTANT_Utfs:
                        String clsName = in.readUTF();
                        if(clsName.length() > 0) {
                            if(clsName.charAt(0) == '[') {
                                do
                                    clsName = clsName.substring(1);
                                while(clsName.charAt(0) == '[');
                                if(clsName.charAt(0) == 'L' && clsName.endsWith(";"))
                                    clsName = clsName.substring(1, clsName.length() - 1);
                            constTable[i] = clsName;
                        break;
                    case CONSTANT_Class:
                        nRefs++;
                        constTable[i] = new Integer(in.readUnsignedShort());
                        break;
                    case CONSTANT_Long:
                    case CONSTANT_Double:
                        i++;
                        in.skipBytes(8);
                        break;
                    default:
                        if(tag < 0 || tag >= lengths.length || lengths[tag] == 0)
                            throw new ClassFormatError("Invalid constants tag " + tag);
                        in.skipBytes(lengths[tag] - 1);
                        break;
            in.skipBytes(2);
            int thisClass = in.readUnsignedShort();
            if(!(constTable[thisClass] instanceof Integer))
                throw new ClassFormatError("Invalid main class index");
            int cpp = ((Integer)constTable[thisClass]).intValue();
            if(!(constTable[cpp] instanceof String))
                throw new ClassFormatError("Invalid main class pointer");
            mainClass = (String)constTable[cpp];
            refs = new String[nRefs - 1];
            int j = 0;
            for(int i = 1; i < constTable.length; i++) {
                Object entry = constTable;
    if(entry instanceof Integer) {
    int idx = ((Integer)entry).intValue();
    if(idx < 1 || idx >= constTable.length)
    throw new ClassFormatError("Out of range class reference");
    if(constTable[idx] instanceof String) {
    if(i == thisClass)
    mainClass = (String)constTable[idx];
    else
    refs[j++] = (String)constTable[idx];
    else
    throw new ClassFormatError("Class reference not string");
    public String getMainClass() {
    return mainClass;
    public String[] getRefs() throws ClassFormatError {
    return refs;

  • Stack overflow error when "compiling" a TagHandler class in IBM

    meda karthik, Aug 7, 2004
    Hi,
    I am getting a StackOverFlowError during compilation(yes StackOverFlow during compilation !) of a TagHandler class when i am compiling with IBM JDK 1.4.2. The strange thing is, that i dont get the error when i compile the same class with IBM JDK 1.3.1. I am sure that this class is causing the error, because without it,the build goes through fine. I am doing a build of my component through ant. The following is the error i get :
    ---------------------------ERROR-----------------------------
    [javac] The system is out of resources.
    [javac] Consult the following stack trace for details.
    [javac] java.lang.StackOverflowError
    [javac] at com.sun.tools.javac.v8.code.Type$ClassType.constType(Type.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.visitLiteral(Attr.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.tree.Tree$Literal.accept(Tree.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java(Inlined Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.attribArgs(Attr.java(Inlined Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.visitApply(Attr.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.tree.Tree$Apply.accept(Tree.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.visitSelect(Attr.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.tree.Tree$Select.accept(Tree.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.attribExpr(Attr.java(Inlined Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.visitApply(Attr.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.tree.Tree$Apply.accept(Tree.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.visitSelect(Attr.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.tree.Tree$Select.accept(Tree.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.attribExpr(Attr.java(Inlined Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.visitApply(Attr.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.tree.Tree$Apply.accept(Tree.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.visitSelect(Attr.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.tree.Tree$Select.accept(Tree.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.attribExpr(Attr.java(Inlined Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.visitApply(Attr.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.tree.Tree$Apply.accept(Tree.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.visitSelect(Attr.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.tree.Tree$Select.accept(Tree.java(Compiled Code))
    The above messages continue repeating and finally ends with...
    [javac] at com.sun.tools.javac.v8.tree.Tree$MethodDef.accept(Tree.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java(Inlined Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.attribStat(Attr.java(Inlined Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.attribClassBody(Attr.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1349)
    [javac] at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java(Compiled Code))
    [javac] at com.sun.tools.javac.v8.Main.compile(Main.java:586)
    [javac] at com.sun.tools.javac.Main.compile(Main.java:67)
    [javac] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [javac] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
    [javac] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
    [javac] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
    [javac] at java.lang.reflect.Method.invoke(Method.java:391)
    [javac] at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:100)
    [javac] at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:842)
    [javac] at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682)
    [javac] at org.apache.tools.ant.Task.perform(Task.java:341)
    [javac] at org.apache.tools.ant.Target.execute(Target.java:309)
    [javac] at org.apache.tools.ant.Target.performTasks(Target.java:336)
    [javac] at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    [javac] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
    [javac] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
    [javac] at org.apache.tools.ant.Task.perform(Task.java:341)
    [javac] at org.apache.tools.ant.Target.execute(Target.java:309)
    [javac] at org.apache.tools.ant.Target.performTasks(Target.java:336)
    [javac] at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    [javac] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
    [javac] at org.apache.tools.ant.Task.perform(Task.java:341)
    [javac] at org.apache.tools.ant.Target.execute(Target.java:309)
    [javac] at org.apache.tools.ant.Target.performTasks(Target.java:336)
    [javac] at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    [javac] at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
    [javac] at org.apache.tools.ant.Main.runBuild(Main.java:609)
    [javac] at org.apache.tools.ant.Main.start(Main.java:196)
    [javac] at org.apache.tools.ant.Main.main(Main.java:235)
    ---------------------------ERROR----------------------------- I am also attaching the first few lines of the tag, incase you find some imports are being referenced circularly....here is the TagHandlerClass.........: ------------------CLASS-------------------------------------
    package com.ibm.bcg.consoleUI.tags;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpSession;
    import javax.servlet.jsp.JspException;
    import javax.servlet.jsp.JspWriter;
    import javax.servlet.jsp.tagext.TagSupport;
    import org.apache.struts.util.MessageResources;
    import com.ibm.bcg.consoleUI.forms.FormConstants;
    import com.ibm.bcg.consoleUI.forms.SchedulerForm;
    import com.ibm.bcg.consoleUI.forms.VCBaseForm;
    import com.ibm.bcg.consoleUI.locale.LocaleUtils;
    import com.ibm.bcg.shared.ClientInfo;
    import com.ibm.bcg.shared.NameIdAssoc;
    import com.ibm.bcg.shared.logging.Logger;
    import com.ibm.bcg.shared.logging.LoggerFactory;
    import java.util.*;
    import com.ibm.bcg.consoleUI.action.ActionLists;
    import com.ibm.bcg.consoleUI.action.alerts.AlertActionUtil;
    import com.ibm.icu.util.Calendar;
    import com.ibm.icu.text.NumberFormat;
    * @author karthikd
    * @version 1.0
    public class ScheduleTag extends TagSupport {
    // The following 3 fields denote the attributes of the tag.
    private String formName;
    private String requestKey;
    private String scheduleController;
    private SchedulerForm schedulerForm;
    private Logger logger;
    private MessageResources resources;
    private ClientInfo clientInfo;
    private Locale locale;
    private HttpServletRequest request;
    private JspWriter writer;
    private HttpSession session;
    private String newLine = "\r\n";
    private Calendar cal = null;
    public int doStartTag() throws JspException
    try
    logger = LoggerFactory.getLoggerInstance();
    logger.log(this.getClass(),Logger.PRIORITY_DEBUG,"staring SchedulerTag ******");
    request = (HttpServletRequest)pageContext.getRequest();
    writer = (JspWriter)pageContext.getOut();
    schedulerForm = (SchedulerForm) request.getAttribute(getRequestKey());
    session = (HttpSession)pageContext.getSession();
    clientInfo = (ClientInfo) session.getAttribute( "clientInfo" );
    locale = clientInfo.getLocale();
    resources = LocaleUtils.getMessageResources(VCBaseForm.CONSOLE_BUNDLE);
    cal = Calendar.getInstance( clientInfo.getFormatLocale() );
    // write out the various JavaScript functions required.
    writer.println(getScripts());
    //write out the main options,i.e Interval Based and Calendar based scheduling options
    writer.println(getOptions());
    //decide what kind of scheduling screen is needed.
    if(schedulerForm.isIntervalBased())
    logger.log(this.getClass(),Logger.PRIORITY_DEBUG,"Interval based scheduling ******* ");
    writer.println(getIntervalScreen());
    else
    logger.log(this.getClass(),Logger.PRIORITY_DEBUG,"Calendarbased scheduling ******* ");
    writer.println(getCalendarScreen());
    writer.println(initCalendarScreen());
    catch (Exception e)
    logger.log(this.getClass(),Logger.PRIORITY_ERROR,"SchedulerTag Handler Exception ******** ");
    logger.log(this.getClass(),Logger.PRIORITY_DEBUG,"Inside the catch block of Scheduler Tag ****** ");
    throw new JspException("SchedulerTag : " + e.getMessage());
    return SKIP_BODY;
    ------------------CLASS-------------------------------------
    What could cause such a problem? Please help , in need of urgent help !!
    regards, karthik .

    Hi,
    No i have not tried to compile it manually as the file is part of a larger project and there are a lot of other dependencies before i can compile this manually.
    In any case i found a work around for the porblem. What was happening is that i had a fairly large function, which was about 250 lines, with a larger number of calls to the "append()" function of the StringBuffer class.
    I broke the large function into smaller pieces and now i dont get the error.!
    But can somebody explain why this solved the problem. Is it because the compiler is not able to stack up all the activation records for execution during runtime ? But like i mentioned what is it in IBM JDK 1.4.2 which is not allowing this, whereas IBM JDK 1.3.1 is able to do it ?
    I did solve my problem, but havent got a logical answer to why this was happening !
    would appreciate it if someone sheds some light on this topic .
    thanks and regards,
    Karthik

Maybe you are looking for