kink80 / odata4j

Automatically exported from code.google.com/p/odata4j
0 stars 0 forks source link

class ODataProducerProvider does not work althought it print creating create producer from factory login #235

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Just use your example of host an odata4j producer with Apache Tomcat
2.configure web.xml like this
<servlet>
        <servlet-name>OData</servlet-name>
         <servlet-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class>
         <init-param>
            <param-name>javax.ws.rs.Application</param-name>
            <param-value>org.odata4j.jersey.producer.resources.ODataApplication</param-value>
        </init-param>
         <!--
        <init-param>
         <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name>
          <param-value>org.odata4j.producer.resources.ODataResourceConfig</param-value>
        </init-param>-->
        <init-param>
            <param-name>odata4j.producerfactory</param-name>
            <param-value>com.sap.cesp.creditinsight.web.app.ExampleProducerFactory</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>OData</servlet-name>
        <url-pattern>/rest/*</url-pattern>
    </servlet-mapping>
3. Deploy application in tomcat.

What is the expected output? What do you see instead?
When I visit 
http://localhost:8080/appui/rest/example.svc/
The console shows 
INFO: Creating producer from factory in resource config: 
com.sap.cesp.creditinsight.web.app.ExampleProducerFactory
But no output in my browser.

What version of the product are you using? On what operating system?
I use 
odata4j-dist:0.7.0-sap-03.jar
jersey-spring 1.14
jersey-server:1.8
Please provide any additional information below.
And I also want to know how to use DefaultODataProducerProvider and
ODataProducerProvider 
Because one create producer from factory from system configuration and the 
other from resource config.

Thanks very much!

Original issue reported on code.google.com by sjtu.zhi...@gmail.com on 6 Dec 2012 at 10:04