web stats
java.lang.StringIndexOutOfBoundsException: String index out of range: -2 - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 10-12-2010, 01:51 AM
abhilash123 abhilash123 is offline
Mirth Newb
 
Join Date: Oct 2010
Posts: 8
abhilash123 is on a distinguished road
Question java.lang.StringIndexOutOfBoundsException: String index out of range: -2

I found this exception when trying to send a xml to http://192.168.12.143:8085/services/Mirth?wsdl

ERROR-301: Transformer conversion error
ERROR MESSAGE: Error adapting message
java.lang.StringIndexOutOfBoundsException: String index out of range: -2
at java.lang.String.substring(Unknown Source)
at com.mirth.connect.server.mule.adaptors.XMLAdaptor. getNodeNameFromXMLString(XMLAdaptor.java:59)
at com.mirth.connect.server.mule.adaptors.XMLAdaptor. populateMessage(XMLAdaptor.java:33)
at com.mirth.connect.server.mule.adaptors.Adaptor.get Message(Adaptor.java:61)
at com.mirth.connect.server.mule.transformers.JavaScr iptTransformer.transform(JavaScriptTransformer.jav a:308)
at org.mule.transformers.AbstractEventAwareTransforme r.doTransform(AbstractEventAwareTransformer.java:4 8)
at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:197)
at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:200)
at org.mule.impl.MuleEvent.getTransformedMessage(Mule Event.java:251)
at org.mule.routing.inbound.SelectiveConsumer.isMatch (SelectiveConsumer.java:61)
at org.mule.routing.inbound.InboundMessageRouter.rout e(InboundMessageRouter.java:79)
at org.mule.providers.AbstractMessageReceiver$Default InternalMessageListener.onMessage(AbstractMessageR eceiver.java:487)
at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:266)
at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:225)
at com.mirth.connect.connectors.ws.WebServiceMessageR eceiver.processData(WebServiceMessageReceiver.java :151)
at com.mirth.connect.connectors.ws.DefaultAcceptMessa ge.acceptMessage(DefaultAcceptMessage.java:24)
at sun.reflect.GeneratedMethodAccessor241.invoke(Unkn own Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.xml.internal.ws.api.server.InstanceResolve r$1.invoke(Unknown Source)
at com.sun.xml.internal.ws.server.InvokerTube$2.invok e(Unknown Source)
at com.sun.xml.internal.ws.server.sei.EndpointMethodH andler.invoke(Unknown Source)
at com.sun.xml.internal.ws.server.sei.SEIInvokerTube. processRequest(Unknown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unk nown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unkn own Source)
at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unkno wn Source)
at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unk nown Source)
at com.sun.xml.internal.ws.server.WSEndpointImpl$2.pr ocess(Unknown Source)
at com.sun.xml.internal.ws.transport.http.HttpAdapter $HttpToolkit.handle(Unknown Source)
at com.sun.xml.internal.ws.transport.http.HttpAdapter .handle(Unknown Source)
at com.sun.xml.internal.ws.transport.http.server.WSHt tpHandler.handleExchange(Unknown Source)
at com.sun.xml.internal.ws.transport.http.server.WSHt tpHandler.handle(Unknown Source)
at com.sun.net.httpserver.Filter$Chain.doFilter(Unkno wn Source)
at sun.net.httpserver.AuthFilter.doFilter(Unknown Source)
at com.sun.net.httpserver.Filter$Chain.doFilter(Unkno wn Source)
at sun.net.httpserver.ServerImpl$Exchange$LinkHandler .handle(Unknown Source)
at com.sun.net.httpserver.Filter$Chain.doFilter(Unkno wn Source)
at sun.net.httpserver.ServerImpl$Exchange.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
at java.lang.Thread.run(Unknown Source)
Reply With Quote
  #2  
Old 10-12-2010, 10:43 AM
jacobb jacobb is offline
Mirth Employee
 
Join Date: Aug 2006
Location: Irvine, CA
Posts: 1,217
jacobb is an unknown quantity at this point
Default

What xml are you sending? I've seen this when you just try to send something like <root/> You actually need to send elements inside of your root node. For example, <root><data>data</data></root>
__________________
Jacob Brauer
Director, Software Engineering
Mirth Corporation

Mirth Support | Mirth Training | Mirth Appliances
Reply With Quote
  #3  
Old 10-21-2010, 01:17 AM
abhilash123 abhilash123 is offline
Mirth Newb
 
Join Date: Oct 2010
Posts: 8
abhilash123 is on a distinguished road
Default

I fix the problem i was due to the envolpe i create the envelope using SOAPUI....
TKS
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:12 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Mirth Corporation