Closed glassfishrobot closed 4 years ago
@glassfishrobot Commented @vinayvishal said: Do you have the sample application which on deploying throws this exception?
@glassfishrobot Commented yama0428 said: This is a reproducible batch. sample.war includes index.html and a simple servlet class.
@echo on
:loop
echo %time%
call d:\glassfish4\glassfish\bin\asadmin start-cluster cluster
echo %time%
call d:\glassfish4\glassfish\bin\asadmin deploy --target cluster H:\workspace\javaee7\Application\sample.war
echo %time%
call d:\glassfish4\glassfish\bin\asadmin undeploy --target cluster sample
echo %time%
call d:\glassfish4\glassfish\bin\asadmin stop-cluster cluster
timeout 5
goto :loop
package test.servlet;
import java.io.IOException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet(name="SleepTest", urlPatterns="/sleep")
public class SleepTest extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException {
String timeParam = req.getParameter("time");
int sleep = 0;
try {
sleep = Integer.parseInt(timeParam);
} catch (Exception e) {
}
try {
Thread.sleep(sleep*1000L);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
res.getWriter().println(sleep+" seconds sleeeped.");
}
}
@glassfishrobot Commented @vinayvishal said: This issue couldn't be reproduced with 4.1. Sample application and server.log attached. Please attach the sample application with which you are encountering this exception in case I am missing out something.
@glassfishrobot Commented yama0428 said: I don't know how to attach files to jira.
@glassfishrobot Commented @vinayvishal said: when you click on "More" button on top, you can find option to attach the file. You can also refer to this link
@glassfishrobot Commented yama0428 said: Unfortunately, "More" button includes only "Stop Watching", "Create Sub Task", and "Clone".
@glassfishrobot Commented @vinayvishal said: Oh, not sure then how to proceed further. May be you can try out the attached war and update the results here. The war also have the source code, so you can validate if there is any thing different.
@glassfishrobot Commented yama0428 said: https://www.dropbox.com/sh/jad3jh7h0swrhah/AAB-uTMFf195ian3Nbk2xqaBa?dl=0
I uploaded to dropbox.
@glassfishrobot Commented @vinayvishal said: The issue couldn't be reproduced with the sample application provided.
Output of wsdeploy2.bat
17:06:30.55
C:\Users\vivishal\Downloads>call d:\glassfish4\glassfish\bin\asadmin start-clust
er c1
Command start-cluster executed successfully.
17:06:31.62
Application deployed with name sample.
Command deploy executed successfully.
17:06:33.29
Command undeploy executed successfully.
17:06:34.67
Command stop-cluster executed successfully.
Waiting for 0 seconds, press a key to continue ...
17:06:48.20
Command start-cluster executed successfully.
17:07:08.10
Application deployed with name sample.
Command deploy executed successfully.
17:07:16.47
Command undeploy executed successfully.
17:07:18.27
Command stop-cluster executed successfully.
Waiting for 0 seconds, press a key to continue ...
17:07:29.15
Command start-cluster executed successfully.
17:07:59.07
Application deployed with name sample.
Command deploy executed successfully.
17:08:11.53
Command undeploy executed successfully.
17:08:13.65
Command stop-cluster executed successfully.
Waiting for 4 seconds, press a key to continue ...
17:08:23.05
Command start-cluster executed successfully.
17:08:43.36
Application deployed with name sample.
Command deploy executed successfully.
17:08:53.60
Command undeploy executed successfully.
17:08:56.21
Command stop-cluster executed successfully.
Waiting for 3^CTerminate batch job (Y/N)? ^CYe ...
server.log too is attached.
@glassfishrobot Commented yama0428 said: Message is logged to server.log of DAS, and is not always logged. So please try running wsdeploy2.bat for hours. In my environment, this message is logged 4 times for 3 hours.
[2017-01-05T15:17:15.610+0900] [glassfish 4.1] [WARNING] [] [javax.enterprise.web.util] [tid: _ThreadID=49 _ThreadName=admin-listener(1)] [timeMillis: 1483597035610] [levelValue: 900] [[
Failed to check for ThreadLocal references for web application [unknown]
java.lang.reflect.InvocationTargetException
[2017-01-05T15:28:58.062+0900] [glassfish 4.1] [WARNING] [] [javax.enterprise.web.util] [tid: _ThreadID=52 _ThreadName=admin-listener(4)] [timeMillis: 1483597738062] [levelValue: 900] [[
Failed to check for ThreadLocal references for web application [unknown]
java.lang.reflect.InvocationTargetException
[2017-01-05T15:44:07.002+0900] [glassfish 4.1] [WARNING] [] [javax.enterprise.web.util] [tid: _ThreadID=50 _ThreadName=admin-listener(2)] [timeMillis: 1483598647002] [levelValue: 900] [[
Failed to check for ThreadLocal references for web application [unknown]
java.lang.reflect.InvocationTargetException
[2017-01-05T15:44:53.109+0900] [glassfish 4.1] [WARNING] [] [javax.enterprise.web.util] [tid: _ThreadID=51 _ThreadName=admin-listener(3)] [timeMillis: 1483598693109] [levelValue: 900] [[
Failed to check for ThreadLocal references for web application [unknown]
java.lang.reflect.InvocationTargetException
@glassfishrobot Commented @vinayvishal said: Even after running for more than 4 hrs, the issue didn't get reproduced. Can you share build number of glassfish you are running?
you can get the same by running
asadmin.bat version
@glassfishrobot Commented yama0428 said:
D:\glassfish4\glassfish\bin>asadmin version
Version = GlassFish Server Open Source Edition 4.1.1 (build 1)
Command version executed successfully.
D:\glassfish4\glassfish\bin>java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b18, mixed mode)
OS: Windows 7 Professional Service Pack 1 (64bit) CPU: Intel(R) Core(TM) i7-2640M CPU @ 2.80 GHz Memory: 8GB
In the environment, I download gf4.1.1 from https://glassfish.java.net/download.html and unzip.
The message is logged to server.log of das by executing following commands.
D:\glassfish4\glassfish\bin>asadmin start-domain
Waiting for domain1 to start ..............
Successfully started the domain : domain1
domain Location: D:\glassfish4\glassfish\domains\domain1
Log File: D:\glassfish4\glassfish\domains\domain1\logs\server.log
Admin Port: 4848
Command start-domain executed successfully.
D:\glassfish4\glassfish\bin>asadmin version
Authentication failed with password from login store: C:\Users\ts\.gfclient
\pass
Enter admin password for user "admin">
Version = GlassFish Server Open Source Edition 4.1.1 (build 1)
Command version executed successfully.
D:\glassfish4\glassfish\bin>asadmin login
Enter admin user name [Enter to accept default]>
Admin login information for host [localhost] and port [4848] is being overwritte
n with credentials provided. This is because the --savelogin option was used dur
ing create-domain command.
Login information relevant to admin user name [admin] for host [localhost] and a
dmin port [4848] stored at [C:\Users\ts\.gfclient\pass] successfully.
Make sure that this file remains protected. Information stored in this file will
be used by administration commands to manage associated domain.
Command login executed successfully.
D:\glassfish4\glassfish\bin>asadmin stop-domain
Waiting for the domain to stop
Command stop-domain executed successfully.
D:\glassfish4\glassfish\bin>asadmin start-domain
Waiting for domain1 to start ...............
Successfully started the domain : domain1
domain Location: D:\glassfish4\glassfish\domains\domain1
Log File: D:\glassfish4\glassfish\domains\domain1\logs\server.log
Admin Port: 4848
Command start-domain executed successfully.
D:\glassfish4\glassfish\bin>asadmin create-cluster cluster
Command create-cluster executed successfully.
D:\glassfish4\glassfish\bin>asadmin create-local-instance --cluster cluster inst
ance
Rendezvoused with DAS on localhost:4848.
Port Assignments for server instance instance:
OSGI_SHELL_TELNET_PORT=26666
JAVA_DEBUGGER_PORT=29009
JMS_PROVIDER_PORT=27676
HTTP_LISTENER_PORT=28080
IIOP_SSL_LISTENER_PORT=23820
ASADMIN_LISTENER_PORT=24848
IIOP_SSL_MUTUALAUTH_PORT=23920
JMX_SYSTEM_CONNECTOR_PORT=28686
HTTP_SSL_LISTENER_PORT=28181
IIOP_LISTENER_PORT=23700
Command create-local-instance executed successfully.
D:\glassfish4\glassfish\bin>d:\tmp\wsdeploy2.bat
Command start-cluster executed successfully.
23:06:55.14
Application deployed with name sample.
Command deploy executed successfully.
23:07:10.32
Command undeploy executed successfully.
23:07:13.10
Command stop-cluster executed successfully.
.....
0:10:30.14
Command start-cluster executed successfully.
0:10:41.78
Application deployed with name sample.
Command deploy executed successfully.
0:10:46.86
Command undeploy executed successfully.
0:10:47.84
Command stop-cluster executed successfully.
[2017-01-19T00:10:43.404+0900] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=53 _ThreadName=admin-listener(3)] [timeMillis: 1484752243404] [levelValue: 800] [[
visiting unvisited references]]
[2017-01-19T00:10:43.418+0900] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=53 _ThreadName=admin-listener(3)] [timeMillis: 1484752243418] [levelValue: 800] [[
visiting unvisited references]]
[2017-01-19T00:10:43.423+0900] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=53 _ThreadName=admin-listener(3)] [timeMillis: 1484752243423] [levelValue: 800] [[
visiting unvisited references]]
[2017-01-19T00:10:43.446+0900] [glassfish 4.1] [WARNING] [] [javax.enterprise.web.util] [tid: _ThreadID=53 _ThreadName=admin-listener(3)] [timeMillis: 1484752243446] [levelValue: 900] [[
Failed to check for ThreadLocal references for web application [unknown]
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.glassfish.web.loader.WebappClassLoader.checkThreadLocalsForLeaks(WebappClassLoader.java:2313)
at org.glassfish.web.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:2059)
at org.glassfish.web.loader.WebappClassLoader.stop(WebappClassLoader.java:1960)
at org.glassfish.web.loader.WebappClassLoader.preDestroy(WebappClassLoader.java:1929)
at org.glassfish.deployment.common.DeploymentContextImpl.getClassLoader(DeploymentContextImpl.java:266)
at org.glassfish.deployment.common.DeploymentContextImpl.getClassLoader(DeploymentContextImpl.java:216)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:485)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Unknown Source)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Unknown Source)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:404)
at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:234)
at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:309)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:292)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1139)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:375)
at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:173)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at java.lang.ThreadLocal$ThreadLocalMap.expungeStaleEntry(Unknown Source)
at java.lang.ThreadLocal$ThreadLocalMap.expungeStaleEntries(Unknown Source)
... 70 more
]]
[2017-01-19T00:10:43.461+0900] [glassfish 4.1] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=53 _ThreadName=admin-listener(3)] [timeMillis: 1484752243461] [levelValue: 800] [[
sample was successfully deployed in 80 milliseconds.]]
@glassfishrobot Commented File: glassfish-21521.war Attached By: @vinayvishal
@glassfishrobot Commented File: server.log Attached By: @vinayvishal
@glassfishrobot Commented File: server.log Attached By: @vinayvishal
@glassfishrobot Commented This issue was imported from java.net JIRA GLASSFISH-21521
@glassfishrobot Commented Reported by yama0428
@sivakumart Commented @yama0428: We are triaging old bugs for the upcoming GlassFish release. I tried to reproduce this issue $ asadmin version Version = GlassFish Server Open Source Edition 5.0 (build siva-private) $ java -version java version "1.8.0_121" Java(TM) SE Runtime Environment (build 1.8.0_121-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode) $ uname -srvmo Linux 4.4.0-81-generic #104-Ubuntu SMP Wed Jun 14 08:17:06 UTC 2017 x86_64 GNU/Linux
with a similar script to deploy/undeply your sample.war against a cluster for almost an hour. I was not able to reproduce this issue.
However, the stack trace you had listed is a WARNING that the WebAppClassLoader emits when an unexpected situation arises (clearing of ThreadLocalMap entries fails), and this internal failure ideally should not fail the deployment that triggered it. Do you see a deployment failure accompanying this stacktrace?
@sivakumart Commented Marking this as 5_0_exclude as
This issue has been marked as inactive and old and will be closed in 7 days if there is no further activity. If you want the issue to remain open please add a comment
When I deployed a web application, InvocationTargetException is thrown by WebappClassLoader.
Affected Versions
[4.1, 4.1.1]