Quantcast

java.lang.IllegalStateException: Current state not START_ELEMENT, END_ELEMENT or ENTITY_REFERENCE

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

java.lang.IllegalStateException: Current state not START_ELEMENT, END_ELEMENT or ENTITY_REFERENCE

migue
Hi,
I have implemented an example of Orchestration with JSR181 and I when run it throws the following exception:
java.lang.IllegalStateException: Current state not START_ELEMENT, END_ELEMENT or ENTITY_REFERENCE
        at com.ctc.wstx.sr.BasicStreamReader.getLocalName(BasicStreamReader.java:708)
...

Any help?
Thanks a lot,
Migue
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: java.lang.IllegalStateException: Current state not START_ELEMENT, END_ELEMENT or ENTITY_REFERENCE

Guillaume Nodet
Administrator
Can you post the full stack trace and any code / config that
might help to understand the problem ?

On 2/21/07, migue <[hidden email]> wrote:

>
> Hi,
> I have implemented an example of Orchestration with JSR181 and I when run it
> throws the following exception:
> java.lang.IllegalStateException: Current state not START_ELEMENT,
> END_ELEMENT or ENTITY_REFERENCE
>         at
> com.ctc.wstx.sr.BasicStreamReader.getLocalName(BasicStreamReader.java:708)
> ...
>
> Any help?
> Thanks a lot,
> Migue
> --
> View this message in context: http://www.nabble.com/java.lang.IllegalStateException%3A-Current-state-not-START_ELEMENT%2C-END_ELEMENT-or-ENTITY_REFERENCE-tf3268154s12049.html#a9085326
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


--
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: java.lang.IllegalStateException: Current state not START_ELEMENT, END_ELEMENT or ENTITY_REFERENCE

migue
Hi,
It deploys and publish the wsdl ok but throws the exception when a client try execute a method of a service.
I use windows 2000, servicemix 3.1 and maven 2.0.4.
The full stack trace is:
2007-02-22 08:45:47,140 [jsr181-thread-1] ERROR DefaultFaultHandler            - Fault occurred!
java.lang.IllegalStateException: Current state not START_ELEMENT, END_ELEMENT or ENTITY_REFERENCE
        at com.ctc.wstx.sr.BasicStreamReader.getLocalName(BasicStreamReader.java:708)
        at org.codehaus.xfire.util.stax.DepthXMLStreamReader.getLocalName(DepthXMLStreamReader.java:100)
        at org.codehaus.xfire.aegis.stax.ElementReader.<init>(ElementReader.java:58)
        at org.codehaus.xfire.aegis.stax.ElementReader.<init>(ElementReader.java:69)
        at org.apache.servicemix.jsr181.xfire.ServiceFactoryHelper$FixedJAXWSOperationBinding.readMessage(ServiceFactoryHelper.java:403)
        at org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke(SoapBodyHandler.java:42)
        at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
        at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
        at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
        at org.apache.servicemix.jsr181.Jsr181ExchangeProcessor.process(Jsr181ExchangeProcessor.java:110)
        at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
        at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:441)
        at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
        at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
        at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
        at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
        at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Thread.java:595)

The configuration files are:
- xbean.xml (bus-http-su):
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
       xmlns:bus="http://bus.gtel.com"
       xmlns:servicio="http://cliente.ws.servicio">

  <http:endpoint service="bus:Bus"
                 endpoint="BusHttpPort"
                 role="consumer"
                 locationURI="http://servidor1:8192/bus/"
                 defaultMep="http://www.w3.org/2004/08/wsdl/in-out"                 
                 soap="true"
                 soapAction="enviar"/>               
 
  <http:endpoint service="servicio:ServicioWSService"
                 endpoint="ServicioWS"
                 role="provider"
                 locationURI="http://servidor2:8080/services/servicio"
                 soap="true"
                 soapAction="alta"          * Tested also whitout this line
                 soapVersion="1.1"/>     * Tested also whitout this line
 
</beans>

- xbean.xml (bus-jsr181-su):
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
       xmlns:servicio="http://cliente.ws.servicio">

    <jsr181:endpoint pojo="#bus"
                     wsdlResource="classpath:service.wsdl"
                     typeMapping="jaxb2"
                     annotations="jsr181"
                     style="document" />
                     
  <bean id="bus" class="com.gtel.bus.BusImpl">
    <property name="servicio">
      <jsr181:proxy context="#context"
                    type="servicio.ws.cliente.ServicioWS"
                    service="servicio:ServicioWSService" />
    </property>
  </bean>

</beans>

- BusImpl.java:

package com.gtel.bus;

import javax.jws.WebService;
import servicio.ws.cliente.Alta;
import sergicio.ws.cliente.ServicioWS;

@WebService(serviceName = "Bus", targetNamespace = "http://bus.gtel.com", endpointInterface = "com.gtel.bus.BusPortType")
public class BusImpl
    implements BusPortType
{
        private ServicioWS servicio;
       

        public void setServicio(ServicioWS servicio) {
                this.servicio = servicio;
        }


        public void enviar(InformacionBus infBus)
        throws BusException_Exception
    {
                servicio.alta(new Alta());
    }

}

Thanks for your help!

Grretings,
Migue


gnodet wrote
Can you post the full stack trace and any code / config that
might help to understand the problem ?

On 2/21/07, migue <migueljvazquez@guadaltel.es> wrote:
>
> Hi,
> I have implemented an example of Orchestration with JSR181 and I when run it
> throws the following exception:
> java.lang.IllegalStateException: Current state not START_ELEMENT,
> END_ELEMENT or ENTITY_REFERENCE
>         at
> com.ctc.wstx.sr.BasicStreamReader.getLocalName(BasicStreamReader.java:708)
> ...
>
> Any help?
> Thanks a lot,
> Migue
> --
> View this message in context: http://www.nabble.com/java.lang.IllegalStateException%3A-Current-state-not-START_ELEMENT%2C-END_ELEMENT-or-ENTITY_REFERENCE-tf3268154s12049.html#a9085326
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


--
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: java.lang.IllegalStateException: Current state not START_ELEMENT, END_ELEMENT or ENTITY_REFERENCE

Bummer
In reply to this post by Guillaume Nodet
I attached the error stack below. You can check it if you can follow the JSR181 Orchestration sample.

The JSR181 ochestration sample just don't work. Maybe one of the WSDL (uszip, localtime)
might be changed after you guys wrote the tutorial or it might be a bug....



-----------
DEBUG - header                         - << "Content-Length: 426[\r][\n]"
DEBUG - content                        - << "<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlso
ap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Bo
dy><LocalTimeByZipCodeResponse xmlns="http://ripedev.com/xsd/ZipCodeResults.xsd"><LocalTimeByZipCodeResult>5/30/2007 8:51:44 PM</L
ocalTimeByZipCodeResult></LocalTimeByZipCodeResponse></soap:Body></soap:Envelope>"
DEBUG - Client                         - Received message to urn:xfire:transport:jbi:11805763005154-996237611
DEBUG - HandlerPipeline                - adding handler org.codehaus.xfire.client.CorrelatorHandler@af908f to phase pre-dispatch
DEBUG - HandlerPipeline                - adding handler org.codehaus.xfire.handler.LocateBindingHandler@3bbf83 to phase dispatch
DEBUG - HandlerPipeline                - adding handler org.codehaus.xfire.soap.handler.SoapBodyHandler@9a63d7 to phase dispatch
DEBUG - HandlerPipeline                - Invoking phase transport
DEBUG - HandlerPipeline                - Invoking phase parse
DEBUG - HandlerPipeline                - Invoking phase pre-dispatch
DEBUG - HandlerPipeline                - Invoking handler org.codehaus.xfire.client.CorrelatorHandler in phase pre-dispatch
DEBUG - Client                         - Correlating context with ID 118057630051551778993400
DEBUG - Client                         - Found correlated context with ID 118057630051551778993400
DEBUG - HandlerPipeline                - adding handler org.codehaus.xfire.client.ClientReceiveHandler@10d963 to phase service
DEBUG - HandlerPipeline                - Invoking phase dispatch
DEBUG - HandlerPipeline                - Invoking handler org.codehaus.xfire.handler.LocateBindingHandler in phase dispatch
DEBUG - HandlerPipeline                - Invoking handler org.codehaus.xfire.soap.handler.SoapBodyHandler in phase dispatch
DEBUG - HandlerPipeline                - adding handler org.codehaus.xfire.client.ClientFaultConverter@a4d52b to phase user
DEBUG - HandlerPipeline                - adding handler org.codehaus.xfire.client.CorrelatorHandler@af908f to phase pre-dispatch
DEBUG - HandlerPipeline                - Invoking phase transport
DEBUG - HandlerPipeline                - Invoking phase parse
DEBUG - HandlerPipeline                - Invoking phase pre-dispatch
DEBUG - HandlerPipeline                - Invoking handler org.codehaus.xfire.client.CorrelatorHandler in phase pre-dispatch
DEBUG - Client                         - Correlating context with ID 118057630051551778993400
DEBUG - Client                         - Found correlated context with ID 118057630051551778993400
DEBUG - HandlerPipeline                - adding handler org.codehaus.xfire.client.ClientReceiveHandler@1a706b0 to phase service
DEBUG - HandlerPipeline                - Invoking phase dispatch
DEBUG - HandlerPipeline                - Invoking phase policy
DEBUG - HandlerPipeline                - Invoking phase user
DEBUG - HandlerPipeline                - Invoking handler org.codehaus.xfire.client.ClientFaultConverter in phase user
DEBUG - HandlerPipeline                - Invoking phase pre-invoke
DEBUG - HandlerPipeline                - Invoking phase service
DEBUG - HandlerPipeline                - Invoking handler org.codehaus.xfire.client.ClientReceiveHandler in phase service
ERROR - DefaultFaultHandler            - Fault occurred!
org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: The
current event is not START_ELEMENT
 but 7
org.codehaus.xfire.fault.XFireFault: The current event is not START_ELEMENT
 but 7
        at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
        at org.codehaus.xfire.client.Client.onReceive(Client.java:391)
        at org.apache.servicemix.jsr181.xfire.JbiChannel.send(JbiChannel.java:147)
        at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
        at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
        at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75)
        at org.codehaus.xfire.client.Client.invoke(Client.java:335)
        at org.apache.servicemix.jsr181.xfire.JbiProxy$JAXWSJBIClient.invoke(JbiProxy.java:232)
        at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
        at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
        at org.apache.servicemix.jsr181.xfire.JbiProxyFactoryBean$1.invoke(JbiProxyFactoryBean.java:73)
        at $Proxy28.localTimeByZipCode(Unknown Source)
        at org.apache.servicemix.samples.citytime.CityTimeImpl.getCityTime(CityTimeImpl.java:35)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.xfire.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:54)
        at org.codehaus.xfire.service.binding.ServiceInvocationHandler.sendMessage(ServiceInvocationHandler.java:322)
        at org.codehaus.xfire.service.binding.ServiceInvocationHandler$1.run(ServiceInvocationHandler.java:86)
        at org.codehaus.xfire.service.binding.ServiceInvocationHandler.execute(ServiceInvocationHandler.java:134)
        at org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:109)
        at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
        at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
        at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
        at org.apache.servicemix.jsr181.Jsr181ExchangeProcessor.process(Jsr181ExchangeProcessor.java:113)
        at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
        at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
        at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
        at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
        at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
        at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:171)
        at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalStateException: The current event is not START_ELEMENT
 but 7
        at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:124)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:337)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:309)
        at org.codehaus.xfire.jaxb2.JaxbType.readObject(JaxbType.java:200)
        at org.codehaus.xfire.jaxws.JAXWSOperationBinding.readMessage(JAXWSOperationBinding.java:129)
        at org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke(SoapBodyHandler.java:42)
        at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
        at org.codehaus.xfire.client.Client.onReceive(Client.java:387)
        ... 34 more
DEBUG - HandlerPipeline                - adding handler org.codehaus.xfire.fault.FaultSender@722083 to phase send
DEBUG - HandlerPipeline                - adding handler org.codehaus.xfire.jaxws.handler.WebFaultHandler@b48812 to phase user
DEBUG - HandlerPipeline                - Invoking phase post-invoke
DEBUG - HandlerPipeline                - Invoking phase policy
DEBUG - HandlerPipeline                - Invoking phase user
DEBUG - HandlerPipeline                - Invoking handler org.codehaus.xfire.jaxws.handler.WebFaultHandler in phase user
DEBUG - HandlerPipeline                - Invoking phase transport
DEBUG - HandlerPipeline                - Invoking phase send
DEBUG - HandlerPipeline                - Invoking handler org.codehaus.xfire.fault.FaultSender in phase send
DEBUG - jetty                          - resume continuation org.mortbay.jetty.nio.SelectChannelConnector$RetryContinuation@c46000

DEBUG - jetty                          - REQUEST /citytime/ on org.mortbay.jetty.HttpConnection@19f47b7
DEBUG - jetty                          - servlet=jbiServlet
DEBUG - jetty                          - chain=null
DEBUG - jetty                          - servelet holder=jbiServlet
DEBUG - jetty                          - RESPONSE /citytime/  400
DEBUG - jetty                          - continuation org.mortbay.jetty.nio.SelectChannelConnector$RetryContinuation@c46000


gnodet wrote
Can you post the full stack trace and any code / config that
might help to understand the problem ?

On 2/21/07, migue <migueljvazquez@guadaltel.es> wrote:
>
> Hi,
> I have implemented an example of Orchestration with JSR181 and I when run it
> throws the following exception:
> java.lang.IllegalStateException: Current state not START_ELEMENT,
> END_ELEMENT or ENTITY_REFERENCE
>         at
> com.ctc.wstx.sr.BasicStreamReader.getLocalName(BasicStreamReader.java:708)
> ...
>
> Any help?
> Thanks a lot,
> Migue
> --
> View this message in context: http://www.nabble.com/java.lang.IllegalStateException%3A-Current-state-not-START_ELEMENT%2C-END_ELEMENT-or-ENTITY_REFERENCE-tf3268154s12049.html#a9085326
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


--
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: java.lang.IllegalStateException: Current state not START_ELEMENT, END_ELEMENT or ENTITY_REFERENCE

mrudulam

I am also stuck at the exact place with the same exception. I don't
think it has to do with the external WSDLs. I had created my own web
services and trying to orchestrate them with the jsr example.

-----Original Message-----
From: Bummer [mailto:[hidden email]]
Sent: Thursday, May 31, 2007 7:25 AM
To: [hidden email]
Subject: Re: java.lang.IllegalStateException: Current state not
START_ELEMENT, END_ELEMENT or ENTITY_REFERENCE


I attached the error stack below. You can check it if you can follow the
JSR181 Orchestration sample.

The JSR181 ochestration sample just don't work. Maybe one of the WSDL
(uszip, localtime)
might be changed after you guys wrote the tutorial or it might be a
bug....




gnodet wrote:
>
> Can you post the full stack trace and any code / config that
> might help to understand the problem ?
>
> On 2/21/07, migue <[hidden email]> wrote:
>>
>> Hi,
>> I have implemented an example of Orchestration with JSR181 and I when
run
>> it
>> throws the following exception:
>> java.lang.IllegalStateException: Current state not START_ELEMENT,
>> END_ELEMENT or ENTITY_REFERENCE
>>         at
>>
com.ctc.wstx.sr.BasicStreamReader.getLocalName(BasicStreamReader.java:70
8)
>> ...
>>
>> Any help?
>> Thanks a lot,
>> Migue
>> --
>> View this message in context:
>>
http://www.nabble.com/java.lang.IllegalStateException%3A-Current-state-n
ot-START_ELEMENT%2C-END_ELEMENT-or-ENTITY_REFERENCE-tf3268154s12049.html
#a9085326

>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Architect, LogicBlaze (http://www.logicblaze.com/)
> Blog: http://gnodet.blogspot.com/
>
>

--
View this message in context:
http://www.nabble.com/java.lang.IllegalStateException%3A-Current-state-n
ot-START_ELEMENT%2C-END_ELEMENT-or-ENTITY_REFERENCE-tf3268154s12049.html
#a10886080
Sent from the ServiceMix - User mailing list archive at Nabble.com.



The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
 
www.wipro.com
Loading...