Java.lang.IllegalStateException: Can't dispose InputContext while it's acti

I have a panoramic image display applet. Two problems exist with Sun Java that do not exist with Microsoft VM:
1. PC's with ATI video cards, using either Internet Explorer or Netscape, running Sun Java, the images come up scrambled looking, like a TV with a bad case of V-sync.
2. Using Internet Explorer or Netscape + Sun Java, the panoramic image loads, but if you scroll the image with your mouse and then change to another page, you get the following:
java.lang.IllegalStateException: Can't dispose InputContext while it's active
at sun.awt.im.InputContext.dispose(Unknown Source)
at java.awt.Window$1DisposeAction.run(Unknown Source)
at java.awt.Window.dispose(Unknown Source)
at sun.plugin.viewer.frame.IExplorerEmbeddedFrame.windowClosing(Unknown Source)
at java.awt.Window.processWindowEvent(Unknown Source)
at java.awt.Window.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
I emailed Sun about the first issue, but they told me that their Java is newer and better than Microsoft's. That's all they said. How arrogant and stupid is that? So for now I tell my customers to get rid of the Sun Java installation and install Microsoft's VM, which you can still find with a Google search.
Can anyone here direct me to where I might find solutions to this probem that exists with Sun's Java?
Thanks!

1. dispose the inputcontext by yourself
2. recreate the frames used by the applet, while changing the page
3. Sun's answer has nothing to do with stupidity or arrogance. It is a proven fact, that suns vm is newer and better, cos M$'s last vm is on the level of JDK1.1 or lower (and that's about 5 or 6 years in the past and in IT this is very, very, very long away, as you should know)
4. Do you really want to force your customers to use a vm, which is not supporting modern applets, which is not allowed to do it by court order? And do you really want to force them to reinstall sun's vm, when they want to visit pages with other applet's, which are supported by suns vm?
At last: Only since you are incapable to code for modern vms you shouldn't force your customers to use old and obsolete techniques. They will not praise you for doing so. May they will get away. So just put some time on the problem and solve before nagging on sun.
regards

Similar Messages

  • Can't dispose InputContext while it's active

    Hi - I have seen this question asked before but no answers.
    I am moving my applet from the MS IE JVM to the 1.4 plug-in and
    now get this error when I click the Windows close "x" button. This
    same applet runs fine with the old MS JVM. The code is too large
    to post (sorry about that.)
    Can anyone tell me what can be causing this? As I say, this
    exact same source runs fine with the older IE JVM.
    Thank you,
    java.lang.IllegalStateException: Can't dispose InputContext while it's active
         at sun.awt.im.InputContext.dispose(Unknown Source)
         at java.awt.Window$1$DisposeAction.run(Unknown Source)
         at java.awt.Window.dispose(Unknown Source)
         at sun.plugin.viewer.frame.IExplorerEmbeddedFrame.windowClosing(Unknown Source)
         at java.awt.Window.processWindowEvent(Unknown Source)
         at java.awt.Window.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)

    I'm having this problem, too. This is on a game at pogo.com (#1 gaming site on the web). Any ideas
    See:
    http://www.pogo.com/rooms/roomtabs.jsp?sls=3&game=jumbee&site=pogo&lkey=3ce8d6db6b6dc9170a280a0b0000283c
    Hi - I have seen this question asked before but no
    answers.
    I am moving my applet from the MS IE JVM to the 1.4
    plug-in and
    now get this error when I click the Windows close "x"
    button. This
    same applet runs fine with the old MS JVM. The code is
    too large
    to post (sorry about that.)
    Can anyone tell me what can be causing this? As I say,
    this
    exact same source runs fine with the older IE JVM.
    Thank you,
    java.lang.IllegalStateException: Can't dispose
    InputContext while it's active
         at sun.awt.im.InputContext.dispose(Unknown Source)
    at java.awt.Window$1$DisposeAction.run(Unknown
    Source)
         at java.awt.Window.dispose(Unknown Source)
    at
    sun.plugin.viewer.frame.IExplorerEmbeddedFrame.windowC
    osing(Unknown Source)
    at java.awt.Window.processWindowEvent(Unknown
    Source)
         at java.awt.Window.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown
    Source)
    at java.awt.Container.dispatchEventImpl(Unknown
    Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at
    java.awt.EventDispatchThread.pumpOneEventForHierarchy(
    nknown Source)
    at
    java.awt.EventDispatchThread.pumpEventsForHierarchy(Un
    nown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown
    Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown
    Source)
         at java.awt.EventDispatchThread.run(Unknown Source)

  • Java.lang.IllegalStateException: can't declare any more prefixes in this co

    We are Facing the below Exception in one of the deployment environment. While in other environments we have no issues. Can anyone give pointers for the possible root cause.
    2009-01-26 10:03:25,634 WARN [org.springframework.ws.soap.server.SoapMessageDispatcher] - Endpoint invocation resulted in exception - responding with SOAP Fault
    java.lang.IllegalStateException: can't declare any more prefixes in this context
         at org.xml.sax.helpers.NamespaceSupport$Context.declarePrefix(Unknown Source)
         at org.xml.sax.helpers.NamespaceSupport.declarePrefix(Unknown Source)
         at com.sun.msv.verifier.AbstractVerifier.startPrefixMapping(AbstractVerifier.java:79)
         at com.sun.msv.verifier.VerifierFilter.startPrefixMapping(VerifierFilter.java:87)
         at org.iso_relax.verifier.impl.ForkContentHandler.startPrefixMapping(Unknown Source)
         at org.xml.sax.helpers.XMLFilterImpl.startPrefixMapping(Unknown Source)
         at com.sun.xml.bind.unmarshaller.InterningXMLReader.startPrefixMapping(InterningXMLReader.java:93)
         at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:218)
         at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:235)
         at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:198)
         at com.sun.xml.bind.unmarshaller.DOMScanner.parse(DOMScanner.java:87)
         at com.syfact.model.attachment.impl.runtime.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:165)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:101)
         at org.springframework.oxm.jaxb.Jaxb1Marshaller.unmarshal(Jaxb1Marshaller.java:75)
         at org.springframework.ws.server.endpoint.AbstractMarshallingPayloadEndpoint.invoke(AbstractMarshallingPayloadEndpoint.java:87)
         at org.springframework.ws.server.endpoint.MessageEndpointAdapter.invoke(MessageEndpointAdapter.java:35)
    Thanks,

    Please note that if I provide the xml via a <c:set tag it works
    <c:set var="adapterUDMVar" value="<UDM xmlns=\"http://www.cramer.com/udm\" xmlns:udm=\"http://www.cramer.com/udm\" versionNumber=\"1.0\" generatedBy=\"Netman Aps\" source=\"ResourceManager\" UDMDateTime=\"2004-07-14T14:38:08\"/>
    Any body knows why this is happening?
    Cheers
    kk

  • Java.lang.IllegalStateException:Can't Obtain format

    Hi,
    I am trying to run an image manipulation program on a Tomcat server. When the program deals with PNG images it is fine but everytime it trying to do anything with JPEG2000 images it throws the java.lang.IllegalStateException:Can't Obtain format error. I have placed all the relevent jars in the shared/lib folder of my Tomcat installation and so it shouldn't have any problem finding the format but it is. Can anyone help?

    I wrote the program myself using javax.imageio.* and javax.media.jai.* libraries. It's just a program that converts from TIFF to JPEG2000. It works well when I run it locally but as soon as I deploy it on Tomcat it throws the error.
    <code>
    import java.awt.image.renderable.ParameterBlock;
    import java.io.File;
    import java.io.RandomAccessFile;
    import java.util.Iterator;
    import javax.imageio.ImageIO;
    import javax.imageio.ImageWriter;
    import javax.imageio.stream.ImageOutputStream;
    import javax.media.jai.JAI;
    import javax.media.jai.RenderedOp;
    import com.sun.media.imageio.plugins.jpeg2000.J2KImageWriteParam;
    import com.sun.media.jai.codec.FileSeekableStream;
    import com.sun.media.jai.codec.ImageCodec;
    import com.sun.media.jai.codec.ImageEncoder;
    import com.sun.media.jai.codec.PNGEncodeParam;
    import com.sun.media.jai.codec.SeekableOutputStream;
    import com.sun.media.jai.codec.TIFFDecodeParam;
    public class ImageConverter {
         public ImageConverter(){
         public File TIFFtoJPEG2000(File original){
              File toReturn = new File ("Tmp.jp2");
              toReturn.deleteOnExit();
              try{
                   FileSeekableStream stream = new FileSeekableStream(original);
                   TIFFDecodeParam decodeParam = new TIFFDecodeParam();
                   decodeParam.setDecodePaletteAsShorts(true);
                   ParameterBlock params = new ParameterBlock();
                   params.add(stream);
                   RenderedOp image1 = JAI.create("tiff", params);
                   ImageOutputStream ios = ImageIO.createImageOutputStream(toReturn);
                   J2KImageWriteParam encodeParam = new J2KImageWriteParam();
                   encodeParam.setFilter(J2KImageWriteParam.FILTER_53);
                   Iterator writers = ImageIO.getImageWritersByFormatName("jpeg2000");
                   ImageWriter writer = (ImageWriter)writers.next();
                   writer.setOutput(ios);
                   writer.write(image1);
              } catch (Exception e){
                   e.printStackTrace();
              return toReturn;
         public File TIFFtoPNG(File original){
              File toReturn = new File("Tmp.png");
              toReturn.deleteOnExit();
              try{
                   FileSeekableStream stream = new FileSeekableStream(original);
                   TIFFDecodeParam decodeParam = new TIFFDecodeParam();
                   decodeParam.setDecodePaletteAsShorts(true);
                   ParameterBlock params = new ParameterBlock();
                   params.add(stream);
                   RenderedOp image1 = JAI.create("tiff", params);
                   SeekableOutputStream out = new SeekableOutputStream(new RandomAccessFile(toReturn, "rw"));
                   PNGEncodeParam encodeParam = PNGEncodeParam.getDefaultEncodeParam(image1);
                   ImageEncoder encoder = ImageCodec.createImageEncoder("PNG", out, encodeParam);
                   encoder.encode(image1);
              } catch (Exception e){
                   e.printStackTrace();
              return toReturn;
    </code>

  • Getting  java.lang.IllegalStateException  while starting new transaction.

    Hi All,
    I am writing a simple web application(using netbeans visual jsf) but not able to proceed forward. I am encountering this "java.lang.IllegalStateException: Operation not allowed" when I try to start a new transaction.
    Here's my code for session bean:
        @Resource(name= "UserTransactionResource", mappedName="UserTransactionMapped")
        private UserTransaction utx;
        @PersistenceUnit(unitName = "myproj-ejbPU")
        private EntityManagerFactory emf;
        private EntityManager getEntityManager() {
            return emf.createEntityManager();
        public void save(UserProfile userprofile) throws Exception { 
            EntityManager em = getEntityManager();
            try {       
                utx.begin();
                em.joinTransaction();
                em.persist(userprofile);
                utx.commit();
            catch (Exception ex) {
                try {
                    System.out.println(ex.toString());              ---------------> prints  java.lang.IllegalStateException: Operation not allowed
                    utx.rollback();
                    throw new Exception(ex.getLocalizedMessage());
                catch (Exception e) {
                    throw new Exception(e.getLocalizedMessage());
            finally {           
                    em.close();
        }This is what is seen in glassfish server log:
    java.lang.IllegalStateException: Operation not allowed.
    java.lang.Exception: Operation not allowed.
    javax.faces.el.EvaluationException: java.lang.Exception: Operation not allowed.
    at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
    at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
    Please help me. I am totally stuck here. I am new to both jsf and ejbs. And i was referring this link http://www.packtpub.com/article/Building-JSF-EJB3-Applications
    Thanks,
    blue_dev

    Thanks for having a look at it.
    I tried this: System.out.println(ex.getCause()); , but it only prints null.
    I have pasted part of my glassfish server log which is quite big. I am not able to figure out the root cause of this problem. But my transaction object "utx" is causing this, i guess. Maybe this server log can give some clues.
    java.lang.IllegalStateException: Operation not allowed.
    java.lang.Exception: Operation not allowed.
    javax.faces.el.EvaluationException: java.lang.Exception: Operation not allowed.
            at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
            at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
            at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
            at javax.faces.component.UICommand.broadcast(UICommand.java:383)
            at com.sun.webui.jsf.component.WebuiCommand.broadcast(WebuiCommand.java:160)
            at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
            at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
            at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
            at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
            at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.execute(PartialTraversalLifecycle.java:94)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
            at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:267)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
            at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
            at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
            at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    Caused by: java.lang.Exception: Operation not allowed.
    WebModule[/miq-war]#{Register.submitButton_action}: java.lang.Exception: Operation not allowed.
    javax.faces.FacesException: #{Register.submitButton_action}: java.lang.Exception: Operation not allowed.
            at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:107)
            at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
            at javax.faces.component.UICommand.broadcast(UICommand.java:383)
    Caused by: javax.faces.el.EvaluationException: java.lang.Exception: Operation not allowed.
            at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
            at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
            ... 43 more
    Caused by: java.lang.Exception: Operation not allowed.
    executePhase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@131a5af) threw exception
    com.sun.rave.web.ui.appbase.ApplicationException: #{Register.submitButton_action}: java.lang.Exception: Operation not allowed.
            at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:603)
            at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:311)
            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
    ..................................

  • Why is this java.lang.IllegalStateException occuring, and what can be done?

    I routinely find this exception occuring with Tomcat 6, with virtually every web app I develop. Since I tend to be paranoid about errors, I want to no more even though Tomcat's output says this exception has no functional impact. As far as I can see, none of the code I developed is involved in this. Does that mean Tomcat 6 is broken? What debugging purpose could this have? What can be done to prevent it?
    INFO: Initializing Sun's JavaServer Faces implementation (1.2_04-b10-p01) for context '/FinanceWebApp'
    6-Mar-2008 11:28:07 AM org.apache.catalina.loader.WebappClassLoader loadClass
    INFO: Illegal access: this web application instance has been stopped already. Could not load java.lang.Object. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
    java.lang.IllegalStateException
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1244)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
    at com.sun.faces.application.ConverterPropertyEditorFactory$DisposableClassLoader.loadClass(ConverterPropertyEditorFactory.java:447)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
    at java.lang.Class.getConstructor0(Class.java:2699)
    at java.lang.Class.newInstance0(Class.java:326)
    at java.lang.Class.newInstance(Class.java:308)
    at java.beans.PropertyEditorManager.findEditor(PropertyEditorManager.java:79)
    at com.sun.faces.application.ApplicationImpl.addPropertyEditorIfNecessary(ApplicationImpl.java:652)
    at com.sun.faces.application.ApplicationImpl.addConverter(ApplicationImpl.java:623)
    at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:754)
    at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:505)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:402)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:511)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1220)
    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.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
    at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1458)
    at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:820)
    at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:348)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)

    Mojarra (the JSF RI) has code to generate bytecode for a PropertyEditory that the EL can use that will leverage any by-type converters
    that have been registered. In short it allows the EL to perform conversion via Converters when the standard conversion rules fail.
    It seems, for whatever reason, that Tomcat doesn't care for this practice, though I've not seen this exception before.
    Have you posted to the Tomcat list to see if they can provide insight on how to eliminate this message?

  • PLEASE HELP ME!!! java.lang.IllegalStateException

    I need Help, im encountering this Exception and i dont know what to do, can any Help me to resolve this problem.... Any help is greatly appreciated
    /HERE'S MY CODE-----------------------------------------
    String fileName = "Sample";
    System.out.println("Download Word Document");
    System.out.println(session.getAttribute("data"));
    // set the header details
    int id = Integer.parseInt(String.valueOf(session.getAttribute("data")));
    System.out.println("ID is: " + id);
    try {//set the header details
    ph.gov.da.finalstandards.daos.DAOFacade.file(id);
    response.setContentType("application/msword");
    //response.setHeader("Content-Disposition", "attachment; filename=" + fileName);
    //set the content type to related file
    javax.servlet.ServletOutputStream o = response.getOutputStream();
    InputStream inStream = new BufferedInputStream(new FileInputStream(
    "c:\\tempWordOutput.doc"));
    // set buffer size. Each attempt to read the file will use
    // specified number of bytes
    byte[] buf = new byte[4 * 1024];
    int bytesRead = 0;
    while ((bytesRead = inStream.read(buf)) != -1) {
    o.write(buf, 0, bytesRead);
    o.write(id);
    o.flush();
    o.close();
    } catch (Exception e) {
    e.printStackTrace();
    %>
    [4/20/07 9:26:13:265 CST] 7f007f0 SystemErr R java.lang.IllegalStateException
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at java.lang.Throwable. (Throwable.java)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at com.ibm.wps.pe.pc.legacy.impl.PortletResponseImpl.setHeader(PortletResponseImpl.java:475)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at org.apache.jsp._finalPage._jspService(finalPage.jsp :63)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:364)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:700)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:798)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [4/20/07 9:26:13:531 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [4/20/07 9:26:13:546 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1030)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:566)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:251)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.wps.struts.base.BaseImplUtil.include(BaseImplUtil.java:1229)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.wps.portlets.struts.WpsStrutsUtil.include(WpsStrutsUtil.java:1888)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.wps.portlets.struts.WpsStrutsViewJspCommand.includeURL(WpsStrutsViewJspCommand.java:170)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.wps.portlets.struts.WpsStrutsViewJspCommand.execute(WpsStrutsViewJspCommand.java:145)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.wps.portlets.struts.WpsStrutsUtil.executeCommand(WpsStrutsUtil.java:1223)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.wps.portlets.struts.WpsStrutsUtil.executeCommand(WpsStrutsUtil.java:1141)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.wps.portlets.struts.WpsStrutsUtil.executeSavedCommand(WpsStrutsUtil.java:1067)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.wps.portlets.struts.WpsStrutsPortlet.doService(WpsStrutsPortlet.java:1121)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.wps.portlets.struts.WpsStrutsPortlet.doView(WpsStrutsPortlet.java:1162)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at org.apache.jetspeed.portlet.PortletAdapter.service(PortletAdapter.java:154)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at org.apache.jetspeed.portlet.Portlet._dispatch(Portlet.java:744)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at org.apache.jetspeed.portlet.Portlet.access$100(Portlet.java:88)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at org.apache.jetspeed.portlet.Portlet$Context.callPortlet(Portlet.java:899)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.wps.pe.pc.legacy.cmpf.impl.PortletFilterManager.doFilter(PortletFilterManager.java:253)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at org.apache.jetspeed.portlet.Portlet.dispatch(Portlet.java:636)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at org.apache.jetspeed.portlet.Portlet.doGet(Portlet.java:510)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.wps.pe.pc.legacy.cache.CacheablePortlet.service(CacheablePortlet.java:352)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at org.apache.jetspeed.portlet.Portlet.service(Portlet.java:491)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [4/20/07 9:26:13:562 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1030)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:566)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:251)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.wps.pe.pc.legacy.invoker.impl.PortletInvokerImpl.callMethod(PortletInvokerImpl.java:466)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.wps.pe.pc.legacy.invoker.impl.PortletInvokerImpl.render(PortletInvokerImpl.java:135)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.wps.pe.pc.legacy.PortletContainerImpl.callPortletMethod(PortletContainerImpl.java:1378)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.wps.pe.pc.legacy.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:386)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.wps.pe.pc.PortletContainerImpl.doRenderPortlet(PortletContainerImpl.java:428)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.wps.pe.pc.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:102)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.wps.pe.pc.PortletContainer.renderPortlet(PortletContainer.java:95)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.wps.composition.PortletHolder.render(PortletHolder.java:87)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.tags.PortletRenderTag.doStartTag(PortletRenderTag.java:151)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at org.apache.jsp._Control._jspService(Control.jsp :176)
    [4/20/07 9:26:13:578 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:364)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:700)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:798)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1025)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:566)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:251)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java:89)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java:50)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java:44)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.templates.skins.Default.render(Default.java:70)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.templates.SkinTemplate.render(SkinTemplate.java:75)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.wps.composition.elements.Component.render(Component.java:906)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.wps.composition.elements.Control.render(Control.java:210)
    [4/20/07 9:26:13:593 CST] 7f007f0 SystemErr R at com.ibm.wps.composition.Composition.render(Composition.java:2747)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at org.apache.jsp._UnlayeredContainer_2D_V._jspService(UnlayeredContainer-V.jsp :12)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:364)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:700)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:798)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1025)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:566)
    [4/20/07 9:26:13:625 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:251)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java:89)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java:50)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java:44)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.templates.skins.Default.render(Default.java:70)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.templates.SkinTemplate.render(SkinTemplate.java:75)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.composition.elements.Component.render(Component.java:906)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.composition.elements.SingleEntryContainer.render(SingleEntryContainer.java:207)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.tags.CompositionRenderTag.doStartTag(CompositionRenderTag.java:318)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at org.apache.jsp._LayeredContainer._jspService(LayeredContainer.jsp :176)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:364)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:700)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:798)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1025)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:566)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:251)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java:89)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java:50)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java:44)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.templates.skins.Default.render(Default.java:70)
    [4/20/07 9:26:13:640 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.templates.SkinTemplate.render(SkinTemplate.java:75)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.wps.composition.elements.Component.render(Component.java:906)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.wps.composition.elements.SingleEntryContainer.render(SingleEntryContainer.java:207)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.tags.CompositionRenderTag.doStartTag(CompositionRenderTag.java:318)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at org.apache.jsp._Home._jspService(Home.jsp :2)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:364)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:700)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:798)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1025)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:566)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:251)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java:89)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java:50)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java:44)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.templates.screens.Default.render(Default.java:73)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.templates.ScreenTemplate.render(ScreenTemplate.java:64)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.tags.ScreenRenderTag.doStartTag(ScreenRenderTag.java:69)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at org.apache.jsp._Default._jspService(Default.jsp :572)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:656 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:364)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:700)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:798)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1025)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:566)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:251)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java:89)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java:50)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java:44)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.templates.themes.Default.render(Default.java:129)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.templates.ThemeTemplate.render(ThemeTemplate.java:71)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.Servlet.callPortal(Servlet.java:817)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.wps.engine.Servlet.doGet(Servlet.java:484)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/20/07 9:26:13:671 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [4/20/07 9:26:13:687 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [4/20/07 9:26:13:687 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    [4/20/07 9:26:13:687 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [4/20/07 9:26:13:687 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [4/20/07 9:26:13:687 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    [4/20/07 9:26:13:687 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    [4/20/07 9:26:13:687 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
    [4/20/07 9:26:13:687 CST] 7f007f0 SystemErr R at com.ibm.wps.mappingurl.impl.URLAnalyzer.doFilter(URLAnalyzer.java:186)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1021)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:566)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:198)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:80)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:214)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:615)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.http.HttpConnection.run(HttpConnection.java)
    [4/20/07 9:26:13:703 CST] 7f007f0 SystemErr R at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java)

    Regarding with downloading of file, do i need to use apache's HWPF to generate Word File???

  • Java.lang.IllegalStateException in tomahawk tree 2

    Hi,
    I am getting the following exception in tomahawk tree2 while fetching the data from database and constructing the tree:
    java.lang.IllegalStateException: Encountered a node [0:0:0] + with an illogical state. Node is expanded but it is also considered a leaf (a leaf cannot be considered expanded
    Here is the function which returns the tree data:
    public TreeNode getTreeData()
    TreeNode treeData = new TreeNodeBase("foo-folder", "First", false);      Enumeration keys = topMostNodes.keys();
    while(keys.hasMoreElements()){
    String currKey = keys.nextElement().toString();
    Vector tempChildList = (Vector)topMostNodes.get(currKey);
    TreeNodeBase tempNodeBase = new TreeNodeBase("foo-folder", currKey, false);
    for(int cnt=0; cnt < tempChildList.size(); cnt++)
    tempNodeBase.getChildren().add(new TreeNodeBase("foo-folder",tempChildList.get(cnt).toString(),true));
    treeData.getChildren().add(tempNodeBase);
    return treeData;
    The topMostNodes HashTable contanis these entries:
    parent 170160 childList [108858, 152338, 306438]
    parent 106404 childList [306304]
    parent 106402 childList [106406, 106407, 106408]
    parent 106401 childList [106404]
    parent 106400 childList [106403, 106405]
    parent 290094 childList [290095, 290096, 290097, 290098, 290099, 290100, 290101]
    childList is a vector containing all the children of a node.
    This is the stack Trace of the exception I am getting:
    java.lang.IllegalStateException: Encountered a node [0:0:0] + with an illogical state. Node is expanded but it is also considered a leaf (a leaf cannot be considered expanded.
    at org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeNavigation
    (HtmlTreeRenderer.java:463)
    at org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeCurrentNode
    HtmlTreeRenderer.java:346)
    at org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeTree
    (HtmlTreeRenderer.java:248)
         at org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeTree
    (HtmlTreeRenderer.java:276)
         at org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeChildren
    (HtmlTreeRenderer.java:211)
         at javax.faces.component.UIComponentBase.encodeChildren
    (UIComponentBase.java:701)
         at org.apache.myfaces.renderkit.RendererUtils.renderChild
    (RendererUtils.java:444)
         at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.
    renderChildren
    (HtmlGridRendererBase.java:203)
         at org.apache.myfaces.renderkit.html.HtmlGridRendererBase.encodeEnd
    (HtmlGridRendererBase.java:85)
         at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:720)
         at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:623)
         at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:546)
    It works fine if I replace the while loop with some hard coded node values.
    Can anybody help plz?
    Thanks in advance.
    Sanjeev.

    Its a known issue - and is documented in the Release Notes - doh.
    A very speed response from Oracle Support (in the Netherlands I would guess from his accent ) 8)
    Andrew

  • Java.lang.IllegalStateException: Already Connected  Exception

    I get java.lang.IllegalStateException: Already Connected Exception while executing
    HttpURLConnection conn = (HttpURLConnection) url.openConnection();
    conn.setRequestMethod("POST");
    (Exception here) conn.setDoOutput(true); // we want to send things
    // the Content-type should be default, but we set it anyway
    conn.setRequestProperty( "Content-type", "application/x-www-form-urlencoded" );
    // the content-length should not be necessary, but we're cautious
    conn.setRequestProperty( "Content-length", Integer.toString(body.length()));
    Can any one please let me know how to get this thing fixed

    Remove either the line setRequestMethod("POST") or the setDoOutput(true). How did you came on the idea to set them both?
    You may find those snippets useful as well: http://balusc.blogspot.com/2006/05/httpservletutil.html#doPost

  • Getting java.lang.IllegalStateException error with response.getOutputStream

    Hi,
    I am writer a JSP site for displaying JFreeChart. The main JSP page gets some parameters then the second page out put the chart as binary data with a Java class.
    I've located the part which generated the error, as follows:
    Code:
    OutputStream os = response.getOutputStream(); <--- this line cause the error
    response.setContentType("image/png");
    ChartUtilities.writeChartAsPNG(os, chart, 400, 300);
    (other than it, the JSP does nothing with response or out)
    Error:
    Servlet.service().for servlet jsp threw exception java.lang.IllegalStateException
    at org.apache.jasper.runtime.ServletResponseWrapperInclude.getOutputStream(ServletResponseWrapperInclude.java:62)
    at org.apache.jsp.build005f005.seriesChart_jsp.jspService(org.apache.jsp.build_005f005.seriesChart_jsp:110)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWarpper.java:325)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
    I've searched this forum and google and seeking for solution for thousands times. But sadly, ways such as adding out.reset(); doesn't work.
    Would any one has some suggestion for me? Your help is very appreciated. Thanks!

    A similar question / answers from jGuru.com
    Question I used getOutputStream() of response object in JSP. Below is the code for download a file in JSP.
    %>
    <%@ page import="java.util.*,
                        java.io.*"
    %>
    <%@ page language="java"
              session="false"
              contentType="text/html; charset=8859_1"
    %>
    <%
         //read the file name.
         File fFile = new File ("D:/Ibs/outdir/batchres.conf");
         String stFileName = "batchres.conf";
         //the content type set as excel
         response.setContentType ("application/excel");
         //the header and also the Nameis set by which user will be prompted to save
         response.setHeader ("Content-Disposition", "attachment;filename=\""+stFileName+"\"");
         //Open an input stream to the file and post the file contents thru the
         //servlet output stream to the client m/c
         InputStream isStream = null;
         ServletOutputStream sosStream = null;
         try
              //response.flushBuffer();
              isStream = new FileInputStream(fFile);
              sosStream = response.getOutputStream();
              int ibit = 256;
              while ((ibit) >= 0)
              ibit = isStream.read();
              sosStream.write(ibit);
         catch (IOException ioeException)
    sosStream.flush();
    sosStream.close();
    isStream.close();
    %>
    If run this code in Tomcat i am getting following error.. �<h1>Error: 500</h1> <h2>Location: /imu/jsp/ibUTLCmnDownloadView.jsp</h2>Internal Servlet Error:
    java.lang.IllegalStateException: getOutputStream() has already been called
         at org.apache.tomcat.facade.HttpServletResponseFacade.getWriter(Unknown Source)
         at org.apache.jasper.runtime.JspWriterImpl.initOut(Unknown Source)
         at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(Unknown Source)
         at jsp.ibUTLCmnDownloadView_12._jspService(ibUTLCmnDownloadView_12.java, Compiled Code)
         at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
         at org.apache.tomcat.core.Handler.invoke(Unknown Source)
         at org.apache.tomcat.core.Handler.service(Unknown Source)
         at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
         at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(Unknown Source)
         at org.apache.tomcat.facade.RequestDispatcherImpl.forward(Unknown Source)
         at JP.co.Hitachi.soft.IBS.Common.Servlet.ibUTLCmnDownloadScrGenServlet.doPost(ibUTLCmnDownloadScrGenServlet.java:75)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
         at org.apache.tomcat.core.Handler.invoke(Unknown Source)
         at org.apache.tomcat.core.Handler.service(Unknown Source)
         at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
         at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
         at org.apache.tomcat.core.ContextManager.service(Unknown Source)
         at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown Source)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:479)
    Answer
    Don't know if this will help--your code worked as is on my system (J2SDK 1.4.1, Tomcat 4.1.12, Linux)--but you're setting the content-type twice, and to two different values. In the page directive, you specify contentType="text/html; charset=8859_1", and then in the scriptlet, you do a response.setContentType ("application/excel");. Try changing the one in the page directive and deleting the one in the scriptlet. The servlet container may be calling getOutputStream() when it sees the text MIME type so it can prepare the out built-in variable.
    Also, according to the J2EE design patterns, JSP's should only be used to produce text output. Any binary output (such as Excel files) should be produced with servlets--otherwise, the JSP becomes one big scriptlet (like this one).
    If you still want to do this with a JSP, you might want to take out your try ... catch block since you're not doing anything with it. Doing so will allow you to let the servlet container handle the errors (i.e. specify error pages in the web application deployment descriptor). Either that, or at least put the close() and flush()calls in it since they can throw IOExceptions, too. :)
    Finally, you should never close the servlet's output stream. Leave that up to the servlet container.
    Is this item helpful? yes no Previous votes Yes: 2 No: 3
    To transfer file from client to server using jsp programs
    chalpati Rao, Aug 11, 2004 [replies:1]
    How to Download File using JSP program
    Re: To transfer file from client to server using jsp programs
    Saravanan Mani, Aug 24, 2004
    Try restarting the server.It worked for me (ie.you did all the code changes mentioned in the previous reply)
    Breakline problems
    David Machado, Jan 27, 2005 [replies:1]
    Hi! Maybe a problem with breaklines. Try this: ------------------------------------------------------
    %><%@ // don't send breakline here!!!
    page import="java.util.*,
    java.io.*"
    %><%@ // don't send breakline here too!!!
    page language="java"
    session="false"
    contentType="text/html; charset=8859_1"
    %><% // finally, don't send breakline here!!!
    //read the file name.
    File fFile = new File ("D:/Ibs/outdir/batchres.conf");
    String stFileName = "batchres.conf";
    //the content type set as excel
    response.setContentType ("application/excel"); // twice???
    //the header and also the Nameis set by which user will be prompted to save
    response.setHeader ("Content-Disposition", "attachment;filename=\""+stFileName+"\"");
    //Open an input stream to the file and post the file contents thru the
    //servlet output stream to the client m/c
    InputStream isStream = null;
    ServletOutputStream sosStream = null;
    try
    //response.flushBuffer();
    isStream = new FileInputStream(fFile);
    sosStream = response.getOutputStream();
    int ibit = 256;
    while ((ibit) >= 0)
    ibit = isStream.read();
    sosStream.write(ibit);
    catch (IOException ioeException)
    sosStream.flush();
    sosStream.close();
    isStream.close();
    %> // make sure that's no breakline an no spaces at the end!!
    Re: Breakline problems
    Aarthi Sivaram, Apr 19, 2005
    In the above code sosStream = response.getOutputStream(); must be removed. Use 'out' instead of sosStream i.e. out.write(""+ibit); If you look at the Java code generated for your JSP, you can find JspWriter out = null ... .. JspWriter calls response.getOutputStream(), thats why when u call getOutputStream, u get IllegalStateException. 'out' variable is available for direct use in all JSP's, like 'request'. So that can be directly used to write.
    A quick and working workaround
    Leslie Leng, May 20, 2005 [replies:1]
    I am not going to discuss the theory behind, as others gurus mentioned before me, are valid.
    In short, getOutputStream() could not be used more than once, and also it will conflict with JSPWriter's out.
    So, the quick workaround would be, at the end of the JSP page, add the following:
    out.clear();
    out = pageContext.pushBody();
    in example:
    catch(Exception e){
    System.out.print(e);
    out.clear();
    out = pageContext.pushBody();
    %>
    Re: A quick and working workaround
    ajit Pandey, Jul 15, 2005
    Thanks a ton Leslie ,it worked(Production issue) :) credit goes to you....indebted

  • Response.getOutputSource - java.lang.IllegalStateException

    Hi all,
    I try to download a CSV file in JSP.
    Below is my code :
    <%
          try {
               String fileName = "temp.csv";
               String fileContent = "something";
               response.setContentType("application/csv");
               response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
               BufferedOutputStream bos  =  new  BufferedOutputStream(response.getOutputStream());
                   bos.write(fileContent.getBytes("UTF-8"));
                   bos.close(); 
           catch(Exception e)
           System.out.println("...error while loading: "+e.toString());
           e.printStackTrace();
           %><html><head></head><body>Error: can't open file thisfile.csv</body></html>
           <%
    %>it worked once. but suddenly i got this error message :
    java.lang.IllegalStateException
         at org.apache.jasper.runtime.ServletResponseWrapperInclude.getOutputStream(ServletResponseWrapperInclude.java:63)does anyone know why this error message appear and how to solve this problem?
    thanks.

    You can only call one of getOutputStream or getWriter for a single response.
    If you call getOutputStream when you have already called getWriter, it throws an IllegalStateException.
    JSPs call getWriter implicitly - constructing the JSPWriter.
    Suggestion: Put all this code into a servlet. Its all java code anyway.

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

    this is the code
    when i am running it i am gettinga n exception stating that
    "Exception in thread "main" java.lang.IllegalStateException: No match found
    at java.util.regex.Matcher.group(Unknown Source)
    at java.util.regex.Matcher.group(Unknown Source)
    at LinkGetter.getLinks(LinkGetter.java:36)
    at LinkGetter.main(LinkGetter.java:80) "
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.regex.*;
    //import java.util.regex.Pattern;
    public class LinkGetter{
         private static Pattern htmltag;
         private static Pattern link;
         //private final String root;
         public static List<String> getLinks(String url) {
              List<String> links = new ArrayList<String>();
              try {
                   BufferedReader bufferedReader = new BufferedReader(
                             new InputStreamReader(new URL(url).openStream()));
                   String s;
                   StringBuilder builder = new StringBuilder();
                   while ((s = bufferedReader.readLine()) != null) {
                        builder.append(s);
                   Matcher tagmatch = htmltag.matcher(builder.toString());
                   while (tagmatch.find()) {
                        Matcher m = link.matcher(tagmatch.group(1));
                        m.find();
                        String link = m.group().replaceFirst("href=\"", "").replaceFirst("\">", "");
                        if (valid(link)) {
                             links.add(makeAbsolute(url, link));
              } catch (MalformedURLException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
    System.out.println(links);
              return links;
         private static boolean valid(String s) {
              if (s.matches("javascript:.*|mailto:.*")) {
                   return false;
              return true;
         private static String makeAbsolute(String url, String link) {
              if (link.matches("http://.*")) {
                   return link;
              if (link.matches("/.*") && url.matches(".*$[^/]")) {
                   return url + "/" + link;
              if (link.matches("[^/].*") && url.matches(".*[^/]")) {
                   return url + "/" + link;
              if (link.matches("/.*") && url.matches(".*[]")) {
                   return url + link;
              if (link.matches("/.*") && url.matches(".*[^/]")) {
                   return url + link;
              throw new RuntimeException("Cannot make the link absolute. Url: " + url
                        + " Link " + link);
    public static void main(String args[ ])
    htmltag = Pattern.compile("<a\\s+href\\s*=\\s*\"?(.*?)[\"|>]",Pattern.CASE_INSENSITIVE );
              link = Pattern.compile("href=\"[^>]*\">");
    getLinks("http://google.com");
    can anyone one plz help me out of this

    Please use the CODE-Button when posting Code: 1. copy-and-paste your code 2. select your code 3. press "CODE" just above the text field
    Also: read the error message:
    java.lang.IllegalStateException: No match foundIt tells you that no match was found an that it happened when you called Matcher.group()
    This means that you try to call .group() although a previous .find() or .match() didn't find anything. Check that method calls return value before calling .group()

  • Java.lang.IllegalStateException: ShmWebSession is closed.

    Hi,
    While restarting Web context following exception occurred.
    java.lang.IllegalStateException: ShmWebSession is closed
    java.lang.IllegalStateException: ShmWebSession is closed
         at com.sap.bc.proj.jstartup.sadm.ShmWebSession.activate(ShmWebSession.java:539)
         at com.sap.engine.session.runtime.http.HttpRuntimeSessionModel.activateShmSlot(HttpRuntimeSessionModel.java:446)
         at com.sap.engine.session.runtime.http.HttpRuntimeSessionModel.beforeActivate(HttpRuntimeSessionModel.java:86)
         at com.sap.engine.session.runtime.RuntimeSessionModel.activate(RuntimeSessionModel.java:278)
         at com.sap.engine.session.runtime.SessionRequest.session(SessionRequest.java:91)
         at com.sap.engine.session.AbstractSessionHolder.getSession(AbstractSessionHolder.java:87)
         at com.sap.engine.session.SessionDomain.failoverState(SessionDomain.java:990)
         at com.sap.engine.core.session.SoftShutdown.traverseDomains(SoftShutdown.java:47)
         at com.sap.engine.core.session.SoftShutdown.failoverState(SoftShutdown.java:36)
         at com.sap.engine.boot.soft.FailoverContext.readyForSoftShutdown(FailoverContext.java:25)
         at com.sap.engine.boot.soft.SoftShutdownThread.run(SoftShutdownThread.java:20)
    Can anyone help me?
    Regards,
    Sankalp

    check your defaultTrace log.
    try using Session Manager, set regular.check.period property to
    a higher value in seconds.
      More info available here:
      http://help.sap.com/saphelp_nwce711/helpdata/en/
      47/f1fc52720d296fe10000000a42189b/frameset.htm
    regards,
    Vincent

  • Java.lang.IllegalStateException when trying to load graphic from KM

    Hello,
    I'm currently facing the following problems.We have a bunch of SVG graphics in a KM-Repository which are displayed to the user. The graphics are embedded in a JSP file. In most of the cases this works fine, but for users with a low bandwith this does not work. An error message is written to the logfile which looks like that:
    serving request (-> 500) - java.lang.IllegalStateException: GET on
    http://ourserver.com/irj/go/km/docs/ourRepository/myGraphic.svg expected 377950 bytes, but got
    262144 bytes and wrote 196608 bytes. The exception message is: Write timeout. HTTP client read
    timeout or callback from dispatcher not received for [120000] milliseconds. -
    com.sap.engine.services.httpserver.exceptions.HttpIOException: Write timeout. HTTP client read
    timeout or callback from dispatcher not received for [120000] milliseconds.
         at com.sap.engine.services.httpserver.server.ResponseImpl.sendResponse(ResponseImpl.java:280)
         at com.sap.engine.services.servlets_jsp.server.runtime.client.ServletOutputStreamImpl.flush(ServletOutputStreamImpl.java:440)
         at com.sap.engine.services.servlets_jsp.server.runtime.client.ServletOutputStreamImpl.write(ServletOutputStreamImpl.java:234)
         at com.sapportals.wcm.protocol.webdav.server.WDGetHandler.copy(WDGetHandler.java:744)
         at com.sapportals.wcm.protocol.webdav.server.WDGetHandler.internalHandleWDGetHandler.java:691)
    at com.sapportals.wcm.protocol.webdav.server.WDGetHandler.handle(WDGetHandler.java:263)
         at com.sapportals.wcm.protocol.webdav.server.WDServlet.doGet(WDServlet.java:791)
         at com.sapportals.wcm.protocol.webdav.server.WDServlet.service(WDServlet.java:483)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)+
         at com.sapportals.wcm.portal.proxy.PCProxyServlet.service(PCProxyServlet.java:333)+
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) ...
    Some more facts:
    The problem occors on different graphics
    The values 262144 and 196608 (from but got 262144 bytes and wrote 196608 bytes) come up in most cases, but sometimes they vary. But all values have in common, that they are a multiple of 4096 (which is the setting of the parameter ServletsLongDataTransferCallbackSize.
    According to the SAP Notes 1014039 and 807000 I adapted some settings in our Testsystem:
    ServletsLongDataTransferCallbackSize: 1024 (which was set to 4096 before)
    ServletInputStreamTimeout: 1728000000 (which was set to 180000 before)
    ServletsLongDataTransferTimeout: 1728000000 (which was set to  120000 before)
    Unfortunatelly setting those parameters didn't fix the problem.
    Does anybody have a clue what I can do? And just for my understanding, what exactly does the parameter, that I have set, effect. The initial values of 180000 (3 Minutes) seem to be enough. Loading 377950 bytes should take much less that 3 Minutes even with a slow connection?
    Kind regards,
    dominik
    Edited by: Dominik Fried on Mar 30, 2009 1:34 PM
    Edited by: Dominik Fried on Mar 30, 2009 1:45 PM

    Hi,
    We are facing exactly the same issue with KM.
    Can anyone assist us?
    Thanks in advance,
    Regina

  • Java.lang.IllegalStateException:  bean  not found in "request" scope

    In jsp,I use javaBean,the statement is following:
    <jsp:useBean id="collectionBean" scope="request" type="view.CollectionBean"/>
    but ,in runtime,there exist following mistakes:
    java.lang.IllegalStateException: bean "collectionBean" not found in "request" scope
         at basicContentSearch.jspService(basicContentSearch.jsp:8)
         [SRC:/basicContentSearch.jsp]
         at com.orionserver[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:778)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    why?
    Please everyone tell me if you can,thanks a lot.

    I believe, if it is the first time you are referring to the bean, you must use the class attribute rather than type:
    <jsp:useBean id="collectionBean" scope="request" class="view.CollectionBean"/>The type is used to change how the bean is referenced, for instance, in regular Java you might do this:
    // The Type                 The Class
    java.util.List myList = new java.util.ArrayList();In use bean you would do this:
    <jsp:useBean id="myList" class="java.util.ArrayList" type="java.util.List"/>

Maybe you are looking for