Announcement Announcement Module
Collapse
No announcement yet.
HttpInvokers error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • HttpInvokers error

    Hi all, I have an application con HttpInvokers with following file:

    Server Side
    web.xml
    <servlet>
    <servlet-name>remoting</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherSe rvlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>remoting</servlet-name>
    <url-pattern>/remoting/*</url-pattern>
    </servlet-mapping>

    remoting-servlet.xml

    <bean name="/CajaServicio" class="org.springframework.remoting.httpinvoker.Ht tpInvokerServiceExporter">
    <property name="service" ref="cajaServicio"/>
    <property name="serviceInterface" value="com.desktop.caja.EscritorioCajaInt"/>
    </bean>

    applicationContext.xml

    <bean id="cajaServicio" class="com.desktop.caja.EscritorioCajaImpl"/>

    the Inteface
    package com.desktop.caja;
    public interface EscritorioCajaInt {
    public String obtenerNombreCajera();
    }

    the Implementation

    package com.desktop.caja;
    public class EscritorioCajaImpl implements EscritorioCajaInt{
    public String obtenerNombreCajera(){
    return "....";
    }
    }

    Client Side

    applicationContext.xml
    <bean id="cajaServicio" class="org.springframework.remoting.httpinvoker.Ht tpInvokerProxyFactoryBean">
    <property name="serviceUrl" value="http://localhost:8084/MyApp/remoting/CajaServicio"/>
    <property name="serviceInterface" value="com.desktop.caja.EscritorioCajaInt"/>
    </bean>

    CajaTest :

    public class CajaTest {

    public static void main(String[] args) {
    ApplicationContext ctx = new ClassPathXmlApplicationContext("com/desktop/caja/clientecaja-context.xml");
    EscritorioCajaInt servicio = (EscritorioCajaInt) ctx.getBean("cajaServicio");
    String nombre = servicio.obtenerNombreCajera();
    System.out.println("Cajera : "+nombre);
    }
    }

    and I get the following error:

    11/05/2010 03:58:28 PM org.springframework.context.support.AbstractApplic ationContext prepareRefresh
    INFO: Refreshing org.springframework.context.support.ClassPathXmlAp plicationContext@1cb25f1: display name [org.springframework.context.support.ClassPathXmlAp plicationContext@1cb25f1]; startup date [Tue May 11 15:58:28 PET 2010]; root of context hierarchy
    11/05/2010 03:58:28 PM org.springframework.beans.factory.xml.XmlBeanDefin itionReader loadBeanDefinitions
    INFO: Loading XML bean definitions from class path resource [com/desktop/caja/clientecaja-context.xml]
    11/05/2010 03:58:28 PM org.springframework.context.support.AbstractApplic ationContext obtainFreshBeanFactory
    INFO: Bean factory for application context [org.springframework.context.support.ClassPathXmlAp plicationContext@1cb25f1]: org.springframework.beans.factory.support.DefaultL istableBeanFactory@ef2c60
    11/05/2010 03:58:28 PM org.springframework.beans.factory.support.DefaultL istableBeanFactory preInstantiateSingletons
    INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultL istableBeanFactory@ef2c60: defining beans [cajaServicio]; root of factory hierarchy
    Exception in thread "main" org.springframework.remoting.RemoteAccessException : Could not access HTTP invoker remote service at [http://localhost:8084/MyApp/remoting/CajaServicio]; nested exception is java.io.IOException: Did not receive successful HTTP response: status code = 500, status message = [Error Interno del Servidor]
    at org.springframework.remoting.httpinvoker.HttpInvok erClientInterceptor.convertHttpInvokerAccessExcept ion(HttpInvokerClientInterceptor.java:211)
    at org.springframework.remoting.httpinvoker.HttpInvok erClientInterceptor.invoke(HttpInvokerClientInterc eptor.java:144)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)
    at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy0.obtenerNombreCajera(Unknown Source)
    at com.desktop.caja.CajaTest.main(CajaTest.java:23)
    Caused by: java.io.IOException: Did not receive successful HTTP response: status code = 500, status message = [Error Interno del Servidor]
    at org.springframework.remoting.httpinvoker.SimpleHtt pInvokerRequestExecutor.validateResponse(SimpleHtt pInvokerRequestExecutor.java:146)
    at org.springframework.remoting.httpinvoker.SimpleHtt pInvokerRequestExecutor.doExecuteRequest(SimpleHtt pInvokerRequestExecutor.java:65)
    at org.springframework.remoting.httpinvoker.AbstractH ttpInvokerRequestExecutor.executeRequest(AbstractH ttpInvokerRequestExecutor.java:136)
    at org.springframework.remoting.httpinvoker.HttpInvok erClientInterceptor.executeRequest(HttpInvokerClie ntInterceptor.java:191)
    at org.springframework.remoting.httpinvoker.HttpInvok erClientInterceptor.executeRequest(HttpInvokerClie ntInterceptor.java:173)
    at org.springframework.remoting.httpinvoker.HttpInvok erClientInterceptor.invoke(HttpInvokerClientInterc eptor.java:141)
    ... 4 more

    But I run in other application with the same configuration and I don't have any error , but in this application I get it, so I don't understand it, please help me
Working...
X