Thanks Andrea  and a follow up question to mvn experts

My tomcat8 says in its release notes
    * servlet-api.jar (Servlet 3.1 API)
so I changed the main pom to say
<dependency>
   <groupId>javax.servlet</groupId>
   <artifactId>servlet-api</artifactId>
   <version>3.1.0</version>
</dependency>

then a couple rounds of unsuccessful mvn package attempts

Finally  I removed  ~/.m2/repository/javax  and tried again
> mvn clean
> mvn -U package

this triggers downloading of all sorts of a javax packages. As you can see in 
the list below there is a
javax/servlet/servlet-api/3.1.0/servlet-api-3.1.0.jar and pom

despite this I get the error

[ERROR] Failed to execute goal on project dspace-services: Could not resolve 
dependencies for project org.dspace:dspace-services:jar:6.0-SNAPSHOT: Could not 
find artifact javax.servlet:servlet-api:jar:3.1.0 in sonatype-releases 
(https://oss.sonatype.org/content/repositories/releases/)

I am at a loss - since the jar/pom was downloaded - why is maven / am I 
confused  ?

Any suggestions ?

Monika


contents of .m2/repository/javax/:
/Users/monikam/.m2/repository/javax/activation/activation/1.1/_remote.repositories
/Users/monikam/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar
/Users/monikam/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar.lastUpdated
/Users/monikam/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar.sha1
/Users/monikam/.m2/repository/javax/activation/activation/1.1/activation-1.1.pom
/Users/monikam/.m2/repository/javax/activation/activation/1.1/activation-1.1.pom.lastUpdated
/Users/monikam/.m2/repository/javax/activation/activation/1.1/activation-1.1.pom.sha1
/Users/monikam/.m2/repository/javax/mail/mail/1.4/_remote.repositories
/Users/monikam/.m2/repository/javax/mail/mail/1.4/mail-1.4.jar
/Users/monikam/.m2/repository/javax/mail/mail/1.4/mail-1.4.jar.lastUpdated
/Users/monikam/.m2/repository/javax/mail/mail/1.4/mail-1.4.jar.sha1
/Users/monikam/.m2/repository/javax/mail/mail/1.4/mail-1.4.pom
/Users/monikam/.m2/repository/javax/mail/mail/1.4/mail-1.4.pom.lastUpdated
/Users/monikam/.m2/repository/javax/mail/mail/1.4/mail-1.4.pom.sha1
/Users/monikam/.m2/repository/javax/servlet/servlet-api/3.1.0/servlet-api-3.1.0.jar.lastUpdated
/Users/monikam/.m2/repository/javax/servlet/servlet-api/3.1.0/servlet-api-3.1.0.pom.lastUpdated



________________
Monika Mevenkamp
phone: 609-258-4161
Lewis Library,Washington Road and Ivy Lane, Princeton University, Princeton, NJ 
08544


On Mar 3, 2015, at 7:16 PM, Andrea Schweer 
<schw...@waikato.ac.nz<mailto:schw...@waikato.ac.nz>> wrote:

Hi Monika,

On 04/03/15 12:42, Monika C. Mevenkamp wrote:
I am trying to run upstream/master with code changes of mine inside dspace-api

I created a new database
did mvn package  and ran fresh_install
when going to home page I get the following error

http://localhost:8080/jspui/internal-error
-- Method: GET
-- Parameters were:

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: [94] in the generated java file: 
[/usr/local/Cellar/tomcat/8.0.17/libexec/work/Catalina/localhost/jspui/org/apache/jsp/index_jsp.java]
The method getDispatcherType() is undefined for the type HttpServletRequest

My first suspect would be the version of servlet-api that comes with your 
tomcat install. A quick web search for "The method getDispatcherType() is 
undefined for the type HttpServletRequest" leads to this: 
http://stackoverflow.com/questions/26436463/getdispatchertype-is-undefined-for-the-type-httpservletrequest

>From this line in the top-level pom, it looks to me like DSpace expects 
>version 2.5 of servlet-api to be provided by your web application container:
https://github.com/DSpace/DSpace/blob/master/pom.xml#L1030

I don't know whether you can just swap out the servlet-api jar that comes with 
tomcat. One of the answers to the stackoverflow question suggests going the 
other direction, ie changing the version number in the DSpace pom file to what 
is provided by your web application container (3.1, it looks like?). I suspect 
in that case you'll get compile-time errors about the same thing.

The DSpace docs say we support Tomcat 7 or newer; if this problem persists for 
Tomcat 8 then this might be worth a Jira issue.

cheers,
Andrea


--
Dr Andrea Schweer
IRR Technical Specialist, ITS Information Systems
The University of Waikato, Hamilton, New Zealand

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to