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>

Similar Messages

  • Java.lang.ExceptionInInitializerError while deploying

    Hi,
    I have an ear file.I ran java weblogic.appc -verbose edm_app-ear.ear on it.It ran successfully.But when I deploy this ear file in weblogic 8.1,I get the following exception:
    java.lang.ExceptionInInitializerError.
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
    mpl.java:822)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppS
    ervletContext.java:3236)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebApp
    ServletContext.java:3181)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAp
    pServletContext.java:3154)
    at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java
    :654)
    at weblogic.servlet.internal.WebService.preloadResources(WebService.java
    :483)
    at weblogic.servlet.internal.ServletInitService.resume(ServletInitServic
    e.java:30)
    at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
    at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)
    at weblogic.Server.main(Server.java:32)
    Can anybody help me in solving this problem??
    Thanks in advance..
    -Sameer Gijare

    Hi,
    I got a error messege: java.lang.OutOfMemoryError. I try to increase the memory for my application by using the following command:
    java -Xms512m -Xmx512m d:\Users\All_Users\Maxd\MaxdLoad\maxdLoad_1_8_0.jar
    It apparantely does not work. Could you tell me the right format for this. BTW, I don't know java.
    Thanks.
    Jack

  • Java.lang.LinkageError while deploying.

    Hello All,
    I am working on an application which runs on jboss and while deploying I come accross the below error.
    09:55:37,607 ERROR [[ehaweb]] Servlet.service() for servlet ehaweb threw exception
    java.lang.LinkageError: loader constraint violation: when resolving interface method "com.eha.service.PageAccessMangementLoca
    l.savePageAccessLog(Lcom/eha/domain/PageAccessLog;)V" the class loader (instance of org/jboss/web/tomcat/service/WebAppClassL
    oader) of the current class, com/eha/web/filter/PageAccessLogFilter, and the class loader (instance of org/jboss/mx/loading/U
    nifiedClassLoader3) for resolved class, com/eha/service/PageAccessMangementLocal, have different Class objects for the type c
    om/eha/domain/PageAccessLog used in the signature
    Please let me know if something else is needed.
    I am deploying an ear file which also has a war file and all required libs and jars in it.
    Thanks in advance.

    First of all thanks for the reply,
    Your reply resolved my issue but now I am facing different error at deployment as given below.
    15:55:05,833 ERROR [ContextLoader] Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'searchService' defined in ServletCont
    ext resource [WEB-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.
    PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.ope
    nsymphony.oscache.general.GeneralCacheAdministrator] to required type [com.opensymphony.oscache.general.GeneralCacheAdministr
    ator] for property 'generalCacheAdministrator'; nested exception is java.lang.IllegalArgumentException: No matching editors o
    r conversion strategy found
    Caused by:
    org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details (1) are:
    PropertyAccessException 1:
    org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.opensymphony.oscache.general.G
    eneralCacheAdministrator] to required type [com.opensymphony.oscache.general.GeneralCacheAdministrator] for property 'general
    CacheAdministrator'; nested exception is java.lang.IllegalArgumentException: No matching editors or conversion strategy found
    Caused by:
    **java.lang.IllegalArgumentException: No matching editors or conversion strategy found**
    at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:212)
    My EAR structure is like this,
    EAR
    -meta inf
    -jar's
    -war
    - web inf
    - classes
    - lib
    The classes in war's "classses" directory needed to access some classes in jar's of ear's root directory.
    since I had first bundled these jars again in lib directory of war's web inf, I deployed it sucessfully but at run time
    It gave me previous errors that was solved by first reply (due to duplicate jars), now since I have deleted those
    duplicate jars, It gives me above error.
    Please help, I have stuck here for a long time now.

  • 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

  • Getting error java.lang.NullPointerException while selection LOV

    I am getting error java.lang.NullPointerException while selecting LOV. Please help
    SEVERE: Server Exception during PPR, #1
    javax.servlet.ServletException
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
         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:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:181)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:279)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:239)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:196)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:139)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:102)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:65)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:149)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.NullPointerException
         at oracle.adfinternal.view.faces.model.binding.RowDataManager.setRowKey(RowDataManager.java:129)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel.setRowKey(FacesCtrlHierBinding.java:530)
         at org.apache.myfaces.trinidad.component.UIXCollection.setRowKey(UIXCollection.java:429)
         at oracle.adfinternal.view.faces.renderkit.rich.TableRendererUtils.decodeSelectedRowKeys(TableRendererUtils.java:470)
         at oracle.adfinternal.view.faces.renderkit.rich.table.BaseTableRenderer.decodeIncompatiblePropertyKey(BaseTableRenderer.java:208)
         at oracle.adf.view.rich.render.RichRenderer.decode(RichRenderer.java:203)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.__rendererDecode(UIXComponentBase.java:1089)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.decode(UIXComponentBase.java:714)
         at org.apache.myfaces.trinidad.component.UIXTable.decode(UIXTable.java:136)
         at org.apache.myfaces.trinidad.component.UIXCollection.processDecodes(UIXCollection.java:193)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:970)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:956)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:812)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:970)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:956)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:812)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:970)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:956)
         at oracle.adf.view.rich.component.UIXPopup.processDecodes(UIXPopup.java:60)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:970)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:956)
         at oracle.adf.view.rich.component.UIXInputPopup.processDecodes(UIXInputPopup.java:137)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl$ApplyRequestValuesCallback.invokeContextCallback(LifecycleImpl.java:1113)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:722)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.invokeOnComponent(ContextSwitchingComponent.java:153)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.invokeOnComponent(ContextSwitchingComponent.java:153)
         at oracle.adf.view.rich.component.fragment.UIXPageTemplate.invokeOnComponent(UIXPageTemplate.java:208)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
         at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:664)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:303)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:175)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         ... 29 more

    Duplicate: Re: Get null pointer exception while selecting LOV for a parameter form object

  • 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

  • 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;

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

    working on a project and came across this exception during runtime.
    Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -9
         at java.lang.String.substring(Unknown Source)
         at SomethingIsWrong.main(SomethingIsWrong.java:17)
    I'm a bit confused. could anyone shed some light on what im doing wrong? i know it deals with my testingStrings method.
    import java.io.*;
    import java.util.*;
    public class SomethingIsWrong
         static Scanner console = new Scanner(System.in);
         public static void main(String[] args)
              Rectangle method = new Rectangle();
              method.width = 40;
              method.height = 50;
              System.out.println("myRect's area is " + method.area());
              System.out.println("Was it a car or a cat i saw?".substring(-9, 12)); // error here
              testingStrings();
              grades();
         public static void cat(File file)
                                       throws FileNotFoundException
              String line = null;
              Scanner inFile = new Scanner(new FileReader("myFile.txt"));
              try
                   while ((line = inFile.nextLine())!= null)
                        System.out.println(line);
                   return;
              }     finally
                        if (inFile != null)
                             inFile.close();
         public static void grades()
              char grade;
              int testScore = console.next().charAt(0);
              if (testScore < 90)
                   grade = 'A';
              else if (testScore < 80)
                   grade = 'B';
                   else if (testScore < 70)
                        grade = 'C';
                   else if (testScore < 60)
                        grade = 'D';
                   else grade = 'F';
              System.out.println("Grade = " + grade);
         public static void testingStrings()
              String original = new String();
              StringBuilder result = new StringBuilder("hi");
              int index = original.indexOf('a');
              result.setCharAt(0, original.charAt(0));
              result.setCharAt( 1, original.charAt(original.length()-1));
              result.insert(1, original.charAt(4));
              result.append(original.substring(1,4));
              result.insert(3, (original.substring(index, index+2) + " "));
              System.out.println(result);
    final class Rectangle
         public int width;
         public int height;
         public int area()
              int area = width * height;
              return area;
    }

    jtan wrote:
    working on a project and came across this exception during runtime.
    Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -9
         at java.lang.String.substring(Unknown Source)
         at SomethingIsWrong.main(SomethingIsWrong.java:17)The error message is telling you exactly what's wrong.
    At line 17 of SomethingIsWring.java, you are calling substring() and passing -9 as one of the parameters. If you read the docs for String and for that method, and if you understand the fundamentals of Java Strings, you'll know why that is a no-no.

  • Java Script Error while deploying a Model with Value Help

    Hi,
    I am using EP 7.0 SP 10.
    I am trying to deploy a model which includes the Value Help for an Input field, and i am trying to deploy this model.
    The model compiles successfully, but gives a Java Script Error while deploying the model,
    ! Error on Page
    When Click on this java script error, it shows that ,
    Line:14985
    Char 1: Error
    object does n't support this property or method.
    code
    URL: <serverhost>/VCRes/WebContent/VisualComposer6.0/bin/223334.htm?24102006.1712.
    The Same model works in dev server, and it fails in the production server.
    Thanks and Regards,
    Sekar

    Hi jakob,
    Thankyou for your quick response.
    I did a basic model with the help of a documentation which i got from this forums.I created a iView and from there i used Bapi "BAPI_SALESORDER ".
    I created a Input Form and a outpot form (table view).I tested model and am able to get the output.but when i try to deploy it is giving me the error.
    And i think am not paring any formulas here.
    Please guide me.
    thanks and regrads
    Pradeep.B

  • 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

  • Java.lang.NullPointerException while using PGP module in SFTP receiver

    Hi Experts,
    We are trying out newly installed PGP module on SAP PI 711 SP10.
    Scenario     : SFTP to SFTP
    While we are trying to encrypt the message in the SFTP receiver, we get the following error.
    nested exception is: javax.ejb.EJBException: (Failed in component: sap.com/com.sap.aii.af.app, BC-XI-CON-AFW) Exception raised from invocation of public com.sap.aii.af.lib.mp.module.ModuleData com.sap.aii.af.app.endpoint.ModuleProcessorExitBean.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.sap.aii.af.app.endpoint.ModuleProcessorExitBean@6437822b for bean sap.com/com.sap.aii.af.app*xml|com.sap.aii.af.ejb.jar*xml|ModuleProcessorExitBean in application sap.com/com.sap.aii.af.app.; nested exception is: java.lang.NullPointerException: while trying to invoke the method com.sap.engine.interfaces.messaging.api.Message.getMessageKey() of an object loaded from local variable 'msMessage'

    Thanks Hareesh,
    ya that  "callsapadapter"  was the culprit. It comes by itself, Once I removed that PGP was working fine.

  • 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

  • Java.lang.ClassCastException while creating array descriptor

    ( This post was moved from SQL / PLSQL forum to here )
    Hi everyone, i used to pass string array from java to plsql. I wrote a java source, then i load db with loadjava. And i wrote java spec. Then i run the function but i am getting this error :
    java.lang.ClassCastException
    at oracle.jdbc.driver.PhysicalConnection.putDescriptor(PhysicalConnection.java:4921)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:208)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:175)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:158)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:125)
    at SplitterOracle3.tokens2(SplitterOracle3.java:29)
    My Java Source is :
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    import oracle.sql.*;
    import oracle.jdbc.driver.OracleConnection;
    import oracle.jdbc.driver.OracleDriver;
    public class SplitterOracle3 {
    public static oracle.sql.ARRAY tokens2(String str,String delim)
    try
    //Class.forName("oracle.jdbc.driver.OracleDriver");
    //DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    //Connection conn = new OracleDriver().defaultConnection( );
    OracleDriver ora = new OracleDriver();
    OracleConnection conn = (OracleConnection) ora.defaultConnection();
    //ArrayDescriptor arrayDesc = ArrayDescriptor.createDescriptor("MY_ARRAY", ((conn).getRealConnection());
    //Connection conn = DriverManager.getConnection("jdbc:default:connection:");
    //Connection conn = ((DelegatingConnection) getDataSource().getConnection()).getInnermostDelegate();
    // get an initial context
    //OracleConnection oracleConnection = (OracleConnection)WSJdbcUtil.getNativeConnection((WSJdbcConnection) wsConn);
    ArrayDescriptor arraydesc =
    ArrayDescriptor.createDescriptor ("ARR_VARCHAR_100", conn);
    String strarr[] = new String[47];
    strarr[0]="ahmet";
    strarr[1]="mehmet";
    int curIndex = 0;
    int nextIndex = 0;
    boolean nextIsLastToken = false;
    int i=0;
    while (true)
    nextIndex = str.indexOf(delim, curIndex);
    if (nextIsLastToken)
    //return false;
    break;
    if (nextIndex == -1)
    nextIsLastToken=true;
    nextIndex = str.length();
    strarr[i] = str.substring(curIndex, nextIndex);
    curIndex = nextIndex + 1;
    i++;
    ARRAY dirArray = new ARRAY(arraydesc, conn, strarr);
    return dirArray;*/
    catch(Exception ex)
    System.err.println(ex.getMessage());
    ex.printStackTrace();
    return null;
    public static void main(String[] args)
    String str="2000,2,123553168,1,10,64895,65535,27662,64860,64895,65535,27662,64860,0,,,,,,0,0,2491039806,,,,,,,,,0,0,1,,2491039106,,,,,,,,,,,,";
    String strarr[] = new String[47];
    long l1,l2;
    int j=0;
    l1 = System.currentTimeMillis();
    for ( int i=0; i<20000000; i++)
    strarr = tokens2(str,",");
    l2 = System.currentTimeMillis();
    System.out.println("Fark :"+ (l2-l1));
    The line has "ArrayDescriptor.createDescriptor ("ARR_VARCHAR_100", conn);" causes this error.
    java.lang.ClassCastException
    at oracle.jdbc.driver.PhysicalConnection.putDescriptor(PhysicalConnection.java:4921)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:208)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:175)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:158)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:125)
    at SplitterOracle3.tokens2(SplitterOracle3.java:29)
    But i could not find the solution. Can you help me?
    Thanks for responses.

    Hi,
    Did you try my suggestion from Re: java.lang.ClassCastException while create array descriptor
    Try replacing
    oracle.jdbc.driver.OracleConnectionwith
    oracle.jdbc.OracleConnectionRegards
    Peter

  • "java.lang.NullPointerException" while assigning Organization

    Hi,
    Recently we have upgraded our IDM environment from version 7 to 7.1.1.6.
    After that we get the "java.lang.NullPointerException" while assigning an Organization during the creation of the user through from Idm Admin
    Interface.
    Is there any file i am missing ? has any one experienced the problem before?
    thx,
    Ttslsab

    Thanks Hareesh,
    ya that  "callsapadapter"  was the culprit. It comes by itself, Once I removed that PGP was working fine.

Maybe you are looking for

  • How to upgrade OS 10.3.9 to OS 10.4

    Hi, I have an eMac G4 with 1.25 GHz and 1 RAM running operating system 10.3.9 but want to upgrade to 10.4. and was wondering how to do such an upgrade. Anyone know of a step by step on this? Also, I have an IMac with 10.4.11. Can I use this one disk

  • Howto force firefox to open windows in same place

    Is there a way to force firefox to open ANY new window in a fixed spot or even on a monitor in multimonitor setups and NOT offset from the last window closed? Its anoying to have to hunt around to find where the window popped up... Example: i have a

  • IChat freezes when using AIM direct connection

    When attempting to send or receive files by dropping them into the text input field in iChat, the program becomes unresponsive for almost a minute and sometimes more. This happens when attempting to send a picture or other type of file (regardless of

  • Suddenly Weblogic instance shut down after issuing HANGUP

    Suddenly Weblogic instance shut down and when I check the logs, there is no exception or error. There is only one word "HANGUP" which is new and after that there is no logs

  • CS4 installation database is defect, ...

    For disk space reasons we had only two programms of CS4 (Flash and Acrobat) installed, when we tried to install also the Illustrator, the serial number did not work. We followed the instruction (http://helpx.adobe.com/de/creative-suite/kb/error-inval