Http error 500 with GWT web application - java

I've read tons of materials but I can't figure out what's happening. I'm doing a simple web application with Eclipse Oxygen, GWT 2.8, MapDB3, when I try to launch the web app through Run as --> GWT development mode with Jetty I obtain the error above. I'm going mad.
Problem accessing /asteonlineing/greet. Reason:
HTTP 500 Server Error
Caused by: java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
at org.mapdb.DBMaker.fileDB(DBMaker.kt)
at com.google.asteonlineing.server.AoLServiceImpl.<init>(AoLServiceImpl.java:26)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) [...a lot more]
I tried to add the kotlin's jar to my project's lib directory but the error slightly changes and it's alway http error 500 but about:
java.lang.NoClassDefFoundError: org/eclipse/collections/impl/list/mutable/primitive/LongArrayList
Finally I've figured out that MapDB 3.0.5 has a long list of dependencies.
I've installed all of them and that error disappeared but others are coming, but code related.

Finally I've figured out that MapDB 3.0.5 has a long list of dependencies, when I've installed all of them that error disappeared.
You can find them in
https://mvnrepository.com/artifact/org.mapdb/mapdb/3.0.5

Related

IllegalStateException: zip file closed

I have a Java desktop application that was running fine in Java 1.8; I'm upgrading to Java 1.11 for a client, and am getting the above error.
Full stacktrace:
java.lang.ExceptionInInitializerError
at net.sourceforge.tess4j.Tesseract.init(Tesseract.java:442)
at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:326)
at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:309)
at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:290)
at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:274)
at drivingrecordtool.file.DrivingRecordPDFTextReader.getOCRText(DrivingRecordPDFTextReader.java:152)
at drivingrecordtool.file.DrivingRecordPDFTextReader.getText(DrivingRecordPDFTextReader.java:46)
at drivingrecordtool.file.DrivingRecordFileReader.doInBackground(DrivingRecordFileReader.java:78)
at drivingrecordtool.file.DrivingRecordFileReader.doInBackground(DrivingRecordFileReader.java:1)
at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.IllegalStateException: zip file closed
at java.base/java.util.zip.ZipFile.ensureOpen(ZipFile.java:913)
at java.base/java.util.zip.ZipFile.getEntry(ZipFile.java:348)
at java.base/java.util.zip.ZipFile$1.getEntry(ZipFile.java:1130)
at java.base/java.util.jar.JarFile.getEntry0(JarFile.java:586)
at java.base/java.util.jar.JarFile.getEntry(JarFile.java:516)
at java.base/sun.net.www.protocol.jar.URLJarFile.getEntry(URLJarFile.java:131)
at java.base/java.util.jar.JarFile.getJarEntry(JarFile.java:478)
at java.base/jdk.internal.loader.URLClassPath$JarLoader.getResource(URLClassPath.java:945)
at java.base/jdk.internal.loader.URLClassPath.getResource(URLClassPath.java:315)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:455)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at net.sourceforge.tess4j.util.LoadLibs.getTessAPIInstance(LoadLibs.java:83)
at net.sourceforge.tess4j.TessAPI.<clinit>(TessAPI.java:42)
... 15 more
The Tesseract library has a Java wrapper that I've used for months successfully but now seems involved in the error, whatever it is. I've been using the same DLL and started getting this failure, and I've updated the Tesseraact DLL and the wrapper to their latest version.
More puzzling is that the application runs fine within eclipse, and only fails like this when run from a command line (Windows 10). I have uninstalled and reinstalled the DLL a couple of times, rebooted the machine each time, and am running out of things to try. I went through the entire Maven dependencies list and deleted all files found there from my repository, then refreshed the eclipse project to reload all the files in the list.
I saw one suggestion of placing a breakpoint in ZipFile, but that won't help since the problem does not appear in eclipse.
I'm willing to upgrade the Java further, but it would be nice, first, to have some knowledge of what the problem is so that I have some confidence that will fix it.
Can someone suggest what might be wrong, or strategies to find out?

getting IncompatibleClassChangeError while deploying EAR into WAS8.5 through Jenkins using GitHub

I have Jenkins of 1.611 version, JDK 1.7 and remote WAS8.5 is running on JDK 1.6 version. When I am trying to deploy EAR or WAR file by the help of Github (i.e., I am pushing the project from eclipse Luna which has java 7 configuration), Iam facing the following error:
Connecting to IBM WebSphere Application Server...
The following artifacts will be deployed in this order...
-------------------------------------------
SpringWSEAR.ear
-------------------------------------------
Error deploying to IBM WebSphere Application Server: org.jenkinsci.plugins.websphere.services.deployment.DeploymentServiceException:
at org.jenkinsci.plugins.websphere.services.deployment.WebSphereDeploymentService.getAppName(WebSphereDeploymentService.java:122)
at org.jenkinsci.plugins.websphere.services.deployment.WebSphereDeploymentService.getAppName(WebSphereDeploymentService.java:98)
at org.jenkinsci.plugins.websphere_deployer.WebSphereDeployerPlugin.getAppName(WebSphereDeployerPlugin.java:268)
at org.jenkinsci.plugins.websphere_deployer.WebSphereDeployerPlugin.createArtifact(WebSphereDeployerPlugin.java:226)
at org.jenkinsci.plugins.websphere_deployer.WebSphereDeployerPlugin.perform(WebSphereDeployerPlugin.java:168)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:764)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:724)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
at hudson.model.Run.execute(Run.java:1769)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:374)
Caused by: com.ibm.websphere.management.application.client.AppDeploymentException: [Root exception is java.lang.IncompatibleClassChangeError: Implementing class]
at com.ibm.websphere.management.application.AppManagementFactory.handleException(AppManagementFactory.java:672)
at com.ibm.websphere.management.application.AppManagementFactory.readArchive(AppManagementFactory.java:141)
at com.ibm.websphere.management.application.AppManagementFactory.readArchive(AppManagementFactory.java:91)
at com.ibm.websphere.management.application.client.AppDeploymentController.readArchive(AppDeploymentController.java:254)
at org.jenkinsci.plugins.websphere.services.deployment.WebSphereDeploymentService.getAppName(WebSphereDeploymentService.java:108)
... 13 more
Caused by: java.lang.IncompatibleClassChangeError: Implementing class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1139)
at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:799)
at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1310)
at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1366)
at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1139)
at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:799)
at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1310)
at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1366)
at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.WARFileImpl.getWARFileAnnotationsDetector(WARFileImpl.java:2908)
at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.WARFileImpl.containsEJBContent(WARFileImpl.java:1975)
at com.ibm.ws.management.application.client.AppInstallHelper.checkForXmiFiles(AppInstallHelper.java:1372)
at com.ibm.ws.management.application.client.AppInstallHelper.checkForXmiFiles(AppInstallHelper.java:1331)
at com.ibm.ws.management.application.client.AppInstallHelper.checkForEE5Restrictions(AppInstallHelper.java:512)
at com.ibm.ws.management.application.client.AppInstallHelper.checkForEE5Restrictions(AppInstallHelper.java:477)
at com.ibm.ws.management.application.client.AppInstallHelper.getAppDeploymentInfo(AppInstallHelper.java:563)
at com.ibm.websphere.management.application.AppManagementFactory.readArchive(AppManagementFactory.java:129)
... 16 more
Build step 'Deploy To IBM WebSphere Application Server' changed build result to FAILURE
Finished: FAILURE
Is there any version differences between eclipse or jenkins or WAS???
Any Help would be appreciated...
This is a known issue with the WebSphere Deployer Plugin, of which you appear to have filed a duplicate on the Jenkins issue tracker.
The latest comments on that issue indicate that a fix has been made, but this has not yet been released.
Its got resolved.. I have been using WAS8.5 jars which were running on JDK 1.7. I have replaced those by JDK 1.6 jars. And deployed successfully. Thank you..

How to avoid exception for this JavaFX sample program?

I try to run the JavaFX sample program, Henley Car Sales, from Oracle [site][1],
http://download.oracle.com/otndocs/products/javafx/samples/DataApp/
[1]: ,http://download.oracle.com/otndocs/products/javafx/samples/DataApp/, I tried it on two different machines and on three different browsers on each machine. It will only up for few seconds and then get the following exception:
Missing Permissions manifest attribute in main jar: http://download.oracle.com/otndocs/products/javafx/samples/DataApp/DataAppClient.jar
java.lang.ExceptionInInitializerError
at com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider.<clinit>(AbstractMessageReaderWriterProvider.java:66)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
I do have the latest Java installed. I don't know what I can do to make it working.
EDIT:
Above link is a valid link and the JavaFX application is there and can be downloaded to your browser automatically after the click. My browsers can run it but only few seconds due to the exception I pasted.
Quote from http://docs.oracle.com/javafx/2/overview/jfxpub-overview.htm :
Note: The DataApp sample has multiple NetBeans projects and cannot be run without some additional setup. The DataAppReadme.html file and the NetBeans project file are in the src\DataApp directory.
Everything else you have to know is explained on that site.

Jenkins Tomcat deploymet error

I have been using Jenkins for quite some time for Continuous integration with my Java projects.
Recently I tried the Jenkins Deploy Plugin (https://wiki.jenkins-ci.org/display/JENKINS/Deploy+Plugin) to deploy my war file on tomcat 7. However, I am unable to do so as I am getting the following error:
Deploying C:\Program Files (x86)\Jenkins\jobs\MY_PROJS\workspace\target\projs.war to container Tomcat 7.x Remote
[C:\Program Files (x86)\Jenkins\jobs\MY_PROJS\workspace\target\projs.war] is not deployed. Doing a fresh deployment.
Deploying [C:\Program Files (x86)\Jenkins\jobs\MY_PROJS\workspace\target\projs.war]
ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
org.codehaus.cargo.container.ContainerException: Failed to deploy [C:\Program Files (x86)\Jenkins\jobs\MY_PROJS\workspace\target\projs.war]
at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:115)
at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:187)
at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:64)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:90)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:77)
at hudson.FilePath.act(FilePath.java:914)
at hudson.FilePath.act(FilePath.java:887)
at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:77)
at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:47)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1030)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:725)
at hudson.model.Run.execute(Run.java:1695)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:519)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:231)
Caused by: java.io.IOException: Error writing request body to server
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.write(Unknown Source)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.pipe(TomcatManager.java:583)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:501)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deployImpl(TomcatManager.java:547)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:273)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:256)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:240)
at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:107)
... 17 more
java.io.IOException: Error writing request body to server
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.write(Unknown Source)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.pipe(TomcatManager.java:583)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:501)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deployImpl(TomcatManager.java:547)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:273)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:256)
at org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:240)
at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:107)
at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:187)
at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:64)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:90)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:77)
at hudson.FilePath.act(FilePath.java:914)
at hudson.FilePath.act(FilePath.java:887)
at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:77)
at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:47)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1030)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:725)
at hudson.model.Run.execute(Run.java:1695)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:519)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:231)
Thanks in advance for your help.
In most cases, errors like this are simply caused by URL parameter being incorrect.
See similar issue documented/resolved here where URL parameter was the culprit. Additionally, I highly reccomend thoroughly covering Apache Manager Documentation.
However, as mentioned in above comment, this may also be caused by version mismatch between the application itself and what is actually being deployed.

JAX-WS client fails after redployment via tomcat manager

I have an application acting as a client to a JAX-WS server. The connection works fine if I deploy the application directly by placing the war into the tomcat webapps directory (even if doing a hot deploy). However if I undeploy, then redeploy the application using the tomcat manager (from an automated script) I get the exception below thrown anytime it attempts to establish a connection.
Caused by: java.lang.NullPointerException
at com.ctc.wstx.util.SymbolTable.copyArrays(SymbolTable.java:574)
at com.ctc.wstx.util.SymbolTable.findSymbol(SymbolTable.java:403)
at com.ctc.wstx.sr.StreamScanner.parseLocalName(StreamScanner.java:1770)
at com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2914)
at com.ctc.wstx.sr.BasicStreamReader.handleRootElem(BasicStreamReader.java:2093)
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2073)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
at com.sun.xml.internal.ws.util.xml.XMLStreamReaderFilter.next(Unknown Source)
at com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil.next(Unknown Source)
at com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil.nextContent(Unknown Source)
at com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil.nextElementContent(Unknown Source)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.hasWSDLDefinitions(Unknown Source)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(Unknown Source)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(Unknown Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown Source)
[... continues into application specific code calling the service ...]
This post showed up here in a search with someone having a similar problem, but had no resolution other than to use spring-ws which isn't really an option for me at the moment.
Has anyone run into this before and been able to resolve the issue? I'm a bit puzzled by what is going on here to make deployment via the tomcat manager different than deploying by placing the files in webapps.
I also encountered this issue. The problem was that I had a dependency on cxf-rt-frontend-jaxws-2.5.2.jar in my classpath, which contains an implementation of org.apache.cxf.jaxws.spi.ProviderImpl that conflicts with the same class in rt.jar that comes with the JDK.
Later versions of cxf-rt-frontend-jaxws no longer contain this class. After upgrading to cxf-rt-frontend-jaxws-2.6.15.jar, the problem was resolved.
I expect that the problem occurs intermittently because the classloader would randomly choose which implementation of ProviderImpl to use each time the WAR is deployed.
In my case, the problem was on SymbolTable class, which was both on com.sun.org.apache.xerces.internal.util.SymbolTable (from rt.jar) and com.ctc.wstx.util.SymbolTable (from wstx-asl-3.2.7.jar). After removing wstx-asl lib from my classpath we made redeployment via tomcat manager with no errors.

Categories

Resources