StringIndexOutOfBoundsException() 8

hello, I need your help with some code I dont understand what the bug is.
the code reads and writes some textfile that has inside:
sometext\n\rsometext\n\r...sometext\n\r\u001a
the buggy code that gives the exception at runtime is:
import java.io.*;
import java.awt.*;
import javax.swing.*;
//import java.util.*;
public class WriteInstallCfg
     private BufferedReader bufferpath, readbuffer;
     private String path, cfg, readline;
     private BufferedWriter writebuffer;
     public WriteInstallCfg(JFrame vonbraun, String path)
          try
               this.path = path;
               //lesen der install.cfg und Eigenschaften
               cfg = "";
               readbuffer = new BufferedReader( new FileReader(path + System.getProperty("file.separator") + "install.cfg"));
               readline = readbuffer.readLine();
               while(!readline.equalsIgnoreCase("\u001a"))
                    try
                         if(readline.substring(0, 8).equalsIgnoreCase("language"))
                              if(XerxesMain.langlist.getSelectedIndex() == 1)
                                   cfg = cfg + "language english" + "\r";
                              else
                                   cfg = cfg + "language german" + "\r";
                         else
                              cfg += readline + "\r";
                    catch(StringIndexOutOfBoundsException el)
                         System.out.println("WriteInstallCfg " + el + " Readerror!");
                    readline = readbuffer.readLine();
                    System.out.println(readline);
               cfg += readline;
               readbuffer.close();
               //schreiben der install.cfg
               writebuffer = new BufferedWriter( new FileWriter(path + System.getProperty("file.separator") + "install.cfg"));
               try
                    int start, end;
                    start = 0;
                    end = 0;
                    while(!cfg.substring(start, start).equalsIgnoreCase("\u001a"))
                         if(cfg.substring(end, end).equalsIgnoreCase("\r"))
                              writebuffer.write(cfg.substring(start, (end)));
                              start = end + 1;
                              System.out.println(cfg);
                         end++;
                    writebuffer.write(cfg.substring(start, start));
               catch(IOException ei)
                    System.out.println(ShockCfg.txt.getString("WICErrFehler"));
               writebuffer.close();
          catch(IOException e)
               System.out.println(ShockCfg.txt.getString("WICErrFehler2") + e);
}this code should simply replace some language.
can anyone help me?
thx

Okay! I have this file:
cd_path D:\
install_path C:\Sshock2
language english
resname_base C:\Sshock2+D:\shock
load_path C:\Sshock2+D:\shock
script_module_path C:\Sshock2+D:\shock
movie_path C:\Sshock2\cutscenes+D:\shock\cutscenesthis code:
cfg = "";
               readbuffer = new BufferedReader( new FileReader(path + System.getProperty("file.separator") + "install.cfg"));
               while((readline = readbuffer.readLine()) != null)
                    try
                         if(readline.contains("language"))
                              if(XerxesMain.langlist.getSelectedIndex() == 1)
                                   cfg = (new StringBuffer(cfg)).append("language english\n\r").toString();
                              else
                                   cfg = (new StringBuffer(cfg)).append("language german\n\r").toString();
                         else
                              cfg = (new StringBuffer(cfg)).append(readline).toString();
                              cfg = (new StringBuffer(cfg)).append("\r").toString();
                    catch(StringIndexOutOfBoundsException el)
                         System.out.println("WriteInstallCfg " + el + " Readerror!");
                    System.out.println(cfg);
                    //System.out.println(readline);
               readbuffer.close();
               System.out.print(cfg);and this output:
cd_path D:\
install_path C:\Sshock2
language englishSshock2
language englishSshock2
resname_base C:\Sshock2+D:\shock
language englishSshock2
load_path C:\Sshock2+D:\shockock
language englishSshock2
script_module_path C:\Sshock2+D:\shock
language englishSshock2
movie_path C:\Sshock2\cutscenes+D:\shock\cutscenes
language englishSshock2
→ovie_path C:\Sshock2\cutscenes+D:\shock\cutscenes
language englishSshock2
language englishSshock2utscenes+D:\shock\cutscenes
→ovie_path C:\Sshock2\cutscenes+D:\shock\cutscenesso what is wrong? why is the sting not added one more line each turnus?
big thx!

Similar Messages

  • Receiver FTP adapter java.lang.StringIndexOutOfBoundsException

    Hi,
    i'm getting the following error trying to reach an FTP server using a Receiver CC:
    Attempt to process file failed with Error occurred while connecting to the FTP server "xxxxxx:21": java.lang.StringIndexOutOfBoundsException
    Any help would be really appreciated
    Thanks
    Simona Milione

    Hi
    check the fixedFieldLength parameter for all the fields in you File COntent COnversion
    there is some field whose length is greater than what you specified in FCC
    regards
    krishna

  • Java.lang.StringIndexOutOfBoundsException when executing query on Oracle 9i

    SQL Deverloper Build 1467
    Windows XP
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    I have the following query being executed in SQL Worksheet.
    select * from address
    where address_id in (1, 2, 3, .... 1000, 1001);
    If I have <= 1000 expressions, it executes but if it has > 1000, the query does not return this error "ORA-01795: maximum number of expressions in a list is 1000". When I ran this it in console, it gave me this error. In oracle 10G it works fine.
    java.lang.StringIndexOutOfBoundsException: String index out of range: 16058
    at java.lang.String.substring(String.java:1765)
    at oracle.dbtools.raptor.scriptrunner.SQL.run(SQL.java:73)
    at oracle.dbtools.raptor.scriptrunner.ScriptRunner.run(ScriptRunner.java:116)
    at oracle.dbtools.raptor.scriptrunner.ScriptRunner.run(ScriptRunner.java:186)
    I think this is a bug in the 9i module.
    -Nags

    Anil kumar wrote:
    Hi,
    Thanks for your reply. Could you please explain your solution in detail?Hi,
    I just have a try...
    create table t (id int,my_lob clob)
    begin
    insert into t values(101,'Oracle redwood shores USA');
    insert into t values (102,'HP palo alto USA');
    insert into t values(103,'Capgemini  FRANCE');;
    end;
    create index my_idx on t(my_lob) indextype is ctxsys.context
    select *
    from t
    where contains(my_lob,'USA',1)>0
    Output
    ID      MY_LOB
    101     Oracle redwood shores USA
    102     HP palo alto USA Hope it helps,
    CKLP

  • MP Error: StringIndexOutOfBoundsException: String index out of range: -1

    Hi All,
    We are using PI 7.1 EHP1, Where in we would like to see the capabilty of User-Module for Conversion of IDoc Messages Between Flat and XML Formats. Gone thru the blog (/people/sap.user72/blog/2005/07/04/get-into-the-zone - Part 2) and maintained the necessary NWA configurations and maintained the necessary module parameters (SAPRelease, SourceJRA, TargetDestination) in Sender File Adapter.
    Now the file is not been picked by file adapter upon checking the Comm Channel Monitoring below error:
    MP: exception caught with cause java.lang.StringIndexOutOfBoundsException: String index out of range -1
    Any help would be highly appreciated.
    Thanks in advance

    Hi Ramani,
    I hope you must have found a solution on this, if not then kindly consider changing your source files, as this error corresponds to only one thing: i.e. DATA Issue. You need to correct the data which you providing to the module for conversion.
    I faced this problem and corrected it by just correcting my test file.
    Regards,
    Nipun Shedhani

  • FTP Sender Channel error " java.lang.StringIndexOutOfBoundsException""

    Dear All,
    Scenario:File to IDOC
    File Type: Fixed Length
    I am getting below error in Sender Channel.
    Error "Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR converting document line no. 2 according to structure 'Item':java.lang.StringIndexOutOfBoundsException"
    Note:We are using header and Item.Header is not repating and Item should repeate N times.we are using the KeyField Name for both header and Item.
    Kindly suggest me the Parameter to use for the sender channel.
    Edited by: manikandansit on Jan 17, 2011 12:53 PM

    Dear All,
    Thanks for your suggestions.
    the issues has been resolved.
    there are so many spaces between the each field data in the source file and i was using the value as SPACE for the parameter Name.fieldSeparator and it taken each space as a data or something else. finally i had removed this parameter and Interfaces works fine now.
    Thanks

  • StringIndexOutOfBoundsException from Mail Adapter

    Hi,
    We have configured a sender communication channel for the mail adapter, but when we receive an email we get the following error message:
    <i>error occured: exception caught during processing mail message; java.lang.StringIndexOutOfBoundsException: String index out of range: -1</i>
    Our configuration is the following:
    Transport Protocol:  IMAP4
    Message protocol:    (tried both)
    URL:                 imap://exchangeServerHost
    The emails we tested with are plain/text emails. We tried both with an XML document as the main body of the email and with the XML document as an attachment, but the error remains the same.
    If anyone has some ideas on how to resolve or troubleshoot this it would be appreciated.
    Thanks in advance,
    Erik.

    Thanks Ranjit...I fixed the error. It was the URL I was missing the inbox from the URL.
    Check the following thread:
    Email Adapter Throwing Error
    Message was edited by:
            Alaa Qasem

  • StringIndexOutOfBoundsException when deploying exploded

    I'm trying to deploy an application by copying it into <domain>/applications.
    I've pasted the exception below. It mentions ManifestEntry issues. I don't understand this. I'm not deploying a .war, .ear or .jar file, so why is WebLogic complaining about manifests? Is it trying to deploy a .jar in /APP-INF/lib or <web-app>/WEB-INF/lib before it's fully copied into the auto-deploy directory?
    All help will be appreciated.
    - Laran
    <Dec 15, 2004 11:45:50 AM GMT-05:00> <Info> <WebLogicServer> <BEA-000377> <Start
    ing WebLogic Server with Java HotSpot(TM) Client VM Version 1.4.2-b28 from Sun M
    icrosystems Inc.>
    <Dec 15, 2004 11:45:51 AM GMT-05:00> <Info> <Configuration Management> <BEA-1500
    16> <This server is being started as the administration server.>
    <Dec 15, 2004 11:45:51 AM GMT-05:00> <Info> <Management> <BEA-141107> <Version:
    WebLogic Server 8.1 SP3 Tue Jun 29 23:11:19 PDT 2004 404973
    WebLogic XMLX Module 8.1 SP3 Tue Jun 29 23:11:19 PDT 2004 404973 >
    <Dec 15, 2004 11:45:51 AM GMT-05:00> <Notice> <Management> <BEA-140005> <Loading
    domain configuration from configuration repository at C:\bea\user_projects\doma
    ins\mydomain\.\config.xml.>
    <Dec 15, 2004 11:45:52 AM GMT-05:00> <Notice> <Log Management> <BEA-170019> <The
    server log file C:\bea\user_projects\domains\mydomain\myserver\myserver.log is
    opened. All server side log events will be written to this file.>
    <Dec 15, 2004 11:45:53 AM GMT-05:00> <Notice> <Security> <BEA-090082> <Security
    initializing using security realm myrealm.>
    <Dec 15, 2004 11:45:53 AM GMT-05:00> <Notice> <WebLogicServer> <BEA-000327> <Sta
    rting WebLogic Admin Server "myserver" for domain "mydomain">
    <Dec 15, 2004 11:45:56 AM GMT-05:00> <Notice> <WebLogicServer> <BEA-000331> <Sta
    rted WebLogic Admin Server "myserver" for domain "mydomain" running in Developme
    nt Mode>
    <Dec 15, 2004 11:45:56 AM GMT-05:00> <Notice> <WebLogicServer> <BEA-000360> <Ser
    ver started in RUNNING mode>
    <Dec 15, 2004 11:45:56 AM GMT-05:00> <Notice> <WebLogicServer> <BEA-000355> <Thr
    ead "ListenThread.Default" listening on port 7001, ip address *.*>
    <Dec 15, 2004 11:50:00 AM GMT-05:00> <Warning> <Deployer> <BEA-149004> <Failures
    were detected while initiating Deploy task for application dfaFinSys2.>
    <Dec 15, 2004 11:50:00 AM GMT-05:00> <Error> <Deployer> <BEA-149201> <Failed to
    complete the deployment task with ID 0 for the application dfaFinSys2.
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1444)
    at weblogic.utils.jars.ManifestEntry.stream(ManifestEntry.java:171)
    at weblogic.utils.jars.Manifest.stream(Manifest.java:78)
    at weblogic.utils.classloaders.ExtractionHelper.resolveManifestName(Extr
    actionHelper.java:410)
    at weblogic.utils.classloaders.ExtractionHelper.extractClassFiles(Extrac
    tionHelper.java:238)
    at weblogic.utils.classloaders.LibDirClassFinder.<init>(LibDirClassFinde
    r.java:33)
    at weblogic.j2ee.J2EEApplicationContainer.getNewApplicationClassLoader(J
    2EEApplicationContainer.java:711)
    at weblogic.j2ee.J2EEApplicationContainer.access$300(J2EEApplicationCont
    ainer.java:182)
    at weblogic.j2ee.J2EEApplicationContainer$CLNode.<init>(J2EEApplicationC
    ontainer.java:4068)
    at weblogic.j2ee.J2EEApplicationContainer.initClassLoaderTree(J2EEApplic
    ationContainer.java:3425)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:989)
    at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.
    prepareContainer(SlaveDeployer.java:2444)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createCon
    tainer(SlaveDeployer.java:2394)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(S
    laveDeployer.java:2310)
    at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(Sla
    veDeployer.java:866)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDepl
    oyer.java:594)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDep
    loyer.java:508)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHan
    dler.java:25)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    --------------- nested within: ------------------
    weblogic.management.ManagementException: - with nested exception:
    [java.lang.StringIndexOutOfBoundsException: String index out of range: -1]
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(S
    laveDeployer.java:2327)
    at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(Sla
    veDeployer.java:866)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDepl
    oyer.java:594)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDep
    loyer.java:508)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHan
    dler.java:25)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    >

    I'm trying to deploy an application by copying it into <domain>/applications.
    I've pasted the exception below. It mentions ManifestEntry issues. I don't understand this. I'm not deploying a .war, .ear or .jar file, so why is WebLogic complaining about manifests? Is it trying to deploy a .jar in /APP-INF/lib or <web-app>/WEB-INF/lib before it's fully copied into the auto-deploy directory?
    All help will be appreciated.
    - Laran
    <Dec 15, 2004 11:45:50 AM GMT-05:00> <Info> <WebLogicServer> <BEA-000377> <Start
    ing WebLogic Server with Java HotSpot(TM) Client VM Version 1.4.2-b28 from Sun M
    icrosystems Inc.>
    <Dec 15, 2004 11:45:51 AM GMT-05:00> <Info> <Configuration Management> <BEA-1500
    16> <This server is being started as the administration server.>
    <Dec 15, 2004 11:45:51 AM GMT-05:00> <Info> <Management> <BEA-141107> <Version:
    WebLogic Server 8.1 SP3 Tue Jun 29 23:11:19 PDT 2004 404973
    WebLogic XMLX Module 8.1 SP3 Tue Jun 29 23:11:19 PDT 2004 404973 >
    <Dec 15, 2004 11:45:51 AM GMT-05:00> <Notice> <Management> <BEA-140005> <Loading
    domain configuration from configuration repository at C:\bea\user_projects\doma
    ins\mydomain\.\config.xml.>
    <Dec 15, 2004 11:45:52 AM GMT-05:00> <Notice> <Log Management> <BEA-170019> <The
    server log file C:\bea\user_projects\domains\mydomain\myserver\myserver.log is
    opened. All server side log events will be written to this file.>
    <Dec 15, 2004 11:45:53 AM GMT-05:00> <Notice> <Security> <BEA-090082> <Security
    initializing using security realm myrealm.>
    <Dec 15, 2004 11:45:53 AM GMT-05:00> <Notice> <WebLogicServer> <BEA-000327> <Sta
    rting WebLogic Admin Server "myserver" for domain "mydomain">
    <Dec 15, 2004 11:45:56 AM GMT-05:00> <Notice> <WebLogicServer> <BEA-000331> <Sta
    rted WebLogic Admin Server "myserver" for domain "mydomain" running in Developme
    nt Mode>
    <Dec 15, 2004 11:45:56 AM GMT-05:00> <Notice> <WebLogicServer> <BEA-000360> <Ser
    ver started in RUNNING mode>
    <Dec 15, 2004 11:45:56 AM GMT-05:00> <Notice> <WebLogicServer> <BEA-000355> <Thr
    ead "ListenThread.Default" listening on port 7001, ip address *.*>
    <Dec 15, 2004 11:50:00 AM GMT-05:00> <Warning> <Deployer> <BEA-149004> <Failures
    were detected while initiating Deploy task for application dfaFinSys2.>
    <Dec 15, 2004 11:50:00 AM GMT-05:00> <Error> <Deployer> <BEA-149201> <Failed to
    complete the deployment task with ID 0 for the application dfaFinSys2.
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1444)
    at weblogic.utils.jars.ManifestEntry.stream(ManifestEntry.java:171)
    at weblogic.utils.jars.Manifest.stream(Manifest.java:78)
    at weblogic.utils.classloaders.ExtractionHelper.resolveManifestName(Extr
    actionHelper.java:410)
    at weblogic.utils.classloaders.ExtractionHelper.extractClassFiles(Extrac
    tionHelper.java:238)
    at weblogic.utils.classloaders.LibDirClassFinder.<init>(LibDirClassFinde
    r.java:33)
    at weblogic.j2ee.J2EEApplicationContainer.getNewApplicationClassLoader(J
    2EEApplicationContainer.java:711)
    at weblogic.j2ee.J2EEApplicationContainer.access$300(J2EEApplicationCont
    ainer.java:182)
    at weblogic.j2ee.J2EEApplicationContainer$CLNode.<init>(J2EEApplicationC
    ontainer.java:4068)
    at weblogic.j2ee.J2EEApplicationContainer.initClassLoaderTree(J2EEApplic
    ationContainer.java:3425)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:989)
    at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.
    prepareContainer(SlaveDeployer.java:2444)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createCon
    tainer(SlaveDeployer.java:2394)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(S
    laveDeployer.java:2310)
    at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(Sla
    veDeployer.java:866)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDepl
    oyer.java:594)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDep
    loyer.java:508)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHan
    dler.java:25)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    --------------- nested within: ------------------
    weblogic.management.ManagementException: - with nested exception:
    [java.lang.StringIndexOutOfBoundsException: String index out of range: -1]
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(S
    laveDeployer.java:2327)
    at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(Sla
    veDeployer.java:866)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDepl
    oyer.java:594)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDep
    loyer.java:508)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHan
    dler.java:25)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    >

  • File processing failed with java.lang.StringIndexOutOfBoundsException:

    Hi
    I´m reading and sending files to an FTP server using SAP PI. I use file content conversion.
    Everything has been working fine for months - but now the server was changes to a new host. The only thing changed was the host/user and pass.
    But sending too the server fails with this error:
    File processing failed with java.lang.StringIndexOutOfBoundsException: String index out of range: -27
    Any body who has a clue??
    Reading files works ok. And i can transfer files to the FTP server with FileZilla without problems.

    In the file transfer by ftp:
    2011-10-03 17:27:08     Information     Transfer: "BIN" mode, size 737 bytes, encoding -.
    2011-10-03 17:27:08     Error     File processing failed with java.lang.StringIndexOutOfBoundsException: String index out of range: -27
    2011-10-03 17:27:08     Error     Adapter Framework caught exception: String index out of range: -27
    2011-10-03 17:27:08     Error     Delivering the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error occurred while connecting to the FTP server "nnn.nn.nnn.nnn:21": java.lang.StringIndexOutOfBoundsException: String index out of range: -27.
    Its on the adapter level. All mappings etc are fine. And as i write has been for months. The only thing changed are the FTP server

  • Java.lang.StringIndexOutOfBoundsException: String index out of range: -1

    hi am having this error when running my application am in jdeveloper 11.1.1.6.0
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at java.lang.String.substring(String.java:1931)
         at car.deDeedandeSurvey.view.frameworkExt.CustomErrorHandler.displayProperly(CustomErrorHandler.java:66)
         at car.eDeedandeSurvey.view.frameworkExt.CustomErrorHandler.reportException(CustomErrorHandler.java:32)
         at oracle.adf.model.binding.DCBindingContainer.reportException(DCBindingContainer.java:423)
         at oracle.adf.model.binding.DCBindingContainer.reportException(DCBindingContainer.java:471)
         at oracle.adf.model.binding.DCIteratorBinding.getDataControl(DCIteratorBinding.java:2438)
         at oracle.adf.model.binding.DCBindingContainer.internalRefreshControl(DCBindingContainer.java:3069)
         at oracle.adf.model.binding.DCBindingContainer.refreshControl(DCBindingContainer.java:2908)
         at oracle.adf.model.binding.DCBindingContainer.refresh(DCBindingContainer.java:2894)
         at oracle.adfinternal.controller.util.model.DataBindingActivityImpl.beforeExecute(DataBindingActivityImpl.java:109)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.executeActivity(ControlFlowEngine.java:1015)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:921)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:820)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.invokeTaskFlow(ControlFlowEngine.java:243)
         at oracle.adfinternal.controller.state.ChildViewPortContextImpl.invokeTaskFlow(ChildViewPortContextImpl.java:104)
         at oracle.adfinternal.controller.state.ControllerState.createChildViewPort(ControllerState.java:1387)
         at oracle.adfinternal.controller.ControllerContextImpl.createChildViewPort(ControllerContextImpl.java:78)
         at oracle.adf.controller.internal.binding.DCTaskFlowBinding.createRegionViewPortContext(DCTaskFlowBinding.java:474)
         at oracle.adf.controller.internal.binding.DCTaskFlowBinding.getViewPort(DCTaskFlowBinding.java:392)
         at oracle.adf.controller.internal.binding.TaskFlowRegionModel.doProcessBeginRegion(TaskFlowRegionModel.java:164)
         at oracle.adf.controller.internal.binding.TaskFlowRegionModel.processBeginRegion(TaskFlowRegionModel.java:112)
         at oracle.adf.controller.internal.binding.TaskFlowRegionController.doRegionRefresh(TaskFlowRegionController.java:241)
         at oracle.adf.controller.internal.binding.TaskFlowRegionController.refreshRegion(TaskFlowRegionController.java:119)
         at oracle.adf.model.binding.DCBindingContainer.internalRefreshControl(DCBindingContainer.java:3204)
         at oracle.adf.model.binding.DCBindingContainer.refresh(DCBindingContainer.java:2876)
         at oracle.adf.model.binding.DCBindingContainer.internalRefreshControl(DCBindingContainer.java:3195)
         at oracle.adf.model.binding.DCBindingContainer.refresh(DCBindingContainer.java:2876)
         at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.prepareModel(PageLifecycleImpl.java:115)
         at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.prepareModel(FacesPageLifecycle.java:359)
         at car.eDeedandeSurvey.view.frameworkExt.CustomLifeCycle.prepareModel(CustomLifeCycle.java:15)
         at oracle.adf.controller.v2.lifecycle.Lifecycle$2.execute(Lifecycle.java:137)
         at oracle.adfinternal.controller.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:197)
         at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.access$400(ADFPhaseListener.java:23)
         at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$PhaseInvokerImpl.startPageLifecycle(ADFPhaseListener.java:238)
         at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$1.after(ADFPhaseListener.java:274)
         at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:75)
         at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.afterPhase(ADFLifecyclePhaseListener.java:53)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:472)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.portlet.client.adapter.adf.ADFPortletFilter.doFilter(ADFPortletFilter.java:32)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.webcenter.framework.events.dispatcher.EventDispatcherFilter.doFilter(EventDispatcherFilter.java:44)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.wcps.client.PersonalizationFilter.doFilter(PersonalizationFilter.java:75)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.webcenter.content.integration.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:168)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.webcenter.lifecycle.filter.LifecycleLockFilter.doFilter(LifecycleLockFilter.java:151)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

    The problem occurs at line 66 in class car.deDeedandeSurvey.view.frameworkExt.CustomErrorHandler, which is a non-ADF class, most probably it is a class of your own. Go to line 66 in this class and look at the source code. If it is not clear what happens there, set a breakpoint within the method car.deDeedandeSurvey.view.frameworkExt.CustomErrorHandler.displayProperly and debug it. If you do not have the original source code, then decompile this class and look at the source code. You can set a breakpoint at this line even if you do not have the source code.
    Dimitar

  • StringIndexOutOfBoundsException

    Scenario is BAPI to Webserver.
    Iam getting following error message at my webserver(target system) and there is no error message in MONI its processed successfully.
    Receiver communication channel is SOAP.Its a asynch interface.
    java.lang.StringIndexOutOfBoundsException: String index out of range: 28
    Please help me why Iam getting this error.
    Thanks

    Hi,
    Chek this link..a similiar problem is discussed here..
    SOAP Adapter and StringIndexOutOfBoundsException
    Edited by: swathi suresh on Aug 27, 2008 8:58 AM

  • StringIndexOutOfBoundsException for ess~de~pdata Webdynpro

    Hi All,
              Need your help. I'm getting the following JAVA exception while I'm trying to Launch Personal Information --> Personal Data for Germany. I tried to test both the Iview (preview option) and Application "Per_Personal_DE" of Webdynpro "sap.com/essdepdata" and all resulted in the same exception. Everything being used is the standard SAP delivered ESS business package. Can anyone throw some light on this issue.
    java.lang.StringIndexOutOfBoundsException: String index out of range: 4
         at java.lang.String.substring(String.java:1441)
         at com.sap.xss.per.fc.persinfo.FcPersInfo.CreateOverview(FcPersInfo.java:929)
         at com.sap.xss.per.fc.persinfo.wdp.InternalFcPersInfo.CreateOverview(InternalFcPersInfo.java:820)
         at com.sap.xss.per.fc.persinfo.FcPersInfoInterface.CreateOverview2(FcPersInfoInterface.java:333)
         at com.sap.xss.per.fc.persinfo.FcPersInfoInterface.CreateOverview(FcPersInfoInterface.java:316)
         at com.sap.xss.per.fc.persinfo.wdp.InternalFcPersInfoInterface.CreateOverview(InternalFcPersInfoInterface.java:327)
         at com.sap.xss.per.fc.persinfo.wdp.InternalFcPersInfoInterface$External.CreateOverview(InternalFcPersInfoInterface.java:475)
         at com.sap.xss.hr.per.de.personal.overview.BizCardsView.wdDoModifyView(BizCardsView.java:152)
         at com.sap.xss.hr.per.de.personal.overview.wdp.InternalBizCardsView.wdDoModifyView(InternalBizCardsView.java:342)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doModifyView(DelegatingView.java:78)
         at com.sap.tc.webdynpro.progmodel.view.View.modifyView(View.java:337)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.doModifyView(ClientComponent.java:481)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.doModifyView(ClientComponent.java:488)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doModifyView(WindowPhaseModel.java:551)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:148)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:299)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:759)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:712)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:261)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         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:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Thanks in advance,
    Best Regards,
    Subhadip

    Hello Subhadip,
    I remember encountering this error ....but not sure whether we applied a note or fixed it in webdynpro....in webdynpro you have to goto the ess~per DC -> FcPersInfo Component Controller -> CreateOverView() method ...and you have to fix it there....
    Shikhil

  • Java.lang.StringIndexOutOfBoundsException while deploying webapp

    Hi all,
    I'm trying to deploy an expanded webapp on WebLogic 6.0sp1. It's a
    migration from 5.1, some hundred JSPs, some servlets and custom tags in
    WEB-INF/classes and a few static pages. I placed the web-application
    folder in the applications folder and the server begins the deployment.
    During deployment I get a StringIndexOutOfBoundsException and the
    deployment stops (see log extract below). By the time when this happens,
    there is a new .ear file and a war file (seem to be the same) containing
    my web application. This is a real show-stopper for me, so I'd be glad
    for any recommendations.
    Thanks,
    Daniel
    [java] <14.03.2001 18:28:11 GMT+01:00> <Info> <Management>
    <MBean=(fbsdomain:Name=futuna,Type=Application) Attribute=(LastModified)
    modified from (0) to (984590891366).>
    [java] <14.03.2001 18:28:11 GMT+01:00> <Info> <Management>
    <MBean=(fbsdomain:Name=futuna,Type=WebAppComponent,Application=futuna)
    Attribute=(Application) modified from (null) to (fbsdomain:Name=f
    utuna,Type=Application).>
    [java] <14.03.2001 18:28:11 GMT+01:00> <Info> <Management>
    <MBean=(fbsdomain:Name=futuna,Type=WebAppComponent,Application=futuna)
    Attribute=(Application) modified from (fbsdomain:Name=futuna,Type
    =Application) to (fbsdomain:Name=futuna,Type=Application).>
    [java] <14.03.2001 18:28:11 GMT+01:00> <Info> <Management>
    <MBean=(fbsdomain:Name=futuna,Type=WebAppComponent,Application=futuna)
    Attribute=(URI) modified from (null) to (futuna).>
    [java] <14.03.2001 18:28:11 GMT+01:00> <Info> <Management>
    <MBean=(fbsdomain:Name=futuna,Type=WebAppComponent,Application=futuna)
    Attribute=(ContextPath) modified from (null) to (futuna).>
    [java] <14.03.2001 18:28:11 GMT+01:00> <Info> <Management>
    <MBean=(fbsdomain:Name=futuna,Type=Application) Attribute=(LoadError)
    modified from (null) to (null).>
    [java] <14.03.2001 18:28:16 GMT+01:00> <Info> <HTTP> <[HTTP
    fbsserver] Loading web app: futuna>
    [java] <14.03.2001 18:28:16 GMT+01:00> <Info> <HTTP> <[HTTP
    fbsserver] Loading futuna from WAR file:
    c:\dev\fbs\application\config\fbsdomain\applications\.wl_temp_do_not_del
    ete\wl_local_comp19242
    .war>
    [java] <14.03.2001 18:28:16 GMT+01:00> <Info> <HTTP> <[Default
    WebApp] extracting classfiles to
    c:\dev\fbs\application\config\fbsdomain\applications\.wl_temp_do_not_del
    ete\WEB-INF\_tmp_war_fbsser
    ver_fbsserver_futuna:>
    [java] <14.03.2001 18:28:17 GMT+01:00> <Info> <HTTP> <[Default
    WebApp] extracted classfiles successfully...>
    [java] <14.03.2001 18:28:17 GMT+01:00> <Debug> <HTTP> <Exception
    thrown while loading futuna: java.lang.StringIndexOutOfBoundsException:
    String index out of range: -1>
    [java] <14.03.2001 18:28:17 GMT+01:00> <Error> <J2EE> <Error
    deploying application futuna: Could not load futuna>
    [java] <14.03.2001 18:28:17 GMT+01:00> <Info> <Management>
    <MBean=(fbsdomain:Name=futuna,Type=Application) Attribute=(Deployed)
    modified from (true) to (true).>
    [java] <14.03.2001 18:28:36 GMT+01:00> <Error> <HTTP>
    <HttpServer(4062427,null default ctx,fbsserver) found no context for
    "GET /futuna HTTP/1.1". This should not happen unless the default contex
    t failed to deploy.>
    [java] <14.03.2001 18:28:45 GMT+01:00> <Error> <HTTP>
    <HttpServer(4062427,null default ctx,fbsserver) found no context for
    "GET /futuna/ HTTP/1.1". This should not happen unless the default conte
    xt failed to deploy.>
    [java] <14.03.2001 18:30:27 GMT+01:00> <Info> <HTTP>
    <[WebAppServletContext(4114264,console)] *.html: init>
    [java] <14.03.2001 18:30:27 GMT+01:00> <Info> <HTTP>
    <[WebAppServletContext(4114264,console)] *.html: Using standard I/O>

    Hi Kumar,
    thanks for the hint, but that did not solve the problem. I reworked
    web.xml and weblogic.xml (some 5.1 things inside) and now it works.
    Daniel
    -----Ursprüngliche Nachricht-----
    Von: Kumar Allamraju [mailto:[email protected]]
    Bereitgestellt: Mittwoch, 14. März 2001 22:35
    Bereitgestellt in: install
    Unterhaltung: java.lang.StringIndexOutOfBoundsException while deploying
    webapp
    Betreff: Re: java.lang.StringIndexOutOfBoundsException while deploying
    webapp
    It appears your default webapp failed to deploy.
    Add the following entry (red ink) in your config.xml (carefully) and see
    if you are able to deploy default webapp
    <Application
    Deployed="true"
    Name="DefaultWebApp_myserver"
    Path="./config/myserver/applications"
    >
    <WebAppComponent
    Name="DefaultWebApp_myserver"
    Targets="myserver"
    WebServers="myserver"
    URI="DefaultWebApp_myserver"
    />
    </Application>
    Daniel Hoppe wrote:
    Hi all,
    I'm trying to deploy an expanded webapp on WebLogic 6.0sp1. It's a
    migration from 5.1, some hundred JSPs, some servlets and custom tags in
    WEB-INF/classes and a few static pages. I placed the web-application
    folder in the applications folder and the server begins the deployment.
    During deployment I get a StringIndexOutOfBoundsException and the
    deployment stops (see log extract below). By the time when this happens,
    there is a new .ear file and a war file (seem to be the same) containing
    my web application. This is a real show-stopper for me, so I'd be glad
    for any recommendations.
    Thanks,
    Daniel
    [java] <14.03.2001 18:28:11 GMT+01:00> <Info> <Management>
    <MBean=(fbsdomain:Name=futuna,Type=Application) Attribute=(LastModified)
    modified from (0) to (984590891366).>
    [java] <14.03.2001 18:28:11 GMT+01:00> <Info> <Management>
    <MBean=(fbsdomain:Name=futuna,Type=WebAppComponent,Application=futuna)
    Attribute=(Application) modified from (null) to (fbsdomain:Name=f
    utuna,Type=Application).>
    [java] <14.03.2001 18:28:11 GMT+01:00> <Info> <Management>
    <MBean=(fbsdomain:Name=futuna,Type=WebAppComponent,Application=futuna)
    Attribute=(Application) modified from (fbsdomain:Name=futuna,Type
    =Application) to (fbsdomain:Name=futuna,Type=Application).>
    [java] <14.03.2001 18:28:11 GMT+01:00> <Info> <Management>
    <MBean=(fbsdomain:Name=futuna,Type=WebAppComponent,Application=futuna)
    Attribute=(URI) modified from (null) to (futuna).>
    [java] <14.03.2001 18:28:11 GMT+01:00> <Info> <Management>
    <MBean=(fbsdomain:Name=futuna,Type=WebAppComponent,Application=futuna)
    Attribute=(ContextPath) modified from (null) to (futuna).>
    [java] <14.03.2001 18:28:11 GMT+01:00> <Info> <Management>
    <MBean=(fbsdomain:Name=futuna,Type=Application) Attribute=(LoadError)
    modified from (null) to (null).>
    [java] <14.03.2001 18:28:16 GMT+01:00> <Info> <HTTP> <[HTTP
    fbsserver] Loading web app: futuna>
    [java] <14.03.2001 18:28:16 GMT+01:00> <Info> <HTTP> <[HTTP
    fbsserver] Loading futuna from WAR file:
    c:\dev\fbs\application\config\fbsdomain\applications\.wl_temp_do_not_del
    ete\wl_local_comp19242
    .war>
    [java] <14.03.2001 18:28:16 GMT+01:00> <Info> <HTTP> <[Default
    WebApp] extracting classfiles to
    c:\dev\fbs\application\config\fbsdomain\applications\.wl_temp_do_not_del
    ete\WEB-INF\_tmp_war_fbsser
    ver_fbsserver_futuna:>
    [java] <14.03.2001 18:28:17 GMT+01:00> <Info> <HTTP> <[Default
    WebApp] extracted classfiles successfully...>
    [java] <14.03.2001 18:28:17 GMT+01:00> <Debug> <HTTP> <Exception
    thrown while loading futuna: java.lang.StringIndexOutOfBoundsException:
    String index out of range: -1>
    [java] <14.03.2001 18:28:17 GMT+01:00> <Error> <J2EE> <Error
    deploying application futuna: Could not load futuna>
    [java] <14.03.2001 18:28:17 GMT+01:00> <Info> <Management>
    <MBean=(fbsdomain:Name=futuna,Type=Application) Attribute=(Deployed)
    modified from (true) to (true).>
    [java] <14.03.2001 18:28:36 GMT+01:00> <Error> <HTTP>
    <HttpServer(4062427,null default ctx,fbsserver) found no context for
    "GET /futuna HTTP/1.1". This should not happen unless the default contex
    t failed to deploy.>
    [java] <14.03.2001 18:28:45 GMT+01:00> <Error> <HTTP>
    <HttpServer(4062427,null default ctx,fbsserver) found no context for
    "GET /futuna/ HTTP/1.1". This should not happen unless the default conte
    xt failed to deploy.>
    [java] <14.03.2001 18:30:27 GMT+01:00> <Info> <HTTP>
    <[WebAppServletContext(4114264,console)] *.html: init>
    [java] <14.03.2001 18:30:27 GMT+01:00> <Info> <HTTP>
    <[WebAppServletContext(4114264,console)] *.html: Using standard I/O>

  • Java.lang.StringIndexOutOfBoundsException: String index out of range: -99

    Hi.
    We are having a problem with the jstudio IDE Enterprise Edition.
    We are trying to create an CMP Bean using the IDE.
    The database table has 69 columns of various datatatypes. BUT as soon as i write the create method the following error is logged after all the 69 parameters are added in the create method
    PS : I have tried it on both Standard and Enterprise Edition .......They both give the same error.
    (Note this ocured when i had written all the 69 paramenters for the Database Table !)
    *********** Exception occurred ************ at Wed Sep 22 16:49:05 GMT+05:30 2004
    Annotation: Parser error
    java.lang.StringIndexOutOfBoundsException: String index out of range: -99
         at java.lang.String.<init>(String.java:192)
         at java.lang.String.copyValueOf(String.java:2185)
         at org.netbeans.modules.java.parser.DocumentModelBuilder.setBodyBounds(DocumentModelBuilder.java:105)
         at org.netbeans.modules.java.gj.V8TreeTranslator._case(V8TreeTranslator.java:437)
         at org.netbeans.lib.javac.v8.tree.Tree$MethodDef.visit(Tree.java:460)
         at org.netbeans.modules.java.gj.V8TreeTranslator._case(V8TreeTranslator.java:303)
         at org.netbeans.lib.javac.v8.tree.Tree$ClassDef.visit(Tree.java:407)
         at org.netbeans.modules.java.gj.V8TreeTranslator._case(V8TreeTranslator.java:188)
         at org.netbeans.lib.javac.v8.tree.Tree$TopLevel.visit(Tree.java:344)
         at org.netbeans.modules.java.gj.V8TreeTranslator.process(V8TreeTranslator.java:94)
         at org.netbeans.modules.java.gj.ParserEngine.completeRequest(ParserEngine.java:360)
         at org.netbeans.modules.java.gj.ParserEngine.parseObject(ParserEngine.java:176)
         at org.netbeans.modules.java.gj.JavaParserEngine.process(JavaParserEngine.java:72)
         at org.netbeans.modules.java.parser.ParsingSupport$Processor.process(ParsingSupport.java:711)
         at org.netbeans.modules.java.parser.ParsingSupport$Processor.parseLockModel(ParsingSupport.java:662)
    [catch] at org.netbeans.modules.java.parser.ParsingSupport$Processor.run(ParsingSupport.java:593)
         at org.openide.util.Task.run(Task.java:136)
         at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:328)
         at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:670)
    ==>
    WARNING - ErrorManager detected cyclic exception nesting:
         java.lang.StringIndexOutOfBoundsException: String index out of range: -99
    Be sure not to annotate an exception with itself, directly or indirectly.

    Hi
    Can you send me yoursample to me. I will check the code and let you know whats going wrong. mail your sample to [email protected]
    Thanks
    Vasu

  • Java.lang.StringIndexOutOfBoundsException: String index out of range: 8

    Hi Friends,
    I have a search window ,in one I/P Field i entered * and kept the default max hits to display as 100 records(This can be changed).
    Now when i click on Search i get 100 records being displayed,later when i change it to 150,200 Hits i am able to get them displayed(Records).
    But when i enter value greater than 200(i had entered 220) i am getting the following exception.
    java.lang.StringIndexOutOfBoundsException: String index out of range: 8
    Can anyone please help me out to resolve this issue.
    Thanks and regards,
    Chandrashekar.

    Hello Chandrashekar,
            It looks like in  the loop of number of records, you are fetching the record and processing the string either using charAt() method or subString method or any similar method.
    But in one of the record string after 200th record is having a string which when you are processing are having length less than 8.
    Say : String s = "Correct";
    will give StringIndexOutOfBoundsException: String index out of range: 8 as the length is only 7 and you are  cheking for char at position 8.
    Just check the processing you are doing within the record loop and also the records.
    Hope this helps.

  • Java.lang.StringIndexOutOfBoundsException: String index out of range: 3

    I have just downloaded Jdev (10.1.3.1) and am trying out the tutorial "Introduction to JavaServer Faces using JDeveloper".
    When I try to run the Welcome.jsp I get the following :
    java.lang.StringIndexOutOfBoundsException: String index out of range: 3
         at java.lang.String.substring(String.java:1765)
         at oracle.jdeveloper.compiler.OjcConfiguration.getSource(OjcConfiguration.java:276)
         at oracle.jdevimpl.runner.oc4j.Oc4jWorkspaceConfig.ensureJavaCompilerIsSet(Oc4jWorkspaceConfig.java:1081)
         at oracle.jdevimpl.runner.oc4j.Oc4jWorkspaceConfig.configureAll(Oc4jWorkspaceConfig.java:168)
         at oracle.jdevimpl.runner.oc4j.Oc4jStarter.preStart(Oc4jStarter.java:628)
         at oracle.jdevimpl.runner.oc4j.Oc4jStarter.start(Oc4jStarter.java:269)
         at oracle.ide.runner.RunProcess.startTarget(RunProcess.java:830)
         at oracle.jdeveloper.runner.JRunProcess.startTarget(JRunProcess.java:473)
         at oracle.jdevimpl.runner.run.RunningProcess.startTarget(RunningProcess.java:76)
         at oracle.ide.runner.RunProcess$2$1.run(RunProcess.java:768)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    #### Embedded OC4J Server could not be started up.
    What can I do to resolve this ?
    Thanks,
    K

    Found the problem.
    Solution : Do not install Jdev in a directory path which contains blanks spaces.

  • Java.lang.StringIndexOutOfBoundsException

    Hello, why does the following program generate a java.lang.StringIndexOutOfBoundsException error when a file is opened:
    Cryptogram.java (main program)
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.io.*;
    public class Cryptogram extends JFrame
      private static final Enigma codeMachine = new Enigma();
      private static final String letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
      private static final String frequentLetters = "JQXZKBVWFUYMPGCLSDHROANITE";
      private static final int numLetters = letters.length();
      private JFrame thisWindow;
      private JMenuItem openItem, saveItem, exitItem;
      private String pathName = "";
      private JTextField subFields[] = new JTextField[numLetters];
      private JLabel hintLabels[] = new JLabel[numLetters];
      private JTextArea textAreaIn, textAreaOut;
      public Cryptogram()
        super("Cryptogram Solver");
        thisWindow = this;
        JMenuBar menuBar = new JMenuBar();
        JMenu fileMenu = new JMenu("File");
        fileMenu.setMnemonic('F');
        FileAction fileAction = new FileAction();
        openItem = new JMenuItem("Open...");
        openItem.setMnemonic('O');
        openItem.addActionListener(fileAction);
        saveItem = new JMenuItem("Save...");
        saveItem.setMnemonic('S');
        saveItem.addActionListener(fileAction);
        saveItem.setEnabled(false);
        exitItem = new JMenuItem("Exit");
        exitItem.setMnemonic('x');
        exitItem.addActionListener(fileAction);
        fileMenu.add(openItem);
        fileMenu.add(saveItem);
        fileMenu.addSeparator();
        fileMenu.add(exitItem);
        JMenu decodeMenu = new JMenu("Decode");
        decodeMenu.setMnemonic('D');
        DecodeAction decodeAction = new DecodeAction();
        JMenuItem decodeItem = new JMenuItem("Decode");
        decodeItem.setMnemonic('D');
        decodeItem.addActionListener(decodeAction);
        JMenuItem clearItem = new JMenuItem("Clear");
        clearItem.setMnemonic('C');
        clearItem.addActionListener(decodeAction);
        JMenuItem encodeItem = new JMenuItem("Encode");
        encodeItem.setMnemonic('R');
        encodeItem.addActionListener(decodeAction);
        decodeMenu.add(decodeItem);
        decodeMenu.add(clearItem);
        decodeMenu.add(encodeItem);
        menuBar.add(fileMenu);
        menuBar.add(decodeMenu);
        setJMenuBar(menuBar);
        JPanel p1 = new JPanel();
        p1.setPreferredSize(new Dimension(100, 81));
        p1.setLayout(new GridLayout(3, 1, 3, 3));
        p1.add(new JLabel("Code letter:", JLabel.RIGHT));
        p1.add(new JLabel("Stands for:", JLabel.RIGHT));
        p1.add(new JLabel("Computer hints:", JLabel.RIGHT));
        int k;
        JPanel p2 = new JPanel();
        p2.setPreferredSize(new Dimension(569, 81));
        p2.setLayout(new GridLayout(3, 26, 3, 3));
        for (k = 0; k < numLetters; k++)
          p2.add(new JLabel(letters.substring(k, k+1), JLabel.CENTER));
        for (k = 0; k < numLetters; k++)
          JTextField tf = new JTextField();
          tf.setBackground(Color.yellow);
          tf.setHorizontalAlignment(JTextField.CENTER);
          p2.add(tf);
          subFields[k] = tf;
        clearSubs();
        for (k = 0; k < numLetters; k++)
          hintLabels[k] = new JLabel(" ", JLabel.CENTER);
          p2.add(hintLabels[k]);
        JPanel p3 = new JPanel();
        p3.setPreferredSize(new Dimension(80, 81));
        p3.setLayout(new GridLayout(3, 1, 3, 3));
        p3.add(new JPanel());   // filler
        JButton refresh = new JButton("Refresh");
        refresh.addActionListener(decodeAction);
        p3.add(refresh);
        Box b1 = Box.createHorizontalBox();
        b1.add(p1);
        b1.add(Box.createHorizontalStrut(10));
        b1.add(p2);
        b1.add(Box.createHorizontalStrut(10));
        b1.add(p3);
        JPanel p123 = new JPanel();
        p123.add(b1);
        Font font = new Font("Monospaced", Font.PLAIN, 16);
        textAreaIn = new JTextArea(20, 30);
        textAreaIn.setFont(font);
        textAreaIn.setLineWrap(true);
        textAreaIn.setWrapStyleWord(true);
        JScrollPane areaScrollPaneIn = new JScrollPane(textAreaIn);
        areaScrollPaneIn.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        textAreaOut = new JTextArea(20, 30);
        textAreaOut.setFont(font);
        textAreaOut.setLineWrap(true);
        textAreaOut.setWrapStyleWord(true);
        textAreaOut.setEditable(false);
        JScrollPane areaScrollPaneOut = new JScrollPane(textAreaOut);
        areaScrollPaneOut.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        Box b2 = Box.createHorizontalBox();
        b2.add(areaScrollPaneIn);
        b2.add(Box.createHorizontalStrut(10));
        b2.add(areaScrollPaneOut);
        Container c = getContentPane();
        c.add(p123, BorderLayout.NORTH);
        c.add(b2, BorderLayout.CENTER);
      private void clearSubs()
        StringBuffer subs = new StringBuffer(numLetters);
        for (int k = 0; k < numLetters; k++)
          subFields[k].setText("-");
          subs.append("-");
        codeMachine.setSubstitutions(subs.toString());
      private void normalSubs()
        StringBuffer subs = new StringBuffer(numLetters);
        for (int k = 0; k < numLetters; k++)
          JTextField tf = subFields[k];
          String s = tf.getText();
          if (s.length() < 1)
            s = "-";
          else
            s = s.substring(0,1).toUpperCase();
            if (!Character.isLetter(s.charAt(0)))
              s = "-";
          tf.setText(s);
          subs.append(s);
        codeMachine.setSubstitutions(subs.toString());
      private void randomSubs()
        StringBuffer subs = new StringBuffer(letters);
        int k, n;
        char ch1, ch2;
        for (n = numLetters; n > 1; n--)
          k = (int)(n * Math.random());
          ch1 = subs.charAt(k);
          ch2 = subs.charAt(n-1);
          subs.setCharAt(k, ch2);
          subs.setCharAt(n-1, ch1);
        String s = subs.toString();
        for (k = 0; k < numLetters; k++)
          subFields[k].setText(s.substring(k, k + 1));
        codeMachine.setSubstitutions(s);
      public void setHints(String text)
        int k;
        codeMachine.countLetters(text);
        for (k = 0; k < numLetters; k++)
          int pos = codeMachine.getFrequencyPos(k);
          hintLabels[k].setText(frequentLetters.substring(pos, pos+1));
      /***************          Action Listeners         ****************/
      private class FileAction implements ActionListener
        public void actionPerformed(ActionEvent e)
          int result;
          String text;
          JMenuItem m = (JMenuItem)e.getSource();
          if (m == openItem)
            JFileChooser fileChooser = new JFileChooser(pathName);
            fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
            result = fileChooser.showOpenDialog(thisWindow);
            if (result == JFileChooser.CANCEL_OPTION)
              return;
            File file = fileChooser.getSelectedFile();
            if (file != null)
              pathName = file.getAbsolutePath();
            EasyReader fileIn = new EasyReader(pathName);
            if (fileIn.bad())
              JOptionPane.showMessageDialog(thisWindow, "Invalid File Name",
                          "Cannot open " + pathName, JOptionPane.ERROR_MESSAGE);
            StringBuffer buffer = new StringBuffer((int)file.length());
            char ch;
            while ((ch = fileIn.readChar()) != '\0')
              buffer.append(ch);
            fileIn.close();
            saveItem.setEnabled(true);
            text = buffer.toString();
            textAreaIn.setText(text);
            setHints(text);
            textAreaOut.setText(codeMachine.decode(text));
          else if (m == saveItem)
            JFileChooser fileChooser = new JFileChooser(pathName);
            fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
            result = fileChooser.showSaveDialog(thisWindow);
            if (result == JFileChooser.CANCEL_OPTION)
              return;
            File file = fileChooser.getSelectedFile();
            if (file != null)
              pathName = file.getAbsolutePath();
            EasyWriter fileOut = new EasyWriter(pathName);
            if (fileOut.bad())
              JOptionPane.showMessageDialog(thisWindow, "Invalid File Name",
                          "Cannot create " + pathName, JOptionPane.ERROR_MESSAGE);
            text = textAreaOut.getText();
            fileOut.print(text);
            fileOut.close();
          else if (m == exitItem)
            System.exit(0);
      private class DecodeAction implements ActionListener
        public void actionPerformed(ActionEvent e)
          String cmd = ((AbstractButton)e.getSource()).getActionCommand();
          if ("Refresh".equals(cmd) || "Decode".equals(cmd))
            normalSubs();
          else if ("Clear".equals(cmd))
            clearSubs();
          else if ("Encode".equals(cmd))
            randomSubs();
          textAreaOut.setText(codeMachine.decode(textAreaIn.getText()));
      /***************                  main             ****************/
      public static void main(String[] args)
        Cryptogram window = new Cryptogram();
        window.addWindowListener(new WindowAdapter()
          { public void windowClosing(WindowEvent e) { System.exit(0); }});
        window.setBounds(30, 30, 800, 600);
        window.show();
    Enigma.java
    import java.util.*;
    public class Enigma
         private String lookupTable;
         private int[] letterCount;
         private static String frequentLetters="JQXZKBVWFUYMPGCLSDHROANITE";
         public Enigma()
              lookupTable="--------------------------";
              letterCount=new int[26];
         public void setSubstitutions(String lookupTable) {
              this.lookupTable = lookupTable;
         public String decode(String text)
              String decoded="";
              for(int i=0;i<text.length();i++)
                   if(Character.isLetter(text.charAt(i)))
                        decoded+=lookupTable.charAt((int)text.toLowerCase().charAt(i)-97);
                        if(Character.isUpperCase(text.charAt(i)))
                             Character.toUpperCase(decoded.charAt(decoded.length()-1));
                   else
                        decoded+=text.charAt(i);
              return decoded;
         public void countLetters(String text)
              Arrays.fill(letterCount, 0);
              for(int i=0;i<text.length();i++)
                   if(Character.isLetter(text.charAt(i)))
                   letterCount[((int)Character.toLowerCase(text.charAt(i)))-97]++;
         public int getFrequencyPos(int k)
              char letter=(char)(k+97-1);
              return frequentLetters.indexOf(letter);
    }The specific error:
    Exception in thread "AWT-EventQueue-0" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at java.lang.String.substring(Unknown Source)
         at Cryptogram.setHints(Cryptogram.java:214)
         at Cryptogram$FileAction.actionPerformed(Cryptogram.java:254)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.AbstractButton.doClick(Unknown Source)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(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)and a text file known to generate this issue:
    Okjcwkn Wusln yox ckbogcnwi gs fvffcwx, oki nbws opp yzrnw ck bsizovpcjx. Nbws pctwi ck nbw Xozob Iwxxwzn oki nzotwpwi gs Jofwprn. Nbw jpcfonw re nbw Xozob cx xvjb nbon nbw ckbogcnoknx botw nr pctw wpxwybwzw, xr jwznock ozwox re nbw iwxxwzn ozw jvpnctonwi gs czzcnoncrk. Nbw lszofcix ozw o zokuw re frvknockx gwnywwk Ezokjw oki Xlock. Nbw Wuslncokx gvcpn nbw lszofcix ck nbw xbolw re bvuw nzcokuvpoz jvgw.
    Nbw Uzwwdx ywzw o bcubps xjvplnvzwi lwrlpw, oki ycnbrvn nbwf yw yrvpik'n botw bcxnrzs. Nbw Uzwwdx opxr boi fsnbx. O fsnb cx o ewfopw frnb. Rkw fsnb xosx nbon nbw frnbwz re Ojbcppwx icllwi bcf ck nbw zctwz Xnska vkncp bw gwjofw cknrppwzogpw. Ojbcppwx ollwozx ck Nbw Cpcoi, gs Brfwz. Brfwz opxr yzrnw Nbw Riicns, ck ybcjb Lwkwprlw yox nbw poxn bozixbcl nbon Vpsxxwx wkivzwi rk bcx mrvzkws. Ojnvopps, Brfwz yox krn yzcnnwk gs Brfwz, gvn gs okrnbwz fok re nbon kofw.
    Xrjzonwx yox o eofrvx uzwwd nwojbwz ybr ywkn ozrvki uctcku lwrlpw oitcjw. Nbws dcppwi bcf. Xrjzonwx icwi ezrf ok rtwzirxw re ywiprjd. Oenwz bcx iwonb, bcx jozwwz xveewzwi o izofoncj iwjpckw.
    Ck nbw Rpsflcj Uofwx, Uzwwdx zok zojwx, mvflwi, bvzpwi nbw gcxjvcnx, oki nbzwy moto. Nbw zwyozi nr nbw tcjnrz yox o jrzop yzwonb.
             Ezrf "Okuvcxbwi Wkupcxb" gs Zcjbozi Pwiwzwz.Thanks! :)
    Edited by: John_Musbach on Feb 27, 2008 11:55 AM

    I fixed the funfunction like so:cti
    public int getFrequencyPos(int k)
              //char letter=(char)(k+97-1);
              //return frequentLetters.indexOf(letter);
              int countOfK=letterCount[k];
              Arrays.sort(letterCount);
              for(int i=0;i<letterCount.length;i++)
                   if(countOfK==letterCount)
                        return i;
              return 0;

Maybe you are looking for

  • Vendor payment with print out

    Hi, I am not able to make payment to the vendor through vendor payment with print out option as system is insisting me to input payment method, where as I have already given payment method "C" which is configured for that company code and country. Pl

  • Column settings not saved to iPod/iTunes

    Hi all. After my iTunes updated to v7.2.0.34, every time i close it and reopen, my iPod window keeps showing original columns. IE, i uncheck columns like Last Played, My Rating and Play Count, then close iTunes, open it back and columns are back agai

  • SQLplus COPY command and datatypes

    I have a view, schema1.myview: col1 VARCHAR2(10), col2 VARCHAR2(10), col3 NUMBER, col4 VARCHAR2(10)Then, using SQLplus, connected as schema2: COPY FROM schema1/password@mydb REPLACE myview USING SELECT * FROM myviewThe resulting table schema2.myview:

  • Electronic Signature Products

    I have 5 computers that need to the ability to electronic sign, what would be the best product?

  • 5.1 sound in Safari through HDMI?

    Hello all! I recently bought a new pro retina 15". I connected through HDMI cable to my Denon AVR 1713 as my old laptop used to be. What a surprise when starting an oline video on Safari, I couldn't get 5.1 sound in my speakers connected to the denon