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.
Related
Getting below runtime error in postman after upgraded to 5.0.19.RELEASE version of spring and bouncycastle to jdk15 version 1.68.
Please advice.
JBWEB000065: HTTP Status 500 -
java.lang.NoSuchMethodError: org.springframework.cglib.core.ReflectUtils.defineClass(Ljava/lang/String;[BLjava/lang/ClassLoader;Ljava/security/ProtectionDomain;Ljava/lang/Class;)Ljava/lang/Class;
JBWEB000309: type JBWEB000066: Exception report
JBWEB000068: message java.lang.NoSuchMethodError: org.springframework.cglib.core.ReflectUtils.defineClass(Ljava/lang/String;[BLjava/lang/ClassLoader;Ljava/security/ProtectionDomain;Ljava/lang/Class;)Ljava/lang/Class;
JBWEB000069: description JBWEB000145: The server encountered an internal error that prevented it from fulfilling this request.
JBWEB000070: exception
org.jboss.resteasy.spi.UnhandledException: java.lang.NoSuchMethodError: org.springframework.cglib.core.ReflectUtils.defineClass(Ljava/lang/String;[BLjava/lang/ClassLoader;Ljava/security/ProtectionDomain;Ljava/lang/Class;)Ljava/lang/Class;
org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:369)
org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:237)
org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:213)
org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:598)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:565)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:130)
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
JBWEB000071: root cause java.lang.NoSuchMethodError: org.springframework.cglib.core.ReflectUtils.defineClass(Ljava/lang/String;
[BLjava/lang/ClassLoader;Ljava/security/ProtectionDomain;Ljava/lang/Class;)Ljava/lang/Class;
org.springframework.data.mapping.model.ClassGeneratingPropertyAccessorFactory$PropertyAccessorClassGenerator.generateCustomAccessorClass(ClassGeneratingPropertyAccessorFactory.java:336)
org.springframework.data.mapping.model.ClassGeneratingPropertyAccessorFactory.createAccessorClass(ClassGeneratingPropertyAccessorFactory.java:198)
org.springframework.data.mapping.model.ClassGeneratingPropertyAccessorFactory.potentiallyCreateAndRegisterPersistentPropertyAccessorClass(ClassGeneratingPropertyAccessorFactory.java:184)
org.springframework.data.mapping.model.ClassGeneratingPropertyAccessorFactory.getPropertyAccessor(ClassGeneratingPropertyAccessorFactory.java:92)
org.springframework.data.mapping.model.BasicPersistentEntity.getPropertyAccessor(BasicPersistentEntity.java:453)
org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.getPropertyAccessor(MappingCouchbaseConverter.java:820)
org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:238)
org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:214)
org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:172)
org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:78)
org.springframework.data.couchbase.core.CouchbaseTemplate.mapToEntity(CouchbaseTemplate.java:713)
org.springframework.data.couchbase.core.CouchbaseTemplate.findById(CouchbaseTemplate.java:323)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:168)
org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216)
org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:583)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:565)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:130)
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
Whenever I type in the hostIP/program name I receive this, but it is suppose to open up a program I am testing out. Any help would be greatly appreciated.
HTTP Status 500 - An exception occurred processing JSP page /index.jsp at line 81
type Exception report
message An exception occurred processing JSP page /index.jsp at line 81
description The server encountered an internal error that prevented it from fulfilling this request.
exception
java.io.IOException: An exception occurred processing JSP page /index.jsp at line 81
78: Timer timer = new Timer();
79: timer.startTimer();
80:
81: DatabaseManager dbFunc = DatabaseManager.getInstance();
82:
83: pageContext.setAttribute("dbFunc", dbFunc);
84: %>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:466)
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)
root cause
java.io.FileNotFoundException: C:\Program Files\Apache Software Foundation\Tomcat 8.0\..\webapps\ROOT\_cipss\config.ini (The system cannot find the path specified)
java.io.FileInputStream.open(Native Method)
java.io.FileInputStream.<init>(Unknown Source)
java.io.FileInputStream.<init>(Unknown Source)
sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
java.net.URL.openStream(Unknown Source)
org.ini4j.spi.IniSource.<init>(IniSource.java:55)
org.ini4j.spi.AbstractParser.newIniSource(AbstractParser.java:68)
org.ini4j.spi.IniParser.parse(IniParser.java:67)
org.ini4j.Ini.load(Ini.java:119)
org.ini4j.Ini.load(Ini.java:114)
org.ini4j.Ini.load(Ini.java:99)
org.ini4j.Ini.<init>(Ini.java:69)
org.kratos.cipss.DatabaseManager.loadConfigFileSettings(DatabaseManager.java:138)
org.kratos.cipss.DatabaseManager.getInstance(DatabaseManager.java:100)
org.apache.jsp.index_jsp._jspService(index_jsp.java:215)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:438)
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)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.30 logs.
Apache Tomcat/8.0.30
Your DatabaseManager gonna load some config file from this location:
C:\Program Files\Apache Software Foundation\Tomcat 8.0\..\webapps\ROOT\_cipss\config.ini
Which apparently does not exist. Add this file!
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.
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
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