Announcement Announcement Module
Collapse
No announcement yet.
Problem in loading WebServiceServlet in WebService implementation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem in loading WebServiceServlet in WebService implementation

    Hello,

    I am implementing the WebService using JAX-RPC model using Weblogic 8.1 SP4. I am facing the problem in load WebServiceServlet, if my WebService extends ServletEndpointSupport class of Spring API.

    The code attached here,

    Java WebService class:
    JaxRpcEBusinessService.java:

    public class JaxRpcEBusinessService
    extends ServletEndpointSupport
    implements EBusinessFacade {

    /** the WebMDService instance */
    private EBusinessFacade eBusinessFacade = null;

    /**
    * This is a default constructor
    */
    public JaxRpcEBusinessService() {
    }

    protected void onInit() {
    this.eBusinessFacade = (EBusinessFacade) getWebApplicationContext().
    getBean("eBusinessFacade");
    }

    // business methods
    }


    Configuration files:
    web.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>

    <!--
    - Location of the Log4J config file, for initialization and refresh checks.
    - Applied by Log4jConfigListener.
    -->
    <context-param>
    <param-name>log4jConfigLocation</param-name>
    <param-value>/WEB-INF/log4j.properties</param-value>
    </context-param>

    <!-- Load on startup servlets in the loading order -->
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:/beanRefContext.xml</param-value>
    </context-param>

    <listener>
    <listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>
    </listener>

    <servlet>
    <servlet-name>context</servlet-name>
    <servlet-class>org.springframework.web.context.ContextLoade rServlet</servlet-class>
    <init-param>
    <param-name>contextClass</param-name>
    <param-value>org.springframework.web.context.XmlWebApplic ationContext</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>

    <!--
    - Spring web MVC servlet that dispatches requests to registered handlers.
    - Has its own application context, by default defined in "{servlet-name}-servlet.xml",
    - i.e. "webservices-servlet.xml" in this case.
    -
    - A web app can contain any number of such servlets.
    - Note that this web app has a shared root application context, serving as parent
    - of all DispatcherServlet contexts.
    -->
    <servlet>
    <servlet-name>webservices</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherSe rvlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>


    <!-- Logger initialization servlet -->
    <servlet>
    <servlet-name>LoggingConfig</servlet-name>
    <servlet-class>com.wellpoint.webmd.webutils.LoggingConfig</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>

    <!-- Servlet mappings -->
    <servlet-mapping>
    <servlet-name>LoggingConfig</servlet-name>
    <url-pattern>/servlet/LoggingConfig</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
    <servlet-name>webservices</servlet-name>
    <url-pattern>/webservices/*</url-pattern>
    </servlet-mapping>

    </web-app>



    webservices-servlet.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

    <!--
    - Application context for the remote EBusinessFacade client.
    - Defines various EBusinessFacade proxies to be called by schedulers.
    -->
    <beans>

    <bean id="eBusinessFacade"
    class="com.wellpoint.webmd.services.EBusinessFacad eImpl"/>

    </beans>


    The stack trace give which is throwing in the WLS 8.1 server on deployment is here,

    <Apr 6, 2006 12:43:41 PM EDT> <Error> <HTTP> <BEA-101216> <Servlet: "WebServic
    ervlet" failed to preload on startup in Web application: "WebMDUI".
    javax.servlet.ServletException: WebServiceServlet did not initialized properly
    eblogic.webservice.server.ConfigException: failed to create invocation handler
    at weblogic.webservice.server.servlet.WebServiceServl et.initLocal(WebS
    viceServlet.java:128)
    at weblogic.webservice.server.servlet.WebServiceServl et.init(WebServic
    ervlet.java:86)
    at javax.servlet.GenericServlet.init(GenericServlet.j ava:258)
    at weblogic.servlet.internal.ServletStubImpl$ServletI nitAction.run(Ser
    etStubImpl.java:1028)
    at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(Authentica
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Se curityManager.jav
    121)
    at weblogic.servlet.internal.ServletStubImpl.createSe rvlet(ServletStub
    pl.java:904)
    at weblogic.servlet.internal.ServletStubImpl.createIn stances(ServletSt
    Impl.java:883)
    at weblogic.servlet.internal.ServletStubImpl.prepareS ervlet(ServletStu
    mpl.java:822)
    at weblogic.servlet.internal.WebAppServletContext.pre loadServlet(WebAp
    ervletContext.java:3333)
    at weblogic.servlet.internal.WebAppServletContext.pre loadServlets(WebA
    ServletContext.java:3278)
    at weblogic.servlet.internal.WebAppServletContext.pre loadResources(Web
    pServletContext.java:3259)
    at weblogic.servlet.internal.WebAppServletContext.set Started(WebAppSer
    etContext.java:5949)
    at weblogic.servlet.internal.WebAppModule.start(WebAp pModule.java:862)
    at weblogic.j2ee.J2EEApplicationContainer.start(J2EEA pplicationContain
    .java:2127)
    at weblogic.j2ee.J2EEApplicationContainer.activate(J2 EEApplicationCont
    ner.java:2168)
    at weblogic.management.deploy.slave.SlaveDeployer$Com ponentActivateTas
    activateContainer(SlaveDeployer.java:2503)
    at weblogic.management.deploy.slave.SlaveDeployer$Act ivateTask.doCommi
    SlaveDeployer.java:2421)
    at weblogic.management.deploy.slave.SlaveDeployer$Tas k.commit(SlaveDep
    yer.java:2138)
    at weblogic.management.deploy.slave.SlaveDeployer$Tas k.checkAutoCommit
    laveDeployer.java:2237)
    at weblogic.management.deploy.slave.SlaveDeployer$Tas k.prepare(SlaveDe
    oyer.java:2132)
    at weblogic.management.deploy.slave.SlaveDeployer$Act ivateTask.prepare
    laveDeployer.java:2384)
    at weblogic.management.deploy.slave.SlaveDeployer.pro cessPrepareTask(S
    veDeployer.java:866)
    at weblogic.management.deploy.slave.SlaveDeployer.pre pareDelta(SlaveDe
    oyer.java:594)
    at weblogic.management.deploy.slave.SlaveDeployer.pre pareUpdate(SlaveD
    loyer.java:508)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execu te(SlaveCallbackH
    dler.java:25)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:178)
    Caused by: weblogic.webservice.server.ConfigException: failed to create invoca
    on handler
    at weblogic.webservice.server.WebServiceFactory.initC omponents(WebServ
    eFactory.java:433)
    at weblogic.webservice.server.WebServiceFactory.creat eFromMBean(WebSer
    ceFactory.java:195)
    at weblogic.webservice.server.WebServiceFactory.creat eFromMBean(WebSer
    ceFactory.java:156)
    at weblogic.webservice.server.WebServiceContext.<init >(WebServiceConte
    .java:91)
    at weblogic.webservice.server.servlet.ServletSecurity Helper$1.run(Serv
    tSecurityHelper.java:124)
    at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(Authentica
    dSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(Se curityManager.jav
    147)
    at weblogic.webservice.server.servlet.ServletSecurity Helper.createWebS
    viceContext(ServletSecurityHelper.java:118)
    at weblogic.webservice.server.servlet.WebServiceServl et.initLocal(WebS
    viceServlet.java:121)
    ... 27 more
    >


    Can somebody suggest/guide me to resolve this problem?
    Thanks in advance.

    Thanks,
    Ravi Kadoor

  • #2
    I am getting the same error, since you have posted the problem in April, I was wondering whether you found the solution. If yes, can you please let me know.

    Thanks
    Ashish

    Comment

    Working...
    X