facebook

OutOfMemoryError: Java heap space when deploying to WAS 8.5

  1. MyEclipse IDE
  2.  > 
  3. WebSphere Development
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #329834 Reply

    jm01
    Member

    myEclipse Blue 10.6

    OutofMemory occurs when deploying a war file from MyEclipse Blue v10.6 to a Websphere application server v8.5 server using Add Deployment.

    QUESTION: How I can increase the -Xms256m and -Xmx256m in the MyEclpse blue generated cmdline in order to deploy a large application (see MyEclipe Blue generated cmdline below)

    DEPLOYMENT LOG:

    JVMDUMP039I Processing dump event “systhrow”, detail “java/lang/OutOfMemoryError” at 2012/09/04 11:24:39 – please wait.
    JVMDUMP032I JVM requested System dump using ‘C:\Apps\MYECLIPSE BLUE EDITION\MyEclipse Blue Edition 10\core.20120904.112439.3516.0001.dmp’ in response to an event

    JVMDUMP013I Processed dump event “systhrow”, detail “java/lang/OutOfMemoryError”.
    Exception in thread “Bundle File Closer” java.lang.OutOfMemoryError: Java heap space
    at java.util.zip.ZipFile.close(Native Method)
    at java.util.zip.ZipFile.close(ZipFile.java:420)
    at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.close(ZipBundleFile.java:313)
    at org.eclipse.osgi.baseadaptor.bundlefile.MR Blue Edition\Common\plugins…

    DEFINITIONS:

    myeclipse-blue.ini

    #utf8 (do not remove)
    -startup
    ../Common/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
    –launcher.library
    ../Common/plugins/org.eclipse.equinox.launcher.i18n.win32.win32.x86_64_4.2.0.v201201111650
    -install
    C:\Apps\MyEclipse Blue Edition\MyEclipse Blue Edition 10
    -vm
    C:\Apps\MyEclipse Blue Edition\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\bin\javaw.exe
    -configuration
    C:\Apps\MyEclipse Blue Edition\MyEclipse Blue Edition 10\configuration
    -vmargs
    -Xms256M
    -Xmx768m
    -XX:MaxPermSize=384m
    -XX:ReservedCodeCacheSize=64m
    -Dosgi.nls.warnings=ignore

    WEBSPHERE APPLICATION SERVER

    initialHeapSize=”256″ maximumHeapSize=”2048″ genericJvmArguments=”-Xshareclasses”

    MYECLIPSE BLUE GENERATED CMDLINE:

    The following cmdline is found in the Javacore…txt dump

    1CICMDLINE C:\Apps\IBM\WebSphere\AppServer\java\bin\java -Djava.endorsed.dirs=C:\Apps\IBM\WebSphere\AppServer\endorsed_apis;C:\Apps\IBM\WebSphere\AppServer\java\jre\lib\endorsed -Dcmd.properties.file=C:\Apps\IBM\WebSphere\AppServer\profiles\ZZZ\temp\wsadmin.1586\wsadmin.properties -Xms256m -Xmx256m -Xquickstart -Djava.util.logging.manager=com.ibm.ws.bootstrap.WsLogManager -Djava.util.logging.configureByServer=true -Dcom.ibm.SOAP.ConfigURL=file:C:\Apps\IBM\WebSphere\AppServer\profiles\ZZZ/properties/soap.client.props -Djava.security.auth.login.config=C:\Apps\IBM\WebSphere\AppServer\profiles\ZZZ/properties/wsjaas_client.conf -Dcom.ibm.CORBA.ConfigURL=file:C:\Apps\IBM\WebSphere\AppServer\profiles\ZZZ/properties/sas.client.props -Dcom.ibm.SSL.ConfigURL=file:C:\Apps\IBM\WebSphere\AppServer\profiles\ZZZ/properties/ssl.client.props -Duser.install.root=C:\Apps\IBM\WebSphere\AppServer\profiles\ZZZ -Dwas.install.root=C:\Apps\IBM\WebSphere\AppServer com.ibm.wsspi.bootstrap.WSPreLauncher -nosplash -application com.ibm.ws.bootstrap.WSLauncher com.ibm.ws.admin.services.WsAdmin -conntype NONE -f C:\Apps\MyEclipse Blue Edition\Common\plugins\com.genuitec.eclipse.blue.websphere85_9.0.0.me201205210617\installWebModule.jacl C:\\Apps\\IBM\\WebSphere\\AppServer\\profiles\\ZZZ\\installableApps\\zzz.war Node01 server1 /zzz zzz {{“zzz.war” “zzz.war,WEB-INF/web.xml” default_host}} {{.* .* AppDeploymentOption.Yes 1}} zzz.war false

    Any ideas? . Thanks in advance.

    #329850 Reply

    support-swapna
    Moderator

    jm01,

    Sorry that you are seeing this issue.

    Can you answer some more questions for us ?

    1) What installation of WAS 8 are you using? Is this the developer edition or the complete production version?

    2) What deployment mode are you using for your application? Classic, Enhanced or In-workspace? If you are not deploying using in-workspace deployment, can you check if deploying using the In-Workspace mode helps ?

    3) How large is your application (approximately, if, for instance, you had exported it as an EAR) ? Can you check if the application can be deployed without any issues to WAS 8.5 outside of MyEclipse Blue ?

    4) You need to increase the maxHeap setting of the JVM from the WAS console.

    5) If you have jars from classpath being packaged into EAR/WAR , Please modify workspace preferences. Go to: Window > Preferences > MyEclipse > Java Enterprise Projects > Web Project. Here you should uncheck option “JARs from the build path”. This should prevent MyEclipse from packing runtime (and any other from the classpath) Jars into EAR.

    in case, that you have some others jars attached to the build path, you have two options:
    1. You can use “Deployment assembly” to specify what and where should be packed into war (Project > Properties > MyEclipse > Deployment Assembly)
    2. You can create User Library for WebSphere Runtime. Go to: Window -> Preferences -> Java -> Build Path -> User Libraries, configure User Library and add it to project path (Project -> Properties > Java build path -> Libraries -> Add library -> Select User library). Go once again to Deployment Settings (Window > Preferences > MyEclipse > Java Enterprise Projects > Web Project) and uncheck “Jars from users libraries” and “User library jars exported from dependent java projects” making sure, that two others are checked, in that case.

    Let us know how it works for you.

    #329862 Reply

    jm01
    Member

    Hi,

    Thanks for your reply,

    1. WAS v8.5 Developer edition

    2. Classic, when I try “in-workspace” deployment I receive the following message:
    “No projects are available for deployment to this server. Either they all have already been deployed to this server or no deployable projects have been found.” The war is created using Run as Maven build.

    3. A war of 48MB. The application work correctly when deployed using WAS console.

    4. I have initialHeapSize=”256″ maximumHeapSize=”2048″ for the JVM in WAS.

    5. Option “JARs from the build path is “uncheck”. Jars under …/lib is our preferred option.

    Question

    When I deploy I can see a java.exe process running and generate the heap dump when 256M is reached. Is there a way to increase the max heap size when the command is passed from MyEclipse to WAS for the application deployment?

    1CICMDLINE C:\Apps\IBM\WebSphere\AppServer\java\bin\java -Djava.endorsed.dirs=C:\Apps\IBM\WebSphere\AppServer\endorsed_apis;C:\Apps\IBM\WebSphere\AppServer\java\jre\lib\endorsed -Dcmd.properties.file=C:\Apps\IBM\WebSphere\AppServer\profiles\ZZZ\temp\wsadmin.1586\wsadmin.properties -Xms256m -Xmx256m -Xquickstart –

    #329904 Reply

    support-swapna
    Moderator

    jm01,

    Thank you for the details.

    1. Can you please run versionInfo.bat from bin directory of WAS installation and paste the details here to help us get more information about the server ?

    2. The In-workspace deployment mode works only with EARs, so you need to put Web project into EAR and only then deploy.

    3. Can you please try creating a WAR using our “Export WAR (MyEclipse)” wizard ( right click on the project -> Export ) and compare it’s contents with those created by Maven ?

    Let us know your how it works.

    #329910 Reply

    jm01
    Member

    I increase the -Xmx256m in ..\IBM\WebSphere\AppServer\bin\wsadmin.bat cmd file and it seems to work.

    Thanks,

    #329934 Reply

    support-swapna
    Moderator

    jm01,

    Glad that it is working.
    Do let us know if you see any issues.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: OutOfMemoryError: Java heap space when deploying to WAS 8.5

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.

You must be logged in to post in the forum log in