Results 1 to 7 of 7

Thread: Exception with HttpRemote

  1. #1

    Default Exception with HttpRemote

    Hi,

    I've been through everything I can find, but still can't seem to get this Http remoting to work - I always get a FileNotFoundException.

    I have in my web.xml:

    Code:
    <servlet> 
          <servlet-name>remoting</servlet-name> 
          <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> 
          <load-on-startup>3</load-on-startup> 
       </servlet>    
       <servlet-mapping> 
          <servlet-name>remoting</servlet-name> 
          <url-pattern>/remoting/*</url-pattern> 
       </servlet-mapping>
    and in my remoting-servlet.xml:
    Code:
    <beans>
    	<!-- declare it using httpinvoker -->
    	<bean name="/DiscoveryService-httpInvoker" class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
            <property name="service"><ref bean="discoveryServiceTarget"/></property>
            <property name="serviceInterface">
                <value>com.component.discovery.DiscoveryService</value>
            </property>
    	</bean>
    </beans>
    In my application_context.xml I have:
    Code:
    	<!-- service we're going to remote -->
    	<bean id="discoveryServiceTarget" class="com.component.discovery.DiscoveryServiceImpl">
    		<property name="quartzService">
    			<ref local="quartzService"/>
    		</property>
    	</bean>
    	
    	<!-- make available on "client" -->
    	<bean id="remoteDiscoveryService" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
    		<property name="serviceUrl">
    			<value>http&#58;//localhost&#58;8080/remoting/DiscoveryService-httpInvoker</value>
    		</property>
    		<property name="serviceInterface">
                <value>com.component.discovery.DiscoveryService</value>
    		</property>
    	</bean>
    but all to no avail!

    Can anyone please spot what I have done wrong - been banging my head on this for ages now!

    One thing, maybe, to note, is that this is all on one machine...

    cheers,

    David

  2. #2
    Join Date
    Feb 2005
    Posts
    217

    Default

    In my application_context.xml I have:
    Are you expecting that file to be loaded automatically? If so then rename it to be
    Code:
    applicationContext.xml
    the capitalization is important (and the lack of an underscore )

  3. #3

    Default

    sorry - that was a typo in my post - of course, it's named applicationContext.xml!

    Can anyone see why the remote service can't be found?

    cheers,

    David

  4. #4
    Join Date
    Feb 2005
    Posts
    217

    Default

    I take it you have a quartzService defined somewhere? (although that wouldn't give you a file not found error).

    Its also unclear when you get that error. Is it when tomcat starts up? When the service interacts with the sevice on port 8080? Is that throwing the file not found error?

    Can you try and get this working in a junit test, taking tomcat out of the picture?

  5. #5

    Default

    Hi,

    Everything works fine (starts up etc)...except when I try and call remoteDiscoveryService from within my code - then it throws the following exception:

    org.springframework.remoting.RemoteAccessException : Cannot access HTTP invoker r
    emote service at [http://localhost:8080/remoting/Disco...-httpInvoker];
    nested exception is java.io.FileNotFoundException: http://localhost:8080/remotin
    g/DiscoveryService-httpInvoker

  6. #6
    Join Date
    Feb 2005
    Posts
    217

    Default

    Have you looked into if the call is going through to the server and the method you're calling is throwing the exception?

  7. #7

    Default

    Aggghhh - my bad. Turns out I'd left out the app name when I set up the remote address. I hate errors like that!

    cheers,

    David

Similar Threads

  1. Replies: 3
    Last Post: Oct 5th, 2005, 08:39 AM
  2. Context initialization failed
    By kanonmicke in forum Container
    Replies: 7
    Last Post: Sep 29th, 2005, 12:35 AM
  3. Odd behaviour when injecting TransactionTemplate
    By damon311 in forum Container
    Replies: 3
    Last Post: Jul 23rd, 2005, 11:21 AM
  4. Replies: 0
    Last Post: Jul 11th, 2005, 05:49 PM
  5. Replies: 3
    Last Post: Nov 8th, 2004, 07:30 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
  •