Exception in thread "main" java.lang.OutOfMemoryError( while importing xml)

I am trying to config application in Sun One Portal server 3.0 SP5 , (Sun Solaris 8)during configuration I was trying to import some xml files however during the process I got the error :
Exception in thread "main" java.lang.OutOfMemoryError.
I tried increasing the size of the heap in jvm12.conf to 512 MB and even tried to run the command -Xms512M, but this didn't help.
Pls respond as asap.
Sharad gehani

Hi gimbal2,
yeah, its streaming the particular data (ie CUSTOMER) from input xml file and generate the txt file.
I tried like below . But this is also not working. Getting the same error.
java -Xmx2048m -mx2048m -Xss1024k -Xoss1024m
Any other possible solution on this?

Similar Messages

  • FB 4.7 AIR 3.6 Flex 4.9 iOS packing - Exception in thread "main" java.lang.OutOfMemoryError'

    I've got an error similar to Isaac_Sunkes' 'FB 4.7 iOS packaging - Exception in thread "main" java.lang.OutOfMemoryError',
    but the causes are not related to what he discovered, corrupt image or other files, I'd exclude bad archive contents in my project.
    I'm using Flash Builder 4.7 with Adobe AIR 3.6 set into an Apache Flex 4.9.1 SDK;
    HW system is:
    iMac,    2,7 GHz Intel Core i5,    8 GB 1600 MHz DDR3,    NVIDIA GeForce GT 640M 512 MB,    OS X 10.8.2 (12C3103)
    The Flash project consists in an application with a main SWF file which loads, via ActionScript methods, other SWF in cascade.
    I've formerly compiled and run the application on an iPad 1, IOS 5.0.1 (9A405), but got on the device the error alert:
    "Uncompiled ActionScript
    Your application is attempitng to run
    uncompiled ActionScript, probably
    due to the use of an embedded
    SWF. This is unsupported on iOS.
    See the Adobe Developer
    Connection website for more info."
    Then I changed the FB compiler switches, now are set to:
    -locale en_US
    -swf-version=19
    Please note that without the switch    -swf-version=19     the application is compiled correctly and the IPA is sent to the device
    and I can debug it, but iOS traps secondary SWF files and blocke the app usage, as previously told.
    they work on deploy of small applications,
    but, when I try to build a big IPA file either for an ad-hoc distribution, either for an debug on device, after some minutes long waiting, I get a Java stuck, with this trace:
    Error occurred while packaging the application:
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.util.HashMap.addEntry(HashMap.java:753)
        at java.util.HashMap.put(HashMap.java:385)
        at java.util.HashSet.add(HashSet.java:200)
        at adobe.abc.Algorithms.addUses(Algorithms.java:165)
        at adobe.abc.Algorithms.findUses(Algorithms.java:187)
        at adobe.abc.GlobalOptimizer.sccp(GlobalOptimizer.java:4731)
        at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:3615)
        at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:2309)
        at adobe.abc.LLVMEmitter.optimizeABCs(LLVMEmitter.java:532)
        at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:341)
        at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcodeImpl(AOTCompiler .java:599)
        at com.adobe.air.ipa.BitcodeGenerator.main(BitcodeGenerator.java:104)
    I've tried to change the Java settings on FB's eclipse.ini in MacOS folder,
    -vmargs
    -Xms(various settings up to)1024m
    -Xmx(various settings up to)1024m
    -XX:MaxPermSize=(various settings up to)512m
    -XX:PermSize=(various settings up to)256m
    but results are the same.
    Now settings are back as recommended:
    -vmargs
    -Xms256m
    -Xmx512m
    -XX:MaxPermSize=256m
    -XX:PermSize=64m
    I've changed the Flex build.properties
    jvm.args = ${local.d32} -Xms64m -Xmx1024m -ea -Dapple.awt.UIElement=true
    with no results; now I'n get back to the standard:
    jvm.args = ${local.d32} -Xms64m -Xmx384m -ea -Dapple.awt.UIElement=true
    and now I truely have no more ideas;
    could anyone give an help?
    many thanks in advance.

    I solved this. It turns out the app icons were corrupt. After removing them and replacing them with new files this error went away.

  • Exception in thread "main" java.lang.OutOfMemoryError(please help me )

    Hi All
    here my java class trying to read a txt file(which is having size of 60MB).and putting each line into a Vector class. problem is ,upto certain number of line it is reading properly and putting into vector..after that it is giving error like Exception in thread "main" java.lang.OutOfMemoryError..what is the problem and how to rectify this one..anybody help me on this.
    actual situation is one txt is there in that 80 lakhs of lines of content is there..java file trying to read each line and put it into vector or stringbuffer and split it into two lines like key=value and put it into hashmap object.then finally iam creating new file(.properties) and writing these hashmap data on it. if you want clearly..please look into below code..
    package test.utf8; import java.io.*; import java.util.*; public class AssetUtils
    //static StringBuffer stringbuffer = new StringBuffer();
    public AssetUtils()
    public static void main(String args[]) throws IOException
    BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(new FileInputStream("D:\\list.txt")));
    Vector vector = new Vector(0x30D40, 50000);
    System.out.println(vector.capacity());
    Object obj = null;
    int n=0;
    System.out.println("Reading list:" + new Date(System.currentTimeMillis()));
    do
    String s = bufferedreader.readLine();
    //System.out.println("line no: "+ ++n);
    if(s == null)
    break;
    vector.add(s);
    } while(true);
    System.out.println("List Read complete:" + new Date(System.currentTimeMillis()));
    String s1 = args[0];
    System.out.println("S1: "+s1);
    System.out.println(vector.capacity());
    HashMap hashmap = new HashMap();
    System.out.println( "Vector.Size..>>>>>>>>>>>>>>>>.."+vector.size());
    for(int i = 0; i < vector.size(); i++)
    System.out.println("i value:"+i);
    String s2 = (String)vector.get(i);
    //System.out.println("S2: "+s2);
    if(s2.indexOf("/") != -1)
    String s3 = s2.substring(s1.length(), s2.length());
    //System.out.println("S3: "+s3);
    if(s3.indexOf("/") != -1) {
    String s4 = s3.substring(0, s3.lastIndexOf("/"));
    //System.out.println("S4: "+s4);
    String s6 = s3.substring(s3.lastIndexOf("/") + 1, s3.length());
    //System.out.println("S6: "+s6);
    StringBuffer stringbuffer=null;
    stringbuffer = new StringBuffer();
    String s8 = (String)hashmap.get(s4);
    //System.out.println("S8: "+s8);
    if(s8 != null) stringbuffer.append(s8 + "," + s6);
    else
    stringbuffer.append(s6);
    hashmap.put(s4, stringbuffer.toString());
    //stringbuffer.delete(0,stringbuffer.length());
    stringbuffer=null;
    System.out.println("Opening asset.properties:" + new Date(System.currentTimeMillis()));
    File file = new File("D:\\asset.properties");
    PrintWriter printwriter = new PrintWriter(new FileOutputStream(file));
    String s5;
    String s7;
    for(Iterator iterator = hashmap.keySet().iterator(); iterator.hasNext(); printwriter.println(s5 + "=" + s7))
    { s5 = (String)iterator.next(); s7 = (String)hashmap.get(s5); } printwriter.close();
    System.out.println("Closing asset.properties:" + new Date(System.currentTimeMillis()));

    Theres a number of ways you can improve your memory usage:
    1) Build you map as you read in your file.
    2) Use StringBuffers in your map - do not use "asshaj" + "ashaskj" This is very memory intensive
    If you still run out of memory try running the JVM using -Xms128m -Xmx512m or higher

  • FB 4.7 iOS packaging - Exception in thread "main" java.lang.OutOfMemoryError"

    I have been having issues with FlashBuilder 4.7 and packaging my Flex Mobile application for iOS (simulator, or for install on device).
    The funny thing is it used to work just fine before a OSX system update.
    My machine is Macbook Pro, 2.66 GHz i7, Mac OSX Lion 10.7.5, 8GB
    When I run application to install on device I get the error...
    Error occurred while packaging the application:
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
              at com.adobe.png.PNGReader.readChunk(PNGReader.java:60)
              at com.adobe.png.PNGUtils.updatePNGMetadata(PNGUtils.java:56)
              at com.adobe.air.ipa.IPAOutputStream.addFile(IPAOutputStream.java:700)
              at com.adobe.air.ADTOutputStream.addFileFromStream(ADTOutputStream.java:307)
              at com.adobe.air.ADTOutputStream.addFileFromStream(ADTOutputStream.java:300)
              at com.adobe.air.ipa.IPAOutputStream.addSpecialIcon(IPAOutputStream.java:272)
              at com.adobe.air.ipa.IPAOutputStream.addFile(IPAOutputStream.java:256)
              at com.adobe.air.ApplicationPackager.createPackage(ApplicationPackager.java:72)
              at com.adobe.air.ipa.IPAPackager.createPackage(IPAPackager.java:245)
              at com.adobe.air.ADT.parseArgsAndGo(ADT.java:571)
              at com.adobe.air.ADT.run(ADT.java:419)
              at com.adobe.air.ADT.main(ADT.java:469)
    I have tried uninstalling/ reinstalling Flash Builder 4.7 multiple times
    I get this error no matter which AIR SDK I am using, 3.1, 3.4, 3.5, 3.6.
    I get this error with a blank fresh project.
    Please anyone, can you help me solve this.

    I solved this. It turns out the app icons were corrupt. After removing them and replacing them with new files this error went away.

  • Error of compilation for IOS: Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded

    Error of compilation for an IOS project:
    Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
    at adobe.abc.Algorithms$SetMap.get(Algorithms.java:226)
    at adobe.abc.Algorithms$ExprWorkQueue.add(Algorithms.java:491)
    at adobe.abc.Algorithms$ExprWorkQueue.addAll(Algorithms.java:524)
    at adobe.abc.GlobalOptimizer.sccp_analyze(GlobalOptimizer.java:6007)
    at adobe.abc.GlobalOptimizer.sccp(GlobalOptimizer.java:4733)
    at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:3615)
    at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:2309)
    at adobe.abc.LLVMEmitter.optimizeABCs(LLVMEmitter.java:534)
    at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:343)
    at com.adobe.air.ipa.GOAOTCompiler.convertAbcToLlvmBitcodeImpl(GOAOTCompiler.java:243)
    at com.adobe.air.ipa.BitcodeGenerator.main(BitcodeGenerator.java:85)
    Compilation failed while executing : ADT
    We allocate 4GB of memory for the compilator and the results is the same. The build is very long (~5 min)

    See if this helps
    OutOfMemoryError: GC overhead limit exceeded when heap is just fine
    regards
    Pravin

  • J2ee server Exception in thread Main java.lang.OutOfMemoryError

    hallo
    i need your help
    first my java j2ee and jdk
    j2ee j2sdkee1.3.1
    jdk j2sdk 1.4
    i nedd the server for jms.
    when i started the server with j2ee -verbose
    i get the error message:
    Starting web service at port: 8000
    Exception in thread "Main" java.lang.OutOfMemoryError
    what can i do to get out off this error message and starting the server normal. please help me to solve the problem!!!
    i read in this forum about -Xms und Xmx but this Commands don't go on my system.
    thx for help!!!

    Hi Warren,
    Still I am not clear with your question. But generally this out of memoryspace error can be rectified by changing the properties which comes in the menubar of your command prompt. Then increasing the virtual memory over there. I hope this will help you.
    Thanks
    Bakrudeen
    Technical Support Engineer
    Sun MicroSystems Inc, India

  • Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

    i have a huge XML file of size 9 MB. I need to parse it and store it in a MYSQL database. When i execute the program, it throws me out of memory error and only 12668 rows have been inserted into the database. I use SAX parser to parse the XML. i have also given the stack trace of the error below. Kindly let me know how to resolve the issue.
    I have also changed the JAVA_OPTS to -Xms128m -Xmx512m but this didnt solve the issue.
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at java.util.jar.Manifest$FastInputStream.<init>(Unknown Source)
    at java.util.jar.Manifest$FastInputStream.<init>(Unknown Source)
    at java.util.jar.Manifest.read(Unknown Source)
    at java.util.jar.Manifest.<init>(Unknown Source)
    at java.util.jar.JarFile.getManifestFromReference(Unknown Source)
    at java.util.jar.JarFile.getManifest(Unknown Source)
    at sun.misc.URLClassPath$JarLoader$2.getManifest(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:430)
    at com.mysql.jdbc.PreparedStatement.getInstance(PreparedStatement.java:561)
    at com.mysql.jdbc.ConnectionImpl.clientPrepareStatement(ConnectionImpl.java:1395)
    at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4178)
    at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4077)
    at DBManager.insertSchedules(DBManager.java:30)
    at EPGParser.startElement(EPGParser.java:71)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)

    Check your code where u set the connection query; there's a procedure in my DBConnection class, looks like this:
         public void setQuery(String query) throws SQLException {          
              this.query = conn.prepareStatement(query);
    Should look the same for u, at least similar.
    I set the query this way: dbConn.setQuery("insert into groups (id, code, sectionID, languageID, year, no_students) values (?,?,?,?,?,?)");
    I had to insert 24,827 records into a table, and it throws the heap space exception u mentioned when it reaches 12,667. So what i did was to put dbConn.setQuery(...) outside the loop, and inside the loop it remains to set the parameters and execute the query from connection. It works for me. Hope will help u save some memory space.

  • How do I stop "Exception in thread "main" java.lang.OutOfMemoryError.java heap space

    I'm trying to rebuild my iPhone app, with hires graphics etc, using CS6 Flash Pro. However, I get this now,
    Exception in thread "main" java.lang.OutOfMemoryError.java heap space .....  followed by a lot of location information related to the error.
    Now, how do I increase the java memory allowances if that's the problem. I've already upp the jvm.ini file from 128 to 512. No difference.
    I'm based on
    Win8, 8GB RAM, x64
    I'm obviously asking it to load a lot of resources - but hey, Flahs should be able to handle it right?
    thanks if anyone can help

    Hmmm. Maybe I was doing something wrong with images, and icons. I'm not sure, as it's not at all clear really.
    This is the Icons screen from CS6, can't see the files above 512x512unless scrolling up - 29x29,57x57,114x114.  no matter.
    So - after reading and rereading the Apple specs and directions, I removed the 512x512 and the 1024x1024 images from the Icons list that get pulled in during build.
    Next, I again re-read the Apple directives, and put the required files for the build into the base directory of the build, as per this image.
    In actual fact - I can probably leave out the last two. iTunesArtwork.xxx But I don't know, because it is entirely unclear on that point. I can find no directive regarding this at all.
    Do I upload them myself? Probably? I don't know.
    HOWEVER.
    The build now completes. Java, or something, was very confused about finding that file called 1024x1024.png in the build list, and would not do it.
    Take it out of icons, built fine. Put it in the icons directory, and crash...
    Now - with the setup I am using, it all builds fine for ipad and iphone, in all resolutions.
    I don't know what the problem is with what Java is seeing, but this fixes it it seems.
    Hope that helps anyone else.
    cheers

  • Keytool throwing  Exception in thread "main" java.lang.OutOfMemoryError:

    Hello all.
    I am unable to run keytool as it throws the following error. I am running Vista(x86),JDK 1.6 with a system with 4G of ram.
    Any idea's how i would solve this? I have tried installing other JDK's with the same results.
    Thanks in advance.
    C:\Users\Gav>"c:\Program Files\Java\jdk1.6.0_07\bin"\keytool -genkey -alias andr
    oiddebugkey -keyalg RSA -validity 365 -keypass android -keystore debug.keystore
    -storepass android
    What is your first and last name?
      [Unknown]:  a
    What is the name of your organizational unit?
      [Unknown]:  b
    What is the name of your organization?
      [Unknown]:  c
    What is the name of your City or Locality?
      [Unknown]:  d
    What is the name of your State or Province?
      [Unknown]:  e
    What is the two-letter country code for this unit?
      [Unknown]:  fs
    Is CN=a, OU=b, O=c, L=d, ST=e, C=fs correct?
      [no]:  yes
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
            at java.io.WinNTFileSystem.list(Native Method)
            at java.io.File.list(File.java:973)
            at sun.security.provider.SeedGenerator$1.run(SeedGenerator.java:166)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.security.provider.SeedGenerator.getSystemEntropy(SeedGenerator.java:146)
            at sun.security.provider.SecureRandom.engineNextBytes(SecureRandom.java:170)
            at java.security.SecureRandom.nextBytes(SecureRandom.java:433)
            at java.math.BigInteger.randomBits(BigInteger.java:475)
            at java.math.BigInteger.<init>(BigInteger.java:464)
            at java.math.BigInteger.largePrime(BigInteger.java:596)
            at java.math.BigInteger.probablePrime(BigInteger.java:538)
            at sun.security.rsa.RSAKeyPairGenerator.generateKeyPair(RSAKeyPairGenerator.java:105)
            at java.security.KeyPairGenerator$Delegate.generateKeyPair(KeyPairGenerator.java:656)
            at sun.security.x509.CertAndKeyGen.generate(CertAndKeyGen.java:131)
            at sun.security.tools.KeyTool.doGenKeyPair(KeyTool.java:1156)
            at sun.security.tools.KeyTool.doCommands(KeyTool.java:786)
            at sun.security.tools.KeyTool.run(KeyTool.java:172)
            at sun.security.tools.KeyTool.main(KeyTool.java:166)

    See http://bugs.sun.com/bugdatabase/view_bug.do;?bug_id=6474350
    It seems that one way used by SecureRandom to gather entropy is to scan the directory pointed at by java.io.tmpdir. If it is very full, it runs out of memory. Clean you Local Settings\Temp directory.

  • Incorrect XPath:,Exception in thread "main" java.lang.OutOfMemoryError:

    Hi All,
    We are having a Java Concurrent Program with Output as "Text" format.
    We are encountered with the below error.
    Can anyone help me on this..
    Incorrect XPath: (((not(CF_SO_LINK!=''))or CF_ITEM_TYPE='SATO' or(CF_ITEM_TYPE='ATO' and CF_ITM_TP_CD!='CONFIG')or (not(CF_ATO_LINE_ID!='')and CF_TOP_MDL_ID!='' and(CSHIP='Y' or CINV='Y'))or CF_ITEM_TYPE='EXT_WRT')an d CF_FLOW_ST_CD!='CANCELLED')or SALES_LINE_ID='' Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOfRange(Arrays.java:3209) at java.lang.String.<init>(String.java:216) at java.lang.StringBuffer.toString(StringBuffer.java:585) at oracle.apps.xdo.batch.BurstingProcessorEngine.applyGroupBreak(BurstingProcessorEngine.java:2315) at oracle.apps.xdo.batch.BurstingProcessorEngine.globalDataEndElement(BurstingProcessorEngine.java:1983) at oracle.apps.xdo.batch.BurstingProcessorEngine.endElement(BurstingProcessorEngine.java:1135) at oracle.xml.parser.v2.XMLContentHandler.endElement(XMLContentHandler.java:196) at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1212) at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301) at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268) at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:201) at oracle.apps.xdo.batch.BurstingProcessorEngine.burstingRequest(BurstingProcessorEngine.java:2177) at oracle.apps.xdo.batch.BurstingProcessorEngine.burstingEndElement(BurstingProcessorEngine.java:1809) at oracle.apps.xdo.batch.BurstingProcessorEngine.endElement(BurstingProcessorEngine.java:1138) at oracle.xml.parser.v2.XMLContentHandler.endElement(XMLContentHandler.java:196) at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1212) at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301) at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268) at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:201) at oracle.apps.xdo.batch.BurstingProcessorEngine.burstingConfigParser(BurstingProcessorEngine.java:979) at oracle.apps.xdo.batch.BurstingProcessorEngine.process(BurstingProcessorEngine.java:913) at oracle.apps.xdo.batch.DocumentProcessor.process(DocumentProcessor.java:214) at
    Thanks
    gt1982

    i m getting Exception in thread "main"
    java.lang.OutOfMemoryError,
    please help meHow?
    You are leaking memory or attempting to use to much. There is a bug in your code.

  • Exception in thread "main" java.lang.NoSuchMethodError: com.sun.xml.wss.con

    Hi everyone,
    Just now i tried to run the 'simple' example in an JAXRPC Security part in the JWSDP 1.4 tutorial but got the following error:
    run-sample:
    [echo] Running the simple.TestClient program....
    [java] Service URL=http://localhost:8080/securesimple/Ping
    [java] Exception in thread "main" java.lang.NoSuchMethodError: com.sun.xml.wss.configuration.SecurityConfigurationXmlReader.readJAXRPCSecurityConfigurationString(Ljava/lang/String;Z)Lcom/sun/xml/wss/configuration/JAXRPCSecurityConfiguration;
    [java]      at com.sun.xml.rpc.security.SecurityPluginUtil.<init>(SecurityPluginUtil.java:128)
    [java]      at simple.PingPort_Ping_Stub.<clinit>(PingPort_Ping_Stub.java:40)
    [java]      at simple.PingService_Impl.getPing(PingService_Impl.java:68)
    [java]      at simple.TestClient.main(TestClient.java:27)
    Can anybody give me a clue?

    Vishal, thanks a lot for your reply. I used the App Server 2004Q4 beta and got the problem. When I switch to version 8.0.0_01 the things work well.
    But now I'm trying to understand this example and creating my own simple web app using encryption feature. From the files in the example dicrectory I can figure out the security applied at client by examining client stub files generated by the wscompile in the asant gen-client task. But I wonder when security is added to the server side. Is it when we use wsdeploy with the model part specifiedin jaxrpc-ri.xml? What is the procedure to apply the security to the web service?
    The last thing I want to ask is whether the deploytool bundled inside App Server can do the same things as ant task (eg. wsdeploy with some arguments).

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

    When I try to run this program, I get the error, the program is supposed to display 400 prime numbers. Is it because of the system I am running it on?
    System: OSX, 256 Ram, 1.25GHz,

    Hi,
    Please refer to the following note in Metalink , This may solve your problem.
    Note:315477.1 : XML Report Publisher Fails With java.lang.OutOfMemoryError
    Kind Regards,
    Mahi

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

    Am using java 1.3.1 on Red Hat Linux 7.1
    i get this error
    Exception in thread "main" java.lang.NoClassDefFoundError
    while running a simple program HelloWorld.java
    help

    When you use the "java" command, the only required argument is the name of the class that you want to execute. This argument must be a class name, not a file name, and class names are case sensitive. For example, "java HelloWorld.java" won't work because the class name isn't HelloWorld.java, it's HelloWorld. Similarly, "java helloworld" won't work because a class defined as "public class HelloWorld {" is not named helloworld due to case sensitivity. Finally, the .class file must be in a directory that is in the Classpath - that's where java.exe searches to find the file that contains the class.

  • Exception in thread "main" java.lang.NoClassDefFoundError: Helloworld

    Hi Java Experts,
    I am at a lost to how Java searches for all the classes when running a program. Below are the following steps I have taken to try a simple basic HelloWorld.java program on the command prompt on Windows XP (SP2) platform:
    ( i ) Installed both jdk1.5.0_09 and Netbeans IDE 5.0 and working properly.
    ( ii ) The source file is located in F:\Documents and Settings\abc\HeadFirstDesignPattern\src\ch11 and the compiled file is in F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes\ch11 which was compiled in Netbeans.
    ( iii ) No problem compiling & running this program in Netbeans.
    ( iv ) The RUN CLASSPATH in Netbeans is F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes.
    ( v ) No CLASSPATH variable has been set.
    ( vi ) The HelloWorld program looks like this:
    package ch11;
    public class HelloWorld {
    public static void main(String[] args) {
    System.out.println("Hello World!");
    ( vi ) Got the message
    "Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld"
    when running a combination of the following Java commands:
    ( a ) cd F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes
    ( b ) java HelloWorld, or
    java -cp . HelloWorld or java -cp "." HelloWorld, or
    java -cp F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes HelloWorld or "F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes" HelloWorld, or
    java -cp F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes;. HelloWorld or "F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes";. HelloWorld, or
    java -cp "F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes";. HelloWorld or "F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes";"." HelloWorld, or
    java -cp "F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes";. HelloWorld or "F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes";"." ch11\HelloWorld.
    It is the package location which is a subdirectory of F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes which caused Java not to find this program. I had no problem running it if the HelloWorld.java was moved one level up. ie from F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes\ch11 to F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes.
    I have written Java in the last year mostly on Netbeans without any problem running them.
    The reason for having to learn to run Java on the command line is so that I could add arguments to the program which I couldn't do in Netbeans just yet.
    I have gone through a lot of the articles from Java forums, Google searches but yet to have found a solution.
    Many thanks,
    Netbeans Fan

    I am getting the same problem when running the same program on a Fedora 4.0 (Redhat Linux 10) system, together with Netbeans 5.5 and JDK1.5.0_09. Again, I have no such problem when running the same program in Netbeans.
    Here are the steps that I have taken as follows:
    $ hostname
    spisu07.stvincents.com.au
    $ uname -a
    Linux spisu07.stvincents.com.au 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686
    $ pwd
    /home/dbi/HeadFirstDesignPattern/build/classes/ch11a
    $ cd ..
    $ pwd
    /home/dbi/HeadFirstDesignPattern/build/classes
    $ ls
    ch11a
    $ ls ch11a
    GumballMachine.class GumballMonitor.class NoQuarterState.class State.class
    GumballMachineRemote.class GumballMonitorTestDrive.class SoldOutState.class WinnerState.class
    GumballMachineTestDrive.class HasQuarterState.class SoldState.class
    $ java -cp . ch11a.GumballMachineTestDrive
    Exception in thread "main" java.lang.NoClassDefFoundError: while resolving class: ch11a.GumballMachineTestDrive
    at java.lang.VMClassLoader.transformException(java.lang.Class, java.lang.Throwable) (/usr/lib/libgcj.so.6.0.0)
    at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.6.0.0)
    at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.6.0.0)
    at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.6.0.0)
    at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
    Caused by: java.lang.ClassNotFoundException: java.lang.StringBuilder not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./,file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
    at java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0)
    at java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgcj.so.6.0.0)
    at java.lang.ClassLoader.loadClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0)
    at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.6.0.0)file:///usr/share/doc/HTML/index.html
    ...4 more
    $ echo $PATH
    /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/opt/netbeans-5.5/bin:/etc/alternatives/.:/opt/netbeans-5.5/bin:/opt/jdk1.5.0_09:/etc/alternatives/.
    $ echo $JAVA_HOME
    $ echo $CLASSPATH
    Any suggestions?
    Thanks,
    Henry

  • Stuck for 2 days: Exception in thread "main" java.lang.NoClassDefFoundError

    I wrote the code in netbeans 5.5 under windows XP and compiled perfectly. I tried to run the generated Jar file code in the command prompt and it did work perfectly.
    C:\Datahub\dist> java -jar Datahub.jar
    BUT when I took the jar file and tried to run it under linux here is what I got:
    Exception in thread "main" java.lang.NoClassDefFoundError: while resolving class: main.hw
    at java.lang.VMClassLoader.transformException(java.lang.Class, java.lang.Throwable) (/usr/lib/libgcj.so.6.0.0)
    at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.6.0.0)
    at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.6.0.0)
    at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.6.0.0)
    at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
    Caused by: java.lang.ClassNotFoundException: java.lang.StringBuilder not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:Datahub.jar,file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
    at java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0)
    at java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgcj.so.6.0.0)
    at java.lang.ClassLoader.loadClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0)
    at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.6.0.0)
    ...4 more
    The project i am working on is funded by IBM and they will be really mad if it didn't work :(
    Please help.

    It is not clear what You want to run under Linux. Jar under JVM or native code? If You are going to use JVM make it clear for Yourself which one You are going to use and then make sure it is installed properly.

Maybe you are looking for