Skip to content
Snippets Groups Projects
Commit 873d0da4 authored by André Starosta's avatar André Starosta
Browse files

Solved gem issue

parent cac75b6a
No related branches found
No related tags found
No related merge requests found
$LOAD_PATH.unshift('/home/starosta/c3sl/dspace-scripts/dspace-rest-client/lib')
require 'dspace'
client = Dspace::Client.new(dspace_api: 'https://seppirdev.c3sl.ufpr.br:8443/rest',logger: Logger.new(STDOUT))
if !client.is_running?
raise 'Can\'t connect to DSpace API.'
end
client.login 'admin@seppirdev.com', 'adminadmin'
puts "Deletando todas as comunidades"
client.communities.all.each do |community|
client.communities.delete(id: community.id)
end
<html><head><title>Apache Tomcat/7.0.56 (Debian) - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field &quot;parentCommunitList&quot; (Class org.dspace.rest.common.Collection), not marked as ignorable</h1><HR size=\"1\" noshade=\"noshade\"><p><b>type</b> Exception report</p><p><b>message</b> <u>org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field &quot;parentCommunitList&quot; (Class org.dspace.rest.common.Collection), not marked as ignorable</u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>javax.servlet.ServletException: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field &quot;parentCommunitList&quot; (Class org.dspace.rest.common.Collection), not marked as ignorable\n at [Source: org.apache.catalina.connector.CoyoteInputStream@4e5bea8d; line: 1, column: 160] (through reference chain: org.dspace.rest.common.Collection[&quot;parentCommunitList&quot;])\n\tcom.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420)\n\tcom.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)\n\tcom.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)\n\tjavax.servlet.http.HttpServlet.service(HttpServlet.java:727)\n</pre></p><p><b>root cause</b> <pre>org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field &quot;parentCommunitList&quot; (Class org.dspace.rest.common.Collection), not marked as ignorable\n at [Source: org.apache.catalina.connector.CoyoteInputStream@4e5bea8d; line: 1, column: 160] (through reference chain: org.dspace.rest.common.Collection[&quot;parentCommunitList&quot;])\n\torg.codehaus.jackson.map.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:53)\n\torg.codehaus.jackson.map.deser.StdDeserializationContext.unknownFieldException(StdDeserializationContext.java:267)\n\torg.codehaus.jackson.map.deser.std.StdDeserializer.reportUnknownProperty(StdDeserializer.java:649)\n\torg.codehaus.jackson.map.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:635)\n\torg.codehaus.jackson.map.deser.BeanDeserializer.handleUnknownProperty(BeanDeserializer.java:1355)\n\torg.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:717)\n\torg.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:580)\n\torg.codehaus.jackson.map.ObjectMapper._readValue(ObjectMapper.java:2695)\n\torg.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1308)\n\torg.codehaus.jackson.jaxrs.JacksonJsonProvider.readFrom(JacksonJsonProvider.java:419)\n\tcom.sun.jersey.json.impl.provider.entity.JacksonProviderProxy.readFrom(JacksonProviderProxy.java:139)\n\tcom.sun.jersey.spi.container.ContainerRequest.getEntity(ContainerRequest.java:490)\n\tcom.sun.jersey.server.impl.model.method.dispatch.EntityParamDispatchProvider$EntityInjectable.getValue(EntityParamDispatchProvider.java:123)\n\tcom.sun.jersey.server.impl.inject.InjectableValuesProvider.getInjectableValues(InjectableValuesProvider.java:86)\n\tcom.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$EntityParamInInvoker.getParams(AbstractResourceMethodDispatchProvider.java:153)\n\tcom.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:183)\n\tcom.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)\n\tcom.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)\n\tcom.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)\n\tcom.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)\n\tcom.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)\n\tcom.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)\n\tcom.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)\n\tcom.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)\n\tcom.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)\n\tcom.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)\n\tcom.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)\n\tcom.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)\n\tcom.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)\n\tjavax.servlet.http.HttpServlet.service(HttpServlet.java:727)\n</pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the Apache Tomcat/7.0.56 (Debian) logs.</u></p><HR size=\"1\" noshade=\"noshade\"><h3>Apache Tomcat/7.0.56 (Debian)</h3></body></html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment