Dublin Core Elements Title as URI causes an error in admin interface?

12 views
Skip to first unread message

Anderson, Steven

unread,
Nov 2, 2015, 11:11:58 AM11/2/15
to fedora-c...@googlegroups.com
Hiya,

Background:
-----------------
I have a use case to use complex titles in Fedora 4 Commons. In particular, there are cases where my titles come from a controlled vocabulary already that I would want to use my URI for rather than a local text string. In addition, as my metadata for my local titles is more complex than just a simple text "title" and a simple text "alternative title" that I am not willing to lose fidelity on, I am minting my own Fedora 4 "Title" Objects.

As Dublin Core Terms is limited to a literal title string, I am using the Dublin Core Elements title predicate for my primary object title (which has no range restrictions that I am aware of). In addition, I set the SKOSXL prefLabel to this uri (be it locally minted or external) although this is unrelated as the error occurs whether this is set or not.


The Issue:
--------------

While I can interact with the object via Hydra / ActiveFedora, the Fedora administrative interface throws an error dealing with the object. The stack trace for this is at the end of the email. I'm unsure what other functionality could be affected by this beyond just accessing the object page currently. Am I doing something wrong? Or does Fedora's administrative interface place constraints on the Dublin Core Elements title (or perhaps do I understand that the allowed range incorrectly)? Or is this a bug in Fedora 4 Commons (that can hopefully be fixed)?

Thanks!


Sincerely,
Steven Anderson
Web Services - Digital Library Repository Developer
617-859-2393
sand...@bpl.org


org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getObjectTitle' in class org.fcrepo.http.commons.responses.ViewHelpers threw exception java.lang.UnsupportedOperationException: http://id.loc.gov/authorities/names/n00020514 is not a literal node at /views/node.vsl[line 2, column 25] at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:243) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:187) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280) at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:567) at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71) at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342) at org.apache.velocity.Template.merge(Template.java:356) at org.apache.velocity.Template.merge(Template.java:260) at org.fcrepo.http.api.responses.StreamingBaseHtmlProvider.writeTo(StreamingBaseHtmlProvider.java:212) at org.fcrepo.http.api.responses.StreamingBaseHtmlProvider.writeTo(StreamingBaseHtmlProvider.java:85) at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:265) at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:250) at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162) at org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:106) at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162) at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:85) at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162) at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1154) at org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:621) at org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:377) at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:367) at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:274) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) at org.glassfish.jersey.internal.Errors.process(Errors.java:315) at org.glassfish.jersey.internal.Errors.process(Errors.java:297) at org.glassfish.jersey.internal.Errors.process(Errors.java:267) at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297) at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254) at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1030) at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:373) at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:381) at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:344) at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:522) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:370) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494) at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.UnsupportedOperationException: http://id.loc.gov/authorities/names/n00020514 is not a literal node at com.hp.hpl.jena.graph.Node.getLiteral(Node.java:227) at org.fcrepo.http.commons.responses.ViewHelpers.getObjectTitle(ViewHelpers.java:215) at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173) ... 58 more

Andrew Woods

unread,
Nov 4, 2015, 6:22:03 PM11/4/15
to Anderson, Steven, fedora-c...@googlegroups.com
Hello Steven,
As you likely noticed, Aaron Coburn created and resolved a JIRA ticket for this issue. 

In order to help verify the provided resolution, could you please respond with a specific example title that was previously failing?
Thanks,
Andrew


--
You received this message because you are subscribed to the Google Groups "Fedora Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fedora-communi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anderson, Steven

unread,
Nov 5, 2015, 11:08:43 AM11/5/15
to Andrew Woods, fedora-c...@googlegroups.com
Andrew,

A sample can be done as the following on an object:

<self_uri> <http://purl.org/dc/elements/1.1/title> <http://id.loc.gov/authorities/names/n00020514>

In terms of Hydra, it is essentially specifying the following in your model and then setting it to a local ActiveFedora object or to a remote URI.

property :title, predicate: ::RDF::DC11.title, multiple: true do |index|
index.as :stored_searchable
end

Thanks!

Sincerely,
Steven Anderson
Web Services - Digital Library Repository Developer
617-859-2393
sand...@bpl.org

________________________________________
From: Andrew Woods [awo...@duraspace.org]
Sent: Wednesday, November 04, 2015 6:22 PM
To: Anderson, Steven
Cc: fedora-c...@googlegroups.com
Subject: Re: [fedora-community] Dublin Core Elements Title as URI causes an error in admin interface?

Hello Steven,
As you likely noticed, Aaron Coburn created and resolved a JIRA ticket for this issue.
https://jira.duraspace.org/browse/FCREPO-1811

In order to help verify the provided resolution, could you please respond with a specific example title that was previously failing?
Thanks,
Andrew

On Mon, Nov 2, 2015 at 11:11 AM, Anderson, Steven <sand...@bpl.org<mailto:sand...@bpl.org>> wrote:
Hiya,

Background:
-----------------
I have a use case to use complex titles in Fedora 4 Commons. In particular, there are cases where my titles come from a controlled vocabulary already that I would want to use my URI for rather than a local text string. In addition, as my metadata for my local titles is more complex than just a simple text "title" and a simple text "alternative title" that I am not willing to lose fidelity on, I am minting my own Fedora 4 "Title" Objects.

As Dublin Core Terms is limited to a literal title string, I am using the Dublin Core Elements title predicate for my primary object title (which has no range restrictions that I am aware of). In addition, I set the SKOSXL prefLabel to this uri (be it locally minted or external) although this is unrelated as the error occurs whether this is set or not.


The Issue:
--------------

While I can interact with the object via Hydra / ActiveFedora, the Fedora administrative interface throws an error dealing with the object. The stack trace for this is at the end of the email. I'm unsure what other functionality could be affected by this beyond just accessing the object page currently. Am I doing something wrong? Or does Fedora's administrative interface place constraints on the Dublin Core Elements title (or perhaps do I understand that the allowed range incorrectly)? Or is this a bug in Fedora 4 Commons (that can hopefully be fixed)?

Thanks!


Sincerely,
Steven Anderson
Web Services - Digital Library Repository Developer
617-859-2393<tel:617-859-2393>
sand...@bpl.org<mailto:sand...@bpl.org>


org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getObjectTitle' in class org.fcrepo.http.commons.responses.ViewHelpers threw exception java.lang.UnsupportedOperationException: http://id.loc.gov/authorities/names/n00020514 is not a literal node at /views/node.vsl[line 2, column 25] at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:243) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:187) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280) at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:567) at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71) at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342) at org.apache.velocity.Template.merge(Template.java:356) at org.apache.velocity.Template.merge(Template.java:260) at org.fcrepo.http.api.responses.StreamingBaseHtmlProvider.writeTo(StreamingBaseHtmlProvider.java:212) at org.fcrepo.http.api.responses.StreamingBaseHtmlProvider.writeTo(StreamingBaseHtmlProvider.java:85) at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:265) at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:250) at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162) at org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:106) at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162) at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:85) at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162) at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1154) at org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:621) at org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:377) at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:367) at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:274) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) at org.glassfish.jersey.internal.Errors.process(Errors.java:315) at org.glassfish.jersey.internal.Errors.process(Errors.java:297) at org.glassfish.jersey.internal.Errors.process(Errors.java:267) at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297) at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254) at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1030) at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:373) at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:381) at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:344) at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:522) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:370) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494) at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.UnsupportedOperationException: http://id.loc.gov/authorities/names/n00020514 is not a literal node at com.hp.hpl.jena.graph.Node.getLiteral(Node.java:227) at org.fcrepo.http.commons.responses.ViewHelpers.getObjectTitle(ViewHelpers.java:215) at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173) ... 58 more

--
You received this message because you are subscribed to the Google Groups "Fedora Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fedora-communi...@googlegroups.com<mailto:fedora-community%2Bunsu...@googlegroups.com>.

Andrew Woods

unread,
Nov 6, 2015, 10:31:58 AM11/6/15
to Anderson, Steven, fedora-c...@googlegroups.com
Hello Steven,
Thank you for the example. It appears to be working as expected in the fcrepo4 master branch [1] with recent updates... although you will have the definitive word on that.
Regards,
Andrew
Reply all
Reply to author
Forward
0 new messages