Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2009
    Posts
    28
    Rep Power
    0

    Default While publishing service using HttpInvoker error is occured

    I am developing Client Server application using Spring HttpInvoker.

    Java Code:
    web.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
    <display-name>OTV_SpringHttpInvoker</display-name>
    <listener>
    <listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>
    </listener>
    <servlet>
    <servlet-name>HttpUserService</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherSe rvlet</servlet-class>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>HttpUserService</servlet-name>
    <url-pattern>/HttpUserService</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
    <welcome-file>/pages/index.xhtml</welcome-file>
    </welcome-file-list>
    </web-app>
    
    HttpUserService-servlet.xml:
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:util="http://www.springframework.org/schema/util"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    [url]http://www.springframework.org/schem...-beans-3.0.xsd[/url]
    [url=http://www.springframework.org/schema/util]Index of /schema/util[/url] 
    http://www.springframework.org/schema/util/spring-util-3.0.xsd">
    
    <!-- Beans Declaration -->	
    <bean id="UserMap" class="java.util.concurrent.ConcurrentHashMap" />
    
    <bean id="CacheService" class="com.otv.cache.service.CacheService">
    <property name="userMap" ref="UserMap"/>
    </bean>	
    
    <bean id="HttpUserService" class="com.otv.http.server.HttpUserService" >
    <property name="cacheService" ref="CacheService"/>
    </bean>
    
    <!-- Http Invoker Service Declaration -->
    <bean id="HttpUserServiceExporter" class="org.springframework.remoting.httpinvoker.Ht tpInvokerServiceExporter">
    
    <!-- service represents Service Impl -->
    <property name="service" ref="HttpUserService"/>
    
    <!-- serviceInterface represents Http Service Interface exposed -->
    <property name="serviceInterface" value="com.otv.http.server.IHttpUserService"/>
    
    </bean>
    
    <!-- Mapping configurations from URLs to request handler beans -->
    <bean id="urlMapping" class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
    <property name="mappings">
    <props>
    <prop key="/HttpUserService">HttpUserServiceExporter</prop>
    </props>
    </property>
    </bean>
    
    </beans>
    Using above code I published service. But while checking this service the following occurs in console.
    Java Code:
    17:13:13,925 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
    17:13:39,310 ERROR [[HttpUserService]] Servlet.service() for servlet HttpUserService threw exception
    java.io.EOFException
    at java.io.ObjectInputStream$PeekInputStream.readFull y(Unknown Source)
    at java.io.ObjectInputStream$BlockDataInputStream.rea dShort(Unknown Source)
    at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
    at java.io.ObjectInputStream.<init>(Unknown Source)
    at org.springframework.core.ConfigurableObjectInputSt ream.<init>(ConfigurableObjectInputStream.java:47)
    at org.springframework.remoting.rmi.CodebaseAwareObje ctInputStream.<init>(CodebaseAwareObjectInputStrea m.java:81)
    at org.springframework.remoting.rmi.RemoteInvocationS erializingExporter.createObjectInputStream(RemoteI nvocationSerializingExporter.java:105)
    at org.springframework.remoting.httpinvoker.HttpInvok erServiceExporter.readRemoteInvocation(HttpInvoker ServiceExporter.java:114)
    at org.springframework.remoting.httpinvoker.HttpInvok erServiceExporter.readRemoteInvocation(HttpInvoker ServiceExporter.java:95)
    at org.springframework.remoting.httpinvoker.HttpInvok erServiceExporter.handleRequest(HttpInvokerService Exporter.java:72)
    at org.springframework.web.servlet.mvc.HttpRequestHan dlerAdapter.handle(HttpRequestHandlerAdapter.java: 49)
    at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:790)
    at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:719)
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:644)
    at org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:549)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:690)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doF ilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:175)
    at org.jboss.web.tomcat.security.SecurityAssociationV alve.invoke(SecurityAssociationValve.java:179)
    at org.jboss.web.tomcat.security.JaccContextValve.inv oke(JaccContextValve.java:84)
    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.CachedConnectionV alve.invoke(CachedConnectionValve.java:157)
    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:262)
    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:446)
    at java.lang.Thread.run(Unknown Source)
    17:14:13,925 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
    How to resolve this ?

    And anyone help me to give a sample program to implement client server program using httpinvoker for 2 different systems.
    Last edited by srinivasmallabathula; 06-01-2013 at 06:27 AM.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default Re: While publishing service using HttpInvoker error is occured

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. error occured:-java.lang.NullPointerException
    By niksipandit in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 11-17-2011, 02:54 PM
  2. "A Fatal Error has occured" Please help!
    By Mikeypwned in forum Advanced Java
    Replies: 4
    Last Post: 03-03-2011, 04:24 AM
  3. After installed Tomcat 404 error occured
    By srinivasmallabathula in forum New To Java
    Replies: 2
    Last Post: 01-31-2011, 11:04 AM
  4. Please solve my error occured java.lang.NullPointerException
    By Viruthagiri in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 03-24-2010, 12:08 PM
  5. Error occured during initialization of VM
    By red in forum New To Java
    Replies: 4
    Last Post: 10-02-2008, 07:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •