Starting a simple Jersey webapp - rest

I want to start up a simple Jersey webapp. This is the error I get from Tomcat upon trying to access the resourcess.
type Exception report
message Servlet.init() for servlet Jersey REST Service threw exception
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet.init() for servlet Jersey REST
Service threw exception
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Unknown Source)
root cause
java.lang.NullPointerException
com.sun.xml.bind.v2.model.impl.PropertyInfoImpl.calcXmlName(PropertyInfoImpl.java:287)
com.sun.xml.bind.v2.model.impl.PropertyInfoImpl.calcXmlName(PropertyInfoImpl.java:262)
com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl.getTypes(ElementPropertyInfoImpl.java:96)
com.sun.xml.bind.v2.model.impl.RuntimeElementPropertyInfoImpl.getTypes(RuntimeElementPropertyInfoImpl.java:50)
com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.size(ElementPropertyInfoImpl.java:42)
java.util.AbstractList$Itr.hasNext(Unknown Source)
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:139)
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:49)
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:41)
com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
com.sun.xml.bind.v2.model.impl.RegistryInfoImpl.(RegistryInfoImpl.java:63)
com.sun.xml.bind.v2.model.impl.ModelBuilder.addRegistry(ModelBuilder.java:232)
com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:201)
com.sun.xml.bind.v2.runtime.JAXBContextImpl$3.run(JAXBContextImpl.java:352)
com.sun.xml.bind.v2.runtime.JAXBContextImpl$3.run(JAXBContextImpl.java:350)
java.security.AccessController.doPrivileged(Native Method)
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:349)
com.sun.xml.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java:215)
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:76)
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:55)
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:124)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
javax.xml.bind.ContextFinder.newInstance(Unknown Source)
javax.xml.bind.ContextFinder.find(Unknown Source)
javax.xml.bind.JAXBContext.newInstance(Unknown Source)
javax.xml.bind.JAXBContext.newInstance(Unknown Source)
com.sun.jersey.server.impl.wadl.WadlApplicationContextImpl.(WadlApplicationContextImpl.java:95)
com.sun.jersey.server.impl.wadl.WadlFactory.init(WadlFactory.java:96)
com.sun.jersey.server.impl.application.RootResourceUriRules.initWadl(RootResourceUriRules.java:169)
com.sun.jersey.server.impl.application.RootResourceUriRules.(RootResourceUriRules.java:106)
com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1300)
com.sun.jersey.server.impl.application.WebApplicationImpl.access$700(WebApplicationImpl.java:163)
com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:769)
com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:765)
com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:765)
com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:760)
com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:489)
com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:319)
com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:609)
com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210)
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:374)
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:557)
javax.servlet.GenericServlet.init(GenericServlet.java:212)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Unknown Source)

Related

Gwt Material Design: MaterialSlider not working in classic dev mode

Here is the exception that gets displayed on the Browser.
java.lang.reflect.InvocationTargetException at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at
java.lang.reflect.Method.invoke(Unknown Source) at
com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:423) at
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:530)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:368)
at java.lang.Thread.run(Unknown Source) Caused by:
com.google.gwt.core.client.JavaScriptException: (null)
#gwt.material.design.jquery.client.api.JQuery::$(Lcom/google/gwt/dom/client/Element;)([JavaScript
object(8)]): null at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:252)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:121)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:573)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:293)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at gwt.material.design.jquery.client.api.JQuery.$(JQuery.java) at
gwt.material.design.jquery.client.api.JQuery.$(JQuery.java:167) at
gwt.material.design.client.base.MaterialWidget.$this(MaterialWidget.java:157)
at
com.mdesign.vadiraj.client.MaterialDesignWithCarousel.onModuleLoad(MaterialDesignWithCarousel.java:32)
... 9 more
Here is the exception from Eclipse console.
14:34:14.799 [ERROR] [materialdesignwithcarousel] Unable to load
module entry point class
com.mdesign.vadiraj.client.MaterialDesignWithCarousel (see associated
exception for details)
com.google.gwt.core.client.JavaScriptException: (null)
#gwt.material.design.jquery.client.api.JQuery::$(Lcom/google/gwt/dom/client/Element;)([JavaScript
object(8)]): null
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:252)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:121)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:573)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:293)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at gwt.material.design.jquery.client.api.JQuery.$(JQuery.java)
at gwt.material.design.jquery.client.api.JQuery.$(JQuery.java:167)
at gwt.material.design.client.base.MaterialWidget.$this(MaterialWidget.java:157)
at com.mdesign.vadiraj.client.MaterialDesignWithCarousel.onModuleLoad(MaterialDesignWithCarousel.java:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:423)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:530)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:368)
at java.lang.Thread.run(Unknown Source)
This is my project setup - Java 1.8 | GWT 2.8.1 | Classic dev-mode
inherits name="gwt.material.design.jquery.JQuery"
inherits name='gwt.material.design.GwtMaterialWithJQuery'
inherits name="gwt.material.design.GwtMaterialDesignBasic"
Attaching the code snippet from the Entrypoint class
public void onModuleLoad() {
MaterialSlider slider = new MaterialSlider();
RootPanel.get().add(slider);
slider.add(new Label("safrfsdhhdf"));
slider.add(new Button("I am a button"));
slider.add(new TextArea());
slider.add(new MaterialSwitch(true));
}
GWT Material Design uses JsInterop which doesn't work in legacy dev mode (nobody should continue to use legacy dev mode these days anyway, it's been deprecated for years)

Getting java.lang.UnsatisfiedLinkError with install4j 6.1.4 and JRE 1.8.0_121

We upgraded to latest JRE/install4j for our minor upgrade installer, and we started getting the following error when we try to use install4j API:
2017-02-17 19:29:42 SEVERE: #{14} [StandardContext.loadOnStartup] Servlet [ConfigServlet] in web application [] threw load() exception
java.lang.UnsatisfiedLinkError: com.install4j.runtime.installer.platform.win32.Common.setWindows95(Z)V
at com.install4j.runtime.installer.platform.win32.Common.setWindows95(Native Method)
at com.install4j.runtime.installer.platform.win32.Common.init(Unknown Source)
at com.install4j.runtime.installer.platform.win32.Misc.<clinit>(Unknown Source)
at com.install4j.api.windows.WinEnvVars.getenv(Unknown Source)
at com.install4j.runtime.installer.helper.InstallerUtil.is64BitWindows(Unknown Source)
at com.install4j.api.Util.is64BitWindows(Unknown Source)
...
We get the same error when we try to launch the uninstaller:
Exception:
java.lang.UnsatisfiedLinkError: com.install4j.runtime.installer.platform.win32.Common.setWindows95(Z)V
at com.install4j.runtime.installer.platform.win32.Common.setWindows95(Native Method)
at com.install4j.runtime.installer.platform.win32.Common.init(Unknown Source)
at com.install4j.runtime.installer.platform.win32.Win32UserInfo.<clinit>(Unknown Source)
at com.install4j.runtime.installer.platform.UserInfo.isAdminGroup(Unknown Source)
at com.install4j.api.Util.isAdminGroup(Unknown Source)
at com.install4j.runtime.installer.InstallerVariables.initAdminRights(Unknown Source)
at com.install4j.runtime.installer.InstallerVariables.initCommandLine(Unknown Source)
at com.install4j.runtime.installer.Uninstaller.getScreenExecutor(Unknown Source)
at com.install4j.runtime.installer.Uninstaller.runInProcess(Unknown Source)
at com.install4j.runtime.installer.Uninstaller.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.exe4j.runtime.WinLauncher.main(Unknown Source)
at com.install4j.runtime.launcher.WinLauncher.main(Unknown Source)
What is causing this?
There is a mismatch between the API JAR file (i4jruntime.jar) and the native library (i4jinst.dll). It seems that you have an old version of i4jruntime.jar in your classpath.

JavaFX Eclipse Exception

I'm trying to figure out this error that starts after I refactor name of the project.(I tried reinstall Eclipse, create new workspace etc.)
My code was working well before that. If code is needed I can edit it later. Thanks for all advices.
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(Unknown Source)
at com.sun.javafx.application.LauncherImpl.launchApplication(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Invalid URL: Invalid URL or resource not found
at javafx.scene.image.Image.validateUrl(Unknown Source)
at javafx.scene.image.Image.<init>(Unknown Source)
at time.Run.start(Run.java:34)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(Unknown Source)
... 1 more
Caused by: java.lang.IllegalArgumentException: Invalid URL or resource not found
... 12 more
Exception running application time.Run

Exception : Method org.postgresql.jdbc4.Jdbc4Connection.isValid(int) is not yet implemented

Though this question has asked, the answer could not solve my problem.
I used commons-dbcp2-2.1.1.jarandpostgres jdbc driver. I checked postgresql-8.4-702.jdbc4.jar, postgresql-9.1-901.jdbc4.jar, postgresql-9.2-1004.jdbc4.jar, postgresql-9.3-1103.jdbc4.jar, postgresql-9.3-1103.jdbc41.jar, postgresql-9.4-1202.jdbc4.jar and postgresql-9.4-1202.jdbc41.jar one after another. But none of the implement the isValid function and always throw exception.
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Cannot create PoolableConnectionFactory (Method org.postgresql.jdbc4.Jdbc4Connection.isValid(int) is not yet implemented.)] with root cause
org.postgresql.util.PSQLException: Method org.postgresql.jdbc4.Jdbc4Connection.isValid(int) is not yet implemented.
at org.postgresql.Driver.notImplemented(Driver.java:753)
at org.postgresql.jdbc4.AbstractJdbc4Connection.isValid(AbstractJdbc4Connection.java:102)
at org.postgresql.jdbc4.Jdbc4Connection.isValid(Jdbc4Connection.java:21)
at org.apache.commons.dbcp2.DelegatingConnection.isValid(DelegatingConnection.java:918)
at org.apache.commons.dbcp2.PoolableConnection.validate(PoolableConnection.java:283)
at org.apache.commons.dbcp2.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:357)
at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2307)
at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2290)
at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2039)
at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1533)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
at org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:82)
at org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:68)
at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:315)
at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:75)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:61)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:303)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:154)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:102)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:82)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:120)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:113)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:386)
at com.sun.proxy.$Proxy9.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:205)
at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:122)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:64)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53)
at com.sun.proxy.$Proxy20.getAllParty(Unknown Source)
at com.votersvoicemyanmar.resource.ArticleController.getAllArticles(ArticleController.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:777)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:706)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Any solution?
There is more than one copy of the JDBC driver on the CLASSPATH.
Check the output of org.postgresql.Driver.getVersion ()

i can startup tomcat in explorer but can't in eclipse

os: win7 64bit ; Eclipse Java EE 4.2 ; Tomcat 7.0.39
The exception stack:
SEVERE: Error reading request, ignored
java.lang.ClassFormatError: Unknown constant tag 0 in class file sun/nio/cs/IBM775
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at sun.nio.cs.FastCharsetProvider.lookup(Unknown Source)
at sun.nio.cs.FastCharsetProvider.access$100(Unknown Source)
at sun.nio.cs.FastCharsetProvider$1.next(Unknown Source)
at sun.nio.cs.FastCharsetProvider$1.next(Unknown Source)
at java.nio.charset.Charset.put(Unknown Source)
at java.nio.charset.Charset.access$300(Unknown Source)
at java.nio.charset.Charset$4.run(Unknown Source)
at java.nio.charset.Charset$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.nio.charset.Charset.availableCharsets(Unknown Source)
at org.apache.tomcat.util.buf.B2CConverter.<clinit>(B2CConverter.java:51)
at org.apache.tomcat.util.buf.ByteChunk.<clinit>(ByteChunk.java:102)
at org.apache.tomcat.util.buf.MessageBytes.<init>(MessageBytes.java:58)
at org.apache.tomcat.util.buf.MessageBytes.<init>(MessageBytes.java:36)
at org.apache.tomcat.util.buf.MessageBytes$MessageBytesFactory.newInstance(MessageBytes.java:685)
at org.apache.tomcat.util.buf.MessageBytes.newInstance(MessageBytes.java:78)
at org.apache.coyote.Request.<init>(Request.java:83)
at org.apache.coyote.AbstractProcessor.<init>(AbstractProcessor.java:53)
at org.apache.coyote.http11.AbstractHttp11Processor.<init>(AbstractHttp11Processor.java:265)
at org.apache.coyote.http11.Http11Processor.<init>(Http11Processor.java:55)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.createProcessor(Http11Protocol.java:165)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.createProcessor(Http11Protocol.java:103)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:569)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "http-bio-8080-exec-1" java.lang.NullPointerException
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.release(Http11Protocol.java:140)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:654)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Try starting up Tomcat manually then run your program in eclipse. This worked for me.