WebService deployment fails on JBoss 5 based mobicents

64 views
Skip to first unread message

Marko Mrvelj

unread,
Feb 8, 2010, 6:07:13 AM2/8/10
to mobicents-public
Hi!

I am trying to deploy webservice on mobicents 1.2 based on JBoss 5.1
but cannot get it to work.

How to reproduce problem:
1. Create annotated SSB which is also a webservice (see example below)
2. Deploy on mobicents 1.1 or 1.2 (based on JBoss 5.1)
3. Exception occurs
java.lang.ClassCastException:
org.jboss.metadata.ear.spec.EjbModuleMetaData cannot be cast to
org.jboss.metadata.ear.spec.WebModuleMetaData

Example source to reproduce problem. The same example deploys
successfully on JBoss 5.1.0.GA.

Test.java:
------ CUT HERE ---
package com.test;

import javax.jws.WebService;

@WebService
public interface Test {
String getMessage();
}
------ CUT HERE ---


TestWS.java:
------ CUT HERE ---
package com.test;

import javax.ejb.Stateless;
import javax.jws.WebService;

@WebService(name = "TestWS")
@Stateless(name = "TestService")
public class TestWS implements Test {

@Override
public String getMessage() {
return "Hello world";
}

}
------ CUT HERE ---

I would report issue but I am wondering if I am doing something wrong
here?

Eduardo Martins

unread,
Feb 8, 2010, 7:29:27 AM2/8/10
to mobicent...@googlegroups.com
An SBB can't be a Web Service, the SBB is an abstract component which
concrete instances are generated by the SLEE container, and have a
managed lifecycle.

The web service should not be inside SLEE, it should transform
requests into SLEE events, which are fired, into SLEE, through an
Resource Adaptor or through the SleeConnection. The SleeConnection is
a simple and good choice if you don't have a concept such as a
session, that relates multiple events into one "activity".

If the SleeConnection is not "powerful" or "flexible" enough, the HTTP
Servlet RA is an example of integration between a Java EE component,
an HTTP Servlet, and a SLEE Resource Adaptor, it should not be
difficult easy to adapt to replace the HTTP Servlet with a Web
Service.

-- Eduardo

-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-
http://emmartins.blogspot.com
http://www.redhat.com/solutions/telco

Marko Mrvelj

unread,
Feb 8, 2010, 8:01:16 AM2/8/10
to mobicents-public
Hi Eduardo!

Thanks for your comment. I was trying to provide web service on the
SSB
(stateless session bean) - the normal way.

Basically I am trying to deploy in the same way as I would on the
basic JBoss
without mobicents. On vanilla JBoss it deploys, but on mobicents it
does not.

I think it's either bug in mobicents, or I need to specify something
in order for the
webservice to deploy successfully on mobicents.

Best regards
Marko

On Feb 8, 1:29 pm, Eduardo Martins <emmart...@gmail.com> wrote:
> An SBB can't be a Web Service, the SBB is an abstract component which
> concrete instances are generated by the SLEE container, and have a
> managed lifecycle.
>
> The web service should not be inside SLEE, it should transform
> requests into SLEE events, which are fired, into SLEE, through an
> Resource Adaptor or through the SleeConnection. The SleeConnection is
> a simple and good choice if you don't have a concept such as a
> session, that relates multiple events into one "activity".
>
> If the SleeConnection is not "powerful" or "flexible" enough, the HTTP
> Servlet RA is an example of integration between a Java EE component,
> an HTTP Servlet, and a SLEE Resource Adaptor, it should not be
> difficult easy to adapt to replace the HTTP Servlet with a Web
> Service.
>
> -- Eduardo
>

> -:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-http://emmartins.blogspot.comhttp://www.redhat.com/solutions/telco

Eduardo Martins

unread,
Feb 8, 2010, 8:10:47 AM2/8/10
to mobicent...@googlegroups.com
Sorry, I saw SBB, not SSB :-)

-- Eduardo

-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-
http://emmartins.blogspot.com
http://www.redhat.com/solutions/telco

Eduardo Martins

unread,
Feb 8, 2010, 8:14:19 AM2/8/10
to mobicent...@googlegroups.com
Mobicents 1.2 is Mobicents SIP Servlets 1.2 right?

-- Eduardo

-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-
http://emmartins.blogspot.com
http://www.redhat.com/solutions/telco

Marko Mrvelj

unread,
Feb 8, 2010, 8:16:50 AM2/8/10
to mobicents-public
Yes, SIP Servlets 1.2.

On Feb 8, 2:14 pm, Eduardo Martins <emmart...@gmail.com> wrote:
> Mobicents 1.2 is Mobicents SIP Servlets 1.2 right?
>
> -- Eduardo
>

> -:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-http://emmartins.blogspot.comhttp://www.redhat.com/solutions/telco
>

> On Mon, Feb 8, 2010 at 1:10 PM, Eduardo Martins <emmart...@gmail.com> wrote:
> > Sorry, I saw SBB, not SSB :-)
>
> > -- Eduardo
>
> > -:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-
> >http://emmartins.blogspot.com
> >http://www.redhat.com/solutions/telco
>

Vladimir Ralev

unread,
Feb 8, 2010, 8:21:22 AM2/8/10
to mobicent...@googlegroups.com
Okay then, let me try to reproduce it and I will get back to you.

Marko Mrvelj

unread,
Feb 8, 2010, 8:32:42 AM2/8/10
to mobicents-public
Here is the link for the built ear of the source example I provided in
first post:

http://docs.google.com/leaf?id=0B6SMCBr_IpVjZjZjN2IyMmYtZjc1ZS00Mzg3LThlNWYtNDM4MDcyMzZlOTll&hl=en


On Feb 8, 2:21 pm, Vladimir Ralev <vladimir.ra...@gmail.com> wrote:
> Okay then, let me try to reproduce it and I will get back to you.
>

Vladimir Ralev

unread,
Feb 8, 2010, 8:42:08 AM2/8/10
to mobicent...@googlegroups.com
OK thanks. This reproduces the problem. It seems to be specific to
EARs. Can you open an issue here
http://code.google.com/p/mobicents/issues/list
Fix is on its way.

Jean Deruelle

unread,
Feb 10, 2010, 4:12:07 AM2/10/10
to mobicent...@googlegroups.com
Can you try this build http://hudson.jboss.org/hudson/job/MobicentsSipServletsRelease/706/ ? The fix is included in it and it should work.

Thanks in advance
Best regards
Jean

Marko Mrvelj

unread,
Feb 12, 2010, 10:56:40 AM2/12/10
to mobicents-public
Sorry for the delayed response.

I tested fix and confirm it's working.

The only requirement is that you have to use Java 5, because it will
not work with Java 6. I am guessing that mobicents is based on jboss
for jdk5 (not the one for jdk6).

On Feb 10, 10:12 am, Jean Deruelle <jean.derue...@gmail.com> wrote:
> Can you try this buildhttp://hudson.jboss.org/hudson/job/MobicentsSipServletsRelease/706/? The


> fix is included in it and it should work.
>
> Thanks in advance
> Best regards
> Jean
>

> On Mon, Feb 8, 2010 at 2:42 PM, Vladimir Ralev <vladimir.ra...@gmail.com>wrote:
>
> > OK thanks. This reproduces the problem. It seems to be specific to
> > EARs. Can you open an issue here
> >http://code.google.com/p/mobicents/issues/list
> > Fix is on its way.
>

> > On Mon, Feb 8, 2010 at 3:32 PM, Marko Mrvelj <mmrv...@gmail.com> wrote:
> > > Here is the link for the built ear of the source example I provided in
> > > first post:
>

> >http://docs.google.com/leaf?id=0B6SMCBr_IpVjZjZjN2IyMmYtZjc1ZS00Mzg3L...


>
> > > On Feb 8, 2:21 pm, Vladimir Ralev <vladimir.ra...@gmail.com> wrote:
> > >> Okay then, let me try to reproduce it and I will get back to you.
>
> > >> On Mon, Feb 8, 2010 at 3:16 PM, Marko Mrvelj <mmrv...@gmail.com> wrote:
> > >> > Yes, SIP Servlets 1.2.
>
> > >> > On Feb 8, 2:14 pm, Eduardo Martins <emmart...@gmail.com> wrote:
> > >> >> Mobicents 1.2 is Mobicents SIP Servlets 1.2 right?
>
> > >> >> -- Eduardo
>

> > >> >> -:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-http:/

> > >> >> >>> -:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-http:/
> > /emmartins.blogspot.comhttp://www.redhat.com/solutions/telco
>

Jean Deruelle

unread,
Feb 12, 2010, 11:07:46 AM2/12/10
to mobicent...@googlegroups.com
That's correct. What is the exception if you use JDK6 because I'm using JDK 6 locally and it works for me.

Thanks 
Jean

Marko Mrvelj

unread,
Feb 12, 2010, 12:13:08 PM2/12/10
to mobicents-public
Yes, I did not express myself precise enough. Web service will deploy.
Problem occurs during SOAP request to web service. If the mobicents is
running JDK 6, you get following exception:

18:09:45,200 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
java.lang.UnsupportedOperationException: setProperty must be
overridden by all subclasses of SOAPMessage
at javax.xml.soap.SOAPMessage.setProperty(Unknown Source)
at
org.jboss.ws.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:87)
at
org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:
215)
at
org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:
193)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:
455)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:
295)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:
205)
at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:
131)
at
org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:
85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:
96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
235)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
191)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:
190)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:
92)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:
126)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:
70)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:
158)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
330)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
829)
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint
$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)

This is known issue with JBoss and JDK-6. It does not occur on JBoss
for JDK 6.

Best regards

On Feb 12, 5:07 pm, Jean Deruelle <jean.derue...@gmail.com> wrote:
> That's correct. What is the exception if you use JDK6 because I'm using JDK
> 6 locally and it works for me.
>
> Thanks
> Jean
>

Jean Deruelle

unread,
Feb 12, 2010, 12:23:31 PM2/12/10
to mobicent...@googlegroups.com
OK Make sense. 
I created an issue to track it down 

Jean Deruelle

unread,
Feb 28, 2010, 2:56:34 PM2/28/10
to mobicent...@googlegroups.com
Mobicents Sip Servlets is now available based on the JBoss 5 JDK 6 build as well. You can get it from 

Please let us know if that works out better
Jean
Reply all
Reply to author
Forward
0 new messages