[JBoss AS 7 Development] - JBossWS/AS7 - WebService class loading / deployment modules
by Robert Stupp
Robert Stupp [http://community.jboss.org/people/snazy0] created the discussion
"JBossWS/AS7 - WebService class loading / deployment modules"
To view the discussion, visit: http://community.jboss.org/message/641482#641482
--------------------------------------------------------------
Hi,
I am a bit confused about how webservice integration in AS7 depends on sub-deployment "containers".
I have an EAR that contains a WAR to be deployed.
- The EAR lib/ folder contains all stuff generated from a WSDL (using JAXWS-RI)
- The WAR contains an annotated webservice class (class with a @WebService annotation) plus another webservice implementation for the WSDL mentioned above
- The web.xml file (+webservices.xml +mappings.xml) mentions both webservices and both work fine.
If I move the annotated webservice class and the other webservice implementation class files (JARs) from the WAR to EAR's lib directory, a lot of strange warnings like
10:38:56,124 WARN [org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder] (MSC service thread 1-1) Guess java type from package mapping: [xmlType={NAMESPACE}XSDObject javaType=com.mycompany.LocationSearchRequest]
occur during startup and both webservices are not accessible:
The annotated webservice says:
10:43:28,830 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/demo].[SuperService]] (http--127.0.0.1-8080-1) Allocate exception for servlet SuperService: java.lang.ClassCastException: com.mycompany.MySuperWebservice cannot be cast to javax.servlet.Servlet
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1156) [jbossweb-7.0.4.Final.jar:]
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:952) [jbossweb-7.0.4.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:188) [jbossweb-7.0.4.Final.jar:]
The webservice implementation says:
10:43:32,204 ERROR [org.jboss.wsf.stack.jbws.RequestHandlerImpl] (http--127.0.0.1-8080-1) Error processing web service request: org.jboss.ws.WSException: org.jboss.xb.binding.JBossXBRuntimeException: Failed to find read method or field for property 'genericData' in class com.mycompany.gen.PingResponse
at org.jboss.ws.WSException.rethrow(WSException.java:68)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:378)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:224)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:149)
at org.jboss.ws.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:91)
at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:162)
at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140) [jbossws-spi-2.0.0.CR1.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.4.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.4.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.4.Final.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.4.Final.jar:]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:151) [jboss-as-web-7.1.0.CR1-SNAPSHOT.jar:]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.4.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.4.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.4.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.4.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.4.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.4.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.4.Final.jar:]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]
Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Failed to find read method or field for property 'genericData' in class com.mycompany.gen.PingResponse
at org.jboss.xb.binding.introspection.ClassInfo.getFieldInfo(ClassInfo.java:82)
at org.jboss.xb.binding.introspection.FieldInfo.getFieldInfo(FieldInfo.java:155)
at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.getJavaValue(MarshallerImpl.java:1267)
at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.getChildren(MarshallerImpl.java:1257)
at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.getElementValue(MarshallerImpl.java:1187)
at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalParticle(MarshallerImpl.java:757)
at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalModelGroupSequence(MarshallerImpl.java:970)
at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalModelGroup(MarshallerImpl.java:910)
at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalParticle(MarshallerImpl.java:656)
at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalModelGroupSequence(MarshallerImpl.java:970)
at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalModelGroup(MarshallerImpl.java:910)
at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalParticle(MarshallerImpl.java:656)
at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalComplexType(MarshallerImpl.java:619)
at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalElementType(MarshallerImpl.java:430)
at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalElement(MarshallerImpl.java:329)
at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalElementOccurence(MarshallerImpl.java:309)
at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshallInternal(MarshallerImpl.java:200)
at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshal(MarshallerImpl.java:157)
at org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBMarshallerImpl.marshal(JBossXBMarshallerImpl.java:147)
at org.jboss.ws.core.jaxrpc.binding.JBossXBSerializer.serialize(JBossXBSerializer.java:105)
at org.jboss.ws.core.binding.SerializerSupport.serialize(SerializerSupport.java:56)
at org.jboss.ws.core.soap.ObjectContent.marshallObjectContents(ObjectContent.java:171)
at org.jboss.ws.core.soap.ObjectContent.transitionTo(ObjectContent.java:78)
at org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentElement.java:146)
at org.jboss.ws.core.soap.SOAPContentElement.writeElement(SOAPContentElement.java:587)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElementImpl.java:924)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.java:909)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElementImpl.java:924)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.java:909)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElementImpl.java:924)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.java:909)
at org.jboss.ws.core.soap.SOAPElementWriter.writeElementInternal(SOAPElementWriter.java:150)
at org.jboss.ws.core.soap.SOAPElementWriter.writeElement(SOAPElementWriter.java:131)
at org.jboss.ws.core.soap.SOAPMessageImpl.writeTo(SOAPMessageImpl.java:429)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.sendResponse(RequestHandlerImpl.java:457)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:373)
... 19 more
Is this a bug or is it not possible to place the webservice implementations outside the WAR, if referenced in web.xml ?
Robert
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/641482#641482]
Start a new discussion in JBoss AS 7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years
[JBoss AS 7 Development] - Re: JMX-based monitoring the jbossAS7 database connection pool
by duan xz
duan xz [http://community.jboss.org/people/duanxz] created the discussion
"Re: JMX-based monitoring the jbossAS7 database connection pool"
To view the discussion, visit: http://community.jboss.org/message/641469#641469
--------------------------------------------------------------
Hi,Braun
when i used “Detyped Description of the AS 7 Management Model" retrieve jboss datasource,on jbossAS7 console appear the follow ERROR,
this ERROR message want to tell us what?And what impact it?
=========================================================================================================
00:40:53,125 INFO [org.jboss.remoting] (pool-4-thread-1) JBoss Remoting version 3.2.0.Beta2
00:40:53,207 INFO [org.xnio] (pool-4-thread-1) XNIO Version 3.0.0.Beta3
00:40:53,301 INFO [org.xnio.nio] (pool-4-thread-1) XNIO NIO Implementation Version 3.0.0.Beta3
00:40:55,219 ERROR [org.jboss.remoting.remote] (XNIO NIO Read 1) JBREM00200: Remote connection failed: java.io.IOException: Message data for non-existent channel
00:41:06,290 ERROR [org.jboss.remoting.remote] (XNIO NIO Read 5) JBREM00200: Remote connection failed: java.io.IOException: Window open for non-existent channel
00:41:06,606 ERROR [org.jboss.remoting.remote] (XNIO NIO Read 6) JBREM00200: Remote connection failed: java.io.IOException: Window open for non-existent channel
00:41:17,287 ERROR [org.jboss.remoting.remote] (XNIO NIO Read 8) JBREM00200: Remote connection failed: java.io.IOException: Window open for non-existent channel
00:41:20,770 ERROR [org.jboss.remoting.remote] (XNIO NIO Read 13) JBREM00200: Remote connection failed: java.io.IOException: Window open for non-existent channel
00:41:29,809 ERROR [org.jboss.remoting.remote] (XNIO NIO Read 16) JBREM00200: Remote connection failed: java.io.IOException: Window open for non-existent channel
00:41:31,273 ERROR [org.jboss.remoting.remote] (XNIO NIO Read 17) JBREM00200: Remote connection failed: java.io.IOException: Message data for non-existent channel
00:41:40,941 ERROR [org.jboss.remoting.remote] (XNIO NIO Read 23) JBREM00200: Remote connection failed: java.io.IOException: Window open for non-existent channel
00:41:46,471 ERROR [org.jboss.remoting.remote] (XNIO NIO Read 30) JBREM00200: Remote connection failed: java.io.IOException: Window open for non-existent channel
00:41:49,686 ERROR [org.jboss.remoting.remote] (XNIO NIO Read 32) JBREM00200: Remote connection failed: java.io.IOException: Message data for non-existent channel
00:41:50,059 ERROR [org.jboss.remoting.remote] (XNIO NIO Read 33) JBREM00200: Remote connection failed: java.io.IOException: Message data for non-existent channel
00:41:51,800 ERROR [org.jboss.remoting.remote] (XNIO NIO Read 35) JBREM00200: Remote connection failed: java.io.IOException: Message data for non-existent channel
00:41:51,941 ERROR [org.jboss.remoting.remote] (XNIO NIO Read 36) JBREM00200: Remote connection failed: java.io.IOException: Window open for non-existent channel
00:41:51,950 ERROR [org.jboss.remoting.remote] (XNIO NIO Read 1) JBREM00200: Remote connection failed: java.io.IOException: Connection reset by peer
00:41:52,188 ERROR [org.jboss.remoting.remote] (XNIO NIO Read 37) JBREM00200: Remote connection failed: java.io.IOException: Message data for non-existent channel
....
=========================================================================================================
Any help is appreciate,thanks a lot!
Regard,
duanxz
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/641469#641469]
Start a new discussion in JBoss AS 7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years
[JBoss AS 7 Development] - JBoss AS 7 Bayeux Support
by ronorato
ronorato [http://community.jboss.org/people/ronorato] created the discussion
"JBoss AS 7 Bayeux Support"
To view the discussion, visit: http://community.jboss.org/message/641424#641424
--------------------------------------------------------------
I am attempting to implement a bidirectional connection between my web client and my web server. For this connection I am looking to use the Bayeux protocol. From my previous post I have been informed that JBoss does have some level of support for the Bayeux protocol. I have created a servlet that looks like ( some code has been removed ):
@WebServlet(name="CometServlet", urlPatterns={"/cometd/*"},
initParams={@WebInitParam(name="timeout", value="60000")} )
public class CometServlet extends HttpServlet implements HttpEventServlet
{
protected ArrayList<HttpServletResponse> connections = new ArrayList<HttpServletResponse>();
public CometServlet()
{
log.info( "CometServlet constructed" );
}
public void init()
throws ServletException
{
log.info("init() entered");
}
public void destroy()
{
connections.clear();
}
public void event(HttpEvent event)
throws IOException, ServletException
{
HttpServletRequest request = event.getHttpServletRequest();
HttpServletResponse response = event.getHttpServletResponse();
switch (event.getType()) {
case BEGIN:
synchronized(connections) {
connections.add(response);
}
break;
case ERROR:
synchronized(connections) {
connections.remove(response);
}
event.close();
break;
case END:
synchronized(connections) {
connections.remove(response);
}
event.close();
break;
case READ:
break;
default:
log.warn("Unsupported Event Type: " + event.getType());
}
}
}
My client is sending the following Post:
POST http://localhost:8080/kinetichealth/accountServices http://localhost:8080/myapp/cometd
with the following parameter:
message = [{"version":"1.0","minimumVersion":"0.9","channel":"/meta/handshake","id":"1","supportedConnectionTypes":["long-polling","long-polling-json-encoded","callback-polling"]}]
what I am getting back is 405 - Method not allowed. I am not seeing it hit the event method at all.
Any help would be greatly appreciated.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/641424#641424]
Start a new discussion in JBoss AS 7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years
[EJB3 Development] - Interceptors on JBoss startup
by Igor Urdenko
Igor Urdenko [http://community.jboss.org/people/ingvarwolf] created the discussion
"Interceptors on JBoss startup"
To view the discussion, visit: http://community.jboss.org/message/641354#641354
--------------------------------------------------------------
Hi all,
I have joined a company which has developed a several EJB's (EJB 2.1) runnning under JBoss 4.2.3.GA. My task is to migrate these EJBs (all of them just Stateless Session Beans) from EJB 2.1 to EJB 3.0.
I have completed already an EJB migration and now I am in stack with interceptors. The thing is we have one interceptor which extends org.jboss.ejb.plugins.AbstractInterceptor. This interceptor initializes some of EJBs on JBoss startup. I have tried many approaches but it looks like interceptors work *only* when an EJB created or it's method called. I need an interceptor to be called at the moment EJB is statrted or after all EJBs has been started and before my application starts work. I need this to initialize some functionality.
I am not familiar with EJB 2.1 but it seems to me that interceptors work differently than in EJB 3.0. In EJB 2.1 all interceptors are defined in standardjboss.xml, EJB 3.0 defines them in ejb3-interceptors-aop.xml. I tried to create my interceptor and define it in both files. I tried also to extend AbstractInterceptor, or implement org.jboss.aop.advice.Interceptor, or use @AroundInvoke - @Interceptors annotation. But the result is the same - my interceptor is not called on EJB start (that correspondes to the "STARTED EJB" message in log but only when I create it directly and call a method.
I have created a JBoss service which puts a notification listener that waits for JBoss start and then creates EJBs I need. The required functionality implemented in static block code, so it runs when I create the EJB. But it looks for me like incorrect solution.
Is there any solution for that?
Thank you
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/641354#641354]
Start a new discussion in EJB3 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years