Hi Peter,
Here are a few things you can try, just to help track down the problem:
- Try the same action with several other files of varying type and size
- Try performing the request as a non-multipart
- Try using another client (a couple options:
http://code.google.com/p/poster-extension/,
http://code.google.com/p/rest-client/)

If one of those works or provides a different error we'll have more to go on
in trying to track this down.

Bill


On Mon, Aug 24, 2009 at 11:08 AM, Peter Herndon <[email protected]> wrote:

> Hi all,
>
> I'm working on updating my Python client library to work with Fedora
> 3.2.1, and I'm running into an error with the REST API addDatastream
> method, which is causing an exception in Fedora.
>
> I'm posting a multi-part file upload (a PNG image) to the URL
>
> http://localhost:8081/fedora32/objects/changeme:5/datastreams/avatar?controlGroup=M&dsLabel=southpark_me.png
>
> I am running on Linux, using Fedora 11.  Java is OpenJDK 1.6.0 build 14,
> db is PostgreSQL 8.3.7, I'm using the installer version of 3.2.1 (not
> compiling from source), and I'm doing a custom install with SSL,
> messaging, and authentication turned off.
>
> The client library I've written works fine with Fedora 3.1 on the same
> system, using an installer version of 3.1 again with SSL, authentication
> and messaging off, and with REST API turned on.  Has anyone run into a
> similar issue on 3.2.1?  Is there a new configuration variable somewhere
> I've not set properly?  My immediate thought was that the below is a
> file-system permissions error, so I went looking for all the "temp" and
> "work" directories I could find and made sure my account had write
> permission.  That didn't help, so I started Fedora as root, and got the
> same exception.  At this point, I'm at a bit of a loss.  Can anyone
> provide pointers?
>
> The exception:
>
> javax.ws.rs.WebApplicationException:
> fedora.server.errors.StreamWriteException: Error writing temp stream
>     at
>
> fedora.server.rest.BaseRestResource.handleException(BaseRestResource.java:122)
>     at
>
> fedora.server.rest.DatastreamResource.addOrUpdateDatastream(DatastreamResource.java:498)
>     at
>
> fedora.server.rest.DatastreamResource.addDatastream(DatastreamResource.java:349)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>     at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:616)
>     at
>
> com.sun.jersey.server.impl.model.method.dispatch.EntityParamDispatchProvider$ResponseOutInvoker._dispatch(EntityParamDispatchProvider.java:157)
>     at
>
> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
>     at
>
> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:124)
>     at
>
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
>     at
>
> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:71)
>     at
>
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
>     at
>
> com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:63)
>     at
>
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:555)
>     at
>
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:514)
>     at
>
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:505)
>     at
>
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:359)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>     at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>     at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>     at
>
> fedora.server.security.servletfilters.FilterRestApiFlash.doFilter(FilterRestApiFlash.java:78)
>     at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
>     at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>     at
>
> fedora.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.java:234)
>     at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
>     at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>     at
>
> fedora.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.java:234)
>     at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
>     at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>     at
>
> fedora.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.java:234)
>     at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
>     at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>     at
>
> fedora.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.java:234)
>     at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
>     at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>     at
>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>     at
>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
>     at
>
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
>     at
>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>     at
>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>     at
>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>     at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
>     at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
>     at
>
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
>     at
>
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
>     at
>
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
>     at
>
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
>     at java.lang.Thread.run(Thread.java:636)
> Caused by: fedora.server.errors.StreamWriteException: Error writing temp
> stream
>     at
>
> fedora.server.management.DefaultManagement.putTempStream(DefaultManagement.java:1219)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>     at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:616)
>     at
>
> fedora.server.messaging.NotificationInvocationHandler.invoke(NotificationInvocationHandler.java:70)
>     at $Proxy0.putTempStream(Unknown Source)
>     at
>
> fedora.server.management.ManagementModule.putTempStream(ManagementModule.java:474)
>     at
>
> fedora.server.rest.DatastreamResource.addOrUpdateDatastream(DatastreamResource.java:430)
>     ... 47 more
> Caused by: java.lang.NullPointerException
>     at
> fedora.server.utilities.StreamUtility.pipeStream(StreamUtility.java:128)
>     at
>
> fedora.server.management.DefaultManagement.putTempStream(DefaultManagement.java:1210)
>     ... 55 more
>
>
> Thanks very much,
>
> ---Peter Herndon
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Fedora-commons-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to