IllegalStateException error

why does this program give me an IllegalStateException when I run it? How can it be fixed?
import java.util.*;
import java.io.*;
import javax.swing.*;
public class FileChooser extends javax.swing.JFrame
    private final int POINTS = 1600;   
    java.util.Scanner scanner;
    java.io.File file;
    javax.swing.JTextArea     ta;
    javax.swing.JFileChooser  chooser;
    PlotPanel _plotPanel;
    DataPoint [] datapoint;
    public FileChooser (String title) throws java.io.FileNotFoundException
           super ();
     this.setSize(500, 800);
           this.setDefaultCloseOperation (javax.swing.JFrame.EXIT_ON_CLOSE);
     _plotPanel = new PlotPanel();
     this.add(_plotPanel);
           datapoint = new DataPoint[POINTS];     
           double time = 0;
           double force = 0;
           ta = new javax.swing.JTextArea (20, 30);
           chooser = new javax.swing.JFileChooser ();
           int status = chooser.showOpenDialog (null);
           if (status == javax.swing.JFileChooser.APPROVE_OPTION)
          File file = chooser.getSelectedFile ();
               scanner = new Scanner (file);
          else
       ta.setText ("No File Chosen");
          this.setVisible (true);
          } // end else
     for(int i=0; i < POINTS; i++)
     if (scanner.hasNextDouble())   
               time = scanner.nextDouble();
               force = scanner.nextDouble();
               datapoint[i] = new DataPoint(time,force);
       else
          datapoint[i] = new DataPoint(time,force);
     scanner.close();
    } // End FileChooser ()
    public static void main (String [ ] args) throws java.io.FileNotFoundException
        FileChooser app = new FileChooser("Graph");
    }  //end main
} // End FileChooser

Fix the indentation and the problem is obvious:for(int i=0; i < POINTS; i++)
     if (scanner.hasNextDouble())   
               time = scanner.nextDouble();
               force = scanner.nextDouble();
               datapoint[i] = new DataPoint(time,force);
       else
          datapoint[i] = new DataPoint(time,force);
     scanner.close();
}You close the Scanner within the for loop. The if statement which is inside the loop references the Scanner.

Similar Messages

  • Java.lang.IllegalStateException error when consuming a portlet

    When attempting to consume a portlet within a Webcenter portlet the portlet briefly displays and then constantly refreshes. On each refresh the following error is being logged (the PPR number increments each time the portlet refreshes):
    *<XmlErrorHandler> <handleError> ADF_FACES-60096:Server Exception during PPR, #35*
    java.lang.IllegalStateException: The expected request type is not the same as the current request type.
         at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl.getExternalContext(GlobalConfiguratorImpl.java:333)
         at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit.<init>(FacesContextFactoryImpl.java:86)
         at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:64)
    We are using JDeveloper 11.1.1.6, WebCenter Portal - Framework 11.1.1.6.0.111214.0952
    The portlet being included includes a farily simple ADF Query and Table component. It was included as a ADF Rich Portlet.
    There was an earlier thread that seemed to have the same issue: consuming portlet get error <ADF_FACES-60096:Server Exception during PPR>
    It is marked as answered but the answer was a series of steps including stopping the portal, server, redeploying the portlet, and restarting. It also suggested deleting any unused bindings from the Executable section of the page. These steps failed to fix my issue.
    Has anyone else seen this issue and found a concrete fix for it?
    Thanks in advance.

    Hello again,
    I solved the problem.
    In Control Panel -> JInitiator administration console , the option "Use browser settings" has to be unchecked.
    daniela

  • 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

  • SAP PI 7.1 - Runtime Workbench Error - "Service Unavailable"

    Hi there,
    We have just installed SAP PI 7.1 on an iSeries 6.1 server, all seems to be successfully installed except that the runtime workbench will not start. It seems to be that the runtime workbench service was not deployed successfully during the install.
    The error when trying to launch the Runtime Workbench is:
    Application cannot be started!
    Details: com.sap.engine.services.deploy.exceptions.ServerDeploymentException: [ERROR CODE DPL.DS.5004] Cannot create application loader for application sap.com/com.sap.xi.rwb.
         at com.sap.engine.services.deploy.server.utils.LoadContextUtils.defineSharedApplicationLoader(LoadContextUtils.java:100)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.bindLoader(DeployServiceImpl.java:1780)
         at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:216)
         at com.sap.engine.services.deploy.server.application.StartTransaction.prepare(StartTransaction.java:179)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:419)
         at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesImpl(ParallelAdapter.java:495)
         at com.sap.engine.services.deploy.server.application.StartTransaction.makeAllPhasesImpl(StartTransaction.java:554)
         at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:248)
         at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:389)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3387)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3373)
         at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:749)
         at com.sap.engine.services.servlets_jsp.server.deploy.impl.ApplicationManager.start(ApplicationManager.java:180)
         at com.sap.engine.services.servlets_jsp.server.deploy.impl.ApplicationManager.analyseAppStatusMode(ApplicationManager.java:288)
         at com.sap.engine.services.servlets_jsp.server.DeployContext.startLazyApplication(DeployContext.java:334)
         at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:86)
         at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
         at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:67)
         at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
         at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
         at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
         at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
         at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
         at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
         at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
         at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
         at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
         at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
         at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
         at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:309)
         at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.run(Processor.java:222)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:152)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:247)
    Caused by: java.lang.IllegalStateException: [ERROR CODE DPL.DS.6102] The sap.com/com.sap.xi.rwb class loader is not null, but sap.com/com.sap.xi.rwbcom.sap.engine.boot.loader.ResourceMultiParentClassLoader722bac67alive for the LoadContext, which is wrong /nHint: The reason could be leaking class loaders.You can also check, whether above in the stack trace, there is a call to unregister the loader.
         at com.sap.engine.services.deploy.server.utils.LoadContextUtils.ensureLoaderNameAndUnregisteredLoader(LoadContextUtils.java:52)
         at com.sap.engine.services.deploy.server.utils.LoadContextUtils.defineSharedApplicationLoader(LoadContextUtils.java:72)
         ... 34 more
    Has anybody had this error before? Or how easy is it to manually re-deploy the service again?
    Thanks for the help
    Lynton

    I have just seen this on the forum as well which is exactly the same question that I have....
    RWB application cannot be started after PI 7.1 installation
    I will try it now and will let you know
    Lynton
    Edited by: Lynton Grice on Aug 18, 2009 12:29 PM

  • Comm Channel Error

    Hi,
    I have some unique error.
    Could not process due to error: java.lang.IllegalStateException: Error during RETR epilogue: com.sap.aii.adapter.file.ftp.FTPEx: 426 Unable to send data to TCP/IP. Data transfer ended.
    Please let me know the issues.
    Is it a data problem?
    Other communication channels relevant to this FTP server is working fine.
    Regards
    Krish

    Hi Krish,
    It seems some error in connectivity. Its not related to data. Did you check at the same time for other interfaces also. They should also have same error if you tested at the same error.
    Please check this link and shawn reply in the end. May be this might be one issue:
    http://forums.iis.net/t/1105801.aspx
    Regards,
    ---Satish

  • Error during STOR/APPE epilogue: com

    Hi Experts,
    Getting below error for FTP channel frequently.
    java.lang.IllegalStateException: Error during STOR/APPE epilogue: com.sap.aii.adapter.file.ftp.FTPEx: 426 Transfer failed.
    After sometimes the message automatically get processed.
    Checked we got this error for 2 channels simultaneously for  same host and port but different folder.
    But messages got processed latter.
    This issue is occurring frequently. Can anybody suggest what is the reason and what is the permanent solution for this error.

    SAP PI FTP error 426 for windows IIS
    you might want to read that thread

  • Error in opening idm screen

    HI I have this problem while trying to login to the IDM screen ,
    java.lang.IllegalStateException: Error attempting to decrypt: Cannot find any provider supporting DESede/ECB/NoPadding
    I have no clue what this is can any one please help me with this .

    Hi,
    Can you check if the absence is correctly maintained, also make sure absence which were available earlier are customised correctly and not delimited or removed.
    Check t-code "PTARQ" .
    Hope the tasks are set to "General Task"
    SPRO> Time Management>Web Application>Leave Request(new)>Link Absence types and workflow templates.
    Regards
    Puneet

  • IDOC to FILE-Error during STOR/APPE epilogue

    Hi all
        I am doing IDOC to File scenario. When trying to save the file in FTP path it throwing error like
    Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error occurred while connecting to the FTP server  java.lang.IllegalStateException: Error during STOR/APPE epilogue: com.sap.aii.adapter.file.ftp.FTPEx: 221 Scanning for virus  Transfer complete.

    s i can able to connect FTP server from PI server...But it showing some message like
    GSSAPI error minor: Unknown code krb5 195
    GSSAPI error: initializing context
    GSSAPI authentication failed
    504 AUTH KERBEROS_V4 not supported.
    KERBEROS_V4 rejected as an authentication type
    But its getting connected..
    Regards
    Sathish

  • Error after importing a Resource .xml file

    Hellos,
    We are moving from development to test.
    I wanted to load the Scripted JDBC Resource we have developed. We exported the Resource from idm/debug, removed the id='xxx' elements and then imported the .xml file via Configure/Import file.
    Now, I get the error:
    ErrorError
    java.lang.IllegalStateException: Error attempting to decrypt: Error initializing Encryptor: Missing required Encryption Key: F9388B0C42691A37:7A11431D:1166721AE86:-7FFC
    when trying to access the resource in the test environment...
    It is a database resource so it has an user/password pair, maybe the Password is causing me grief.
    What is this error meaning and how do I resolve it?

    greenfan88 wrote:
    It is a database resource so it has an user/password pair, maybe the Password is causing me grief.
    What is this error meaning and how do I resolve it?That's the point. Password is encrypted with a particular key. Remove password and reenter it on the resourceform.
    You could also export the ServerKey from dev, but that seems to be not a good solution (at last, not for me).
    regards, M.

  • Error during RETR epilogue: FTPEx: 426 Data connection: Broken pipe

    Hi Experts,
    We have XI file to file transfer configured via the ftp...
    while im trying to upload the file from the source folder to target folder, im getting the following error: which i have tried to resolve but not able to...
    help in this regard will be greatly appreciated:
    "Could not process due to error: java.lang.IllegalStateException: Error during RETR epilogue: com.sap.aii.adapter.file.ftp.FTPEx: 426 Data connection: Broken pipe."
    Regards,
    nandan

    if I were you I would put the lines
    kkSocket.setSendBufferSize(1024);
    kkSocket.setSoTimeout (10000);
    kkSocket.setTcpNoDelay(true);
    before connecting to the server, not after the initial message was sent.

  • IllegalStateException thrown-report run from Rep9i Thin Client for WebLogic

    Hi,
    I am facing a problem when trying to invoke 9i reports (JSP and RDF) from the Reports 9i Thin Client deployed on WebLogic 6.0sp1.
    After deployment, I have been able to invoke the rwservlet command help page i.e. http://....../reports/rwservlet successfully.
    However, on running any report, WebLogic throws the 'IllegalStateException' error. What could be the problem?

    Hi,
    Following message is displayed at WebLogic command prompt:
    <Mar 17, 2003 10:58:06 AM GMT+05:30> <Error> <HTTP> <[WebAppServletContext(36133
    02,web)] Servlet failed with Exception
    java.lang.IllegalStateException: Attempt to change ContentType after calling get
    Writer() (cannot change charset from 'ISO-8859-1' to 'null')
    at weblogic.servlet.internal.ServletResponseImpl.setEncoding(ServletResp
    onseImpl.java:607)
    at weblogic.servlet.internal.ServletResponseImpl.setContentType(ServletR
    esponseImpl.java:237)
    at oracle.reports.rwclient.RWClient.handleException(RWClient.java:867)
    at oracle.reports.rwclient.RWClient.processRequest(RWClient.java:1238)
    at oracle.reports.rwclient.RWClient.doGet(RWClient.java:300)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:213)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:1265)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:1622)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    >
    Awaiting for input.
    Thanks,
    Bharat

  • Call web service from portal/soap config .xml error

    Hi all,
    I am trying to call a web service from our portal. Setup is as follows:
    -Generate proxy classes and deploy it as a portal service
    I created this service using the wizard (Portal service from wsdl file client side) in NWDS.
    -Portal component which uses the portal service.
    When I try to run the application in the portal, I get the following exception:
    java.lang.IllegalStateException: Error in soapconfig.xml: The method mail of com.sap.portal.prt.soap.proxy.Alias portal service is not found..
    How can I solve this?
    Her is my xml  file:
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
         <property name="SharingReference" value="com.sap.portal.runtime.application.soap"/>
      </application-config>
      <components>
        <component name="callwebproxy">
          <component-config>
            <property name="ClassName" value="com.portal.erbS.callwebproxy"/>
          </component-config>
          <component-profile/>
        </component>
        <component name="org_opach">
          <component-config>
            <property name="ClassName" value="com.test.org_opach"/>
          </component-config>
          <component-profile/>
        </component>
      </components>
      <services>
        <service alias="com.sap.portal.prt.soap.proxy.Alias" name="ProxyClass">
          <service-config>
            <property name="className" value="com.sap.portal.wsdl.webservices.service.connector.ProxyClass">
            </property>
            <property name="startup" value="false"/>
            <property name="WebEnable" value="false"/>
            <property name="Webproxy" value="true"/>
            <property name="SecurityZone" value="com.sap.portal.wsdl.webservices.service.connector/DefaultSecurity"/>
          </service-config>
          <service-profile>
            <property name="SystemAlias" value="Default_system_Alias"/>
          </service-profile>
        </service>
      </services>
    </application>
    reza

    Hi,
    Check your soapconfig.xml
    Your method should be defined there. If it's not there, then you're sure to get this error.
    For every method (in Webservice) that you call from your Portal Service, you should have it defined here.
    Remember, this is autogenerated.
      <?xml version="1.0" encoding="UTF-8" ?>
    - <!-- Portal WebService Configuration File.
      -->
    - <!-- Note: File generated automaticaly, don't modify this file.
      -->
    - <portal-webservices version="6,0,3" application-name="TestWS">
    - <portal-webservice name="com.company.mod.TestWS">
    - <webservice-method soapaction="" authenticated="false" styleenconding="RPC" javasignature="public abstract byte[] com.company.mod.TestWS.getValue(java.lang.String)" name="getValue">
    - <webservice-parameter defaultjavatype="java.lang.String" enconding="encoded" targetnamespace="http://www.w3.org/2001/XMLSchema" nillable="false" xmlattribute="false" required="true" ID="0" name="value">
      <webservice-type wsdltype="xsd:string"  javatype="java.lang.String" />
      </webservice-method>
      </portal-webservice>
      </portal-webservices>
    Regards,
    JP

  • Proxy issue in OpenScript Load Testing Protocol(Web/HTTP) during PlayBack

    Hi All,
    I am new to OATS and I recorded a sample script on OATS for Load Testing protocol(Web/HTTP) in OpenScript but when I Playback it then it is giving the following as the result:
    "*Invalid response received from proxy server: HTTP/1.1 502 Proxy Error ( The ISA Server denied the specified Uniform Resource Locator (URL). ).*
    *Comparable WinInet error code: Error 12033: ERROR_INTERNET_INVALID_PROXY_REQUEST.*"
    In ErrorLog following errors are mentioned:
    "*eclipse.buildId=unknown*
    *java.version=1.6.0_07*
    *java.vendor=Sun Microsystems Inc.*
    *BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_IN*
    *Command-line arguments: -os win32 -ws win32 -arch x86*
    *Error*
    *Thu Apr 25 12:00:17 IST 2013*
    *fireActiveProjectChanged*
    *java.lang.IllegalStateException: Error getting Parent Element Id for element-id: 9*
    *     at oracle.oats.scripting.models.store.util.db.ModelDBPersistence.getElementParentId(ModelDBPersistence.java:283)*
    *     at oracle.oats.scripting.models.stores.database.DatabaseStore.getParentId(DatabaseStore.java:287)*
    *     at oracle.oats.scripting.models.stores.database.ResultOverviewStore.getParentId(ResultOverviewStore.java:550)*
    *     at oracle.oats.scripting.models.ModelElement.getParentId(ModelElement.java:275)*
    *     at oracle.oats.scripting.models.ModelAccessor.findParent(ModelAccessor.java:146)*
    *     at oracle.oats.scripting.models.ModelElement.findParent(ModelElement.java:289)*
    *     at oracle.oats.scripting.ui.views.results.ResultsContentProvider.getParent(ResultsContentProvider.java:49)*
    *     at org.eclipse.jface.viewers.AbstractTreeViewer.getParentElement(AbstractTreeViewer.java:1646)*
    *     at org.eclipse.jface.viewers.TreeViewer.getParentElement(TreeViewer.java:601)*
    *     at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpand(AbstractTreeViewer.java:1573)*
    *     at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:2456)*
    *     at org.eclipse.jface.viewers.StructuredViewer.setSelectionToWidget(StructuredViewer.java:1680)*
    *     at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:2864)*
    *     at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1636)*
    *     at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1104)*
    *     at oracle.oats.scripting.ui.views.results.ResultsDisplayView.setSelection(ResultsDisplayView.java:584)*
    *     at oracle.oats.scripting.ui.views.results.ResultsDisplayView.onActiveScriptingProjectChanged(ResultsDisplayView.java:266)*
    *     at oracle.oats.scripting.ui.internal.editors.openScript.OpenScriptEditorRegistry.fireActiveProjectChanged(OpenScriptEditorRegistry.java:377)*
    *     at oracle.oats.scripting.ui.internal.editors.openScript.OpenScriptEditorRegistry.access$8(OpenScriptEditorRegistry.java:371)*
    *     at oracle.oats.scripting.ui.internal.editors.openScript.OpenScriptEditorRegistry$EditorListener.partActivated(OpenScriptEditorRegistry.java:121)*
    *     at org.eclipse.ui.internal.PartListenerList2$1.run(PartListenerList2.java:68)*
    *     at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)*
    *     at org.eclipse.core.runtime.Platform.run(Platform.java:880)*
    *     at org.eclipse.ui.internal.PartListenerList2.fireEvent(PartListenerList2.java:53)*
    *     at org.eclipse.ui.internal.PartListenerList2.firePartActivated(PartListenerList2.java:66)*
    *     at oracle.oats.scripting.ui.internal.TailoredPartService.firePartActivated(TailoredPartService.java:310)*
    *     at oracle.oats.scripting.ui.internal.TailoredPartService.setActivePart(TailoredPartService.java:344)*
    *     at org.eclipse.ui.internal.WWinPartService.updateActivePart(WWinPartService.java:124)*
    *     at org.eclipse.ui.internal.WWinPartService.access$0(WWinPartService.java:115)*
    *     at org.eclipse.ui.internal.WWinPartService$1.partDeactivated(WWinPartService.java:48)*
    *     at org.eclipse.ui.internal.PartListenerList2$4.run(PartListenerList2.java:113)*
    *     at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)*
    *     at org.eclipse.core.runtime.Platform.run(Platform.java:880)*
    *     at org.eclipse.ui.internal.PartListenerList2.fireEvent(PartListenerList2.java:53)*
    *     at org.eclipse.ui.internal.PartListenerList2.firePartDeactivated(PartListenerList2.java:111)*
    *     at oracle.oats.scripting.ui.internal.TailoredPartService.firePartDeactivated(TailoredPartService.java:323)*
    *     at oracle.oats.scripting.ui.internal.TailoredPartService.setActivePart(TailoredPartService.java:338)*
    *     at org.eclipse.ui.internal.WorkbenchPagePartList.fireActivePartChanged(WorkbenchPagePartList.java:56)*
    *     at org.eclipse.ui.internal.PartList.setActivePart(PartList.java:126)*
    *     at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3491)*
    *     at org.eclipse.ui.internal.WorkbenchPage.requestActivation(WorkbenchPage.java:3034)*
    *     at org.eclipse.ui.part.MultiEditor.activateEditor(MultiEditor.java:178)*
    *     at oracle.oats.scripting.ui.internal.editors.openScript.OpenScriptEditor.activateEditor(OpenScriptEditor.java:1247)*
    *     at org.eclipse.ui.part.MultiEditor$1.handleEvent(MultiEditor.java:81)*
    *     at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)*
    *     at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)*
    *     at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)*
    *     at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1008)*
    *     at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1353)*
    *     at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:2443)*
    *     at org.eclipse.swt.widgets.Widget.wmSetFocus(Widget.java:2266)*
    *     at org.eclipse.swt.widgets.Control.WM_SETFOCUS(Control.java:4414)*
    *     at org.eclipse.swt.widgets.Tree.WM_SETFOCUS(Tree.java:6846)*
    *     at org.eclipse.swt.widgets.Control.windowProc(Control.java:3855)*
    *     at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:5791)*
    *     at org.eclipse.swt.widgets.Display.windowProc(Display.java:4528)*
    *     at org.eclipse.swt.internal.win32.OS.SetFocus(Native Method)*
    *     at org.eclipse.swt.widgets.Control.forceFocus(Control.java:974)*
    *     at org.eclipse.swt.widgets.Control.setFocus(Control.java:2811)*
    *     at org.eclipse.swt.widgets.Composite.setFocus(Composite.java:927)*
    *     at oracle.oats.scripting.ui.editors.tree.TreeEditor.setFocus(TreeEditor.java:230)*
    *     at org.eclipse.ui.part.MultiEditor.setFocus(MultiEditor.java:139)*
    *     at org.eclipse.ui.internal.PartPane.setFocus(PartPane.java:325)*
    *     at org.eclipse.ui.internal.EditorPane.setFocus(EditorPane.java:127)*
    *     at org.eclipse.ui.internal.PartStack.presentationSelectionChanged(PartStack.java:846)*
    *     at org.eclipse.ui.internal.PartStack.access$1(PartStack.java:829)*
    *     at org.eclipse.ui.internal.PartStack$1.selectPart(PartStack.java:139)*
    *     at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation$1.handleEvent(TabbedStackPresentation.java:133)*
    *     at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:267)*
    *     at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:276)*
    *     at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.access$1(DefaultTabFolder.java:1)*
    *     at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder$2.handleEvent(DefaultTabFolder.java:87)*
    *     at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)*
    *     at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)*
    *     at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)*
    *     at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012)*
    *     at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:770)*
    *     at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3242)*
    *     at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:2017)*
    *     at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:320)*
    *     at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)*
    *     at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)*
    *     at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)*
    *     at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)*
    *     at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)*
    *     at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)*
    *     at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)*
    *     at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)*
    *     at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)*
    *     at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)*
    *     at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)*
    *     at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)*
    *     at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)*
    *     at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)*
    *     at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)*
    *     at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)*
    *     at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)*
    *     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)*
    *     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)*
    *     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)*
    *     at java.lang.reflect.Method.invoke(Method.java:597)*
    *     at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)*
    *     at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)*
    *     at org.eclipse.equinox.launcher.Main.run(Main.java:1236)*
    *     at org.eclipse.equinox.launcher.Main.main(Main.java:1212)*
    *Caused by: oracle.oats.utilities.db.exceptions.DisconnectDbException: Verify if database connection exists for C:\OracleATS\OFT\iTube3\results\Session3\data*
    *     at oracle.oats.utilities.db.JavaDbSystem.executeQuery(JavaDbSystem.java:335)*
    *     at oracle.oats.utilities.db.core.ElementDao.selectParentId(ElementDao.java:215)*
    *     at oracle.oats.utilities.db.DatabasePersister.getParentIdFor(DatabasePersister.java:89)*
    *     at oracle.oats.scripting.models.store.util.db.ModelDBPersistence.getElementParentId(ModelDBPersistence.java:278)*
    *     ... 104 more*
    *Caused by: java.sql.SQLNonTransientConnectionException: No current connection.*
    *     at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)*
    *     at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)*
    *     at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)*
    *     at org.apache.derby.impl.jdbc.Util.noCurrentConnection(Unknown Source)*
    *     at org.apache.derby.impl.jdbc.EmbedConnection.checkIfClosed(Unknown Source)*
    *     at org.apache.derby.impl.jdbc.EmbedConnection.setupContextStack(Unknown Source)*
    *     at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)*
    *     at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)*
    *     at oracle.oats.utilities.db.util.SQLUtils.prepare(SQLUtils.java:307)*
    *     at oracle.oats.utilities.db.StatementFactory.makeStatement(StatementFactory.java:20)*
    *     at oracle.oats.utilities.db.PreparedStatementCache.addStatement(PreparedStatementCache.java:38)*
    *     at oracle.oats.utilities.db.JavaDbSystem.executeQuery(JavaDbSystem.java:316)*
    *     ... 107 more*
    *Caused by: java.sql.SQLException: No current connection.*
    *     at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)*
    *     at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)*
    *     ... 119 more*
    And in Debug tag I am getting the following errors:
    *"<disconnected>org.eclipse.equinox.launcher.Main at localhost:59115"*
    I am working with OATS on company network and also I am using the correct proxy setting(confirmed). When i tried recording a company internal web application(No Proxy Required) its still giving same proxy errors.
    Error results are always changeing when I change my Port No. for proxy setting (Default Port No for my network is 8080).
    For port No 8080 following error is displayed result tab:
    *"Failed     HTTP response code: 407 Proxy Authentication Required ( Access is denied. )      "*
    For port no 7777 & 443 following error is displayed in the result tab: (Have changed the proxy server address to "xyz"):
    *Failed     The attempt to connect to the server xyzproxy.xyz.com on port 7777 failed.*
    *Comparable WinInet error code: Error 12029: ERROR_INTERNET_CANNOT_CONNECT. Caused by: java.net.ConnectException occurred. Error Message:Connection timed out: connect*
    I have just disabled the cookies from my script, no other changes have been made(no parametrization and no correlation as of now).
    I have tried everything with port numbers and also with Playback settings in openscript preference for proxy, tried to playback the script with proxy, without proxy for both the type of applications, company internal and external but still the same errors.
    Anyone please suggest me a solution to this problem.
    Thanks,
    Abhi.
    Edited by: 1002084 on Apr 25, 2013 12:12 AM

    Hi,
    I think your password is encrypted. Try replace password "a99fad1866af01d9375627d5d08d7f1c11ed4d3f6d5d2372d40908884a15b8e6" with your password.
    Or Get output of obfuscate("your password") and replace "a99fad1866af01d9375627d5d08d7f1c11ed4d3f6d5d2372d40908884a15b8e6" with {{@deobfuscate( output of obfuscate("your password") )}}
    Regards,
    Deepu M

  • How to pass the value of variable to another java file?

    Hi. I have 2 java files (LogonAction.java and PCAction.java). The value of variable(String getrole) depends on the logon user. How can I use this value of variable in PCAction.java? I want to execute a sql statement in PCAction.java which is (String sql="Select * from PP where role"+"='" + getrole + "'") Thanks a lot.
    LogonAction.java is below:
    package test;
    import test.jdbc.util.ConnectionPool;
    import java.sql.*
    import java.util.*;
    import javax.servlet.http.*;
    import org.apache.commons.logging.*;
    import org.apache.struts.action.*;
    import org.apache.struts.util.*;
    import org.apache.commons.beanutils.PropertyUtils;
    public final class LogonAction extends Action {
    private Log log = LogFactory.getLog("org.apache.struts.webapp.Example");
    private ConnectionPool pool;
    public LogonAction() {
    pool = ConnectionPool.getInstance();
    public String getrole;
    public ActionForward execute(ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception {
    Locale locale = getLocale(request);
    MessageResources messages = getResources(request);
    ActionErrors errors = new ActionErrors();
    String username = (String)PropertyUtils.getSimpleProperty(form, "username");
    String password = (String)PropertyUtils.getSimpleProperty(form, "password");
    String getusername=CheckUser(username,password);
    getrole=getusername;
    java.lang.System.out.println(getrole);
    if ("".equals(getusername))
    errors.add(ActionErrors.GLOBAL_ERROR,
    new ActionError("error.password.mismatch"));
    getusername=username+getusername;
    // Report any errors we have discovered back to the original form
    if (!errors.isEmpty()) {
    saveErrors(request, errors);
    return (mapping.getInputForward());
    // Save our logged-in user in the session
    HttpSession session = request.getSession();
    session.setAttribute(Constants.USER_KEY, getusername);
    if (log.isDebugEnabled()) {
    log.debug("LogonAction: User '" + username +
    "' logged on in session " + session.getId());
    // Remove the obsolete form bean
    if (mapping.getAttribute() != null) {
    if ("request".equals(mapping.getScope()))
    request.removeAttribute(mapping.getAttribute());
    else
    session.removeAttribute(mapping.getAttribute());
    // Forward control to the specified success URI
    return (mapping.findForward("success"));
    * Look up the user, throwing an exception to simulate business logic
    * rule exceptions.
    * @param database Database in which to look up the user
    * @param username Username specified on the logon form
    * @exception ModuleException if a business logic rule is violated
    public String CheckUser(String username,String password){
    Connection con = null;
    try
    con = pool.getConnection();
    String sql = "SELECT * from user WHERE userid = ? AND password= ?";
    PreparedStatement ps = null;
    ResultSet rs = null;
    try {
    if (con.isClosed()) {
    throw new IllegalStateException("error.con.isClosed");
    ps = con.prepareStatement(sql);
    ps.setString(1,username);
    ps.setString(2,password);
    rs = ps.executeQuery();
    String returnstr="";
    while(rs.next())
    returnstr=rs.getString("role");
    java.lang.System.out.println(returnstr);
    return returnstr;
    } catch (SQLException e) {
    e.printStackTrace();
    throw new RuntimeException("error.ps.executeQuery");
    } finally {
    try {
    if (ps != null)
    ps.close();
    if (rs != null)
    rs.close();
    } catch (SQLException e) {
    e.printStackTrace();
    throw new RuntimeException("error.rs.close");
    catch (SQLException e)
    e.printStackTrace();
    throw new RuntimeException("Unable to get connection.");
    finally
    try
    if (con != null)
    con.close();
    catch (SQLException e)
    throw new RuntimeException(e.getMessage());
    }

    You can use PreparedStatement and
    String cmd = "select * from PP where role=?";
    PreparedStatement stmt = conn.prepareStatement(cmd);
    stmt.setString(1,theRole);

  • Managing Server Encryption Keys in IDM 8.1

    I am trying to import the server encryption key from my local machine to the development environment. However, I get the error "java.lang.IllegalStateException: Error attempting to decrypt: Given final block not properly padded".
    I am attempting to import the keys with the lh import command like I would with the other custom configuration objects. I have checked the JDK on my machine vs the development machine and they are both running JDK's from Sun.
    Any ideas?

    Hi,
    Some more information would be helpful. What versions of IDM, what vendor and version of JDK, what server encryption type is configured for each IDM server, how was the key exported, have you tried importing a key from any other IDM instance, etc. The more info, the better.
    Thanks,
    Mike

Maybe you are looking for

  • Date/Time Difference Anomaly in OC4J 9.0.4 Webservices.

    Hi all, We have a very peculiar problem with certain Dates in OC4J webservice. We checked the date on the client before it gets sent to the server and when the server (webservice) receives it, it's off by 1 hour, and vice versa. The strange thing is

  • Numbers '09 - Prefs

    Will someone answer this question, please;  I have 'backup previous versions when saving' checked in the preferences but the back-up is not being saved; Whats wrong? Thanks, Greg

  • ITune plus upgrade question

    Hey guys, I've upgraded all my music to iTunes plus about a year ago when everything switched over. Just recently, iTunes has been showing me the option to upgrade some more songs. Problem is, I've already upgraded these songs, and they are being lis

  • MAJOR BUG. I'm unable to save my song

    Hello all, Hopefully someone is aware of this devastating bug and has some advice. Simply, I have been recording piano/midi, with an apple loop in the background. When I attempt to save, sometimes, it says the song "main writing template" cannot be s

  • LR will not start

    Lightroom will not start.  Receive msg. that other program is using catalog, select other catalog.  No other program is open.  Receive same msg. in Safe mode and clean boot.  Tried creating another catalog and selecting it but continue to receive sam