Java Stripes Error - java

So I am following the quick start guide on the Stripes website here:
http://www.stripesframework.org/display/stripes/Quick+Start+Guide
I have followed each step but when I try to view it I get the error message:
HTTP Status 500 - java.lang.ClassNotFoundException: org.apache.jsp.Test.WebContent.index_jsp
type Exception report
message java.lang.ClassNotFoundException: org.apache.jsp.Test.WebContent.index_jsp
description The server encountered an internal error (java.lang.ClassNotFoundException: org.apache.jsp.Test.WebContent.index_jsp) that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp.Test.WebContent.index_jsp
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:177)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
java.lang.ClassNotFoundException: org.apache.jsp.Test.WebContent.index_jsp
java.net.URLClassLoader$1.run(Unknown Source)
java.net.URLClassLoader$1.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(Unknown Source)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:132)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:172)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.29 logs.
I don't really understand what is going wrong.
Any help would be appreciated.

the problem is that you are not building it right, make sure all dependencies are in the build path and if you exporting it, make sure they are also in the export and deploy path

Related

Run Gate pipeline in eclipse I get this error Java.lang.ClassNotFoundException: gate.resource

I want to create Web service in eclipse + Tomcate v7 and use pipeline I created in Gate in Ubuntu 12.04 32 bit
but I get this error:
can you help me for solving this error??
INFO: Exception:
java.lang.NoClassDefFoundError: gate/Resource
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:274)
at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:177)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:142)
at org.apache.axis.utils.cache.ClassCache.lookup(ClassCache.java:85)
at org.apache.axis.providers.java.JavaProvider.getServiceClass(JavaProvider.java:428)
at org.apache.axis.providers.java.JavaProvider.initServiceDesc(JavaProvider.java:461)
at org.apache.axis.handlers.soap.SOAPService.getInitializedServiceDesc(SOAPService.java:286)
at org.apache.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDService.java:500)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getService(WSDDDeployment.java:427)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at
Caused by: java.lang.ClassNotFoundException: gate.Resource
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
... 53 more
Add all jar files in following folders in your build path:
.../GATE_Developer_7.1/bin/
.../GATE_Developer_7.1/lib/
Maybe my answer is a bit late, but I had the same error and found that it's due to the use of '~' for $HOME.
Changing ~/Gate/bin/gate.jar with /home/user/Gate/bin/gate.jar solved the problem for me.

Vaadin QuickTickets Dashboard deploy error

i tried to compile and run the vaadin demo application but i get the following error. Did i miss something?
i downloaded the code from github https://github.com/vaadin/dashboard-demo tried with
mvn install
then deployed to Tomcatserver 7.0.47 but i keep getting the following
error.
HTTP Status 500 - com.vaadin.server.ServiceException: java.lang.ArrayIndexOutOfBoundsException: -1
type Exception report
message com.vaadin.server.ServiceException:
java.lang.ArrayIndexOutOfBoundsException: -1
description The server encountered an internal error that prevented it
from fulfilling this request.
exception
javax.servlet.ServletException: com.vaadin.server.ServiceException:
java.lang.ArrayIndexOutOfBoundsException: -1
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:240)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
root cause
com.vaadin.server.ServiceException:
java.lang.ArrayIndexOutOfBoundsException: -1
com.vaadin.server.VaadinService.handleExceptionDuringRequest(VaadinService.java:1440)
com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1394)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:238)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
root cause
java.lang.ArrayIndexOutOfBoundsException: -1
java.util.ArrayList.elementData(ArrayList.java:400)
java.util.ArrayList.get(ArrayList.java:413)
com.vaadin.demo.dashboard.data.DataProvider.createTransaction(DataProvider.java:406)
com.vaadin.demo.dashboard.data.DataProvider.generateTransactionsData(DataProvider.java:345)
com.vaadin.demo.dashboard.data.DataProvider.(DataProvider.java:53)
com.vaadin.demo.dashboard.DashboardUI.(DashboardUI.java:62)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.lang.reflect.Constructor.newInstance(Constructor.java:526)
java.lang.Class.newInstance(Class.java:374)
com.vaadin.server.UIProvider.createInstance(UIProvider.java:36)
com.vaadin.server.communication.UIInitHandler.getBrowserDetailsUI(UIInitHandler.java:200)
com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:73)
com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:37)
com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1382)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:238)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
note The full stack trace of the root cause is available in the Apache
Tomcat/7.0.47 logs.
Apache Tomcat/7.0.47
and the other error
HTTP Status 500 - com.vaadin.server.ServiceException: java.lang.ArrayIndexOutOfBoundsException: -1
type Exception report
message com.vaadin.server.ServiceException: java.lang.ArrayIndexOutOfBoundsException: -1
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: com.vaadin.server.ServiceException: java.lang.ArrayIndexOutOfBoundsException: -1
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:240)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
root cause
com.vaadin.server.ServiceException: java.lang.ArrayIndexOutOfBoundsException: -1
com.vaadin.server.VaadinService.handleExceptionDuringRequest(VaadinService.java:1440)
com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1394)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:238)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
root cause
java.lang.ArrayIndexOutOfBoundsException: -1
java.util.ArrayList.elementData(ArrayList.java:400)
java.util.ArrayList.get(ArrayList.java:413)
com.vaadin.demo.dashboard.data.DataProvider.createTransaction(DataProvider.java:406)
com.vaadin.demo.dashboard.data.DataProvider.generateTransactionsData(DataProvider.java:345)
com.vaadin.demo.dashboard.data.DataProvider.<init>(DataProvider.java:53)
com.vaadin.demo.dashboard.DashboardUI.<init>(DashboardUI.java:62)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.lang.reflect.Constructor.newInstance(Constructor.java:526)
java.lang.Class.newInstance(Class.java:374)
com.vaadin.server.UIProvider.createInstance(UIProvider.java:36)
com.vaadin.server.communication.UIInitHandler.getBrowserDetailsUI(UIInitHandler.java:200)
com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:73)
com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:37)
com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1382)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:238)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.47 logs.
Apache Tomcat/7.0.47
i also tried it with eclipse it is also return the same error.
It is common exception when you try run this demo. You must fix apiKey in DataProvider.class. In Dashboard example use http://developer.rottentomatoes.com API for getting list of films. Simplest way - create account in that site. It is simple and free.

javax.servlet.ServletException: Servlet execution threw an exception:org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)

Hi i am getting this error while running JAX-RS WebService. i am creating JAX-Rs Web Service using Jersey. by following this link of http://www.vogella.com/articles/REST/article.html
Exception
javax.servlet.ServletException: Servlet execution threw an exception
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
Root cause
java.lang.IncompatibleClassChangeError: Class javax.ws.rs.core.Response$Status does not implement the requested interface javax.ws.rs.core.Response$StatusType
com.sun.jersey.spi.container.ContainerResponse.getStatus(ContainerResponse.java:599)
com.sun.jersey.spi.container.ContainerResponse$CommittingOutputStream.commitWrite(ContainerResponse.java:157)
com.sun.jersey.spi.container.ContainerResponse$CommittingOutputStream.write(ContainerResponse.java:134)
sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)
sun.nio.cs.StreamEncoder.implFlushBuffer(Unknown Source)
sun.nio.cs.StreamEncoder.implFlush(Unknown Source)
sun.nio.cs.StreamEncoder.flush(Unknown Source)
java.io.OutputStreamWriter.flush(Unknown Source)
java.io.BufferedWriter.flush(Unknown Source)
com.sun.jersey.core.util.ReaderWriter.writeToAsString(ReaderWriter.java:191)
com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider.writeToAsString(AbstractMessageReaderWriterProvider.java:128)
com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringProvider.java:88)
com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringProvider.java:58)
com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:302)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1510)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:540)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:715)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
Note: The full stack trace of the root cause is available in the Apache Tomcat/7.0.47 logs.
Can anybody please help.
The error caused was that , i need to use same version jar for the jersey client , JAX-RS-WS. This removed my error . now i am running application successfully.

org.hibernate.HibernateException error

I'm getting this error continuously...Eclips IDE with appach tomcat
root cause
java.lang.ClassNotFoundException: org.hibernate.HibernateException
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
java.lang.ClassLoader.loadClassInternal(Unknown Source)
com.rmi.servlet.ProvinceServlet.doPost(ProvinceServlet.java:59)
javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
You need to add Hibernate dependency to your project.
Basically, you need to add one of these jars:
http://www.jarfinder.com/index.php/java/info/org.hibernate.HibernateException
Here is how to do it from Eclipse:
http://www.wikihow.com/Add-JARs-to-Project-Build-Paths-in-Eclipse-(Java)

Exception while using java youtube api

I am using java youtube api , I have this exception when i am just trying to do the first line of the connection
YouTubeService service = new YouTubeService("");
I am getting this
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.NoClassDefFoundError: com/google/gdata/client/media/MediaService
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
java.lang.ClassLoader.defineClass(ClassLoader.java:615)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2820)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1150)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
tst.Main.doGet(Main.java:197)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
tst.Main.service(Main.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
java.lang.ClassNotFoundException: com.google.gdata.client.media.MediaService
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
java.lang.ClassLoader.defineClass(ClassLoader.java:615)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2820)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1150)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
tst.Main.doGet(Main.java:197)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
tst.Main.service(Main.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.21 logs.
I put the gdata-youtube .... etc in WEB-INF/lib
also I tried to put the same in the java build path and its the same
so whats the problem ?
you are missing dependent libraries. Add the core and media libraries as well -
gdata-client-X.X.jar
gdata-youtube-X.X.jar
gdata-core-X.X.jar
gdata-media-X.X.jar

Categories

Resources