/rest issue using master branch

34 views
Skip to first unread message

Terry Brady

unread,
Feb 1, 2016, 6:32:23 PM2/1/16
to DSpace Technical Support
I would like to do some testing with the Enhanced Configurations code.

I deployed the latest code on the master branch to my test server and I am seeing the following error when I tried to access /rest.  I can access /xmlui, /solr, and /oai.

I believe that I have created a proper local.cfg,  

Can you offer any advice?

Feb 01, 2016 6:27:38 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [DSpace REST API] in context with path [/rest] threw exception [Servlet execution threw an exception] with root cause
java.lang.AbstractMethodError: javax.ws.rs.core.UriBuilder.uri(Ljava/lang/String;)Ljavax/ws/rs/core/UriBuilder;
        at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:119)
        at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:649)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:610)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:190)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)




--
Terry Brady
Applications Programmer Analyst
Georgetown University Library Information Technology
425-298-5498 (Seattle, WA)

Bram Luyten

unread,
Feb 2, 2016, 8:54:05 AM2/2/16
to Terry Brady, DSpace Technical Support
Hi Terry,

not sure what it is, but the following stackoverflow thread seems to indicate this means that you're trying to load Jersey 1 and 2 at the same time:

The error only matches on 

java.lang.AbstractMethodError: javax.ws.rs.core.UriBuilder.uri(Ljava/lang/String;)Ljavax/ws/rs/core/UriBuilder;
        at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:119)

So I'm not 100% confident the issues are related.

Bram

-- 
logo 
Bram Luyten 
250 Lucius Gordon Drive, Suite B-3A, West Henrietta, NY 14586
Esperantolaan 4, Heverlee 3001, Belgium
www.atmire.com 

--
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Tim Donohue

unread,
Feb 2, 2016, 10:25:34 AM2/2/16
to dspac...@googlegroups.com
Hi Terry,

The error stack you posted doesn't look directly related to the Enhanced Configuration Scheme stuff (which Bram also noted).  It seems like either something else is going on, or perhaps there is a secondary error somewhere?

The most significant REST-specific thing that changed in the Enhanced Configuration Scheme is the naming of some of the settings in the 'rest.cfg' file. So, you should also check that all your configs in that file are now *prefixed* with "rest.*"  Here's what it should look like: https://github.com/DSpace/DSpace/blob/master/dspace/config/modules/rest.cfg

FWIW, I just tried the REST app myself, and I'm seeing the same error on "master". I'm not sure of the cause, but I'm also not certain that the Enhanced Configuration Scheme is to blame, as this reported error doesn't seem like it'd have to do with any configuration files?  I'm still digging around, but I'm not sure what the root cause is.

- Tim
--
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

-- 
Tim Donohue
Technical Lead for DSpace & DSpaceDirect
DuraSpace.org | DSpace.org | DSpaceDirect.org

Tim Donohue

unread,
Feb 2, 2016, 10:39:36 AM2/2/16
to dspac...@googlegroups.com
Digging more deeply, it looks like we do have BOTH Jersey 1 and Jersey 2 now in our POMs.

https://github.com/DSpace/DSpace/search?l=maven-pom&q=jersey&utf8=%E2%9C%93

1) Jersey-Server v1 is used by REST
2) A reference to Jersey-Client v2 came into the 'dspace-api' via DS-2880 (PubMed integration), which was merged in the last week or so:
https://jira.duraspace.org/browse/DS-2880
Here's the commit: https://github.com/DSpace/DSpace/commit/002b8783bffd15024f9827d5166f1e0cb52a95ce

So, I think Bram's guess may be correct. We may have a Jersey version conflict on "master".

- Tim

Peter Dietz

unread,
Feb 2, 2016, 11:26:54 AM2/2/16
to Tim Donohue, DSpace Technical Support
We have a PR to update master/6x REST API to Jersey 2. Honestly I thought we were going to merge that in months ago.

I've just verified that REST is broken since the PubMed jersey2 reference got added to API. (Mismatch of jersey1 and jersey2 in different places).  I'll test updating REST API to JERSEY 2, and see what the results of that are.

________________
Peter Dietz
Longsight
www.longsight.com
pe...@longsight.com
p: 740-599-5005 x809

Peter Dietz

unread,
Feb 2, 2016, 1:03:08 PM2/2/16
to Tim Donohue, DSpace Technical Support
Doing some testing, the Jersey 2 update to REST fixes rest on master, so I have merged that PR. https://github.com/DSpace/DSpace/pull/1102

Onwards and upwards!

________________
Peter Dietz
Longsight
www.longsight.com
pe...@longsight.com
p: 740-599-5005 x809

Terry Brady

unread,
Feb 2, 2016, 4:13:57 PM2/2/16
to Peter Dietz, Tim Donohue, DSpace Technical Support
One additional small fix is needed.  https://github.com/DSpace/DSpace/pull/1263
Reply all
Reply to author
Forward
0 new messages