Problem with java.lang.OutOfMemoryError

hi
i am developping a web application
i am using jfreechart in my jsf application to generate statistic diagrams
to update my diagrams i am calling the methode ChartUtilities.saveChartAsPNG(file1, chart, 400, 300, null) every 10 seconds
my application become more and more slow and the cpnsommatio of memory is more and more important until getting this exception:
javax.faces.el.EvaluationException: java.lang.OutOfMemoryError: Java heap space
     at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
     at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
     at javax.faces.component.UICommand.broadcast(UICommand.java:387)
     at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:55)
     at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
     at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
     at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
     at org.ajax4jsf.component.AjaxViewRoot.processDecodes(AjaxViewRoot.java:409)
     at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
     at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
     at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at TimeoutFilter.doFilter(TimeoutFilter.java:64)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
     at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
     at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
     at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
     at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.OutOfMemoryError: Java heap space
     at java.awt.image.DataBufferInt.<init>(Unknown Source)
     at java.awt.image.Raster.createPackedRaster(Unknown Source)
     at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)
     at java.awt.image.BufferedImage.<init>(Unknown Source)
     at org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1407)
     at org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1389)
     at org.jfree.chart.ChartUtilities.writeChartAsPNG(ChartUtilities.java:183)
     at org.jfree.chart.ChartUtilities.saveChartAsPNG(ChartUtilities.java:320)
     at SWIMLogStatistiques.generateChartMethod(SWIMLogStatistiques.java:98)
     at SWIMmoduleStatistiques.generateChartMethod(SWIMmoduleStatistiques.java:39)
     at ListModules.mesServicesAttributs(ListModules.java:199)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     at java.lang.reflect.Method.invoke(Unknown Source)
     at org.apache.el.parser.AstValue.invoke(AstValue.java:172)
     at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
     at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
     at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
     at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
     at javax.faces.component.UICommand.broadcast(UICommand.java:387)
     at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:55)
     at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
     at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
     at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
     at org.ajax4jsf.component.AjaxViewRoot.processDecodes(AjaxViewRoot.java:409)
     at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
     at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
     at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
after doing some searches, i found that the solution is to change the memory allocated for the JVM but in my case, the memory consommed by my application is increasing along with time.
i think that the problem is with:*ChartUtilities.saveChartAsPNG(file1, chart, 400, 300, null);*:does this instruction consume a lot of memory and how can i resolve thos problem?

riadhhwajdii wrote:
i am using jfreechart in my jsf application to generate statistic diagrams
to update my diagrams i am calling the methode ChartUtilities.saveChartAsPNG(file1, chart, 400, 300, null) every 10 seconds
my application become more and more slow and the cpnsommatio of memory is more and more important until getting this exception:This bit (slowing down over several cycles of the code)..and this bit:
after doing some searches, i found that the solution is to change the memory allocated for the JVM but in my case, the memory consommed by my application is increasing along with time.(increasing memory simply delays the exception), are usually a pointer that you have a memory leak somewhere.
i think that the problem is with:*ChartUtilities.saveChartAsPNG(file1, chart, 400, 300, null);*:does this instruction consume a lot of memory and how can i resolve thos problem?Take some heap dumps (especially when the out of memory occurs) and stick them in a memory analyser. Just because the exception is being thrown during saveChartAsPNG() does not mean that's the culprit. All that means is it was the final straw.

Similar Messages

  • XML Publisher report failing with java.lang.outofmemoryerror.

    Hi,
    We have developed a custom Oracle report that produces an XML output file that is about 13M in size (about 18K rows from the database). When running report as concurrent request, post processing fails with java.lang.outofmemoryerror. The failure occurs when specifying output format as Excel, RTF or HTML. However, the process completes successfully when specifying output format as PDF. We have also noticed that Excel, RTF and HTML will complete successfully if the XML data file is smaller (around 3M).
    Is anyone aware of a restriction on the size of the XML data file when specifying output formats Excel, RTF or HTML? We have tried setting temp directory but that has not helped.
    Thanks.

    Hi
    I found this at metalink [Note:390968.1].. hope it helps =)
    Symptoms: When attempting to run an XML Publisher concurrent program the following error occurs:
    ERROR: Warning!!! Got out of memory exception, retrying with scalable option..
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    Oracle.apps.xdo.oa.cp.JCP4XDODataEngine
    Program exited with status 1
    Solution: To implement the solution, please execute the following steps:
    1. Login select the responsibility: System Administrator.
    2. Navigate to Concurrent > Program > Define.
    3. Query for concurrent program that is receiving the error.
    4. In the 'Options' field please enter -Xmx512M.
    5. Save the change and retest the issue.
    6. If the report still fails with the option set to -Xmx512M change the value to -Xmx1024M, save and try again
    7. Migrate the solution as appropriate to other environments.

  • Trouble with  "java.lang.OutOfMemoryError: Java heap space"

    Hello,
    I use a Java-based modeling tool that very few out there are probably familiar with. This tool allows me to run models (program) from within the development environment, to create Applets or create jar files that can be executed in a stand-alone fashion.
    I am using a database on my local harddrive to read in some data using JDBC, so am not using the Applet option with certificates. The development environment is expensive, so can't be distributed. That leaves the stand-alone option.
    The model (program) I've written runs perfectly fine in the development environment and, previously, has worked fine as a stand-alone program. However, the stand-alone option isn't working anymore, because I keep getting this error.
    I am not much of a Java programmer; I'm learning as I go along. If anyone can help me solve this, I'll be most appreciative
    From my cmd prompt:
    C:\Documents and Settings\072\Desktop\TA\for\for Applet Files>cd "C:\D
    ocuments and Settings\072\Desktop\TA\for\for Applet Files"
    C:\Documents and Settings\072\Desktop\TA\for\for Applet Files>java -cl
    asspath enterprise_library.jar;business_graphics_library.jar;for.jar;xjanylog
    ic5engine.jar for/Main$Simulation
    Started...
    AnyLogic simulation engine has started [$Id: Engine.java,v 1.134 2004/12/03 08:4
    9:39 basil Exp $]
    java.lang.OutOfMemoryError: Java heap space
    setting error: Exception during root.courseQueue-1556 startup: java.lang.OutOfMe
    moryError: Java heap space
    thread = Thread[Model Creation Thread,5,main]
    engine = com.xj.anylogic.Engine@1099257
    Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap spac
    e
    java.lang.OutOfMemoryError: Java heap space
    setting error: Exception during startup: java.lang.OutOfMemoryError: Java heap s
    pace
    thread = Thread[Model Creation Thread,5,main]
    engine = com.xj.anylogic.Engine@1099257
    java.lang.OutOfMemoryError: Java heap space
    setting error: Exception in statechart 'root.courseExit-0.inputProcessor' entry
    actions: java.lang.OutOfMemoryError: Java heap space
    thread = Thread[AnyLogic main thread,5,main]
    engine = com.xj.anylogic.Engine@1099257
    java.lang.OutOfMemoryError: Java heap space
    setting error: Exception in statechart 'root.courseDelay-0.inputProcessor' entry
    actions: java.lang.OutOfMemoryError: Java heap space
    thread = Thread[AnyLogic main thread,5,main]
    engine = com.xj.anylogic.Engine@1099257
    java.lang.OutOfMemoryError: Java heap space
    setting error: Exception in statechart 'root.courseDelay-1.inputProcessor' entry
    actions: java.lang.OutOfMemoryError: Java heap space
    thread = Thread[AnyLogic main thread,5,main]Exception in thread "AWT-EventQueu
    e-0"
    java.lang.OutOfMemoryError: Java heap space
    engine = com.xj.anylogic.Engine@1099257

    Hi I am ancountering the same problem with the 'heap space'.
    Is there any way I can find out what it is set to for my system? I dont believe its 32Mb and dont want to increase it randomly to too large a size if theres no need for it.
    Thanks,
    Bobby

  • XML Publisher report ends in Warning with java.lang.OutOfMemoryError

    Hi,
    We are modifying the standard report Account Analysis Report (in Subledger Accounting) to create a custom report.
    When run wide open, it is ending in Warning with the error java.lang.OutOfMemoryError in OPP Log.
    We are on EBS 12.1.3. DB 11.2.0.3 and XML Publisher 5.6.3
    We have set the below parameters in the data definition:
    Use XML Publishers XSLT processor: True
    Enable Scalable feature of XSLT processor: True
    Enable XSLT Runtime optimization: True
    Also we have added these to the Data template:
      <property name="db_fetch_size" value="20" />
      <property name="scalable_mode" value="on" />
    On the concurrent program, we have this option set:
    -ms1024m -mx2048m
    Still, the program is ending in Warning and not producing output. Any pointers here?
    We can also see that the Temporary Directory is not able to be set on the data definition. Why is this?
    After setting the Temporary Directory from Administration page, we were able to set the temporary directory for this data definition, but that did not solve the iseue.

    Glad you have sorted this - note that the fnd_concurrent_requests table has the fields pp_Start_date and pp_end_date which will show how long post processing is taking.
    Good to a good idea to monitor this in relation to the setting you have made in the profile option Concurrent:OPP Timeout profile option though 3 hours should cover most things!!!!

  • Dbca errors out with java.lang.OutOfMemoryError: Java heap space

    hi gurus
    I am trying to use DBCA to create a 10.2.0.4 database on a HP platform.DBCA hangs at the step 6 and following message can be seen in the
    trace.log:
    java.lang.OutOfMemoryError: Java heap space
    I googled and modified the DBCA scripts content from
    # Run DBCA
    $JRE_DIR/bin/java -Dsun.java2d.font.DisableAlgorithmicStyles=true -DORACLE_HOME=$OH -DDISPLAY=$DISPLAY -DJDBC_PROTOCOL=thin -mx128m
    -classpath $CLASSPATH oracle.sysman.assistants.dbca.Dbca $ARGUMENTS
    to
    # Run DBCA
    $JRE_DIR/bin/java -Dsun.java2d.font.DisableAlgorithmicStyles=true -DORACLE_HOME=$OH -DDISPLAY=$DISPLAY -DJDBC_PROTOCOL=thin -mx256m
    -classpath $CLASSPATH oracle.sysman.assistants.dbca.Dbca $ARGUMENTS
    and rerun the DBCA and the problem still there.
    How to solve this problem?
    Thanks !
    Edited by: KevinMao on Mar 31, 2010 2:39 AM
    Edited by: KevinMao on Mar 31, 2010 2:42 AM

    hi gurus
    The problem has sovled.I supplyed the wrong file for the rawfile.conf,everything was fine after I provided the corrent one.
    Thanks for your time.

  • J2EE engine restart with java.lang.OutOfMemoryError  Java heap space

    Hi
    I hope someone can help me, I have an error on my J2EE engine.
    My portal restarts only when I click on User - Administration - Identity Management.
    Here is the log error.
    Exception id: [000000000000005B0000001C0000098800045ACD637E87AB]#
    #1.5^H#0000000000000059000000690000098800045ACD6EF06673#1225738282886#com.sap.engine.frame.Environment##com.sap.engine.frame.
    Environment#J2EE_GUEST#0##host_SID_4130050#J2EE_ADMIN#40cf7230a9d811dda9f9000000000000#SAPEngine_Application_Thread[impl:3
    ]_13##0#0#Error#1#/System/Server/Critical#Plain###FATAL: Caught OutOfMemoryError! Node will exit with exit code 666#
    #1.5^H#00000000000000590000006A0000098800045ACD6EF06833#1225738282886#com.sap.engine.frame.Environment##com.sap.engine.frame.
    Environment#J2EE_GUEST#0##host_SID_4130050#J2EE_ADMIN#40cf7230a9d811dda9f9000000000000#SAPEngine_Application_Thread[impl:3
    ]_13##0#0#Fatal#1#/System#Java###FATAL: Caught OutOfMemoryError! Node will exit with exit code 666
    [EXCEPTION]
    #1#java.lang.OutOfMemoryError: Java heap space
            at java.lang.ClassLoader.defineClass0(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
            at com.sap.engine.services.deploy.server.ApplicationLoader.defineClassWithInterception(ApplicationLoader.java:168)
            at com.sap.engine.services.deploy.server.ApplicationLoader.loadLocalClass(ApplicationLoader.java:140)
            at com.sap.engine.frame.core.load.ResourceLoader.loadClass(ResourceLoader.java:127)
            at com.sap.engine.frame.core.load.ReferencedLoader.loadClass(ReferencedLoader.java:365)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
            at com.sap.security.core.wd.assignusermapping.wdp.InternalAssignUserMappingComp.<init>(InternalAssignUserMappingComp.
    java:173)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
            at com.sap.tc.webdynpro.progmodel.generation.ControllerHelper.createDelegate(ControllerHelper.java:74)
            at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.<init>(DelegatingComponent.java:51)
            at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:382)
            at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.createComponent(ClientComponent.java:940)
            at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.createComponent(ClientComponent.java:177)
            at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.createComponentInternal(ComponentUsage.java:149)
            at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.createComponent(ComponentUsage.java:116)
            at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.createInstanceIfDemanded(ComponentUsage.java:728)
            at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.getImplementingInterfaceViewInfo(ComponentUsage.java:403)
            at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.getViewManagerFor(ClientComponent.java:305)
            at com.sap.tc.webdynpro.progmodel.view.ViewManager.createUninitializedView(ViewManager.java:628)
            at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:694)
            at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:555)
            at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:724)
            at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:579)
            at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:155)
            at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:43)
            at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
            at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:709)
    Thanks for your help

    pretty obvious to me "java.lang.OutOfMemoryError: Java heap space"
    Read,
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/jsts/(Kernel)OOM
    or
    java.lang.OutOfMemoryError: Java heap space
    those links should give you a fairly good idea on how to solve the issue.
    Regards
    Juan

  • Help me please with java.lang.outofmemoryerror

    For anyone who considers themselves a java expert....could you please be of assistance? I have been chatting at www.bodyforlife.com for several weeks now and all the sudden I can't get in. I do know that other people are still able to get in as well. When I try to connect applet initializes and then says applet started when I try to enter then nothing happens. My java console says java.lang.outofmemoryerror. I have Windows 2000 and am running a Mcaffee firewall. Does anyone have any idea why I all the sudden can not get into this chat room? I have everything enabled that I know of. Any help would be much appreciated. Thanks.

    you need to make periodic writes to persistent storage. This is a common scalability issue. At some point you will always run out of memory.
    Increasing usable memory will not necessarily fix your problem. Maximum virtual memory is around 2GB on most Windows systems. If your entries take up more than "4 bytes" each, then you will never have enough memory.

  • Weblogic crashes with  java.lang.OutOfMemoryError: getNewTla.

    Hi,
    We have a clustered Weblogic environment and a custom WebCenter portal application is deployed on it.
    We are using JDev 11.1.1.5.0 and the Weblogic version we are using is 10.3.5.0
    We are frequently getting below error on either cluster. Can anyone help please?
    ExecuteRequest failed
    java.lang.OutOfMemoryError: getNewTla.
    java.lang.OutOfMemoryError: getNewTla
    at java.util.HashMap.newKeyIterator(HashMap.java:1024)
    at java.util.HashMap$KeySet.iterator(HashMap.java:1062)
    at java.util.HashSet.iterator(HashSet.java:153)
    at weblogic.cluster.messaging.internal.GroupImpl.getConfigInformation(GroupImpl.java:271)
    at weblogic.cluster.messaging.internal.GroupManagerImpl.findOrCreateGroupMember(GroupManagerImpl.java:198)
    at weblogic.cluster.messaging.internal.GroupManagerImpl.handleMessage(GroupManagerImpl.java:173)
    at weblogic.cluster.messaging.internal.ConnectionImpl$1.run(ConnectionImpl.java:139)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Regards,
    Kanchan

    Hi Kanchan,
    Few things you could do here is,
    1. Check GC logs to check if Garbage collector selected is able to release un-referenced objects. Logs will give you hint about possible memory leak.
    If you have not set debug GC logs then set it using -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintGC -Xloggc:/logs/server1_gclogs.txt
    2. Would prefer to take heap dump on OOM and use any tool like jhat or MAT to analyse. It will help in deciding if you require any performance tuning at JVM level. sometime it happens that heap space allocated is tool low causing OOM.
    For taking heap dump either set it as JAVA option - "*-XX:+HeapDumpOnOutOfMemoryError*"
    or
    using Sun tool "jmap"
    $ jmap –heap:format=b <pid>
    Thanks,
    Ranjan

  • Problems with java.lang.Class in JDK1.3

    Hi,
    I have 3 problems with the reflection in java.lang.Class:
    1) In the specification of method java.lang.Class.getDeclaredFields() is wrote:
    "Returns .... This includes public, protected, default (package) access, and private fields ..."
    This means, that all private fields should be return too. But some private methods are not given back. ????
    2) In java.lang.Class.getDeclaredMethods()
    some public methods are not return. ????
    3) In java.lang.Class.getDeclaredMethods()
    If Class is an interface. The same problem like 2) ????
    Are they errors of java.lang.Class in JDK1.3 ????
    Thanks & sincerely.

    Not sure it makes a difference, but you left off the last part of the quote:
    This includes public, protected, default (package) access, and private classes and interfaces declared by the class, but excludes inherited classes and interfaces.
    Are these missing methods from inherited classes, or are they declared in the class itself?

  • Ugly problem with java.lang.reflect.InvocationTargetException

    Hello,
    I am writing a web service which connects to WebSphere MQ queue manager and puts a message on a queue.
    I use Eclipse and as usual I followed more or less the hints given at:
    http://www.eclipse.org/webtools/jst/components/ws/1.5/tutorials/BottomUpWebService/BottomUpWebService.html
    I have chosen Tomcat 5.5.20 as target server (had to, because otherwise it does not create a server-config.wsdd file), the web service WSDL thingies and the client were created successfully.
    I have created WAR files and everything went fine when I tested the thing on JBoss.
    Bad things started after I deployed the things on the Tomcat server. When I start the client I receive java.lang.reflect.InvocationTargetException as a result. The web service itself does not generate any exception, but the client does (I'll post the dump later..).
    During the debug it turned that the exception is generated at the moment when the web service program tries to call any of the WebSphere functions.
    Now - 1st obvious thing was to check if I have com.ibm.mq.jar in the WEB-INF/lib directory inside my WAR files. Yep! There it was.
    So.. if the thing works just fine on JBoss and it booms on Tomcat I wonder whats the hack here? I copied all of the MQ libraries i have from JBOSS_HOME/lib to CATALINA_HOME/shared/lib and CATALINA_HOME/common/lib. Well.. that's quite ugly, because all necessary jars are inside the WEB-INF/lib directory. Anyway nothing of the above helped me running the thing on Tomcat.
    Do you have any suggestions or have anyone of you ever had such problem?
    Here are the exception dump and part of the code:
      - Setting up MQ environment:
         - Setting hostname...
    An AxisFault exception occured: java.lang.reflect.InvocationTargetException
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: java.lang.reflect.InvocationTargetException
    faultActor:
    faultNode:
    faultDetail:
         {http://xml.apache.org/axis/}hostname:ghjvk0j
    java.lang.reflect.InvocationTargetException
         at org.apache.axis.message.SOAPFaultBuilder.create
    Fault(SOAPFaultBuilder.java:222)
         at org.apache.axis.message.SOAPFaultBuilder.endElement(
    SOAPFaultBuilder.java:129)
         at org.apache.axis.encoding.DeserializationContext.endElement(
    DeserializationContext.java:1087)
         at org.apache.xerces.parsers.AbstractSAXParser.endElement(
    Unknown Source)
         at org.apache.xerces.impl.XMLNSDocumentScannerImpl.
    scanEndElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScanne
    rImpl$Fragment ContentDispatcher.dispatch(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerI
    mpl.scanDocument(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
    Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
    Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
    Source)
         at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse
    (Unknown Source)
         at javax.xml.parsers.SAXParser.parse(Unknown Source)
         at org.apache.axis.encoding.DeserializationContext.parse(
    DeserializationContext.java:227)
         at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
         at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
         at org.apache.axis.handlers.soap.
    MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
         at org.apache.axis.client.Call.invoke(Call.java:2767)
         at org.apache.axis.client.Call.invoke(Call.java:2443)
         at org.apache.axis.client.Call.invoke(Call.java:2366)
         at org.apache.axis.client.Call.invoke(Call.java:1812)
         at pl.pzu.services.TfiAuthenticationSoapBindingStub.
    verify(TfiAuthenticationSoapBindingStub.java:245)
         at pl.pzu.services.TfiAuthenticationProxy.
    verify(TfiAuthenticationProxy.java:45)
         at org.apache.jsp.sampleTfiAuthenticationProxy.
    Result_jsp._jspService(Result_jsp.java:158)
         at org.apache.jasper.runtime.HttpJspBase.
    service(HttpJspBase.java:97)
         at javax.servlet.http.HttpServlet.
    service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.
    service(JspServletWrapper.java:334)
         at org.apache.jasper.servlet.JspServlet.
    serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.
    service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
    (ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(
    ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(
    StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke
    (StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(
    StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(
    ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(
    StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(
    CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(
    Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11Connec
    tionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Pool
    TcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Lea
    derFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
    ThreadPool.java:684)
         at java.lang.Thread.run(Unknown Source)There is the part of the web service code where the event occurs:
         public void writeMessage(String message,
    String message_ID) throws Exception
              System.out.println("      - Setting up MQ environment: ");
              try
                   System.out.println("      - Setting hostname...");
         NEXT LINE CAUSES THE CLIENT TO THROW
         This is the first call to any WebSphere assets.
         During debug It says the it is unable to inspect the MQEnvironment
         object...
                   MQEnvironment.hostname = m_config.getQMHost();
                   System.out.println("      - Setting port...");
                   MQEnvironment.port = m_config.getQMPort();
                   System.out.println("      - Setting channel...");
                   MQEnvironment.channel = m_config.getQMChannel();
         }I think that if it works on JBoss and it doesn't on Tomcat it is not coding problem, but rather a configuration...
    Thanx for any ideas or help from ur side.

    Did you have any success on this?
    I also have the same problem with Tomcat 6.
    I had Tomcat 5.0 working with this code, but when we migrated to Tomcat 6.0, I am getting this exception on the clent side. I figured out that it is occuring on invoking WebSphere MQ call from the code.
    Thanks

  • Problems with java.lang.NoClassDefFound error *solved*

    realising my stupidity I have solved the problem
    I am quite new to java and I have been using the Java for Dummies book to help me to learn it. I decided to use the command line tools instead of an IDE and hadn't encountered any problems until recently. I took a break from learning Java after reaching the end of the book but have decided to come back to it. The problem now is that when I run my programs I get the following error:
    Exception in thread "main" java.lang.NoClassDefFoundError: helloworld (wrong anme: HelloWorld)
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(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.doPriviledged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at sun.misc.Launcher$AppClassLoader.localClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    This occurs from a simple hello world program:
    class HelloWorld
       public static void main(String[] args)
          System.out.println("Hello, World!");
    }I have no idea what the problem is, although by looking at similar threads it would appear that it may be something to do with the classpath variables however I do not know much about this as I followed a tutorial on the internet to set the classpath up.
    Edited by: this_is_phil on Jun 19, 2008 11:11 AM

    this_is_phil wrote:
    Exception in thread "main" java.lang.NoClassDefFoundError: helloworld (wrong anme: HelloWorld)This part of the error message means you typed in "helloworld" but the class that java found was named HelloWorld. In Java, those are different - java is case sensitive. It will work if you enter HelloWorld.

  • Two versions of code, one compile failure with java.lang.OutOfMemoryError

    I Have two cvs versions of one package. The differences between the two are minor, and I'm only trying to make the root version look like the latest branch. When I compile the branch, which has more code, things are fine. When I comple the root version I get
    java.lang.OutOfMemoryErrorSInce I can compile one version, it is clearly not the case that I lack RAM or something like that. What might the problem be? Thanks.
    Ken

    I'm compiling and I'm doing it with ant. As I said,
    it works fine with a slightly updated version of the
    Java package I have, but has this error while doing
    the same compile on the cvs root version of the
    package. I'm just trying to prepare for mergning the
    new code but can't compile the basic version of the
    package.Then, as already stated, the difference between the two versions is enough to cross the threshold of heap memory available to the VM that's running the compiler. Ant lets you provide VM options to an externally invoked VM. See its docs for how. If you're using fork="false", then just change or add -Xmx in ant.bat or ant.sh.

  • Problems with java.lang.Double in a Pojo

    Hi!
    I'm getting some problems with a Double (wrapper class) in a sub-report related with a Pojo.
    The exception has more than 100 lines.
    It's starts with:
    at com.crystaldecisions.sdk.occa.report.application.ds.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
         at br.inf.teorema.javautils.util.CrystalReportsUtils.export(CrystalReportsUtils.java:520)
    Caused by: com.crystaldecisions.sdk.occa.report.application.b6: Valor nulo inesperado localizado para o membro Produto.getAliquotaICMS. (UNEXPECTED NULL VALUE ... )
    at com.crystaldecisions.sdk.occa.report.application.b6.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.de.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.de.if(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.de.getDouble(Unknown Source)
    and ends with:
    [JRCCommunicationAdapter]  detected an exception: Erro inesperado do conector do banco de dados (UNEXPECTED ERROR WITH DATABASE CONNECTOR )
         at com.crystaldecisions.reports.queryengine.Row.char(Unknown Source)
         at com.crystaldecisions.reports.queryengine.Row.getValue(Unknown Source)
         at com.crystaldecisions.reports.datalayer.a$d.getValue(Unknown Source)
         at com.crystaldecisions.reports.saveddata.saveddata.SavedData.a(Unknown Source)
         at com.crystaldecisions.reports.saveddata.a.a(Unknown Source)
         at com.crystaldecisions.reports.saveddata.a.a(Unknown Source)
         at com.crystaldecisions.reports.basicdataengine.a.p(Unknown Source)
         at com.crystaldecisions.reports.basicdataengine.a.a(Unknown Source)
    It occurs when my Double has null value. When I put "0.0", there are no problems.
    Anyway, in specifics contexts, null != 0.0.
    I think it's a bug. Someone encountered the same problem?

    Sorry for my insistence, but this problem occurs only for me?
    I will explain better.
    If I have a report that show the value of a Double field, the getter method should be:
    public Double getMyField() {
        return myField;
    But if myField == null, I can't generate the report.
    So, I did:
    public Double getMyField() {
        if (myField == null) {
            myField = 0.0d;
        return myField;
    I wish don't need to do this correction in getter method.
    CR do not works this way with Double?
    I have tested, and String works fine.

  • Dyna Form +Validator Framework--- peculair problem with java.lang.Integer

    In my struts application , i m using Dyna Action form,and Validator framework
    <form-bean
    name="myDynaForm"
    type="org.apache.struts.validator.DynaValidatorForm">
    <form-property name="name" type="java.lang.String"/>
    <form-property name="phoneNo" type="java.lang.Integer"/>
    </form-bean>
    Now if user does not enter name , then a error meassage is dispalyed,
    and aslo this time phoneNo shows 0.
    why 0 is displayed here?
    Can anybody tell me

    Hi all,
    If my memory serves me well, the exception is thrown because the application needs a working calendar for a person provided in time mangement. Make sure the correct infotypes are used. Also the organization structure needs to be set up correctly. The manager needs someone to approve and the employee needs someone to get approved by.
    Regards, Marcel.

  • Problem with  java.lang.reflect in Eclipse

    I'm just reading java tutorial about that library, but when i'm trying to execute those example program's e.g
    import java.lang.reflect.Constructor;
    import java.lang.reflect.Type;
    import static java.lang.System.out;
    public class ConstructorSift {
        public static void main(String... args) {
         try {
             Class<?> cArg = Class.forName(args[1]);
             Class<?> c = Class.forName(args[0]);
             Constructor[] allConstructors = c.getDeclaredConstructors();
             for (Constructor ctor : allConstructors) {
              Class<?>[] pType  = ctor.getParameterTypes();
              for (int i = 0; i < pType.length; i++) {
                  if (pType.equals(cArg)) {
                   out.format("%s%n", ctor.toGenericString());
                   Type[] gpType = ctor.getGenericParameterTypes();
                   for (int j = 0; j < gpType.length; j++) {
                   char ch = (pType[j].equals(cArg) ? '*' : ' ');
                   out.format("%7c%s[%d]: %s%n", ch,
                        "GenericParameterType", j, gpType[j]);
                   break;
    // production code should handle this exception more gracefully
         } catch (ClassNotFoundException x) {
         x.printStackTrace();
    in Eclipse i've got nothing in my output console :/
    no errors, no warnings, no text ..... (it was terminated correctly)
    Can somebody tell me what should I do to make it work properly ?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi,
    In program arguments, you should not have ConstructorSift but only java.util.Formatter and java.util.Locale.
    (Eclipse : run dialog | arguments tab | program arguments)
    This is the output you should get:
    $ java ConstructorSift java.util.Formatter java.util.Locale
    public java.util.Formatter(java.util.Locale)
    *GenericParameterType[0]: class java.util.Locale
    public java.util.Formatter(java.lang.Appendable,java.util.Locale)
    GenericParameterType[0]: interface java.lang.Appendable
    *GenericParameterType[1]: class java.util.Locale
    public java.util.Formatter(java.lang.String,java.lang.String,java.util.Locale) throws java.io.FileNotFoundException,java.io.UnsupportedEncodingException
    GenericParameterType[0]: class java.lang.String
    GenericParameterType[1]: class java.lang.String
    *GenericParameterType[2]: class java.util.Locale
    public java.util.Formatter(java.io.File,java.lang.String,java.util.Locale) throws java.io.FileNotFoundException,java.io.UnsupportedEncodingException
    GenericParameterType[0]: class java.io.File
    GenericParameterType[1]: class java.lang.String
    *GenericParameterType[2]: class java.util.Locale
    public java.util.Formatter(java.io.OutputStream,java.lang.String,java.util.Locale) throws java.io.UnsupportedEncodingException
    GenericParameterType[0]: class java.io.OutputStream
    GenericParameterType[1]: class java.lang.String
    *GenericParameterType[2]: class java.util.Locale
    Hope that help,
    Jack

Maybe you are looking for

  • Problem with console in Oracle VM Manager

    I have installed Oracle VM 3.0.3 and Oracle VM Manager 3.0.3 is install on Oracle LINUX 5.6. I cannot get the console to work from either the Oracle VM Manager server itself using firefox or remotely from Windows running IE or Chrome. After looking a

  • Error while creating GTC for trusted source reconciliation in OIM11g

    Hi, I got an exception while trying to create GTC for Trusted source Reconciliation in OIM11g Class/Method: CreateGenConnectorAction/imageScreen encounter some problems: Provider Exception[[ java.lang.Exception: Provider Exception at com.thortech.xl.

  • Sort an an arrayList by the first element of an array

    Hi, I am really struggling trying to sort an arratList of arrays. I have an arrayList ArrayList<String[]> myArrayList = new ArrayList<String []>(100); Within this array I have may arrays with 2 elements String[] myArray1 = {"Peter", "London"}; String

  • How to manually add items from DVD

    I bought an excellent book on PSE 8 fro Mark Galer, and it includes a DVD with tutorials and some extras.  The book was written before Windows 7 came out and the Installer does not work (probably can't recongnise the Program Files (X86) folder).  The

  • Webreporting: Variable offsets

    Hi all, i have created a query with a time variable for the characteristic "calendar day"! I am using a range within an sap exit variable "actual calendar month"! To get this i restricted a key figure by selecting "range" and use this variable in res