Hi I am trying to get a TCP - Http Connection to work. I've written my own
TCP Binding Component wich works fine if I use both the consumer and the
producer of it.
But if I try to get a tcp consumer and a http provider to run I get the
following Exception.
This Exception happens when the HTTP Server returns the response to the
jetty client (http-bc provider). I see this as the http Server get the
correct Message that I send with my tcp client.
Exception in thread "HttpClient-1" java.lang.IllegalStateException
at
org.mortbay.jetty.client.HttpConnection$Handler.startRequest(HttpConnection.java:375)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:370)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
at
org.mortbay.jetty.client.HttpConnection.handle(HttpConnection.java:236)
at
org.mortbay.jetty.client.HttpClient$SocketConnector$1.run(HttpClient.java:320)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
This error is displayed if the xbean.xml of the http_provider-su looks like
this:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:http="http://servicemix.apache.org/http/1.0">
<http:provider service="http_provider"
endpoint="httpprovider"
locationURI="http://localhost:8888/"
/>
</beans>
This is also the error that I get If I am trying to run a http consumer and
a http provider. So I think my tcp bc is implemented correctly.
Then I tried to use the http bc with this xbean.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:http="http://servicemix.apache.org/http/1.0">
<http:endpoint service="http_provider"
endpoint="httpprovider"
role="provider"
locationURI="http://localhost:8888/"
/>
</beans>
There I get this stacktrace right after deploying it to Servicemix.
java.lang.RuntimeException: org.xml.sax.SAXParseException: The value of the
attribute "prefix="xmlns",localpart="ns1",ra
wname="xmlns:ns1"" is invalid. Prefixed namespace bindings may not be empty.
at
org.apache.servicemix.jbi.deployment.DescriptorFactory.buildDescriptor(DescriptorFactory.java:141)
at
org.apache.servicemix.jbi.deployment.DescriptorFactory.buildDescriptor(DescriptorFactory.java:80)
at
org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.<init>(ServiceUnitLifeCycle.java:67)
at
org.apache.servicemix.jbi.framework.Registry.registerServiceUnit(Registry.java:746)
at
org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:518)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:35
0)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:253)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateExternalArchive(AutoDeploymentService.java:20
1)
at
org.apache.servicemix.jbi.container.JBIContainer.updateExternalArchive(JBIContainer.java:476)
at
org.apache.servicemix.jbi.container.JBIContainer.updateExternalArchive(JBIContainer.java:486)
at
org.apache.servicemix.jbi.framework.AdminCommandsService.deployServiceAssembly(AdminCommandsService.java:209)
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.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
at
org.apache.servicemix.jbi.management.BaseStandardMBean.invoke(BaseStandardMBean.java:323)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at
javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426)
at
javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
at
javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264)
at java.security.AccessController.doPrivileged(Native Method)
at
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1366)
at
javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
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
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
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: org.xml.sax.SAXParseException: The value of the attribute
"prefix="xmlns",localpart="ns1",rawname="xmlns:ns1"
" is invalid. Prefixed namespace bindings may not be empty.
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:
195)
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanAttribute(XMLNSDocumentScannerImpl.java:
526)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.ja
va:277)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocument
FragmentScannerImpl.java:2740)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScanne
rImpl.java:508)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at
com.sun.org.apache.xerces.internal.jaxp.validation.StreamValidatorHelper.validate(StreamValidatorHelper.java:
144)
at
com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:107)
at javax.xml.validation.Validator.validate(Validator.java:127)
at
org.apache.servicemix.jbi.deployment.DescriptorFactory.buildDescriptor(DescriptorFactory.java:115)
... 38 more
Note: I haven't changed any other file after changing the xbean.xml of the
http provider.
So it seems that a namespace with the prefix ns1 isn't correctly specified
but I didn't specify this namespace and i don't know where it comes from.
I've already searched for this error and I found that you wrote that I
should dissable the jbi generation for the http provider su. I tried but it
doesn'T work as I think the jbi.xml is needed for an su to get deployed
correctly.
--
View this message in context:
http://www.nabble.com/http-endpoint-does-not-work-%28neither-%3Chttp%3Aendpoint....-nor-%3Chttp%3Aprovider%3E-tp18727143p18727143.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.