[GLASSFISH-21571] AS-WEB-GLUE-00080 is always logged to the server.log in spite of valid cipher suites for JDK8 Created: 25/Oct/16  Updated: 20/Jan/17

Status: In Progress
Project: glassfish
Component/s: security, web_container
Affects Version/s: 3.1.2.2, 4.1, 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yama0428 Assignee: ankur.kathuria
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

AS-WEB-GLUE-00080 is always logged to the server.log in spite of valid cipher suites for JDK8.

Reproducible steps are as follows.

C:\glassfish411\glassfish\bin>asadmin create-cluster cluster
Command create-cluster executed successfully.

C:\glassfish411\glassfish\bin>asadmin create-local-instance --cluster cluster in
stance
Rendezvoused with DAS on localhost:4848.
Port Assignments for server instance instance:
JMX_SYSTEM_CONNECTOR_PORT=28686
JMS_PROVIDER_PORT=27676
HTTP_LISTENER_PORT=28080
ASADMIN_LISTENER_PORT=24848
JAVA_DEBUGGER_PORT=29009
IIOP_SSL_LISTENER_PORT=23820
IIOP_LISTENER_PORT=23700
OSGI_SHELL_TELNET_PORT=26666
HTTP_SSL_LISTENER_PORT=28181
IIOP_SSL_MUTUALAUTH_PORT=23920
Command create-local-instance executed successfully.

C:\glassfish411\glassfish\bin>asadmin set cluster.network-config.protocols.proto
col.http-listener-2.ssl.ssl3-tls-ciphers=+TLS_RSA_WITH_AES_128_GCM_SHA256
cluster.network-config.protocols.protocol.http-listener-2.ssl.ssl3-tls-ciphers=+
TLS_RSA_WITH_AES_128_GCM_SHA256
Command set executed successfully.

C:\glassfish411\glassfish\bin>asadmin start-cluster cluster
Command start-cluster executed successfully.

This is the message.
TLS_RSA_WITH_AES_128_GCM_SHA256 is a valid cipher suite for JDK8.

[2016-10-25T08:33:44.251+0900] [glassfish 4.1] [WARNING] [AS-WEB-GLUE-00080] [javax.enterprise.web] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1477352021880] [timeMillis: 1477352024251] [levelValue: 900] [[
  Unrecognized cipher: TLS_RSA_WITH_AES_128_GCM_SHA256]]

The cause of this message is PECoyoteConnector.java.
PECoyoteConnector get cipher suites via CipherInfo#getCipherInfo(String).

In the static initializer of CipherInfo.java, SSLServerSocketFactory.getDefault() is called.
If the initialization of com.sun.enterprise.security.ssl.SSLUtils is not done, SSLServerSocketFactory.getDefault() returns an empty array.
By calling SSLUtils#getSSLContext, SSLServerSocketFactory.getDefault() returns cipher suites because SSLContext.setDefault is called in it.

In order to suppress this message, I think com.sun.enterprise.web.EmbeddedWebContainer should inject SSLUtils.

EmbeddedWebContainer.java
    @Inject
    private SSLUtils sslUtils;


 Comments   
Comment by ankur.kathuria [ 20/Jan/17 ]

I tried recreating the issue using steps given in description with jkd8, glassfish 4.1 and with both Linux and Windows. But not able to re-create the same.
Could you please provide more information like any missing step or any other configuration you are using ?
Also, i ran "list-supported-cipher-suites" and got "TLS_RSA_WITH_AES_128_GCM_SHA256" in supported list. You can check this as well if you have this cipher suite in your supported list.

Comment by yama0428 [ 20/Jan/17 ]

The result of list-supported-cipher-suites includes TLS_RSA_WITH_AES_128_GCM_SHA256.
In my environment(windows and RHEL6.5), reproducible steps are following only.
The kind of cipher suites is unrelated.

asadmin set XXX.network-config.protocols.protocol.http-listener-2.ssl.ssl3-tls-ciphers=supported cipher suites
asadmin start-cluster XXX

ex)

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 cluster2
Command create-cluster executed successfully.

D:\glassfish4\glassfish\bin>asadmin create-local-instance --cluster cluster2 ins
tance2
Rendezvoused with DAS on localhost:4848.
Using DAS host localhost and port 4848 from existing das.properties for node
localhost-domain1. To use a different DAS, create a new node using create-node-s
sh or
create-node-config. Create the instance with the new node and correct
host and port:
asadmin --host das_host --port das_port create-local-instance --node node_name i
nstance_name.
Port Assignments for server instance instance2:
OSGI_SHELL_TELNET_PORT=26667
JAVA_DEBUGGER_PORT=29010
JMS_PROVIDER_PORT=27677
HTTP_LISTENER_PORT=28081
IIOP_SSL_LISTENER_PORT=23821
ASADMIN_LISTENER_PORT=24849
IIOP_SSL_MUTUALAUTH_PORT=23921
JMX_SYSTEM_CONNECTOR_PORT=28687
HTTP_SSL_LISTENER_PORT=28182
IIOP_LISTENER_PORT=23701
Command create-local-instance executed successfully.

D:\glassfish4\glassfish\bin>asadmin list-supported-cipher-suites
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
TLS_RSA_WITH_AES_128_CBC_SHA256
TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
TLS_DHE_DSS_WITH_AES_128_CBC_SHA256
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
TLS_RSA_WITH_AES_128_CBC_SHA
TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
TLS_DHE_RSA_WITH_AES_128_CBC_SHA
TLS_DHE_DSS_WITH_AES_128_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
TLS_DHE_DSS_WITH_AES_128_GCM_SHA256
TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
SSL_RSA_WITH_3DES_EDE_CBC_SHA
TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA
SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA
TLS_EMPTY_RENEGOTIATION_INFO_SCSV
TLS_DH_anon_WITH_AES_128_GCM_SHA256
TLS_DH_anon_WITH_AES_128_CBC_SHA256
TLS_ECDH_anon_WITH_AES_128_CBC_SHA
TLS_DH_anon_WITH_AES_128_CBC_SHA
TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA
SSL_DH_anon_WITH_3DES_EDE_CBC_SHA
SSL_RSA_WITH_DES_CBC_SHA
SSL_DHE_RSA_WITH_DES_CBC_SHA
SSL_DHE_DSS_WITH_DES_CBC_SHA
SSL_DH_anon_WITH_DES_CBC_SHA
SSL_RSA_EXPORT_WITH_DES40_CBC_SHA
SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA
SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA
SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA
TLS_RSA_WITH_NULL_SHA256
TLS_ECDHE_ECDSA_WITH_NULL_SHA
TLS_ECDHE_RSA_WITH_NULL_SHA
SSL_RSA_WITH_NULL_SHA
TLS_ECDH_ECDSA_WITH_NULL_SHA
TLS_ECDH_RSA_WITH_NULL_SHA
TLS_ECDH_anon_WITH_NULL_SHA
SSL_RSA_WITH_NULL_MD5
Command list-supported-cipher-suites executed successfully.

D:\glassfish4\glassfish\bin>asadmin set cluster2.network-config.protocols.protoc
ol.http-listener-2.ssl.ssl3-tls-ciphers=+TLS_RSA_WITH_AES_128_GCM_SHA256
cluster2.network-config.protocols.protocol.http-listener-2.ssl.ssl3-tls-ciphers=
+TLS_RSA_WITH_AES_128_GCM_SHA256
Command set executed successfully.

D:\glassfish4\glassfish\bin>asadmin start-cluster cluster2
Command start-cluster executed successfully.

This is the server.log.

[2017-01-20T23:56:21.472+0900] [] [INFO] [NCLS-GFLAUNCHER-00005] [javax.enterprise.launcher] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1484924181472] [levelValue: 800] [[
  JVM invocation command line:
C:\Program Files\Java\jre1.8.0_66\bin\java.exe
-cp
D:/glassfish4/glassfish/modules/glassfish.jar
-XX:+UnlockDiagnosticVMOptions
-XX:NewRatio=2
-XX:MaxPermSize=192m
-Xmx512m
-server
-javaagent:D:/glassfish4/glassfish/lib/monitor/flashlight-agent.jar
-Djavax.net.ssl.trustStore=D:\glassfish4\glassfish\nodes\localhost-domain1\instance2/config/cacerts.jks
-Djdk.corba.allowOutputStreamSubclass=true
-Dfelix.fileinstall.dir=D:\glassfish4\glassfish/modules/autostart/
-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.fileinstall
-Dcom.sun.aas.installRoot=D:\glassfish4\glassfish
-Dfelix.fileinstall.poll=5000
-Djava.endorsed.dirs=D:\glassfish4\glassfish/modules/endorsed;D:\glassfish4\glassfish/lib/endorsed
-Djava.security.policy=D:\glassfish4\glassfish\nodes\localhost-domain1\instance2/config/server.policy
-Dosgi.shell.telnet.maxconn=1
-Dfelix.fileinstall.bundles.startTransient=true
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Dfelix.fileinstall.log.level=3
-Djavax.net.ssl.keyStore=D:\glassfish4\glassfish\nodes\localhost-domain1\instance2/config/keystore.jks
-Djava.security.auth.login.config=D:\glassfish4\glassfish\nodes\localhost-domain1\instance2/config/login.conf
-Dfelix.fileinstall.disableConfigSave=false
-Dfelix.fileinstall.bundles.new.start=true
-Dcom.sun.aas.instanceRoot=D:\glassfish4\glassfish\nodes\localhost-domain1\instance2
-Dosgi.shell.telnet.port=26667
-Dgosh.args=--noshutdown -c noop=true
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
-Dosgi.shell.telnet.ip=127.0.0.1
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Djava.awt.headless=true
-Djava.ext.dirs=C:\Program Files\Java\jre1.8.0_66/lib/ext;C:\Program Files\Java\jre1.8.0_66/jre/lib/ext;D:\glassfish4\glassfish\nodes\localhost-domain1\instance2/lib/ext
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Djava.library.path=D:/glassfish4/glassfish/lib;C:/ProgramData/Oracle/Java/javapath;C:/windows/Sun/Java/bin;C:/windows/System32;C:/windows;C:/Program Files/Common Files/Microsoft Shared/Windows Live;C:/Program Files (x86)/Common Files/microsoft shared/Windows Live;C:/windows/System32/wbem;C:/windows/System32/WindowsPowerShell/v1.0;C:/Program Files (x86)/Common Files/Roxio Shared/OEM/DLLShared;C:/Program Files (x86)/Common Files/Roxio Shared/OEM/12.0/DLLShared;C:/Program Files (x86)/Roxio 2010/OEM/AudioCore;C:/Program Files (x86)/Windows Live/Shared;C:/Program Files/Softex/OmniPass;C:/Program Files (x86)/Common Files/Roxio Shared/DLLShared;C:/Program Files/Intel/WiFi/bin;C:/Program Files/Common Files/Intel/WirelessCommon;C:/Program Files (x86)/Common Files/Ulead Systems/MPEG;C:/Program Files/TortoiseSVN/bin;C:/Program Files/TortoiseGit/bin;G:/programs/apache-ant-1.9.3-bin/apache-ant-1.9.3/bin;C:/Program Files/TortoiseHg;C:/Program Files (x86)/QuickTime/QTSystem;G:/programs/apache-maven-3.2.5/bin;C:/Program Files (x86)/CVSNT;D:/glassfish4/glassfish/domains/domain1/config
com.sun.enterprise.glassfish.bootstrap.ASMain
-upgrade
false
-read-stdin
true
-asadmin-args
--host,,,localhost,,,--port,,,4848,,,--user,,,admin,,,--secure=false,,,--terse=false,,,--echo=false,,,--interactive=false,,,start-local-instance,,,--verbose=false,,,--watchdog=false,,,--debug=false,,,--node,,,localhost-domain1,,,instance2
-instancename
instance2
-type
INSTANCE
-verbose
false
-instancedir
D:/glassfish4/glassfish/nodes/localhost-domain1/instance2
-asadmin-classpath
D:/glassfish4/glassfish/modules/admin-cli.jar
-debug
false
-asadmin-classname
com.sun.enterprise.admin.cli.AdminMain]]

[2017-01-20T23:56:25.164+0900] [glassfish 4.1] [INFO] [NCLS-LOGGING-00009] [javax.enterprise.logging] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1484924185035] [timeMillis: 1484924185164] [levelValue: 800] [[
  Running GlassFish Version: GlassFish Server Open Source Edition  4.1.1  (build 1)]]

[2017-01-20T23:56:25.166+0900] [glassfish 4.1] [INFO] [NCLS-LOGGING-00010] [javax.enterprise.logging] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1484924185035] [timeMillis: 1484924185166] [levelValue: 800] [[
  Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter]]

[2017-01-20T23:56:25.295+0900] [glassfish 4.1] [INFO] [NCLS-SECURITY-01115] [javax.enterprise.system.core.security] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1484924185042] [timeMillis: 1484924185295] [levelValue: 800] [[
  Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.]]

[2017-01-20T23:56:25.297+0900] [glassfish 4.1] [INFO] [NCLS-SECURITY-01115] [javax.enterprise.system.core.security] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1484924185042] [timeMillis: 1484924185297] [levelValue: 800] [[
  Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.]]

[2017-01-20T23:56:25.301+0900] [glassfish 4.1] [INFO] [NCLS-SECURITY-01115] [javax.enterprise.system.core.security] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1484924185042] [timeMillis: 1484924185301] [levelValue: 800] [[
  Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.]]

[2017-01-20T23:56:25.487+0900] [glassfish 4.1] [INFO] [gms.join] [ShoalLogger] [tid: _ThreadID=17 _ThreadName=RunLevelControllerThread-1484924185034] [timeMillis: 1484924185487] [levelValue: 800] [[
  GMS1095: member: instance2 is joining group: cluster2 ...]]

[2017-01-20T23:56:25.517+0900] [glassfish 4.1] [CONFIG] [] [ShoalLogger] [tid: _ThreadID=17 _ThreadName=RunLevelControllerThread-1484924185034] [timeMillis: 1484924185517] [levelValue: 700] [[
  instantiated following NetworkManager implementation:com.sun.enterprise.mgmt.transport.grizzly.grizzly2.GrizzlyNetworkManager2]]

[2017-01-20T23:56:25.519+0900] [glassfish 4.1] [CONFIG] [] [ShoalLogger] [tid: _ThreadID=17 _ThreadName=RunLevelControllerThread-1484924185034] [timeMillis: 1484924185519] [levelValue: 700] [[
  GMS MAX_MESSAGE_LENGTH=4,196,352]]

[2017-01-20T23:56:25.524+0900] [glassfish 4.1] [CONFIG] [] [ShoalLogger] [tid: _ThreadID=17 _ThreadName=RunLevelControllerThread-1484924185034] [timeMillis: 1484924185524] [levelValue: 700] [[
  
GrizzlyNetworkManager2 Configuration
BIND_INTERFACE_ADDRESS:null  NetworkInterfaceName:null
TCPSTARTPORT..TCPENDPORT:9090..9200
MULTICAST_ADDRESS:MULTICAST_PORT:228.9.162.62:9544 MULTICAST_PACKET_SIZE:65536 MULTICAST_TIME_TO_LIVE: default
FAILURE_DETECT_TCP_RETRANSMIT_TIMEOUT(ms):10000
 MAX_PARALLEL:15
START_TIMEOUT(ms):15000 WRITE_TIMEOUT(ms):10000
MAX_WRITE_SELECTOR_POOL_SIZE:30
]]

[2017-01-20T23:56:25.520+0900] [glassfish 4.1] [INFO] [] [] [tid: _ThreadID=17 _ThreadName=Thread-8] [timeMillis: 1484924185520] [levelValue: 800] [[
  Grizzly 2.0 NetworkManager]]

[2017-01-20T23:56:25.763+0900] [glassfish 4.1] [INFO] [] [org.hibernate.validator.internal.util.Version] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1484924185035] [timeMillis: 1484924185763] [levelValue: 800] [[
  HV000001: Hibernate Validator 5.1.2.Final]]

[2017-01-20T23:56:25.841+0900] [glassfish 4.1] [WARNING] [] [org.glassfish.grizzly.config.Utils] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1484924185042] [timeMillis: 1484924185841] [levelValue: 900] [[
  Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-1, realClassName=org.glassfish.grizzly.http2.Http2AddOn]]

[2017-01-20T23:56:25.844+0900] [glassfish 4.1] [INFO] [SEC-SVCS-00100] [javax.enterprise.security.services] [tid: _ThreadID=19 _ThreadName=RunLevelControllerThread-1484924185042] [timeMillis: 1484924185844] [levelValue: 800] [[
  Authorization Service has successfully initialized.]]

[2017-01-20T23:56:25.937+0900] [glassfish 4.1] [CONFIG] [] [ShoalLogger] [tid: _ThreadID=17 _ThreadName=RunLevelControllerThread-1484924185034] [timeMillis: 1484924185937] [levelValue: 700] [[
  Grizzly controller listening on /0:0:0:0:0:0:0:0:9140. Transport started in 395 ms]]

[2017-01-20T23:56:26.054+0900] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1484924185042] [timeMillis: 1484924186054] [levelValue: 800] [[
  Grizzly Framework 2.3.23 started in: 94ms - bound to [/0.0.0.0:28081]]]

[2017-01-20T23:56:26.077+0900] [glassfish 4.1] [WARNING] [] [org.glassfish.grizzly.config.Utils] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1484924185042] [timeMillis: 1484924186077] [levelValue: 900] [[
  Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-2, realClassName=org.glassfish.grizzly.http2.Http2AddOn]]

[2017-01-20T23:56:26.150+0900] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1484924185042] [timeMillis: 1484924186150] [levelValue: 800] [[
  Grizzly Framework 2.3.23 started in: 27ms - bound to [/0.0.0.0:28182]]]

[2017-01-20T23:56:26.182+0900] [glassfish 4.1] [WARNING] [] [org.glassfish.grizzly.config.Utils] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1484924185042] [timeMillis: 1484924186182] [levelValue: 900] [[
  Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=admin-listener, realClassName=org.glassfish.grizzly.http2.Http2AddOn]]

[2017-01-20T23:56:26.212+0900] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1484924185042] [timeMillis: 1484924186212] [levelValue: 800] [[
  Grizzly Framework 2.3.23 started in: 16ms - bound to [/0.0.0.0:24849]]]

[2017-01-20T23:56:26.353+0900] [glassfish 4.1] [INFO] [] [org.glassfish.ha.store.spi.BackingStoreFactoryRegistry] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1484924185042] [timeMillis: 1484924186353] [levelValue: 800] [[
  Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry]]

[2017-01-20T23:56:26.471+0900] [glassfish 4.1] [INFO] [jts.startup_msg] [javax.enterprise.system.core.transaction.com.sun.jts.CosTransactions] [tid: _ThreadID=19 _ThreadName=RunLevelControllerThread-1484924185042] [timeMillis: 1484924186471] [levelValue: 800] [[
  JTS5014: Recoverable JTS instance, serverId = [100]]]

[2017-01-20T23:56:26.485+0900] [glassfish 4.1] [INFO] [jts.startup_msg] [javax.enterprise.system.core.transaction.com.sun.jts.CosTransactions] [tid: _ThreadID=19 _ThreadName=RunLevelControllerThread-1484924185042] [timeMillis: 1484924186485] [levelValue: 800] [[
  JTS5014: Recoverable JTS instance, serverId = [100]]]

[2017-01-20T23:56:26.797+0900] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00198] [javax.enterprise.web] [tid: _ThreadID=19 _ThreadName=RunLevelControllerThread-1484924185042] [timeMillis: 1484924186797] [levelValue: 800] [[
  Created HTTP listener http-listener-1 on host/port 0.0.0.0:28081]]

[2017-01-20T23:56:26.813+0900] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00198] [javax.enterprise.web] [tid: _ThreadID=19 _ThreadName=RunLevelControllerThread-1484924185042] [timeMillis: 1484924186813] [levelValue: 800] [[
  Created HTTP listener http-listener-2 on host/port 0.0.0.0:28182]]

[2017-01-20T23:56:26.998+0900] [glassfish 4.1] [WARNING] [AS-WEB-GLUE-00080] [javax.enterprise.web] [tid: _ThreadID=19 _ThreadName=RunLevelControllerThread-1484924185042] [timeMillis: 1484924186998] [levelValue: 900] [[
  Unrecognized cipher: TLS_RSA_WITH_AES_128_GCM_SHA256]]

[2017-01-20T23:56:27.018+0900] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00198] [javax.enterprise.web] [tid: _ThreadID=19 _ThreadName=RunLevelControllerThread-1484924185042] [timeMillis: 1484924187018] [levelValue: 800] [[
  Created HTTP listener admin-listener on host/port 0.0.0.0:24849]]

[2017-01-20T23:56:27.090+0900] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00200] [javax.enterprise.web] [tid: _ThreadID=19 _ThreadName=RunLevelControllerThread-1484924185042] [timeMillis: 1484924187090] [levelValue: 800] [[
  Created virtual server server]]

[2017-01-20T23:56:27.094+0900] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00200] [javax.enterprise.web] [tid: _ThreadID=19 _ThreadName=RunLevelControllerThread-1484924185042] [timeMillis: 1484924187094] [levelValue: 800] [[
  Created virtual server __asadmin]]

[2017-01-20T23:56:27.105+0900] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.dol] [tid: _ThreadID=76 _ThreadName=Recovery Helper Thread] [timeMillis: 1484924187105] [levelValue: 800] [[
  visiting unvisited references]]

My environment is following.

OS: Windows 7 Professional Service Pack 1 (64bit)
CPU: Intel(R) Core(TM) i7-2640M CPU @ 2.80 GHz
Memory: 8GB

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)




[GLASSFISH-21644] Not able to deploy app with cdi validator support Created: 20/Dec/16  Updated: 20/Jan/17

Status: In Progress
Project: glassfish
Component/s: cdi
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: ankur.kathuria Assignee: ankur.kathuria
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File cdi-typesafe-javaee-resource-injection-web.war    

 Description   

Not able to deploy the sample app(attached with issue) and following is error

org.glassfish.deployment.common.DeploymentException: CDI deployment failure:WELD-001408: Unsatisfied dependencies for type Validator with qualifiers @Default
at injection point [BackedAnnotatedField] @Inject test.servlet.SimpleJavaEEIntegrationTestServlet.validator
at test.servlet.SimpleJavaEEIntegrationTestServlet.validator(SimpleJavaEEIntegrationTestServlet.java:0)



 Comments   
Comment by ankur.kathuria [ 20/Dec/16 ]

On analyzing the test "javaee-integration-simple", found that bean-validator.jar is not present in GLASSFISH_HOME/modules which seems to contain api and implementation for Validator used in this test. On further investigation i observed that dependency bean-validator is removed from /nucleus/packager/nucleus-hk2/pom.xml and instead validation-api and hibernate-validatoris added.

Also, ran the devtests(having deployment test) with reversion 64290 and found them passing and it again started failing at revision 64298. Looks like these changes has introduced the deployment failure.

Comment by ankur.kathuria [ 20/Dec/16 ]

when we add bean-validator-cdi.jar we get following exception

Could not instantiate service class org.hibernate.validator.internal.cdi.ValidationExtension
java.lang.NoClassDefFoundError: org/hibernate/validator/internal/util/logging/LoggerFactory
at org.hibernate.validator.internal.cdi.ValidationExtension.<clinit>(ValidationExtension.java:87)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.jboss.weld.util.ServiceLoader.prepareInstance(ServiceLoader.java:240)
at org.jboss.weld.util.ServiceLoader.loadService(ServiceLoader.java:214)
at org.jboss.weld.util.ServiceLoader.loadServiceFile(ServiceLoader.java:182)
at org.jboss.weld.util.ServiceLoader.reload(ServiceLoader.java:162)
at org.jboss.weld.util.ServiceLoader.iterator(ServiceLoader.java:297)
at org.glassfish.weld.DeploymentImpl.getExtensions(DeploymentImpl.java:466)
at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:218)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:328)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
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(Subject.java:360)
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(Subject.java:360)
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:407)
at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:234)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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:326)
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:305)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384)
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(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.hibernate.validator.internal.util.logging.LoggerFactory not found by org.glassfish.hk2.external.bean-validator-cdi [86]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 76 more
]]

Comment by ankur.kathuria [ 11/Jan/17 ]

As per discussion with Mason, John and Romain we have integrated GF with hk2 v2.5.0-b31.
now hk2 needs to be modified so that it exports required packages.

Comment by ankur.kathuria [ 11/Jan/17 ]

Completed Commit at Revision: 64391 for hk2 integration with GF

Comment by ankur.kathuria [ 20/Jan/17 ]

integrated with bean-validator v2.5.0-b06 which fixes the issue.





[GLASSFISH-21533] The WAR file working in Tomcat server is not working in Glassfish 4.0 Created: 12/Apr/16  Updated: 20/Jan/17

Status: Open
Project: glassfish
Component/s: admin, deployment
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Hari92 Assignee: Vinay Vishal
Resolution: Unresolved Votes: 0
Labels: waiting_on_filer
Remaining Estimate: 1 week
Time Spent: Not Specified
Original Estimate: 1 week
Environment:

java 1.8



 Description   

[2016-04-13T00:02:23.156+0530] [glassfish 4.0] [SEVERE] [NCLS-ADMIN-00011] [javax.enterprise.system.tools.admin.security.authorization] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1460485943156] [levelValue: 1000] [[
An unexpected exception occurred.
java.lang.RuntimeException: java.lang.NullPointerException
at org.glassfish.deployment.admin.DeployCommand.preAuthorization(DeployCommand.java:314)
at com.sun.enterprise.admin.util.CommandSecurityChecker$1.run(CommandSecurityChecker.java:187)
at com.sun.enterprise.admin.util.CommandSecurityChecker$1.run(CommandSecurityChecker.java:183)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.sun.enterprise.admin.util.CommandSecurityChecker.authorize(CommandSecurityChecker.java:183)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1203)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:396)
at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:234)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:125)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:91)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:346)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:341)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:101)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:224)
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:198)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:946)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:331)
at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:165)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:181)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at com.sun.enterprise.deployment.deploy.shared.InputJarArchive$ArchiveJarEntrySource.<init>(InputJarArchive.java:581)
at com.sun.enterprise.deployment.deploy.shared.InputJarArchive$ArchiveJarEntrySource.<init>(InputJarArchive.java:573)
at com.sun.enterprise.deployment.deploy.shared.InputJarArchive.createEntryEnumeration(InputJarArchive.java:451)
at com.sun.enterprise.deployment.deploy.shared.InputJarArchive.entries(InputJarArchive.java:203)
at com.sun.enterprise.deployment.deploy.shared.InputJarArchive.access$100(InputJarArchive.java:74)
at com.sun.enterprise.deployment.deploy.shared.InputJarArchive$1.enumeration(InputJarArchive.java:166)
at com.sun.enterprise.deployment.deploy.shared.InputJarArchive$CollectionWrappedEnumeration.<init>(InputJarArchive.java:724)
at com.sun.enterprise.deployment.deploy.shared.InputJarArchive.getDirectories(InputJarArchive.java:161)
at org.glassfish.javaee.full.deployment.EarDetector.isEARFromIntrospecting(EarDetector.java:142)
at org.glassfish.javaee.full.deployment.EarDetector.handles(EarDetector.java:110)
at com.sun.enterprise.v3.server.ApplicationLifecycle.getArchiveHandler(ApplicationLifecycle.java:211)
at org.glassfish.deployment.admin.DeployCommand.preAuthorization(DeployCommand.java:246)
... 52 more
]]



 Comments   
Comment by Vinay Vishal [ 28/Dec/16 ]

can you please share the sample applicaton.

Comment by Vinay Vishal [ 20/Jan/17 ]

As per the stacktrace,java.lang.NullPointerException is being thrown while trying to initialize InputJarArchive$ArchiveJarEntrySource.
The exception trace snippet:

Caused by: java.lang.NullPointerException
at com.sun.enterprise.deployment.deploy.shared.InputJarArchive$ArchiveJarEntrySource.<init>(InputJarArchive.java:581)
at com.sun.enterprise.deployment.deploy.shared.InputJarArchive$ArchiveJarEntrySource.<init>(InputJarArchive.java:573)

Here is the piece of code which results in exception (pointed with an arrow):

InputJarArchive$ArchiveJarEntrySource
:
 private ArchiveJarEntrySource(final URI archiveURI) throws IOException {
           sourceJarFile = getJarFile(archiveURI); <--
            jarEntries = sourceJarFile.entries();
        }

This is happening because during deployment glassfish is unable to get the war file location. Can you ensure that there are no file permission issues or if file is available at the specified location in first place? As I am unable to reproduce it with the sample application I have built, it would be great if you can share the application that failed to get deployed.

You may also like to try the latest released version which is 4.1.1 and see if problem still exists.

Tested with:
GlassFish Server Open Source Edition 4.0 (build 89)
java version "1.8.0_65"





[GLASSFISH-21582] No error is displayed on Batch Job Executions screen when Batch Runtime database is down Created: 08/Nov/16  Updated: 19/Jan/17

Status: In Progress
Project: glassfish
Component/s: admin_gui, batch
Affects Version/s: 4.1, 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: gregn123 Assignee: ankur.kathuria
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

On the Batch Job Executions screen in the Admin Console, no error message is displayed when the database, used by the Batch Runtime Configuration, isn't running, or is otherwise inaccessible. All you see is an empty Batch Jobs list ("No items found"), just as you get when the database is running and there are no batch job execution results in the database.

This bug exists in Glassfish 4.1 and above.

Steps to reproduce the bug:

1) Start the server:

asadmin start-domain

2) In the Admin Console, navigate to server->Batch->Configuration and set the "Data Source Lookup Name" to a DataSource for the database to be used for storing Batch Runtime job execution information. Do NOT use "jdbc/__TimerPool", as this uses Embedded JavaDB, which is not independently stoppable to the Glassfish server. Stop and start the server to make the configuration change effective.

3) Ensure that the database is running.

4) Deploy and then run (several times) a sample Batch application.

5) Go to server->Batch->Executions, and verify that there are batch job execution results, from running the batch application.

6) Stop the database.

7) Click somewhere else in the Admin Console, then go back to server->Batch->Executions. No execution results are displayed, but no error message is displayed to indicate a problem with connectivity to the database.

8) Re-start the server:

asadmin restart-domain

9) In the Admin Console, go to server->Batch->Executions. Again, no execution results are displayed, but no error message is displayed to indicate a problem with connectivity to the database.

Resolution:

In the "execute" method of the command class (org.glassfish.batch.AbstractListCommandProxy) used for listing batch job executions, there are some code paths which do not set the ActionExitCode in the ActionReport returned in the AdminCommandContext. In these cases, the exit code remains as the default value, ActionReport.ExitCode.SUCCESS, which results in failures being undetected - and so not reported on the Batch Job Executions screen.

I have created a Glassfish 4.1.1 patch below to correct these problems:

--- AbstractListCommandProxy.java	(revision 64112)
+++ AbstractListCommandProxy.java	(working copy)
@@ -107,5 +107,6 @@
         ActionReport subReport = null;
         if (! preInvoke(context, actionReport)) {
             commandsExitCode = ActionReport.ExitCode.FAILURE;
+            actionReport.setActionExitCode(commandsExitCode);
             return;
         }
@@ -133,9 +134,9 @@
                     postInvoke(context, subReport.getSubActionsReport().get(0));
                 } else {
                     actionReport.setMessage(subReport.getMessage());
-                    commandsExitCode = subReport.getActionExitCode();
                 }
             }
+            commandsExitCode = subReport.getActionExitCode();
         }
         actionReport.setActionExitCode(commandsExitCode);
     }


 Comments   
Comment by Anissa Lam [ 08/Nov/16 ]

Thanks for filing the bug and suggestion for the fix.
After you applied the patch you provide, what does the console show when the datasource is not up ?
AbstractListCommandProxy is under appserver/batch. I am assigning this bug to Mahesh who owns batch and is in a better position to review and apply the patch.

Comment by gregn123 [ 09/Nov/16 ]

When the datasource is not up, the console displays:

!An error has occurred
Could not get JobOperator. Check if the Batch DataSource is configured properly and Check if the Database is up and running. Could not get JobOperator. Check if the Batch DataSource is configured properly and Check if the Database is up and running.

See: https://github.com/gregn123/GLASSFISH-21582/blob/master/error_message.jpg

(The repeated error message displayed in the Admin Console is a hangover bug from GlassfishV3, which has never been fixed, and is not related to the bug-fix I'm suggesting here. I'll tackle that problem at a later time...)

Note that my suggested fix makes a difference to the output from the "asadmin list-batch-job-executions" command (reports a failure for this case, rather than success).

Without the fix:

asadmin list-batch-job-executions
Could not get JobOperator.  Check if the Batch DataSource is configured properly and Check if the Database is up and running
Command list-batch-job-executions executed successfully.

With the fix:

asadmin list-batch-job-executions
remote failure: Could not get JobOperator.  Check if the Batch DataSource is configured properly and Check if the Database is up and running
Command list-batch-job-executions failed.




[GLASSFISH-21661] java.lang.IllegalStateException: state.isBusy() : false Created: 19/Jan/17  Updated: 19/Jan/17

Status: Open
Project: glassfish
Component/s: concurrency
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: tc_yopa Assignee: prasads
Resolution: Unresolved Votes: 0
Labels: glassfish, jpa, mysql
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Glass fish 4.4
JPA 2.1
JDK 1.7


Tags: datasource, eclipselink, glassfish-4.1, jpa, mysql

 Description   

Getting below exception,

This occurs randomly, there is no consistent pattern to replicate it, but have observed more occurences of this during load testing cycle.

Error - java.lang.IllegalStateException: state.isBusy() : false
at com.sun.enterprise.resource.pool.ConnectionPool.resourceClosed(ConnectionPool.java:1008) ~[connectors-runtime.jar:?]
at com.sun.enterprise.resource.pool.PoolManagerImpl.putbackResourceToPool(PoolManagerImpl.java:426) ~[connectors-runtime.jar:?]
at com.sun.enterprise.resource.pool.PoolManagerImpl.resourceClosed(PoolManagerImpl.java:380) ~[connectors-runtime.jar:?]
at com.sun.enterprise.resource.listener.LocalTxConnectionEventListener.connectionClosed(LocalTxConnectionEventListener.java:77) ~[?:?]
at com.sun.gjc.spi.ManagedConnectionImpl.connectionClosed(ManagedConnectionImpl.java:783) ~[__ds_jdbc_ra.jar:?]
at com.sun.gjc.spi.base.ConnectionHolder.close(ConnectionHolder.java:217) ~[__ds_jdbc_ra.jar:?]
at com.sun.gjc.spi.jdbc40.ConnectionHolder40.close(ConnectionHolder40.java:587) ~[__ds_jdbc_ra.jar:?]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.closeDatasourceConnection(DatabaseAccessor.java:493) ~[org.eclipse.persistence.core.jar:?]
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.closeConnection(DatasourceAccessor.java:520) ~[org.eclipse.persistence.core.jar:?]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.closeConnection(DatabaseAccessor.java:518) ~[org.eclipse.persistence.core.jar:?]
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.decrementCallCount(DatasourceAccessor.java:290) ~[org.eclipse.persistence.core.jar:?]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.closeStatement(DatabaseAccessor.java:411) ~[org.eclipse.persistence.core.jar:?]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.releaseStatement(DatabaseAccessor.java:1665) ~[org.eclipse.persistence.core.jar:?]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:703) ~[org.eclipse.persistence.core.jar:?]
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:558) ~[org.eclipse.persistence.core.jar:?]
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2002) ~[org.eclipse.persistence.core.jar:?]
at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:570) ~[org.eclipse.persistence.core.jar:?]






[GLASSFISH-21660] Error in allocating a connection Created: 19/Jan/17  Updated: 19/Jan/17

Status: Open
Project: glassfish
Component/s: concurrency
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: tc_yopa Assignee: prasads
Resolution: Unresolved Votes: 0
Labels: glassfish, jdk7, jpa, mysq
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Glassfish 4.1
JPA 2.1
JDK 1.7


Tags: connectionpool, datasource, eclipselink, glassfish-4.1, jdbc, jpa, mysql

 Description   

Getting below exceptions,

[glassfish 4.1] [SEVERE] [poolmgr.system_exception] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource] [tid: _ThreadID=59105 _ThreadName=ajp-listener-1(350)] [timeMillis: 1484746152173] [levelValue: 1000] [[
RAR5031:System Exception
javax.resource.ResourceException: This Managed Connection is not valid as the physical connection is not usable
at com.sun.gjc.spi.ManagedConnectionImpl.checkIfValid(ManagedConnectionImpl.java:756)
at com.sun.gjc.spi.ManagedConnectionImpl.getLocalTransaction(ManagedConnectionImpl.java:531)
at com.sun.enterprise.resource.ConnectorXAResource.getResourceHandle(ConnectorXAResource.java:250)

at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)
]]

[2017-01-18T18:59:12.174+0530] [glassfish 4.1] [SEVERE] [poolmgr.system_exception] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource] [tid: _ThreadID=59105 _ThreadName=ajp-listener-1(350)] [timeMillis: 1484746152174] [levelValue: 1000] [[
RAR5031:System Exception
com.sun.appserv.connectors.internal.api.PoolingException: javax.resource.ResourceException: This Managed Connection is not valid as the physical connection is not usable
at com.sun.enterprise.resource.ConnectorXAResource.getResourceHandle(ConnectorXAResource.java:255)
at com.sun.enterprise.resource.ConnectorXAResource.start(ConnectorXAResource.java:136)
at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.enlistResource(JavaEETransactionManagerSimplified.java:386)

at com.sun.gjc.spi.ManagedConnectionImpl.getLocalTransaction(ManagedConnectionImpl.java:531)
at com.sun.enterprise.resource.ConnectorXAResource.getResourceHandle(ConnectorXAResource.java:250)
... 96 more
]]

[glassfish 4.1] [WARNING] [poolmgr.err_enlisting_res_in_getconn] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool] [tid: _ThreadID=59105 _ThreadName=ajp-listener-1(350)] [timeMillis: 1484746152178] [levelValue: 900] [[
RAR7132: Unable to enlist the resource in transaction. Returned resource to pool. Pool name: [ Mysql_SOTC_Database_Pool ]]]

[2017-01-18T18:59:12.178+0530] [glassfish 4.1] [WARNING] [poolmgr.get_connection_failure] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors] [tid: _ThreadID=59105 _ThreadName=ajp-listener-1(350)] [timeMillis: 1484746152178] [levelValue: 900] [[
RAR5117 : Failed to obtain/create connection from connection pool [ Mysql_SOTC_Database_Pool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException: java.lang.RuntimeException: Got exception during XAResource.start:]]

[2017-01-18T18:59:12.179+0530] [glassfish 4.1] [WARNING] [jdbc.exc_get_conn] [javax.enterprise.resource.resourceadapter.com.sun.gjc.spi] [tid: _ThreadID=59105 _ThreadName=ajp-listener-1(350)] [timeMillis: 1484746152179] [levelValue: 900] [[
RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: java.lang.RuntimeException: Got exception during XAResource.start:]]]

-javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
:Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: java.lang.RuntimeException: Got exception during XAResource.start:
-Error Code: 0

  • at org.eclipse.persistence.internal.jpa.QueryImpl.getDetailedException(QueryImpl.java:378) ~[org.eclipse.persistence.jpa.jar:?]
  • at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:260) ~[org.eclipse.persistence.jpa.jar:?]
  • at org.eclipse.persistence.internal.jpa.QueryImpl.getSingleResult(QueryImpl.java:517) ~[org.eclipse.persistence.jpa.jar:?]
  • at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getSingleResult(EJBQueryImpl.java:400) ~[org.eclipse.persistence.jpa.jar:?]
  • at sun.reflect.GeneratedMethodAccessor6841.invoke(Unknown Source) ~[?:?]
  • at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) [nucleus-grizzly-all.jar:?]
  • at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561) [nucleus-grizzly-all.jar:?]
  • at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) [nucleus-grizzly-all.jar:?]
  • at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) [nucleus-grizzly-all.jar:?]
  • at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) [nucleus-grizzly-all.jar:?]
  • at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) [nucleus-grizzly-all.jar:?]
  • at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565) [nucleus-grizzly-all.jar:?]
  • at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545) [nucleus-grizzly-all.jar:?]
  • at java.lang.Thread.run(Thread.java:745) [?:1.7.0_79]
    -Caused by: org.eclipse.persistence.exceptions.DatabaseException:
    :Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: java.lang.RuntimeException: Got exception during XAResource.start:
    -Error Code: 0
  • at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:316) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:135) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:346) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:307) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:581) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelect(DatasourceCallQueryMechanism.java:281) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.queries.ResultSetMappingQuery.executeDatabaseQuery(ResultSetMappingQuery.java:316) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:798) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1804) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1786) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1751) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:258) ~[org.eclipse.persistence.jpa.jar:?]
  • ... 151 more
    :Caused by: java.sql.SQLException: Error in allocating a connection. Cause: java.lang.RuntimeException: Got exception during XAResource.start:
  • at com.sun.gjc.spi.base.AbstractDataSource.getConnection(AbstractDataSource.java:121) ~[__ds_jdbc_ra.jar:?]
  • at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:123) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:346) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:307) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:581) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1625) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.incrementCallCount(DatasourceAccessor.java:321) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:613) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:558) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelect(DatasourceCallQueryMechanism.java:281) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.queries.ResultSetMappingQuery.executeDatabaseQuery(ResultSetMappingQuery.java:316) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:798) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1804) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1786) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1751) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:258) ~[org.eclipse.persistence.jpa.jar:?]
  • ... 151 more
    :Caused by: javax.resource.spi.ResourceAllocationException: Error in allocating a connection. Cause: java.lang.RuntimeException: Got exception during XAResource.start:
  • at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:319) ~[connectors-runtime.jar:?]
  • at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:196) ~[connectors-runtime.jar:?]
  • at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:171) ~[connectors-runtime.jar:?]
  • at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:166) ~[connectors-runtime.jar:?]
  • at com.sun.gjc.spi.base.AbstractDataSource.getConnection(AbstractDataSource.java:114) ~[__ds_jdbc_ra.jar:?]
  • at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:123) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:346) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:307) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:581) ~[org.eclipse.persistence.core.jar:?]


 Comments   
Comment by tc_yopa [ 19/Jan/17 ]

This occurs randomly, there is no consistent pattern to replicate it, but have observed more occurences of this during load testing cycle





[GLASSFISH-21659] No operations allowed after connection closed Created: 19/Jan/17  Updated: 19/Jan/17

Status: Open
Project: glassfish
Component/s: concurrency
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: tc_yopa Assignee: prasads
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

GlassFish Server 4.1
JDK 1.7
JPA 2.1


Tags: concurrency, connectionpool, datasource, glassfish-4.1, jdbc, jpa

 Description   

Getting below error,
i have set autoReconnect=true
Changed isolation level to ReadCommitted : AppServer
Increased connection pool idle timeout value to 1200 secs from 300 secs
Connection Validation enabled
Still getting below error

-javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
:Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.
-Error Code: 0

  • at org.eclipse.persistence.internal.jpa.QueryImpl.executeUpdate(QueryImpl.java:308) ~[org.eclipse.persistence.jpa.jar:?]
  • at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) [nucleus-grizzly-all.jar:?]
  • at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561) [nucleus-grizzly-all.jar:?]
  • at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) [nucleus-grizzly-all.jar:?]
  • at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) [nucleus-grizzly-all.jar:?]
  • at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) [nucleus-grizzly-all.jar:?]
  • at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) [nucleus-grizzly-all.jar:?]
  • at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565) [nucleus-grizzly-all.jar:?]
  • at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545) [nucleus-grizzly-all.jar:?]
  • at java.lang.Thread.run(Thread.java:745) [?:1.7.0_79]
    -Caused by: org.eclipse.persistence.exceptions.DatabaseException:
    :Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.
    -Error Code: 0
  • at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.processExceptionForCommError(DatabaseAccessor.java:1611) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeNoSelect(DatasourceCallQueryMechanism.java:251) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.queries.DataModifyQuery.executeDatabaseQuery(DataModifyQuery.java:85) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:798) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1804) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1786) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1751) ~[org.eclipse.persistence.core.jar:?]
  • at org.eclipse.persistence.internal.jpa.QueryImpl.executeUpdate(QueryImpl.java:298) ~[org.eclipse.persistence.jpa.jar:?]
  • ... 148 more


 Comments   
Comment by tc_yopa [ 19/Jan/17 ]

This occurs randomly, there is no consistent pattern to replicate it, but have observed more occurences of this during load testing cycle





[GLASSFISH-21521] InvocationTargetException when deploying a web application Created: 02/Mar/16  Updated: 19/Jan/17

Status: In Progress
Project: glassfish
Component/s: classloader, deployment
Affects Version/s: 4.1, 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yama0428 Assignee: Vinay Vishal
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File glassfish-21521.war     Text File server.log     Text File server.log    

 Description   

When I deployed a web application, InvocationTargetException is thrown by WebappClassLoader.

[2016-02-21T08:22:29.848+0900] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=107 _ThreadName=admin-listener(1)] [timeMillis: 1456010549848] [levelValue: 800] [[
  visiting unvisited references]]

[2016-02-21T08:22:29.887+0900] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=107 _ThreadName=admin-listener(1)] [timeMillis: 1456010549887] [levelValue: 800] [[
  visiting unvisited references]]

[2016-02-21T08:22:29.981+0900] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=107 _ThreadName=admin-listener(1)] [timeMillis: 1456010549981] [levelValue: 800] [[
  visiting unvisited references]]

[2016-02-21T08:22:30.085+0900] [glassfish 4.1] [WARNING] [] [javax.enterprise.web.util] [tid: _ThreadID=107 _ThreadName=admin-listener(1)] [timeMillis: 1456010550085] [levelValue: 900] [[
  Failed to check for ThreadLocal references for web application [unknown]
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor200.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	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(Subject.java:360)
	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(Subject.java:360)
	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.GeneratedMethodAccessor135.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	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:151)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:171)
	at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:387)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:331)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:103)
	at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:271)
	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:297)
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254)
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028)
	at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:365)
	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:201)
	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
	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:284)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
	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:565)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
	at java.lang.ThreadLocal$ThreadLocalMap.expungeStaleEntry(ThreadLocal.java:594)
	at java.lang.ThreadLocal$ThreadLocalMap.expungeStaleEntries(ThreadLocal.java:718)
	... 84 more
]]


 Comments   
Comment by Vinay Vishal [ 28/Dec/16 ]

Do you have the sample application which on deploying throws this exception?

Comment by yama0428 [ 28/Dec/16 ]

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.");
    }

}
Comment by Vinay Vishal [ 30/Dec/16 ]

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.

Comment by yama0428 [ 30/Dec/16 ]

I don't know how to attach files to jira.

Comment by Vinay Vishal [ 30/Dec/16 ]

when you click on "More" button on top, you can find option to attach the file. You can also refer to this link

Comment by yama0428 [ 30/Dec/16 ]

Unfortunately, "More" button includes only "Stop Watching", "Create Sub Task", and "Clone".

Comment by Vinay Vishal [ 30/Dec/16 ]

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.

Comment by yama0428 [ 30/Dec/16 ]

https://www.dropbox.com/sh/jad3jh7h0swrhah/AAB-uTMFf195ian3Nbk2xqaBa?dl=0

I uploaded to dropbox.

Comment by Vinay Vishal [ 02/Jan/17 ]

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.

Comment by yama0428 [ 05/Jan/17 ]

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
Comment by Vinay Vishal [ 18/Jan/17 ]

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
Comment by yama0428 [ 18/Jan/17 ]
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.]]





[GLASSFISH-21628] when Server is starting, Deadlock will occurs sometimes Found one Java-level deadlock Created: 30/Nov/16  Updated: 19/Jan/17

Status: Open
Project: glassfish
Component/s: classloader
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: liuj-fnst Assignee: sameerpandit
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

when Server is starting, Deadlock will occurs sometimes
Found one Java-level deadlock:
=============================
"Timer-21":
waiting to lock monitor 0x31ceb894 (object 0x247b1028, a java.lang.Class),
which is held by "pool-1-thread-11"
"pool-1-thread-11":
waiting to lock monitor 0x31efa42c (object 0x0f1f3d00, a com.sun.enterprise.util.ConnectorClassLoader),
which is held by "pool-1-thread-6"
"pool-1-thread-6":
waiting to lock monitor 0x31c0994c (object 0x0efa0458, a com.sun.appserv.server.util.ASURLClassLoader),
which is held by "pool-1-thread-11"

Java stack information for the threads listed above:
===================================================
"Timer-21":
at java.util.logging.Logger.getLogger(Logger.java:321)

  • waiting to lock <0x247b1028> (a java.lang.Class for java.util.logging.Logger)
    at com.sun.jmx.trace.TraceManager.getLogger(TraceManager.java:176)
    at com.sun.jmx.trace.TraceManager.isSelected(TraceManager.java:197)
    at com.sun.jmx.trace.Trace.isSelected(Trace.java:89)
    at javax.management.timer.Timer.isTraceOn(Timer.java:116)
    at javax.management.timer.Timer.sendNotification(Timer.java:1222)
    at javax.management.timer.Timer.notifyAlarmClock(Timer.java:1206)
    at javax.management.timer.TimerAlarmClock.run(Timer.java:1289)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)
    "pool-1-thread-11":
    at com.sun.enterprise.util.ConnectorClassLoader.loadClass(ConnectorClassLoader.java:182)
  • waiting to lock <0x0f1f3d00> (a com.sun.enterprise.util.ConnectorClassLoader)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1482)
    at java.util.ResourceBundle$Control.newBundle(ResourceBundle.java:2289)
    at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1364)
    at java.util.ResourceBundle.findBundle(ResourceBundle.java:1328)
    at java.util.ResourceBundle.findBundle(ResourceBundle.java:1282)
    at java.util.ResourceBundle.findBundle(ResourceBundle.java:1282)
    at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1224)
    at java.util.ResourceBundle.getBundle(ResourceBundle.java:952)
    at java.util.logging.Logger.findResourceBundle(Logger.java:1332)
  • locked <0x05080888> (a java.util.logging.Logger)
    at java.util.logging.Logger.setupResourceInfo(Logger.java:1386)
  • locked <0x05080888> (a java.util.logging.Logger)
    at java.util.logging.Logger.getLogger(Logger.java:367)
  • locked <0x247b1028> (a java.lang.Class for java.util.logging.Logger)
    at com.sun.enterprise.server.logging.BaseLogManager.doInitializeLogger(BaseLogManager.java:125)
    at com.sun.enterprise.server.logging.BaseLogManager.addLogger(BaseLogManager.java:196)
  • locked <0x0efa05b8> (a java.util.ArrayList)
    at java.util.logging.LogManager.demandLogger(LogManager.java:381)
    at java.util.logging.Logger.demandLogger(Logger.java:290)
    at java.util.logging.Logger.getLogger(Logger.java:321)
  • locked <0x247b1028> (a java.lang.Class for java.util.logging.Logger)
    at java.util.jar.Attributes.read(Attributes.java:405)
    at java.util.jar.Manifest.read(Manifest.java:232)
    at java.util.jar.Manifest.<init>(Manifest.java:50)
    at java.util.jar.JarFile.getManifestFromReference(JarFile.java:163)
    at java.util.jar.JarFile.getManifest(JarFile.java:149)
    at sun.misc.URLClassPath$JarLoader$2.getManifest(URLClassPath.java:696)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:228)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
  • locked <0x0efa0458> (a com.sun.appserv.server.util.ASURLClassLoader)
    at com.sun.appserv.server.util.ASURLClassLoader.loadClass(ASURLClassLoader.java:144)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at my.servlet1.init(servlet1.java:31)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1100)
  • locked <0x0fff7dd8> (a org.apache.catalina.core.StandardWrapper)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1023)
  • locked <0x0fff7dd8> (a org.apache.catalina.core.StandardWrapper)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4969)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5376)
  • locked <0x0fe3b7d0> (a com.sun.enterprise.web.WebModule)
    at com.sun.enterprise.web.WebModule.start(WebModule.java:345)
  • locked <0x0fe3b7d0> (a com.sun.enterprise.web.WebModule)
    at com.sun.enterprise.web.LifecycleStarter.doRun(LifecycleStarter.java:58)
    at com.sun.appserv.management.util.misc.RunnableBase.runSync(RunnableBase.java:304)
    at com.sun.appserv.management.util.misc.RunnableBase.run(RunnableBase.java:341)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:662)
    "pool-1-thread-6":
    at java.lang.ClassLoader.loadClass(ClassLoader.java:291)
  • waiting to lock <0x0efa0458> (a com.sun.appserv.server.util.ASURLClassLoader)
    at com.sun.appserv.server.util.ASURLClassLoader.loadClass(ASURLClassLoader.java:144)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
  • locked <0x0f1f3158> (a java.net.URLClassLoader)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at com.sun.enterprise.util.ConnectorClassLoader.loadClass(ConnectorClassLoader.java:187)
  • locked <0x0f1f3d00> (a com.sun.enterprise.util.ConnectorClassLoader)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1482)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:251)
    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:385)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:119)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4521)
  • locked <0x0fe4bc80> (a java.util.HashMap)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5369)
  • locked <0x0fe3bbd0> (a com.sun.enterprise.web.WebModule)
    at com.sun.enterprise.web.WebModule.start(WebModule.java:345)
  • locked <0x0fe3bbd0> (a com.sun.enterprise.web.WebModule)
    at com.sun.enterprise.web.LifecycleStarter.doRun(LifecycleStarter.java:58)
    at com.sun.appserv.management.util.misc.RunnableBase.runSync(RunnableBase.java:304)
    at com.sun.appserv.management.util.misc.RunnableBase.run(RunnableBase.java:341)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:662)

Found 1 deadlock.

In the following cases,

1) deploy many WEB apllications(A,B),and
2)WEB application(A) defined servlet that executed in starting time.eg init method,load-on-startup),and
3)the filter is defined in the WEB application(B),and
4)the Jar that includes the servlet class is defined in Cluster's classpath suffix in WEB application(A),and
5)the filter class puts in WEB—INF in in WEB application(B), and
6)another Jar’s(Y)class is referenced by WEB application(A) also defineds in Server's classpath suffix
7)when the servlet of WEB application(A) is initialized,In the processing of the JDK will output log.※1
※1 this is due to the referenced Jar‘s(Y)MANIFEST.MF that definition is error(Repeat definition) results in outting the ’warning log'.

reason:

1)In the WEB application (A)’s servletini processing, it began to load the Jar (Y) class from ASURLClassLoade,
at this point, the ASURLClassLoader is locked.
2)In the WEB application (B)’s filter processing, due to the delegation mechanism,
it retrievals class from ConnectorClassLoader through WebappClassLoader. At this point, the ConnectorClassLoader is locked.
3)The MANIFEST. MF’s definition in the Web application (A)’s the Jar (Y) is wrong,
lead to the JDK output warning messages, it began to retrieval class from ConnectorClassLoader through WebappClassLoader,making use of the current.
4)In the WEB application (B)’s filter processing, due to the delegation mechanism,
it retrievals class from ASURLClassLoader through ConnectorClassLoader .

so,ASURLClassLoader and ConnectorClassLoader are LOCKED by different threads,then,the deadlock occurs.



 Comments   
Comment by liuj-fnst [ 19/Jan/17 ]

Excuse me,I wanna know the process of this case,please.





[GLASSFISH-21648] corethreads and maxthreads are always zero Created: 21/Dec/16  Updated: 18/Jan/17

Status: Open
Project: glassfish
Component/s: monitoring, web_container
Affects Version/s: 4.1, 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yama0428 Assignee: srinik76
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

corethreads and maxthreads are always zero.
http://localhost:4848/monitoring/domain1/server/network/thread-pool

corethreads

    count : 0
    lastsampletime : -1
    description : Core number of threads in the thread pool
    unit : count
    name : CoreThreads
    starttime : 1482283022005
maxthreads

    count : 0
    lastsampletime : -1
    description : Maximum number of threads allowed in the thread pool
    unit : count
    name : MaxThreads
    starttime : 1482283022005

This is the patch for this problem.
It isn't needed to register ThreadPoolStatsProvider twice.

GlassFishNetworkListener.java
     @Override
     public void start() throws IOException {
         super.start();
     }


 Comments   
Comment by srinik76 [ 18/Jan/17 ]

Fixed the issue and and fix sent to review.





[GLASSFISH-21283] WAR undeployment ends up with .glassfishStaleFiles after upgrading Glassfish 4.0 up to 4.1 Created: 31/Dec/14  Updated: 17/Jan/17

Status: In Progress
Project: glassfish
Component/s: deployment
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: alexander.v.morozov Assignee: Vinay Vishal
Resolution: Unresolved Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 x64 Professional, JDK 7u72 x64


Tags: javaee_ri_target

 Description   

We have simple WAR archive, which contains several jar-files (some of them contains beans.xml) and several classes within WAR, which uses Managed Beans. Our application works well under Glassfish 4.0 and redeployment time takes about 3 seconds.
Once we upgrade Glassfish up to 4.1 (release) - undeployment time dramatically increased up to 40 and more seconds. After that Glassfish creates ".glassfishStaleFiles" which enumerates all JAR-archives with beans.xml. There is no any errors in Glassfish log file. We will try to provide sample application archive a bit later.



 Comments   
Comment by alexander.v.morozov [ 12/Jan/15 ]

Sample project was uploaded to Github https://github.com/shuraa/gf41 .

Comment by Shaifali Kansal [ 12/Jun/15 ]

This bug could not be reproduced locally. I tried to deploy, undeploy and redeploy your sample project multiple times with glassfish 4.1 and everything happened within 2-3 seconds. Also no ".glassfishStaleFiles" were created either.
Can you please check if you're still facing this issue?

Comment by mmariotti [ 13/Jun/15 ]

I confirm this issue is still present.
In particular, GF fails to undeploy and delete jars which contains JSF @ManagedBeans, @EJBs, @Named CDI objects, etc.

I'm using a WAR, not an EAR, and this issue can be reprocuced on every version of windows (I tried 7, 8, 8.1, server 2012).
This is the content of .glassfishStaleFiles:

WEB-INF/
WEB-INF/lib/
WEB-INF/lib/shape-core-3.0.1-SNAPSHOT.jar
WEB-INF/lib/primefaces-5.2.1.jar
WEB-INF/lib/omnifaces-2.0.jar
WEB-INF/lib/atmosphere-runtime-2.3.1.jar

please consider a high priority for this issue, since GF 4.1, in this state, is unusable for development (repeatedly stop-cleanup-start-deploy is too slow, even with JRebel) and for production too (service unavailability is too high)

if you need me to test something, or to give you additional informations, don't hesitate.

Thank you

Comment by davidwinters1980 [ 14/Jun/15 ]

A similar issue to this https://java.net/jira/browse/GLASSFISH-21261 has been fixed on Payara can be downloaded from here: http://payara.co.uk/downloads.

The issue and commits on Payara to fix this issue can be referenced here: https://github.com/payara/Payara/issues/79.

The fix should be already in the latest Glassfish nightly also so can you try on Payara and the latest nightly Glassfish.

If you still get the same issue ..attach the contents of the server log file, the file system details you are deploying the application to on windows (NFS possibly)

Comment by davidwinters1980 [ 14/Jun/15 ]

Also if you could capture a number of thread dumps during the period of time the deployment that takes up to 40 seconds and copy the contents to here or send us a link to your dropbox so that we can download the thread dumps that would be appreciated.

Comment by mmariotti [ 15/Jun/15 ]

Already tried "Payara Server Open Source Edition 4.1.152.1 #badassfish (build 193)";
I don't know SCM revision, but I downloaded it two days ago, and the issue is still present.

In some hour I'll download and test the latest GlassFish nightly, and let you know. If the latest GlassFish is still presenting the issue, I'll provide thread dumps.

I'm not using NFS, but NTFS on a local machine; actually more than one, around 10, and every machine has a local installation, but no shared folder/NFS available to GlassFish, so maybe they are not related.

server.log doesn't contains anything relevant, however you can take it here: http://pastebin.com/6iejkfFc

Comment by mmariotti [ 15/Jun/15 ]

OK, I tried with latest GlassFish nightly, and the issue is still present.

here is the link to a zip file that contains thread dumps, server.log and .glassfishStaleFiles: glassfish_thread_dumps.zip

Thank you

Comment by mmariotti [ 08/Nov/15 ]

Did someone looked into thread dumps? They are there since 5 months already.

Comment by bradvido [ 17/Jan/17 ]

This issue still exists in 4.1.1





[GLASSFISH-21652] ConnectionQueueStatsProvider.java#onTaskQueuedEvent is not counted correctly when there exists plural acceptor threads Created: 26/Dec/16  Updated: 17/Jan/17

Status: In Progress
Project: glassfish
Component/s: monitoring, web_container
Affects Version/s: 3.1.2.2, 4.1, 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yama0428 Assignee: Vinay Vishal
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

ConnectionQueueStatsProvider#onTaskQueuedEvent is not counted correctly when there exists plural acceptor threads.
This is because peakQueuedAtomic.compareAndSet and peakQueued.setCount are not atomic.

This is the patch for this problem.

ConnectionQueueStatsProvider.java
    @ProbeListener("glassfish:kernel:connection-queue:onTaskQueuedEvent")
    public void onTaskQueuedEvent(
            @ProbeParam("listenerName") String listenerName,
            @ProbeParam("task") String taskId) {
        if (name.equals(listenerName)) {
            final int queued = countQueuedAtomic.incrementAndGet();
            countQueued.setCount(queued);

            do {
                final int peakQueue = peakQueuedAtomic.get();
                if (queued <= peakQueue) break;

                synchronized(peakQueuedAtomic) {
                    if (peakQueuedAtomic.compareAndSet(peakQueue, queued)) {
                        peakQueued.setCount(peakQueuedAtomic.get());
                        break;
                    }
                }
            } while (true);

            countTotalQueued.increment();

            incAverageMinute();
        }
    }


 Comments   
Comment by Vinay Vishal [ 16/Jan/17 ]

AtomicInteger is inherently thread safe. Hence, I believe there is no need of synchronization here. In case of multiple acceptor threads, it may be possible that a request has been put in the connection queue by another thread and onTaskQueuedEvent gets called, which probably could have changed the value of peakQueueAtomic and hence out of three fields being set when onTaskQueuedEvent gets called, there is a possibility that peakQueued may have the stale value, since the value stored in "queued " local variable gets set for this field which might would have got changed in interim. Other two fields namely "countQueued" and "countTotalQueued" will have the correct values. We probably can just make this change:

peakQueued.setCount(peakQueuedAtomic.get());

Do you have a test case? If so, can you please provide the same?

Comment by yama0428 [ 17/Jan/17 ]

Assume that two requests are sent simultaneously.

ConnectionQueueStatsProvider.java
    public void onTaskQueuedEvent(
            @ProbeParam("listenerName") String listenerName,
            @ProbeParam("task") String taskId) {
        if (name.equals(listenerName)) {
            final int queued = countQueuedAtomic.incrementAndGet();       //code 1
            countQueued.setCount(queued);                                 //code 2

            do {
                final int peakQueue = peakQueuedAtomic.get();             //code 3
                if (queued <= peakQueue) break;                           //code 4

                if (peakQueuedAtomic.compareAndSet(peakQueue, queued)) {  //code 5
                    peakQueued.setCount(queued);                          //code 6
                    break;
                }
            } while (true);                                               //code 7

            countTotalQueued.increment();

            incAverageMinute();
        }
    }
step thread1 thread2 peakQueuedAtomic peakQueued
1 code1. queued : 1 - 0 0
2 code2. countQueued : 1 - 0 0
3 code3. peakQueue : 0 - 0 0
4 code4. queued <= peakQueue : false - 0 0
5 - code1. queued : 2 0 0
6 - code2. countQueued : 2 0 0
7 - code3. peakQueue : 0 0 0
8 - code4. queued <= peakQueue : false 0 0
9 code5. peakQueuedAtomic.compareAndSet(peakQueue, queued) : true - 0->1 0
10 - code5. peakQueuedAtomic.compareAndSet(peakQueue, queued) : false 1 0
11 - code7. 1 0
12 - code3. peakQueue : 1 1 0
13 - code4. queued <= peakQueue : false 1 0
14 - code5. peakQueuedAtomic.compareAndSet(peakQueue, queued) : true 1->2 0
15 - code6. peakQueued : 2(value of "queued" in thread2 is set) 2 0->2
16 code6. peakQueued :1(value of "queued" in thread1 is set) - 2 2->1

In this case, at step 16, old value is set to peakQueued.

Even if code 6 is the following code,

peakQueued.setCount(peakQueuedAtomic.get());

peakQueued may be old value by the following case.

ConnectionQueueStatsProvider.java (code 6 is changed)
    public void onTaskQueuedEvent(
            @ProbeParam("listenerName") String listenerName,
            @ProbeParam("task") String taskId) {
        if (name.equals(listenerName)) {
            final int queued = countQueuedAtomic.incrementAndGet();       //code 1
            countQueued.setCount(queued);                                 //code 2

            do {
                final int peakQueue = peakQueuedAtomic.get();             //code 3
                if (queued <= peakQueue) break;                           //code 4

                if (peakQueuedAtomic.compareAndSet(peakQueue, queued)) {  //code 5
                    peakQueued.setCount(peakQueuedAtomic.get());          //code 6'
                    break;
                }
            } while (true);                                               //code 7

            countTotalQueued.increment();

            incAverageMinute();
        }
    }
step thread1 thread2 peakQueuedAtomic peakQueued
1 code1. queued : 1 - 0 0
2 code2. countQueued : 1 - 0 0
3 code3. peakQueue : 0 - 0 0
4 code4. queued <= peakQueue : false - 0 0
5 - code1. queued : 2 0 0
6 - code2. countQueued : 2 0 0
7 - code3. peakQueue : 0 0 0
8 - code4. queued <= peakQueue : false 0 0
9 code5. peakQueuedAtomic.compareAndSet(peakQueue, queued) : true - 0->1 0
10 code6'-1. peakQueuedAtomic.get() : 1 - 1 0
11 - code5. peakQueuedAtomic.compareAndSet(peakQueue, queued) : false 1 0
12 - code7. 1 0
13 - code3. peakQueue : 1 1 0
14 - code4. queued <= peakQueue : false 1 0
15 - code5. peakQueuedAtomic.compareAndSet(peakQueue, queued) : true 1->2 0
16 - code6'-1. peakQueuedAtomic.get() : 2 2 0
17 - code6'-2. peakQueued.setCount : 2(value of step 16 is set) 2 0->2
18 code6'-2. peakQueued.setCount : 1(value of step 10 is set) - 2 2->1

I think "peakQueuedAtomic.get()" and "peakQueued.setCount" are not atomic(step 10 - step 18).
So synchronized block is needed.





[GLASSFISH-21584] A new property cannot be added in "Cluster System Properties" page. Created: 09/Nov/16  Updated: 17/Jan/17

Status: Open
Project: glassfish
Component/s: admin_gui
Affects Version/s: 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: tak09 Assignee: pranjal.sahay
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

A new property cannot be added in "Cluster System Properties" page.

Steps to reproduce:
1. Open Admin Console
2. Create a new cluster, e.g. cluster1
3. Click on "cluster1" (to go to "General Information" page) then click on the "Properties" tab (to get to the "Cluster System Properties" page).
4. Click on "Add Property" and enter "myprop" for the Instance Variable Name and "123" for the Override Value, then hit the "Save" button.

=> Page displays message "New values successfully saved." however the table now DOES NOT contain the newly added property.

If the domain.xml is checked, the newly added property has NOT been added to the file.
Below shows where it SHOULD HAVE been added to the file:

<domain>
<clusters>

<cluster ... name="cluster1" ... >

<system-property name="myprop" value="123"></system-property>

We further observe that adding a property with the same name as an existing one or adding a property with no name specified, does not result in any error when the "Save" button is hit (in addition to the fact that the newly added properties are discarded).

Cause:
System properties may be specified for "server" and for cluster instances, using a very similar page.
To see this page for server, click on "server" in the navigation tree, to go to its "General Information" page, then click on the "Properties" tab ("System Properties" page).
To see this page for cluster instances, create a cluster instance, click on the link for it, to go to its "General Information" page, then click on the "Properties" tab ("Instance System Properties" page).
These pages properly support adding new properties, and properly validate the properties (checks for duplicate properties and those with no name specified etc.)

The JSF files which specify the "Save" button actions for Cluster System Properties and Server/Instance System Properties are (respectively):

main\appserver\admingui\cluster\src\main\resources\cluster\clusterSystemPropertiesButtons.jsf

main\appserver\admingui\common\src\main\resources\configuration\systemPropertiesButtons.jsf

If we compare these files, it is apparent that the "clusterSystemPropertiesButtons.jsf" has the following problems:

  • the wrong table column name is being used for the property value (using "row.value" instead of "row.overrideValue")
  • the wrong parameter name for the property map is being used in the gf.restRequest() invocation ("data" instead of "attrs")

Fix:
The following change fixes this bug. "main\appserver\admingui\cluster\src\main\resources\cluster\clusterSystemPropertiesButtons.jsf"

Index: clusterSystemPropertiesButtons.jsf
===================================================================
--- clusterSystemPropertiesButtons.jsf	(revision 64342)
+++ clusterSystemPropertiesButtons.jsf	(working copy)
@@ -44,9 +44,9 @@
         gf.isClusterName(clusterName="#{pageSession.clusterName}" );
         createMap(result="#{requestScope.data}");
         foreach (var="row" list="#{pageSession.tableList}") {
-            mapPut(map="#{requestScope.data}", key="#{row.name}", value="#{row.value}");
+            mapPut(map="#{requestScope.data}", key="#{row.name}", value="#{row.overrideValue}");
         }
-        gf.restRequest(endpoint="#{pageSession.selfUrl}", method="POST", data="#{requestScope.data}", contentType="application/x-www-form-urlencoded", result="#{requestScope.restResponse}");
+        gf.restRequest(endpoint="#{pageSession.selfUrl}", method="POST", attrs="#{requestScope.data}", contentType="application/x-www-form-urlencoded", result="#{requestScope.restResponse}");
         prepareSuccessfulMsg();
         gf.redirect(page="#{pageSession.selfPage}&alertType=${alertType}&alertSummary=${alertSummary}&alertDetail=${alertDetail}");
         />





[GLASSFISH-21560] "asadmin list-logger-levels" does not list java.util.logging.ConsoleHandler Created: 13/Sep/16  Updated: 17/Jan/17

Status: In Progress
Project: glassfish
Component/s: docs
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: webelcomau Assignee: ankur.kathuria
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OS X: Yosemite 10.10.5
NetBeans8.1
Glassfish4.1.1 (and same with Glassfish4.1 or Payara 4.1.1.163)



 Description   

Given as docs component here but may be a bug.

The docs I refer to are:

GlassFish Server Open Source Edition
Administration Guide
Release 4.0

The docs (and the help list-log-levels both give java.util.logging.ConsoleHandler in the output example:

Glassfish4 admin guide:

Example 7–3 Listing Logger Levels for Modules
This example shows a partial list of the existing loggers and their log levels in the
DAS.

asadmin> list-log-levels
javax.enterprise.system.container.cmp <INFO>
javax.enterprise.system.tools.admin <INFO>
java.util.logging.ConsoleHandler <FINEST>
javax.enterprise.system.container.web <INFO>
javax.enterprise.system.util <INFO>
javax.enterprise.resource.webcontainer.jsf.timing <INFO>
javax <INFO>
javax.enterprise.resource.corba <INFO>
...
Command list-log-levels executed successfully.

When I perform this with or without a server target the java.util.logging.ConsoleHandler does not appear:

asadmin> list-log-levels server
ShoalLogger	<CONFIG>
 
 
javax.enterprise.resource.corba	<INFO>
javax.enterprise.resource.javamail	<INFO>
javax.enterprise.resource.jdo	<INFO>
javax.enterprise.resource.jms	<INFO>
javax.enterprise.resource.jta	<INFO>
javax.enterprise.resource.resourceadapter	<INFO>
...

I can change it in the domain1/domain/config/logging.properties, but then I have to restart:

$ grep Console /Applications/NetBeans-8.1/glassfish-4.1.1/glassfish/domains/domain1/config/logging.properties 
 
handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.formatter=com.sun.enterprise.server.logging.UniformLogFormatter
com.sun.enterprise.server.logging.GFFileHandler.logtoConsole=false
java.util.logging.ConsoleHandler.level=FINEST

This executes without error but does not seem to do anything, and the Console logger still does not appear in the list:

Example 7–5 Changing the Global Log Level for All Module Loggers

By setting the log level of the ConsoleHandler, you set the global log level for all
loggers. This example sets the global log level in the DAS to INFO:

asadmin> set-log-levels java.util.logging.ConsoleHandler=INFO
java.util.logging.ConsoleHandler package set with log level INFO.
These logging levels are set for server.
Command set-log-levels executed successfully.


 Comments   
Comment by yama0428 [ 31/Oct/16 ]

This is because logger name which includes "Handler" is excluded for the result of asadmin list-log-levels command by the following source code.
At least, it is strange because empty lines are displayed by asadmin list-log-levels command.
I think the following patch are needed if "Handler" is excluded for the result.

ListLoggerLevels.java execute(AdminCommandContext context)
            while (it2.hasNext()) {
                String name = it2.next();
                if (name.endsWith(".level") && !name.equals(".level")) {
-                   final ActionReport.MessagePart part = report.getTopMessagePart()
-                           .addChild();
                    String n = name.substring(0, name.lastIndexOf(".level"));
                    if (n.endsWith("Handler")) {
                        continue;
                    }
+                   final ActionReport.MessagePart part = report.getTopMessagePart()
+                           .addChild();
                    part.setMessage(n + "\t" + "<" + (String) props.get(name) + ">");
                    logLevelMap.put(n, props.get(name)); //Needed for REST xml and JSON output
                    loggerList.add(n); //Needed for REST xml and JSON output                    




[GLASSFISH-21483] "Connection closed" ConnectionHolder.checkValidity Created: 14/Jan/16  Updated: 16/Jan/17

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1.2, 3.1.2.2, 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: joyli Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

We have problem,used the prepareStatement database connection to get the getMetaData,
“Initial and Minimum Pool Size:” 、“Maximum Pool Size:” and “Statement Cache Size:” are 1,
code:
DataSource dn = (DataSource) initContext.lookup("DB");
Connection ccon = dn.getConnection();
PrepareStatement pstam = ccon.prepareStatement(sql);
ResultSet rs = pstam.executeQuery();
pstam.getConnection().getMetaData();

the concurrent situation,appear:
java.sql.SQLException: Connection closed
at com.sun.gjc.spi.base.ConnectionHolder.checkValidity(ConnectionHolder.java:774)
at com.sun.gjc.spi.base.ConnectionHolder.getMetaData(ConnectionHolder.java:388)
at com.sun.gjc.spi.jdbc40.ConnectionWrapper40.getMetaData(ConnectionWrapper40.java:114)
at jdbc1.Servese1.serverdd(Servese1.java:122)
at jdbc1.Servese1.doGet(Servese1.java:58)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:286)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:336)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:236)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:619)



 Comments   
Comment by Yamini K B [ 16/Jan/17 ]

Are you still facing this problem? If yes, please provide exact steps to reproduce the issue.





[GLASSFISH-21512] cluster glassfish istance and deploy application jdbc/__TimerPool' Created: 06/Feb/16  Updated: 16/Jan/17

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: 4.1
Fix Version/s: None

Type: Task Priority: Major
Reporter: nickyfulls Assignee: Yamini K B
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I have create the cluster and deploy my application example.ear and I get

Log server: http://paste.debian.net/378868

Log instance coo1: https://justpaste.it/r661

How do I fix?

[2016-02-06T14:38:19.840+0100] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=22 _ThreadName=Thread-9] [timeMillis: 1454765899840] [levelValue: 1000] [[
java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for 'jdbc/__TimerPool' in SerialContext[myEnv=

{com.sun.enterprise.connectors.jndisuffix=__pm, java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NameNotFoundException: __TimerPool not found]
at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:111)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:142)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:107)
at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:223)
at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510)
at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:230)
at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:434)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.deployEJBTimerService(PersistentEJBTimerService.java:1464)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.initEJBTimerService(PersistentEJBTimerService.java:1370)
at org.glassfish.ejb.persistent.timer.DistributedEJBTimerService.initPersistentTimerService(DistributedEJBTimerService.java:98)
at com.sun.ejb.containers.EJBTimerService.initEJBTimerService(EJBTimerService.java:230)
at com.sun.ejb.containers.EJBTimerService.getEJBTimerService(EJBTimerService.java:205)
at com.sun.ejb.containers.EJBTimerService.getEJBTimerService(EJBTimerService.java:187)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:825)
at com.sun.ejb.containers.AbstractSingletonContainer.<init>(AbstractSingletonContainer.java:127)
at com.sun.ejb.containers.CMCSingletonContainer.<init>(CMCSingletonContainer.java:76)
at com.sun.ejb.containers.SingletonContainerFactory.createContainer(SingletonContainerFactory.java:68)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:406)
at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:243)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:326)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:374)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:228)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:85)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2072)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:88)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1213)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.naming.NamingException: Lookup failed for 'jdbc/__TimerPool' in SerialContext[myEnv={com.sun.enterprise.connectors.jndisuffix=__pm, java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming}

[Root exception is javax.naming.NameNotFoundException: __TimerPool not found]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:491)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at org.glassfish.resourcebase.resources.naming.ResourceNamingService.lookup(ResourceNamingService.java:236)
at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.lookup(ConnectorResourceAdminServiceImpl.java:224)
at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:511)
at org.glassfish.persistence.common.PersistenceHelper.lookupPMResource(PersistenceHelper.java:63)
at org.glassfish.persistence.jpa.ProviderContainerContractInfoBase.lookupDataSource(ProviderContainerContractInfoBase.java:71)
at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:108)
... 40 more
Caused by: javax.naming.NameNotFoundException: __TimerPool not found
at com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientContext.java:237)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:204)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:208)
at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:66)
at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:114)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:478)
... 49 more]]

[2016-02-06T14:38:19.845+0100] [glassfish 4.1] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=22 _ThreadName=RunLevelControllerThread-1454765883971] [timeMillis: 1454765899845] [levelValue: 1000] [[
Exception while preparing the app]]

[2016-02-06T14:38:19.847+0100] [glassfish 4.1] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=22 _ThreadName=RunLevelControllerThread-1454765883971] [timeMillis: 1454765899847] [levelValue: 1000] [[
Exception during lifecycle processing
java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for 'jdbc/__TimerPool' in SerialContext[myEnv=

{com.sun.enterprise.connectors.jndisuffix=__pm, java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NameNotFoundException: __TimerPool not found]
at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:111)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:142)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:107)
at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:223)
at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510)
at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:230)
at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:434)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.deployEJBTimerService(PersistentEJBTimerService.java:1464)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.initEJBTimerService(PersistentEJBTimerService.java:1370)
at org.glassfish.ejb.persistent.timer.DistributedEJBTimerService.initPersistentTimerService(DistributedEJBTimerService.java:98)
at com.sun.ejb.containers.EJBTimerService.initEJBTimerService(EJBTimerService.java:230)
at com.sun.ejb.containers.EJBTimerService.getEJBTimerService(EJBTimerService.java:205)
at com.sun.ejb.containers.EJBTimerService.getEJBTimerService(EJBTimerService.java:187)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:825)
at com.sun.ejb.containers.AbstractSingletonContainer.<init>(AbstractSingletonContainer.java:127)
at com.sun.ejb.containers.CMCSingletonContainer.<init>(CMCSingletonContainer.java:76)
at com.sun.ejb.containers.SingletonContainerFactory.createContainer(SingletonContainerFactory.java:68)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:406)
at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:243)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:326)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:374)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:228)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:85)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2072)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:88)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1213)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.naming.NamingException: Lookup failed for 'jdbc/__TimerPool' in SerialContext[myEnv={com.sun.enterprise.connectors.jndisuffix=__pm, java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming}

[Root exception is javax.naming.NameNotFoundException: __TimerPool not found]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:491)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at org.glassfish.resourcebase.resources.naming.ResourceNamingService.lookup(ResourceNamingService.java:236)
at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.lookup(ConnectorResourceAdminServiceImpl.java:224)
at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:511)
at org.glassfish.persistence.common.PersistenceHelper.lookupPMResource(PersistenceHelper.java:63)
at org.glassfish.persistence.jpa.ProviderContainerContractInfoBase.lookupDataSource(ProviderContainerContractInfoBase.java:71)
at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:108)
... 40 more
Caused by: javax.naming.NameNotFoundException: __TimerPool not found
at com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientContext.java:237)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:204)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:208)
at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:66)
at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:114)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:478)
... 49 more
]]

[2016-02-06T14:38:19.891+0100] [glassfish 4.1] [WARNING] [] [javax.enterprise.system.container.ejb.org.glassfish.ejb.persistent.timer] [tid: _ThreadID=22 _ThreadName=RunLevelControllerThread-1454765883971] [timeMillis: 1454765899891] [levelValue: 900] [[
Cannot deploy or load EJBTimerService:
java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for 'jdbc/__TimerPool' in SerialContext[myEnv=

{com.sun.enterprise.connectors.jndisuffix=__pm, java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NameNotFoundException: __TimerPool not found]
at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:111)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:142)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:107)
at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:223)
at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510)
at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:230)
at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:434)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.deployEJBTimerService(PersistentEJBTimerService.java:1464)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.initEJBTimerService(PersistentEJBTimerService.java:1370)
at org.glassfish.ejb.persistent.timer.DistributedEJBTimerService.initPersistentTimerService(DistributedEJBTimerService.java:98)
at com.sun.ejb.containers.EJBTimerService.initEJBTimerService(EJBTimerService.java:230)
at com.sun.ejb.containers.EJBTimerService.getEJBTimerService(EJBTimerService.java:205)
at com.sun.ejb.containers.EJBTimerService.getEJBTimerService(EJBTimerService.java:187)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:825)
at com.sun.ejb.containers.AbstractSingletonContainer.<init>(AbstractSingletonContainer.java:127)
at com.sun.ejb.containers.CMCSingletonContainer.<init>(CMCSingletonContainer.java:76)
at com.sun.ejb.containers.SingletonContainerFactory.createContainer(SingletonContainerFactory.java:68)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:406)
at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:243)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:326)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:374)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:228)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:85)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2072)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:88)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1213)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.naming.NamingException: Lookup failed for 'jdbc/__TimerPool' in SerialContext[myEnv={com.sun.enterprise.connectors.jndisuffix=__pm, java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming}

[Root exception is javax.naming.NameNotFoundException: __TimerPool not found]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:491)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at org.glassfish.resourcebase.resources.naming.ResourceNamingService.lookup(ResourceNamingService.java:236)
at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.lookup(ConnectorResourceAdminServiceImpl.java:224)
at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:511)
at org.glassfish.persistence.common.PersistenceHelper.lookupPMResource(PersistenceHelper.java:63)
at org.glassfish.persistence.jpa.ProviderContainerContractInfoBase.lookupDataSource(ProviderContainerContractInfoBase.java:71)
at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:108)
... 40 more
Caused by: javax.naming.NameNotFoundException: __TimerPool not found
at com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientContext.java:237)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:204)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:208)
at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:66)
at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:114)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:478)
... 49 more
]]



 Comments   
Comment by Yamini K B [ 16/Jan/17 ]

Is the problem still seen?

Please check the note on page 8-5:
https://glassfish.java.net/docs/4.0/application-development-guide.pdf





[GLASSFISH-21649] countqueued1minuteaverage does not count the value for one minute Created: 22/Dec/16  Updated: 16/Jan/17

Status: Open
Project: glassfish
Component/s: monitoring, web_container
Affects Version/s: 3.1.2.2, 4.1, 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yama0428 Assignee: srinik76
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

countqueued1minuteaverage does not count the value for one minute.

http://localhost:4848/monitoring/domain1/server/network/http-listener-1/connection-queue/countqueued1minuteaverage

    countqueued1minuteaverage
        count : 0
        lastsampletime : 1482364980659
        description : Average number of connections queued in the last 1 minute
        unit : count
        name : CountQueued1MinuteAverage
        starttime : 1482364980659

It depends on the time when the REST request is sent.
Counter for countqueued1minuteaverage is reset at 0 second per minute.

This is the patch for this problem.

ConnectionQueueStatsProvider.java
    protected int getAverageBy(int mins) {
        synchronized(averageStatsPerMinute) {
            final long currentTime = System.currentTimeMillis();
            if (currentTime - averageLastShift >= MINUTE) {
                shiftAverage(currentTime);
            }

            int result = 0;
            final int statsToCount = Math.min(mins, averageStatsPerMinute.length);
            for(int i = 0; i < statsToCount; i++) {
                result += averageStatsPerMinute[i];
            }

            return result;
        }
    }





[GLASSFISH-21658] Message.getAllRecipients() can return null Created: 16/Jan/17  Updated: 16/Jan/17

Status: Open
Project: glassfish
Component/s: OSGi-JavaEE
Affects Version/s: not determined
Fix Version/s: None

Type: Bug Priority: Trivial
Reporter: jira-mailx Assignee: Sanjeeb Sahoo
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)
Microsoft Windows [Version 6.1.7601]


Tags: javaee, mail

 Description   

The following optimization in Message.getAllRecipients() returns null when main, cc and bcc is null.

{{
if (cc == null && bcc == null)
return to; // a common case
}}

In all other cases a list is returned. Returning null leads to NullPointerExceptions, for example in SMTPTransport.sendMessage(Message, Address[]).

Last worked in version 8u92

Expected: new Address[0]

This bug can be reproduced always.






[GLASSFISH-21646] countbytesreceived and countbytestransmitted count the value of requests to admin-listener Created: 21/Dec/16  Updated: 16/Jan/17

Status: In Progress
Project: glassfish
Component/s: monitoring, web_container
Affects Version/s: 4.1, 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yama0428 Assignee: srinik76
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Even if request are not sent to web applications,
countbytesreceived and countbytestransmitted are not zero.

http://localhost:4848/monitoring/domain1/server/http-service/server/request/countbytesreceived

countbytesreceived

    count : 1013
    lastsampletime : 1482281113361
    description : The number of bytes received
    unit : count
    name : CountBytesReceived
    starttime : 1482281097714

This is because HttpServiceStatsProvider does not check the virtual server.
This is the patch for this problem.

HttpServiceStatsProvider.java
    @ProbeListener("glassfish:web:http-service:dataReceivedEvent")
    public void dataReceivedEvent(
        @ProbeParam("size") int size,
        @ProbeParam("hostName") String hostName) {
        if ((hostName != null) && (hostName.equals(virtualServerName))) {
            countBytesReceived.increment(size);
        }
    }

    @ProbeListener("glassfish:web:http-service:dataSentEvent")
    public void dataSentEvent(
        @ProbeParam("size") long size,
        @ProbeParam("hostName") String hostName) {
        if ((hostName != null) && (hostName.equals(virtualServerName))) {
            countBytesTransmitted.increment(size);
        }
    }
RequestProbeProvider.java
    @Probe(name="dataReceivedEvent")
    public void dataReceivedEvent(
        @ProbeParam("size") int size,
        @ProbeParam("hostName") String hostName) {}

    @Probe(name="dataSentEvent")
    public void dataSentEvent(
        @ProbeParam("size") long size,
        @ProbeParam("hostName") String hostName) {}
VirtualServer.java#addProbes(boolean globalAccessLoggingEnabled)
                    grizzlyListener.getTransport().getConnectionMonitoringConfig().addProbes(new ConnectionProbe.Adapter() {

                        RequestProbeProvider requestProbeProvider = webContainer.getRequestProbeProvider();

                        @Override
                        public void onReadEvent(Connection connection, Buffer data, int size) {
                            if (requestProbeProvider != null) {
                                requestProbeProvider.dataReceivedEvent(size, _id);
                            }
                        }

                        @Override
                        public void onWriteEvent(Connection connection, Buffer data, long size) {
                            if (requestProbeProvider != null) {
                                requestProbeProvider.dataSentEvent(size, _id);
                            }
                        }
                    });



 Comments   
Comment by srinik76 [ 16/Jan/17 ]

Fix generated as per the patch provided in the bug. The attributes are not getting counted when requests are not sent to web applications.

Review generated and sent to the group for review request.





[GLASSFISH-21478] Output written in the servlet response writer after dispatch.include() get lost Created: 03/Jan/16  Updated: 13/Jan/17

Status: Open
Project: glassfish
Component/s: web_container
Affects Version/s: 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: stoyants Assignee: Shing Wai Chan
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 10, Java jdk1.8.0_66, MS Edge & Chrome


Tags: dispatch, servlet

 Description   

Servlet is supposed to be able to continue to write in the output stream after dispatcher.include(request, response); (as opposite to dispatcher.forward(request, response))
While not throwing any exception or showing that anything went wrong, glassfish just does not deliver what is written to the client.
The same was tested under other Application servers and works as expected.
Issue is very easy to reproduce and test code, that shows the problem can be provided.



 Comments   
Comment by Yamini K B [ 13/Jan/17 ]

Can you please attach a reproducible test case?





[GLASSFISH-21472] In an attempt to create a new resource is obtained java.lang.RuntimeException Created: 01/Dec/15  Updated: 13/Jan/17

Status: Open
Project: glassfish
Component/s: jsf
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: mcwolf Assignee: sumasri
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

In an attempt to create a new resource is obtained java.lang.RuntimeException

Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty

Linux mcwolf-VirtualBox 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:18:00 UTC 2015 i686 i686 i686 GNU/Linux

java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) Client VM (build 25.65-b01, mixed mode)



 Comments   
Comment by mcwolf [ 01/Dec/15 ]

[2015-12-01T12:09:05.063+0200] [] [INFO] [NCLS-GFLAUNCHER-00005] [javax.enterprise.launcher] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1448964545063] [levelValue: 800] [[
JVM invocation command line:
/home/mcwolf/jdk1.8.0_65/bin/java
-cp
/home/mcwolf/glassfish4/glassfish/modules/glassfish.jar
-XX:+UnlockDiagnosticVMOptions
-XX:NewRatio=2
-XX:MaxPermSize=192m
-Xmx512m
-javaagent:/home/mcwolf/glassfish4/glassfish/lib/monitor/flashlight-agent.jar
-client
-Djavax.xml.accessExternalSchema=all
-Djavax.net.ssl.trustStore=/home/mcwolf/glassfish4/glassfish/domains/domain1/config/cacerts.jks
-Djdk.corba.allowOutputStreamSubclass=true
-Dfelix.fileinstall.dir=/home/mcwolf/glassfish4/glassfish/modules/autostart/
-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.shell.remote,org.apache.felix.fileinstall
-Dcom.sun.aas.installRoot=/home/mcwolf/glassfish4/glassfish
-Dfelix.fileinstall.poll=5000
-Djava.endorsed.dirs=/home/mcwolf/glassfish4/glassfish/modules/endorsed:/home/mcwolf/glassfish4/glassfish/lib/endorsed
-Djava.security.policy=/home/mcwolf/glassfish4/glassfish/domains/domain1/config/server.policy
-Dosgi.shell.telnet.maxconn=1
-Dfelix.fileinstall.bundles.startTransient=true
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Dfelix.fileinstall.log.level=2
-Djavax.net.ssl.keyStore=/home/mcwolf/glassfish4/glassfish/domains/domain1/config/keystore.jks
-Djava.security.auth.login.config=/home/mcwolf/glassfish4/glassfish/domains/domain1/config/login.conf
-Dfelix.fileinstall.disableConfigSave=false
-Dfelix.fileinstall.bundles.new.start=true
-Dcom.sun.aas.instanceRoot=/home/mcwolf/glassfish4/glassfish/domains/domain1
-Dosgi.shell.telnet.port=6666
Dgosh.args=-nointeractive
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
-Dosgi.shell.telnet.ip=127.0.0.1
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Djava.awt.headless=true
-Dcom.ctc.wstx.returnNullForDefaultNamespace=true
-Djava.ext.dirs=/home/mcwolf/jdk1.8.0_65/lib/ext:/home/mcwolf/jdk1.8.0_65/jre/lib/ext:/home/mcwolf/glassfish4/glassfish/domains/domain1/lib/ext
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Djava.library.path=/home/mcwolf/glassfish4/glassfish/lib:/usr/java/packages/lib/i386:/lib:/usr/lib
com.sun.enterprise.glassfish.bootstrap.ASMain
-upgrade
false
-domaindir
/home/mcwolf/glassfish4/glassfish/domains/domain1
-read-stdin
true
-asadmin-args
-host,,,localhost,,,port,,,4848,,,secure=false,,,terse=false,,,echo=false,,,interactive=true,,,start-domain,,,verbose=false,,,watchdog=false,,,debug=false,,,-domaindir,,,/home/mcwolf/glassfish4/glassfish/domains,,,domain1
-domainname
domain1
-instancename
server
-type
DAS
-verbose
false
-asadmin-classpath
/home/mcwolf/glassfish4/glassfish/lib/client/appserver-cli.jar
-debug
false
-asadmin-classname
com.sun.enterprise.admin.cli.AdminMain]]

[2015-12-01T12:09:14.335+0200] [glassfish 4.1] [INFO] [NCLS-LOGGING-00009] [javax.enterprise.logging] [tid: _ThreadID=14 _ThreadName=RunLevelControllerThread-1448964553841] [timeMillis: 1448964554335] [levelValue: 800] [[
Running GlassFish Version: GlassFish Server Open Source Edition 4.1.1 (build 1)]]

[2015-12-01T12:09:14.339+0200] [glassfish 4.1] [INFO] [NCLS-LOGGING-00010] [javax.enterprise.logging] [tid: _ThreadID=14 _ThreadName=RunLevelControllerThread-1448964553841] [timeMillis: 1448964554339] [levelValue: 800] [[
Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter]]

[2015-12-01T12:09:14.623+0200] [glassfish 4.1] [INFO] [NCLS-SECURITY-01115] [javax.enterprise.system.core.security] [tid: _ThreadID=13 _ThreadName=RunLevelControllerThread-1448964553837] [timeMillis: 1448964554623] [levelValue: 800] [[
Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.]]

[2015-12-01T12:09:14.632+0200] [glassfish 4.1] [INFO] [NCLS-SECURITY-01115] [javax.enterprise.system.core.security] [tid: _ThreadID=13 _ThreadName=RunLevelControllerThread-1448964553837] [timeMillis: 1448964554632] [levelValue: 800] [[
Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.]]

[2015-12-01T12:09:14.639+0200] [glassfish 4.1] [INFO] [NCLS-SECURITY-01115] [javax.enterprise.system.core.security] [tid: _ThreadID=13 _ThreadName=RunLevelControllerThread-1448964553837] [timeMillis: 1448964554639] [levelValue: 800] [[
Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.]]

[2015-12-01T12:09:15.139+0200] [glassfish 4.1] [INFO] [SEC-SVCS-00100] [javax.enterprise.security.services] [tid: _ThreadID=21 _ThreadName=RunLevelControllerThread-1448964554735] [timeMillis: 1448964555139] [levelValue: 800] [[
Authorization Service has successfully initialized.]]

[2015-12-01T12:09:15.534+0200] [glassfish 4.1] [INFO] [] [org.glassfish.ha.store.spi.BackingStoreFactoryRegistry] [tid: _ThreadID=21 _ThreadName=RunLevelControllerThread-1448964554735] [timeMillis: 1448964555534] [levelValue: 800] [[
Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry]]

[2015-12-01T12:09:15.819+0200] [glassfish 4.1] [WARNING] [] [org.glassfish.grizzly.config.Utils] [tid: _ThreadID=14 _ThreadName=RunLevelControllerThread-1448964553841] [timeMillis: 1448964555819] [levelValue: 900] [[
Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-1, realClassName=org.glassfish.grizzly.http2.Http2AddOn]]

[2015-12-01T12:09:15.938+0200] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=14 _ThreadName=RunLevelControllerThread-1448964553841] [timeMillis: 1448964555938] [levelValue: 800] [[
Grizzly Framework 2.3.23 started in: 62ms - bound to [/0.0.0.0:8080]]]

[2015-12-01T12:09:16.005+0200] [glassfish 4.1] [WARNING] [] [org.glassfish.grizzly.config.Utils] [tid: _ThreadID=14 _ThreadName=RunLevelControllerThread-1448964553841] [timeMillis: 1448964556005] [levelValue: 900] [[
Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-2, realClassName=org.glassfish.grizzly.http2.Http2AddOn]]

[2015-12-01T12:09:16.020+0200] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=14 _ThreadName=RunLevelControllerThread-1448964553841] [timeMillis: 1448964556020] [levelValue: 800] [[
Grizzly Framework 2.3.23 started in: 8ms - bound to [/0.0.0.0:8181]]]

[2015-12-01T12:09:16.025+0200] [glassfish 4.1] [WARNING] [] [org.glassfish.grizzly.config.Utils] [tid: _ThreadID=14 _ThreadName=RunLevelControllerThread-1448964553841] [timeMillis: 1448964556025] [levelValue: 900] [[
Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=admin-listener, realClassName=org.glassfish.grizzly.http2.Http2AddOn]]

[2015-12-01T12:09:16.030+0200] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=14 _ThreadName=RunLevelControllerThread-1448964553841] [timeMillis: 1448964556030] [levelValue: 800] [[
Grizzly Framework 2.3.23 started in: 1ms - bound to [/0.0.0.0:4848]]]

[2015-12-01T12:09:16.082+0200] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=14 _ThreadName=RunLevelControllerThread-1448964553841] [timeMillis: 1448964556082] [levelValue: 800] [[
Grizzly Framework 2.3.23 started in: 1ms - bound to [/0.0.0.0:3700]]]

[2015-12-01T12:09:16.086+0200] [glassfish 4.1] [INFO] [NCLS-CORE-00017] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1448964556086] [levelValue: 800] [[
GlassFish Server Open Source Edition 4.1.1 (1) startup time : Felix (7,918ms), startup services(2,260ms), total(10,178ms)]]

[2015-12-01T12:09:16.723+0200] [glassfish 4.1] [INFO] [jts.startup_msg] [javax.enterprise.system.core.transaction.com.sun.jts.CosTransactions] [tid: _ThreadID=15 _ThreadName=RunLevelControllerThread-1448964553867] [timeMillis: 1448964556723] [levelValue: 800] [[
JTS5014: Recoverable JTS instance, serverId = [100]]]

[2015-12-01T12:09:17.426+0200] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=13 _ThreadName=RunLevelControllerThread-1448964553837] [timeMillis: 1448964557426] [levelValue: 800] [[
Grizzly Framework 2.3.23 started in: 14ms - bound to [/0.0.0.0:7676]]]

[2015-12-01T12:09:17.547+0200] [glassfish 4.1] [INFO] [NCLS-JMX-00005] [javax.enterprise.system.jmx] [tid: _ThreadID=51 _ThreadName=Thread-15] [timeMillis: 1448964557547] [levelValue: 800] [[
JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://mcwolf-VirtualBox:8686/jndi/rmi://mcwolf-VirtualBox:8686/jmxrmi]]

[2015-12-01T12:09:20.377+0200] [glassfish 4.1] [INFO] [] [org.hibernate.validator.internal.util.Version] [tid: _ThreadID=40 _ThreadName=admin-listener(1)] [timeMillis: 1448964560377] [levelValue: 800] [[
HV000001: Hibernate Validator 5.1.2.Final]]

[2015-12-01T12:09:22.759+0200] [glassfish 4.1] [INFO] [NCLS-REST-00001] [javax.enterprise.admin.rest] [tid: _ThreadID=40 _ThreadName=admin-listener(1)] [timeMillis: 1448964562759] [levelValue: 800] [[
Listening to REST requests at context: /management/domain.]]

[2015-12-01T12:09:22.961+0200] [glassfish 4.1] [INFO] [NCLS-BOOTSTRAP-00027] [javax.enterprise.bootstrap] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1448964562961] [levelValue: 800] [[
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@c83fc8 as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@95ab4.]]

[2015-12-01T12:09:23.813+0200] [glassfish 4.1] [WARNING] [] [org.glassfish.grizzly.config.Utils] [tid: _ThreadID=72 _ThreadName=pool-10-thread-1] [timeMillis: 1448964563813] [levelValue: 900] [[
Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-1, realClassName=org.glassfish.grizzly.http2.Http2AddOn]]

[2015-12-01T12:09:23.922+0200] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=72 _ThreadName=pool-10-thread-1] [timeMillis: 1448964563922] [levelValue: 800] [[
Grizzly Framework 2.3.23 started in: 51ms - bound to [/0.0.0.0:8080]]]

[2015-12-01T12:09:23.933+0200] [glassfish 4.1] [WARNING] [] [org.glassfish.grizzly.config.Utils] [tid: _ThreadID=72 _ThreadName=pool-10-thread-1] [timeMillis: 1448964563933] [levelValue: 900] [[
Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-2, realClassName=org.glassfish.grizzly.http2.Http2AddOn]]

[2015-12-01T12:09:24.059+0200] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=72 _ThreadName=pool-10-thread-1] [timeMillis: 1448964564059] [levelValue: 800] [[
Grizzly Framework 2.3.23 started in: 88ms - bound to [/0.0.0.0:8181]]]

[2015-12-01T12:09:24.740+0200] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=75 _ThreadName=Thread-20] [timeMillis: 1448964564740] [levelValue: 800] [[
visiting unvisited references]]

[2015-12-01T12:09:26.582+0200] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00198] [javax.enterprise.web] [tid: _ThreadID=75 _ThreadName=Thread-20] [timeMillis: 1448964566582] [levelValue: 800] [[
Created HTTP listener http-listener-1 on host/port 0.0.0.0:8080]]

[2015-12-01T12:09:26.613+0200] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00198] [javax.enterprise.web] [tid: _ThreadID=75 _ThreadName=Thread-20] [timeMillis: 1448964566613] [levelValue: 800] [[
Created HTTP listener http-listener-2 on host/port 0.0.0.0:8181]]

[2015-12-01T12:09:26.616+0200] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00198] [javax.enterprise.web] [tid: _ThreadID=75 _ThreadName=Thread-20] [timeMillis: 1448964566616] [levelValue: 800] [[
Created HTTP listener admin-listener on host/port 0.0.0.0:4848]]

[2015-12-01T12:09:26.701+0200] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00200] [javax.enterprise.web] [tid: _ThreadID=75 _ThreadName=Thread-20] [timeMillis: 1448964566701] [levelValue: 800] [[
Created virtual server server]]

[2015-12-01T12:09:26.713+0200] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00200] [javax.enterprise.web] [tid: _ThreadID=75 _ThreadName=Thread-20] [timeMillis: 1448964566713] [levelValue: 800] [[
Created virtual server __asadmin]]

[2015-12-01T12:09:27.473+0200] [glassfish 4.1] [INFO] [AS-WEB-CORE-00306] [javax.enterprise.web.core] [tid: _ThreadID=75 _ThreadName=Thread-20] [timeMillis: 1448964567473] [levelValue: 800] [[
Setting JAAS app name glassfish-web]]

[2015-12-01T12:09:27.480+0200] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00201] [javax.enterprise.web] [tid: _ThreadID=75 _ThreadName=Thread-20] [timeMillis: 1448964567480] [levelValue: 800] [[
Virtual server server loaded default web module ]]

[2015-12-01T12:09:28.604+0200] [glassfish 4.1] [INFO] [NCLS-SECURITY-01002] [javax.enterprise.system.core.security] [tid: _ThreadID=75 _ThreadName=Thread-20] [timeMillis: 1448964568604] [levelValue: 800] [[
Java security manager is disabled.]]

[2015-12-01T12:09:28.605+0200] [glassfish 4.1] [INFO] [NCLS-SECURITY-01010] [javax.enterprise.system.core.security] [tid: _ThreadID=75 _ThreadName=Thread-20] [timeMillis: 1448964568605] [levelValue: 800] [[
Entering Security Startup Service.]]

[2015-12-01T12:09:28.626+0200] [glassfish 4.1] [INFO] [NCLS-SECURITY-01143] [javax.enterprise.system.core.security] [tid: _ThreadID=75 _ThreadName=Thread-20] [timeMillis: 1448964568626] [levelValue: 800] [[
Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.]]

[2015-12-01T12:09:28.843+0200] [glassfish 4.1] [INFO] [NCLS-SECURITY-01011] [javax.enterprise.system.core.security] [tid: _ThreadID=75 _ThreadName=Thread-20] [timeMillis: 1448964568843] [levelValue: 800] [[
Security Service(s) started successfully.]]

[2015-12-01T12:09:30.125+0200] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=75 _ThreadName=Thread-20] [timeMillis: 1448964570125] [levelValue: 800] [[
visiting unvisited references]]

[2015-12-01T12:09:30.193+0200] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=75 _ThreadName=Thread-20] [timeMillis: 1448964570193] [levelValue: 800] [[
visiting unvisited references]]

[2015-12-01T12:09:30.205+0200] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=75 _ThreadName=Thread-20] [timeMillis: 1448964570205] [levelValue: 800] [[
visiting unvisited references]]

[2015-12-01T12:09:33.896+0200] [glassfish 4.1] [INFO] [jsf.config.listener.version] [javax.enterprise.resource.webcontainer.jsf.config] [tid: _ThreadID=75 _ThreadName=Thread-20] [timeMillis: 1448964573896] [levelValue: 800] [[
Initializing Mojarra 2.2.12 ( 20150720-0848 https://svn.java.net/svn/mojarra~svn/tags/2.2.12@14885) for context '']]

[2015-12-01T12:09:38.502+0200] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00172] [javax.enterprise.web] [tid: _ThreadID=75 _ThreadName=Thread-20] [timeMillis: 1448964578502] [levelValue: 800] [[
Loading application [__admingui] at [/]]]

[2015-12-01T12:09:38.507+0200] [glassfish 4.1] [INFO] [NCLS-CORE-00022] [javax.enterprise.system.core] [tid: _ThreadID=75 _ThreadName=Thread-20] [timeMillis: 1448964578507] [levelValue: 800] [[
Loading application __admingui done in 15,584 ms]]

[2015-12-01T12:09:39.552+0200] [glassfish 4.1] [WARNING] [] [javax.enterprise.system.container.web.com.sun.web.security] [tid: _ThreadID=40 _ThreadName=admin-listener(1)] [timeMillis: 1448964579552] [levelValue: 900] [[
Context path from ServletContext: differs from path from bundle: /]]

[2015-12-01T12:09:46.527+0200] [glassfish 4.1] [INFO] [] [org.glassfish.admingui] [tid: _ThreadID=44 _ThreadName=admin-listener(5)] [timeMillis: 1448964586527] [levelValue: 800] [[
Redirecting to /common/index.jsf]]

[2015-12-01T12:09:46.851+0200] [glassfish 4.1] [INFO] [] [org.glassfish.admingui] [tid: _ThreadID=109 _ThreadName=admin-listener(6)] [timeMillis: 1448964586851] [levelValue: 800] [[
Admin Console: Initializing Session Attributes...]]

[2015-12-01T12:10:05.167+0200] [glassfish 4.1] [INFO] [] [org.glassfish.admingui] [tid: _ThreadID=44 _ThreadName=admin-listener(5)] [timeMillis: 1448964605167] [levelValue: 800] [[
Exception Occurred :null]]

[2015-12-01T12:10:05.182+0200] [glassfish 4.1] [SEVERE] [] [javax.enterprise.resource.webcontainer.jsf.context] [tid: _ThreadID=44 _ThreadName=admin-listener(5)] [timeMillis: 1448964605182] [levelValue: 1000] [[
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException while attempting to process a 'beforeCreate' event for 'event155'.
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:422)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:394)
at com.sun.jsftemplating.layout.descriptors.LayoutComponent.beforeCreate(LayoutComponent.java:348)
at com.sun.jsftemplating.layout.descriptors.LayoutComponent.getChild(LayoutComponent.java:288)
at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:556)
at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:551)
at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:507)
at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:507)
at com.sun.jsftemplating.layout.LayoutViewHandler.createView(LayoutViewHandler.java:255)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:256)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:123)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:233)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.doChainInvoke(StandardPipeline.java:678)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
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(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor152.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:442)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:420)
... 46 more
Caused by: java.lang.NullPointerException
at com.sun.jsftemplating.handlers.UtilHandlers.mapPut(UtilHandlers.java:314)
... 51 more
]]





[GLASSFISH-21471] Oracle Database Change Notification (DCN/QCN) - java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleConnection Created: 26/Nov/15  Updated: 13/Jan/17

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: neocdtv Assignee: ankur.kathuria
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Glassfish 4.1, Oracle 11 XE, Linux Ubuntu 14



 Description   

I was trying to build a basic example with L2-Cache invalidation over Oracle Database Change Notification (DCN/QCN). Following the description from EclipseLink website: https://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Basic_JPA_Development/Caching/DatabaseEvents the following property was added to the persistence.xml:
<property
name="eclipselink.cache.database-event-listener" value="org.eclipse.persistence.platform.database.oracle.dcn.OracleChangeNotificationListener"/>
Since DCN is a custom Oracle extension the ojdbc6-11.2.0.2.0.jar was put into the directory domainname/lib/ext/. During deployment the following exception occures:
java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleConnection
at org.eclipse.persistence.platform.database.oracle.dcn.OracleChangeNotificationListener.register(OracleChangeNotificationListener.java:96)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:856)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:752)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:265)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:731)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:205)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:305)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:337)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:303)
at org.glassfish.persistence.jpa.JPADeployer$2.visitPUD(JPADeployer.java:451)
at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510)
at org.glassfish.persistence.jpa.JPADeployer.iterateInitializedPUsAtApplicationPrepare(JPADeployer.java:492)
at org.glassfish.persistence.jpa.JPADeployer.event(JPADeployer.java:398)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:487)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:487)
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(Subject.java:360)
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(Subject.java:360)
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 com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
at org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:189)
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)
:



 Comments   
Comment by mvawork [ 09/Aug/16 ]

This is not GlassFish bug. You can see fix in the master branch EclipseLink (https://github.com/eclipse/eclipselink.runtime/commit/1e287f11c6e5671e208c38a730c0215d53b1926b#diff-977452f0fb90d57b6bf7d3069f2b0b76).





[GLASSFISH-21469] ClassNotFoundException DefaultHandler not found by EclipseLink moxy Created: 23/Nov/15  Updated: 13/Jan/17

Status: Open
Project: glassfish
Component/s: entity-persistence
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: anoopgupta Assignee: ankur.kathuria
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Oracle Linux 6u4 x86_64, Intel Xeon processor



 Description   

GF 4.1.1 build 1 (release) includes EclipseLink 2.6.1.v20150605-31e8258, which results in the following ClassNotFoundException. However, the exception is resolved after upgrading to EclipseLink 2.6.1.v20150916-55dc7c3. Look slik eGF 4.1.1. needs to pick up newer EclipseLink.

[2015-11-22T15:24:06.414-0800] [glassfish 4.1] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=31 _ThreadName=http-listener-1(5)] [timeMillis: 1448234646414] [levelValue: 900] [[
StandardWrapperValve[org.spec.jent.vehicle.VehicleApplication]: Servlet.service() for servlet org.spec.jent.vehicle.VehicleApplication threw exception
java.lang.ClassNotFoundException: org.xml.sax.helpers.DefaultHandler not found by org.eclipse.persistence.moxy [50]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.eclipse.persistence.jaxb.BeanValidationHelper.<clinit>(BeanValidationHelper.java:53)
at org.eclipse.persistence.jaxb.JAXBBeanValidator.isConstrainedObject(JAXBBeanValidator.java:257)
at org.eclipse.persistence.jaxb.JAXBBeanValidator.shouldValidate(JAXBBeanValidator.java:208)
at org.eclipse.persistence.jaxb.JAXBMarshaller.validateAndTransformIfNeeded(JAXBMarshaller.java:587)
at org.eclipse.persistence.jaxb.JAXBMarshaller.marshal(JAXBMarshaller.java:481)
at org.eclipse.persistence.jaxb.rs.MOXyJsonProvider.writeTo(MOXyJsonProvider.java:949)
at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:265)
at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:250)
at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
at org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:106)
at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:86)
at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1130)
at org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:683)
at org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:424)
at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:414)
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:312)
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.servlet.WebComponent.service(WebComponent.java:460)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:386)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:334)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
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(Thread.java:745)
]]






[GLASSFISH-21511] cluster glassfish instance Created: 05/Feb/16  Updated: 13/Jan/17

Status: Open
Project: glassfish
Component/s: admin, jms
Affects Version/s: 4.1
Fix Version/s: None

Type: Task Priority: Major
Reporter: nickyfulls Assignee: Yamini K B
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

How can I solve the following problem? What does it mean ?

[2016-02-05T16:12:27.897+0100] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=122 _ThreadName=Thread-9] [timeMillis: 1454685147897] [levelValue: 1000] [[
gogo: FileNotFoundException: /home/glassfish/glassfish4/glassfish/nodes/localhost-domain1/Coo1/config/noop=true (File o directory non esistente)]]
zito.2016
[2016-02-05T16:12:27.925+0100] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=122 _ThreadName=Thread-9] [timeMillis: 1454685147925] [levelValue: 1000] [[
java.io.FileNotFoundException: /home/glassfish/glassfish4/glassfish/nodes/localhost-domain1/Coo1/config/noop=true (File o directory non esistente)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
at org.apache.felix.gogo.shell.Shell.readScript(Shell.java:218)
at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:161)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:469)
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:395)
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
at org.apache.felix.gogo.shell.Activator.run(Activator.java:75)
at java.lang.Thread.run(Thread.java:745)]]



 Comments   
Comment by saad_ab [ 06/Feb/16 ]

nodes not created successfully!





[GLASSFISH-21545] Websocket Container init error Created: 01/Jun/16  Updated: 13/Jan/17

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Huangyun Assignee: sumasri
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

JDK 1.8 Glassfish 4.1.1 Spring 4.2.6



 Description   

Maven:
<properties>
<spring.version>4.2.6.RELEASE</spring.version>
</properties>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>$

{spring.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}

</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-websocket</artifactId>
<version>$

{spring.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-messaging</artifactId>
<version>${spring.version}

</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>$

{spring.version}

</version>
<scope>compile</scope>
</dependency>

<websocket:message-broker>
<websocket:stomp-endpoint path="/monitor">
<websocket:sockjs websocket-enabled="true"/>
</websocket:stomp-endpoint>
<websocket:simple-broker prefix="/topic, /queue"/>
</websocket:message-broker>

then, start glassfish 4.1.1, the console radom show:

Servlet.service() for servlet dispatcher threw exception
java.lang.IllegalArgumentException: No 'javax.websocket.server.ServerContainer' ServletContext attribute. Are you running in a Servlet container that supports JSR-356?






[GLASSFISH-21547] stop-local-instances fails after resynchronization of server instance Created: 02/Jul/16  Updated: 13/Jan/17

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: y7kaneko Assignee: Yamini K B
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows



 Description   

How to reproduce:

0. start-domain
1. create-cluster c1
2. create-local-instance --cluster c1 i1
3. start-local-instance i1
4. update domain.xml
5. start-localinstance i1
6. stop-local-instance i1

Stop 6 fails.

CLI1306 Warning - server instance is not running.
Command stop-local-instance executed successfully.

Problem is that after domain.xml has been updated in step 4, start-local-instance command will synchronize repository cache of server instance even though server instance is already started. Synchronization done in step 5 removes pid files from cache. stop-local-instance in step 6 look for pid file, which is gone, and incorrectly thinks server instance is already stopped and will do nothing.






[GLASSFISH-21552] Streaming large Downloads without Content-length when using AJP produces OutOfMemory Created: 20/Jul/16  Updated: 13/Jan/17

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: unwichtich Assignee: ankur.kathuria
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

When streaming large (> 100MB) downloads without Content-Length via mod_ajp to Apache, OutOfMemoryErrors occur.

Stacktrace:

java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:3181)
at org.glassfish.grizzly.memory.BuffersBuffer.ensureBuffersCapacity(BuffersBuffer.java:303)
at org.glassfish.grizzly.memory.BuffersBuffer.append(BuffersBuffer.java:230)
at org.glassfish.grizzly.memory.BuffersBuffer.split(BuffersBuffer.java:463)
at org.glassfish.grizzly.http.ajp.AjpMessageUtils.appendContentAndTrim(AjpMessageUtils.java:486)
at org.glassfish.grizzly.http.ajp.AjpHandlerFilter.encodeHttpPacket(AjpHandlerFilter.java:275)
at org.glassfish.grizzly.http.ajp.AjpHandlerFilter.handleWrite(AjpHandlerFilter.java:244)
at org.glassfish.grizzly.filterchain.ExecutorResolver$8.execute(ExecutorResolver.java:111)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.filterchain.FilterChainContext.write(FilterChainContext.java:848)
at org.glassfish.grizzly.filterchain.FilterChainContext.write(FilterChainContext.java:817)
at org.glassfish.grizzly.http.io.OutputBuffer.flushBuffer(OutputBuffer.java:1024)
at org.glassfish.grizzly.http.io.OutputBuffer.flushBinaryBuffers(OutputBuffer.java:1011)
at org.glassfish.grizzly.http.io.OutputBuffer.flushAllBuffers(OutputBuffer.java:982)
at org.glassfish.grizzly.http.io.OutputBuffer.close(OutputBuffer.java:715)
at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:263)
at org.apache.catalina.connector.CoyoteOutputStream.close(CoyoteOutputStream.java:186)
at org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.destroy(ZipArchiveOutputStream.java:1426)
at org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.close(ZipArchiveOutputStream.java:808)

The problem is also described here: https://github.com/payara/Payara/issues/350

The fix provided in this issue https://java.net/jira/browse/GLASSFISH-21202 doesn't help here. The root cause for the problem is, that in the class AjpHttpRequest the chunking isn't enabled, therefore the response is buffered completely.



 Comments   
Comment by unwichtich [ 20/Jul/16 ]

Here is the relevant grizzly bug: https://java.net/jira/browse/GRIZZLY-1787

Comment by unwichtich [ 20/Jul/16 ]

Here is a patched JAR which includes the required fix: https://dl.dropboxusercontent.com/u/6862316/so/glassfish-grizzly-extra-all.jar

The included change is very similar to this: https://github.com/GrizzlyNIO/grizzly-mirror/commit/6c08805499f7c6b64c3c8806a71f0b58b52c960b





[GLASSFISH-21558] Secured EJB lookup fails after AppClientContainer instantiation Created: 07/Sep/16  Updated: 13/Jan/17

Status: Open
Project: glassfish
Component/s: standalone_client
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: andydr Assignee: Kokil_Jain
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

We followed the documentation at https://docs.oracle.com/cd/E19226-01/820-7695/gipkt/index.html to set up a standalone ACC-Client application.

Although the callback-handler in the META-INF/application-client.xml is configured properly, the lookup for a secured SLSB fails and the handler is never called.

The lookup for unsecured SLSB works as expected.

Sep 07, 2016 12:28:26 PM com.sun.enterprise.iiop.security.SecurityMechanismSelector getUsernameAndPassword
SCHWERWIEGEND: IIOP1001: Exception getting username and password
java.lang.SecurityException: java.io.IOException: Konfigurationsfehler:
	Datei oder Verzeichnis nicht vorhanden
	at sun.security.provider.ConfigFile$Spi.<init>(ConfigFile.java:137)
	at sun.security.provider.ConfigFile.<init>(ConfigFile.java:102)


 Comments   
Comment by andydr [ 07/Sep/16 ]

If the AppClientContainer is instantiated via AppClientContainer.Builder#newContainer(ClientModule.class) we get the following exception

Sep 07, 2016 2:15:20 PM com.sun.enterprise.deployment.archivist.Archivist readAnnotations
SCHWERWIEGEND: com.sun.proxy.$Proxy25 cannot be cast to javax.ejb.EJB
SCHWERWIEGEND: null
java.lang.IllegalStateException: com.sun.proxy.$Proxy25 cannot be cast to javax.ejb.EJB. Related annotation information: annotation [@javax.ejb.EJB(name=, lookup=, description=, beanName=, beanInterface=class java.lang.Object, mappedName=)] on annotated element [private static de.ejb.UserBeanRemote de.client.ClientModule.userBean] of type [FIELD]
	at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:519)

The field in the ClientModule class is defined as

@EJB
private static UserBeanRemote userBean;
Comment by andydr [ 09/Sep/16 ]

The java.lang.SecurityException was a configuration issue, but the EJB injection problem still remains.

Comment by andydr [ 09/Sep/16 ]

We figured out, that the ACC module runs, if we start it via command 'appclient -client <accmodule.jar>'.

The ACC Container startup project is maven based and requires the following dependency, which seems not sufficient

  <dependency>
            <groupId>org.glassfish.main.appclient</groupId>
            <artifactId>gf-client</artifactId>
            <version>4.1.1</version>
   </dependency>

Do we need other dependencies?





[GLASSFISH-21568] GlassFish 4 does not start on OS X 10.12 ( macos Sierra ) Created: 03/Oct/16  Updated: 13/Jan/17

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: aulloa Assignee: Yamini K B
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

macOs Sierra ( 10.12 )


Issue Links:
Related
is related to GLASSFISH-21343 Glassfish fails to start on OSX 10.10.3 Resolved

 Comments   
Comment by aulloa [ 03/Oct/16 ]

Hi,

I try to start "Glassfish" in macOs Sierra, and i have problems....( in macOs x 10.11 works without problems )
i use this command. " sudo ./asadmin start-domain" in terminal session.

This a copy from the terminal window:

MacBook-Pro-de-Aldo-2:~ aulloac$ cd /Java/glassfish41/bin/
MacBook-Pro-de-Aldo-2:bin aulloac$ sudo ./asadmin start-domain
Password:
Waiting for domain1 to start .......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
serverNoStart
Command start-domain failed.
MacBook-Pro-de-Aldo-2:bin aulloac$

And this is the info in the log. ( GlassFish )

[2016-10-03T13:30:46.422-0300] [glassfish 4.1] [WARN] [] [org.jboss.weld.Interceptor] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1475511971691] [timeMillis: 1475512246422] [levelValue: 900] [[
WELD-001700: Interceptor annotation class javax.ejb.PostActivate not found, interception based on it is not enabled]]

[2016-10-03T13:30:46.423-0300] [glassfish 4.1] [WARN] [] [org.jboss.weld.Interceptor] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1475511971691] [timeMillis: 1475512246423] [levelValue: 900] [[
WELD-001700: Interceptor annotation class javax.ejb.PrePassivate not found, interception based on it is not enabled]]

[2016-10-03T13:30:46.658-0300] [glassfish 4.1] [WARN] [] [org.jboss.weld.Event] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1475511971691] [timeMillis: 1475512246658] [levelValue: 900] [[
WELD-000411: Observer method [BackedAnnotatedMethod] org.glassfish.sse.impl.ServerSentEventCdiExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>, BeanManager) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.]]

[2016-10-03T13:30:46.697-0300] [glassfish 4.1] [WARN] [] [org.jboss.weld.Event] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1475511971691] [timeMillis: 1475512246697] [levelValue: 900] [[
WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.gf.cdi.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.]]

[2016-10-03T13:30:46.711-0300] [glassfish 4.1] [WARN] [] [org.jboss.weld.Event] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1475511971691] [timeMillis: 1475512246711] [levelValue: 900] [[
WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.gf.cdi.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.]]

[2016-10-03T13:30:46.721-0300] [glassfish 4.1] [WARN] [] [org.jboss.weld.Event] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1475511971691] [timeMillis: 1475512246721] [levelValue: 900] [[
WELD-000411: Observer method [BackedAnnotatedMethod] public org.glassfish.jms.injection.JMSCDIExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.]]

[2016-10-03T13:30:46.727-0300] [glassfish 4.1] [WARN] [] [org.jboss.weld.Event] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1475511971691] [timeMillis: 1475512246727] [levelValue: 900] [[
WELD-000411: Observer method [BackedAnnotatedMethod] org.glassfish.sse.impl.ServerSentEventCdiExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>, BeanManager) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.]]

[2016-10-03T13:30:46.730-0300] [glassfish 4.1] [WARN] [] [org.jboss.weld.Event] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1475511971691] [timeMillis: 1475512246730] [levelValue: 900] [[
WELD-000411: Observer method [BackedAnnotatedMethod] public org.glassfish.jms.injection.JMSCDIExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.]]

****INFO

[2016-10-03T13:31:32.593-0300] [glassfish 4.1] [WARN] [] [org.jboss.weld.Event] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1475511971691] [timeMillis: 1475512292593] [levelValue: 900] [[
WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.gf.cdi.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.]]

[2016-10-03T13:31:32.603-0300] [glassfish 4.1] [WARN] [] [org.jboss.weld.Event] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1475511971691] [timeMillis: 1475512292603] [levelValue: 900] [[
WELD-000411: Observer method [BackedAnnotatedMethod] org.glassfish.sse.impl.ServerSentEventCdiExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>, BeanManager) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.]]

[2016-10-03T13:31:32.612-0300] [glassfish 4.1] [WARN] [] [org.jboss.weld.Event] [tid: _ThreadID=20 _ThreadName=RunLevelControllerThread-1475511971691] [timeMillis: 1475512292612] [levelValue: 900] [[
WELD-000411: Observer method [BackedAnnotatedMethod] public org.glassfish.jms.injection.JMSCDIExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.]]

      • INFO

[2016-10-03T13:32:35.900-0300] [glassfish 4.1] [SEVERE] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=74 _ThreadName=deployment-jar-scanner] [timeMillis: 1475512355900] [levelValue: 1000] [[
Exception while visiting WEB-INF/classes/cl/dedalus/fcsasignaturadocente/ws/FcsasignaturadocenteWeb.class of size 8020
java.lang.RuntimeException: Cannot add a field to a non classmodel type
at org.glassfish.hk2.classmodel.reflect.impl.ExtensibleTypeImpl.addField(ExtensibleTypeImpl.java:121)
at org.glassfish.hk2.classmodel.reflect.impl.ModelClassVisitor$ModelFieldVisitor.visitEnd(ModelClassVisitor.java:431)
at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.readField(ClassReader.java:813)
at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.accept(ClassReader.java:689)
at org.glassfish.hk2.external.org.objectweb.asm.ClassReader.accept(ClassReader.java:506)
at org.glassfish.hk2.classmodel.reflect.Parser$5.on(Parser.java:359)
at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.handleEntry(ReadableArchiveScannerAdapter.java:165)
at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.onSelectedEntries(ReadableArchiveScannerAdapter.java:127)
at org.glassfish.hk2.classmodel.reflect.Parser.doJob(Parser.java:344)
at org.glassfish.hk2.classmodel.reflect.Parser.access$300(Parser.java:67)
at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:303)
at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

My best regards.
Aldo

Comment by Joe Di Pol [ 12/Oct/16 ]

Adding another data point:

I downloaded 4.1.1 full profile from glassfish.java.net, unzipped it and ran start-domain on macOS Sierra 10.12. The server started AOK. I had no apps deployed (other than the admin console which started fine).





[GLASSFISH-21569] Unable to start "Glassfish" in macos Sierra ( 10.12 ) Created: 04/Oct/16  Updated: 13/Jan/17

Status: Open
Project: glassfish
Component/s: other
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: aulloa Assignee: Yamini K B
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: 3 days
Time Spent: Not Specified
Original Estimate: 3 days
Environment:

macOS Sierra


Tags: glassfish-4.1, macOS, macSierra

 Description   

Hi,

I do the upgrade in my "macBook Pro", from "El Capitan" to "macOS Sierra" and now i have problem to start "Glassfish" in a terminal window in "macOS SIerra", this is the output when execute the command "sudo ./asadmin start-domain" in a Terminal windows. ( in macOS "El Capitan" all works fine )

MacBook-Pro-de-Aldo-2:~ aulloac$ cd /Java/glassfish41/bin/
MacBook-Pro-de-Aldo-2:bin aulloac$ sudo ./asadmin start-domain
Password:
Waiting for domain1 to start .......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
serverNoStart
Command start-domain failed.
MacBook-Pro-de-Aldo-2:bin aulloac$

Best Regards
Aldo.



 Comments   
Comment by aosama [ 18/Dec/16 ]

experiencing the same issue, its a macOS sierra update related where the OS is blocking the process from accessing 127.0.0.1 and localhost ... this is what i could find on threads on apple support.

For IDEs this can be solved by not using any proxy, but for glass fish not sure how we can tell the O.S. to not block these http calls





[GLASSFISH-21508] A failure when running a WebSocket application on Java EE 7 RI Created: 02/Feb/16  Updated: 12/Jan/17

Status: Open
Project: glassfish
Component/s: web_container
Affects Version/s: 4.1, 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: xj Assignee: Shing Wai Chan
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

One licensee found a failure upon processing a request when running a WebSocket application on Java EE 7 RI.
Could you please forward this to the responsible engineer to answer their questions.
It is easily reproduced with our RI.

After deploying a WebSocket application(App1) on Domain Administration Server(DAS), the following error (a) occurred when accessing App1's URL after re-starting DAS.
(a)
-------------------------------------
javax.websocket.server.ServerContainer=null
-------------------------------------

The expected value (b) returned from App1 is below.
(b)
-------------------------------------
javax.websocket.server.ServerContainer=org.glassfish.tyrus.servlet.TyrusServletContainerInitializer$<Object hash>
-------------------------------------

Return value is changed every time (a) or (b) if DAS is re-started. There are 50% chances that (a) is returned.

The two similiar issues has been reported here.
https://java.net/jira/browse/GLASSFISH-16872
https://java.net/jira/browse/GLASSFISH-19551

Below is Hitachi's investigation result and they thought it is a defect in Java EE 7 RI.

1. The root cause is the attribute "javax.websocket.server.ServerContainer" is not set in ServletContext.

The set of "javax.websocket.server.ServerContainer" is done at line 123 of org.glassfish.tyrus.servlet.TyrusServletContainerInitializer.onStartup(Set, ServletContext). It returns without doing anything if the passed parameter classes is null or empty.
The above problem occurred because classes is null.

2. The reason about why the parameter classes of TyrusServletContainerInitializer is null.

At the line 455 of org.glassfish.web.loader.ServletContainerInitializerUtil.checkAgainstInterestList(Types, Map, List, Map, Set, ClassLoader),
-----------------------------
Type type = classInfo.getBy(c.getName());
-----------------------------

classInfo.getBy(c.getName()) returns null when the variable c is "javax.websocket.Endpoint".

3. The reason why the return value of TypesCtr.getBy(String) becomes null.

The method org.glassfish.hk2.classmodel.reflect.impl.TypesCtr.getBy(String) searches storage.values() which is a HashMap whose key is type of Class and it looks for the first hit and returns TypeProxy.get();

The problem is both of ClassModel and InterfaceModel are registered in the key of storage. The return value is null or not depending on which is first found as java.util.Map.values() is unordered.

4. The reason why InterfaceModel is registered as "javax.websocket.Endpoint".

In org.glassfish.hk2.classmodel.reflect.impl.SignatureVisitorImpl.visitClassType(String), it makes a determination if the parameter "s" is InterfaceModel by using TypeBuilder.getHolder(String, Class).
-----------------------------
public void visitClassType(String s) {
String interfaceName = org.glassfish.hk2.external.org.objectweb.asm.Type.getObjectType(s).getClassName();
TypeProxy<InterfaceModel> interfaceTypeProxy = typeBuilder.getHolder(interfaceName, InterfaceModel.class);
if (interfaceTypeProxy!=null) {
: <If "s" is the interface>
}
}
-----------------------------

If TypeBuilder.getHolder is invoked, that class is registered as InterfaceModel and null is never returned.

Due to the method SignatureVisitorImpl.visitClassType, if anonymous class is used as below, BBB is registered as InterfaceModel in storage though BBB is not interface.
---------------------------------
new AAA<BBB> {
:
}
---------------------------------

Using getHolder() to determine if it is of InterfaceModel is the root cause.

And the similar implementation was found in SignatureVisitorImpl.visitTypeVariable(String).

Questions:
1. Is this symptom a defect?
2. By setting true at system property "org.glassfish.web.parsing" can work around this problem. Does Oracle's engineer has any comment on this?
3. If it is a bug, do we have a plan to address it?

To reproduce:
1. Deploy attached war file on Java EE server
2. Re-start the Java EE server.
3. Access http://<host>:<port>/test/TestServle
4. If the following message is back, jump back to step 2.
javax.websocket.server.ServerContainer=org.glassfish.tyrus.servlet.TyrusServletContainerInitializer$<Object hash>



 Comments   
Comment by Pavel Bucek [ 12/Jan/17 ]

I don't believe this is anywhere in the WebSocket RI (Tyrus) Code.

If you read the report, only point "1." is related Tyrus and is caused because of "2.", which is already on webcontainer level.

Reassigning back to Shing Wai.





[GLASSFISH-21633] http-compression web devtest fails Created: 09/Dec/16  Updated: 12/Jan/17

Status: Open
Project: glassfish
Component/s: web_container
Affects Version/s: 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Shing Wai Chan Assignee: liangzzhang
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

build:
[mkdir] Created dir: /scratch/BUILD_AREA/workspace/gf-lw-web-devtests/appserv-tests/devtests/web/httpCompression/build
[javac] /scratch/BUILD_AREA/workspace/gf-lw-web-devtests/appserv-tests/devtests/web/httpCompression/build.xml:74: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 1 source file to /scratch/BUILD_AREA/workspace/gf-lw-web-devtests/appserv-tests/devtests/web/httpCompression/build

all:
[java] asadmin --host localhost.localdomain --port 45707 --user admin --passwordfile /scratch/BUILD_AREA/workspace/gf-lw-web-devtests/appserv-tests/config/adminpassword.txt --interactive=false --echo=true --terse=true set configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.compression=on
[java] configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.compression=on
[java]
[java]
[java] asadmin --host localhost.localdomain --port 45707 --user admin --passwordfile /scratch/BUILD_AREA/workspace/gf-lw-web-devtests/appserv-tests/config/adminpassword.txt --interactive=false --echo=true --terse=true set configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.compression=force
[java] configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.compression=force
[java]
[java]
[java] asadmin --host localhost.localdomain --port 45707 --user admin --passwordfile /scratch/BUILD_AREA/workspace/gf-lw-web-devtests/appserv-tests/config/adminpassword.txt --interactive=false --echo=true --terse=true set configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.compression=false
[java]
[java] remote failure: javax.validation.ValidationException: HV000149: An exception occurred during message interpolation
[java] HV000149: An exception occurred during message interpolation
[java]
[java] asadmin --host localhost.localdomain --port 45707 --user admin --passwordfile /scratch/BUILD_AREA/workspace/gf-lw-web-devtests/appserv-tests/config/adminpassword.txt --interactive=false --echo=true --terse=true set configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.compression=true
[java]
[java] remote failure: Could not change the attributes: Config bean already locked GlassFishConfigBean.org.glassfish.grizzly.config.dom.Http
[java] Config bean already locked GlassFishConfigBean.org.glassfish.grizzly.config.dom.Http
[java]
[java] asadmin --host localhost.localdomain --port 45707 --user admin --passwordfile /scratch/BUILD_AREA/workspace/gf-lw-web-devtests/appserv-tests/config/adminpassword.txt --interactive=false --echo=true --terse=true set configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.compression=1024
[java]
[java] remote failure: Could not change the attributes: Config bean already locked GlassFishConfigBean.org.glassfish.grizzly.config.dom.Http
[java] Config bean already locked GlassFishConfigBean.org.glassfish.grizzly.config.dom.Http
[java]
[java] asadmin --host localhost.localdomain --port 45707 --user admin --passwordfile /scratch/BUILD_AREA/workspace/gf-lw-web-devtests/appserv-tests/config/adminpassword.txt --interactive=false --echo=true --terse=true set configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.compression=off
[java]
[java] remote failure: Could not change the attributes: Config bean already locked GlassFishConfigBean.org.glassfish.grizzly.config.dom.Http
[java] Config bean already locked GlassFishConfigBean.org.glassfish.grizzly.config.dom.Http
[java]
[java] asadmin --host localhost.localdomain --port 45707 --user admin --passwordfile /scratch/BUILD_AREA/workspace/gf-lw-web-devtests/appserv-tests/config/adminpassword.txt --interactive=false --echo=true --terse=true set configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.compression=on
[java]
[java] remote failure: Could not change the attributes: Config bean already locked GlassFishConfigBean.org.glassfish.grizzly.config.dom.Http
[java] Config bean already locked GlassFishConfigBean.org.glassfish.grizzly.config.dom.Http
[java]
[java] asadmin --host localhost.localdomain --port 45707 --user admin --passwordfile /scratch/BUILD_AREA/workspace/gf-lw-web-devtests/appserv-tests/config/adminpassword.txt --interactive=false --echo=true --terse=true set configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.compression=force
[java]
[java] remote failure: Could not change the attributes: Config bean already locked GlassFishConfigBean.org.glassfish.grizzly.config.dom.Http
[java] Config bean already locked GlassFishConfigBean.org.glassfish.grizzly.config.dom.Http
[java]
[java] asadmin --host localhost.localdomain --port 45707 --user admin --passwordfile /scratch/BUILD_AREA/workspace/gf-lw-web-devtests/appserv-tests/config/adminpassword.txt --interactive=false --echo=true --terse=true set configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.compression=false
[java]
[java] remote failure: Could not change the attributes: Config bean already locked GlassFishConfigBean.org.glassfish.grizzly.config.dom.Http
[java] Config bean already locked GlassFishConfigBean.org.glassfish.grizzly.config.dom.Http
[java]
[java] asadmin --host localhost.localdomain --port 45707 --user admin --passwordfile /scratch/BUILD_AREA/workspace/gf-lw-web-devtests/appserv-tests/config/adminpassword.txt --interactive=false --echo=true --terse=true set configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.compression=true
[java]
[java] remote failure: Could not change the attributes: Config bean already locked GlassFishConfigBean.org.glassfish.grizzly.config.dom.Http
[java] Config bean already locked GlassFishConfigBean.org.glassfish.grizzly.config.dom.Http
[java]
[java] asadmin --host localhost.localdomain --port 45707 --user admin --passwordfile /scratch/BUILD_AREA/workspace/gf-lw-web-devtests/appserv-tests/config/adminpassword.txt --interactive=false --echo=true --terse=true set configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.compression=1024
[java]
[java] remote failure: Could not change the attributes: Config bean already locked GlassFishConfigBean.org.glassfish.grizzly.config.dom.Http
[java] Config bean already locked GlassFishConfigBean.org.glassfish.grizzly.config.dom.Http
[java]
[java] asadmin --host localhost.localdomain --port 45707 --user admin --passwordfile /scratch/BUILD_AREA/workspace/gf-lw-web-devtests/appserv-tests/config/adminpassword.txt --interactive=false --echo=true --terse=true set configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.compression=off
[java]
[java] remote failure: Could not change the attributes: Config bean already locked GlassFishConfigBean.org.glassfish.grizzly.config.dom.Http
[java] Config bean already locked GlassFishConfigBean.org.glassfish.grizzly.config.dom.Http
[java]
[java] Generating report at /scratch/BUILD_AREA/workspace/gf-lw-web-devtests/appserv-tests/test_results.xml
[java]
[java]
[java] -----------------------------------------
[java] - gzip-compressed-output-off: PASS -
[java] - gzip-set-compression-on: PASS -
[java] - gzip-compressed-output-on: PASS -
[java] - gzip-set-compression-force: PASS -
[java] - gzip-compressed-output-force: PASS -
[java] - gzip-set-compression-false: PASS -
[java] - gzip-set-compression-true: PASS -
[java] - gzip-set-compression-1024: FAIL -
[java] - gzip-compressed-output-1024: PASS -
[java] - gzip-set-compression-off: FAIL -
[java] - gzip-compressed-output-off-2: PASS -
[java] - lzma-compressed-output-off: PASS -
[java] - lzma-set-compression-on: FAIL -
[java] - lzma-compressed-output-on: PASS -
[java] - lzma-set-compression-force: FAIL -
[java] - lzma-compressed-output-force: PASS -
[java] - lzma-set-compression-false: PASS -
[java] - lzma-set-compression-true: PASS -
[java] - lzma-set-compression-1024: FAIL -
[java] - lzma-compressed-output-1024: PASS -
[java] - lzma-set-compression-off: FAIL -
[java] - lzma-compressed-output-off-2: PASS -
[java] -----------------------------------------
[java] - Total PASS : 16 -
[java] - Total FAIL : 6 -
[java] - Total DID NOT RUN : 0 -
[java] -----------------------------------------

Continuous build:
http://gf-hudson.us.oracle.com/hudson/view/GlassFish/view/Trunk%20Continuous/job/gf-trunk-web-devtests-continuous/lastSuccessfulBuild/artifact/appserv-tests/test_results.html

Nightly build:
http://gf-hudson.us.oracle.com/hudson/view/GlassFish/view/Trunk%20Continuous/job/gf-lw-web-devtests/406/artifact/appserv-tests/test_results.html



 Comments   
Comment by liangzzhang [ 12/Jan/17 ]

[2017-01-07T10:59:34.325+0800] [glassfish 5.0] [SEVERE] [NCLS-CORE-00003] [javax.enterprise.system.core] [tid: _ThreadID=66 _ThreadName=admin-listener(1)] [timeMillis: 1483757974325] [levelValue: 1000] [[
Exception while running a command
javax.validation.ValidationException: HV000149: An exception occurred during message interpolation
at org.hibernate.validator.internal.engine.ValidationContext.interpolate(ValidationContext.java:431)
at org.hibernate.validator.internal.engine.ValidationContext.createConstraintViolation(ValidationContext.java:300)
at org.hibernate.validator.internal.engine.ValidationContext.createConstraintViolations(ValidationContext.java:261)
at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.validateSingleConstraint(ConstraintTree.java:456)
at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.validateConstraints(ConstraintTree.java:127)
at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.validateConstraints(ConstraintTree.java:87)
at org.hibernate.validator.internal.metadata.core.MetaConstraint.validateConstraint(MetaConstraint.java:73)
at org.hibernate.validator.internal.engine.ValidatorImpl.validateMetaConstraint(ValidatorImpl.java:617)
at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:580)
at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForSingleDefaultGroupElement(ValidatorImpl.java:524)
at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:492)
at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:457)
at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:407)
at org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:205)
at org.jvnet.hk2.config.WriteableView.canCommit(WriteableView.java:316)
at org.jvnet.hk2.config.Transaction.canCommit(Transaction.java:90)
at org.jvnet.hk2.config.Transaction.commit(Transaction.java:109)
at org.jvnet.hk2.config.ConfigSupport.apply(ConfigSupport.java:395)
at com.sun.enterprise.v3.admin.SetCommand.set(SetCommand.java:481)
at com.sun.enterprise.v3.admin.SetCommand.execute(SetCommand.java:178)
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(Subject.java:360)
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(Subject.java:360)
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:407)
at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:234)
at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
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:326)
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:305)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384)
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(Thread.java:745)
Caused by: java.util.MissingResourceException: Can't find bundle for base name org.hibernate.validator.ValidationMessages, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1564)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1387)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:1082)
at org.jvnet.hk2.config.MessageInterpolatorImpl.interpolate(MessageInterpolatorImpl.java:151)
at org.jvnet.hk2.config.MessageInterpolatorImpl.interpolate(MessageInterpolatorImpl.java:111)
at org.hibernate.validator.internal.engine.ValidationContext.interpolate(ValidationContext.java:422)
... 77 more
]]

Comment by liangzzhang [ 12/Jan/17 ]

The issue is caused by "Config bean already locked GlassFishConfigBean.org.glassfish.grizzly.config.dom.Http". Then all the following tests could not set config correctly.
The Config bean was locked because "java.util.MissingResourceException: Can't find bundle for base name org.hibernate.validator.ValidationMessages, locale en_US". This is called by org.jvnet.hk2.config.MessageInterpolatorImpl.interpolate.
I noticed that Glassfish already had a JIRA TASK GLASSFISH-15196 for the current issue.





[GLASSFISH-21166] session.invalidate causes two NPE Created: 18/Aug/14  Updated: 11/Jan/17

Status: Open
Project: glassfish
Component/s: cdi
Affects Version/s: 4.1, future release
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: dmatej Assignee: jjsnyder83
Resolution: Unresolved Votes: 6
Labels: None
Remaining Estimate: 2 hours
Time Spent: Not Specified
Original Estimate: 2 hours
Environment:

EAR with many WAR modules, form auth and custom realm and SSO enabled.


Tags: logout, session, weld

 Description   

The session is finally correctly invalidated, even on cluster instances, but there are these exceptions in the server.log.
I think it should throw another exception or do nothing, but it must not throw NPE.

WeldTerminalListener in current trunk is 2.2.2, current version is 2.2.4 - maybe it could be fixed, if it is really weld error.

[2014-08-18T13:42:56.479+0200] [glassfish 4.1] [INFO] [] [javax.enterprise.web.core] [tid: _ThreadID=28 _ThreadName=http-listener-1(2)] [timeMillis: 1408362176479] [levelValue: 800] [[
  Session event listener threw exception
java.lang.NullPointerException
        at org.jboss.weld.servlet.WeldTerminalListener.getSessionContext(WeldTerminalListener.java:65)
        at org.jboss.weld.servlet.WeldTerminalListener.sessionDestroyed(WeldTerminalListener.java:57)
        at org.apache.catalina.session.StandardSession.expire(StandardSession.java:910)
        at org.apache.catalina.session.StandardSession.expire(StandardSession.java:854)
        at org.apache.catalina.session.StandardSession.expire(StandardSession.java:842)
        at org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1603)
        at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:204)
        at org.apache.jsp.logout_jsp._jspService(logout_jsp.java:58)
...
[2014-08-18T13:42:56.482+0200] [glassfish 4.1] [INFO] [] [javax.enterprise.web.core] [tid: _ThreadID=28 _ThreadName=http-listener-1(2)] [timeMillis: 1408362176482] [levelValue: 800] [[
  Session event listener threw exception
java.lang.NullPointerException
        at org.jboss.weld.servlet.WeldTerminalListener.getSessionContext(WeldTerminalListener.java:65)
        at org.jboss.weld.servlet.WeldTerminalListener.sessionDestroyed(WeldTerminalListener.java:57)
        at org.apache.catalina.session.StandardSession.expire(StandardSession.java:910)
        at org.apache.catalina.session.StandardSession.expire(StandardSession.java:854)
        at org.apache.catalina.session.StandardSession.expire(StandardSession.java:842)
        at org.apache.catalina.authenticator.SingleSignOnEntry.expireSessions(SingleSignOnEntry.java:158)
        at com.sun.enterprise.security.web.GlassFishSingleSignOn.deregister(GlassFishSingleSignOn.java:560)
        at com.sun.enterprise.security.web.GlassFishSingleSignOn.sessionEvent(GlassFishSingleSignOn.java:337)
        at org.apache.catalina.session.StandardSession.fireSessionEvent(StandardSession.java:2318)
        at org.apache.catalina.session.StandardSession.expire(StandardSession.java:984)
        at org.apache.catalina.session.StandardSession.expire(StandardSession.java:854)
        at org.apache.catalina.session.StandardSession.expire(StandardSession.java:842)
        at org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1603)
        at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:204)
        at org.apache.jsp.logout_jsp._jspService(logout_jsp.java:58)

Line 65 in WeldTerminalListener:

    private HttpSessionContext getSessionContext() {
        return beanManager.instance().select(HttpSessionContext.class).get();
    }


 Comments   
Comment by Shing Wai Chan [ 18/Aug/14 ]

Can you provide a test case to illustrate this?

Comment by dmatej [ 19/Aug/14 ]

I will try to create some. I tried to replace weld-osgi-bundle with the 2.2.4 version, the result is same.

Comment by dmatej [ 20/Aug/14 ]

It seems it is not so simple ...
1) In our 35MB big ear with around 20 modules it is logged after each logout.
2) In unit test I created, with or without SSO enabled and tested on ear containing two simple war modules it works without exceptions.
So I looked inside the Glassfish code ... meanwhile I tried to undeploy our application and same error occured. I suspect this issue is caused by the same thing as GLASSFISH-21147 , but I have to find out how to create some simplier example with the test.

[2014-08-20T17:09:18.952+0200] [glassfish 4.1] [INFO] [] [javax.enterprise.web.core] [tid: _ThreadID=227 _ThreadName=admin-listener(6)] [timeMillis: 1408547358952] [levelValue: 800] [[
  Session event listener threw exception
java.lang.NullPointerException
        at org.jboss.weld.servlet.WeldTerminalListener.getSessionContext(WeldTerminalListener.java:65)
        at org.jboss.weld.servlet.WeldTerminalListener.sessionDestroyed(WeldTerminalListener.java:57)
        at org.apache.catalina.session.StandardSession.expire(StandardSession.java:910)
        at org.apache.catalina.session.StandardSession.expire(StandardSession.java:854)
        at org.apache.catalina.session.StandardSession.expire(StandardSession.java:842)
        at org.apache.catalina.session.StandardManager.stop(StandardManager.java:955)
        at org.apache.catalina.core.StandardContext.stop(StandardContext.java:6133)
        at com.sun.enterprise.web.WebModule.stop(WebModule.java:720)
Comment by dmatej [ 20/Aug/14 ]

I have downloaded weld-core sources from Github and separated that line in three.
It seems the beanManager is not injected - it is null.
Tested with weld-osgi-bundle 2.2.5-SNAPSHOT commit 81c0ee82, 2.2.4 and original 2.2.2.

public class WeldTerminalListener implements HttpSessionListener {
    @Inject
    private BeanManagerImpl beanManager;

Does someone know why and how to fix it?

I have found more messages in logs - this is in server.log file when initializing both the admingui application and our application:

[2014-08-20T23:04:43.273+0200] [glassfish 4.1] [FINE] [] [org.glassfish.naming] [tid: _ThreadID=170 _ThreadName=Thread-32] [timeMillis: 1408568683273] [levelValue: 500] [CLASSNAME: NamedNamingObjectManager] [METHODNAME: tryNamedProxies] [[
  found cached proxy [org.glassfish.weld.BeanManagerNamingProxy@7209773] for [java:comp/BeanManager]]]

[2014-08-20T23:04:43.273+0200] [glassfish 4.1] [FINE] [] [javax.enterprise.resource.webcontainer.jsf.config] [tid: _ThreadID=170 _ThreadName=Thread-32] [timeMillis: 1408568683273] [levelValue: 500] [CLASSNAME: com.sun.faces.config.WebConfiguration] [METHODNAME: processJndiEntries] [[
  javax.naming.NamingException: Lookup failed for 'java:comp/BeanManager' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NamingException: Error retrieving java:comp/BeanManager [Root exception is java.lang.IllegalStateException: Cannot resolve bean manager]]]]

[2014-08-20T23:04:43.273+0200] [glassfish 4.1] [FINE] [] [javax.enterprise.resource.webcontainer.jsf.config] [tid: _ThreadID=170 _ThreadName=Thread-32] [timeMillis: 1408568683273] [levelValue: 500] [CLASSNAME: com.sun.faces.config.WebConfiguration] [METHODNAME: processJndiEntries] [[
  javax.naming.NamingException: Lookup failed for 'java:comp/env/BeanManager' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NameNotFoundException: No object bound to name java:comp/env/BeanManager]]]

Maybe I got some idea - my test application does not contain any beans and does not need injections ... I will take a look in the morning ... now I'm dead ...
(also catching Throwable in BeanManagerNamingProxy is really ugly )

Comment by dmatej [ 21/Aug/14 ]

I got it - when I add empty beans.xml file to the WEB-INF directory, there are no NPE any more. It seems it is some problem with using SSO, EJB3 and old J2SE war applications in one EAR. CDI then works only partially: it works on EJB modules, but not in war modules which did not declare they want it. WeldTerminalListener is maybe initialized in war module and that is the reason why it's beanManager is null.

I will try to create the test case but I am not authorized to attach files. Can you do something with it?

Comment by dmatej [ 21/Aug/14 ]

The perfectly repeatable test case is prepared, how can I upload it?

Comment by reza_rahman [ 21/Aug/14 ]

Could you kindly send it to me for now?

Comment by dmatej [ 02/Sep/14 ]

Test case uploaded to GLASSFISH-21146 (I did a mistake in e-mail subject). I still cannot upload or change JIRA attachements so I cannot fix it ...

Comment by reza_rahman [ 02/Sep/14 ]

Please email it to me. As I may have explained, we can't enable attachments for now (and perhaps even in the long term) due to security policies.

Comment by dmatej [ 13/Sep/14 ]

Please only move the attachment from GLASSFISH-21146 here.

Comment by Wydrian [ 19/Sep/14 ]

I have the same problem with a simple struts2 based application: every time the HttpSession is invalidated (even manually by calling invalidate() or by the container), a NPE is thrown by WeldTerminalListener. It is since GF 4.1 upgrade, in 4.0 and before it was working fine. Everything seems to work normally: only the log is filled with this exeption.

2014-09-20T00:20:45.571+0200|Info: Session event listener threw exception
java.lang.NullPointerException
at org.jboss.weld.servlet.WeldTerminalListener.getSessionContext(WeldTerminalListener.java:65)
at org.jboss.weld.servlet.WeldTerminalListener.sessionDestroyed(WeldTerminalListener.java:57)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:910)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:854)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:842)
at org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1603)
at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:204)
at hu.tikkin.action.LogoutAction.execute(LogoutAction.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:289)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:252)
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)
at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:254)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:562)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
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:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
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:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
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:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:724)

Comment by cistox [ 16/Nov/15 ]

Using request.logout() as per Servlet 3.0 I have same error but different line (WeldTerminalListener.java:72):

[2015-11-16T12:21:17.108+0100] [glassfish 4.1] [INFO] [] [javax.enterprise.web.core] [tid: _ThreadID=111 _ThreadName=ContainerBackgroundProcessor[StandardEngine[glassfish-web].StandardHost[server].StandardContext[/svc]]] [timeMillis: 1447672877108] [levelValue: 800] [[
Session event listener threw exception
java.lang.NullPointerException
at org.jboss.weld.servlet.WeldTerminalListener.getSessionContext(WeldTerminalListener.java:72)
at org.jboss.weld.servlet.WeldTerminalListener.sessionDestroyed(WeldTerminalListener.java:64)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:910)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:854)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:842)
at org.apache.catalina.session.PersistentManagerBase.processExpires(PersistentManagerBase.java:785)
at org.apache.catalina.session.PersistentManagerBase.backgroundProcess(PersistentManagerBase.java:429)
at org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:6375)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1823)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1812)
at java.lang.Thread.run(Thread.java:745)

Comment by payara_steve [ 25/Feb/16 ]

If this is an old application that has no CDI beans but has EJBs try unticking Implicit CDI on deployment. This solved the issue in our test case.

Comment by lprimak [ 25/May/16 ]

This issue will be resolve in Payara with the next release





[GLASSFISH-21491] JDK9 - REFERENCES TO JDK INTERNAL API IN com.sun.corba.ee.impl.io.ObjectStreamClass Created: 25/Jan/16  Updated: 11/Jan/17

Status: Open
Project: glassfish
Component/s: JDK9
Affects Version/s: 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Arindam Bandyopadhyay Assignee: russgold
Resolution: Unresolved Votes: 0
Labels: jdk9-int
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks GLASSFISH-21441 Umbrella Issue for Glassfish testing ... Open

 Description   

There is a reference to jdk internal api in com.sun.corba.ee.impl.io.ObjectStreamClass , We are getting the following exception,
--------------
java.lang.IllegalAccessError: class com.sun.corba.ee.impl.io.ObjectStreamClass$1 (in module: Unnamed Module) cannot access class sun.corba.Bridge (in module: java.corba), sun.corba is not exported to Unnamed Module
at com.sun.corba.ee.impl.io.ObjectStreamClass$1.run(ObjectStreamClass.java:112)
at com.sun.corba.ee.impl.io.ObjectStreamClass$1.run(ObjectStreamClass.java:110)
at java.security.AccessController.doPrivileged(java.base@9.0/Native Method)
at com.sun.corba.ee.impl.io.ObjectStreamClass.<clinit>(ObjectStreamClass.java:108)
at com.sun.corba.ee.impl.util.RepositoryId.<clinit>(RepositoryId.java:189)
at com.sun.corba.ee.impl.presentation.rmi.PresentationManagerImpl$NodeImpl.getTypeId(PresentationManagerImpl.java:358)
at com.sun.corba.ee.impl.presentation.rmi.PresentationManagerImpl.addNodes(PresentationManagerImpl.java:337)
at com.sun.corba.ee.impl.presentation.rmi.PresentationManagerImpl.makeTypeIds(PresentationManagerImpl.java:328)
at com.sun.corba.ee.impl.presentation.rmi.PresentationManagerImpl.access$200(PresentationManagerImpl.java:80)
at com.sun.corba.ee.impl.presentation.rmi.PresentationManagerImpl$ClassDataImpl.<init>(PresentationManagerImpl.java:151)
at com.sun.corba.ee.impl.presentation.rmi.PresentationManagerImpl$1.lookup(PresentationManagerImpl.java:100)
at com.sun.corba.ee.impl.presentation.rmi.PresentationManagerImpl$1.lookup(PresentationManagerImpl.java:97)
at org.glassfish.pfl.basic.concurrent.WeakCache.get(WeakCache.java:114)
at com.sun.corba.ee.impl.presentation.rmi.PresentationManagerImpl.getClassData(PresentationManagerImpl.java:128)
at com.sun.corba.ee.impl.p]]

------------------------------------------------------------------
In com.sun.corba.ee.impl.io.ObjectStreamClass line #112 have the following reference .
return Bridge.get() ;
sun.corba.Bridge is a JDK internal api . So we are getting the exception . com.sun.corba.ee.impl.io.ObjectStreamClass is a maven dependency
<groupId>org.glassfish.corba</groupId>

<artifactId>glassfish-corba-orb</artifactId>
So we need the org.glassfish.corba team to fix it .



 Comments   
Comment by Arindam Bandyopadhyay [ 25/Jan/16 ]

As a work around please add -XaddExports:java.corba/sun.corba=ALL-UNNAMED java option

Comment by Arindam Bandyopadhyay [ 01/Feb/16 ]

We are getting the similar exception when we are trying to launch Application Client Container. So as a work around please add the following line glassfish4/glassfish/bin/appclient file
export VMARGS="-XaddExports:java.corba/sun.corba=ALL-UNNAMED"





[GLASSFISH-21506] JDK9 - REFERENCES TO JDK INTERNAL API IN com.sun.corba.ee.impl.io.FVDCodeBaseImpl - Unable to launch the Application Client Container Created: 01/Feb/16  Updated: 11/Jan/17

Status: Open
Project: glassfish
Component/s: JDK9
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Arindam Bandyopadhyay Assignee: russgold
Resolution: Unresolved Votes: 0
Labels: jdk9-int
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks GLASSFISH-21441 Umbrella Issue for Glassfish testing ... Open
Tags: jdk9-int

 Description   

In JDK9 we are unable to launch the Application Client Container due to REFERENCES TO JDK INTERNAL API IN com.sun.corba.ee.impl.io.FVDCodeBaseImpl . We are getting the following exception.
com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Unresolved Message-Destination-Ref MsgBeanQueue@java.lang.String@null into class com.sun.mdb.client.Client: superclass access check failed: class com.sun.corba.ee.impl.io.FVDCodeBaseImpl (in unnamed module @0x3532ec19) cannot access class com.sun.org.omg.SendingContext._CodeBaseImplBase (in module java.corba) because module java.corba does not export com.sun.org.omg.SendingContext to unnamed module @0x3532ec19
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:740)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:507)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:235)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:227)
at org.glassfish.appclient.client.acc.AppClientContainer$ClientMainClassSetting.getClientMainClass(AppClientContainer.java:636)
at org.glassfish.appclient.client.acc.AppClientContainer.getMainMethod(AppClientContainer.java:525)
at org.glassfish.appclient.client.acc.AppClientContainer.completePreparation(AppClientContainer.java:419)
at org.glassfish.appclient.client.acc.AppClientContainer.prepare(AppClientContainer.java:320)
at org.glassfish.appclient.client.AppClientFacade.prepareACC(AppClientFacade.java:283)
at org.glassfish.appclient.client.acc.agent.AppClientContainerAgent.premain(AppClientContainerAgent.java:83)
at sun.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:531)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(java.instrument@9-ea/InstrumentationImpl.java:388)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(java.instrument@9-ea/InstrumentationImpl.java:400)
Caused by: java.lang.IllegalAccessError: superclass access check failed: class com.sun.corba.ee.impl.io.FVDCodeBaseImpl (in unnamed module @0x3532ec19) cannot access class com.sun.org.omg.SendingContext._CodeBaseImplBase (in module java.corba) because module java.corba does not export com.sun.org.omg.SendingContext to unnamed module @0x3532ec19
at java.lang.ClassLoader.defineClass1(java.base@9-ea/Native Method)
at java.lang.ClassLoader.defineClass(java.base@9-ea/ClassLoader.java:930)
at java.security.SecureClassLoader.defineClass(java.base@9-ea/SecureClassLoader.java:152)
at java.net.URLClassLoader.defineClass(java.base@9-ea/URLClassLoader.java:462)
at java.net.URLClassLoader.access$100(java.base@9-ea/URLClassLoader.java:75)
at java.net.URLClassLoader$1.run(java.base@9-ea/URLClassLoader.java:370)
at java.net.URLClassLoader$1.run(java.base@9-ea/URLClassLoader.java:364)
at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method)
at java.net.URLClassLoader.findClass(java.base@9-ea/URLClassLoader.java:363)
at java.lang.ClassLoader.loadClass(java.base@9-ea/ClassLoader.java:440)
at java.lang.ClassLoader.loadClass(java.base@9-ea/ClassLoader.java:373)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.getRunTimeCodeBase(ValueHandlerImpl.java:342)
at com.sun.corba.ee.impl.orb.ORBImpl.getFVDCodeBaseIOR(ORBImpl.java:980)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:585)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.getORB(GlassFishORBManager.java:256)
at org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl.createORB(GlassFishORBFactoryImpl.java:93)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:163)
at com.sun.enterprise.naming.impl.SerialContext.getORB(SerialContext.java:347)
at com.sun.enterprise.naming.impl.SerialContext.getProviderCacheKey(SerialContext.java:354)
at com.sun.enterprise.naming.impl.SerialContext.getRemoteProvider(SerialContext.java:384)
at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:329)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:477)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at javax.naming.InitialContext.lookup(java.naming@9-ea/InitialContext.java:409)
at com.sun.enterprise.naming.util.JndiNamingObjectFactory.create(JndiNamingObjectFactory.java:82)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:745)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:715)
at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:159)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:471)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at javax.naming.InitialContext.lookup(java.naming@9-ea/InitialContext.java:409)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:638)
... 15 more
------------------------------------------------------------------------------------------------------------------------------
com.sun.corba.ee.impl.io.FVDCodeBaseImpl is a maven dependency
<groupId>org.glassfish.corba</groupId>

<artifactId>glassfish-corba-orb</artifactId>
So we need the org.glassfish.corba team to fix it .



 Comments   
Comment by Arindam Bandyopadhyay [ 01/Feb/16 ]

As a work around please add the following line glassfish4/glassfish/bin/appclient file
export VMARGS="-XaddExports:java.corba/com.sun.org.omg.SendingContext=ALL-UNNAMED"





[GLASSFISH-21593] Problem viewing batch job execution information after running many jobs Created: 18/Nov/16  Updated: 11/Jan/17

Status: Open
Project: glassfish
Component/s: admin, admin_gui, batch
Affects Version/s: 4.1, 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: gregn123 Assignee: sumasri
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

If a large number of batch jobs are run, then the Admin Console's "Batch Job Executions" screen can take a long time to display the batch job executions, This is because Glassfish effectively loads the WHOLE table of information, rather than loading it in chunks, as required. During this load time the screen freezes and is unresponsive. The time to wait for results to be displayed gets longer and longer as more and more batch jobs are run over time and the database grows in size. If there are 1000s of batch job execution results, then it can take minutes before displaying the results on the screen and becoming responsive again (depending upon the database used and computer's memory and processor specification etc.). As an example, in my case it took about 10 minutes for 2000+ batch job executions.

There is also the possibility of an out-of-memory condition for a sufficiently large number of batch job executions.

The "list-batch-jobs" and "list-batch-job-executions" asadmin sub-commands suffer the same problems.






[GLASSFISH-21589] Problems with resource deletion if all resource targets are deleted Created: 15/Nov/16  Updated: 11/Jan/17

Status: Open
Project: glassfish
Component/s: admin, admin_gui, command_line_interface, rest-interface
Affects Version/s: 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: gregn123 Assignee: sumasri
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

If all the targets of a resource are subsequently deleted, then attempting to delete the resource fails.

In the Admin Console, a bad error message is displayed when resource deletion is attempted in this case - see below for more details. If the target is re-created, then the resource can be deleted.

Here are simple steps to reproduce the problem in the Admin Console:

1) Create a cluster "cluster1"
2) Create a resource with target "cluster1" (only)
3) Delete cluster "cluster1"
4) Attempt to delete the resource -> bad error message

Example error messages for the different resource types are given below:

JMS Connection Factory:
An error has occurred
JMS Resource MyConnFactory not found

{Note: resource actually exists in the above case}

JMS Destination Resource:
An error has occurred
Unexpected char 'A' near: Admin object resource [ MyDest !

JNDI (Custom Resources)
An error has occurred
Unexpected char 'C' near: Custom resource [ myjndi ] is n!

JDBC
An error has occurred
Unexpected char 'j' near: jdbc-resource [ MyJDBCRes ] is !

Connector Resource
An error has occurred
Unexpected char 'C' near: Connector resource [ myconn ] i!

Admin Object:
An error has occurred
Unexpected char 'A' near: Admin object resource [ MyObj ]!

JavaMail:
An error has occurred
Unexpected char 'M' near: Mail resource [ MyMail ] is not!

If the suggested patch to rest-service.jar ("org.glassfish.admin.rest.resources.TemplateRestResource" class) that is described in GLASSFISH-21587 is applied, then the error message is correctly displayed as:

xxxx-resource [ NAME ] is not referenced in target [ server ]

Note that in the Admin Console, "server" just can't simply be added back as a target for the resource, as the "Target" tab and "Manage Targets" are hidden in this case, as "server" is the only available target.

At the command-line, there seems to be two ways to then delete the resource in this case:
i) Create a resource-ref from target "server" to the resource, then delete using the "asadmin delete-xxxx ..." command.
ii) Delete the resource by including "--target domain" in the "asadmin delete-xxxx ..." command.

However, for an Admin Object, "--target domain" is NOT supported for the "delete-admin-object" command:

   asadmin delete-admin-object --target domain MyAdminObj
   remote failure: Target domain is not a supported type. Command delete-admin-object supports these types of targets only: Cluster, Stand alone instance, Default server, Config,
   Command delete-admin-object failed.

It is not clear why the "domain" target is allowed for the other resource types, but disallowed for Admin Object, especially when the Glassfish4 documentation, and the command help ("--help" option) for the "delete-admin-object" command, target option, says:

               Note
               +----------------------------------------+
               |Resources are always created for a      |
               |domain as a whole but are only active   |
               |for targets for which a <resource-ref>  |
               |has been created using the --target     |
               |option when the resource was created.   |
               |This means that deleting a resource     |
               |only deletes the <resource-ref> element |
               |for the specified --target, and does    |
               |not delete the resource from the domain |
               |as a whole unless domain is specified   |
               |as the --target for the deletion.       |
               +----------------------------------------+

Summary:
1) Error message needs fixing in Admin Console, for case when all resource targets are deleted and resource deletion is attempted.
2) Admin Console seems to be lacking ability to delete such a resource.
3) Clarification required for the "delete-admin-object" command and use of "--target domain". Documentation and online help for the command need to be made consistent with the functionality.






[GLASSFISH-21587] Detailed error message is not displayed on many screens - only "An error has occurred" is displayed Created: 11/Nov/16  Updated: 11/Jan/17

Status: Open
Project: glassfish
Component/s: admin, admin_gui, hk2
Affects Version/s: 4.1, 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: gregn123 Assignee: sumasri
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

As part of field validation for Admin Console screens, typically on a "Save" operation, a detailed error message may be displayed on the screen if an invalid field value has been specified.
For example, this may occur if the field value is out-of-range, conflicts with something else or has invalid contents etc.
I am specifically referring to the case when the value is not validated by Javascript on the page, but rather found to be invalid by a Glassfish internal RESTful web-service used for processing the field data.

What is noticeable in Glassfish 4.1 and above, is that for screen field values that fail validation by Glassfish internal web-services, rather than on-page validation by Javascript, in many cases the detailed error message is MISSING. Only "! An error has occurred" is displayed (which is insufficient in order to understand what error actually occurred). The detailed error message, which normally is displayed under this, is not displayed. Note that this problem didn't exist in GlassfishV3 (at worst, the detailed error message was "Check server log for more information").

Simple example cases of this "missing detailed error message" issue occur with integer-based fields, for example:

(i) "Deployment Order" for "Edit Connector Resource" screen (use value: 9999999999)
(ii) "Buffer Size" on the "Edit Transport" screen (use value: 8192999999)

You could argue that these screens should be fixed to consistently validate field data on-page using Javascript only, in these particular cases (and they probably should), however there are some things that can ONLY be validated by sending them back to Glassfish. In this case, when validation fails, a detailed error message is MEANT to be returned and displayed on the screen.

The missing detailed error message results from a combination of bugs in Glassfish's REST error-handling code, in the "org.glassfish.admin.rest.resources.TemplateRestResource" class:

1) This class was modified in Glassfish4 to throw WebApplicationExceptions instead of returning Responses. However, in the "doCreateOrUpdate" method, there already is an outer catch block that will catch these exceptions and wrap them in ANOTHER WebApplicationException (with code INTERNAL_SERVER_ERROR and blank error message), and this effectively hides the inner error message, when the outer WebApplicationException is caught and processed at a higher level.
2) The "handleError" method builds a Response with a plain-text message, which is contrary to the response header content type (json), and the resulting response cannot be parsed (conversion of json to plain text fails).

I have constructed the following 4.1.1 patch to correct these two issues (same patch code will work with Glassfish5):


-- TemplateRestResource.java	(revision 64111)
+++ TemplateRestResource.java	(working copy)
@@ -234,16 +234,18 @@
                 return new RestActionReporter();
             }
             //just update it.
             data = ResourceUtil.translateCamelCasedNamesToXMLNames(data);
             RestActionReporter ar = Util.applyChanges(data, uriInfo, getSubject());
             if (ar.getActionExitCode() != ActionReport.ExitCode.SUCCESS) {
-                throwError(Status.BAD_REQUEST, "Could not apply changes" + ar.getMessage()); // i18n
+                throwError(Status.BAD_REQUEST, "Could not apply changes: " + ar.getMessage()); // i18n
             }
 
             return ar;
+        } catch (WebApplicationException wae) {
+            throw wae;
         } catch (Exception ex) {
             throw new WebApplicationException(ex, Response.Status.INTERNAL_SERVER_ERROR);
         }
     }
 
     protected ExitCode doDelete(HashMap<String, String> data) {
@@ -634,9 +636,16 @@
         throw new WebApplicationException(handleError(error, message));
     }
 
     protected Response handleError(final Status error, final String message) throws WebApplicationException {
         //TODO better error handling.
 //                return Response.status(400).entity(ResourceUtil.getActionReportResult(ar, "Could not apply changes" + ar.getMessage(), requestHeaders, uriInfo)).build();
-        return Response.status(error).entity(message).build();
+        //return Response.status(error).entity(message).build();
+        // BUG-FIX
+        // The original line of code (commented-out below) builds a Response with a plain-text message, which is contrary to the response header content type (json).
+        // The resulting response cannot be parsed (conversion of json to plain text fails).
+        // This response parsing error never happened in the original GF code because the thrown WebApplicationException was
+        // erroneously wrapped with another WebApplicationException which had an INTERNAL_SERVER_ERROR status code and a blamk message.
+        // return Response.status(error).entity(message).build();
+        return Response.status(error).entity(ResourceUtil.getActionReportResult(ActionReport.ExitCode.FAILURE, message, requestHeaders, uriInfo)).build();
     }
 }

With this patch applied, an additional detailed message is displayed, like the following, for example case (i) mentioned above:

Could not apply changes: Could not change the attributes: javax.validation.ConstraintViolationException: Constraints for this ConnectorResource configuration have been violated: on property [ org.jvnet.hk2.config.WriteableView$4$2@726e42e9 ] violation reason [ is not of data type:java.lang.Integer ]

There still is a minor problem though. In the above error message you will notice that the property name is "org.jvnet.hk2.config.WriteableView$4$2@726e42e9", rather than the actual property name.
This appears to be because of a problem in one of the HK2 configuration classes (org.jvnet.hk2.config.WriteableView) in “hk2-config.jar”. The code in question is shown below, with the problem line highlighted using ★★.

private void handleValidationException(Set constraintViolations) throws ConstraintViolationException {

        if (constraintViolations != null && !constraintViolations.isEmpty()) {
            Iterator<ConstraintViolation<ConfigBeanProxy>> it = constraintViolations.iterator();

            StringBuilder sb = new StringBuilder();
            sb.append(MessageFormat.format(i18n.getString("bean.validation.failure"), this.<ConfigBeanProxy>getProxyType().getSimpleName()));
            String violationMsg = i18n.getString("bean.validation.constraintViolation");
            while (it.hasNext()) {
                ConstraintViolation cv = it.next();
                sb.append(" ");
                sb.append(MessageFormat.format(violationMsg, cv.getMessage(), cv.getPropertyPath()));  //★★
                if (it.hasNext()) {
                    sb.append(i18n.getString("bean.validation.separator"));
                }
            }
            bean.getLock().unlock();
            throw new ConstraintViolationException(sb.toString(), constraintViolations);
        }
}

★★The call to “cv.getPropertyPath()” above is returning a "javax.validation.Path" instance, so the code is relying on the toString() method of the implementation class to supply the property name string, but no such toString() method has been defined. Therefore the call to “cv.getPropertyPath()” above should instead be “cv.getPropertyPath().iterator().next().getName()”.
Or, alternatively, the code above could be left unchanged, and instead a “toString()” method could be added to the Path implementation, also defined in the WriteableView class, as shown below:


                    return new javax.validation.Path() {
                        @Override
                        public Iterator<Node> iterator() {
                            return nodes.iterator();
                        }
                        @Override
                        public String toString() {  //★★
                            return nodes.iterator().next().getName();
                        }
                    };

With the above fix applied, the displayed error message then correctly includes the actual property name, as shown below:

Could not apply changes: Could not change the attributes: javax.validation.ConstraintViolationException: Constraints for this ConnectorResource configuration have been violated: on property [ deployment-order ] violation reason [ is not of data type:java.lang.Integer ]






[GLASSFISH-21641] Spring Boot crash down admin console & server Created: 16/Dec/16  Updated: 11/Jan/17

Status: Open
Project: glassfish
Component/s: deployment
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: pnowy Assignee: Vinay Vishal
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

windows 10



 Description   

There is a blocker problem with the SpringBoot application and the Glassfish server. In order to create situation you have to:

1. Download the latest version of Glassfish: Java EE 7 Full Platform glassfish-4.1.1.zip
2. Download the official test deployment spring boot application from maven (war file): https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-deployment-test-glassfish/1.4.2.RELEASE
3. Run the domain by asadmin start-domain
4. Deploy the spring boot application by admin console on port 4848 under path /boot (for the admin console you would have not required provide the password and username in default configuration)
5. Check whether everything is ok (application and server should work fine)
6. Goes under http://localhost:8080/boot - you should see Hello World from deployed boot application
7. Stop the domain by asadmin stop-domain
8. Start the domain by asadmin start-domain
9. Try to list domains by asadmin list-domains, you will get as a result domain1 is not running
10. Try to run the admin console on http://localhost:4848/, you will see the page for user & password but any password has not been defined
11. The deployed application doesn't work after restart
12. The server logs don't provide any clear information what's going on and why everything stopped working

The mentioned official Spring Boot application is a minimal boot application. I've been trying to add the web.xml with metadata-complete in order to eliminate the warnings about the ClassNotFound exception (despite that is should be fixed on 4.1.1 version according to Jira ticket https://java.net/jira/browse/GLASSFISH-21265) and glassfish-web.xml with '<class-loader delegate="false"/>' and also beans.xml according with the following discussion: https://github.com/spring-projects/spring-boot/issues/1355. Any of this changes did not help and simple spring boot application crush down entire glassfish server. For me it's a serious blocker error.

Could you suggest any solution for this problem? I will be grateful for any suggestions or hints.



 Comments   
Comment by pnowy [ 16/Dec/16 ]

JRE: Java(TM) SE Runtime Environment (build 1.8.0_91-b14)

Comment by srinik76 [ 10/Jan/17 ]

Tried reproducing in linux able to reproduce. Deploy thru console and restarting the server causes NPE and domain is not properly started. Deployed through CLI and the result is same.

Error is not in console but in deployment module. Need to debug more in this.

Comment by srinik76 [ 11/Jan/17 ]

Confirmed this is issue with deployment. Discussed with Yamini transferring to deployment module. Assigning to Vinay.





[GLASSFISH-21293] DAS becomes deadlock at start-up after setting log level Created: 22/Jan/15  Updated: 11/Jan/17

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: xj Assignee: Kokil_Jain
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS: Windows 8.1 64bits
RI: glassfish-4.1
JDK: 7u25, 8u20


Tags: javaee_ri_target

 Description   

Follow the steps below, asadmin command waits for a response forever.

(1)asadmin create-domain --nopassword=true mydomain
(2)asadmin start-domain mydomain
(3)asadmin set-log-levels org.jvnet.hk2.osgiadapter=FINER
(4)asadmin stop-domain mydomain
(5)asadmin start-domain mydomain

Here is a thread dump for this.
It looks like a deadlock happened on these threads.
"RunLevelControllerThread-1421897830803" daemon prio=6 tid=0x000000000ba99800
"RunLevelControllerThread-1421897830796" daemon prio=6 tid=0x000000000b99f000

2015-01-22 12:44:33
Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.76-b04 mixed mode):

"pool-1-thread-1" daemon prio=6 tid=0x000000000bb1b800 nid=0x3fe4 waiting on condition [0x000000000d98f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)

  • parking to wait for <0x00000000f7fd57f0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2082)
    at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1090)
    at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:807)
    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

"RunLevelControllerThread-1421897830803" daemon prio=6 tid=0x000000000ba99800 nid=0x2c20 in Object.wait() [0x000000000e0de000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)

  • waiting on <0x00000000f7879d08> (a org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext)
    at java.lang.Object.wait(Object.java:503)
    at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:188)
  • locked <0x00000000f7879d08> (a org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext)
    at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
  • locked <0x00000000f86b5398> (a java.lang.Object)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:647)
    at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:77)
    at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:214)
    at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:237)
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:360)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
    at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
    at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
  • locked <0x00000000f7d55060> (a java.lang.Object)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

"RunLevelControllerThread-1421897830796" daemon prio=6 tid=0x000000000b99f000 nid=0x2398 waiting on condition [0x000000000dd5c000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)

  • parking to wait for <0x00000000f85fbde8> (a java.util.concurrent.FutureTask)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
    at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:425)
    at java.util.concurrent.FutureTask.get(FutureTask.java:187)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture.get(LRUHybridCache.java:164)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache.compute(LRUHybridCache.java:303)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetDescriptor(ServiceLocatorImpl.java:1147)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:687)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:655)
    at com.sun.enterprise.server.logging.UniformLogFormatter.getProductId(UniformLogFormatter.java:192)
    at com.sun.enterprise.server.logging.UniformLogFormatter.uniformLogFormat(UniformLogFormatter.java:291)
    at com.sun.enterprise.server.logging.UniformLogFormatter.format(UniformLogFormatter.java:178)
    at java.util.logging.StreamHandler.publish(StreamHandler.java:196)
  • locked <0x00000000f85b3260> (a java.util.logging.ConsoleHandler)
    at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:105)
    at java.util.logging.Logger.log(Logger.java:616)
    at java.util.logging.Logger.doLog(Logger.java:641)
    at java.util.logging.Logger.logp(Logger.java:810)
    at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:181)
  • locked <0x00000000e1045178> (a org.jvnet.hk2.osgiadapter.OSGiModuleImpl)
    at org.jvnet.hk2.osgiadapter.OsgiPopulatorPostProcessor$1.loadClass(OsgiPopulatorPostProcessor.java:77)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.loadClass(ServiceLocatorImpl.java:2058)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.reifyDescriptor(ServiceLocatorImpl.java:413)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.narrow(ServiceLocatorImpl.java:2120)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.access$900(ServiceLocatorImpl.java:119)
    at org.jvnet.hk2.internal.ServiceLocatorImpl$8.compute(ServiceLocatorImpl.java:1063)
    at org.jvnet.hk2.internal.ServiceLocatorImpl$8.compute(ServiceLocatorImpl.java:1058)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture$1.call(LRUHybridCache.java:115)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture$1.call(LRUHybridCache.java:111)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture.run(LRUHybridCache.java:173)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache.compute(LRUHybridCache.java:292)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetDescriptor(ServiceLocatorImpl.java:1147)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:687)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:655)
    at com.sun.enterprise.server.logging.UniformLogFormatter.getProductId(UniformLogFormatter.java:192)
    at com.sun.enterprise.server.logging.UniformLogFormatter.uniformLogFormat(UniformLogFormatter.java:291)
    at com.sun.enterprise.server.logging.UniformLogFormatter.format(UniformLogFormatter.java:178)
    at java.util.logging.StreamHandler.publish(StreamHandler.java:196)
  • locked <0x00000000f85b3260> (a java.util.logging.ConsoleHandler)
    at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:105)
    at java.util.logging.Logger.log(Logger.java:616)
    at java.util.logging.Logger.doLog(Logger.java:641)
    at java.util.logging.Logger.logp(Logger.java:810)
    at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:181)
  • locked <0x00000000e103b210> (a org.jvnet.hk2.osgiadapter.OSGiModuleImpl)
    at org.jvnet.hk2.osgiadapter.OsgiPopulatorPostProcessor$1.loadClass(OsgiPopulatorPostProcessor.java:77)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.loadClass(ServiceLocatorImpl.java:2058)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.reifyDescriptor(ServiceLocatorImpl.java:413)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.narrow(ServiceLocatorImpl.java:2120)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.access$900(ServiceLocatorImpl.java:119)
    at org.jvnet.hk2.internal.ServiceLocatorImpl$10.compute(ServiceLocatorImpl.java:1260)
    at org.jvnet.hk2.internal.ServiceLocatorImpl$10.compute(ServiceLocatorImpl.java:1255)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture$1.call(LRUHybridCache.java:115)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture$1.call(LRUHybridCache.java:111)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture.run(LRUHybridCache.java:173)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache.compute(LRUHybridCache.java:292)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetAllServiceHandles(ServiceLocatorImpl.java:1333)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getAllServices(ServiceLocatorImpl.java:726)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getAllServices(ServiceLocatorImpl.java:714)
    at com.sun.enterprise.server.logging.LogManagerService.getHandlerServices(LogManagerService.java:639)
    at com.sun.enterprise.server.logging.LogManagerService.postConstruct(LogManagerService.java:404)
    at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:329)
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:377)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461)
    at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227)
    at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105)
  • locked <0x00000000f7d54fd8> (a java.lang.Object)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

"Timer-0" daemon prio=6 tid=0x0000000009eec000 nid=0x2b70 in Object.wait() [0x000000000dabf000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)

  • waiting on <0x00000000f786d2a0> (a java.util.TaskQueue)
    at java.lang.Object.wait(Object.java:503)
    at java.util.TimerThread.mainLoop(Timer.java:526)
  • locked <0x00000000f786d2a0> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:505)

"FelixStartLevel" daemon prio=6 tid=0x000000000a011800 nid=0x1b28 in Object.wait() [0x000000000a3ae000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)

  • waiting on <0x00000000f9be27a8> (a java.util.ArrayList)
    at java.lang.Object.wait(Object.java:503)
    at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:279)
  • locked <0x00000000f9be27a8> (a java.util.ArrayList)
    at java.lang.Thread.run(Thread.java:745)

"FelixDispatchQueue" daemon prio=6 tid=0x000000000906f000 nid=0xfc0 in Object.wait() [0x000000000923e000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)

  • waiting on <0x00000000f9c16020> (a java.util.ArrayList)
    at java.lang.Object.wait(Object.java:503)
    at org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:1063)
  • locked <0x00000000f9c16020> (a java.util.ArrayList)
    at org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:54)
    at org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:101)
    at java.lang.Thread.run(Thread.java:745)

"Service Thread" daemon prio=6 tid=0x0000000008d77000 nid=0x136c runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" daemon prio=10 tid=0x0000000008d5b000 nid=0x17b0 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" daemon prio=10 tid=0x0000000008d5a000 nid=0x382c waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Attach Listener" daemon prio=10 tid=0x00000000076ed000 nid=0x439c runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" daemon prio=10 tid=0x00000000076e4800 nid=0x3f50 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=8 tid=0x000000000767f000 nid=0x13ec in Object.wait() [0x0000000008b6f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)

  • waiting on <0x00000000e09c93b8> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
  • locked <0x00000000e09c93b8> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)

"Reference Handler" daemon prio=10 tid=0x0000000007678000 nid=0x4014 in Object.wait() [0x000000000899f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)

  • waiting on <0x00000000e09b4e98> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:503)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)
  • locked <0x00000000e09b4e98> (a java.lang.ref.Reference$Lock)

"main" prio=6 tid=0x00000000020fe800 nid=0x2304 in Object.wait() [0x000000000261e000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)

  • waiting on <0x00000000f7cad488> (a java.lang.Object)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpAllTheWay.waitForResult(CurrentTaskFuture.java:485)
  • locked <0x00000000f7cad488> (a java.lang.Object)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture.get(CurrentTaskFuture.java:334)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture.get(CurrentTaskFuture.java:306)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFutureWrapper.get(CurrentTaskFutureWrapper.java:75)
    at org.glassfish.hk2.runlevel.internal.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:73)
    at com.sun.enterprise.v3.server.AppServerStartup.proceedTo(AppServerStartup.java:534)
    at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:315)
    at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:228)
    at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:219)
  • locked <0x00000000f7c3c538> (a com.sun.enterprise.v3.server.AppServerStartup)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
  • locked <0x00000000f7c486a0> (a com.sun.enterprise.glassfish.bootstrap.GlassFishImpl)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63)
    at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl.start(EmbeddedOSGiGlassFishImpl.java:75)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63)
    at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishImpl.start(OSGiGlassFishImpl.java:71)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:117)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
    at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)

"VM Thread" prio=10 tid=0x0000000007674800 nid=0x4098 runnable

"GC task thread#0 (ParallelGC)" prio=6 tid=0x0000000002114000 nid=0x4080 runnable

"GC task thread#1 (ParallelGC)" prio=6 tid=0x0000000002115800 nid=0x2588 runnable

"GC task thread#2 (ParallelGC)" prio=6 tid=0x0000000002117000 nid=0x1568 runnable

"GC task thread#3 (ParallelGC)" prio=6 tid=0x0000000002118800 nid=0x3ad4 runnable

"VM Periodic Task Thread" prio=10 tid=0x0000000008d6c000 nid=0xddc waiting on condition

JNI global references: 370






[GLASSFISH-21577] Thread name logged by System.out.println is always the same. Created: 01/Nov/16  Updated: 11/Jan/17

Status: Open
Project: glassfish
Component/s: logging
Affects Version/s: 4.1, 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yama0428 Assignee: mskdeepak
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Thread name logged by System.out.println in Servlet is always the same and is not valid because Servlet does not work on "Thread-8".
I expect "http-listener-1(1)" is logged.

[2016-11-01T16:08:41.718+0900] [glassfish 4.1] [INFO] [] [] [tid: _ThreadID=43 _ThreadName=Thread-8] [timeMillis: 1477984121718] [levelValue: 800] [[
  This is System.out.print() message1.]]

[2016-11-01T16:17:52.307+0900] [glassfish 4.1] [INFO] [] [] [tid: _ThreadID=42 _ThreadName=Thread-8] [timeMillis: 1477984672307] [levelValue: 800] [[
  This is System.out.print() message1.]]





[GLASSFISH-21580] WebappClassLoader is not thread safe Created: 02/Nov/16  Updated: 11/Jan/17

Status: Open
Project: glassfish
Component/s: classloader
Affects Version/s: 3.1.2.2, 4.1, 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yama0428 Assignee: pranjal.sahay
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

WebappClassLoader is not thread safe.
When I sent a request to a jsp which includes frames, following exception occurred.

[2016-11-02T10:27:19.978+0900] [glassfish 4.1] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=28 _ThreadName=http-listener-1(3)] [timeMillis: 1478050039978] [levelValue: 900] [[
  StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
java.lang.LinkageError: loader (instance of  org/glassfish/web/loader/WebappClassLoader): attempted  duplicate class definition for name: "com/sample/j2eesamples/servlet/hello/TestBean"
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:1256)
	at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1750)
	at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1633)
	at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1174)
	at org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1167)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2347)
	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2353)
	at org.apache.jasper.compiler.Node$Root.accept(Node.java:499)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297)
	at org.apache.jasper.compiler.Generator.generate(Generator.java:3485)
	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:255)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:625)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
	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(Thread.java:722)
]]

This bug is also reported in Tomcat, and fixed.
https://bz.apache.org/bugzilla/show_bug.cgi?id=44041

So I think this is the patch for this problem.

org.glassfish.web.loader.WebappClassLoader.java
    @Override
-    protected Class<?> loadClass(String name, boolean resolve)
+    protected synchronized Class<?> loadClass(String name, boolean resolve)
        throws ClassNotFoundException {

        if (logger.isLoggable(Level.FINER)) {
            logger.log(Level.FINER, "loadClass(" + name + ")");
        }





[GLASSFISH-21586] GlassFish Requires its own cacerts file or won't start and displays misleading message Created: 10/Nov/16  Updated: 11/Jan/17

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: slominskir Assignee: Yamini K B
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

If you delete the -Djavax.net.ssl.trustStore JVM option in GlassFish it will still look for that cacerts.jks file and will refuse to start without it. I was hoping to have GlassFish just use the cacerts.jks that comes with Java instead of its own. Looks like the master password related code is hard-coded to require the GlassFish specific cacerts.jks file regardless of JVM option as asadmin start-domain fails with wrong master password error if this file is missing. Put the file back and the "wrong master password" error goes away.






[GLASSFISH-21590] Can't create Connector Connection Pool for inbound RA deployed on a cluster Created: 16/Nov/16  Updated: 11/Jan/17

Status: Open
Project: glassfish
Component/s: admin, classloader
Affects Version/s: 4.1, 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: gregn123 Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

If an Inbound Resource Adapter (RA) is deployed on a cluster, then subsequent creation of a Connector Connection Pool for that RA will fail, due to a ClassNotFoundException for the ActivationSpec class.
If fhe RA is instead deployed on server (instead of a cluster), then the creation of the Connector Connection Pool succeeds.

To reproduce the problem:

1) Download Oracle's "Generic Resource Adapter for JMS" from here:

http://genericjmsra.java.net/docs/Releases.html

2) Create a cluster with single instance c1_1, and start the cluster:

asadmin create-cluster cluster1
asadmin create-instance --node localhost-domain1 --cluster cluster1 c1_1
asadmin start-cluster cluster1

3) Deploy the RA on the cluster:

asadmin deploy --target cluster1 genericra.rar

4) Attempt to create Connector Connection Pool for the RA:

asadmin create-connector-connection-pool --raname genericra --connectiondefinition javax.jms.QueueConnectionFactory genericra_pool
remote failure: Connector connection pool genericra_pool creation failed. Unable to load class [ com.sun.genericra.inbound.ActivationSpec ]
Unable to load class [ com.sun.genericra.inbound.ActivationSpec ]
Command create-connector-connection-pool failed.

The "server.log" file shows the following stacktrace:

[2016-11-16T16:17:08.492+1100] [glassfish 5.0] [WARNING] [] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.deployment.util] [tid: _ThreadID=74 _ThreadName=admin-listener(5)] [timeMillis: 1479273428492] [levelValue: 900] [[
  Unable to load class [ com.sun.genericra.inbound.ActivationSpec ]
java.lang.ClassNotFoundException: com.sun.genericra.inbound.ActivationSpec
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at com.sun.enterprise.connectors.deployment.util.ConnectorValidator.getClass(ConnectorValidator.java:239)
	at com.sun.enterprise.connectors.deployment.util.ConnectorValidator.validateActivationSpec(ConnectorValidator.java:155)
	at com.sun.enterprise.connectors.deployment.util.ConnectorValidator.accept(ConnectorValidator.java:79)
	at com.sun.enterprise.connectors.deployment.util.ConnectorValidator.accept(ConnectorValidator.java:72)
	at com.sun.enterprise.deployment.BundleDescriptor.visit(BundleDescriptor.java:625)
	at com.sun.enterprise.connectors.deployment.util.ConnectorArchivist.postOpen(ConnectorArchivist.java:173)
	at com.sun.enterprise.connectors.deployment.util.ConnectorArchivist.postOpen(ConnectorArchivist.java:72)
	at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:273)
	at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280)
	at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241)
	at com.sun.enterprise.connectors.util.ConnectorDDTransformUtils.getConnectorDescriptor(ConnectorDDTransformUtils.java:236)

It appears that, within Glassfish, there is common code that is executed during deployment and Connector Connection Pool creation, which accesses and validates the ActivationSpec class that is stored in the RA's JAR file (within the RAR file), but the calling thread's ContextClassLoader is not setup correctly in the later case for accessing classes within the JAR file, so it fails.






[GLASSFISH-21645] maxopenconnections of HttpServiceStatsProvider is always the same. Created: 21/Dec/16  Updated: 11/Jan/17

Status: Open
Project: glassfish
Component/s: monitoring, web_container
Affects Version/s: 3.1.2.2, 4.1, 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yama0428 Assignee: srinik76
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

maxopenconnections of HttpServiceStatsProvider is always the same.

The count value doesn't increase even if requests are sent,
http://localhost:4848/monitoring/domain1/server/http-service/server/request/maxopenconnections

maxopenconnections

    count : 250
    lastsampletime : 1482277918518
    description : The maximum number of open connections
    unit : count
    name : MaxOpenConnections
    starttime : 1482277664689

I think the value of maxopenconnections should increase if requests are sent to web container.

This is the patch for improvement.

HttpServiceStatsProvider.java
    private AtomicLong maxOpenConnectionsAtomic = new AtomicLong();

    // ---------------- Connection related listeners -----------
    @ProbeListener("glassfish:kernel:connection-queue:connectionAcceptedEvent")
    public void connectionAcceptedEvent(
            @ProbeParam("listenerName") String listenerName,
            @ProbeParam("connection") int connectionId,
            @ProbeParam("address") String address) {
        for (String listener : networkListeners) {
            if (listener.equals(listenerName)) {
                countOpenConnections.increment();
                final long openConnections = countOpenConnections.getCount();

                do {
                    final long maxOpenConnectionsCount = maxOpenConnectionsAtomic.get();
                    if (openConnections <= maxOpenConnectionsCount) break;

                    synchronized(maxOpenConnectionsAtomic) {
                        if (maxOpenConnectionsAtomic.compareAndSet(maxOpenConnectionsCount, openConnections)) {
                            maxOpenConnections.setCount(openConnections);
                            break;
                        }
                    }
                } while (true);
            }
        }
        if (logger.isLoggable(Level.FINEST)) {
            logger.finest(
                "[TM]connectionAcceptedEvent received - virtual-server = " + listenerName);
        }
    }





[GLASSFISH-21651] async servlet is not correctly recorded in the HTTP access log and monitoring service Created: 26/Dec/16  Updated: 11/Jan/17

Status: Open
Project: glassfish
Component/s: monitoring, web_container
Affects Version/s: 3.1.2.2, 4.1, 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yama0428 Assignee: Vinay Vishal
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Responses for async servlet are not correctly recorded in the HTTP access log and the monitoring service.

Async.java
package test.monitor;

import javax.servlet.AsyncContext;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet(asyncSupported=true, urlPatterns={"/test"})
public class Async extends HttpServlet {
    public void doGet(HttpServletRequest req, HttpServletResponse res) {
        AsyncContext ac = req.startAsync();
        ac.dispatch("/sleepfail?time=10000");
    }
}

Sleep.java
package test.monitor;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet(urlPatterns={"/sleepfail"})
public class Sleep extends HttpServlet {
    public void doGet(HttpServletRequest req, HttpServletResponse res) {
        String str = req.getParameter("time");
        long time = 10000L;
        try {
            time = Long.parseLong(str);
            Thread.sleep(time);
            res.setStatus(500);
            res.getWriter().println("This is error message.");
        } catch (Exception e) {
        }
    }
}

When I send a request to the async servlet, I got following response.

HTTP/1.1 500 Internal Server Error
Server: GlassFish Server Open Source Edition  4.1
X-Powered-By: Servlet/3.1 JSP/2.3 (GlassFish Server Open Source Edition  4.1  Java/Oracle Corporation/1.7)
Date: Mon, 26 Dec 2016 06:19:58 GMT
Connection: close
Content-Length: 24

However, http access log was logged as follows.
Status code and response size was not collect.

"0:0:0:0:0:0:0:1" "NULL-AUTH-USER" "26/Dec/2016:15:11:30 +0900" "GET /asyncmonitor/test HTTP/1.1" 200 0 

Monitoring rest service shows 200 too.
https://localhost:24855/monitoring/domain1/monitorins/http-service/server/request/count200

count200

    count : 1
    lastsampletime : 1482732760647
    description : Number of responses with a status code equal to 200
    unit : count
    name : Count200
    starttime : 1482732744592

Therefore, http access log and monitoring service should obtain statistics after sending http response, i.e. at the time when org.glassfish.grizzly.http.server.HttpServerProbe#onRequestCompleteEvent and org.glassfish.grizzly.http.HttpProbe#onErrorEvent are called.






[GLASSFISH-21655] rollback of create-jms-resource fails when resource has already existed Created: 05/Jan/17  Updated: 11/Jan/17

Status: Open
Project: glassfish
Component/s: jms
Affects Version/s: 3.1.2.2, 4.1, 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yama0428 Assignee: mskdeepak
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   



 Comments   
Comment by yama0428 [ 05/Jan/17 ]

Rollback of create-jms-resource fails when resource has already existed.

For example, aaa-Connection-Pool isn't deleted.

C:\glassfish-4.1.1\glassfish4\glassfish\bin>asadmin create-jms-resource --restype javax.jms.Topic aaa
Administered object aaa created.
Warning: Instance instance seems to be offline; command create-admin-object was not replicated to that instance
Command create-jms-resource executed successfully.

C:\glassfish-4.1.1\glassfish4\glassfish\bin>asadmin create-jms-resource --restype javax.jms.ConnectionFactory aaa
remote failure: Unable to create connection resource.
A MultiException has 1 exceptions.  They are:
1. java.lang.IllegalArgumentException:  Invalid option: raname

A MultiException has 1 exceptions.  They are:
1. java.lang.IllegalArgumentException:  Invalid option: raname

Warning: Instance instance seems to be offline; command create-connector-connection-pool was not replicated to that instance
Command create-jms-resource failed.

C:\glassfish-4.1.1\glassfish4\glassfish\bin>asadmin list-connector-connection-pools
CLI031: Warning: Option "target" is obsolete and will be ignored.
CLI031: Warning: Option "target" is obsolete and will be ignored.
jms/__defaultConnectionFactory-Connection-Pool
aaa-Connection-Pool
Command list-connector-connection-pools executed successfully.

This is the patch for this problem.

CreateJMSResource.java
    public void execute(AdminCommandContext context) {
....

          ParameterMap params = populateConnectionResourceParameters();
          commandRunner.getCommandInvocation("create-connector-resource", subReport, context.getSubject()).parameters(params).execute();

          if (ActionReport.ExitCode.FAILURE.equals(subReport.getActionExitCode())){
              report.setMessage(localStrings.getLocalString("create.jms.resource.cannotCreateConnectorResource",
                      "Unable to create connection resource."));
              report.setActionExitCode(ActionReport.ExitCode.FAILURE);

              //rollback the connection pool ONLY if we created it...
              if (createdPool) {
                  ActionReport subReportForRollback =  report.addSubActionsReport();
                  commandRunner.getCommandInvocation("delete-connector-connection-pool", subReportForRollback, context.getSubject()).parameters(populateConnectionPoolParametersForRollback()).execute();
              }


              return;
          }
....
    }

    private ParameterMap populateConnectionPoolParametersForRollback(){
        ParameterMap parameters = new ParameterMap();
        parameters.set(DEFAULT_OPERAND, jndiNameForConnectionPool);
        return parameters;
    }




[GLASSFISH-21246] Grizzly thread pool waiting on LinkedTransferQueue hangs application Created: 03/Nov/14  Updated: 10/Jan/17

Status: Open
Project: glassfish
Component/s: grizzly-kernel
Affects Version/s: 4.1_dev
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: afcarv Assignee: oleksiys
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Glassfish 4.1_b13, JDK 1.7u67, Linux CentOS 3.10.48 x64



 Description   

Elaborating on the issue I posted on GLASSFISH-21211.

After some time running, http-listener-1 thread pool stops responding. Checking the logs, I see multiple messages like the one below:

[2014-11-03T18:50:47.114+0000] [glassfish 4.1] [SEVERE] [] [org.glassfish.grizzly.nio.SelectorRunner] [tid: _ThreadID=60 _ThreadName=http-listener-1-kernel(1) SelectorRunner] [timeMillis: 1415040647114] [levelValue: 1000] [[
  doSelect exception
java.util.concurrent.RejectedExecutionException: The thread pool's task queue is full, limit: 4096
        at org.glassfish.grizzly.threadpool.AbstractThreadPool.onTaskQueueOverflow(AbstractThreadPool.java:464)
        at org.glassfish.grizzly.threadpool.QueueLimitedThreadPool.execute(QueueLimitedThreadPool.java:81)
        at org.glassfish.grizzly.threadpool.GrizzlyExecutorService.execute(GrizzlyExecutorService.java:161)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.executeIoEvent(WorkerThreadIOStrategy.java:100)
        at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:89)
        at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:414)
        at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:383)
        at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:347)
        at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:278)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
        at java.lang.Thread.run(Thread.java:744)
]]

I then took a thread dump which shows all threads in http-listener-1 in a state like the below:

"http-listener-1(31)" daemon prio=10 tid=0x00007ff19422b000 nid=0x6c61 waiting on condition [0x00007ff1f6eed000]
   java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x00000006036fd360> (a java.util.concurrent.LinkedTransferQueue)
        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
        at java.util.concurrent.LinkedTransferQueue.awaitMatch(LinkedTransferQueue.java:735)
        at java.util.concurrent.LinkedTransferQueue.xfer(LinkedTransferQueue.java:644)
        at java.util.concurrent.LinkedTransferQueue.take(LinkedTransferQueue.java:1137)
        at org.glassfish.grizzly.threadpool.FixedThreadPool$BasicWorker.getTask(FixedThreadPool.java:105)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:557)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
        at java.lang.Thread.run(Thread.java:744)

They seem to be waiting on LinkedTransferQueue take() method, which appears to be not responding (waiting for some item to arrive in the queue?). I also took a memory dump that I can look into if someone points me in the right direction.

Thought this could be related to GRIZZLY-1711 but after applying the latest version (2.3.17-SNAPSHOT) this behavior is still happening.

Let me know if I should get more data - thanks!



 Comments   
Comment by davidwinters1980 [ 03/Nov/14 ]

This appears to be occurring as a result of the http thread pool reaching its limit of 4096.

As per the default domain.xml setting:

<thread-pools>
<thread-pool name="admin-thread-pool" max-thread-pool-size="50" max-queue-size="256"></thread-pool>
<thread-pool name="http-thread-pool" max-queue-size="4096"></thread-pool>
<thread-pool name="thread-pool-1" max-thread-pool-size="200"/>
</thread-pools>

You could configure this to -1 or unlimited but this will likely lead to other issues such as out of memory etc

It would appear as though tasks are being added to this queue faster than the tasks can be processed. I would investigate why this occurring? If you could take a number of thread dumps over a period of time whereby we capture this issue occurring that would be useful.

Furthermore, it maybe worth increasing the value of your http request processing threads as this will allow more tasks to be handled concurrently off the http thread task queue and so it may reach the 4096 limit so quickly. What is the current value of the number of http request processing threads??

The issue you have here is very dependent on the number of http requests being pushed to the http task pool and how quickly these requests are being handled so appropriate tuning of the http parameters may resolve this issue. If this fails then looking at the state of all threads running over a period of time should give you a hint as to why requests are taking so long to process.

Comment by afcarv [ 03/Nov/14 ]

I don't think it's a configuration issue as the environment is able to handle much heavier loads - it may be due to specific and temporary environmental reasons (network latency, database slowdown, etc) but you'd think it would resume work as soon as this is normalized. This does not happen (waited for some hours to be sure), even if the consumer is stopped and there's no inbound traffic anymore - the only way to bring it back online is with a server/cluster restart. I did notice a lot of connections in the CLOSE_WAIT state in the server, though.

Haven't tried to raise the queue limit or remove it yet, but I suspect it would only delay the occurrence or eventually reach an OOM error.

I see no obvious reason for this looking at the thread pool dump, but will post it later for analysis. Thanks!

Comment by afcarv [ 04/Nov/14 ]

Please find attached the full thread dump and the server log file. The dump was taken about 30 minutes after the issue manifested itself - you can see all threads in the http-listener-1-kernel pool reach the queue limit and stop responding. http-thread-pool contains 32 threads; there are 8 acceptor threads.

Interestingly, http-listener-2 (SSL) continues to respond normally. http-listener-1 hanged and required a server restart. The configuration is a 2 instance cluster with a nginx load balancer in front; there are Jersey applications deployed serving RESTful webservices. The configuration can handle about 5x the average load on the server - no increased throughput was observed leading to the issue, which persisted after stopping all inbound traffic.

I will schedule a cron job to take a thread dump every 5 minutes to check on any odd behavior leading to the issue - thanks!

Thread dump: https://www.dropbox.com/s/qejdzhwejlv1zzp/threadump.txt?dl=0
Server log: https://www.dropbox.com/s/rbu24cep9y25aol/server.log?dl=0

Comment by afcarv [ 04/Nov/14 ]

Some more info I got from the memory dump -

I see lots of instances of TCPNIOConnection (1500+) in what appears to be a closing state; as the latest snapshot was applied I can see these with a CloseReason of "LOCALLY". May explain the connections in the CLOSE_WAIT state I saw? Is it possible that nginx closed the socket before a FIN packet could be sent from the server, and now it is not able to end the connection properly? Not sure if this could be just a consequence of some other issue, though.

Comment by oleksiys [ 06/Nov/14 ]

Which Grizzly version is used in 4.1_b10?

Thank you.

Comment by afcarv [ 06/Nov/14 ]

We're using b13 (couldn't find the tag for it so I selected the closest), but I believe it's the same version - 2.3.15.

Currently, 2.3.17-SNAPSHOT is applied.

By the way - we found out that what triggers this behavior is a DB performance degradation, causing the requests to queue and eventually reach the limit. No additional info on why queue isn't being reduced, though.

Comment by davidwinters1980 [ 06/Nov/14 ]

Could you take a number of thread dumps say every 5 minutes so that we can compare the different thread dump files leading up to the hang? Also could you send us on the contents of the <transports> which should contain the different tcp parameters used by Grizzly.

<transports>
<transport byte-buffer-type="HEAP" display-configuration="true" name="tcp" .....></transport>
</transports>

Useful to know db degradation issues are causing requests in the queue to fill up. It might be useful to get some debug grizzly logging on here: org.glassfish.grizzly.level=FINEST

Thanks.

Comment by afcarv [ 10/Nov/14 ]

I had some monitoring in place but we've been focusing on fixing the db degradation so the issue won't be triggered - so far we've been successful, so it looks unlikely I'll be able to collect more data in the production system.

What I'm going to try next is to create a sample application and configuration that will be able to recreate the issue - doesn't look too hard; just a sample RESTful webservice that performs a db query that has an artificial delay in response, small db connection pool and a sample JMeter test script with http requests that will timeout before the app has a chance to respond. Should replicate the conditions pretty closely (don't know if nginx in front plays a role in this or not, so will try without it first).

Will report on any news, thanks!

Comment by oleksiys [ 10/Nov/14 ]

pls. try to patch GFv4.1 with this patch [1].
I need server.log output message(s) like:
"The queue is overflowed. queuePermits=......."

Thank you.

[1] https://dl.dropboxusercontent.com/u/7319744/glassfish-21246/nucleus-grizzly-all.jar

Comment by afcarv [ 22/Oct/15 ]

Hi - I've been looking into this again. We still get a non-responsive cluster from time to time, and it's always due to some external resource that cause the task queue to overfill; I've seen it happen due to a DB slowdown (as I've reported before) and also due to an issue with ActiveMQ (slow response).

Recreating this in a test environment has been proving to be quite tricky, but it appears I have devised a somewhat reliable way to do it using the scenario I've described before and using a test thread pool with at least twice the number of the task queue maximum capacity to generate requests to the application server.

I've successfully triggered this issue in GFv4.0, GFv4.1 and GFv4.1.1.

I will apply your patch next and report back if I get any results - thanks!

Comment by afcarv [ 22/Oct/15 ]

Please find server.log file below:

https://dl.dropboxusercontent.com/u/106573849/GF-21246/server.log

Method "testDAOMethod()" of class "TestDAOBean" calls a stored procedure that waits for 1 minute before giving a response. Ran a test script that kept calling a RESTful endpoint which invoked this method; massive amount of requests caused the http-listener-1 task queue to quickly overfill and stop responding. At this point, I stopped the test script by killing the process.

About 1 hour later, http-listener-1 is still hung. I then made a test call to the SSL endpoint which is handled by http-listener-2; this request went through cleanly, as can also be seen in the log file.

Let me know if you want me to run additional tests or fetch additional information. Thanks!

Comment by ruVooDoo [ 12/Nov/15 ]

Hello, our prod env show the same pattern...
"http-listener-1(119)" daemon prio=10 tid=0x00007f6409038000 nid=0x27e2 waiting on condition [0x00007f62f62e1000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)

  • parking to wait for <0x000000067d016e20> (a java.util.concurrent.LinkedTransferQueue)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
    at java.util.concurrent.LinkedTransferQueue.awaitMatch(LinkedTransferQueue.java:735)
    at java.util.concurrent.LinkedTransferQueue.xfer(LinkedTransferQueue.java:644)
    at java.util.concurrent.LinkedTransferQueue.take(LinkedTransferQueue.java:1137)
    at org.glassfish.grizzly.threadpool.FixedThreadPool$BasicWorker.getTask(FixedThreadPool.java:105)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:556)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
    at java.lang.Thread.run(Thread.java:724)

Thats very wierd, becauseour app working perfect for month`s on GF 4.0, but now it`s hanging... We did not change anything in the app.

Could you please provide a fix?

Comment by oleksiys [ 12/Nov/15 ]

@ruVooDoo the stacktrace you provided doesn't mean GF hangs, it's just a thread waiting for a task to be assigned.
The problem can be somewhere else.
Please provide full stacktrace (all threads) snapshot at the time you see the problem.

Comment by ruVooDoo [ 12/Nov/15 ]

https://www.dropbox.com/s/9ur7963sf3tb2ja/gso_hung_27757.txt?dl=0
We are using GlassFish Server Open Source Edition 4.0 (build 89)

Comment by mmora [ 12/Apr/16 ]

Hi,
I have the same problem as you, I am using GlassFish 4.1.1 with JDK 8u77 and after a while operating the http-thread-pool stops responding, returning blank pages. It happens more often the more use the application.
How I can fix it?

Comment by oleksiys [ 02/May/16 ]

@ ruVooDoo from the stacktrace you shared - many threads are blocked in your WS/EJB/MQ code, I don't think it has anything to do with LinkedTransferQueue.

@mmora is it a blank with an HTTP response code, or connection is getting broken/closed? Please share the stacktrace dump when this happens.

Comment by mkadaveru [ 10/Jan/17 ]

We have the same problem with GlassFish 4.1.1 on SunOS 5.10 Generic_150400-30 sun4v using JDK 1.8.0_102. Application was used for about 25 days when the issue happened. Is there an update on the fix?





[GLASSFISH-21470] Websocket handshakes but sometimes @OnOpen not called Created: 25/Nov/15  Updated: 10/Jan/17

Status: Open
Project: glassfish
Component/s: web_socket
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: kekkokk Assignee: sameerpandit
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Osx 10.10.10 x64 / Centos 7 x64



 Description   

Tested with newest glassfish 4.1.1 and simple websocket example:

https://blog.idrsolutions.com/2013/12/websockets-an-introduction/

Tested in Centos 7 and OSX 10.10.10
Tested with JDK 10.8.65 and 10.8.60 and 10.8.51

The websocket is always able to do the handshakes but sometimes glassfish won't fire the @OnOpen method.
If i connect and disconnect, at the 4th time the @OnOpen isn't fired. from this time, it randomly works.

Tried to upgrade tyrus to 1.12 or downgrade to 1.8.1 (which is the version used by glassfish 4.1 but doesn't make difference)
My competences stops here.

Tested also with Paraya 4.1.1.115 and 4.1.1.116, same issue.






[GLASSFISH-21496] Directory traversal exposes file system resources Created: 28/Jan/16  Updated: 10/Jan/17

Status: Open
Project: glassfish
Component/s: admin, web_container
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: ggierer Assignee: Vinay Vishal
Resolution: Unresolved Votes: 2
Labels: security
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Tested on both windows and linux



 Description   

This vulnerability has been tested on windows and linux, GlassFish version 4.1, but is most likely in previous versions as well.

Assuming the GlassFish 4.1 admin console is running locally on 4848 use the following URL to display the asenv.conf file in a browser (no logon required):

http://localhost:4848/theme/META-INF/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/config/asenv.conf

A similar URL can be crafted to examine file system resources or web application resources. I have examples of URLs that can display the WEB-INF/web.xml or even the /etc/passwd file on a unix server.

Note that I have added this as a "critical" priority due to the nature of the potential security threat. Application level servlet filtering can be used to remove the threat but the only option with the admin console is to block the port via a firewall. Please contact me for more information if required.



 Comments   
Comment by makiey [ 02/Feb/16 ]

howdy,
a possible workaround: it seems we need an extra-check for malformed utf-8 input in org.glassfish.grizzly.http.util.UTF8Decoder.
i.e. with a little help of java.nio.charset.CharsetDecoder.decode(...) - we could then examine the coderResult and - if error/malformed - throw a new CharConversionException to stop request processing.

public int convert(final byte[] buffer, final int srcOff, final char[] c, int dstOff, final int length) throws IOException {
final CharsetDecoder cd = StandardCharsets.UTF_8.newDecoder();
final byte[] bufferClone = buffer.clone();
final char[] cClone = c.clone();

final CoderResult decRes = cd.decode(ByteBuffer.wrap(bufferClone), CharBuffer.wrap(cClone), false);
if ((decRes != null) && (decRes.isError() || decRes.isMalformed()))

{ throw new CharConversionException("Conversion error"); }

....

Would be great if someone from grizzly team could take a look at it (Grizzly Framework 2.3.23).

Comment by ggierer [ 03/Feb/16 ]

Hi Guys,

This is a critical issue for our environment. Can you point me in the right direction to perhaps deploy a patch? Is it as simple as modifying org.glassfish.grizzly.http.util.UTF8Decoder and deploying this class? Any help would be greatly appreciated.

Gerald

Comment by makiey [ 04/Feb/16 ]

I think the mentioned workaround should help you. Patch the org.glassfish.grizzly.http.util.UTF8Decoder as described above, compile and put it into the nucleus-grizzly-all.jar (in glassfish/modules), evtl. distribute nucleus-grizzly-all.jar to all your machines, evtl. clear the osgi-caches, restart domain and test it thoughtfully - overlong control characters should cause the CharConversionExceptions.

Comment by ggierer [ 04/Feb/16 ]

Hi,

Thanks for the update. Where can I find the file org.glassfish.grizzly.http.util.UTF8Decoder appropriate to V4.1? Can you attach it to this issue or send to me directly at gerald.gierer@gieman.com? Many thanks for your help!

Comment by makiey [ 04/Feb/16 ]

4.1 -> http://search.maven.org/#artifactdetails|org.glassfish.grizzly|grizzly-http|2.3.15|bundle
4.1.1 -> http://search.maven.org/#artifactdetails|org.glassfish.grizzly|grizzly-http|2.3.23|bundle

Comment by ggierer [ 04/Feb/16 ]

Many thanks!

Comment by ggierer [ 05/Feb/16 ]

Have implemented the suggested fix and all seems well. Thank you very much for your help!

Comment by ggierer [ 03/Mar/16 ]

After more testing we have found that repeated hack attempts will make the server unresponsive requiring a restart. Unfortunately this fix is not enough and should be investigated further...





[GLASSFISH-21536] NPE at "org.glassfish.api.jdbc.SQLTraceRecord.toString(SQLTraceRecord.java:231)" Created: 15/Apr/16  Updated: 10/Jan/17

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: cistox Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Any



 Description   

The following code generates a NPE:
Class: SQLTraceRecord.java
Reason: The "param.toString()" is unsafe because it is quite normal that an SQL UPDATE provides a NULL param to force a NULL value in a given database table column.
As this is a trace the null should be simply printed as string "null".

@Override
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append("ThreadID=" + getThreadID() + " | ");
sb.append("ThreadName=" + getThreadName() + " | ");
sb.append("TimeStamp=" + getTimeStamp() + " | ");
sb.append("ClassName=" + getClassName() + " | ");
sb.append("MethodName=" + getMethodName() + " | ");
if(params != null && params.length > 0) {
int index = 0;
for(Object param : params)

{ sb.append("arg[" + index++ + "]=" + param.toString() + " | "); // ERROR IS HERE }

}
//TODO add poolNames and other fields of this record.
return sb.toString();
}

This is the NPE trace:

Severe: java.lang.NullPointerException
at org.glassfish.api.jdbc.SQLTraceRecord.toString(SQLTraceRecord.java:231)
at com.sun.gjc.util.SQLTraceLogger.sqlTrace(SQLTraceLogger.java:69)
at com.sun.gjc.util.SQLTraceDelegator.sqlTrace(SQLTraceDelegator.java:94)
at com.sun.gjc.spi.JdbcObjectsFactory$1.invoke(JdbcObjectsFactory.java:142)
at com.sun.proxy.$Proxy244.prepareStatement(Unknown Source)






[GLASSFISH-21578] Loop in BufferManagerWriteGrow.overflow Created: 01/Nov/16  Updated: 10/Jan/17

Status: Open
Project: glassfish
Component/s: orb
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: hberton Assignee: Yamini K B
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: 2 days
Time Spent: Not Specified
Original Estimate: 2 days


 Description   

When invoked a remote method and transported the object, sometimes this process is looped

java.lang.Thread.State: RUNNABLE
at com.sun.corba.ee.impl.encoding.BufferManagerWriteGrow.overflow(BufferManagerWriteGrow.java:73)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_2.grow(CDROutputStream_1_2.java:266)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_2.alignAndReserve(CDROutputStream_1_2.java:229)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.internalWriteOctetArray(CDROutputStream_1_0.java:454)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_octet_array(CDROutputStream_1_0.java:470)
at com.sun.corba.ee.impl.encoding.CDROutputObject.write_octet_array(CDROutputObject.java:435)
at com.sun.corba.ee.impl.corba.TypeCodeImpl.write_value(TypeCodeImpl.java:1661)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_TypeCode(CDROutputStream_1_0.java:504)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_any(CDROutputStream_1_0.java:488)
at com.sun.corba.ee.impl.encoding.CDROutputObject.write_any(CDROutputObject.java:468)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAny(Util.java:365)
at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:743)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:847)
at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:246)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:615)
at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:197)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:234)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:215)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:179)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:711)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:696)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:821)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:834)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:565)
at com.sun.corba.ee.impl.encoding.CDROutputObject.write_value(CDROutputObject.java:506)
at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:776)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:847)
at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:246)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:615)
at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:197)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:234)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:215)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:179)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:711)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:696)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:821)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:834)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_abstract_interface(CDROutputStream_1_0.java:551)
at com.sun.corba.ee.impl.encoding.CDROutputObject.write_abstract_interface(CDROutputObject.java:523)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:492)
at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectOverride(IIOPOutputStream.java:177)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
at java.util.HashMap.internalWriteEntries(HashMap.java:1776)
at java.util.HashMap.writeObject(HashMap.java:1354)
at sun.reflect.GeneratedMethodAccessor642.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sun.corba.ee.impl.io.IIOPOutputStream.invokeObjectWriter(IIOPOutputStream.java:647)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:613)
at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:197)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:234)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:215)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:179)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:711)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:696)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:821)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:834)
at com.sun.corba.ee.impl.encoding.CDROutputObject.write_value(CDROutputObject.java:500)
at com.sun.corba.ee.impl.corba.TCUtility.marshalIn(TCUtility.java:157)
at com.sun.corba.ee.impl.corba.AnyImpl.write_value(AnyImpl.java:611)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_any(CDROutputStream_1_0.java:489)
at com.sun.corba.ee.impl.encoding.CDROutputObject.write_any(CDROutputObject.java:468)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAny(Util.java:365)
at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:743)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:847)
at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:246)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:615)
at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:197)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:234)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:215)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:179)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:711)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:696)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:821)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:834)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:565)
at com.sun.corba.ee.impl.encoding.CDROutputObject.write_value(CDROutputObject.java:506)
at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:776)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:847)
at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:246)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:615)
at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:197)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:234)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:215)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:179)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:711)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:696)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:821)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:834)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_abstract_interface(CDROutputStream_1_0.java:551)
at com.sun.corba.ee.impl.encoding.CDROutputObject.write_abstract_interface(CDROutputObject.java:523)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:492)
at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectOverride(IIOPOutputStream.java:177)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
at java.util.HashSet.writeObject(HashSet.java:287)
at sun.reflect.GeneratedMethodAccessor640.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sun.corba.ee.impl.io.IIOPOutputStream.invokeObjectWriter(IIOPOutputStream.java:647)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:613)
at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:197)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:234)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:215)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:179)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:711)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:696)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:821)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:834)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:565)
at com.sun.corba.ee.impl.encoding.CDROutputObject.write_value(CDROutputObject.java:506)
at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:776)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:847)
at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:246)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:615)
at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:197)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:234)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:215)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:179)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:711)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:696)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:821)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:834)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_abstract_interface(CDROutputStream_1_0.java:551)
at com.sun.corba.ee.impl.encoding.CDROutputObject.write_abstract_interface(CDROutputObject.java:523)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:492)
at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectOverride(IIOPOutputStream.java:177)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
at java.util.ArrayList.writeObject(ArrayList.java:762)
at sun.reflect.GeneratedMethodAccessor177.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sun.corba.ee.impl.io.IIOPOutputStream.invokeObjectWriter(IIOPOutputStream.java:647)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:613)
at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:197)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:234)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:215)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:179)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:711)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:696)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:821)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:834)
at com.sun.corba.ee.impl.encoding.CDROutputObject.write_value(CDROutputObject.java:500)
at com.sun.corba.ee.impl.corba.TCUtility.marshalIn(TCUtility.java:157)
at com.sun.corba.ee.impl.corba.AnyImpl.write_value(AnyImpl.java:611)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_any(CDROutputStream_1_0.java:489)
at com.sun.corba.ee.impl.encoding.CDROutputObject.write_any(CDROutputObject.java:468)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAny(Util.java:365)
at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:743)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:847)
at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:246)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:615)
at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:197)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:234)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:215)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:179)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:711)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:696)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:821)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:834)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:565)
at com.sun.corba.ee.impl.encoding.CDROutputObject.write_value(CDROutputObject.java:506)
at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:776)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:847)
at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:246)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:615)
at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:197)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:234)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:215)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:179)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:711)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:696)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:821)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:834)
at com.sun.corba.ee.impl.encoding.CDROutputObject.write_value(CDROutputObject.java:500)
at com.sun.corba.ee.impl.corba.TCUtility.marshalIn(TCUtility.java:157)
at com.sun.corba.ee.impl.corba.AnyImpl.write_value(AnyImpl.java:611)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_any(CDROutputStream_1_0.java:489)
at com.sun.corba.ee.impl.encoding.CDROutputObject.write_any(CDROutputObject.java:468)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAny(Util.java:365)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$10.write(DynamicMethodMarshallerImpl.java:306)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.writeArguments(DynamicMethodMarshallerImpl.java:465)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:196)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:150)
at com.sun.corba.ee.impl.presentation.rmi.codegen.CodegenStubBase.invoke(CodegenStubBase.java:226)
at br.com.cmcontrol.acessorio.himix.ejb.business.facade.folhaRosto._FolhaRostoBeanRemote_Remote_DynamicStub.imprimirFolhaRostoComSeriaisHimix(br/com/cmcontrol/acessorio/himix/ejb/business/facade/folhaRosto/_FolhaRostoBeanRemote_Remote_DynamicStub.java)
at br.com.cmcontrol.acessorio.himix.ejb.business.facade.folhaRosto._FolhaRostoBeanRemote_Wrapper.imprimirFolhaRostoComSeriaisHimix(br/com/cmcontrol/acessorio/himix/ejb/business/facade/folhaRosto/_FolhaRostoBeanRemote_Wrapper.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at br.com.cmcontrol.ejb.business.facade.servico.ServicoBean.executarServico(ServicoBean.java:335)
at br.com.cmcontrol.ejb.business.facade.servico.ServicoBean.executarServicos(ServicoBean.java:288)
at sun.reflect.GeneratedMethodAccessor1197.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at br.com.cmcontrol.ejb.business.util.validator.ValidarParametros.validar(ValidarParametros.java:32)
at sun.reflect.GeneratedMethodAccessor463.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at br.com.wize.commons.business.seguranca.ValidarPermissoes.validar(ValidarPermissoes.java:39)
at sun.reflect.GeneratedMethodAccessor453.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
at sun.reflect.GeneratedMethodAccessor220.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
at sun.reflect.GeneratedMethodAccessor227.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy620.executarServicos(Unknown Source)
at br.com.cmcontrol.ejb.business.facade.apontamento.ApontamentoBean.executarServicosDeProcessoNosApontamentos(ApontamentoBean.java:1192)
at br.com.cmcontrol.ejb.business.facade.apontamento.ApontamentoBean.agrupar(ApontamentoBean.java:1326)
at br.com.cmcontrol.ejb.business.facade.apontamento.ApontamentoBean.confirmar(ApontamentoBean.java:1224)
at sun.reflect.GeneratedMethodAccessor1379.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at br.com.cmcontrol.ejb.business.util.validator.ValidarParametros.validar(ValidarParametros.java:32)
at sun.reflect.GeneratedMethodAccessor463.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at br.com.wize.commons.business.seguranca.ValidarPermissoes.validar(ValidarPermissoes.java:39)
at sun.reflect.GeneratedMethodAccessor453.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
at sun.reflect.GeneratedMethodAccessor220.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
at sun.reflect.GeneratedMethodAccessor227.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy613.confirmar(Unknown Source)
at br.com.cmcontrol.web.mbean.setup.MBeanSetup.confirmar(MBeanSetup.java:511)
at sun.reflect.GeneratedMethodAccessor1378.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sun.el.parser.AstValue.invoke(AstValue.java:289)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304)
at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at javax.faces.component.UICommand.broadcast(UICommand.java:315)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at br.com.cmcontrol.web.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:21)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:78)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:412)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
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:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
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:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
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:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)



 Comments   
Comment by hberton [ 01/Nov/16 ]

example

@LocalBean
Class ProcessBean {

@EJB
CallerRemote remote;

@EJB
Dao dao;

public void process()

{ List objects = dao.findAll(); remote.call(objects); }

}

@Remote
Interface CallerBeanRemote

{ void call(List objects); }

@LocalBean
Class CallerBean implements CallerBeanRemote {

public void call(List objects)

{ //process }

}

at com.sun.corba.ee.impl.encoding.BufferManagerWriteGrow.overflow(BufferManagerWriteGrow.java:73) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_2.grow(CDROutputStream_1_2.java:266) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_2.alignAndReserve(CDROutputStream_1_2.java:229) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.internalWriteOctetArray(CDROutputStream_1_0.java:454) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_octet_array(CDROutputStream_1_0.java:470) at com.sun.corba.ee.impl.encoding.CDROutputObject.write_octet_array(CDROutputObject.java:435) at com.sun.corba.ee.impl.corba.TypeCodeImpl.write_value(TypeCodeImpl.java:1661) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_TypeCode(CDROutputStream_1_0.java:504) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_any(CDROutputStream_1_0.java:488) at com.sun.corba.ee.impl.encoding.CDROutputObject.write_any(CDROutputObject.java:468) at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAny(Util.java:365) at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:743) at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:847) at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:246) at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:615) at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:197) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:234) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:215) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:179) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:711) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:696) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:821) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:834) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:565) at com.sun.corba.ee.impl.encoding.CDROutputObject.write_value(CDROutputObject.java:506) at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:776) at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:847) at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:246) at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:615) at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:197) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:234) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:215) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:179) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:711) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:696) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:821) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:834) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_abstract_interface(CDROutputStream_1_0.java:551) at com.sun.corba.ee.impl.encoding.CDROutputObject.write_abstract_interface(CDROutputObject.java:523) at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:492) at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectOverride(IIOPOutputStream.java:177) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344) at java.util.HashMap.internalWriteEntries(HashMap.java:1776) at java.util.HashMap.writeObject(HashMap.java:1354) at sun.reflect.GeneratedMethodAccessor642.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.sun.corba.ee.impl.io.IIOPOutputStream.invokeObjectWriter(IIOPOutputStream.java:647) at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:613) at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:197) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:234) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:215) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:179) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:711) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:696) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:821) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:834) at com.sun.corba.ee.impl.encoding.CDROutputObject.write_value(CDROutputObject.java:500) at com.sun.corba.ee.impl.corba.TCUtility.marshalIn(TCUtility.java:157) at com.sun.corba.ee.impl.corba.AnyImpl.write_value(AnyImpl.java:611) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_any(CDROutputStream_1_0.java:489) at com.sun.corba.ee.impl.encoding.CDROutputObject.write_any(CDROutputObject.java:468) at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAny(Util.java:365) at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:743) at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:847) at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:246) at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:615) at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:197) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:234) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:215) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:179) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:711) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:696) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:821) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:834) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:565) at com.sun.corba.ee.impl.encoding.CDROutputObject.write_value(CDROutputObject.java:506) at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:776) at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:847) at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:246) at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:615) at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:197) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:234) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:215) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:179) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:711) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:696) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:821) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:834) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_abstract_interface(CDROutputStream_1_0.java:551) at com.sun.corba.ee.impl.encoding.CDROutputObject.write_abstract_interface(CDROutputObject.java:523) at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:492) at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectOverride(IIOPOutputStream.java:177) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344) at java.util.HashSet.writeObject(HashSet.java:287) at sun.reflect.GeneratedMethodAccessor640.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.sun.corba.ee.impl.io.IIOPOutputStream.invokeObjectWriter(IIOPOutputStream.java:647) at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:613) at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:197) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:234) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:215) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:179) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:711) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:696) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:821) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:834) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:565) at com.sun.corba.ee.impl.encoding.CDROutputObject.write_value(CDROutputObject.java:506) at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:776) at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:847) at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:246) at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:615) at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:197) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:234) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:215) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:179) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:711) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:696) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:821) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:834) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_abstract_interface(CDROutputStream_1_0.java:551) at com.sun.corba.ee.impl.encoding.CDROutputObject.write_abstract_interface(CDROutputObject.java:523) at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:492) at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectOverride(IIOPOutputStream.java:177) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344) at java.util.ArrayList.writeObject(ArrayList.java:762) at sun.reflect.GeneratedMethodAccessor177.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.sun.corba.ee.impl.io.IIOPOutputStream.invokeObjectWriter(IIOPOutputStream.java:647) at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:613) at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:197) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:234) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:215) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:179) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:711) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:696) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:821) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:834) at com.sun.corba.ee.impl.encoding.CDROutputObject.write_value(CDROutputObject.java:500) at com.sun.corba.ee.impl.corba.TCUtility.marshalIn(TCUtility.java:157) at com.sun.corba.ee.impl.corba.AnyImpl.write_value(AnyImpl.java:611) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_any(CDROutputStream_1_0.java:489) at com.sun.corba.ee.impl.encoding.CDROutputObject.write_any(CDROutputObject.java:468) at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAny(Util.java:365) at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:743) at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:847) at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:246) at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:615) at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:197) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:234) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:215) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:179) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:711) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:696) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:821) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:834) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:565) at com.sun.corba.ee.impl.encoding.CDROutputObject.write_value(CDROutputObject.java:506) at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:776) at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:847) at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:246) at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:615) at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:197) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:234) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:215) at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:179) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:711) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:696) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:821) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:834) at com.sun.corba.ee.impl.encoding.CDROutputObject.write_value(CDROutputObject.java:500) at com.sun.corba.ee.impl.corba.TCUtility.marshalIn(TCUtility.java:157) at com.sun.corba.ee.impl.corba.AnyImpl.write_value(AnyImpl.java:611) at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_any(CDROutputStream_1_0.java:489) at com.sun.corba.ee.impl.encoding.CDROutputObject.write_any(CDROutputObject.java:468) at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAny(Util.java:365) at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$10.write(DynamicMethodMarshallerImpl.java:306) at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.writeArguments(DynamicMethodMarshallerImpl.java:465) at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:196) at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:150) at com.sun.corba.ee.impl.presentation.rmi.codegen.CodegenStubBase.invoke(CodegenStubBase.java:226) at br.com.acessorio.ejb.business.facade._CallerBeanRemote_Remote_DynamicStub.call(br/com/acessorio/ejb/business/facade/_CallerBeanRemote_Remote_DynamicStub.java

Comment by hberton [ 04/Nov/16 ]

performing the debug class below that detected the value passed the first time for newlength is 1073741824 then there is a multiplication by 2 bringing a negative value -2147483648 then it starts while {} and never ends

public class BufferManagerWriteGrow extends BufferManagerWrite

protected ByteBuffer overflow(ByteBuffer byteBuffer, int numBytesNeeded) {
70 int newLength = byteBuffer.limit() * 2; //1073741824 * 2 = -2147483648
// byteBuffer actual size java.nio.HeapByteBuffer[pos=1073741824 lim=1073741824 cap=1073741824]
72 while (byteBuffer.position() + numBytesNeeded >= newLength)

{ 73 newLength *= 2; }

75 ByteBufferPool byteBufferPool = this.orb.getByteBufferPool();
76 ByteBuffer newBB = byteBufferPool.getByteBuffer(newLength);

78 byteBuffer.flip();
79 newBB.put(byteBuffer);

81 byteBufferPool.releaseByteBuffer(byteBuffer);
82 return newBB;
}

Where can i configure byteBuffer.limit() value?

Comment by hberton [ 04/Nov/16 ]

after much searching I noticed that glassfish exchange native parameter

com.sun.CORBA.encoding.ORBEnableJavaSerialization=true
per

com.sun.corba.ee.encoding.ORBEnableJavaSerialization=true
due to this JSG did not work and the CDR took





[GLASSFISH-21629] Circular dependency during start of glassfish 4.1.1 with deployed and installed activemq-rar-5.13.0.rar Created: 05/Dec/16  Updated: 10/Jan/17

Status: Open
Project: glassfish
Component/s: jms
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: ls2016 Assignee: sameerpandit
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

During the start I got the following messages (with glassfish 4.1 it works):

Launching GlassFish on Felix platform
Dez 05, 2016 3:07:36 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner createBundleProvisioner
INFORMATION: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.
Dez 05, 2016 3:07:36 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNUNG: Skipping entry because it is not an absolute URI.
Dez 05, 2016 3:07:36 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNUNG: Skipping entry because it is not an absolute URI.
Dez 05, 2016 3:07:36 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner startBundles
WARNUNG: Can not start bundle file:/C:/Entwicklung/glassfish-4.1.1/glassfish/modules/core.jar because it is not contained in the list of installed bundles.
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime@5173db66 in service registry.
#!## LogManagerService.postConstruct : rootFolder=C:\Entwicklung\glassfish-4.1.1\glassfish
#!## LogManagerService.postConstruct : templateDir=C:\Entwicklung\glassfish-4.1.1\glassfish\lib\templates
#!## LogManagerService.postConstruct : src=C:\Entwicklung\glassfish-4.1.1\glassfish\lib\templates\logging.properties
#!## LogManagerService.postConstruct : dest=C:\Entwicklung\glassfish-4.1.1\glassfish\domains\domain1\config\logging.properties
Information: Running GlassFish Version: GlassFish Server Open Source Edition 4.1.1 (build 1)
Information: Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter
Information: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Information: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Information: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
Information: JTS5014: Recoverable JTS instance, serverId = [100]
Schwerwiegend: JTS5043: Unexpected error occurred while creating transaction manager instance
MultiException stack 1 of 1
java.lang.IllegalStateException: Circular dependency involving org.glassfish.resourcebase.resources.listener.ResourceManager was found. Full descriptor is SystemDescriptor(
implementation=org.glassfish.resourcebase.resources.listener.ResourceManager
name=ResourceManager
contracts=

{org.glassfish.resourcebase.resources.listener.ResourceManager,org.jvnet.hk2.config.ConfigListener}

scope=org.glassfish.hk2.runlevel.RunLevel
qualifiers={}
descriptorType=CLASS
descriptorVisibility=NORMAL
metadata=runLevelValue=

{2}

,runLevelMode=

{0}

,Bundle-SymbolicName=

{org.glassfish.main.resourcebase.resources.nucleus-resources}

,Bundle-Version=

{4.1.1}

rank=0
loader=OsgiPopulatorPostProcessor.HK2Loader(OSGiModuleImpl:: Bundle = [org.glassfish.main.resourcebase.resources.nucleus-resources [216]], State = [READY],1567501730)
proxiable=null
proxyForSameScope=null
analysisName=null
id=1084
locatorId=0
identityHashCode=761877137
reified=true)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:179)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:85)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2072)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:88)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getAllServices(ServiceLocatorImpl.java:845)
at com.sun.jts.jta.TransactionServiceProperties.initRecovery(TransactionServiceProperties.java:318)
at com.sun.jts.jta.TransactionManagerImpl.<init>(TransactionManagerImpl.java:209)
at com.sun.jts.jta.TransactionManagerImpl.getTransactionManagerImpl(TransactionManagerImpl.java:177)
at com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.postConstruct(JavaEETransactionManagerJTSDelegate.java:145)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:326)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:374)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:83)
at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:71)
at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:154)
at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:199)
at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:122)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2072)
at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetAllServiceHandles(ServiceLocatorImpl.java:1428)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getAllServices(ServiceLocatorImpl.java:803)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getAllServices(ServiceLocatorImpl.java:791)
at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.initDelegates(JavaEETransactionManagerSimplified.java:1504)
at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.postConstruct(JavaEETransactionManagerSimplified.java:165)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:326)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:374)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:83)
at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:71)
at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:154)
at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:199)
at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:122)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2072)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:698)
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:78)
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:211)
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:234)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:357)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:83)
at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:71)
at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:154)
at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:199)
at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:122)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2072)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:689)
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:78)
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:211)
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:234)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:357)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:83)
at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:71)
at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:154)
at org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:199)
at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:122)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2072)
at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:767)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getUnqualifiedService(ServiceLocatorImpl.java:774)
at org.jvnet.hk2.internal.IterableProviderImpl.get(IterableProviderImpl.java:111)
at com.sun.enterprise.resource.deployer.ResourceAdapterConfigDeployer.getConnectorRuntime(ResourceAdapterConfigDeployer.java:99)
at com.sun.enterprise.resource.deployer.ResourceAdapterConfigDeployer.deployResource(ResourceAdapterConfigDeployer.java:86)
at org.glassfish.resourcebase.resources.listener.ResourceManager.deployResources(ResourceManager.java:183)
at org.glassfish.resourcebase.resources.listener.ResourceManager.postConstruct(ResourceManager.java:129)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:326)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:374)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:228)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:85)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2072)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:88)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1213)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneLevel.run(CurrentTaskFuture.java:762)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Information: Authorization Service has successfully initialized.
Information: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
Warnung: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-1, realClassName=org.glassfish.grizzly.http2.Http2AddOn
Information: Grizzly Framework 2.3.23 started in: 46ms - bound to [/0.0.0.0:8080]
Warnung: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-2, realClassName=org.glassfish.grizzly.http2.Http2AddOn
Information: Grizzly Framework 2.3.23 started in: 9ms - bound to [/0.0.0.0:8181]
Warnung: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=admin-listener, realClassName=org.glassfish.grizzly.http2.Http2AddOn
Information: Grizzly Framework 2.3.23 started in: 3ms - bound to [/0.0.0.0:4848]
Information: Grizzly Framework 2.3.23 started in: 13ms - bound to [/0.0.0.0:3700]
Information: visiting unvisited references
Information: HV000001: Hibernate Validator 5.1.2.Final
Information: Loading application activemq-rar done in 5.691 ms
Information: GlassFish Server Open Source Edition 4.1.1 (1) startup time : Felix (4.613ms), startup services(8.181ms), total(12.794ms)
Information: Grizzly Framework 2.3.23 started in: 33ms - bound to [/0.0.0.0:7676]
Warnung: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-2, realClassName=org.glassfish.grizzly.http2.Http2AddOn
Information: Grizzly Framework 2.3.23 started in: 35ms - bound to [/0.0.0.0:8181]
Information: JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://nb00887.GDV.INTRA:8686/jndi/rmi://nb00887.GDV.INTRA:8686/jmxrmi
Warnung: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-1, realClassName=org.glassfish.grizzly.http2.Http2AddOn
Information: Grizzly Framework 2.3.23 started in: 10ms - bound to [/0.0.0.0:8080]
Information: Listening to REST requests at context: /management/domain.
Information: Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@65bcf7c2 as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@5fb7183b.
Information: visiting unvisited references
Information: Created HTTP listener http-listener-1 on host/port 0.0.0.0:8080
Information: Created HTTP listener http-listener-2 on host/port 0.0.0.0:8181
Information: Created HTTP listener admin-listener on host/port 0.0.0.0:4848
Information: Created virtual server server
Information: Created virtual server __asadmin
Information: Setting JAAS app name glassfish-web
Information: Virtual server server loaded default web module
Information: Java security manager is disabled.
Information: Entering Security Startup Service.
Information: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
Information: Security Service(s) started successfully.
Information: visiting unvisited references
Information: visiting unvisited references
Information: visiting unvisited references
Information: Mojarra 2.2.12 ( 20150720-0848 https://svn.java.net/svn/mojarra~svn/tags/2.2.12@14885) für Kontext '' wird initialisiert.
Information: Loading application [__admingui] at [/]
Information: Loading application __admingui done in 6.096 ms






[GLASSFISH-21043] Glassfish 4 admin gui class loading issue when built from source (as at svn revision 63170) Created: 17/Apr/14  Updated: 10/Jan/17

Status: Open
Project: glassfish
Component/s: web_container
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Dave Whitla Assignee: Shing Wai Chan
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: 0 minutes
Time Spent: Not Specified
Original Estimate: 0 minutes
Environment:

Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 23:51:28+1000)
Maven home: /opt/local/share/java/maven3
Java version: 1.7.0_55, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: utf-8
OS name: "mac os x", version: "10.9.2", arch: "x86_64", family: "mac"


Tags: admin-gui

 Description   

The default domain starts without error. Attempting to access the admin application fails with the root cause being failure to locate com.sun.webui.jsf.faces.UIComponentELResolver.
The class in question exists within $INSTALL_ROOT/lib/install/applications/__admingui/WEB-INF/extra/webui-jsf-4.0.2.10.jar and was compiled using the same JDK I am using to start the container.

Root cause:

The current source for sun-web.xml in the __admingui module contains the following:

<class-loader delegate="true"
extra-class-path="WEB-INF/extra/webui-jsf-suntheme-4.0.2.10.jar
:WEB-INF/extra/dojo-ajax-nodemo-0.4.1.jar
:WEB-INF/extra/webui-jsf-4.0.2.10.jar
:WEB-INF/extra/commons-fileupload-1.1.1.jar
:WEB-INF/extra/commons-io-1.3.1.jar
:WEB-INF/extra/json-1.0.jar
:WEB-INF/extra/prototype-1.5.0.jar" />

com.sun.enterprise.glassfish.web.WarHandler.configureLoaderAttributes() does not strip whitespace characters when splitting extra-class-path into path elements.
See com.sun.enterprise.glassfish.web.WarHandler:286 for details.

Consequently at line 310:
URL url = file.toURI().toURL();

the spaces are URL encoded as %20 before passing the string to:
cloader.addRepository(url.toString());

which then silently fails to add the jar to the classpath.
Strangely addRepository(String) converts the string back to a URL before passing it (eventually) to URLClassPath.addURL(). I don't have the source for this class but it evidently doesn't like the trailing encoded whitespace characters, because after this call returns the classpath has not changed.

A patch for the issue is attached to https://www.java.net/forum/topic/glassfish/glassfish/glassfish-4-admin-console-class-loading-issue-when-built-source where the problem was first reported.



 Comments   
Comment by Dave Whitla [ 17/Apr/14 ]

When reviewing my changes to commit the fix (to my git clone) I noticed that the reformatting of sun-web.xml had actually been done automagically by my IDE (IntelliJ).
This explains the issue not affecting others.

While the conditions were thus self inflicted, I think this is still a latent bug.
The documentation does state that the extra-class-path consists of path elements separated by ':' or ';' with no explicit allowance for whitespace. However whitespace at the end of a path is perfectly valid and failure to handle it robustly is a future problem. Further, the root cause failure is silent in the shipped configuration, giving new users/developers no clue at all as to why their application fails to load.

Request that you apply the patch.

Comment by Anissa Lam [ 17/Apr/14 ]

Thanks for filing and debugging the issue.
The suspect code is in web container, I am transferring this to that team for further evaluation.
If we can't load the console, then this is very critical and we will need to upgrade this to P2 and need to be fixed for 4.0.1.

Comment by Dave Whitla [ 18/Apr/14 ]

Hi Anissa,

You may have missed that I already have a fix and that, on further analysis, this does not affect all users as first suspected - indeed it is a bit of an edge case.
I would attach my patch but I don't seem to have permissions to attach files to this bug report.

Please see the link in my original report for the patch I have created for this issue.

Comment by Anissa Lam [ 18/Apr/14 ]

Yes, looks like our comments cross each other, with 2 min. difference.
The web container team will make the decision on how to proceed with the bug.
thanks.

Comment by Shing Wai Chan [ 10/Jan/17 ]

The link of the above patch is not available anymore.

According the comments in DTD, we have
extra-class-path List of comma-separated JAR files to be
added to the web application's class path

It is not a comma-separated here.





[GLASSFISH-21635] redirect-port-load-balancer web devtest fails in Hudsons Created: 09/Dec/16  Updated: 10/Jan/17

Status: Open
Project: glassfish
Component/s: web_container
Affects Version/s: 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Shing Wai Chan Assignee: xin.li
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The test fail in continuous and nightly Hudsons.

Continuous build:
http://gf-hudson.us.oracle.com/hudson/view/GlassFish/view/Trunk%20Continuous/job/gf-trunk-web-devtests-continuous/lastSuccessfulBuild/artifact/appserv-tests/test_results.html

Nightly build:
http://gf-hudson.us.oracle.com/hudson/view/GlassFish/view/Trunk%20Continuous/job/gf-lw-web-devtests/406/artifact/appserv-tests/test_results.html

run:
[java] GET /web-redirect-port-loadbalancer/index.html HTTP/1.1
[java]
[java] Location header: Location: https://loadbalancer:45711/web-redirect-port-loadbalancer/index.html
[java] Wrong redirect. Expected: Location: https://loadbalancer:12345/web-redirect-port-loadbalancer/index.html, received: Location: https://loadbalancer:45711/web-redirect-port-loadbalancer/index.html
[java] Generating report at /scratch/BUILD_AREA/workspace/gf-lw-web-devtests/appserv-tests/test_results.xml
[java]
[java]
[java] -----------------------------------------
[java] - redirect-port-loadbalancer: FAIL -
[java] -----------------------------------------
[java] - Total PASS : 0 -
[java] - Total FAIL : 1 -
[java] - Total DID NOT RUN : 0 -
[java] -----------------------------------------



 Comments   
Comment by Shing Wai Chan [ 10/Jan/17 ]

This test passes locally if I have just one this test. However, it fails consistently in Hudson.





[GLASSFISH-21657] Where do I find glassfish version 3.1.2.11 ? Created: 09/Jan/17  Updated: 09/Jan/17

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: lowks Assignee: Joe Di Pol
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I am having a glass fish installation with version: 3.1.2.2, then a Nessus scan pointed out that there are vulnerabilities associated with this version and that I should upgrade it to 3.1.2.11. The question is, where can I find this version ? Related: https://coderanch.com/t/641751/find-Glassfish



 Comments   
Comment by lowks [ 09/Jan/17 ]

The related Nessus vulnerability output:

https://www.tenable.com/plugins/index.php?view=single&id=82902





[GLASSFISH-21640] JMS message in server.log is logged only message key. Created: 16/Dec/16  Updated: 05/Jan/17

Status: In Progress
Project: glassfish
Component/s: jms
Affects Version/s: 4.1, 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yama0428 Assignee: mskdeepak
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

JMS message in server.log is logged only message key.
So I can not check the url of the broker.

[2016-12-16T10:16:34.857+0900] [glassfish 4.1] [INFO] [] [javax.enterprise.resource.jms] [tid: _ThreadID=74 _ThreadName=Recovery Helper Thread] [timeMillis: 1481850994857] [levelValue: 800] [[
  addresslist.setjmsservice.provider]]

[2016-12-16T10:16:34.858+0900] [glassfish 4.1] [INFO] [] [javax.enterprise.resource.jms] [tid: _ThreadID=74 _ThreadName=Recovery Helper Thread] [timeMillis: 1481850994858] [levelValue: 800] [[
  jms.connection.url]]

I think this is regression.
After rev. 62588, LogDomains is not used in appserver/jms/jms-core.

MQAddressList.java before rev.62588
    static Logger logger = LogDomains.getLogger(MQAddressList.class,  LogDomains.JMS_LOGGER);
MQAddressList.java after rev.62588
    private static final Logger logger = Logger.getLogger(ActiveJmsResourceAdapter.JMS_MAIN_LOGGER);

So I think LogDomains should be used again to obtain the valid logger.



 Comments   
Comment by mskdeepak [ 05/Jan/17 ]

The change mentioned above(rev. 62588) has changed the logger object.
Earlier, the following used to work:

ActiveJmsResourceAdapter.java:1595
_logger.log(Level.INFO, "jms.connection.url", val);

Now, since we are not using LogDomains, this is not working. So, the following change needs to be made:

ActiveJmsResourceAdapter.java:1595
_logger.log(Level.INFO, "jms.connection.url : {0}", new Object[]{val});

The changes made in revision 62588 have changed the logger objects in the JMS module. We need to make the corresponding changes(as shown above) for other log messages affected in this module.





[GLASSFISH-21023] HTTP access log writes are delayed after log file rotation Created: 31/Mar/14  Updated: 05/Jan/17

Status: Open
Project: glassfish
Component/s: logging
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Bill Shannon Assignee: rajendra_inamdar
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I'm using GlassFish 4.0.1. I have access logging enabled, and log rotation
enabled. The logs rotated on Mar 24. Since then, the new log file had no
new log entries, even though I was accessing the server, and the log file
never rotated again.

Using the admin console, I disabled access logging. As soon as I did that,
a bunch of log records were written out, covering all the time from Mar 24
to now.

I have http-service.access-log.write-interval-seconds set to "0".



 Comments   
Comment by TYUEN [ 05/Jan/17 ]

I have the same problem in my Glassfish 4.1 server. However, the access log stops update 3 hours before the log rotation time. Also, no exception/error message was found in the server.log and the access log resumes update after restarting the domain.

The following is my access log setting:
server.http-service.access-log.buffer-size-bytes=4096
server.http-service.access-log.write-interval-seconds=0





[GLASSFISH-21365] No content from web application without web.xml Created: 27/May/15  Updated: 04/Jan/17

Status: Open
Project: glassfish
Component/s: None
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: petrhejl Assignee: Joe Di Pol
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

1) download GF 4.1 and unzip it
2) cd glassfish4/glassfish/bin
3) ./asadmin
4) start-domain
5) change-admin-password (configure admin password to glassfish)
6) enable-secure-admin
7) stop-domain
8) start-domain
9) deploy the simplest Java EE 7 app without any descriptor (web.xml) - for example: curl -v --insecure --user admin:glassfish https://127.0.0.1:4848/__asadmin/deploy?DEFAULT=/home/petr/NetBeansProjects/WebApplication1/dist/WebApplication1.war\&force=true\&name=WebApplication1\&contextroot=/WebApplication1
10) Access the aplication: curl -v http://localhost:8080/WebApplication1/
11) No content:
< HTTP/1.1 200 OK

  • Server GlassFish Server Open Source Edition 4.1 is not blacklisted
    < Server: GlassFish Server Open Source Edition 4.1
    < X-Powered-By: Servlet/3.1 JSP/2.3 (GlassFish Server Open Source Edition 4.1 Java/Oracle Corporation/1.7)
    < Date: Wed, 27 May 2015 12:34:43 GMT
    < Content-Length: 0

In the server log:
WEB9100: No WebSecurityManager found for context WebApplication1/WebApplication1

The issue persists until the deployment of the first app containing web.xml.



 Comments   
Comment by lprimak [ 04/Jan/17 ]

Will be solved by Payara as part of https://github.com/payara/Payara/issues/1070





[GLASSFISH-21440] Webservices don't work properly in 4.1.1 Created: 12/Oct/15  Updated: 04/Jan/17

Status: Open
Project: glassfish
Component/s: jax-rs
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: setup Assignee: Unassigned
Resolution: Unresolved Votes: 16
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux Ubuntu 15.04



 Description   

After switching from 4.1 to 4.1.1 webservices fail with error 500
server-log

[2015-10-11T07:32:14.904+1000] [glassfish 4.1] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=34 _ThreadName=http-listener-1(5)] [timeMillis: 1444512734904] [levelValue: 900] [[
  StandardWrapperValve[javax.ws.rs.core.Application]: Servlet.service() for servlet javax.ws.rs.core.Application threw exception
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.persistence.jaxb.BeanValidationHelper
	at org.eclipse.persistence.jaxb.JAXBBeanValidator.isConstrainedObject(JAXBBeanValidator.java:257)
	at org.eclipse.persistence.jaxb.JAXBBeanValidator.shouldValidate(JAXBBeanValidator.java:208)
	at org.eclipse.persistence.jaxb.JAXBMarshaller.validateAndTransformIfNeeded(JAXBMarshaller.java:587)
	at org.eclipse.persistence.jaxb.JAXBMarshaller.marshal(JAXBMarshaller.java:481)
	at org.eclipse.persistence.jaxb.rs.MOXyJsonProvider.writeTo(MOXyJsonProvider.java:949)
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:265)
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:250)
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
	at org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:106)
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
	at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:86)
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
	at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1130)
	at org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:683)
	at org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:424)
	at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:414)
	at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:312)
	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.servlet.WebComponent.service(WebComponent.java:460)
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:386)
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:334)
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)
	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at org.glassfish.tyrus.servlet.TyrusServletFilter.doFilter(TyrusServletFilter.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at org.setupit.experiment.controller.util.URLFilter.doFilter(URLFilter.java:122)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
	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(Thread.java:745)

------------------------------------------------------------

@Entity
@Table(name = "TITLE")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Title.findAll", query = "SELECT t FROM Title t"),
    @NamedQuery(name = "Title.findById", query = "SELECT t FROM Title t WHERE t.id = :id"),
    @NamedQuery(name = "Title.findByTitle", query = "SELECT t FROM Title t WHERE t.title = :title"),
    @NamedQuery(name = "Title.findByFullTitle", query = "SELECT t FROM Title t WHERE t.fullTitle = :fullTitle")})
public class Title implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "title")
    private String title;
    @Size(max = 1024)
    @Column(name = "full_title")
    private String fullTitle;
    @OneToMany(mappedBy = "title")
    private List<User> userList;

    public Title() {
    }

    public Title(Integer id) {
        this.id = id;
    }

    public Title(Integer id, String title) {
        this.id = id;
        this.title = title;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getFullTitle() {
        return fullTitle;
    }

    public void setFullTitle(String fullTitle) {
        this.fullTitle = fullTitle;
    }

    @XmlTransient
    public List<User> getUserList() {
        return userList;
    }

    public void setUserList(List<User> userList) {
        this.userList = userList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Title)) {
            return false;
        }
        Title other = (Title) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return title + " (id=" + id + " )";
    }
    
}

-----------------------------------

@Stateless
@Path("title")
public class TitleService extends AbstractFacade<Title> {
    @PersistenceContext(unitName = "org.setupit_experiment_war_1.0PU")
    private EntityManager em;

    public TitleService() {
        super(Title.class);
    }

    @GET
    @Path("{id}")
    @Produces({MediaType.APPLICATION_JSON})
    public Title find(@PathParam("id") Integer id) {
        return super.find(id);
    }

    @GET
    @Override
    @Produces({MediaType.APPLICATION_JSON})
    public List<Title> findAll() {
        List<Title> lt = super.findAll();
        return lt;
    }

    @Override
    protected EntityManager getEntityManager() {
        return em;
    }
    
}

---------------------------

    <servlet>
        <servlet-name>javax.ws.rs.core.Application</servlet-name>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>javax.ws.rs.core.Application</servlet-name>
        <url-pattern>/services/*</url-pattern>
    </servlet-mapping>


 Comments   
Comment by reza_rahman [ 12/Oct/15 ]

I can confirm this happens with Cargo Tracker as well. It's a fairly serious usability problem.

Comment by Vinay Vishal [ 14/Oct/15 ]

Bean validation was introduced in Eclipselink 2.6.0 and that is where the NoClassDefFoundError is thrown.

This could be a case of missing entries in MANIFEST.MF in org.eclipse.persistence.moxy osgi bundle. Following link suggests so.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=463169
https://java.net/jira/browse/JERSEY-2888

Comment by Lukas Jungmann [ 14/Oct/15 ]

this seems to be fixed with eclipselink-2.6.1-RC2

Comment by Vinay Vishal [ 14/Oct/15 ]

Thanks Lukas, it worked when I tried locally with eclipselink-2.6.1-RC2.

Comment by setup [ 14/Oct/15 ]

I just tried to replace eclipselink-2.6.1-RC1 with eclipselink-2.6.1-RC2. it didn't resolve the problem. Any other suggestions?

Comment by Vinay Vishal [ 15/Oct/15 ]

In my case, I rebuilt Glassfish locally after bumping up eclipselink version. Its working fine for me. May be you can try stopping the domain, cleaning up your osgi-cache inside domains/<domain> directory, restart the domain and see if it works?

Comment by nicof6786 [ 15/Oct/15 ]

Hi,
I tried to get around this issue using Jackson as a media provider.
I ran into a similar issue even though it was not blocking.
On the first call and only on the first call to a Jax-Rs resource I get the following error :

java.lang.NoClassDefFoundError: com/fasterxml/jackson/module/jaxb/JaxbAnnotationIntrospector
        at com.fasterxml.jackson.jaxrs.json.JsonMapperConfigurator._resolveIntrospector(JsonMapperConfigurator.java:109)
        at com.fasterxml.jackson.jaxrs.json.JsonMapperConfigurator._resolveIntrospectors(JsonMapperConfigurator.java:84)
        at com.fasterxml.jackson.jaxrs.cfg.MapperConfiguratorBase._setAnnotations(MapperConfiguratorBase.java:120)
        at com.fasterxml.jackson.jaxrs.json.JsonMapperConfigurator.getDefaultMapper(JsonMapperConfigurator.java:45)
        at com.fasterxml.jackson.jaxrs.base.ProviderBase.locateMapper(ProviderBase.java:864)
        at com.fasterxml.jackson.jaxrs.base.ProviderBase.writeTo(ProviderBase.java:588)
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:265)
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:250)
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
        at org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:106)
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
        at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:86)
        at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
        at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1130)
        at org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:683)
        at org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:424)
        at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:414)
        at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:312)
        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.servlet.WebComponent.service(WebComponent.java:460)
        at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:386)
        at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:334)
        at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)
        at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
        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(Thread.java:745)

The subsequent calls work fine.
Should I declare another issue ?

Comment by xwibao [ 19/Oct/15 ]

That nasty JERSEY-2888 definitely crept into GlassFish 4.1.1 :-\

As a quick & dirty fix, one can find glassfish/modules/org.eclipse.persistence.moxy.jar and fix META-INF/MANIFEST.MF inside it. Simply append the following to Import-Package:

,org.xml.sax.helpers,javax.xml.parsers;resolution:=optional,javax.naming;resolution:=optional

and restart. That worked for me.

Comment by setup [ 26/Oct/15 ]

Thank you!

Editing glassfish/modules/org.eclipse.persistence.moxy.jar helps

Comment by sebastian2 [ 30/Nov/15 ]

Hi there,
this bug is also blocking us from updating to the new Glassfish version.

Comment by pdurbin [ 04/Dec/15 ]

This issue is blocking us from upgrading from Glassfish 4.1 to Glassfish 4.1.1 because bean validation isn't working in the latter. Please see the following comment for details and a stacktrace: https://github.com/IQSS/dataverse/issues/2628#issuecomment-158197478

At https://javabot.evanchooly.com/logs/%23glassfish/2015-12-04 Ed Burns mentioned that this issue (GLASSFISH-21440) is the one I should be tracking so if "bean validation" could be added to the title, I would really appreciate it. We're looking forward to a release that has the bug fix (Glassfish 4.1.2 or whatever). We'll pass on Glassfish 4.1.1. (We already do enough patching of Glassfish 4.1 per the GitHub issue above and our goal is to avoid making our users patch Glassfish.)

Thanks for Glassfish. It's great. We're looking forward to upgrading. (I kind of want to play with Ozark.

Comment by Pavel Bucek [ 04/Dec/15 ]

If you just wan't to "play", you can checkout and build glassfish trunk, I believe the issue is resolved there.

Comment by basler [ 22/Dec/15 ]

This bug is blocking my upgrade, but the moxy patch listed above worked.

Comment by nabizamani [ 23/Jan/16 ]

Hello Oracle!!!! I can confirm this bug also exists also on Mac OS.

It's such a pity that you don't care about this serious issue! I'm writing tutorials based on Glassfish and I just decided to drop Glassfish for all my future tutorials because the quality of GF is disgusting compared to the times it was managed by Sun! I will use Tomcat instead, congrats!! I'm so disappointed. It's such a shame that this obvious issue is not even assigned yet!

Comment by atiqkhaled [ 09/Apr/16 ]

Hi
Did you try it for XML. I mean replace xml on @Produces(

{MediaType.APPLICATION_JSON}

) . Hope it works then.

Comment by nabizamani [ 14/Apr/16 ]

Helloooo Oracle, anyone working on this???

Comment by andradeb.david [ 23/May/16 ]

Hi in this post is a solution .
http://ayudasdesarrollo.blogspot.com.co/2016/05/glassfish-441-falla-con-jax-rs-y-json.html

Comment by sombriks [ 18/Jun/16 ]

hello,

i can confirm that the bug still there.

i know that java.net stuff is being deactivated, however this bug is going to be one year old soon, even though the solution is documented here.

The solution is there like a couple of weeks after the bug was reported.

Comment by sentonimo [ 23/Dec/16 ]

Hi everybody:
I solved this error, but a little bit different than andradeb.david. I made the changes he wrote, but then I got the error related in other thread, https://java.net/jira/browse/GLASSFISH-21141
After this last error, I solved putting a forgotten JAR in the /module folder of Glassfish 4.1.1; this JAR is https://mvnrepository.com/artifact/com.fasterxml.jackson.module/jackson-module-jaxb-annotations/2.5.1 , which have the same version of the others JARs of Jackson. So, I stopped the server, deleted the OSGI-CACHE, put this jar on the folder /modules of Glassfish, started the server and all the errors are solved now.

The "bug" of Glassfish it's only forgetted JAR, just it all.

Hope useful for someone.
And, come on! It's only a missed JAR, it's not a big bug, a little sympathy for the great team of Glassfish, they're making always a good work

UPDATE: Actually the solution it's more ease than I figured out; with the solution of andradeb.david you will downgrade the library org.eclipse.persistence.moxy.jar, and it's no need. You only have to do this simple steps:
1) Open de original org.eclipse.persistence.moxy.jar with your favorite extractor and edit de META-INF/MANIFEST.MF. Include into the file, at the end of the block of "Import-Package:" this:

org.xml.sax.helpers,javax.xml.parsers, javax.naming

2) Save the jar, stop the server, clean de osgi-cache from Glassfih Domain, restart and that's all.
3) Probably, after solve this error, you will get the error cited at https://java.net/jira/browse/GLASSFISH-21141

I hope this solve all the errors for all of you. It was only a little error, forgotten "Imports" at the MANIFEST.MF, that's all. After this, server works perfectly, with his originals JARs and versions.





[GLASSFISH-21532] com.sun.jts.CosTransactions.GlobalTID breaks the equals/hashCode contract Created: 09/Apr/16  Updated: 04/Jan/17

Status: Open
Project: glassfish
Component/s: jts
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: mmusgrov2 Assignee: sameerpandit
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Whilst testing JTS transaction propagation between glassfish and other application servers I hit a recovery problem (which I reported via https://java.net/projects/glassfish/lists/dev/archive/2016-04/message/0) caused by implementation of the GlobalTID.hashCode() method. It is possible to create to GlobalTID instances with are the same according to the equals method but have different hash codes. A simple test showing the problem is:

GlobalTID Test
import org.omg.CosTransactions.otid_t;
import com.sun.jts.CosTransactions.GlobalTID;

public class X {
    public static void main(String[] args) {
        test();
    }

    public static void test() {
        otid_t otid1 = toOtid("xyz".getBytes(), "a".getBytes());
        otid_t otid2 = toOtid("xyz".getBytes(), "".getBytes());

        GlobalTID tid1 = new GlobalTID(otid1);
        GlobalTID tid2 = new GlobalTID(otid2);

        if (!tid1.equals(tid2))
            throw new AssertionError("GlobalTIDs should be equal");

        // equal objects must have the same hashCode
        if (tid1.hashCode() != tid2.hashCode())
            throw new AssertionError("equal GlobalTID objects should have the same hash code");
    }

    private static otid_t toOtid(byte[] gtid, byte[] bqual) {
        otid_t otid = new otid_t();

        otid.formatID = 0;
        otid.tid = new byte[gtid.length + bqual.length];
        otid.bqual_length = bqual.length;

        /*
         * gtrid must be first then immediately followed by bqual.
         * bqual must be between 1 and 64 bytes if for XA.
         */

        System.arraycopy(gtid, 0, otid.tid, 0, gtid.length);
        System.arraycopy(bqual, 0, otid.tid, gtid.length, bqual.length);

        return otid;
    }
}

To compile and run the example put the following three jars on the classpath:

export CLASSPATH=.:glassfish-corba-omgapi.jar:jts.jar:common-util.jar



 Comments   
Comment by lprimak [ 28/Dec/16 ]

Fixed in Payara by https://github.com/payara/Payara/pull/1256





[GLASSFISH-21572] AS-WEB-GLUE-00078 is logged to the server.log although both tls11-enabled and tls12-enabled are true. Created: 25/Oct/16  Updated: 04/Jan/17

Status: Open
Project: glassfish
Component/s: security, web_container
Affects Version/s: 4.1, 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yama0428 Assignee: sameerpandit
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

When tls-enabled is set to false,
AS-WEB-GLUE-00078 is logged to the server.log although both tls11-enabled and tls12-enabled are still true.

Reproducible steps are as follows.

C:\glassfish411\glassfish\bin>asadmin set cluster.network-config.protocols.protocol.http-listener-2.ssl.tls-enabled=false
Warning: Instance instance seems to be offline; command set was not replicated to that instance
cluster.network-config.protocols.protocol.http-listener-2.ssl.tls-enabled=false
Command set executed successfully.

C:\glassfish411\glassfish\bin>asadmin start-cluster cluster
Command start-cluster executed successfully.

This is the message.

[2016-10-25T10:25:52.263+0900] [glassfish 4.1] [WARNING] [AS-WEB-GLUE-00078] [javax.enterprise.web] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1477358749362] [timeMillis: 1477358752263] [levelValue: 900] [[
  All SSL protocol variants disabled for network-listener http-listener-2, using SSL implementation specific defaults]]

This is the patch for this problem.

PECoyoteConnector#configureSSL
        if (Boolean.valueOf(sslConfig.getTlsEnabled())) {
            if (needComma) {
                sslProtocolsBuf.append(", ");
            } else {
                needComma = true;
            }
            sslProtocolsBuf.append("TLSv1");
        }
        if (Boolean.valueOf(sslConfig.getTls11Enabled())) {
            if (needComma) {
                sslProtocolsBuf.append(", ");
            } else {
                needComma = true;
            }
            sslProtocolsBuf.append("TLSv1.1");
        }
        if (Boolean.valueOf(sslConfig.getTls12Enabled())) {
            if (needComma) {
                sslProtocolsBuf.append(", ");
            }
            sslProtocolsBuf.append("TLSv1.2");
        }
        if (Boolean.valueOf(sslConfig.getSsl3Enabled()) ||
                Boolean.valueOf(sslConfig.getTlsEnabled())) {
            sslProtocolsBuf.append(", SSLv2Hello");
        }





[GLASSFISH-21650] countopenconnections is not counted at the request to http-listener-2 of the cluster Created: 26/Dec/16  Updated: 04/Jan/17

Status: Open
Project: glassfish
Component/s: monitoring, web_container
Affects Version/s: 3.1.2.2, 4.1, 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yama0428 Assignee: sameerpandit
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

countopenconnections is not counted at the request to http-listener-2 of the cluster

https://localhost:24855/monitoring/domain1/monitorins/http-service/server/request/countopenconnections

countopenconnections

    count : 0
    lastsampletime : -1
    description : The number of open connections
    unit : count
    name : CountOpenConnections
    starttime : 1482721891713

In domain.xml, virtual server is defined as follows.

<virtual-server id="server" network-listeners="http-listener-1, http-listener-2">

Therefore, taking into account spaces is needed when splitting network-listeners of virtual server.

This is the patch for this problem.

HttpServiceStatsProvider.java
import java.util.List;
import com.sun.enterprise.util.StringUtils;

    public HttpServiceStatsProvider(String vsName, String listeners, NetworkConfig networkConfig) {
        this.virtualServerName = vsName;
        List<String> listenerList = StringUtils.parseStringList(listeners, ",");
        this.networkListeners = (listenerList != null) ?
                listenerList.toArray(new String[listenerList.size()]) :
                new String[0];
        this.networkConfig = networkConfig;
    }





[GLASSFISH-21647] maxqueued is always zero Created: 21/Dec/16  Updated: 04/Jan/17

Status: Open
Project: glassfish
Component/s: monitoring, web_container
Affects Version/s: 4.1, 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yama0428 Assignee: pranjal.sahay
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

maxqueued is always zero.

http://localhost:4848/monitoring/domain1/server/network/http-listener-1/connection-queue

maxqueued

    count : 0
    lastsampletime : -1
    description : Maximum size of the connection queue
    unit : count
    name : MaxQueued
    starttime : 1482281096124

peakqueued

    count : 1
    lastsampletime : 1482282338225
    description : Largest number of connections that were in the queue simultaneously
    unit : count
    name : PeakQueued
    starttime : 1482281096124

maxqueued is the maximum size of the connection queue.
So it is invalid because default queue size is 4096.

This is the patch for this problem.

ThreadPoolMonitor.java
    public ThreadPoolMonitor(GrizzlyMonitoring grizzlyMonitoring,
            String monitoringId, ThreadPoolConfig config) {
        this.grizzlyMonitoring = grizzlyMonitoring;
        this.monitoringId = monitoringId;

        if (grizzlyMonitoring != null) {
            final ThreadPoolStatsProvider threadPoolStatsProvider =
                    grizzlyMonitoring.getThreadPoolStatsProvider(monitoringId);
            if (threadPoolStatsProvider != null) {
                threadPoolStatsProvider.setStatsObject(config);
                threadPoolStatsProvider.reset();
            }

            final ConnectionQueueStatsProvider connectionQueueStatsProvider =
                    grizzlyMonitoring.getConnectionQueueStatsProvider(monitoringId);
            if (connectionQueueStatsProvider != null) {
                connectionQueueStatsProvider.setStatsObject(config);
                connectionQueueStatsProvider.reset();
                connectionQueueStatsProvider.setMaxTaskQueueSizeEvent(monitoringId, config.getQueueLimit());
            }
        }
    }





[GLASSFISH-21515] Possible null pointer dereference Created: 12/Feb/16  Updated: 04/Jan/17

Status: Open
Project: glassfish
Component/s: verifier
Affects Version/s: 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: AppChecker Assignee: pranjal.sahay
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: 30 seconds
Time Spent: Not Specified
Original Estimate: 30 seconds


 Description   

Strangely that variable specMappingInfo was used before it was checked:

  if (specMappingInfo.length()!=0 && specMappingInfo!=null)

it seems it should be

  if (specMappingInfo!=null && specMappingInfo.length()!=0)

File: appserver/verifier/verifier-impl/src/main/java/com/sun/enterprise/tools/verifier/Result.java
Line: 119

This possible defect found by static analyzer AppChecker






[GLASSFISH-21563] BATCH CLI: asadmin list-batch-jobs/list-batch-job-executions (with long option) is slow if a large number of jobs are stored in DB Created: 20/Sep/16  Updated: 04/Jan/17

Status: Open
Project: glassfish
Component/s: batch
Affects Version/s: 4.1.1, 5.0
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: kunisada Assignee: mskdeepak
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows, Oracle12c



 Description   

I found that asadmin list-batch-jobs/list-batch-job-executions (with -l option) command freezes for around 80--120 seconds in my environment. There are 3000 job executions in the remote job DB host (Oracle12c). I understand deleting job in the DB makes the command replies faster, but I'm afraid it might be a bother if we need to keep always the number of jobs below several dozens or several hundreds in the DB.



 Comments   
Comment by kunisada [ 20/Sep/16 ]

I found some methods such as 'JobExecution#getBatchStatus()' etc. are relatively heavy because they establish a DB connection and submit a SQL statement on every call.

The following patch reduces them by keeping method-results in local values if possible.

https://gist.github.com/k2sd/869aeb6cf6092c9c6565687f5e06b708

The modification is very small but it improves performance by 20--30% on listing jobs (I know it's still too long though..).

Comment by kunisada [ 28/Oct/16 ]

I made a patch that can reduce turn around time of the list command by simply reducing the output of the command. The following patch introduces a system property 'org.glassfish.batch.jobinstance.listsize,' and it specifies the max number of the job instances that can be fetched from job repository. If the size set on the system property is small enough, the command can be finish quickly.

https://gist.github.com/k2sd/6efcb4bc52e9f3a1b776d09af9729e2b





[GLASSFISH-21574] asadmin deploy --precompilejsp doesn't check compilerSourceVM and compilerTargetVM in glassfish-web.xml Created: 31/Oct/16  Updated: 04/Jan/17

Status: Open
Project: glassfish
Component/s: web_container
Affects Version/s: 4.1, 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yama0428 Assignee: Kokil_Jain
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

asadmin deploy --precompilejsp doesn't check compilerSourceVM and compilerTargetVM in glassfish-web.xml.

Therefore, if I use the grammar of JDK7, compilation of jsp is failed.

This is the patch for this problem.

org.glassfish.web.jsp.JSPCompiler.java configureJspc(JspC jspc, String pName, String pValue)
            } else if ("ignoreJspFragmentErrors".equals(pName)) {
                jspc.setIgnoreJspFragmentErrors(
                    Boolean.valueOf(pValue).booleanValue());
+           } else if ("compilerSourceVM".equals(pName)) {
+               jspc.setCompilerSourceVM(pValue);
+           } else if ("compilerTargetVM".equals(pName)) {
+               jspc.setCompilerTargetVM(pValue); 
            }
        }





[GLASSFISH-21576] javamail debug log is not logged. Created: 01/Nov/16  Updated: 04/Jan/17

Status: Open
Project: glassfish
Component/s: mail
Affects Version/s: 3.1.2.2, 4.1, 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yama0428 Assignee: mskdeepak
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

javamail debug log is not logged if I use javamail resource created by asadmin command.

ex)

asadmin create-javamail-resource --target server --mailuser=test@sample.com --fromaddress=test@sample.com --mailhost=127.0.0.1 --storeprotocol=imap --storeprotocolclass=com.sun.mail.imap.IMAPStore --transprotocol=smtp --transprotocolclass=com.sun.mail.smtp.SMTPTransport --description=description1 --property mail-password=password:mail-debug=true mail/MySession

Following logs are NOT logged to server.log

DEBUG: trying to connect to host "127.0.0.1", port 143, isSSL false
* OK IMAPrev1
A0 CAPABILITY
 CAPABILITY IMAP4 IMAP4rev1 CHILDREN IDLE QUOTA SORT
A0 OK CAPABILITY completed
|#]

This is the patch for this problem.
Two line are removed.

org.glassfish.resources.javamail.naming.MailNamingObjectFactory.java
        Properties props = config.getMailProperties();
        javax.mail.Session s = javax.mail.Session.getInstance(props, new MailSessionAuthenticator(props));
        if("smtps".equals(props.getProperty("mail.transport.protocol"))) {
            s.setProtocolForAddress("rfc822", "smtps");
        }
-       s.setDebugOut(new PrintStream(new MailLogOutputStream()));
-       s.setDebug(true);

        return s;





[GLASSFISH-21579] asadmin list-file-groups exits successfully although user doesn't exist Created: 02/Nov/16  Updated: 04/Jan/17

Status: Open
Project: glassfish
Component/s: security
Affects Version/s: 4.1, 4.1.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yama0428 Assignee: pranjal.sahay
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

asadmin list-file-groups exits successfully although user doesn't exist.

C:\glassfish-4.1.1\glassfish4\glassfish\bin>asadmin list-file-users
Command list-file-users executed successfully.

C:\glassfish-4.1.1\glassfish4\glassfish\bin>asadmin list-file-groups --name foo
list-file-groups Successful
Command list-file-groups executed successfully.

I think it is kind if list-file-groups command informs users of designated username doesn't exist.

This is my patch for this.

com.sun.enterprise.security.cli.ListFileGroup.java
    public void execute(AdminCommandContext context) {

        final ActionReport report = context.getActionReport();

        try {
            // Get all users of this file realm. If a username has
            // been passed in through the --name CLI option use that
            FileRealm fr = getFileRealm(securityService, fileAuthRealm, report);

            if (fr == null) {
                // the getFileRealm method would have filled
                // in the right cause of this situation
                return;
            }
            
            Enumeration groups = null;
            if (fileUserName != null) {
+               fr.getUser(fileUserName);
                groups = fr.getGroupNames(fileUserName);
            } else {
                groups = fr.getGroupNames();
            }

By this patch, asadmin list-file-groups fails like this.

>asadmin list-file-groups --name foo
remote failure: Specified file user foo not found  No such user [foo].
No such user [foo].
Command list-file-groups failed.





[GLASSFISH-21467] Session replication not working in glassfish on multi node cluster Created: 18/Nov/15  Updated: 03/Jan/17

Status: Open
Project: glassfish
Component/s: configuration
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: fredaabedi Assignee: Yamini K B
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

CentOS on Amazon AWS



 Description   

1) application contains distributable tag in web.xml 2) application when deployed in cluster c1, which contains 2 instances present on same node, session replication works. 3) Same application when deployed in cluster c2, which contains 2 instances present on two CentOS machines, session replication does not work.

Following are content of glassfish-web.xml (if required for reference) :

<glassfish-web-app error-url="">
<session-config>
<session-manager persistence-type="replicated">
<manager-properties>
<property name="persistenceFrequency" value="web-method" />
<property name="relaxCacheVersionSemantics" value="true"/>
</manager-properties>
<store-properties>
<property name="persistenceScope" value="session" />
</store-properties>
</session-manager>
<!--<cookie-properties>
<property name="cookieDomain" value="node2"/>
<property name="cookieDomain" value="node4"/>
</cookie-properties> -->
<cache max-entries="4096" timeout-in-seconds="30" enabled="false">
<default-helper/>
</cache>
</session-config>
<context-root>/contextNaam</context-root>
<class-loader delegate="true"/>
<resource-ref>
<res-ref-name>jdbc/safe</res-ref-name>
<jndi-name>jdbc/safe</jndi-name>
</resource-ref>
<jsp-config>
<property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class' java code.</description>
</property>
</jsp-config>
</glassfish-web-app>



 Comments   
Comment by fredaabedi [ 18/Nov/15 ]

This blog post by David Matějček
http://stackoverflow.com/questions/28062516/session-replication-not-working-in-glassfish-on-multi-node-cluster/33669515?lastactivity
indicates there was a bug in Shoal and incompatibility with Grizzly. He has fixed it in Payara and the fix is now in Glassfish too.
I do not find the fix in Glassfish and I have installed the latest Glassfish 4.1.1 and session replication does not work but I verified that it works with paraya-4.1.1.154 on the same machines.
Can you please indicate where is the fix in the source/build?

Thank you!

Comment by Masoud Kalali [ 07/Dec/15 ]

Considering that I am no longer active in GlassFish space I am assigning all the tickets to Chris Kasso in Java EE/ Application Servers team and he can reassign them as appropriate.

Comment by emilio0281 [ 03/Aug/16 ]

Same problem!
Any update?





[GLASSFISH-21654] NullPointerException is logged when delete-local-instance is executed Created: 27/Dec/16  Updated: 28/Dec/16

Status: Open
Project: glassfish
Component/s: jms
Affects Version/s: 3.1.2.2, 4.1, 4.1.1, 5.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yama0428 Assignee: David Zhao
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

NullPointerException is logged when delete-local-instance is executed.
In addition, the message that includes only the key is logged.

[2016-12-27T15:46:34.672+0900] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=163 _ThreadName=Thread-9] [[
  java.lang.NullPointerException
	at com.sun.enterprise.connectors.jms.system.MQAddressList.createJmsHostCopy(MQAddressList.java:660)
	at com.sun.enterprise.connectors.jms.system.MQAddressList.getResolvedJmsHost(MQAddressList.java:644)
	at com.sun.enterprise.connectors.jms.system.MQAddressList.getResolvedLocalJmsHostsInMyCluster(MQAddressList.java:467)
	at com.sun.enterprise.connectors.jms.system.MQAddressList.setupForCluster(MQAddressList.java:441)
	at com.sun.enterprise.connectors.jms.system.MQAddressList.setup(MQAddressList.java:139)
	at com.sun.enterprise.connectors.jms.system.JMSConfigListener.getBrokerList(JMSConfigListener.java:261)
	at com.sun.enterprise.connectors.jms.system.JMSConfigListener.changed(JMSConfigListener.java:230)
	at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:400)
	at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:390)
	at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:280)
	at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:278)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:744)]]

[2016-12-27T15:46:34.823+0900] [glassfish 4.1] [INFO] [] [javax.enterprise.resource.jms] [tid: _ThreadID=163 _ThreadName=pool-24-thread-1] [[
  set.cluster.brokerlist.success]]

Reproducible steps are as follows.

C:\gf41\glassfish4\glassfish\bin>asadmin create-cluster cluster
Command create-cluster executed successfully.

C:\gf41\glassfish4\glassfish\bin>asadmin create-local-instance --cluster cluster instance
Rendezvoused with DAS on localhost:4848.
Using DAS host localhost and port 4848 from existing das.properties for node
localhost-domain1. To use a different DAS, create a new node using create-node-ssh or
create-node-config. Create the instance with the new node and correct
host and port:
asadmin --host das_host --port das_port create-local-instance --node node_name instance_name.
Port Assignments for server instance instance:
JMX_SYSTEM_CONNECTOR_PORT=28694
JMS_PROVIDER_PORT=27684
HTTP_LISTENER_PORT=28088
ASADMIN_LISTENER_PORT=24856
JAVA_DEBUGGER_PORT=29017
IIOP_SSL_LISTENER_PORT=23828
IIOP_LISTENER_PORT=23708
OSGI_SHELL_TELNET_PORT=26674
HTTP_SSL_LISTENER_PORT=28189
IIOP_SSL_MUTUALAUTH_PORT=23928
Command create-local-instance executed successfully.

C:\gf41\glassfish4\glassfish\bin>asadmin start-cluster cluster
Command start-cluster executed successfully.

C:\gf41\glassfish4\glassfish\bin>asadmin create-local-instance --cluster cluster instance2
Rendezvoused with DAS on localhost:4848.
Using DAS host localhost and port 4848 from existing das.properties for node
localhost-domain1. To use a different DAS, create a new node using create-node-ssh or
create-node-config. Create the instance with the new node and correct
host and port:
asadmin --host das_host --port das_port create-local-instance --node node_name instance_name.
Port Assignments for server instance instance2:
JMX_SYSTEM_CONNECTOR_PORT=28695
JMS_PROVIDER_PORT=27685
HTTP_LISTENER_PORT=28089
ASADMIN_LISTENER_PORT=24857
JAVA_DEBUGGER_PORT=29018
IIOP_SSL_LISTENER_PORT=23829
IIOP_LISTENER_PORT=23709
OSGI_SHELL_TELNET_PORT=26675
HTTP_SSL_LISTENER_PORT=28190
IIOP_SSL_MUTUALAUTH_PORT=23929
Command create-local-instance executed successfully.

C:\gf41\glassfish4\glassfish\bin>asadmin set cluster.jms-service.type=REMOTE
instance:
cluster.jms-service.type=REMOTE

cluster.jms-service.type=REMOTE
Command set executed successfully.

C:\gf41\glassfish4\glassfish\bin>asadmin delete-local-instance instance2
Command delete-local-instance executed successfully.


 Comments   
Comment by David Zhao [ 28/Dec/16 ]

When create-local-instance, by default it will generate EMBEDDED jms service. Why do you change it to REMOTE without any other jms configuration changes?

Comment by yama0428 [ 28/Dec/16 ]

We use REMOTE broker.
So these commands have already been done before executing asadmin commands.

C:\windows\system32>c:\gf41\glassfish4\mq\bin\imqsvcadmin install -javahome "c:\
Program Files (x86)\Java\jdk1.7.0_79"
Installation of service Message Queue 5.0 Broker successful.

C:\windows\system32>net start "Message Queue 5.0 Broker"

NPE may be thrown since revision 39053.

Admin CLI support for Clusters and bug fixes for 12323 and 12759

I think either null check in MQAddressList#createJmsHostCopy or checking REMOTE mode is needed.

Comment by David Zhao [ 28/Dec/16 ]

You can follow the tutorial to Configure a GlassFish Cluster to Use a Remote Broker Cluster, delete the default_JMS_host at first and then create-jms-host for REMOTE usage. Refer to https://docs.oracle.com/cd/E26576_01/doc.312/e24934/jms.htm#GSHAG00160

Comment by yama0428 [ 28/Dec/16 ]

Shouldn't I use "asadmin set cluster.jms-service.type=REMOTE" command?

REMOTE type broker is written in the following manual.
https://docs.oracle.com/cd/E26576_01/doc.312/e24928/jms.htm#GSADG00775

Although I did the following steps, the same messages were logged.

C:\gf41\glassfish4\glassfish\bin>asadmin create-cluster cluster7
Command create-cluster executed successfully.

C:\gf41\glassfish4\glassfish\bin>asadmin delete-jms-host --target cluster7 default_JMS_host
Did not find any suitable instances for target cluster7; command executed on DAS only
Command delete-jms-host executed successfully.

C:\gf41\glassfish4\glassfish\bin>asadmin create-jms-host --target cluster7 --mqhost localhost --mqport 7676 --mquser admin --mqpassword admin myhost
Jms Host myhost created.
Did not find any suitable instances for target cluster7; command executed on DAS only
Command create-jms-host executed successfully.

C:\gf41\glassfish4\glassfish\bin>asadmin set cluster7.jms-service.type=REMOTE
cluster7.jms-service.type=REMOTE
Command set executed successfully.

C:\gf41\glassfish4\glassfish\bin>asadmin create-local-instance --cluster cluster7 cluster7-1
Rendezvoused with DAS on localhost:4848.
Using DAS host localhost and port 4848 from existing das.properties for node
localhost-domain1. To use a different DAS, create a new node using create-node-ssh or
create-node-config. Create the instance with the new node and correct
host and port:
asadmin --host das_host --port das_port create-local-instance --node node_name instance_name.
Port Assignments for server instance cluster7-1:
JMX_SYSTEM_CONNECTOR_PORT=28696
JMS_PROVIDER_PORT=27686
HTTP_LISTENER_PORT=28090
ASADMIN_LISTENER_PORT=24858
JAVA_DEBUGGER_PORT=29019
IIOP_SSL_LISTENER_PORT=23830
IIOP_LISTENER_PORT=23710
OSGI_SHELL_TELNET_PORT=26676
HTTP_SSL_LISTENER_PORT=28191
IIOP_SSL_MUTUALAUTH_PORT=23930
Command create-local-instance executed successfully.

C:\gf41\glassfish4\glassfish\bin>asadmin start-cluster cluster7
Command start-cluster executed successfully.

C:\gf41\glassfish4\glassfish\bin>asadmin create-local-instance --cluster cluster7 cluster7-2
Rendezvoused with DAS on localhost:4848.
Using DAS host localhost and port 4848 from existing das.properties for node
localhost-domain1. To use a different DAS, create a new node using create-node-ssh or
create-node-config. Create the instance with the new node and correct
host and port:
asadmin --host das_host --port das_port create-local-instance --node node_name instance_name.
Port Assignments for server instance cluster7-2:
JMX_SYSTEM_CONNECTOR_PORT=28697
JMS_PROVIDER_PORT=27687
HTTP_LISTENER_PORT=28091
ASADMIN_LISTENER_PORT=24859
JAVA_DEBUGGER_PORT=29020
IIOP_SSL_LISTENER_PORT=23831
IIOP_LISTENER_PORT=23711
OSGI_SHELL_TELNET_PORT=26677
HTTP_SSL_LISTENER_PORT=28192
IIOP_SSL_MUTUALAUTH_PORT=23931
Command create-local-instance executed successfully.

C:\gf41\glassfish4\glassfish\bin>asadmin delete-local-instance  cluster7-2
Command delete-local-instance executed successfully.

[2016-12-28T15:18:09.876+0900] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=149 _ThreadName=Thread-9] [[
  java.lang.NullPointerException
	at com.sun.enterprise.connectors.jms.system.MQAddressList.createJmsHostCopy(MQAddressList.java:660)
	at com.sun.enterprise.connectors.jms.system.MQAddressList.getResolvedJmsHost(MQAddressList.java:644)
	at com.sun.enterprise.connectors.jms.system.MQAddressList.getResolvedLocalJmsHostsInMyCluster(MQAddressList.java:467)
	at com.sun.enterprise.connectors.jms.system.MQAddressList.setupForCluster(MQAddressList.java:441)
	at com.sun.enterprise.connectors.jms.system.MQAddressList.setup(MQAddressList.java:139)
	at com.sun.enterprise.connectors.jms.system.JMSConfigListener.getBrokerList(JMSConfigListener.java:261)
	at com.sun.enterprise.connectors.jms.system.JMSConfigListener.changed(JMSConfigListener.java:230)
	at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:400)
	at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:390)
	at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:280)
	at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:278)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)]]

[2016-12-28T15:18:09.877+0900] [glassfish 4.1] [INFO] [] [javax.enterprise.resource.jms] [tid: _ThreadID=149 _ThreadName=pool-22-thread-1] [[
  set.cluster.brokerlist.success]]
Comment by David Zhao [ 28/Dec/16 ]

create-local-instance will create EMBEDDED jms service on the local instance by default. So please try the following sequence:

create-cluster
create all instances by create-local-instance.
delete-jms-host
create-jms-host
asadmin set cluster7.jms-service.type=REMOTE
...
... send/receive jms messages.
...
delete-local-instance if necessary

Comment by yama0428 [ 28/Dec/16 ]
D:\glassfish4\glassfish\bin>asadmin create-cluster cluster7
Command create-cluster executed successfully.

D:\glassfish4\glassfish\bin>asadmin create-local-instance --cluster cluster7 clu
ster7-1
Rendezvoused with DAS on localhost:4848.
Using DAS host localhost and port 4848 from existing das.properties for node
localhost-domain1. To use a different DAS, create a new node using create-node-s
sh or
create-node-config. Create the instance with the new node and correct
host and port:
asadmin --host das_host --port das_port create-local-instance --node node_name i
nstance_name.
Port Assignments for server instance cluster7-1:
OSGI_SHELL_TELNET_PORT=26668
JAVA_DEBUGGER_PORT=29011
JMS_PROVIDER_PORT=27677
HTTP_LISTENER_PORT=28082
IIOP_SSL_LISTENER_PORT=23822
ASADMIN_LISTENER_PORT=24850
IIOP_SSL_MUTUALAUTH_PORT=23922
JMX_SYSTEM_CONNECTOR_PORT=28688
HTTP_SSL_LISTENER_PORT=28183
IIOP_LISTENER_PORT=23702
Command create-local-instance executed successfully.

D:\glassfish4\glassfish\bin>asadmin create-local-instance --cluster cluster7 clu
ster7-2
Rendezvoused with DAS on localhost:4848.
Using DAS host localhost and port 4848 from existing das.properties for node
localhost-domain1. To use a different DAS, create a new node using create-node-s
sh or
create-node-config. Create the instance with the new node and correct
host and port:
asadmin --host das_host --port das_port create-local-instance --node node_name i
nstance_name.
Port Assignments for server instance cluster7-2:
OSGI_SHELL_TELNET_