Error:"exception in thread main:java.lang.noclassdeffound error.

Hi,
I am new to this java tech and programming. I just started learning and installed j2sdk1.4.0_03. I wrote a small hello world program and compiled it without any errors. When I execute the same using java hello command, I am getting an error like this: exception in thread "main" java.lang.noclassdeffound error. I am not able to resolve this issue. Please let me know the sol.
thanks
venkatraman

send the program u have typedUmm... Why?
Anyway @NovaKane: Welcome. Together with seifist and sunny we have at
least three new posters who show enough intelligence to find chuck's
solution (or one of the many hundreds of others like it) and the politeness
to thank him for it. What's the forum coming to?
If you need it there is a description of the classpath here:
http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/classpath.html
Again, welcome. And thanks for raising the intelligence level (and politeness
quotient) of the fora.

Similar Messages

  • "Exception in thread "main" java.lang.NoClassDefFound Error" in XP

    I was creating programs just fine for awhile. Then, for some unknown reason, I start getting the runtime error message, "Exception in thread "main" java.lang.NoClassDefFound Error." I set my PATH in the following manner:
    Start | Control Panel | Performance and Maintenance | System | Advanced | Environment Variables | Use Variables for Owner | PATH | Edit | C:\j2sdk1.4.2_04;C:\j2sdk1.4.2_04\bin;C:\j2sdk1.4.2_04\jre\bin | Ok | Ok | Ok
    I then closed the dialog boxes and restarted my computer. I then tried to run a program that ran before, only to get the same runtime error! Can someone please help me???

    NoClassDefFoundError happens because the JVM cannot find some class from your program, not because the OS cannot find your JVM (PATH regulates the latter, but not the former). JVM looks up classes in directories (or JAR files) specified through the -classpath option, like "java -classpath c:\myclasses MyMainClass". Read the online doc for the "java" launcher for more info.

  • "Exception in thread "main" java.lang.NoClassDefFound: classname" error.

    Here's my code:
    public class Hello
    public static void main( String[] args )
    System.out.println( "Hello!" );
    it compiles but it wont run. it encounters this error: " Exception in thread "main" java.lang.NoClassDefFoundError: Hello"
    Since I am using jdk1.3, my path is "c:\windows;c:\windows\command;c:\progra~1\dell\resolu~1\common\bin;c:\jdk1.3\bin"
    another error I noticed in my computer were these while running Calculator.java:
    Calculator.java:11: cannot resolve symbol
    symbol: class Calc
    location: class Calculator
    Calc calculator;
    Calculator.java:36: cannot resolve symbol
    symbol: class Calc
    location: class Calculator
    calculator = new Calc();
    2 errors
    Yet my Calculator.java, Calculator.class, Calc.java, Calc.class, Calculator.html files are all in one folder.
    Since I am using jdk1.3, my path is "path=c:\windows;c:\windows\command;c:\progra~dell\resolu~1\common\bin;c:\jdk1.3\bin;"
    I would greatly appreciate your help.
    Thank you very much!=)

    hi!
    set the classpath to the relative path "."!
    in the command box type this:
    SET CLASSPATH=.;
    then it should work!
    visit: >> http://www.menzsoft.ch <<
    greets

  • The following Error:  Exception in thread "main" java.lang.NoClassDefFoundE

    Dear People,
    I would really kindly welocme any help on the following error problem:
    Exception in thread "main" java.lang.NoClassDefFoundError: CoreUpdate
    The program compiles successfully and there are no errors generated from that but I get the above error when I try to run it. I have scanned over all the previous replies that have been posted for this sort of error and have tried all the following solutions:
    1) Set classpath to point to the bin and lib directories of where the JDK1.3.1 is installed in.
    2) Have actually placed in my classpath the EXACT directory to which the tools.jar file is located (within the lib directory).
    So WHAT ELSE is there to do?? I am really frustrated with this problem and I have re-started my computer in order to boot the classpath into gear but still no joy!
    I am running Win2k so do I actually have to go into my autoexec.bat file and type the classpath in there aswell(to which I havent done) or can I just go through my computer on my desktop and then to environment variables and set it up in there (to which I have done already and nopthing seems to work)?
    PLEASE PLEASE PLEASE help!! I very frustated girl programmer!!!
    Any help would be very much appreciated!
    Regards
    Helen Pringle

    Sorry about that last email - this is the errors I get now after I have placed that '.' to my classpath!
    The program is trying to access a MySQL DB.
    java.lang.ClassNotFoundException: org.gyt.mm.mysql.Driver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:191)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:124)
    at CoreUpdate.main(CoreUpdate.java:13)
    java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getConnection(DriverManager.java:477)
    at java.sql.DriverManager.getConnection(DriverManager.java:159)
    at CoreUpdate.main(CoreUpdate.java:24)
    Regards
    Helen

  • OUI is not openinig.   Exception in thread "main" java.lang.NoClassDefFound

    hi.
    while i'm trying to install oracle server, getting the below error
    Starting Oracle Universal Installer...
    Checking Temp space: must be greater than 80 MB. Actual 9277 MB Passed
    Checking swap space: must be greater than 150 MB. Actual 3529 MB Passed
    Checking monitor: must be configured to display at least 256 colors
    >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<<
    Some requirement checks failed. You must fulfill these requirements before
    continuing with the installation,
    Continue? (y/n) [n] y
    Ignoring required pre-requisite failures. Continuing...Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-09-27_02-55-33AM. Please wait ...[satish@rac1 database]$ Exception in thread "main" java.lang.NoClassDefFoundError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at java.awt.Toolkit$2.run(Toolkit.java:821)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
    at com.jgoodies.looks.LookUtils.isLowResolution(Unknown Source)
    at com.jgoodies.looks.LookUtils.<clinit>(Unknown Source)
    at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:122)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:242)
    at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1783)
    at javax.swing.UIManager.setLookAndFeel(UIManager.java:480)
    at oracle.install.commons.util.Application.startup(Application.java:758)
    at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:164)
    at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181)
    at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:265)
    at oracle.install.ivw.db.driver.DBInstaller.startup(DBInstaller.java:114)
    at oracle.install.ivw.db.driver.DBInstaller.main(DBInstaller.java:132)

    hi Srini,
    thanks for your time.
    I am trying to install it on RHEL 5 on VMWare Player, and the db version is 11g.
    i think the problem is with the below error
    Exception in thread "main" java.lang.NoClassDefFoundError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at java.awt.Toolkit$2.run(Toolkit.java:821)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
    at com.jgoodies.looks.LookUtils.isLowResolution(Unknown Source)
    at com.jgoodies.looks.LookUtils.<clinit>(Unknown Source)
    at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:122)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:242)
    at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1783)
    at javax.swing.UIManager.setLookAndFeel(UIManager.java:480)
    at oracle.install.commons.util.Application.startup(Application.java:758)
    at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:164)
    at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181)
    at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:265)
    at oracle.install.ivw.db.driver.DBInstaller.startup(DBInstaller.java:114)
    at oracle.install.ivw.db.driver.DBInstaller.main(DBInstaller.java:132)

  • Exception in thread "main" java.lang.NoClassDefFound

    C:\myjava>java JdbcCheckup
    Exception in thread "main" java.lang.NoClassDefFoundError: JdbcCheckup
    C:\myjava>java -cp %CLASSPATH%; . JdbcCheckup
    Exception in thread "main" java.lang.NoClassDefFoundError: c:\tomcat_4\common\li
    b\servlet/jar;
    C:\myjava>
    here is my classpath. There is 'c:\tomcat_4\common\lib\servlet/jar;' its listed as a .jar file?
    why cant i compile?
    CLASSPATH=c:\oracle\ora81\jdbc\lib\classes12.zip; c:\tomcat_4\common\lib\serv
    t.jar; c:\eclipse; c:\tomcat_4\examples\WEB-INF\classes;c:\oracle\ora81\jlib\b
    raphbean.jar;c:\oracle\ora81\jlib\LW_PfjBean.jar;c:\oracle\ora81\jlib\bigraphb
    n-nls.zip

    Either remove the erroneous spaces between your classpath elements, or do:
    java -cp "%CPASSPATH";." JdbcCheckup
    (notice the double-quotes)
    The way you did it, as soon as it saw the first space (after your classes12.zip entry), it thought that was the end of the classpath.

  • How to solve this problem"exception in thread "main" java.lang.noclassdeff"

    I am a tyro of java programming .
    i downloaded the j2sdk-1_4_2_09-windows-i586-p.exe from www.java.sun.com and installed it at the defaulted path C:\j2sdk1.4.2_09,
    then i wrote down my first java program as follow:
    public class hello
    public static void main (String args[])
    System.out.println("hello,����!");
    }and stored it at C:\Javasmp\ch01\hello.java.
    after that i opened dos commind window and compiled it :
    c:\javac C:\Javasmp\ch01\hello.java. and obtained file hello.class (C:\Javasmp\ch01\hello.class)
    but when running it (c:\java C:\Javasmp\ch01\hello) there was a mistake:
    exception in thread "main"java.lang.noclassdeffounderror:C:\Javasmp\ch01\hello
    i searched on the internet and found out the solution is set enviroment viriable ,so i set the "CLASSPATH" as".;C:\j2sdk1.4.2_09\lib;C:\j2sdk1.4.2_09\lib\tools.jar" ,"PATH" as"C:\j2sdk1.4.2_09\bin;C:\Windows\system32;c:\windows\system32\Wbem" and "JAVA_HOME" as "C:\j2sdk1.4.2_09\bin;C:\j2sdk1.4.2_09\jre\bin"
    afer that, i opened a new dos command window and run it again ,but the problem was still unsolved.
    in addition,my os is "windows xp"
    anyone can help me ,thank you!
    i am a student in China,it's a hard time for me to write down my question in english ,i doubt whether i express my question clearly.
    thank you for you reading.

    I have created a simple applet.
    import java.lang.*;
    import java.awt.*;
    public class jawtex3 extends java.applet.Applet
    public void init()
    add(new Button("One"));
    add(new Button("Two"));
    public Dimension preferredSize()
    return new Dimension(200, 100);
    public static void main(String [] args)
    Frame f = new Frame(" jawtex3");
    jawtex3 ex = new jawtex3();
    ex.init();
    f.add("Center", ex);
    f.pack();
    f.show();
    In this no compilation errors.
    I am getting runtime exception.as Exception in thread "main"java.lang.NoClassDefFound Error: jawtex
    reply me soon.
    thankyou.

  • HELP Needed with this error:   Exception in thread "main" java.lang.NoClass

    Folks,
    I am having a problem connecting to my MSDE SQL 2000 DB on a WindowsXP pro. environment. I am learning Java and writing a small test prgm to connect the the database. The code compiles ok, but when I try to execute it i keep getting this error:
    "Exception in thread "main" java.lang.NoClassDefFoundError: Test1"
    I am using the Microsoft jdbc driver and my CLASSPATH is setup correctly, I've also noticed that several people have complained about this error, but have not seen any solutions....can someone help ?
    Here is the one of the test programs that I am using:
    import java.sql.*;
    * Microsoft SQL Server JDBC test program
    public class Test1 {
    public Test1() throws Exception {
    // Get connection
    DriverManager.registerDriver(new
    com.microsoft.jdbc.sqlserver.SQLServerDriver());
    Connection connection = DriverManager.getConnection(
    "jdbc:microsoft:sqlserver://LAPTOP01:1433","sa","sqladmin");
    if (connection != null) {
    System.out.println();
    System.out.println("Successfully connected");
    System.out.println();
    // Meta data
    DatabaseMetaData meta = connection.getMetaData();
    System.out.println("\nDriver Information");
    System.out.println("Driver Name: "
    + meta.getDriverName());
    System.out.println("Driver Version: "
    + meta.getDriverVersion());
    System.out.println("\nDatabase Information ");
    System.out.println("Database Name: "
    + meta.getDatabaseProductName());
    System.out.println("Database Version: "+
    meta.getDatabaseProductVersion());
    } // Test
    public static void main (String args[]) throws Exception {
    Test1 test = new Test1();

    I want to say that there was nothing wrong
    with my classpath config., I am still not sure why
    that didn't work, there is what I did to resolved
    this issue.You can say that all you like but if you are getting NoClassDefFound errors, that's because the class associated with the error is not in your classpath.
    (For future reference: you will find it easier to solve problems if you assume that the problem is your fault, instead of trying to blame something else. It almost always is your fault -- at least that's been my experience.)
    1. I had to set my DB connection protocol to TCP/IP
    (this was not the default), this was done by running
    the
    file "svrnetcn.exe" and then in the SQL Server Network
    Utility window, enable TCP/IP and set the port to
    1433.Irrelevant to the classpath problem.
    2. I then copied all three of the Microsoft JDBC
    driver files to the ..\jre\lib\ext dir of my jdk
    installed dir.The classpath always includes all jar files in this directory. That's why doing that fixed your problem. My bet is that you didn't have the jar file containing the driver in your classpath before, you just had the directory containing that jar file.
    3. Updated my OS path to located these files
    and....BINGO! (that simple)Unnecessary for solving classpath problems.
    4. Took a crash course on JDBC & basic Java and now I
    have created my database, all tables, scripts,
    stored procedures and can read/write and do all kinds
    of neat stuff.All's well that ends well. After a few months you'll wonder what all the fuss was about.

  • On starting WebLogic getting Error : Listening for transport dt_socket at address: 8453 Exception in thread "main" java.lang.NoClassDefFoundError: vXmx512m

    Hi,
    system i am using for Oracle SOA is :
    Windows 64 Bit
    i5 Processor
    6 GB RAM
    29 GB on C Drive is already free after installation of all SOA related products.
    I have installed wlserver_10.3 for SOA 11g Development purpose and followed exact installation sequence and procedure as mention in oracle documentation
    i created domain also and every thing look correct but after installation procedure there are "Additional actions required just after every thing installed" :
    setting memory limit
    starting weblogic server (Admin Server)
    starting weblogic managed server
    and so on
    now Problem is when i execute C:\Oracle\Middleware\user_projects\domains\soa_div_domain\bin startWebLogic.cmd
    as mention in oracle documentation i am getting following error message : (i have only included last error lines instead of complete console log)
    oConsole= -Dweblogic.ext.dirs=C:\Oracle\MIDDLE~1\patch_wls1036\profiles\default\
    sysext_manifest_classpath;C:\Oracle\MIDDLE~1\patch_oepe180\profiles\default\syse
    xt_manifest_classpath;C:\Oracle\MIDDLE~1\patch_ocp371\profiles\default\sysext_ma
    nifest_classpath;C:\Oracle\MIDDLE~1\patch_adfr1111\profiles\default\sysext_manif
    est_classpath  weblogic.Server
    Listening for transport dt_socket at address: 8453
    Exception in thread "main" java.lang.NoClassDefFoundError: vXmx512m
    Caused by: java.lang.ClassNotFoundException: vXmx512m
            at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: ++Xmx512m.  Program will exit.
    Now to resolve this what i already tried are :
    I change JAVA_HOME and PATH to jdk6 which came with web logic installer
    Location is at :
    JAVA_HOME : C:\Oracle\Middleware\jdk160_29
    PATH : C:\Oracle\Middleware\jdk160_29\bin
    The above dose not include any space between path
    I ran the startWebLogic.cmd and got same error
    After that I also added
    CLASSPATH : C:\Oracle\Middleware\jdk160_29\lib\tool.jar;C:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic.jar;C:\Oracle\Middleware\jdk160_29\bin
    WL_HOME:  C:\Oracle\Middleware\wlserver_10.3
    I ran the startWebLogic.cmd and got same error
    I also used earlier path which I used with eclipse when I was working on other java development.
    JAVA_HOME : C:\Program Files\Java\jdk1.7.0_21
    PATH : C:\Program Files\Java\jdk1.7.0_21\bin
    I ran the startWebLogic.cmd and got same error
    Then I also gave PATH: C:\Oracle\Middleware\wlserver_10.3\server\lib      (including the existing one using ; )
    I ran the startWebLogic.cmd and got same error
    Now may be there is a file called setSOADomainEnv.cmd in
    < C:\Oracle\Middleware\user_projects\domains\soa_div_domain\bin\ setSOADomainEnv.cmd>
    That include some values for memory set :
    set JAVA_OPTIONS=%JAVA_OPTIONS%
    set DEFAULT_MEM_ARGS=-Xms512m –Xmx512m
    set PORT_MEM_ARGS=-Xms512m –Xmx768m
    if "%JAVA_VENDOR%" == "Oracle" goto OracleJVM
    set DEFAULT_MEM_ARGS=%DEFAULT_MEM_ARGS% -XX:PermSize=128m -XX:MaxPermSize=768m
    set PORT_MEM_ARGS=%PORT_MEM_ARGS% -XX:PermSize=256m -XX:MaxPermSize=768m
    now as I change the red highlighted value to 512 value because I have less memory resource and I checked in installation documentation to change the above red highlighted value to 512 original is 1024 which is too high and it was crating problem and showing memory space problem so I change it to 512 and now I am not getting that memory space problem error but may be the above error is related with change value in setSOADomainEnv.cmd file or not
    Following are my domain, weblogic and soa home directory path and all these path are exactly what it suppose to be according to Oracle Installation Documentation:
    WebLogic :
    C:\Oracle\Middleware\wlserver_10.3
    C:\Oracle\Middleware\coherence_3.7
    C:\Oracle\Middleware\oepe_11.1.1.8.0
    SOA Oracle Home Directory :
    C:\Oracle\Middleware\Oracle_SOA1
    OSB Home Location :
    C:\Oracle\Middleware\Oracle_OSB1
    Domain name : soa_div_domain
    Domain Location :       C:\Oracle\Middleware\user_projects\domains
    Application Location :  C:\Oracle\Middleware\user_projects\applications
    Domain Location:        C:\Oracle\Middleware\user_projects\domains\soa_div_domain
    form here i am trying to start weblogic : C:\Oracle\Middleware\user_projects\domains\soa_div_domain\bin\startWebLogic.cmd
    Please tell me any body want more details.
    Thanks.

    I think you are missing a character '-'
    USER_MEM_ARGS="Xms512m -Xmx512m -XX:MaxPermSize=128m"Add this character like follows
    "-Xms512m -Xmx512m -XX:MaxPermSize=128m"

  • Exception in thread "main" java.lang.Error: Unable to find named traits: org.puremvc.as3.multicore.p

    Hi all,
    i try  to  use  pfi with a  project that i did with  air  in flash builder.
    I make my swf with ant  task
        <target name="releasecompile" depends="init">
        <echo>
                  Ant Task :: releaseCompile
        </echo>
            <java jar="${MXMLC.JAR}" fork="true" failonerror="true">
               <arg value="-debug=false"/>
                <arg value="+flexlib=${SDK_HOME}frameworks"/>
                <arg value="+configname=air"/>
                <arg value="-file-specs=${MAIN_SOURCE_FILE}"/>
                <arg value="-output=${build}/${APP_ROOT_FILE}"/>
            <arg value="-external-library-path+=${APP_ROOT}/libs/PureMVC_AS3_MultiCore_1_0_5.swc" />
            </java>
        </target>
    i have a swf in result  and i play  pfi like this
    ./pfi -package -target ipa-ad-hoc -provisioning-profile /Users/stef/Desktop/PROJECT/PROJECT_Config-2.mobileprovision -storetype pkcs12 -keystore /Users/stef/Desktop/PROJECT/Certificats2.p12 -storepass mypass /Users/stef/Desktop/PROJECT/PROJECTConfig.ipa /Users/stef/Documents/Adobe\ Flash\ Builder\ 4/PROJECT/src/PROJECTConfigurateur-app.xml -C /Users/stef/Desktop/PROJECT/ PROJECTConfigurateur.swf  Default.png icons/Icon57.png icons/Icon29.png icons/Icon512.png
    Exception in thread "main" java.lang.Error: Unable to find named traits: org.puremvc.as3.multicore.patterns.facade::Facade
    at adobe.abc.Domain.resolveTypeName(Domain.java:195)
    at adobe.abc.Domain.resolveTypeName(Domain.java:112)
    at adobe.abc.GlobalOptimizer$InputAbc.resolveTypeName(GlobalOptimizer.java:274)
    at adobe.abc.GlobalOptimizer$InputAbc.readInstance(GlobalOptimizer.java:837)
    at adobe.abc.GlobalOptimizer$InputAbc.readAbc(GlobalOptimizer.java:388)
    at adobe.abc.GlobalOptimizer$InputAbc.readAbc(GlobalOptimizer.java:280)
    at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:160)
    at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcode(AOTCompiler.java:329)
    at com.adobe.air.ipa.AOTCompiler.GenerateMacBinary(AOTCompiler.java:600)
    at com.adobe.air.ipa.IPAOutputStream.compileRootSwf(IPAOutputStream.java:196)
    at com.adobe.air.ipa.IPAOutputStream.finalizeSig(IPAOutputStream.java:366)
    at com.adobe.air.ADTPackager.createPackage(ADTPackager.java:65)
    at com.adobe.air.ipa.IPAPackager.createPackage(IPAPackager.java:165)
    at com.adobe.air.ADTEntrypoint.parseArgsAndGo(ADTEntrypoint.java:132)
    at com.adobe.air.ipa.PFI.parseArgsAndGo(PFI.java:152)
    at com.adobe.air.ADTEntrypoint.run(ADTEntrypoint.java:68)
    at com.adobe.air.ipa.PFI.main(PFI.java:112)
    do you have some  ideas about this ?
    Regards
    Stef

    Ok,
        <target name="releasecompile" depends="init">
        <echo>
                  Ant Task :: releaseCompile
        </echo>
            <java jar="${MXMLC.JAR}" fork="true" failonerror="true">
               <arg value="-debug=false"/>
                <arg value="+flexlib=${SDK_HOME}frameworks"/>
                <arg value="+configname=air"/>
                <arg value="-file-specs=${MAIN_SOURCE_FILE}"/>
                <arg value="-output=${build}/${APP_ROOT_FILE}"/>
            <arg value="-external-library-path+=${APP_ROOT}/libs/PureMVC_AS3_MultiCore_1_0_5. swc" />
            </java>
        </target>
    I mistake  this line
      <arg value="-external-library-path+=${APP_ROOT}/libs/PureMVC_AS3_MultiCore_1_0_5. swc" />
    must be
    <arg value="-library-path+=${APP_ROOT}/libs/PureMVC_AS3_MultiCore_1_0_5.swc" />
    for  include the content in the swf.
    Regards
    Stef

  • Exception in thread "main" java.lang.NullPointerException error JDeveloper 12c

    Hello,
    I am trying to call a java stored procedure in java application. I am using ORACLE database and JDeveloper.
    I am getting error "Exception in thread "main" java.lang.NullPointerException. I have no idea what have I been doing wrong.
    I have a table "Beer" and I want to select all the data out with a stored procedure which I call out of Java app.
    I have a java.class file Store_A.java which I have loaded into the ORACLE database with LOADJAVA :
        import java.sql.*;
        import java.io.*;
        public class Store_a {
          public static void apskatit ()
            throws SQLException
            { String sql =
              "SELECT * FROM Beer";
            try { Connection conn = DriverManager.getConnection("jdbc:default:connection:");
              PreparedStatement pstmt = conn.prepareStatement(sql);
              ResultSet rset = pstmt.executeQuery();
              rset.close();
              pstmt.close();
            catch (SQLException e) {System.err.println(e.getMessage());
    Then I have created a procedure which I plan to call out in java:
        CREATE OR REPLACE PACKAGE Store_a AS
        PROCEDURE apskatit;
        END Store_a;
        CREATE OR REPLACE PACKAGE BODY Store_a AS
        PROCEDURE apskatit AS LANGUAGE JAVA
        NAME 'Store_a.apskatit()';
        END Store_a;
    And I have a java file that I have created with JDeveloper 12c:
        import java.sql.Connection;
        import java.sql.DriverManager;
        import java.sql.ResultSet;
        import java.sql.SQLException;
        public class Class1 {
             * @param args
            public static void main(String[] args) throws SQLException {
                Connection conn = null;
                try {
                    Class.forName("oracle.jdbc.driver.OracleDriver");
                    //Izveidojam savienojumu
                    conn = DriverManager.getConnection("jdbc.oracle.thin:@localhost:1521", "SYSTEM", "asdasd");
                    // Izveidojam callable statement
                    CallableStatement stmt = conn.prepareCall("CALL Store_a.apskatit()");
                    ResultSet resul = stmt.executeQuery();
                    while (resul.next()) {
                        System.out.println(resul.getInt(1) + "\t" + resul.getString(2));
                } catch (ClassNotFoundException e) {
                    e.printStackTrace();
                } finally {
                    try {
                        conn.close();
                    } catch (SQLException e) {
                        e.printStackTrace();
    When I try to run the java file, I get this error "Exception in thread "main" java.lang.NullPointerException at client.Class1.main(Class1.java:29).
    So the line I get error in is "conn.close();"
    How to fix this?
    Thank you very much in advance.

    I am trying to call a java stored procedure in java application. I am using ORACLE database and JDeveloper.
    I am getting error "Exception in thread "main" java.lang.NullPointerException. I have no idea what have I been doing wrong.
    Maybe you haven't read it yet but I told you in your other thread what you were doing wrong and, step by step, how to address the problem.
    https://forums.oracle.com/thread/2611124
    I'm not going to repeat everything again just this one main piece of advice:
    Until you get you code working outside the database don't even bother trying to load it into the DB and create a Java stored procedure.
    You are trying to deal with too many different issues at the same time. Unless you solve your primary Java problem by fixing the code outside the DB you will have nothing but problems loading it into the DB.
    And just get rid of this line of code - you don't need it anymore and it hasn't been done like that for many years now:
    Class.forName("oracle.jdbc.driver.OracleDriver");

  • Export Release Build error - Exception in thread "main" java.lang.Error: Unable to find named traits

    I've been developing an AIR application for Android and iOS. During development, I've run the application (in debug mode) in the desktop simulator as well as on an iPhone 4 and a Nook Tablet.
    However, I recently tried to "Export Release Build" for iOS and hit the following error: (I've stripped out the package and class information in the error message below)
    !ENTRY com.adobe.flexbuilder.project 4 43 2012-04-06 13:09:15.516
    !MESSAGE Error occurred while packaging the application:
    Exception in thread "main" java.lang.Error: Unable to find named traits: valid.package.path.here::ValidClassName
              at adobe.abc.Domain.resolveTypeName(Domain.java:231)
              at adobe.abc.Domain.resolveTypeName(Domain.java:148)
              at adobe.abc.GlobalOptimizer.sccp_eval(GlobalOptimizer.java:6665)
              at adobe.abc.GlobalOptimizer.sccp_analyze(GlobalOptimizer.java:5909)
              at adobe.abc.GlobalOptimizer.sccp(GlobalOptimizer.java:4628)
              at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:3514)
              at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:2215)
              at adobe.abc.LLVMEmitter.optimizeABCs(LLVMEmitter.java:526)
              at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:336)
              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
    !STACK 0
    java.lang.Exception
              at com.adobe.flexbuilder.project.internal.FlexProjectCore.createErrorStatus(FlexProjectCore. java:1019)
              at com.adobe.flexbuilder.util.logging.GlobalLogImpl.log(GlobalLogImpl.java:66)
              at com.adobe.flexbuilder.util.logging.GlobalLog.log(GlobalLog.java:52)
              at com.adobe.flexbuilder.exportimport.releaseversion.ui.ExportReleaseVersionWizard.doPackage (ExportReleaseVersionWizard.java:283)
              at com.adobe.flexbuilder.exportimport.releaseversion.ui.ExportReleaseVersionWizard.performFi nish(ExportReleaseVersionWizard.java:152)
              at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827)
              at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)
              at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
              at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
              at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
              at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
              at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
              at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974)
              at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613)
              at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
              at org.eclipse.jface.window.Window.open(Window.java:801)
              at com.adobe.flexbuilder.exportimport.releaseversion.ExportReleaseVersionAction$1.run(Export ReleaseVersionAction.java:97)
              at com.adobe.flexbuilder.exportimport.releaseversion.ExportReleaseVersionAction.run(ExportRe leaseVersionAction.java:103)
              at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
              at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
              at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionI tem.java:584)
              at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
              at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java :411)
              at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
              at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
              at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
              at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974)
              at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613)
              at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
              at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
              at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
              at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
              at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
              at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
              at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
              at com.adobe.flexbuilder.standalone.FlashBuilderApplication.start(FlashBuilderApplication.ja va:108)
              at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
              at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau ncher.java:110)
              at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav a:79)
              at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
              at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
              at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
              at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
    The class the error message is referring to is defined with a SWC that my project links to. However, I've even tried to define a class with that same name (and location) within my project and it still fails to find it.
    Why am I able to Project->Clean and run this project within the desktop AIR player (or on the device in debug mode) but unable to export it as a release build?
    I have found a couple of threads mentioning a similar error but none of them have been marked as resolved.

    At this point I feel I am talking to myself, but I will share my work-around in case it helps another who may stumble across this post.
    In my particular case, both my main AIR application and my ANE wrapper library were referencing the same external Flex library (same revision). Both projects had the library linkage set to merge. Changing the linkage to "External" on one of the 2 libraries (it doesn't seem to matter which) and leaving the other as "Merged into code" enabled the export to complete without the bizarre "Unable to find named traits" error.

  • Error after compile Exception in thread "main" java.lang.NoClassDefFoundErr

    Hi I am very new to Java programming, right now I am using a mac os 10.49
    I can create java documents using bbedit and then they compile when i type
    javac.
    But when i type java *.java I get the following error
    Exception in thread "main" java.lang.NoClassDefFoundError
    If I type java "filename"
    without the .java at the end of the file the terminal has no response
    I understand i am supposed to some how set the classpath but i do not know how to do this
    Also I can create and compile and then run my java in the eclipse program that i have installed, but not from terminal and im not sure why.
    Thanks for the help.

    I understand i am supposed to some how set the classpath but i do not know how
    to do thisThere is no need to set a system variable CLASSPATH, it is inflexible to do so, and it can lead to unpredictable behaviour.
    You should be able to compile and run programs from the command line, specifying the classpath as part of the commands you use.
    (1) For instance, you can create a file HelloWorld.java with the following contents:public class HelloWorld {
        public static void main(String args[]) {
            System.out.println("Hello world");
    }(2) From the command line (console) navigate to the folder (directory) containing this file and compile it with the commandjavac -cp . HelloWorld.javaThe "-cp ." part is what specifies the classpath. Note that it is a file that is being compiled so we specify the actual file name including the extension. At this point you should be able to check that the HelloWorld.class file has been created.
    (3) From the same folder (directory) you run the program withjava -cp . HelloWorldThe classpath is being specified in the same way as before. It is a class that is being invoked, so we don't specify a filename. (much less use wildcards like *).
    Documentation for the java and javac tools (and others) are linked to from this page: http://java.sun.com/javase/6/docs/index.html

  • Strange installation error!Thread: Exception in thread "main" java.lang.Uns

    Hello Guys,
    I did it in the morning also, but on a second machine i am getting this error:
    I have installed centOS 5 and changed redhat-release file to show redhat-4
    After installaing all the packages and setting all as per documentation when i try to run installer it is giving me the following error:
    Starting Oracle Universal Installer...
    Checking installer requirements...
    Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
    Passed
    All installer requirements met.
    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-05-24_01-12-02AM. Please wait ...[oracle@db database]$ Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2011-05-24_01-12-02AM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at sun.security.action.LoadLibraryAction.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
    at sun.awt.DebugHelper.<clinit>(Unknown Source)
    at java.awt.Component.<clinit>(Unknown Source)
    Please get me through this error.
    Thanks, Imran

    Thanks guys,
    solved by installing libXp package.

  • SQLJ error: "Exception in thread main java.lang.NoClassDefFoundError: sqlj/

    Hi,
    I am new to SQLJ. Now, in my PC (with Win98), I have JDK 1.2 and Oracle 8i (personal edition). I have used Java and Oracle in my PC without any problem. Now, I am going to learn SQLJ in order to create a java program to access Oracle database. What I have done is to set up several classpaths in DOS:
    SET classpath=C:\ora_program\sqlj\lib\translator.zip;
    SET classpath=C:\ora_program\sqlj\lib\runtime.zip;
    SET classpath=C:\ora_program\sqlj\lib\runtime12.zip;
    SET classpath=C:\ora_program\jdbc\lib\classes12.zip;
    The code of my program is:
    import java.sql.Date;
    import java.sql.SQLException;
    import oracle.sqlj.runtime.Oracle;
    import java.util.Date;
    public class Hello{
         public static void main(String[] args){
              java.sql.Date current_date;
              try{
                   // connect to the db
                   Oracle.connect(
                        "C:\ora_program\bin",
                        "system",
                        "manager");
                   // get the current date from the database
                   #sql{SELECT sysdate INTO :current_date FROM dual};
                   // display message
                   System.out.println("Hello, the current date is: "+ current_date);
              catch(SQLException e){
                   System.err.println("sqlException: "+e);
              finally{
                   try{
                        Oracle.close();
                   catch(SQLException e){
                        System.err.println("sqlException: "+e);
    And then I compile my program in DOS with the typing: sqlj Hello.sqlj
    The program cannot be compiled and the error message is:
    "Exception in thread main java.lang.NoClassDefFoundError: sqlj/tools/Sqlj"
    It indicates that the SQLJ translator class files cannot be found.
    I have set up the classpath in DOS (see above). How does the error come? Please help. Thanks.
    PC

    >
    SET classpath=C:\ora_program\sqlj\lib\translator.zip;
    SET classpath=C:\ora_program\sqlj\lib\runtime.zip;
    SET classpath=C:\ora_program\sqlj\lib\runtime12.zip;
    SET classpath=C:\ora_program\jdbc\lib\classes12.zip;
    The above only sets the classpath to the last value. You need to use the following.
    SET classpath=%classpath%;C:\ora_program\sqlj\lib\runtime.zip;

Maybe you are looking for

  • What is the use of HTTPS 8181 port

    Hi, I am wondering what is the use of the port 8181 on the EE5 application server. the second question. Why the application server open so many port on the same local machine. I agree that for security raison it is a good idea. But does application s

  • Collection inaccessible from Before Header process

    Hi, I have a form based on the Matrix Order application. There's a collection-based report with a bunch of text fields that can be updated and a column with a "Remove" item that basically calls a conditional Before Header process to remove the item f

  • Scenario Execution in Sequence

    Hi Guys i have two scenarios 1) JDBC1--> XI --> RFC1 2) JDBC1--> XI --> RFC2 RFC business logic of both uses both creating document based on Movement Type My concern is both RFC1 and RFC2 should not work in same time there should be some time gap for

  • How durable is the 7th Generation ipod nano screen against scratches?

    Also has anyone tried Shield Skins screen and body protectors? Would Shield Skin be a good product for me?

  • Consignment process and Condition types in Export Pricing Procedure

    Hi, Can any body tell me the 1. consignement process i.e which document are used at which level 2. when we are going for exports sales then which condition types are used and on which calulation is based on. thanks harmeet singh