Fosstrak webadapter with Tomcat 8

74 views
Skip to first unread message

djbur...@gmail.com

unread,
Jun 2, 2015, 4:19:29 AM6/2/15
to foss...@googlegroups.com
Hi,

I'm running Windows 7 64-bit, with Tomcat 8.0.22 (64-bit Windows zip), MySQL Connector/J v5.1.35, and MySQL 5.6.17.

I've set up a Fosstrak repository (0.5.0), and, so far, everything is working in that I can upload events via the capture interface, and retrieve them via the query interface.

I'm now trying to add the webadapter, following the instructions in https://code.google.com/p/fosstrak/wiki/EpcisWebadapterGuide

I can get to the page http://localhost:8080/epcis-webadapter-0.1.0/rest/1/config/epcisurl and change the instance to http://localhost:8080/epcis-repository-0.5.0

However, when I try to go to http://localhost:8080/epcis-webadapter-0.1.0/ i get the following error:

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

An error occurred at line: [63] in the generated java file: [C:\temp\apache-tomcat-8.0.22\work\Catalina\localhost\epcis-webadapter-0.1.0\org\apache\jsp\index_jsp.java]
The method getDispatcherType() is undefined for the type HttpServletRequest

Stacktrace:
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:198)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:450)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:361)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:363)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)"

Has anyone else had experience of this?

From google ( http://stackoverflow.com/questions/26436463/getdispatchertype-is-undefined-for-the-type-httpservletrequest ), it seems that it's something to do with a conflicting servlet-api version? the recommendation is to change:

<dependency>
  <groupId>javax.servlet</groupId>
  <artifactId>servlet-api</artifactId>
  <version>2.5</version>
</dependency

to:

<dependency>
   <groupId>javax.servlet</groupId>
   <artifactId>javax.servlet-api</artifactId>
   <version>3.1.0</version>
</dependency>

However, where would I do this? there are a couple of possible candidate pom.xml files:

<apache-tomcat-8.0.22>\temp\0-epcis-repository-0.5.0\META-INF\maven\org.fosstrak.epcis\epcis-repository\pom.xml
<apache-tomcat-8.0.22>\webapps\epcis-repository-0.5.0\META-INF\maven\org.fosstrak.epcis\epcis-repository\pom.xml

Should I change either of them? both of them? none of them? apparently these files are something to do with something called maven... I'm not running anything fancy on here, just a plain jdk - is maven something that gets bundled with tomcat?

Alternatively, should I just go back to Tomcat 7.x?

Thanks for any pointers!
Dave

djbur...@gmail.com

unread,
Jun 2, 2015, 5:36:23 AM6/2/15
to foss...@googlegroups.com
As a follow-on, I've now tested under Tomcat 8.0.23 (the latest version) and it still doesn't work. However, going back to Tomcat 7.0.62, it *does* work...!

Regards,
Dave

marcantoine...@orange.com

unread,
Jun 2, 2015, 6:24:57 AM6/2/15
to foss...@googlegroups.com
Hi, 

I haven't tested it lately but my old memories remind me of simply removing the servlet-api jar from epcis Web-inf/lib directory and restarting tomcat. 

Best regards, 

Marc-Antoine 

---- djbur...@gmail.com a écrit ----

As a follow-on, I've now tested under Tomcat 8.0.23 (the latest version) and it still doesn't work. However, going back to Tomcat 7.0.62, it *does* work...!

Regards,
Dave

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

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.

djbur...@gmail.com

unread,
Jun 2, 2015, 6:47:50 AM6/2/15
to foss...@googlegroups.com
Thanks very much for that, Marc-Antoine! works perfectly under Tomcat 8.0.23 now:-)

Regards,
Dave

Reply all
Reply to author
Forward
0 new messages