Apache Tomcat home page not coming - java

I installed Apache server (Tomcat 7.63) on client machine (Window 7 system 32 bit), The Java version used in client machine is (JDK 1.8 update 60)
Problem
Tomcat server is started by running the file (...\bin\Tomcat7.exe). But when I tried to open the home page (http://localhost:8080/) it is not coming on browser and I can see the following exception on Apache log:
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler process
SEVERE: Error reading request, ignored
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at sun.nio.cs.AbstractCharsetProvider.lookup(Unknown Source)
at sun.nio.cs.AbstractCharsetProvider.access$000(Unknown Source)
at sun.nio.cs.AbstractCharsetProvider$1.next(Unknown Source)
at sun.nio.cs.AbstractCharsetProvider$1.next(Unknown Source)
at java.nio.charset.Charset.put(Unknown Source)
at java.nio.charset.Charset.access$200(Unknown Source)
at java.nio.charset.Charset$3.run(Unknown Source)
at java.nio.charset.Charset$3.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.newInstan
ce(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:61)
at org.apache.coyote.http11.AbstractHttp11Processor.<init>(AbstractHttp1
1Processor.java:273)
at org.apache.coyote.http11.Http11Processor.<init>(Http11Processor.java:
56)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.creat
eProcessor(Http11Protocol.java:165)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.creat
eProcessor(Http11Protocol.java:103)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
AbstractProtocol.java:586)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoin
t.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskTh
read.java:61)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at sun.nio.cs.CharsetMapping.load(Unknown Source)
at sun.nio.cs.CharsetMapping$1.run(Unknown Source)
at sun.nio.cs.CharsetMapping$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.nio.cs.CharsetMapping.get(Unknown Source)
at sun.nio.cs.ext.SJIS_0213$1.run(Unknown Source)
at sun.nio.cs.ext.SJIS_0213$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.nio.cs.ext.SJIS_0213.<clinit>(Unknown Source)
... 30 more
Exception in thread "http-bio-8085-exec-1" java.lang.NullPointerException
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
AbstractProtocol.java:731)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoin
t.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskTh
read.java:61)
at java.lang.Thread.run(Unknown Source)
What is really weird to me that if I start Apache server from Services Management Console from the administrator account: Administrative Tools -> Services , it is working fine and I can see that the home page (http://localhost:8080/) is coming on browser.
Question
Why Apache home page is not coming if we run Apache server using the .exe file (...\bin\Tomcat7.exe) ? Why the home page is coming if the server started using Windows service ? In both cases the same .exe file is execute to run the server, what is the difference between the two cases ?

Tomcat cannot be started by using the exe directly (unless the correct parameters are supplied), you should use one of the included .bat files if you want to do that: startup.bat
Just be sure to define your environment variables, such as JAVA_HOME, and/or JRE_HOME

Related

Jenkins is not getting start on windows 10

java.lang.IllegalStateException: Expected 1 instance of hudson.PluginManager$PluginUpdateMonitor but got 0
at hudson.ExtensionList.lookupSingleton(ExtensionList.java:451)
at hudson.PluginManager$PluginUpdateMonitor.getInstance(PluginManager.java:2188)
at hudson.maven.PluginImpl.init(PluginImpl.java:58)
Caused: 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 hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
Caused: java.lang.Error
at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110)
at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
at jenkins.model.Jenkins$5.runTask(Jenkins.java:1133)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused: org.jvnet.hudson.reactor.ReactorException
at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:282)
at jenkins.InitReactorRunner.run(InitReactorRunner.java:50)
at jenkins.model.Jenkins.executeReactor(Jenkins.java:1166)
at jenkins.model.Jenkins.<init>(Jenkins.java:966)
at hudson.model.Hudson.<init>(Hudson.java:85)
at hudson.model.Hudson.<init>(Hudson.java:81)
at hudson.WebAppMain$3.run(WebAppMain.java:233)
Caused: hudson.util.HudsonFailedToLoad
at hudson.WebAppMain$3.run(WebAppMain.java:250)
Recently install Jenkins by downloading its war file(jenkins.war), and installation I downloaded some maven plugins and then I tried to restart it again but did not find any way to restart it.
so I just open the cmd and hit the command java -jar jenkins.war. After that Jenkins stops(cmd showing the message: jenkins.model.Jenkins#cleanUp: Jenkins stopped).
Now how can I start it again, when I am hitting the localhost:8080/jenkins, it is showing the above error.

Deploy Java application using Bluemix Liberty for Java

We are trying to deploy a spring-based Java application to Bluemix using the Liberty for Java buildpack. We see the error below. We are not even using the org.apache.tiles package. The same application build works fine on a development Tomcat server.
Stack Dump = java.lang.NoClassDefFoundError: org.apache.tiles.el.ScopeELResolver
at java.lang.J9VMInternals.prepareClassImpl(Native Method)
at java.lang.J9VMInternals.prepare(Unknown Source)
at java.lang.Class.getDeclaredMethods(Unknown Source)
at com.ibm.wsspi.injectionengine.MethodMap.getMethods(MethodMap.java:150
)
at com.ibm.wsspi.injectionengine.MethodMap.getAllDeclaredMethods(MethodM
ap.java:86)
at com.ibm.ws.injectionengine.InjectionProcessorManager.getAllDeclaredMe
thods(InjectionProcessorManager.java:430)
at com.ibm.ws.injectionengine.InjectionProcessorManager.processAnnotatio
ns(InjectionProcessorManager.java:231)
at com.ibm.ws.injectionengine.AbstractInjectionEngine.processInjectionMe
taData(AbstractInjectionEngine.java:514)
at com.ibm.ws.injectionengine.osgi.internal.OSGiInjectionEngineImpl.proc
essInjectionMetaData(OSGiInjectionEngineImpl.java:239)
at com.ibm.ws.injectionengine.ReferenceContextImpl.processImpl(Reference
ContextImpl.java:633)
at com.ibm.ws.injectionengine.ReferenceContextImpl.process(ReferenceCont
extImpl.java:305)
at com.ibm.ws.injectionengine.osgi.internal.OSGiReferenceContextImpl.pro
o
cess(OSGiReferenceContextImpl.java:31)
at com.ibm.ws.webcontainer.osgi.webapp.WebApp.commonInitializationStart(
WebApp.java:254)
at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:1038)
at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:6565)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.startWebApp(DynamicVi
rtualHost.java:468)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.startWebApplication(D
ynamicVirtualHost.java:463)
at com.ibm.ws.webcontainer.osgi.WebContainer.startWebApplication(WebCont
ainer.java:1051)
at com.ibm.ws.webcontainer.osgi.WebContainer.access$000(WebContainer.jav
a:104)
at com.ibm.ws.webcontainer.osgi.WebContainer$2.run(WebContainer.java:870
)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.tiles.el.ScopeELResolver
at com.ibm.ws.classloading.internal.AppClassLoader.findClassCommonLibrar
yClassLoaders(AppClassLoader.java:499)
at com.ibm.ws.classloading.internal.AppClassLoader.findClass(AppClassLoa
der.java:282)
at java.lang.ClassLoader.loadClassHelper(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.ibm.ws.classloading.internal.AppClassLoader.findOrDelegateLoadCla
ss(AppClassLoader.java:477)

How to resolve dll UnsatisfiedLinkError when using JNA 4.2.0 with Java 6 on Windows 7.1?

I'm using version 4.2.0 of the JNA libraries from here: https://github.com/java-native-access/jna.
My application works absolutely fine on Java 7 & 8 32-bit on a 64-bit Windows 7.1 machine.
When I try to load it using Java 6 32-bit, I get this error:
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.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.UnsatisfiedLinkError: C:\Users\user\AppData\Local\Temp\jna-205523658\jna1343790277438028829.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:851)
at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:826)
at com.sun.jna.Native.<clinit>(Native.java:140)
at com.sun.jna.Pointer.<clinit>(Pointer.java:41)
at com.sun.jna.platform.win32.WinReg$HKEY.<init>(WinReg.java:32)
at com.sun.jna.platform.win32.WinReg.<clinit>(WinReg.java:61)
Is this an incompatibility issue between 32-bit Java 6 on a 64-bit OS? Is there anything I can do about it?
My problem is that I need to deploy my app to a wide user base all with different permutations of Java 32-bit on different Windows operating systems.

Java web start runs into CouldNotLoadArgumentException when pinned to task bar

Wondering if others are running into this issue and there are known workarounds. Our UI is deployed via java web start. It works well except when users pin the icon to their task bar in Windows 7. We're using JRE 7u7.
jaavws.exe reports it can't find the cache, see below. Keep in mind this works perfectly when we launch the same icon from the desktop:
CouldNotLoadArgumentException[ Could not load file/URL specified: C:\Users\Chang_Lee\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\14\14bb61ce-3d47036e]
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main.access$000(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[...]
java.io.FileNotFoundException: C:\Users\Chang_Lee\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\14\14bb61ce-3d47036e (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main.access$000(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
URL for reported bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4774096 which only says they were unable to reproduce.
We had the same error occurring and user upgraded to Update 34 which didn't solve problem, but had application reinstalled and all works fine.
Dwain A Wuerfel

class not found exception and IO exception while run applet on web

This is my jsp file body tag.
<body>
<jsp:plugin type="applet" code="SApplet.class"
codebase="C:\Program Files\apache-tomcat-6.0.18\webapps\testweb\WEB-INF\classes"
width="400"
height="300" jreversion="1.6"></jsp:plugin>
</body>
I want to run my applet on web application, but i got following error that will fetch on one small window.I can't get any error on console.
Java Plug-in 1.6.0_20
Using JRE version 1.6.0_20-b02 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Sandy
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
load: class SApplet.class not found.
java.lang.ClassNotFoundException: SApplet.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://localhost:8080/testweb/SApplet/class.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: SApplet.class
load: class SApplet.class not found.
java.lang.ClassNotFoundException: SApplet.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://localhost:8080/testweb/SApplet/class.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: SApplet.class
Your code base is written wrong. It should be a relative web path.
In your case it should be something like testweb/applet-classes. But put all applet classes there, not under WEB-INF. WEB-INF is a place where you should store classes that run on server side. This folder may be not accessible from web. The applet classes are downloaded by JVM that is running into browser, so WEB-INF may be not visible for it.
Better way is even pack your applet classes into jar file and put it even under root of your application. In this case your code base will look like codebase='myapplet.jar'

Categories

Resources