Steve

Sorry for the extra email traffic.  Yep, that was the problem.
I couldn't see it for the life of me...until after I had written the email.

Thanks.

Stuart

On Feb 20, 2011, at 12:01 PM, Steve Bayliss wrote:

> Hi Stuart
> 
> Are you sure you're doing an HTTP POST?  The stack trace is consistent with
> a GET (= getObjectProfile), ie it's looking for an object with a PID of
> "new" - hence the malformed PID exception.
> 
> FYI I find http://code.google.com/p/rest-client/ useful for
> testing/debugging the REST API methods.
> 
> Regards
> Steve
> 
>> -----Original Message-----
>> From: Stuart Chalk [mailto:sch...@unf.edu] 
>> Sent: 20 February 2011 11:32
>> To: Fedora-commons-users@lists.sourceforge.net
>> Subject: [fcrepo-user] Problem with new object creation
>> 
>> 
>> I'm using Fedora 3.4.2 and doing a simple object creation via 
>> the REST interface does not work.
>> 
>> http://localhost:8080/fedora/objects/new AND 
>> http://localhost:8080/fedora/objects/new?namespace=chalk 
>> (where chalk is an existing namespace in the pidGen table) 
>> gives (no request content provided)
>> 
>> javax.ws.rs.WebApplicationException: 
>> org.fcrepo.server.errors.MalformedPidException: PID delimiter 
>> (:) is missing.
>>      at 
>> org.fcrepo.server.rest.BaseRestResource.handleException(BaseRe
>> stResource.java:168)
>>      at 
>> org.fcrepo.server.rest.FedoraObjectResource.getObjectProfile(F
>> edoraObjectResource.java:197)
>>      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>      at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
>> orImpl.java:39)
>>      at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
>> odAccessorImpl.java:25)
>>      at java.lang.reflect.Method.invoke(Method.java:597)
>>      at 
>> com.sun.jersey.server.impl.model.method.dispatch.AbstractResou
>> rceMethodDispatchProvider$ResponseOutInvoker._dispatch(Abstrac
> tResourceMethodDispatchProvider.java:175)
>>      at 
>> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaM
>> ethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
>>      at 
>> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(Htt
>> pMethodRule.java:163)
>>      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.a
>> ccept(RootResourceClassesRule.java:63)
>>      at 
>> com.sun.jersey.server.impl.application.WebApplicationImpl._han
>> dleRequest(WebApplicationImpl.java:689)
>>      at 
>> com.sun.jersey.server.impl.application.WebApplicationImpl.hand
>> leRequest(WebApplicationImpl.java:647)
>>      at 
>> com.sun.jersey.server.impl.application.WebApplicationImpl.hand
>> leRequest(WebApplicationImpl.java:638)
>>      at 
>> com.sun.jersey.spi.container.servlet.WebComponent.service(WebC
>> omponent.java:309)
>>      at 
>> com.sun.jersey.spi.container.servlet.ServletContainer.service(
>> ServletContainer.java:425)
>>      at 
>> com.sun.jersey.spi.container.servlet.ServletContainer.service(
>> ServletContainer.java:590)
>>      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>      at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
>> er(ApplicationFilterChain.java:290)
>>      at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
>> cationFilterChain.java:206)
>>      at 
>> org.fcrepo.server.security.servletfilters.FilterRestApiFlash.d
>> oFilter(FilterRestApiFlash.java:79)
>>      at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
>> er(ApplicationFilterChain.java:235)
>>      at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
>> cationFilterChain.java:206)
>>      at 
>> org.fcrepo.server.security.jaas.AuthFilterJAAS.doFilter(AuthFi
>> lterJAAS.java:270)
>>      at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
>> er(ApplicationFilterChain.java:235)
>>      at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
>> cationFilterChain.java:206)
>>      at 
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
>> rapperValve.java:233)
>>      at 
>> org.apache.catalina.core.StandardContextValve.invoke(StandardC
>> ontextValve.java:191)
>>      at 
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(Aut
>> henticatorBase.java:525)
>>      at 
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
>> Valve.java:128)
>>      at 
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
>> Valve.java:102)
>>      at 
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
>> gineValve.java:109)
>>      at 
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap
>> ter.java:293)
>>      at 
>> org.apache.coyote.http11.Http11Processor.process(Http11Process
>> or.java:849)
>>      at 
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle
>> r.process(Http11Protocol.java:583)
>>      at 
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.
>> java:454)
>>      at java.lang.Thread.run(Thread.java:680)
>> Caused by: org.fcrepo.server.errors.MalformedPidException: 
>> PID delimiter (:) is missing.
>>      at org.fcrepo.server.Server.getPID(Server.java:1355)
>>      at 
>> org.fcrepo.server.access.DefaultAccess.getObjectProfile(Defaul
>> tAccess.java:633)
>>      at 
>> org.fcrepo.server.rest.FedoraObjectResource.getObjectProfile(F
>> edoraObjectResource.java:184)
>>      ... 36 more
>> 
>> Also, 
>> http://localhost:8080/fedora/objects/chalk:exp1?label=Test  
>> (no request content provided) returns chalk:exp1 but does not 
>> create an object.
>> 
>> In all the above examples the API-M does require 
>> authentication which was given before the requests were submitted.
>> 
>> FYI: I can go into the admin interface and create a bare 
>> object no problem.
>> 
>> What am I doing wrong?
>> 
>> Stuart Chalk, Ph.D.
>> Associate Professor of Chemistry
>> Department of Chemistry
>> University of North Florida
>> 1 UNF Drive
>> Jacksonville, FL 32224 USA
>> P: 904-620-1938
>> F: 904-620-3535
>> E: sch...@unf.edu
>> W: http://www.unf.edu/coas/chemistry/
>> 
>> 
>> --------------------------------------------------------------
>> ----------------
>> The ultimate all-in-one performance toolkit: Intel(R) 
>> Parallel Studio XE:
>> Pinpoint memory and threading errors before they happen.
>> Find and fix more than 250 security defects in the development cycle.
>> Locate bottlenecks in serial and parallel code that limit performance.
>> http://p.sf.net/sfu/intel-dev2devfeb
>> _______________________________________________
>> Fedora-commons-users mailing list
>> Fedora-commons-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
>> 
> 
> 
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> Fedora-commons-users mailing list
> Fedora-commons-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users


------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to