[GLASSFISH-21394] Create Installer packages for Glassfish 4.1 release Created: 27/Jul/15  Updated: 27/Jul/15  Resolved: 27/Jul/15

Status: Resolved
Project: glassfish
Component/s: installation
Affects Version/s: 4.1
Fix Version/s: 4.1

Type: Task Priority: Major
Reporter: unwichtich Assignee: Joe Di Pol
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

It looks like the installer packages for Glassfish 4.1 are missing (e.g. glassfish-4.1-unix.sh and others).

I can't find them in http://download.java.net/glassfish/4.1/release/

It would be very nice if someone could create the new packages, especially the silent installer for unix systems is important for me.



 Comments   
Comment by Romain Grécourt [ 27/Jul/15 ]

Installer support has been dropped.





[GLASSFISH-21366] move ejb System Value Classes from ejb-container.jar into their own jar Created: 27/May/15  Updated: 22/Jun/15  Resolved: 22/Jun/15

Status: Resolved
Project: glassfish
Component/s: packaging
Affects Version/s: 4.1
Fix Version/s: 4.1

Type: Bug Priority: Minor
Reporter: phendley Assignee: Jill Sato
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

all


Tags: cts, ejb,, packaging

 Description   

The following EJB System Value Classes of:
javax.ejb.Handle
javax.ejb.HomeHandle
javax.ejb.EJBMetaData
do exist in (glassfish) ejb-container.jar but contrary to spec, the
ejb-container.jar is not easily usable by hosted app servers.

The EJB 3.2 core spec (section 10.5.5) states:
"System value classes are serializable value classes implementing the
javax.ejb.Handle, javax.ejb.HomeHandle, javax.ejb.EJBMetaData, java.util.Enumeration, java.util.Collection, and java.util.Iterator interfaces. These value classes are pro- vided by the EJB container vendor. They must be provided in the form of a JAR file by the container hosting the referenced bean. For interoperability scenarios, if a referencing component would use such system value classes at runtime, the Deployer must ensure that these system value classes provided by the container hosting the referenced bean are available to the referencing component."

As an example of the problem scenario, if we try to include the ejb-container.jar on the WebLogic servers
classpath, WebLogic runs into conflucts during startup because it either can not resolve all dependencies specified in the ejb-container.jar file OR it runs into issues with conflicts due to hk2 classes referenced in ejhb-container.jar that are also included in weblogics appserver. Fortunately, weblogic was able to add a switch to allow ignoring hk2 classes from non-weblogic entities. But this points out the problem that the System Value classes SHOULD be pulled out of ejb-container.jar and put into their own separate jar as was intended by the spec.

The priority of this could change if other vendors encounter problems with this issue as it was originally found through cts tests. Fortunately, a workable solution was found by the vendor under test - even though a more appropriate solution should have been addressed by glassfish.



 Comments   
Comment by Jill Sato [ 03/Jun/15 ]

Moved the following classes into ejb-client.jar
EJBMetaDataImpl
HandleDelegateUtil
HandleImpl
HomeHandleImpl
ObjrefEnumeration

Comment by Jill Sato [ 22/Jun/15 ]

Fixed in rev 63921 & 63922.





[GLASSFISH-21356] Validation : Ensure that valid resource-adapter name is specified in @ConnectionFactoryDefinition/@AdministeredObjectDefinition Created: 08/May/15  Updated: 08/May/15

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

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


 Description   

As per the java-doc of @ConnectionFactoryDefinition.resourceAdapter(), the resource adapter specified must be available during deployment time:
http://docs.oracle.com/javaee/7/api/javax/resource/ConnectionFactoryDefinition.html#resourceAdapter%28%29

It implicitly indicates that deployment of the application archive that has these annotations (@ConnectionFactoryDefinition, @AdministeredObjectDefinition") can be failed if the resource-adapter name is invalid.

Today, GlassFish does not fail deployment of the archive, instead during first time lookup of the resource, the lookup will fail. Need to fix this behavior and make sure that validation is done as part of application deployment.






[GLASSFISH-21349] GlassFish 4 does not start on OS X 10.10.3 Created: 17/Apr/15  Updated: 18/Apr/15  Resolved: 18/Apr/15

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

Type: Bug Priority: Minor
Reporter: hadrabap Assignee: Joe Di Pol
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OS X 10.10


Issue Links:
Cloners
clones GLASSFISH-21113 GlassFish 4 does not start on OS X 10.10 Resolved
Duplicate
duplicates GLASSFISH-21343 Glassfish fails to start on OSX 10.10.3 Resolved
Related
is related to GLASSFISH-12942 Mac: restart fails for instance start... Resolved
Tags: 4_0_1-mustfix, fishcat

 Description   

It appears GlassFish 4 and 4.0.1 nightly build from Jun 16 does not start on Mac OS X 10.10.

bin/asadmin start-domain domain1 produces:

JVM failed to start: java.io.IOException: Cannot run program "/usr/libexec/StartupItemContext" (in directory "/Applications/glassfish4/glassfish/domains/domain1/config"): error=2, No such file or directory

Command start-domain failed.

This bug was reported to me by Joonas Lehtinen (joonas at vaadin dot com).



 Comments   
Comment by Joe Di Pol [ 18/Apr/15 ]

Duplicate of GLASSFISH-21343





[GLASSFISH-21209] Renaming 4.0.1 to 4.1 Created: 19/Sep/14  Updated: 19/Sep/14  Resolved: 19/Sep/14

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

Type: Task Priority: Trivial
Reporter: mkarg Assignee: Romain Grécourt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

JIRA



 Description   

Please rename release 4.0.1 to 4.1 in JIRA to prevent confusion about the never-release 4.0.1 version.



 Comments   
Comment by Romain Grécourt [ 19/Sep/14 ]

Not a renaming since 4.1 already exists. I will have to do batch updates.

Comment by Romain Grécourt [ 19/Sep/14 ]

I've retargeted 4.0.1 issues to 4.1 and removed 4.0.1 version.
Did also rename all 4.0.1_bXX versions.





[GLASSFISH-21153] static copyright.html is missing from doc-root Created: 01/Aug/14  Updated: 16/Apr/15  Resolved: 16/Apr/15

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 4.1_b10, 4.1
Fix Version/s: 4.1, 4.2

Type: Bug Priority: Major
Reporter: Romain Grécourt Assignee: Shaifali Kansal
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks GLASSFISH-21122 4.0.1: Update default index.html and ... Open
Tags: 4_0_1-review, javaee_ri_fix

 Description   

When going to the doc-root index: http://localhost:8080, there is a link in the footer called "legal notice", which points to http://localhost:8080/copyright.html but does not exist.



 Comments   
Comment by Shaifali Kansal [ 16/Apr/15 ]

This issue has been resolved.

Sending basedocs/src/main/resources/glassfish/lib/templates/docroot/index.html
Transmitting file data .
Committed revision 63846.





[GLASSFISH-21149] A filter that changes the context class loader causes errors. Created: 30/Jul/14  Updated: 19/Sep/14  Resolved: 30/Jul/14

Status: Resolved
Project: glassfish
Component/s: cdi
Affects Version/s: 4.1
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: jjsnyder83 Assignee: jjsnyder83
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The CDI integration layer is using the thread's context class loader to determine the application. If the user app changes the context class loader then we cannot find the correct application.



 Comments   
Comment by jjsnyder83 [ 30/Jul/14 ]

Committed revision 63553.





[GLASSFISH-21124] Remove "Support" option from the main Admin page Created: 09/Jul/14  Updated: 19/Sep/14  Resolved: 14/Aug/14

Status: Resolved
Project: glassfish
Component/s: admin_gui
Affects Version/s: 4.1_b08
Fix Version/s: 4.1

Type: Task Priority: Trivial
Reporter: David Delabassee Assignee: Anissa Lam
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Remove the Top left link "Support" from GlassFish News
It links to https://shop.oracle.com/pls/ostore/f?p=dstore:4:8225235678856:::RIR:IR_ROWFILTER:GlassFish



 Comments   
Comment by David Delabassee [ 16/Jul/14 ]

Will be fixed as part of https://java.net/jira/browse/GLASSFISH-21123

Comment by Anissa Lam [ 14/Aug/14 ]

Decision is to remove the Registration and Support link from the common task page.

Project: glassfish
Repository: svn
Revision: 63610
Author: anilam
Date: 2014-08-14 00:38:14 UTC
Link:

Log Message:
------------
GLASSFISH-21123, GLASSFISH-21124 ; remove Registration and Support from common task page.

Revisions:
----------
63610

Modified Paths:
---------------
trunk/main/appserver/admingui/common/src/main/resources/commonTask.jsf





[GLASSFISH-21123] Check / Clean Registration Created: 09/Jul/14  Updated: 19/Sep/14  Resolved: 14/Aug/14

Status: Resolved
Project: glassfish
Component/s: admin_gui
Affects Version/s: 4.1_b08
Fix Version/s: 4.1

Type: Bug Priority: Minor
Reporter: David Delabassee Assignee: Anissa Lam
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

NA


Tags: 4_0_1-review

 Description   

Do we still tack registration?
If so, we need to make sure it's correctly handled.

In the Admin page ( http://localhost:4848/common/registration.jsf )
-> "Thank you for installing %%%SOURCE%%% From Oracle"



 Comments   
Comment by Joe Di Pol [ 09/Jul/14 ]

That page is linked to from the "Registration" link on the console's front page. So it is pretty visible.

Comment by Anissa Lam [ 14/Aug/14 ]

The decision is remove both the Registration and Support link from the common task page.

Project: glassfish
Repository: svn
Revision: 63610
Author: anilam
Date: 2014-08-14 00:38:14 UTC
Link:

Log Message:
------------
GLASSFISH-21123, GLASSFISH-21124 ; remove Registration and Support from common task page.

Revisions:
----------
63610

Modified Paths:
---------------
trunk/main/appserver/admingui/common/src/main/resources/commonTask.jsf





[GLASSFISH-21121] Update Administration Guide for GlassFish 4.0.1 Created: 08/Jul/14  Updated: 19/Sep/14  Resolved: 10/Jul/14

Status: Closed
Project: glassfish
Component/s: docs
Affects Version/s: 4.1
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: jclingan Assignee: sbcaruso
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: 4_0_1-mustfix

 Description   

Remove sections 11.16 - 11.25 of the Administration Guide. With no commercial release of GlassFish 4.x planned, there is no need to upgrade from GlassFish Server Open Source Edition to Oracle GlassFish Server.



 Comments   
Comment by jclingan [ 10/Jul/14 ]

Upgrade to Oracle GlassFish Server (no longer a feature) will be covered in the Release Notes.





[GLASSFISH-21120] Update Installation Guide for GlassFish 4.0.1 Created: 08/Jul/14  Updated: 19/Sep/14  Resolved: 10/Jul/14

Status: Closed
Project: glassfish
Component/s: docs
Affects Version/s: 4.1
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: jclingan Assignee: sbcaruso
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: 4_0_1-mustfix

 Description   

Review installation guide and update to reflect zip-only installer.



 Comments   
Comment by jclingan [ 10/Jul/14 ]

Install guide includes binary installer instructions, but GlassFish 4.0.1 will have a zip-only installer. This will be documented in the release notes.





[GLASSFISH-21119] GlassFish 4.0.1 Release Notes Created: 08/Jul/14  Updated: 19/Sep/14

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

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

Tags: 4_0_1-mustfix

 Description   

Provide release notes for GlassFish 4.0.1






[GLASSFISH-21116] update doc to remove GF commercial support Created: 08/Jul/14  Updated: 19/Sep/14

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

Type: Task Priority: Trivial
Reporter: David Delabassee Assignee: jclingan
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

NA



 Description   

remove from /glassfish/docs/features.html the mentions of commercial support.






[GLASSFISH-21113] GlassFish 4 does not start on OS X 10.10 Created: 30/Jun/14  Updated: 17/Apr/15  Resolved: 11/Aug/14

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

Type: Bug Priority: Minor
Reporter: reza_rahman Assignee: Joe Di Pol
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OS X 10.10


Issue Links:
Cloners
is cloned by GLASSFISH-21349 GlassFish 4 does not start on OS X 10... Resolved
Related
is related to GLASSFISH-12942 Mac: restart fails for instance start... Resolved
Tags: 4_0_1-mustfix, fishcat

 Description   

It appears GlassFish 4 and 4.0.1 nightly build from Jun 16 does not start on Mac OS X 10.10.

bin/asadmin start-domain domain1 produces:

JVM failed to start: java.io.IOException: Cannot run program "/usr/libexec/StartupItemContext" (in directory "/Applications/glassfish4/glassfish/domains/domain1/config"): error=2, No such file or directory

Command start-domain failed.

This bug was reported to me by Joonas Lehtinen (joonas at vaadin dot com).



 Comments   
Comment by Romain Grécourt [ 01/Jul/14 ]

I don't see a nightly from june 16. According to http://dlc.sun.com.edgesuite.net/glassfish/4.0.1/nightly/latest-glassfish.zip, the latest is from June 7.

Don't have OSX 10.10 available to try out, but it be nice to provide JDK version information.

Comment by reza_rahman [ 01/Jul/14 ]

Unfortunately I don't have a Mac either. Hopefully somebody else will run into this and help us debug it?

Comment by David Delabassee [ 01/Jul/14 ]

Given that OS X 10.10 will be released after GF 4.0.1, we can lower the priority.
How GF 4.0.1 run on 10.10 is something to track.

Comment by Joe Di Pol [ 01/Jul/14 ]

GFLauncher.java uses /usr/libexec/StartupItemContext on the Mac. See issue GLASSFISH-12942.

According to the error message it looks like this was not found on the 10.10 build that the submitter was using. So we need to find out if Apple is removing this interface from 10.10 and if so what replaces it.

Comment by David Delabassee [ 18/Jul/14 ]
  • OS X 10.10
  • JDK 8u20ea (prior SE8 versions can't be installed on 10.10)
  • GF401b9

GF can start in verbose mode (asadmin start-domain --verbose domain1) but 'simple' start-domain fails!
in Verbose mode "cmds.add("/usr/libexec/StartupItemContext");" is skipped (cf. main/nucleus/admin/launcher/src/main/java/com/sun/enterprise/admin/launcher/GFLauncher.java)

--8<--
bin/asadmin start-domain domain1
JVM failed to start: java.io.IOException: Cannot run program "/usr/libexec/StartupItemContext" (in directory "/Users/david/work/glassfish4/glassfish/domains/domain1/config"): error=2, No such file or directory
Command start-domain failed.
--8<--

Comment by Joe Di Pol [ 19/Jul/14 ]

See GLASSFISH-12942 on why "/usr/libexec/StartupItemContext" was used
See GLASSFISH-15118 on why it is not used with the --verbose option

For reference, on MacOS 10.9 StartupItemContext is a shell script that does this:

#!/bin/sh
unset LAUNCHD_SOCKET
exec launchctl bsexec / "$@"

The question is: why did Apple remove this from 10.10? Is that launchctl command still valid on 10.10? Is it safe for us to run it directly?

If the launchctl command is still valid on 10.10, then maybe we can just run it directly.

Comment by Joe Di Pol [ 11/Aug/14 ]

r63522
We now run the launchctl command directly instead of using /usr/libexec/StartupItemContext. The submitter has confirmed that with this change GlassFish starts on 10.10.





[GLASSFISH-21109] Add readme.txt in the GF home directory Created: 27/Jun/14  Updated: 19/Sep/14  Resolved: 14/Aug/14

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

Type: Task Priority: Trivial
Reporter: David Delabassee Assignee: Snjezana Sevo-Zenzerovic
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

NA


Tags: 4_0_1-mustfix, 4_0_1-review

 Description   

Would nice to add a readme.txt in the GF Home directory to guide users a bit:

  • how to start/stop GF
  • access the Admin console
  • where to get the docs & tutorial
  • default ports used
    etc.
    We (evang) can write it if needed.


 Comments   
Comment by Joe Di Pol [ 27/Jun/14 ]

I like this idea, especially since we are providing zip install bundles only. Once evangelism writes it (and gets it reviewed by a couple of us – or at least John), Snjezana can add it to the bundle.

Comment by Ed Bratt [ 12/Aug/14 ]

Please pull reviewed document from here https://docs.google.com/document/d/1j-gTuzOng0LC8sepmHchLkSc7vS1a6dxxKsBpF7yOXU/edit
And check it in.

Comment by David Delabassee [ 12/Aug/14 ]

The file (README.txt) should be uppercase (to pop higher in the list).

Comment by Snjezana Sevo-Zenzerovic [ 14/Aug/14 ]

Integrated on 08/14.





[GLASSFISH-21070] GlassFish Admin Console Never Appears - White Screen Created: 23/May/14  Updated: 19/Sep/14

Status: Open
Project: glassfish
Component/s: jax-rs
Affects Version/s: 4.1_b05
Fix Version/s: 4.1

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

Glassfish 4.0.1-b05-ml, Ubuntu Linux 12.04 LTS


Tags: Admin, Console, Exception, FacesServlet, JAXRS, UriBuilder

 Description   

Hello

I cannot access the Glassfish admin console remotely, because there is a failure with a web service.

Glassfish 4.0.1-b05-ml,
Ubuntu Linux 12.04 LTS
I cannot access the administration view http://www.xenonique.co.uk:4848/ on my server at all.
I enabled remote DAS.
I managed to see the admin console, then I restarted the server then now there is a blank screen.

Here is what I found inside the log:

[2014-05-23T19:11:45.498+0000] [glassfish 4.0] [WARNING] [] [javax.enterprise.web.core] [tid: _ThreadID=42 _ThreadName=admin-listener(3)] [timeMillis: 1400872305498] [levelValue: 900] [[
Servlet.service() for servlet FacesServlet threw exception
java.lang.AbstractMethodError: javax.ws.rs.core.UriBuilder.uri(Ljava/lang/String;)Ljavax/ws/rs/core/UriBuilder;
at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:119)
at org.glassfish.jersey.client.JerseyWebTarget.<init>(JerseyWebTarget.java:71)
at org.glassfish.jersey.client.JerseyClient.target(JerseyClient.java:177)
at org.glassfish.jersey.client.JerseyClient.target(JerseyClient.java:68)
at org.glassfish.admingui.common.util.RestUtil.get(RestUtil.java:862)
at org.glassfish.admingui.common.util.RestUtil.restRequest(RestUtil.java:209)
at org.glassfish.admingui.common.handlers.RestApiHandlers.restRequest(RestApiHandlers.java:224)
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.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:442)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:420)
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.createView(LayoutViewHandler.java:255)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:254)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:121)
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.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:875)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:739)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:575)
at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:546)
at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:428)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:378)
at org.glassfish.admingui.common.security.AdminConsoleAuthModule.validateRequest(AdminConsoleAuthModule.java:224)
at com.sun.enterprise.security.jmac.config.GFServerConfigProvider$GFServerAuthContext.validateRequest(GFServerConfigProvider.java:1175)
at com.sun.web.security.RealmAdapter.validate(RealmAdapter.java:1654)
at com.sun.web.security.RealmAdapter.invokeAuthenticateDelegate(RealmAdapter.java:1521)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:606)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:702)
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: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:215)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:291)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:209)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:137)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:115)
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:291)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:209)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:137)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:115)
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:291)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:209)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:137)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:115)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:550)
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:744)
]]



 Comments   
Comment by Anissa Lam [ 23/May/14 ]

Assign to Web Service team for initial investigation as the error is from there.

Comment by jimnicolson [ 08/Jul/14 ]

Getting the java.lang.AbstractMethodError: javax.ws.rs.core.UriBuilder.uri(Ljava/lang/String;)Ljavax/ws/rs/core/UriBuilder; error also.

Glassfish 4.0.1 (b7)
Oracle Linux 6.5
java version 1.7.0_55

I don't get (haven't seen) this error after clean install first boot with the default Domain1 nor on a freshly created domain.

After I deploy (in WAR form) Jenkins and Artifactory, the problem will arise either on next boot or (annoyingly) a few boots later. Even though there have been no other config changes or deployments!

Either the GF Admin Console will return a blank screen or hang on the "GF Admin console starting" page (a refresh will then return a blank page) or Artifactory will fail on startup.

After trying a few combinations, I found that if I deploy Artifactory after bouncing the server, set Artifactory Deployment order to 150 and Uncheck Enable Implicit CDI, then (relatively)consistently Artifactory starts but the GF Console Startup will fail.

Artifactory and Jenkins are running normally but integration/communication between Atrifactory plug-in and Jenkins also fails once the above GF Admin console startup error ccurs.

This combination of Artifactory, Jenkins (using earlier and current versions) is working and stable with GF 4.0.0.

I am caught between a rock and a hard place. After upgrading to OL 6.5 and it's default JDK of 1.7.0_55, I can't use Eclipse Kepler with GF 4.0.0 because of https://java.net/jira/browse/GLASSFISH-21004.

GF 4.0.1 resolves this but introduces build system failures because of the java.lang.AbstractMethodError: javax.ws.rs.core.UriBuilder.uri(Ljava/lang/String;)Ljavax/ws/rs/core/UriBuilder.

I have a log file and added some comments (Search for !!!!). This is a single full boot process with deployment of Jenkins/Artifactory then an attempt to access the GF Console using a browser. If this is useful, how do I attach it?

Comment by Romain Grécourt [ 08/Jul/14 ]

I didn't reproduce using 4.0.1-b08 (using OSX 10.5 / jdk7u9 / jdk7u51 / jdk7u55).

Here is what I did:

unzip glassfish-4.0.1-b08-ml.zip
cd glassfish4/glassfish
bin/asadmin start-domain
bin/asadmin change-admin-password
bin/asadmin login
bin/asadmin enable-secure-admin
bin/asadmin restart-domain

Peter, can you provide an exact set of steps that reproduce this issue ?

Comment by peter_pilgrim [ 08/Jul/14 ]

Those are the steps I did use. The only differences are that I was accessing my server remotely from a different location and I configured Apache HTTPD server to certain server port 80 on set paths to access web context paths

*/artifactory -> web application "artifactory"
*/jenkins -> web application "jenkins"

E.g. I set up the HTTP conf to use the JkMount

<VirualHost> ...

  1. GlassFish 4.0.1 on worker 2
    JkMount /jenkins worker2
    JkMount /jenkins/* worker2
    JkMount /artifactory worker2
    JkMount /artifactory/* worker2
    ...
    </VirtualHost>

The original error, I saw when I tried access on port 4848, I reported the error that saw in the admin console . Since then, I reconfigured the administration port from 4848 to something else that only I know. Actually, I just tried access this URL and the admin login appears and I can login successfully. Here is how I set up the admin port:

$ asadmin set server.http-service.http-listener.admin-listener.port=9876
$ asadmin set configs.config.server-config.network-config.network-listeners.network-listener.admin-listener.port=9876

I thought the blocker was the Linux firewall, so as root user, I double checked that the ports were open.

$ iptables -A INPUT -p tcp --dport 9876 -j ACCEPT
$ iptables -L

Clearly, it is not a networking error, because Jim Nicolson also is seeing the same issue. So I am not sure why the error is no longer reproducible from my end. That's all of the info.

Comment by jimnicolson [ 09/Jul/14 ]

Hi Romain

Thanks for the quick response...

I realise that GLASSFISH-21004 has been resolved. this solved my Eclipse/Dev VM problem. This caused me to go to 4.0.1 but now I'm hitting the current problem with my build environment VM. I'd prefer to be running the same GF version for both.

On the current problem, I have never seen the issue on a clean domain (i.e. no apps deployed).

Although I've deployed both Jenkins and Artifactory, I did each deployment separately and each one was after a reboot of GF. I tested accessing the consoles of GF and the app(s) after each deployment before continuing.

Jenkins never showed a problem - it seems to be being triggered after the Artifactory deployment. But the problem does not always seem to manifest immediately. Usually immediately but sometimes after one or two GF reboots.

Two additional environment facts (seem unlikely to be a factor). OL 6.5 64 bit, and running on a VirtualBox 4.3.10 VM.

Domain Created with: /opt/glassfish4/glassfish/bin/asadmin --user oracle create-domain --savelogin --checkports=true --portbase 9000 nicolson-dev-mgmt-domain

Although I'm testing on the one VM, I do have a very basic Apache proxy setup for Jenkins/Artifactory set up. It makes no difference whether I use the direct or the proxy URL.

Regards





[GLASSFISH-21056] Can't configur GF 4 in Eclipse with JDK8 Created: 01/May/14  Updated: 19/Sep/14  Resolved: 08/May/14

Status: Closed
Project: glassfish
Component/s: configuration
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: yfain Assignee: Masoud Kalali
Resolution: Works as designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

MAC OS 10.9.2, Eclipse Kepler IDE


Tags: Eclipse, JDK8

 Description   

Installed GF 4.0. Tried to configure to run inside Eclipse Kepler IDE with JDK 8. The Eclipse window for configuring GF Runtime does not enable the button Next if JDK 8 is selected. Works fine with JDK 7.

Not sure if this is GF or Eclipse bug though.



 Comments   
Comment by jclingan [ 08/May/14 ]

This is a "feature" and not a bug, although I understand if you see otherwise JDK 8 is not a certified runtime for GlassFish 4.0. GlassFish 4.0.1 is planning to add JDK 8 certification. Working with the Oracle Enterprise Pack for Eclipse team on updating the plugin for GlassFish 4.0.1. Closing this issue.

Comment by jclingan [ 08/May/14 ]

Closing issue.





[GLASSFISH-21054] max post size/max swallowing input bytes do not limit the post request Created: 30/Apr/14  Updated: 19/Sep/14  Resolved: 29/May/14

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

Type: Bug Priority: Major
Reporter: rcaliber Assignee: oleksiys
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 1 day
Time Spent: Not Specified
Original Estimate: 1 day

Tags: glassfish, post, request, size

 Description   

Trying to put a limit on the HTTP POST request content. Tried changing max post size and max swallowing input bytes (as suggested in a previous bug GLASSFISH-17332) to 20KB. Still able to send 40KB and above.
So if max swallowing input bytes is applicable to application/x-www-form-urlencoded then what other attribute can be used to limit json content limit?

Content-Type →application/json
Server →GlassFish Server Open Source Edition 4.0 (Build 89)



 Comments   
Comment by Shing Wai Chan [ 30/Apr/14 ]

Assign to Alexey as this is related to GLASSFISH-17332

Comment by oleksiys [ 29/May/14 ]

should be fixed in Glassfish 4.0.1.
We'll have 2 parameters:
1) max-form-post-size-bytes for application/x-www-form-urlencoded posts
2) max-post-size-bytes for all posts

So application/x-www-form-urlencoded posts have to pass two checks: max-form-post-size-bytes and max-post-size-bytes. All other posts have to pass just max-post-size-bytes check.

Comment by rcaliber [ 02/Jun/14 ]

Thanks for resolving this!





[GLASSFISH-21044] GlassFish module can't use Javac API with security manager / JavaSE8 Created: 18/Apr/14  Updated: 19/Sep/14  Resolved: 23/Apr/14

Status: Closed
Project: glassfish
Component/s: security
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Critical
Reporter: Romain Grécourt Assignee: Nithya Ramakrishnan
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

JavaSE 8


Issue Links:
Related
is related to GLASSFISH-21012 JDK 8: Can't compile JSPs when defaul... Resolved
Tags: java8, javac, security

 Description   

This happens for instance when deploying an app using JSP or CMP, while running GlassFish with JavaSE8 and security manager turned on.
Here is what can be seen in the server.log

[2014-04-15T13:06:45.438+0200] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core.security] [tid: _ThreadID=44 _ThreadName=admin-listener(4)] [timeMillis: 1397560005438] [levelValue: 800] [[
  JACC Policy Provider: Failed Permission Check, context(null)- permission(("java.lang.reflect.ReflectPermission" "suppressAccessChecks"))]]

[2014-04-15T13:06:45.446+0200] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=44 _ThreadName=Thread-9] [timeMillis: 1397560005446] [levelValue: 1000] [[
  An exception has occurred in the compiler (1.8.0-internal). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report.  Tha
nk you.]]

Note that if one adds the mentioned permission under a grant for unknown code, it works.



 Comments   
Comment by JeffTancill [ 23/Apr/14 ]

Closed as duplicate of https://java.net/jira/browse/GLASSFISH-21012





[GLASSFISH-21041] make schema/table-prefix/table-suffix configurable for batch status tables Created: 16/Apr/14  Updated: 19/Sep/14

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

Type: Improvement Priority: Major
Reporter: ChristianSch Assignee: Mahesh Kannan
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: 4_0_1-reviewed

 Description   

currently schema is hard coded, see GLASSFISH-20886

to comply with site policies / name scheme it would be useful to be able to define not only schema, but also table-prefix and suffix, for example javax.batch.table-prefix="T_"



 Comments   
Comment by Mahesh Kannan [ 16/Apr/14 ]

Mar for 4.0.1





[GLASSFISH-21040] Update commons-fileupload Created: 11/Apr/14  Updated: 19/Sep/14  Resolved: 05/May/14

Status: Resolved
Project: glassfish
Component/s: web_container
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Joe Di Pol Assignee: Joe Di Pol
Resolution: Invalid Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: 4_0_1-mustfix

 Description   

Update commons-fileupload to 1.3.1 (requires commons-io 2.2)



 Comments   
Comment by Joe Di Pol [ 05/May/14 ]

The bug was fixed in r63213 by patching the source and not updating the component version. Closing this bug as invalid.





[GLASSFISH-21031] Unable to send XML payload to web socket client using getSendWriter() via RemoteEndpoint.Basic Created: 06/Apr/14  Updated: 19/Sep/14  Resolved: 14/Apr/14

Status: Resolved
Project: glassfish
Component/s: web_socket
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Minor
Reporter: abhirockzz Assignee: Pavel Bucek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Glass Fish 4, JDK 7/8 on Windows 7


Issue Links:
Dependency
depends on TYRUS-318 Writer returned from BasicRemote.getS... Resolved
Tags: 4_0_1-review

 Description   

Complete info @ http://abhirockzz.wordpress.com/2014/04/03/websocket-api-issues-during-xml-payload-transmission-via-getsendwriter-handle/

Use Case: Trying to send a XML payload back to the remote client using the java.io.Writer handle provided by the getSendWriter() method in RemoteEndpoint.Basic interface

try(Writer writer = peer.getBasicRemote().getSendWriter()){

JAXBContext.newInstance(SampleModel.class).createMarshaller().marshal(new SampleModel("sdfsdf", "val2"), writer);

}

Exception below:

INFO: java.lang.NullPointerException
at org.glassfish.tyrus.websockets.Utf8Utils.encode(Utf8Utils.java:55)
at org.glassfish.tyrus.websockets.frametypes.TextFrameType.getBytes(TextFrameType.java:59)
at org.glassfish.tyrus.websockets.draft07.Draft07Handler.frame(Draft07Handler.java:72)
at org.glassfish.tyrus.servlet.ConnectionImpl.write(ConnectionImpl.java:86)
at org.glassfish.tyrus.websockets.ProtocolHandler.write(ProtocolHandler.java:182)
at org.glassfish.tyrus.websockets.ProtocolHandler.send(ProtocolHandler.java:82)
at org.glassfish.tyrus.websockets.ProtocolHandler.send(ProtocolHandler.java:77)
at org.glassfish.tyrus.websockets.ProtocolHandler.stream(ProtocolHandler.java:149)
at org.glassfish.tyrus.websockets.DefaultWebSocket.stream(DefaultWebSocket.java:205)
at org.glassfish.tyrus.server.TyrusRemoteEndpoint.sendText(TyrusRemoteEndpoint.java:105)
at org.glassfish.tyrus.core.WriterToAsyncTextAdapter.sendBuffer(WriterToAsyncTextAdapter.java:62)
at org.glassfish.tyrus.core.WriterToAsyncTextAdapter.flush(WriterToAsyncTextAdapter.java:76)
at java.io.BufferedWriter.flush(BufferedWriter.java:254)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.cleanUp(MarshallerImpl.java:342)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:335)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:251)
at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:131)
at com.abhirockzz.SimpleWSEndpoint.connectionOpen(SimpleWSEndpoint.java:36)
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:483)
at org.glassfish.tyrus.core.AnnotatedEndpoint.callMethod(AnnotatedEndpoint.java:431)
at org.glassfish.tyrus.core.AnnotatedEndpoint.onOpen(AnnotatedEndpoint.java:468)
at org.glassfish.tyrus.core.EndpointWrapper.onConnect(EndpointWrapper.java:425)
at org.glassfish.tyrus.server.TyrusEndpoint.onConnect(TyrusEndpoint.java:135)
at org.glassfish.tyrus.websockets.DefaultWebSocket.onConnect(DefaultWebSocket.java:110)
at org.glassfish.tyrus.servlet.TyrusHttpUpgradeHandler.init(TyrusHttpUpgradeHandler.java:98)



 Comments   
Comment by Pavel Bucek [ 14/Apr/14 ]

fixed in Tyrus workspace, will be integrated 1-2 weeks from now to Glassfish trunk.





[GLASSFISH-21029] Logging throw java.lang.IllegalStateException: Queue full. When use System.out.println. Created: 03/Apr/14  Updated: 19/Sep/14  Resolved: 30/May/14

Status: Resolved
Project: glassfish
Component/s: logging
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: p_suwanpech Assignee: sandeep.shrivastava
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

glassfish4 JDK7 windows


Tags: 4_0_1-review

 Description   

When following code run GF4 throw java.lang.IllegalStateException
for (int i = 0; i < 20000; i++)

{ System.out.println("-----------------------------"); }

not only above statement will cause error,but also logging to console.
-----------------
I was fixed this error by com.sun.common.util.logging.LoggingOutputStream put following code at line 116

try

{ pendingRecords.add(logRecord); }

catch (IllegalStateException e) {
try

{ pendingRecords.put(logRecord); }

catch (InterruptedException ex)

{ //log will lose. }

}



 Comments   
Comment by sandeep.shrivastava [ 14/May/14 ]

Committed revision 63273.

Comment by Pavel Bucek [ 23/May/14 ]

change related to this issue was reverted.

Comment by sandeep.shrivastava [ 30/May/14 ]

Modified the original fix. Committed revision 63316.





[GLASSFISH-21025] Expired certificate: GTE CyberTrust Created: 01/Apr/14  Updated: 19/Sep/14

Status: Reopened
Project: glassfish
Component/s: security
Affects Version/s: 4.0
Fix Version/s: 4.1

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

GF 4.0 GA ZIP, Win 7 Pro SP1 (64 Bit), JDK 1.8.0 (32 Bit)


Tags: 4_0_1-review

 Description   

After starting GlassFish 4.0 on JDK 1.8.0 I got the following SEVERE message in the server.log. I do not think that it is nice that a freshly installed brand-new GlassFish prints a SEVERE message... Would be better in GlassFish bundles an updates certificate instead.

[2014-04-01T14:45:11.671+0200] [glassfish 4.0] [SEVERE] [java_security.expired_certificate] [javax.enterprise.system.ssl.security.com.sun.enterprise.security.ssl.impl] [tid: _ThreadID=111 _ThreadName=admin-listener(7)] [timeMillis: 1396356311671] [levelValue: 1000] [[
SEC5054: Certificate has expired: [
[
Version: V3
Subject: CN=GTE CyberTrust Root 5, OU="GTE CyberTrust Solutions, Inc.", O=GTE Corporation, C=US
Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5

Key: Sun RSA public key, 2048 bits
modulus: 23741889829347261660812437366387754385443431973861114865490414153884050331745811968523116847625570146592736935209718565296053386842135985534863157983128812774162998053673746470782252407673402238146869994438729551246768368782318393878374421033907597162218758024581735139682087126982809511479059100617027892880227587855877479432885604404402435662802390484099065871430585284534529627347717530352189612077130606642676951640071336717026459037542552927905851171460589361570392199748753414855675665635003335769915908187224347232807336022456537328962095005323382940080676931822787496212635993279098588863972868266229522169377
public exponent: 65537
Validity: [From: Fri Aug 14 16:50:00 CEST 1998,
To: Thu Aug 15 01:59:00 CEST 2013]
Issuer: CN=GTE CyberTrust Root 5, OU="GTE CyberTrust Solutions, Inc.", O=GTE Corporation, C=US
SerialNumber: [ 01b6]

Certificate Extensions: 4
[1]: ObjectId: 2.5.29.19 Criticality=true
BasicConstraints:[
CA:true
PathLen:5
]

[2]: ObjectId: 2.5.29.32 Criticality=false
CertificatePolicies [
[CertificatePolicyId: [1.2.840.113763.1.2.1.3]
[] ]
]

[3]: ObjectId: 2.5.29.15 Criticality=true
KeyUsage [
Key_CertSign
Crl_Sign
]

[4]: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 76 0A 49 21 38 4C 9F DE F8 C4 49 C7 71 71 91 9D v.I!8L....I.qq..
]
]

]
Algorithm: [SHA1withRSA]
Signature:
0000: 41 3A D4 18 5B DA B8 DE 21 1C E1 8E 09 E5 F1 68 A:..[...!......h
0010: 34 FF DE 96 F4 07 F5 A7 3C F3 AC 4A B1 9B FA 92 4.......<..J....
0020: FA 9B ED E6 32 21 AA 4A 76 C5 DC 4F 38 E5 DF D5 ....2!.Jv..O8...
0030: 86 E4 D5 C8 76 7D 98 D7 B1 CD 8F 4D B5 91 23 6C ....v......M..#l
0040: 8B 8A EB EA 7C EF 14 94 C4 C6 F0 1F 4A 2D 32 71 ............J-2q
0050: 63 2B 63 91 26 02 09 B6 80 1D ED E2 CC B8 7F DB c+c.&...........
0060: 87 63 C8 E1 D0 6C 26 B1 35 1D 40 66 10 1B CD 95 .c...l&.5.@f....
0070: 54 18 33 61 EC 13 4F DA 13 F7 99 AF 3E D0 CF 8E T.3a..O.....>...
0080: A6 72 A2 B3 C3 05 9A C9 27 7D 92 CC 7E 52 8D B3 .r......'....R..
0090: AB 70 6D 9E 89 9F 4D EB 1A 75 C2 98 AA D5 02 16 .pm...M..u......
00A0: D7 0C 8A BF 25 E4 EB 2D BC 98 E9 58 38 19 7C B9 ....%..-...X8...
00B0: 37 FE DB E2 99 08 73 06 C7 97 83 6A 7D 10 01 2F 7.....s....j.../
00C0: 32 B9 17 05 4A 65 E6 2F CE BE 5E 53 A6 82 E9 9A 2...Je./..^S....
00D0: 53 0A 84 74 2D 83 CA C8 94 16 76 5F 94 61 28 F0 S..t-.....v_.a(.
00E0: 85 A7 39 BB D7 8B D9 A8 B2 13 1D 54 09 34 24 7D ..9........T.4$.
00F0: 20 81 7D 66 7E A2 90 74 5C 10 C6 BD EC AB 1B C2 ..f...t\.......



 Comments   
Comment by Nithya Ramakrishnan [ 02/Apr/14 ]

Removed the expired trustedcert entry from the cacerts.jks in the source repository.

Transmitting file data ....
Committed revision 63173.

Comment by David Delabassee [ 27/Jun/14 ]

The Embedded Container still carry the expired CyberTrust Cert





[GLASSFISH-21024] glassfish-4.0-windows.exe says "This application needs version 1.6 or higher of the Java(TM) 2 Runtime Environment" when JDK 8 is installed as sole JRE Created: 01/Apr/14  Updated: 19/Sep/14  Resolved: 17/Sep/14

Status: Closed
Project: glassfish
Component/s: installation
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: mkarg Assignee: Snjezana Sevo-Zenzerovic
Resolution: Works as designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Win 7 Pro SP1 (64 Bit), JDK 1.8.0



 Description   

On my Windows 7 Pro SP1 (64 Bit) machine I have installed solely JDK 1.8.0.
When running glassfish-4.0-windows.exe, it says "This application needs version 1.6 or higher of the Java(TM) 2 Runtime Environment".
As JDK 8 IS higher than 1.6, this message is just wrong.
The installer should get fixed ASAP to support the acceptance of Java 8!



 Comments   
Comment by mkarg [ 01/Jul/14 ]

I reported this bug on April 1 this year and there is not any change in status visible in JIRA (like "we cannot reproduce this" or "deferred to later release"). So if you are waiting FOR ME to provide more information please tell me what you like me to check. Otherwise, if GlassFish 4.0.x is INTENDED to not run on JDK 8 then please clearly say so on the GF web site.

Comment by David Delabassee [ 02/Jul/14 ]

GF 4.0 was released before SE 8 and is thus only certified on SE 7 (see Cert Matrix that is linked form the Release Notes - https://glassfish.java.net/docs/4.0/release-notes.pdf).
The upcoming GF 4.0.1 will add support for Java SE 8 but this version won't have the native Windows installer (Zip distro only).

Comment by mkarg [ 17/Sep/14 ]

This ticket says that the solution was scheduled for GF 4.0.1. While there never was a 4.0.1, there meanwhile is a 4.1 – which does not contain a native installer EXE anymore at all. Hence I would like to kindly ask to update this ticket to contain the final resolution: Either there will not be such a native installer anymore (so the ticket should get closed) or the solution will is deferred to a later release of GlassFish (so the scheduled version schould be updated).

Comment by David Delabassee [ 17/Sep/14 ]

GF 4.0 is only cert with SE7 (SE8 having been released after GF 4.0).
GF 4.1 supports SE8 (and the latest SE7 updates).
GF 4.1 has no native installer (see here why https://blogs.oracle.com/theaquarium/entry/spotlight_on_glassfish_4_01)
PS: re. 4.0.1 'Vs' 4.1, please see https://blogs.oracle.com/theaquarium/entry/spotlight_on_glassfish_4_1

Comment by mkarg [ 17/Sep/14 ]

David, thanks for your kind comments. In fact my request was not about getting information, it was solely about getting the tickets in this tracker updated, which you now kindly did in part – still it says that the release is called 4.0.1, not 4.1. That's pretty confusing. Why not simply renaming 4.0.1 to 4.1 in JIRA?

Comment by mkarg [ 17/Sep/14 ]

One question: If someone (like me) would provide native packages (like MSI or DEB) would you be interested in this contribution (so your decision was about manpower) or would you reject it (so your decision was about simplicity really)? I am asking because we are thinking about how to deal with the fact that there is no EXE anymore. If we decide to write own bundles, we theoretically could contribute them.





[GLASSFISH-21022] JDBCPersistenceManagerImpl#jobOperatorGetJobExecution SQL syntax error Created: 31/Mar/14  Updated: 27/Jan/15  Resolved: 27/Jan/15

Status: Resolved
Project: glassfish
Component/s: batch
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: ChristianSch Assignee: Mahesh Kannan
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

oracle 11g


Tags: 4_0_1-reviewed

 Description   
select A.createtime, A.starttime, A.endtime, A.updatetime, A.parameters, A.jobinstanceid, A.batchstatus, A.exitstatus, B.name 
from executioninstancedata as A inner join jobinstancedata as B on A.jobinstanceid = B.jobinstanceid 
where jobexecid = ?");

Oralce syntax does not allow keyword "as" in table alias, stmt should be converted to

select A.createtime, A.starttime, A.endtime, A.updatetime, A.parameters, A.jobinstanceid, A.batchstatus, A.exitstatus, B.name 
from executioninstancedata A inner join jobinstancedata B on A.jobinstanceid = B.jobinstanceid 
where jobexecid = ?");

this is just an example all stmt should be reviewed



 Comments   
Comment by ChristianSch [ 24/Apr/14 ]

http://docs.oracle.com/cd/B28359_01/server.111/b28286/ap_standard_sql003.htm#SQLRF55400

E051-08, Correlation names in FROM clause (Oracle supports correlation names, but not the optional AS keyword)

Comment by Mahesh Kannan [ 27/Jan/15 ]

This has been resolved with the integration of 1.0.1-b07 jars.
QL passed.





[GLASSFISH-21020] JDBC connection leak detected in JDBCPersistenceManagerImpl Created: 28/Mar/14  Updated: 19/Sep/14

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

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


 Description   
        private boolean isDerby() throws SQLException {
                logger.entering(CLASSNAME, "isDerby");
                Connection conn = getConnectionToDefaultSchema();
                DatabaseMetaData dbmd = conn.getMetaData();
                boolean derby = dbmd.getDatabaseProductName().toLowerCase().indexOf("derby") > 0;

 >>>missing>>>  cleanupConnection(conn, null, null);

                logger.exiting(CLASSNAME, "isDerby", derby);
                return derby;
        }





[GLASSFISH-21012] JDK 8: Can't compile JSPs when default security manager is installed Created: 20/Mar/14  Updated: 19/Sep/14  Resolved: 09/May/14

Status: Resolved
Project: glassfish
Component/s: security
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Critical
Reporter: Scott Oaks Assignee: Nithya Ramakrishnan
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File server.log    
Issue Links:
Related
is related to GLASSFISH-21044 GlassFish module can't use Javac API ... Closed
Tags: 4_0_1-mustfix

 Description   

Enabled the security manager in a new domain using -Djava.security.manager -Djava.security.policy=/path_to/config/server.policy. JSPs would no longer compile due to an exception in initializer error from javac



 Comments   
Comment by Dhiru Pandey [ 20/Mar/14 ]

Is this a problem on JDK 7 too ?

Comment by kchung [ 24/Mar/14 ]

From the stack trace, it appears that the bug is in javac, during its static initializer.

[2014-03-20T10:21:46.871-0700] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=34 _ThreadName=Thread-4] [timeMillis: 1395336106871] [levelValue: 1000] [[
  An exception has occurred in the compiler (1.8.0-ea). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report.  Thank you.]]

[2014-03-20T10:21:46.873-0700] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=34 _ThreadName=Thread-4] [timeMillis: 1395336106873] [levelValue: 1000] [[
  java.lang.ExceptionInInitializerError]]

[2014-03-20T10:21:46.873-0700] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=34 _ThreadName=Thread-4] [timeMillis: 1395336106873] [levelValue: 1000] [[
  at com.sun.tools.javac.code.Symtab.<init>(Symtab.java:67)]]

[2014-03-20T10:21:46.873-0700] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=34 _ThreadName=Thread-4] [timeMillis: 1395336106873] [levelValue: 1000] [[
  at com.sun.tools.javac.code.Symtab.instance(Symtab.java:61)]]

[2014-03-20T10:21:46.873-0700] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=34 _ThreadName=Thread-4] [timeMillis: 1395336106873] [levelValue: 1000] [[
  at com.sun.tools.javac.jvm.ClassReader.<init>(ClassReader.java:290)]]

[2014-03-20T10:21:46.873-0700] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=34 _ThreadName=Thread-4] [timeMillis: 1395336106873] [levelValue: 1000] [[
  at com.sun.tools.javac.jvm.ClassReader.instance(ClassReader.java:253)]]

[2014-03-20T10:21:46.873-0700] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=34 _ThreadName=Thread-4] [timeMillis: 1395336106873] [levelValue: 1000] [[
  at com.sun.tools.javac.main.JavaCompiler.<init>(JavaCompiler.java:355)]]
Comment by Scott Oaks [ 24/Mar/14 ]

I would say that the bug is in the default security.policy file not granting tools.jar (or wherever javac is loaded from) the appropriate permissions. If the appropriate policies are in place, then the JSP can compile (though I'm not exactly sure what the smallest set of permissions is).

This does not occur with JDK 7. But the location of Symtab.java is not changed (it is still in tools.jar), so I'm not sure exactly what the issue is. I see that before that, the server complained about a JACC Policy Porivder failed permission check; I wonder if that is related?

Comment by kchung [ 02/Apr/14 ]

I was able to duplicate this error just by enabling the security manager and accessing a JSP page deployed in domain1. I also verified that this is only an issues with JDK 8, and not jdk 7.

The server.policy in domain1/config has this line:

grant codeBase "file:$

{com.sun.aas.javaRoot}

/lib/tools.jar"

{ permission java.security.AllPermission; }

;

It appears that javac is granted full permission, so it shouldn't have problem accessing the JSP page.

It also appears that the exception occurs at the constructor for javac, before the compilation of the JSP page starts.

I still think this is a javac issue, but I don't know how to reproduce the error with a standalone test.

Comment by kchung [ 06/May/14 ]

Adding a

grant {
    permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
};

to server.policy in <GF>/domains/domain1/config seems to fix the exceptions.

This may be too much though.

Comment by kchung [ 06/May/14 ]

Assign to Jeff to review the security ramification.

Comment by Nithya Ramakrishnan [ 06/May/14 ]

With the java.debug.security property on, the ProtectionDOmain that failed is:

access: domain that failed ProtectionDomain (file:/scratch/nitsubra/workspace/wls/dev/auto_download/x86_64/jdk8/jdk1.8.0/lib/tools.jar <no signer certificates>)
java.net.FactoryURLClassLoader@641be71b
<no principals>

As mentioned earlier in the comments, this behavior is strange since tools.jar is already given AllPermission.

Checking if this is an issue with the classloader (java.net.FactoryURLClassLoader)

Comment by Nithya Ramakrishnan [ 09/May/14 ]

The issue was that the placeholder in the existing grant in server.policy is pointing to <JDK-HOME>/jre folder. The tools.jar exists in <JDK-HOME>/lib/tools.jar.
Since the path to the tools.jar codesource was incorrect in the grant, it was failing. With the changed path (i.e.)

grant codeBase "file:$

{com.sun.aas.javaRoot}

/../lib/tools.jar"

{ permission java.security.AllPermission; }

;

JSP compilation works with JDK8 and SecurityManager on.

It could be that some fix in JDK8/new permission checks in JDK 8 caused this bug in server.policy to be exposed.
Now this has been fixed in server.policy

Sending appserver/security/core-ee/src/test/resources/com/sun/enterprise/security/perms/server.policy
Sending nucleus/admin/template/src/main/resources/config/server.policy
Sending nucleus/security/core/src/main/resources/config/server.policy
Transmitting file data ...
Committed revision 63258.





[GLASSFISH-21011] QuickLook fails with security manager ON / jdk7u60 / remote ejb Created: 19/Mar/14  Updated: 19/Sep/14  Resolved: 25/Mar/14

Status: Resolved
Project: glassfish
Component/s: security
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Critical
Reporter: Romain Grécourt Assignee: Nithya Ramakrishnan
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

jdk1.7.0_60-ea


Tags: 4_0_1-review, glassfish, security

 Description   

deploy-v3-impl:
[echo] deploying remoteview.jar

deploy-v3-impl-unix:
[exec] Command deploy failed.
[exec] remote failure: Error occurred during deployment: Exception while loading the app : javax.ejb.CreateException: Initialization failed for Singleton SingletonBean. Please see server.log for more details.
[exec] Result: 1

See a snippet of Server.log below.
I've tried adding 'permission java.io.SerializablePermission "enableSubclassImplementation";' to glassfish/domains/domain1/config/server.policy, and it worked.

[2014-03-19T09:41:52.085-0700] [glassfish 4.0] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=44 _ThreadName=admin-listener(3)] [timeMillis: 1395247312085] [levelValue: 1000] [[
  Exception during lifecycle processing
javax.ejb.EJBException: javax.ejb.CreateException: Initialization failed for Singleton SingletonBean
	at com.sun.ejb.containers.AbstractSingletonContainer$SingletonContextFactory.create(AbstractSingletonContainer.java:649)
	at com.sun.ejb.containers.AbstractSingletonContainer.instantiateSingletonInstance(AbstractSingletonContainer.java:389)
	at org.glassfish.ejb.startup.SingletonLifeCycleManager.initializeSingleton(SingletonLifeCycleManager.java:219)
	at org.glassfish.ejb.startup.SingletonLifeCycleManager.initializeSingleton(SingletonLifeCycleManager.java:180)
	at org.glassfish.ejb.startup.SingletonLifeCycleManager.doStartup(SingletonLifeCycleManager.java:158)
	at org.glassfish.ejb.startup.EjbApplication.start(EjbApplication.java:166)
	at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
	at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
	at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:500)
	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:356)
	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:356)
	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.GeneratedMethodAccessor105.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	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:406)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:350)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:106)
	at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:259)
	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:320)
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:236)
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028)
	at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:363)
	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:215)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:291)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:209)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:137)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:115)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:550)
	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:744)
Caused by: javax.ejb.CreateException: Initialization failed for Singleton SingletonBean
	at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:476)
	at com.sun.ejb.containers.AbstractSingletonContainer.access$000(AbstractSingletonContainer.java:74)
	at com.sun.ejb.containers.AbstractSingletonContainer$SingletonContextFactory.create(AbstractSingletonContainer.java:647)
	... 69 more
Caused by: java.lang.IllegalStateException: Exception attempting to inject Remote ejb-ref name=remoteview.SingletonBean/helloHome,Remote 2.x home =remoteview.HelloHome,Remote 2.x component interface=remoteview.HelloRemote resolved to intra-app EJB HelloBean in module remoteview,ejb-link=HelloBean,lookup=,mappedName=,jndi-name=HH,refType=Session into class remoteview.SingletonBean: Lookup failed for 'java:comp/env/remoteview.SingletonBean/helloHome' 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}
	at org.glassfish.weld.services.InjectionServicesImpl.aroundInject(InjectionServicesImpl.java:153)
	at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:46)
	at org.jboss.weld.injection.producer.DefaultInjector.inject(DefaultInjector.java:64)
	at org.jboss.weld.injection.producer.BasicInjectionTarget.inject(BasicInjectionTarget.java:91)
	at org.glassfish.weld.services.JCDIServiceImpl.injectEJBInstance(JCDIServiceImpl.java:257)
	at com.sun.ejb.containers.BaseContainer.injectEjbInstance(BaseContainer.java:1748)
	at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:436)
	... 71 more
Caused by: com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Remote ejb-ref name=remoteview.SingletonBean/helloHome,Remote 2.x home =remoteview.HelloHome,Remote 2.x component interface=remoteview.HelloRemote resolved to intra-app EJB HelloBean in module remoteview,ejb-link=HelloBean,lookup=,mappedName=,jndi-name=HH,refType=Session into class remoteview.SingletonBean: Lookup failed for 'java:comp/env/remoteview.SingletonBean/helloHome' 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}
	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.injectInstance(InjectionManagerImpl.java:170)
	at org.glassfish.weld.services.InjectionServicesImpl.aroundInject(InjectionServicesImpl.java:145)
	... 77 more
Caused by: javax.naming.NamingException: Lookup failed for 'java:comp/env/remoteview.SingletonBean/helloHome' 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: Exception resolving Ejb for 'Remote ejb-ref name=remoteview.SingletonBean/helloHome,Remote 2.x home =remoteview.HelloHome,Remote 2.x component interface=remoteview.HelloRemote resolved to intra-app EJB HelloBean in module remoteview,ejb-link=HelloBean,lookup=,mappedName=,jndi-name=HH,refType=Session' .  Actual (possibly internal) Remote JNDI name used for lookup is 'HH' [Root exception is javax.naming.CommunicationException: Communication exception for 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 java.rmi.RemoteException: ; nested exception is: 
	java.security.AccessControlException: access denied ("java.io.SerializablePermission" "enableSubclassImplementation")]]]
	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:411)
	at javax.naming.InitialContext.lookup(InitialContext.java:411)
	at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:636)
	... 80 more
Caused by: javax.naming.NamingException: Exception resolving Ejb for 'Remote ejb-ref name=remoteview.SingletonBean/helloHome,Remote 2.x home =remoteview.HelloHome,Remote 2.x component interface=remoteview.HelloRemote resolved to intra-app EJB HelloBean in module remoteview,ejb-link=HelloBean,lookup=,mappedName=,jndi-name=HH,refType=Session' .  Actual (possibly internal) Remote JNDI name used for lookup is 'HH' [Root exception is javax.naming.CommunicationException: Communication exception for 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 java.rmi.RemoteException: ; nested exception is: 
	java.security.AccessControlException: access denied ("java.io.SerializablePermission" "enableSubclassImplementation")]]
	at com.sun.ejb.EjbNamingReferenceManagerImpl.resolveEjbReference(EjbNamingReferenceManagerImpl.java:188)
	at com.sun.enterprise.container.common.impl.ComponentEnvManagerImpl$EjbReferenceProxy.create(ComponentEnvManagerImpl.java:1012)
	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)
	... 84 more
Caused by: javax.naming.CommunicationException: Communication exception for 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 java.rmi.RemoteException: ; nested exception is: 
	java.security.AccessControlException: access denied ("java.io.SerializablePermission" "enableSubclassImplementation")]
	at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:513)
	at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
	at javax.naming.InitialContext.lookup(InitialContext.java:411)
	at javax.naming.InitialContext.lookup(InitialContext.java:411)
	at com.sun.ejb.EjbNamingReferenceManagerImpl.resolveEjbReference(EjbNamingReferenceManagerImpl.java:183)
	... 89 more
Caused by: java.rmi.RemoteException: ; nested exception is: 
	java.security.AccessControlException: access denied ("java.io.SerializablePermission" "enableSubclassImplementation")
	at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:142)
	at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:478)
	... 93 more
Caused by: java.security.AccessControlException: access denied ("java.io.SerializablePermission" "enableSubclassImplementation")
	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372)
	at java.security.AccessController.checkPermission(AccessController.java:559)
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
	at org.omg.CORBA_2_3.portable.InputStream.checkPermission(InputStream.java:67)
	at org.omg.CORBA_2_3.portable.InputStream.<init>(InputStream.java:84)
	at com.sun.corba.ee.impl.encoding.CDRInputObject.<init>(CDRInputObject.java:147)
	at com.sun.corba.ee.impl.encoding.EncapsInputStream.<init>(EncapsInputStream.java:82)
	at com.sun.corba.ee.impl.encoding.EncapsOutputStream$EncapsInputStreamFactory.createInputObject(EncapsOutputStream.java:111)
	at com.sun.corba.ee.impl.encoding.CDROutputObject.createInputObject(CDROutputObject.java:355)
	at com.sun.corba.ee.impl.encoding.EncapsOutputStream.create_input_stream(EncapsOutputStream.java:105)
	at com.sun.corba.ee.impl.corba.AnyImpl.create_input_stream(AnyImpl.java:547)
	at org.omg.CosTransactions.OTSPolicyValueHelper.extract(OTSPolicyValueHelper.java:25)
	at com.sun.jts.pi.InterceptorImpl.send_request(InterceptorImpl.java:253)
	at com.sun.corba.ee.impl.interceptors.InterceptorInvoker.invokeClientInterceptorStartingPoint(InterceptorInvoker.java:290)
	at com.sun.corba.ee.impl.interceptors.PIHandlerImpl.invokeClientPIStartingPoint(PIHandlerImpl.java:378)
	at com.sun.corba.ee.impl.protocol.ClientRequestDispatcherImpl.beginRequest(ClientRequestDispatcherImpl.java:323)
	at com.sun.corba.ee.impl.protocol.ClientDelegateImpl.request(ClientDelegateImpl.java:220)
	at com.sun.corba.ee.impl.protocol.ClientDelegateImpl.is_a(ClientDelegateImpl.java:378)
	at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:130)
	at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
	at com.sun.jndi.cosnaming.CNCtx.callResolve(CNCtx.java:490)
	at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:541)
	at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:519)
	at javax.naming.InitialContext.lookup(InitialContext.java:411)
	at com.sun.enterprise.naming.util.IIOPObjectFactory.getObjectInstance(IIOPObjectFactory.java:71)
	at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
	at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:133)
	... 94 more
]]


 Comments   
Comment by Romain Grécourt [ 20/Mar/14 ]

Jeff, could you please let me know if the described fix is okay ?

Comment by JeffTancill [ 20/Mar/14 ]

Looks fine.

Comment by JeffTancill [ 24/Mar/14 ]

Do you want us to do the submit?

Comment by Romain Grécourt [ 24/Mar/14 ]

Here is the exact change I tried:

svn diff
Index: nucleus/security/core/src/main/resources/config/server.policy
===================================================================
--- nucleus/security/core/src/main/resources/config/server.policy	(revision 63170)
+++ nucleus/security/core/src/main/resources/config/server.policy	(working copy)
@@ -101,6 +101,9 @@
     permission java.net.SocketPermission    "*", "connect";
     permission java.io.FilePermission       "<<ALL FILES>>", "read,write";
 
+    // GLASSFISH-21011
+    permission java.io.SerializablePermission "enableSubclassImplementation";
+
         // work-around for pointbase bug 4864405      
         permission java.io.FilePermission "${com.sun.aas.instanceRoot}${/}lib${/}databases${/}-", "delete";
         permission java.io.FilePermission "${java.io.tmpdir}${/}-", "delete";

I can commit that as is with your approval, otherwise might be better if someone from your team makes the change.

Thanks,
Romain

Comment by JeffTancill [ 24/Mar/14 ]

Nithya, please submit this change to server.policy, thanks.

Comment by Nithya Ramakrishnan [ 25/Mar/14 ]

Since the invocation involves a few reflection classes outside the GF/modules directory, the explicit grant of the permission is required (AllPermission is applied only for classes within the modules directory).
Added the grant mentioned.
Also removed the redundant jruby related permission grant in the server.policy

Sending appserver/security/core-ee/src/test/resources/com/sun/enterprise/security/perms/server.policy
Sending nucleus/admin/template/src/main/resources/config/server.policy
Sending nucleus/security/core/src/main/resources/config/server.policy
Transmitting file data ...
Committed revision 63171.





[GLASSFISH-20999] description attribute on Topic doesn't get set Created: 01/Mar/14  Updated: 19/Sep/14

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

Type: New Feature Priority: Major
Reporter: pranahata Assignee: David Zhao
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

When setting the description attribute of a Topic via @JMSDestinationDefinition or glassfish-resources, it doesn't show either on the client or on the server when doing a toString of the Topic object.



 Comments   
Comment by amyk [ 16/Apr/14 ]

Hi David, please evaluate this to see where the 'description' should be displayed for a JMSDestinationDefinition annotation as a GlassFish JMS resource. Neither Java EE specification nor JMS specification specifies this 'description' be a description for the associated JMS provider's Destination object, further JMS API javadoc only says following for Queue.toString() and Topic.toString(), hence this is not a bug in Topic.toString() from spec conformance point of view

/** Returns a string representation of this object.
 *
 * @return the provider-specific identity values for this topic
 */
Comment by David Zhao [ 16/Apr/14 ]

The JMS admin objects created via admin console or asadmin can take and show the description property. But the property is not included in Queue.toString() either.

Currently the JMS resources defined by annotations like @JMSDestinationDefinition are not shown in the admin gui although it is global scoped. So now the description property will not be seen anywhere in the admin gui, except it is in the codes to be as comments.

To summarize it,

1) It is same as normal JMS resources which are created traditionally that the description is not shown in the toString().
2) If it is decided that the resources defined by annotations are shown in admin gui in the funture, then the description will appear there.

Question to Amy,

Should the description go to Queue.imqDestinationDescription?

Comment by amyk [ 16/Apr/14 ]

>Should the description go to Queue.imqDestinationDescription?

Yes.

Comment by David Zhao [ 17/Apr/14 ]

Update:

create-jms-resource maps property Description to imqDestinationDescription, so it is included in dest.toString():

Oracle GlassFish(tm) Server MQ Destination
getName(): myQueue
Class: com.sun.messaging.Queue
getVERSION(): 3.0
isReadonly(): false
getProperties():

{imqDestinationName=myQueue, imqDestinationDescription=abcde}

create-admin-object is a JCA general command, so it doesn't do the property mapping for JMS. Admin console is using this command as REST endpoint too, so if the JMS destination is created in this way, the description will not be shown in dest.toString(). But the Description property might be stored in MQ destination's properties map, because it can be persisted/restored.

@JMSDestinationDefinition doesn't map Description <-> imqDestinationDescription, so it is not included in toString().





[GLASSFISH-20981] Build failure because of invalid pom.xml Created: 13/Feb/14  Updated: 19/Sep/14  Resolved: 18/Feb/14

Status: Resolved
Project: glassfish
Component/s: build_system
Affects Version/s: 4.1
Fix Version/s: 4.1

Type: Bug Priority: Blocker
Reporter: HASUNUMA Kenji Assignee: Romain Grécourt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 Professional (x86/x64), JDK7 Update 51, Maven 3.1.1


Tags: jax-ws, jaxb, pom

 Description   

When building GlassFish 4.0.1 build 4, the build process is failed with following message. It is because that the specified version of webservices and jaxb does not exist on Maven central repository.

the specified version of webservices in pom.xml is 2.3.1-b259 but latest version on the central is 2.3.1-b104. And jaxb in pom.xml is 2.2.8-b131017.0915 but latest on the central is 2.2.8-b01.

---- Error message #1 ----

[INFO] Common persistence code between JPA and CMP ....... SUCCESS [3.266s]
[INFO] GlassFish Core EJB container implementation ....... FAILURE [0.336s]
[INFO] Full EJB Container add-ons ........................ SKIPPED

(snip)

[INFO] GlassFish Project ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23:50.842s
[INFO] Finished at: Thu Feb 13 15:35:45 JST 2014
[INFO] Final Memory: 353M/494M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project ejb-container: Could not resolve depen
dencies for project org.glassfish.main.ejb:ejb-container:glassfish-jar:4.0.1-b04
: Failure to find org.glassfish.metro:webservices-api-osgi:jar:2.3.1-b259 in htt
ps://maven.java.net/content/repositories/promoted/ was cached in the local repos
itory, resolution will not be reattempted until the update interval of jvnet-nex
us-promoted has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
lutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command

[ERROR] mvn <goals> -rf :ejb-container

---- Error message #2 ----

[INFO] GlassFish Web Services related modules ............ SUCCESS [0.175s]
[INFO] JSR-109 implementation to deploy Metro ............ FAILURE [6.597s]
[INFO] GlassFish Metro Glue Code ......................... SKIPPED

(snip)

[INFO] GlassFish Project ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 41:45.594s
[INFO] Finished at: Thu Feb 13 15:42:19 JST 2014
[INFO] Final Memory: 461M/494M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project jsr109-impl: Could not resolve depende
ncies for project org.glassfish.main.webservices:jsr109-impl:glassfish-jar:4.0.1
-SNAPSHOT: Failed to collect dependencies at com.sun.xml.bind:jaxb-osgi:jar:2.2.
8-b131017.0915: Failed to read artifact descriptor for com.sun.xml.bind:jaxb-osg
i:jar:2.2.8-b131017.0915: Could not transfer artifact com.sun.xml.bind:jaxb-osgi
:pom:2.2.8-b131017.0915 from/to jvnet-nexus-promoted (https://maven.java.net/con
tent/repositories/promoted/): peer not authenticated -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
lutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command

[ERROR] mvn <goals> -rf :jsr109-impl



 Comments   
Comment by Romain Grécourt [ 13/Feb/14 ]

update assignee, component.

We are aware of this issue, it will be fixed very soon.

Comment by Romain Grécourt [ 18/Feb/14 ]

Issue is resolved: a new metro version has been integrated into GlassFish, and the missing bits have been recovered on maven.java.net.





[GLASSFISH-20980] Convert private JDK API usage to new public equivalent (web container) Created: 11/Feb/14  Updated: 19/Sep/14  Resolved: 13/Feb/14

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

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

Issue Links:
Dependency
blocks GLASSFISH-19812 Prevent usage of proprietary API" war... Open

 Description   

Some time ago the JDK team provided a private entry point sun.misc.ClassLoaderUtil.releaseLoader for cleaning up open JARs held by a class loader.

The JDK team would like to remove this private method in JDK 9 given that JDK 7 provides the equivalent URLClassLoader.close method.

Currently the only place in GlassFish where grep finds sun.misc.ClassLoaderUtil is

main/appserver/web/war-util/src/main/java/org/glassfish/web/loader/WebappClassLoader.java



 Comments   
Comment by Romain Grécourt [ 13/Feb/14 ]

Tim, you may also want to look at GLASSFISH-19812, it's an umbrella issue for all the private APIs reported by javac during the build.

Comment by Tim Quinn [ 13/Feb/14 ]

Add "web container" to the title

Comment by Shing Wai Chan [ 13/Feb/14 ]

Sending src/main/java/org/glassfish/web/loader/WebappClassLoader.java
Transmitting file data .
Committed revision 63126.





[GLASSFISH-20977] gf-client-module.jar is an OSGi bundle, but should not be Created: 10/Feb/14  Updated: 19/Sep/14  Resolved: 20/Aug/14

Status: Resolved
Project: glassfish
Component/s: build_system
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Romain Grécourt Assignee: Romain Grécourt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: 4_0_1-approved, 4_0_1-reviewed, build, osgi

 Description   

Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle org.glassfish.main.appclient.gf-client-module [67]: Unable to resolve 67.0: missing requirement [67.0] osgi.wiring.package; (osgi.wiring.package=org.jboss.weld.environment.se)
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2037)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)
at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:210)



 Comments   
Comment by Romain Grécourt [ 19/Aug/14 ]

removing the OSGi metadata, makes the bundle starts.

However, it's still installed and shows up as:

   83|Active     |    1|file:/Users/romano/workspaces/glassfish/main2/appserver/distributions/glassfish/target/stage/glassfish4/glassfish/modules/gf-client-module.jar (0.0.0)
Comment by Romain Grécourt [ 20/Aug/14 ]

We will instead make the org.jboss.weld.environment.se import optional to allow this bundle to be started.

Comment by Romain Grécourt [ 20/Aug/14 ]
Log Message:
------------
fix for GLASSFISH-20977


Revisions:
----------
63645


Modified Paths:
---------------
trunk/main/appserver/appclient/client/acc/osgi.bundle


Diffs:
------
Index: trunk/main/appserver/appclient/client/acc/osgi.bundle
===================================================================
--- trunk/main/appserver/appclient/client/acc/osgi.bundle	(revision 63644)
+++ trunk/main/appserver/appclient/client/acc/osgi.bundle	(revision 63645)
@@ -43,3 +43,12 @@
                         org.glassfish.appclient.client.acc; \
                         org.glassfish.appclient.client.acc.callbackhandler;
                         org.glassfish.appclient.common; version=${project.osgi.version}
+
+# GLASSFISH-20977
+# This bundle is an OSGi bundle for convenience.
+# However it needs org.jboss.weld.environment.se package, which isn't provided in GlassFish.
+# The result is a non start-able OSGi bundle.
+# Making this import optional.
+Import-Package: \
+                        org.jboss.weld.environment.se;resolution:=optional, \
+                        *




[GLASSFISH-20973] annotated JMS ConnectionFactory doesn't enroll in container managed transaction Created: 07/Feb/14  Updated: 19/Sep/14  Resolved: 09/May/14

Status: Resolved
Project: glassfish
Component/s: jms
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: pranahata Assignee: David Zhao
Resolution: Fixed Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

GF v4.0


Attachments: Zip Archive JmsNoEnroleInTransaction.zip     File JmsNoEnroleInTransaction.zip.exe    
Issue Links:
Duplicate
is duplicated by GLASSFISH-20975 JMS doesn't enrol in container manage... Resolved
Tags: 4_0_1-approved

 Description   

On the attached example, a 12 messages are sent via 1.1 and 2.0 style to 2 destinations and then ctx.setRollbackOnly() is invoked. All messages arrive at two destinations, one outside the EJB container (Java SE) and on MDBs inside the container.



 Comments   
Comment by pranahata [ 07/Feb/14 ]

Can't attach file, so pasting here

package ejbs;
/*
 *  Copyright © - 2014 Anahata Technologies.
 */

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import javax.ejb.EJBContext;
import javax.ejb.Stateless;
import javax.ejb.TransactionManagement;
import javax.ejb.TransactionManagementType;
import javax.inject.Inject;
import javax.jms.*;

/**
 *
 * @author Pablo Rodriguez Pina <pablo@anahata-it.com.au>
 */
@JMSConnectionFactoryDefinition(
        name = "java:module/jms/annotationCF",
        maxPoolSize = 30,
        minPoolSize = 20,
        interfaceName = "javax.jms.TopicXAConnectionFactory",
        properties = {
            "addressList=mq://localhost:7676",
            "reconnectEnabled=true"
        }
)
@JMSDestinationDefinition(
        name = "java:module/jms/annotationTopic",
        interfaceName = "javax.jms.Topic",
        description = "Yam Dms Event Topic",
        destinationName = "annotationTopic"
)
@Stateless
@TransactionManagement(TransactionManagementType.CONTAINER)
public class JmsBean {
    @Resource(lookup = "java:module/jms/annotationCF")
    private ConnectionFactory annotationCF;

    @Inject
    @JMSConnectionFactory("java:module/jms/annotationCF")
    @JMSSessionMode(JMSContext.SESSION_TRANSACTED)
    private JMSContext annotationInjectedContext;

    @Resource(lookup = "java:module/jms/annotationTopic")
    private Topic annotationTopic;

    @Resource(lookup = "jms/gf-resourcesCF")
    private ConnectionFactory resourcesCF;
//

    @Inject
    @JMSConnectionFactory("jms/gf-resourcesCF")
    private JMSContext resourcesInjectedContext;
//

    @Resource(lookup = "jms/resourcesTopic")
    private Topic resourcesTopic;

    @Resource
    private EJBContext ctx;

    @PostConstruct
    public void postConstruct() {
        System.out.println("annotationCF=" + annotationCF);
        System.out.println("resourcesCF=" + resourcesCF);
    }

    public void sendMessages() {
        sendMessage11(annotationCF, annotationTopic, "annotationCF + annotationTopic 1.1");
        sendMessage11(annotationCF, resourcesTopic, "annotationCF + resourcesTopic 1.1");
        sendMessage11(resourcesCF, resourcesTopic, "resourcesCF + annotationTopic 1.1");
        sendMessage11(resourcesCF, annotationTopic, "resourcesCF + annotationTopic 1.1");

        sendMessage20CreateContext(annotationCF, annotationTopic, "annotationCF + annotationTopic + created context 2.0");
        sendMessage20CreateContext(annotationCF, resourcesTopic, "annotationCF + resourcesTopic + created context 2.0");
        sendMessage20CreateContext(resourcesCF, resourcesTopic, "resourcesCF + resourcesTopic + created context 2.0");
        sendMessage20CreateContext(resourcesCF, annotationTopic, "resourcesCF + annotationTopic + created context 2.0");

        sendMessage20(annotationInjectedContext, annotationTopic, "annotationInjectedContext + annotationTopic 2.0");
        sendMessage20(annotationInjectedContext, resourcesTopic, "annotationInjectedContext + annotationTopic 2.0");
        sendMessage20(resourcesInjectedContext, resourcesTopic, "resourcesInjectedContext + resourcesTopic 2.0");
        sendMessage20(resourcesInjectedContext, annotationTopic, "resourcesInjectedContext + resourcesTopic 2.0");
        System.out.println("rolling back on sendMessages()");
        ctx.setRollbackOnly();
    }

    private void sendMessage20CreateContext(ConnectionFactory cf, Topic topic, String message) {
        try (JMSContext ctx = cf.createContext()) {
            sendMessage20(ctx, topic, message);
        }
    }

    private void sendMessage20(JMSContext context, Topic topic, String message) {
        JMSProducer producer = context.createProducer();
        producer.send(topic, message);
    }

    private void sendMessage11(ConnectionFactory cf, Topic topic, String message) {
        try {
            try (Connection con = cf.createConnection()) {
                try (Session s = con.createSession(true, 0)) {
                    MessageProducer mp = s.createProducer(topic);
                    TextMessage om = s.createTextMessage();
                    om.setText(message);
                    mp.send(om);
                }
            }

        } catch (JMSException e) {
            e.printStackTrace();
        }

    }
}


---------------------------------------------------------------------------------------------



/*
 *  Copyright © - 2014 Anahata Technologies.
 */
package javase;

//import com.sun.messaging.ConnectionConfiguration;
import static java.lang.StrictMath.*;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.annotation.Resource;
import javax.ejb.EJBContext;
import javax.enterprise.context.ApplicationScoped;
import javax.jms.*;

/**
 *
 * @author Pablo Rodriguez Pina <pablo@anahata-it.com.au>
 */
public class JMSListener {
    private Connection connection;

    private Session session;

    private Topic topic;

    public void init(String topicName) throws Exception {
        long ts = System.currentTimeMillis();
        com.sun.messaging.ConnectionFactory cf = new com.sun.messaging.ConnectionFactory();
        cf.setProperty(ConnectionConfiguration.imqAddressList, "localhost:7676");
        cf.setProperty(ConnectionConfiguration.imqReconnectEnabled, "true");
        connection = cf.createConnection("guest", "guest");
        connection.setExceptionListener(new ExceptionListener() {
            @Override
            public void onException(JMSException exception) {
                System.out.println("exception: " + exception);
            }
        });
        session = connection.createSession(true, Session.SESSION_TRANSACTED);
        topic = session.createTopic(topicName);
        connection.start();
        MessageConsumer messageConsumer = session.createConsumer(topic);
        messageConsumer.setMessageListener(new MessageListener() {
            @Override
            public void onMessage(Message message) {
                try {
                    System.out.println("Got message " + ((TextMessage)message).getText());
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
    }

    public static void main(String[] args) throws Exception {
        new JMSListener().init("annotationTopic");
        new JMSListener().init("resourcesTopic");
    }

}

Comment by David Zhao [ 17/Feb/14 ]

Duplicate to GLASSFISH-20975.

Comment by amyk [ 27/Feb/14 ]

With following simplified test case, it shows the one that has issue is annotated JMS ConnectionFactory (Summary changed accordingly),

1. Use 2 components: a) application client component to invoke the b) stateless session bean JmsBean.sendMessages()
2. Change the test to use Queues instead of Topics so that messages will be retained in its Queue after test (no consumer)
3. Modify JmsBean to set a property on each message sent to indicate how the message is sent, e.g.
SEND_HOW="annotationCF + annotationTopic 1.1"
4. When the test completes, run 'imqcmd list dst' to see any messages in the 2 Queues and use 'imqcmd list/query msg' (a GlassFish MQ unofficial feature) to examine each message's SEND_HOW property in the Queues

[also the original test case should specify the interfaceName in JMSConnectionFactoryDefinition with a permitted value, see http://docs.oracle.com/javaee/7/api/javax/jms/JMSConnectionFactoryDefinition.html]

After 1-4 steps, the result indicated following (see details below) sendMessage11/20 operations are not enrolled in the transaction, whereas other sendMessage11/20 operations are rolled back as expected.

sendMessage11(annotationCF, annotationQueue, "annotationCF + annotationQueue 1.1");
sendMessage11(annotationCF, resourcesQueue, "annotationCF + resourcesQueue 1.1");

sendMessage20CreateContext(annotationCF, annotationQueue, "annotationCF + annotationQueue + created context 2.0");
sendMessage20CreateContext(annotationCF, resourcesQueue, "annotationCF + resourcesQueue + created context 2.0");

sendMessage20(annotationInjectedContext, annotationQueue, "annotationInjectedContext + annotationQueue 2.0");
sendMessage20(annotationInjectedContext, resourcesQueue, "annotationInjectedContext + annotationQueue 2.0");

========'imqcmd list/query msg' outputs after the test, notices the SEND_HOW property values

imqcmd list msg -t q -n annotationQueue -u admin -pw admin -nocheck
Listing messages for the destination
------------------------------------
Destination Name Destination Type
------------------------------------
annotationQueue Queue

On the broker specified by:

-------------------------
Host Primary Port
-------------------------
localhost 7676

------------------------------------------------------------------------------------------------
Message # Message IDs Priority Body Type
------------------------------------------------------------------------------------------------
0 ID:189-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374749 4 TextMessage
1 ID:219-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374874 4 TextMessage
2 ID:249-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374889 4 TextMessage

Successfully listed messages.

imqcmd query msg -t q -n annotationQueue -msgID "ID:189-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374749" -nocheck

Querying message:
-----------------------------------------------------------
Message ID
-----------------------------------------------------------
ID:189-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374749

In the destination
------------------------------------
Destination Name Destination Type
------------------------------------
annotationQueue Queue

On the broker specified by:

-------------------------
Host Primary Port
-------------------------
localhost 7676

--------------------------
Message Header Information
--------------------------
Message ID ID:189-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374749
Correlation ID
Destination Name annotationQueue
Destination Type Queue
Delivery Mode PERSISTENT (2)
Priority 4
Redelivered false
Timestamp 2/26/14 10:09:34 PM
Type
Expiration 12/31/69 4:00:00 PM
ReplyTo Destination Name
ReplyTo Destination Type

------------------------------
Message Properties Information
------------------------------
SEND_HOW annotationCF + annotationQueue 1.1

------------------------
Message Body Information
------------------------
Body Type TextMessage (1)

Successfully queried message.

imqcmd query msg -t q -n annotationQueue -msgID "ID:219-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374874" -nocheck

Querying message:
-----------------------------------------------------------
Message ID
-----------------------------------------------------------
ID:219-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374874

In the destination
------------------------------------
Destination Name Destination Type
------------------------------------
annotationQueue Queue

On the broker specified by:

-------------------------
Host Primary Port
-------------------------
localhost 7676

--------------------------
Message Header Information
--------------------------
Message ID ID:219-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374874
Correlation ID
Destination Name annotationQueue
Destination Type Queue
Delivery Mode PERSISTENT (2)
Priority 4
Redelivered false
Timestamp 2/26/14 10:09:34 PM
Type
Expiration 12/31/69 4:00:00 PM
ReplyTo Destination Name
ReplyTo Destination Type

------------------------------
Message Properties Information
------------------------------
SEND_HOW annotationCF + annotationQueue + created context 2.0

------------------------
Message Body Information
------------------------
Body Type TextMessage (1)

Successfully queried message.

imqcmd query msg -t q -n annotationQueue -msgID "ID:249-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374889" -nocheck

Querying message:
-----------------------------------------------------------
Message ID
-----------------------------------------------------------
ID:249-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374889

In the destination
------------------------------------
Destination Name Destination Type
------------------------------------
annotationQueue Queue

On the broker specified by:

-------------------------
Host Primary Port
-------------------------
localhost 7676

--------------------------
Message Header Information
--------------------------
Message ID ID:249-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374889
Correlation ID
Destination Name annotationQueue
Destination Type Queue
Delivery Mode PERSISTENT (2)
Priority 4
Redelivered false
Timestamp 2/26/14 10:09:34 PM
Type
Expiration 12/31/69 4:00:00 PM
ReplyTo Destination Name
ReplyTo Destination Type

------------------------------
Message Properties Information
------------------------------
SEND_HOW annotationInjectedContext + annotationQueue 2.0

------------------------
Message Body Information
------------------------
Body Type TextMessage (1)

Successfully queried message.

imqcmd list msg -t q -n resourcesQueue -nocheck

Listing messages for the destination
------------------------------------
Destination Name Destination Type
------------------------------------
resourcesQueue Queue

On the broker specified by:

-------------------------
Host Primary Port
-------------------------
localhost 7676

------------------------------------------------------------------------------------------------
Message # Message IDs Priority Body Type
------------------------------------------------------------------------------------------------
0 ID:203-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374764 4 TextMessage
1 ID:233-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374878 4 TextMessage
2 ID:255-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374890 4 TextMessage

Successfully listed messages.

imqcmd query msg -t q -n resourcesQueue -msgID "ID:203-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374764" -nocheck

Querying message:
-----------------------------------------------------------
Message ID
-----------------------------------------------------------
ID:203-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374764

In the destination
------------------------------------
Destination Name Destination Type
------------------------------------
resourcesQueue Queue

On the broker specified by:

-------------------------
Host Primary Port
-------------------------
localhost 7676

--------------------------
Message Header Information
--------------------------
Message ID ID:203-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374764
Correlation ID
Destination Name resourcesQueue
Destination Type Queue
Delivery Mode PERSISTENT (2)
Priority 4
Redelivered false
Timestamp 2/26/14 10:09:34 PM
Type
Expiration 12/31/69 4:00:00 PM
ReplyTo Destination Name
ReplyTo Destination Type

------------------------------
Message Properties Information
------------------------------
SEND_HOW annotationCF + resourcesQueue 1.1

------------------------
Message Body Information
------------------------
Body Type TextMessage (1)

Successfully queried message.

imqcmd query msg -t q -n resourcesQueue -msgID "ID:233-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374878" -nocheck

Querying message:
-----------------------------------------------------------
Message ID
-----------------------------------------------------------
ID:233-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374878

In the destination
------------------------------------
Destination Name Destination Type
------------------------------------
resourcesQueue Queue

On the broker specified by:

-------------------------
Host Primary Port
-------------------------
localhost 7676

--------------------------
Message Header Information
--------------------------
Message ID ID:233-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374878
Correlation ID
Destination Name resourcesQueue
Destination Type Queue
Delivery Mode PERSISTENT (2)
Priority 4
Redelivered false
Timestamp 2/26/14 10:09:34 PM
Type
Expiration 12/31/69 4:00:00 PM
ReplyTo Destination Name
ReplyTo Destination Type

------------------------------
Message Properties Information
------------------------------
SEND_HOW annotationCF + resourcesQueue + created context 2.0

------------------------
Message Body Information
------------------------
Body Type TextMessage (1)

Successfully queried message.

imqcmd query msg -t q -n resourcesQueue -msgID "ID:255-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374890" -nocheck

Querying message:
-----------------------------------------------------------
Message ID
-----------------------------------------------------------
ID:255-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374890

In the destination
------------------------------------
Destination Name Destination Type
------------------------------------
resourcesQueue Queue

On the broker specified by:

-------------------------
Host Primary Port
-------------------------
localhost 7676

--------------------------
Message Header Information
--------------------------
Message ID ID:255-10.133.184.56(be:d9:f1:7e:86:f3)-55441-1393481374890
Correlation ID
Destination Name resourcesQueue
Destination Type Queue
Delivery Mode PERSISTENT (2)
Priority 4
Redelivered false
Timestamp 2/26/14 10:09:34 PM
Type
Expiration 12/31/69 4:00:00 PM
ReplyTo Destination Name
ReplyTo Destination Type

------------------------------
Message Properties Information
------------------------------
SEND_HOW annotationInjectedContext + annotationQueue 2.0

------------------------
Message Body Information
------------------------
Body Type TextMessage (1)

Successfully queried message.
=============================================================

Comment by Nigel Deakin [ 03/Mar/14 ]

We confirm that there is a bug when a connection factory is defined using the @JMSConnectionFactory annotation which prevents resources being enlisted in the Java EE transaction. Many thanks for reporting this.

Comment by Nigel Deakin [ 03/Mar/14 ]

There is a workaround which is to create the connection factory the "old" way, which is to define it in glassfish-resources.xml, or using the GlassFish admin console or asadmin, and then inject it into the application using @Resource.

Since there is a workaround this is a "major bug" rather than a "blocker". Adjusting priority accordingly.

Comment by David Zhao [ 07/May/14 ]

The property "org.glassfish.connector-connection-pool.transaction-support=XATransaction" is required for annotated JMS ConnectionFactory being enlisted. Otherwise, it will not participate to EE transaction.

@JMSConnectionFactoryDefinition(
        name = "java:module/jms/annotationCF",
        maxPoolSize = 30,
        minPoolSize = 20,
        interfaceName = "javax.jms.TopicXAConnectionFactory",
        properties = {
            "addressList=mq://localhost:7676",
            "reconnectEnabled=true",
            "org.glassfish.connector-connection-pool.transaction-support=XATransaction"
        }
)

To be consistent to the JMS ConnectionFactory created by asadmin or admin gui, the property of annotated JMS ConnectionFactory might be better to default to XATransaction.

Comment by David Zhao [ 09/May/14 ]

Fixed it by revision 63256. Make XATransaction to be the default value of annotated jms connection factory.





[GLASSFISH-20972] Classes with lambda's won't load in GF Created: 07/Feb/14  Updated: 19/Sep/14  Resolved: 21/Mar/14

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

Type: Bug Priority: Major
Reporter: johanvos Assignee: jwells
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by GLASSFISH-20976 Server fails with JDK 8 - lambda expr... Closed

 Description   

When I try to deploy a WAR that only contains a REST Handler that uses a lambda expression, deploying fails:

[2014-02-06T21:00:18.522+0100] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=49 _ThreadName=deployment-jar-scanner] [timeMillis: 1391716818522] [levelValue: 1000] [[
Exception while visiting WEB-INF/classes/com/lodgon/lambdawar/RestHandler.class of size 2394
java.lang.ArrayIndexOutOfBoundsException: 52264
at org.objectweb.asm.ClassReader.readClass(ClassReader.java:2015)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:469)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:425)
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:744)



 Comments   
Comment by johanvos [ 07/Feb/14 ]

I noticed the latest GF nightly build is using hk2 2.2.0-b26.
That version has a dependency on asm 3.3
The head version of hk2 (2.3.0-b02-SNAPSHOT) has a dependency on asm 5-beta, so I guess it will be solved in hk2 2.3.0 (assuming asm-all-repackaged.jar is updated as well).

Can anyone working on HK2 comment on this?

Comment by johanvos [ 20/Mar/14 ]

As of hk2 2.2.0b27, the dependency on asm is raised to 5-beta.
I can confirm this issue is fixed in the nightly snapshot of GlassFish 2013-03-13

Comment by Romain Grécourt [ 21/Mar/14 ]

hk2 2.3.0-bX has been intergrated in glassfish recently.
Closing the issue according the previous comment.





[GLASSFISH-20968] find() method with EXTENDED Persistence Context and TX_TYPE: NOT_SUPPORTED Created: 02/Feb/14  Updated: 19/Sep/14  Resolved: 27/Jun/14

Status: Resolved
Project: glassfish
Component/s: entity-persistence
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Critical
Reporter: sdmoralesma Assignee: ethan.wang
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 64bits, OpenJDK 7, JavaDB


Tags: 4_0_1-evangelists, 4_0_1-mustfix

 Description   

According to spec:

"The find method (provided it is invoked without a lock or invoked with LockModeType.NONE)
and the getReference method are not required to be invoked within a transaction. If an entity man-
ager with transaction-scoped persistence context is in use, the resulting entities will be detached; if an
entity manager with an extended persistence context is used, they will be managed. See section 3.3 for
entity manager use outside a transaction."

That's is not properly working for GF4 (I have tested that with GF3 and works as expected):

If I have a Gateway like this:

@Stateful
@TransactionAttribute(NOT_SUPPORTED)
public class CustomerGateway {

@PersistenceContext(unitName = "customersPU", type = EXTENDED)
private EntityManager em;
private Customer customer;

public Customer find(Long id)

{ // customer is not managed! this.customer = em.find(Customer.class, id); // Prints false! System.out.println("Method find: " + em.contains(customer)); // Prints false too (2 is the id of an entity)! System.out.println("Method find: " + em.contains(em.find(Customer.class, 2L)); // A workaround customer = em.merge(customer); // Print true. System.out.println("Method find after merge: " + em.contains(customer)); return this.customer; }

Is not working according to spec.

I have create a GitHub project, maybe is useful for you:
https://github.com/sdmoralesma/SO-21356448



 Comments   
Comment by jclingan [ 01/May/14 ]

If evaluation of this issue shows spec compliance issues, then this bug should be fixed.

Comment by Ed Bratt [ 20/May/14 ]

This is marked Must Fix for 4.0.1. Please evaluate. Thank you.

Comment by ethan.wang [ 27/Jun/14 ]

Fixed by change 63399





[GLASSFISH-20964] Glassfish AJP connector has fixed max packet size (should be configurable) Created: 22/Jan/14  Updated: 19/Sep/14  Resolved: 19/Feb/14

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

Type: Bug Priority: Major
Reporter: matthiasblaesing Assignee: oleksiys
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Problem currently affects glassfish 3.1.2.2, but grizzly source shows same/very similar code in git head


Attachments: Java Archive File grizzly-http-ajp.jar    

 Description   

We use a glassfish 3.1.2.2 service in a corporate environment. The networked is build around an active directory, which is also used to authenticate users (via kerberos).

One user complained, that he could not connect to the system - further investigation revealed, that this is caused by a large number of user groups in the AD, which in turn enlarge the sice of the kerberos ticket.

When necessary the kerboros ticket is encoded into the Authorization header of the request. The size of the request then quickly exceeds the maximum packet size of 8192 bytes. For our jboss instance I increased the maxHttpHeaderSize. For the glassfish instance I could only partly fix the problem.

For glassfish I increased the tcp transport buffer size to 32000 size and for direct connections to the glassfish server this fixes the problem (see: http://webservicesm.blogspot.de/2013/12/bad-request-request-header-is-too-large.html).

Problem: We are also using an AJP connected apache frontend (with mod_jk as plugin). According to the documentation you can also increase the max packet size for the AJP connection (http://tomcat.apache.org/connectors-doc/reference/workers.html) and should do that (http://builddeploy.blogspot.de/2009/04/resolving-http-error-413-request-entity.html). I increased the packet size and then the glassfish server rejects the packets as to large. Checking the source code - the max packet size is fixed to 8192 (AjpConstants.java#MAX_PACKET_SIZE). I increased that to the maximum size of 65535, recompiled the grizzly ajp connector and dropped it into glassfish and currently this looks good.

So this should be configurable, as recompiling the connector is not a long time solution.



 Comments   
Comment by oleksiys [ 24/Jan/14 ]

pls. apply this patch and set system property
-Dcom.sun.grizzly.http.ajp.AjpConstants.max-packet-size=<SIZE>

pls. let us know if it worked for you.

Comment by matthiasblaesing [ 24/Jan/14 ]

Thank you! I replaced my modified version with the attached one. Without configuration I was able to reproduce the problem (expected), after adding the system property I was able to connect again. So this works.

Remarks:
1. I did not provide the system property via a JVM parameter, but the glassfish "System Properties" Option (Configurations -> server-config -> System Properties)
2. It would be nice if I would again get a log entry if a connection is refused by the AJP connector, if the packet size is to large (I had to guess)

Comment by oleksiys [ 19/Feb/14 ]

fixed

thank you!





[GLASSFISH-20963] when clicked the icon of "Connector Resources", it forward to the "Admin Object Resources" page Created: 22/Jan/14  Updated: 19/Sep/14  Resolved: 27/Jan/14

Status: Resolved
Project: glassfish
Component/s: admin_gui
Affects Version/s: 4.0_b89_RC5
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: lzg5039 Assignee: Anissa Lam
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

linux



 Description   

when clicked the icon of "Connector Resources", it forward to the "Admin Object Resources" page



 Comments   
Comment by lzg5039 [ 22/Jan/14 ]

Hi Anissa
My fix as follows,modify the line of 61,can you give me some advices

 
https://svn.java.net/svn/glassfish~svn/trunk/main/appserver/admingui/jca/src/main/resources/jcaTreeNode.jsf

60 <!facet image>
-61(modify before)        <sun:iconHyperlink id="restIcon" icon="TREE_FOLDER" url="/jca/adminObjectResources.jsf"  border="0" immediate="true" alt="$resource{i18n.tree.connectorResources}" />
+61(modify after)         <sun:iconHyperlink id="restIcon" icon="TREE_FOLDER" url="/jca/connectorResources.jsf"  border="0" immediate="true" alt="$resource{i18n.tree.connectorResources}" />
62 </facet>
Comment by Anissa Lam [ 22/Jan/14 ]

Thanks for catching this. Change looks fine, you can go ahead and commit that.
thanks.

Comment by lzg5039 [ 23/Jan/14 ]

Thanks for reviewing it,now I do not have right to commit source,this time could you commit it for me?
thanks.

Comment by Jeremy_Lv [ 27/Jan/14 ]

Checked in the changes as r63084





[GLASSFISH-20960] Batch job won't start when glassfish application versioning is used. Created: 19/Jan/14  Updated: 19/Sep/14

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

Type: Bug Priority: Major
Reporter: jiggster Assignee: anthony.lai
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 12.04, Mac OS X 10.9, Windows 7


Tags: 4_0_1-approved, 4_0_1-evangelists, application-versioning, batch

 Description   

To reproduce the issue take the webserverlog batch application sample from the java ee 7 tutorial, add the glassfish-web.xml file and make sure it contains the version-identifier element with the value, say, 1.0. Build and deploy the applicaiton, go to http://localhost:8080/webserverlog/ (assuming your instance listens on 8080) and start the batch job. The status of the job will change to STARTING, but the job itself won't start executing.

I can upload the source code of the modified version of the webserverlog sample application, but I don't know how to add the attachments.



 Comments   
Comment by jiggster [ 21/Jan/14 ]

Is there any chance that this issue will be evaluated any time soon?

Regards,
Jigg

Comment by Mahesh Kannan [ 16/Apr/14 ]

Mark for 4.0.1

Comment by Mahesh Kannan [ 16/Jul/14 ]

Assigning to Anthony

Comment by Mahesh Kannan [ 16/Jul/14 ]

The root cause is that setupContext in ManagedFuture (incorrectly) finds that the application is NOT enabled. The issue is
in ContextSetupProviderImpl.isApplicationEnabled(). This method probably needs to look into the application version field
before deciding if the app is disabled or not.

For example, after deploying an app with a different version, as you could see from the below output,
only app1:v3 is enabled. So, maybe ContextSetupProviderImpl.isApplicationEnabled() (or some
other utility method) should look into the versioning field of the app to decide correctly, if it is
enabled or not.

asadmin list-applications --long
NAME TYPE STATUS
app1 <ejb, web> disabled
app1:v1 <ejb, web> disabled
app1:v2 <ejb, web> disabled
app1v3 <ejb, web> enabled
Command list-applications executed successfully.

Here is the call stack when a batch job is submitted from a versioned app.

ManagedFutureTask::setupContext
ContextSetupProviderImpl::setup(ContextHandle contextHandleForSetup)
appName = handle.getInvocation().getAppName();
isApplicationEnabled(appName)

Unfortunately, isapplicationEnabled(appName) returns false thus causing
contextSetupException to IllegalStateException.

This causes ManagedfutureTask.run() method to be aborted. Hence the Batch job
is never executed.





[GLASSFISH-20952] Failed to start OSGiModuleImpl running some webservices tests. Created: 14/Jan/14  Updated: 19/Sep/14  Resolved: 03/Feb/14

Status: Resolved
Project: glassfish
Component/s: build_system
Affects Version/s: future release
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Dennis MacConnell Assignee: Michal Gajdos
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File server.log    
Issue Links:
Related
is related to JERSEY-2339 [GF] Failed to start OSGiModuleImpl r... Resolved

 Description   

I'm getting the following exception running some of the CTS webservices tests on the latest RI build (GlassFish 4.0 b94):

[2014-01-14T16:16:32.563-0500] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=89 _ThreadName=AutoDeployer] [timeMillis: 1389734192563] [levelValue: 1000] [[
Exception while invoking class org.glassfish.webservices.WebServicesDeployer load method
java.lang.RuntimeException: A MultiException has 2 exceptions. They are:
1. com.sun.enterprise.module.ResolveError: Failed to start OSGiModuleImpl:: Bundle = [org.glassfish.main.appclient.gf-client-module [7]], State = [NEW]
2. java.lang.IllegalStateException: Could not load descriptor SystemDescriptor(
implementation=org.glassfish.appclient.common.ACCAppClientArchivist
contracts=

{org.glassfish.appclient.common.ACCAppClientArchivist,com.sun.enterprise.deployment.archivist.Archivist}

scope=org.glassfish.hk2.api.PerLookup
qualifiers={}
descriptorType=CLASS
descriptorVisibility=NORMAL
metadata=Bundle-SymbolicName=

{org.glassfish.main.appclient.gf-client-module}

,Bundle-Version=

{4.0.0.b94}

rank=0
loader=OsgiPopulatorPostProcessor.HK2Loader(OSGiModuleImpl:: Bundle = [org.glassfish.main.appclient.gf-client-module [7]], State = [NEW],32460147)
proxiable=null
analysisName=null
id=38
locatorId=0
identityHashCode=29744355
reified=false)

at org.glassfish.webservices.WebServicesDeployer.load(WebServicesDeployer.java:814)
at org.glassfish.webservices.WebServicesDeployer.load(WebServicesDeployer.java:96)
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:493)
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.execute(CommandRunnerImpl.java:537)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
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 org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:164)
at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:595)
at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:482)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:410)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:401)
at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:233)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)



 Comments   
Comment by Sanjeeb Sahoo [ 15/Jan/14 ]

It's not an OSGi issue. There appears to be some issue in the module which is why a module is not getting resolved. One of the two exceptions mentioned in the log is com.sun.enterprise.module.ResolveError, but unfortunately HK2 subsystem has not printed the stack for this exception. So, I am assigning this to HK2 team to fix their code to print the stack for the first exception which is always the root cause of the problem. There after the issue can be reassigned based on the new information revealed by the stack.

Comment by Lukas Jungmann [ 15/Jan/14 ]

transferring to hk2 per last comment

Comment by Joe Di Pol [ 16/Jan/14 ]

This occurred after r63056, the Jersey 2.0 -> 2.0.1 update in the 4.0 branch.

Comment by Snjezana Sevo-Zenzerovic [ 22/Jan/14 ]

Attaching full server.log file from failed autodeployment on RI b94. Looks like HK2 is printing the whole stack after all.

Comment by Snjezana Sevo-Zenzerovic [ 22/Jan/14 ]

Relevant log snippet seems to be:

Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle org.glassfish.main.appclient.gf-client-module [67]: Unable to resolve 67.0: missing requirement [67.0] osgi.wiring.package; (osgi.wiring.package=org.jboss.weld.environment.se)
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2037)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)
at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:210)

Still a mistery since the file content of the RI did not change between b93 and b94 and I am not aware of any changes to the build process or checkins that would affect osgi bundle definitions.

Comment by Snjezana Sevo-Zenzerovic [ 03/Feb/14 ]

By the process of elimination, issue had to be caused by Hudson build environment used to produce GF 4.0 b94. Build respin using the exact same 4.0 branch revision "fixed" the issue.





[GLASSFISH-20942] javax.batch.operations.JobStartException: java.lang.IllegalArgumentException: xJCL invalid per schema Created: 27/Dec/13  Updated: 19/Sep/14

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

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

Windows 7, Net Beans 4


Tags: 4_0_1-evangelists, 4_0_1-reviewed, Jobs

 Description   

When I try to debug my project, all the job fails with this error. Maybe because some jobs starts at the same time.

The strange behaviour is when I'm not debugging, I have the same error too.

SEVERE: java.lang.RuntimeException: org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
javax.batch.operations.JobStartException: java.lang.RuntimeException: org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
at com.ibm.jbatch.container.api.impl.JobOperatorImpl.start(JobOperatorImpl.java:90)
at br.com.oscarasdati.msdcdm.core.CronJobBatchRunner.run(CronJobBatchRunner.java:99)
at br.com.oscarasdati.msdcdm.core.CronJobBatchRunner.timeout(CronJobBatchRunner.java:63)
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 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:4695)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:630)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:582)
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:55)
at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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:582)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundTimeout(SystemInterceptorProxy.java:145)
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.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:4667)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4655)
at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:3993)
at com.sun.ejb.containers.EJBTimerService.deliverTimeout(EJBTimerService.java:1199)
at com.sun.ejb.containers.EJBTimerService.access$000(EJBTimerService.java:89)
at com.sun.ejb.containers.EJBTimerService$TaskExpiredWork.run(EJBTimerService.java:1919)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
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:724)
Caused by: java.lang.RuntimeException: org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
at com.ibm.jbatch.jsl.util.ValidatorHelper.getXJCLSchema(ValidatorHelper.java:42)
at com.ibm.jbatch.container.jsl.impl.JobModelResolverImpl.unmarshalJobXML(JobModelResolverImpl.java:58)
at com.ibm.jbatch.container.jsl.impl.JobModelResolverImpl.access$000(JobModelResolverImpl.java:45)
at com.ibm.jbatch.container.jsl.impl.JobModelResolverImpl$1.run(JobModelResolverImpl.java:127)
at com.ibm.jbatch.container.jsl.impl.JobModelResolverImpl$1.run(JobModelResolverImpl.java:125)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.jbatch.container.jsl.impl.JobModelResolverImpl.resolveModel(JobModelResolverImpl.java:123)
at com.ibm.jbatch.container.jsl.impl.JobModelResolverImpl.resolveModel(JobModelResolverImpl.java:45)
at com.ibm.jbatch.container.jobinstance.JobExecutionHelper.startJob(JobExecutionHelper.java:114)
at com.ibm.jbatch.container.impl.BatchKernelImpl.startJob(BatchKernelImpl.java:123)
at com.ibm.jbatch.container.api.impl.JobOperatorImpl.startInternal(JobOperatorImpl.java:121)
at com.ibm.jbatch.container.api.impl.JobOperatorImpl.start(JobOperatorImpl.java:86)
... 39 more
Caused by: org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
at com.sun.org.apache.xerces.internal.jaxp.validation.Util.toSAXException(Util.java:65)
at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:259)
at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:627)
at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:659)
at com.ibm.jbatch.jsl.util.ValidatorHelper.getXJCLSchema(ValidatorHelper.java:40)
... 50 more

WARNING: JSL invalid per XSD, details:
MESSAGE: cvc-elt.1: Cannot find the declaration of element 'job'.
SEVERITY: 2
LINKED EXC: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 21; cvc-elt.1: Cannot find the declaration of element 'job'.
LOCATOR INFO:
------------
COLUMN NUMBER: 21
LINE NUMBER: 3
OFFSET: -1
CLASS: class javax.xml.bind.helpers.ValidationEventLocatorImpl
NODE: null
OBJECT: null
URL: null



 Comments   
Comment by aronrodrigues [ 09/Jan/14 ]

Could you reproduce it? Can I help?

Comment by reza_rahman [ 15/Jan/14 ]

Could you outline the steps to reproduce?

Comment by aronrodrigues [ 16/Jan/14 ]

Create 2 @Startup @Singleton Beans which starts 2 differents jobs at the same time. Run sometimes...
I made an workaround making a syncronized block in the timeout method with a static variable.

Comment by Mahesh Kannan [ 16/Apr/14 ]

Mark for 4.0.1





[GLASSFISH-20938] GlassFish password aliases failing Created: 19/Dec/13  Updated: 19/Sep/14  Resolved: 30/Dec/13

Status: Resolved
Project: glassfish
Component/s: admin, configuration, jdbc, security
Affects Version/s: 4.0_b89_RC5
Fix Version/s: 4.1

Type: Bug Priority: Critical
Reporter: Kevin Dean Assignee: Tim Quinn
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 64-bit, JDK 1.7.0_45


Issue Links:
Duplicate
is duplicated by GLASSFISH-21065 Password aliasing: Some passwords not... Resolved
is duplicated by GLASSFISH-20491 Cannot login when username and passwo... Closed
Tags: 4_0_1-review

 Description   

I use the password alias feature to configure JDBC connections and other sensitive artefacts. I have just started work with GlassFish 4.0 and have found that it doesn't handle password aliases properly. It accepts them (using the GUI or create-password-alias), it accepts JDBC resources that use them (using the GUI or create-jdbc-connection-pool), but it can't use them. Any attempt to use the connection pool (e.g. through the "Ping" command) fails with "Connection could not be allocated because: Access denied for user 'ff_read_write'@'localhost' (using password: YES)]]". Once I replace the password alias with the plain-text password, everything works fine.

I turned up logging on everything security-related I could find and there's an exception logging into a file realm. See log attached.

Appears to be related to:

https://java.net/jira/browse/GLASSFISH-20675

Definitely related to:

https://java.net/jira/browse/GLASSFISH-20873



 Comments   
Comment by Kevin Dean [ 19/Dec/13 ]

[2013-12-19T17:50:57.499+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.ssl] [tid: _ThreadID=234 _ThreadName=admin-listener(43)] [timeMillis: 1387475457499] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.ssl.J2EEKeyManager] [METHODNAME: getPrivateKey] [[
Getting private key for alias:s1as]]

[2013-12-19T17:50:57.500+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.ssl] [tid: _ThreadID=234 _ThreadName=admin-listener(43)] [timeMillis: 1387475457500] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.ssl.J2EEKeyManager] [METHODNAME: getCertificateChain] [[
Getting certificate chain]]

[2013-12-19T17:50:57.500+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.ssl] [tid: _ThreadID=234 _ThreadName=admin-listener(43)] [timeMillis: 1387475457500] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.ssl.J2EEKeyManager] [METHODNAME: getPrivateKey] [[
Getting private key for alias:s1as]]

[2013-12-19T17:50:57.500+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.ssl] [tid: _ThreadID=234 _ThreadName=admin-listener(43)] [timeMillis: 1387475457500] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.ssl.J2EEKeyManager] [METHODNAME: getCertificateChain] [[
Getting certificate chain]]

[2013-12-19T17:50:57.515+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=130 _ThreadName=admin-listener(14)] [timeMillis: 1387475457515] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.realm.file.FileRealm] [METHODNAME: init] [[
FileRealm : file=D:\Users\KDean\projects\FeeFracture\trunk\servers\glassfish4\glassfish\domains\feefracture\config\admin-keyfile]]

[2013-12-19T17:50:57.515+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=130 _ThreadName=admin-listener(14)] [timeMillis: 1387475457515] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.realm.file.FileRealm] [METHODNAME: init] [[
FileRealm : jaas-context=ignore]]

[2013-12-19T17:50:57.516+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security] [tid: _ThreadID=130 _ThreadName=admin-listener(14)] [timeMillis: 1387475457516] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.BasePasswordLoginModule] [METHODNAME: initialize] [[
Login module initialized: class com.sun.enterprise.security.auth.login.FileLoginModule]]

[2013-12-19T17:50:57.517+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security] [tid: _ThreadID=130 _ThreadName=admin-listener(14)] [timeMillis: 1387475457517] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.login.FileLoginModule] [METHODNAME: authenticate] [[
File login succeeded for: admin]]

[2013-12-19T17:50:57.517+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security] [tid: _ThreadID=130 _ThreadName=admin-listener(14)] [timeMillis: 1387475457517] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.BasePasswordLoginModule] [METHODNAME: login] [[
JAAS login complete.]]

[2013-12-19T17:50:57.517+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security] [tid: _ThreadID=130 _ThreadName=admin-listener(14)] [timeMillis: 1387475457517] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.BasePasswordLoginModule] [METHODNAME: commit] [[
JAAS authentication committed.]]

[2013-12-19T17:50:57.518+0000] [glassfish 4.0] [FINEST] [] [javax.enterprise.system.core.security.org.glassfish.security.services.impl.authorization] [tid: _ThreadID=130 _ThreadName=admin-listener(14)] [timeMillis: 1387475457518] [levelValue: 300] [CLASSNAME: org.glassfish.security.services.impl.authorization.AuthorizationServiceImpl] [METHODNAME: getAuthorizationDecision] [[
Authorization Service result for Subject:
Principal: admin
Principal: asadmin
Private Credential: Realm=admin-realm Username=admin Password=######## TargetName =
was status=OK, decision=[1].]]

[2013-12-19T17:50:58.226+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458226] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: setPolicyContext] [[
[Web-Security] Setting Policy Context ID: old = null ctxID = _admingui/_admingui]]

[2013-12-19T17:50:58.226+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458226] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Codesource with Web URL: file:/__admingui/__admingui]]

[2013-12-19T17:50:58.226+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458226] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Checking Web Permission with Principals : null]]

[2013-12-19T17:50:58.226+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458226] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Web Permission = ("javax.security.jacc.WebResourcePermission" "/jdbc/jdbcConnectionPoolEdit.jsf" "GET")]]

[2013-12-19T17:50:58.226+0000] [glassfish 4.0] [FINEST] [] [javax.enterprise.system.core.security] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458226] [levelValue: 300] [CLASSNAME: com.sun.enterprise.security.provider.BasePolicyWrapper] [METHODNAME: doImplies] [[
JACC Policy Provider: PolicyWrapper.implies, context (_admingui/_admingui)- result was(false) permission (("javax.security.jacc.WebResourcePermission" "/jdbc/jdbcConnectionPoolEdit.jsf" "GET"))]]

[2013-12-19T17:50:58.226+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.jmac.config] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458226] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.jmac.config.GFServerConfigProvider] [METHODNAME: getEntry] [[
getEntry for: HttpServlet – GFConsoleAuthModule
module class: org.glassfish.admingui.common.security.AdminConsoleAuthModule
options:

{loginErrorPage=/loginError.jsf, loginPage=/login.jsf}
request policy: javax.security.auth.message.MessagePolicy@de1d100
response policy: null]]

[2013-12-19T17:50:58.226+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458226] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: setPolicyContext] [[
[Web-Security] Policy Context ID was: _admingui/_admingui]]

[2013-12-19T17:50:58.227+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458227] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Codesource with Web URL: file:/__admingui/__admingui]]

[2013-12-19T17:50:58.227+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458227] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Checking Web Permission with Principals : asadmin, admin]]

[2013-12-19T17:50:58.227+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458227] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Web Permission = ("javax.security.jacc.WebResourcePermission" "/jdbc/jdbcConnectionPoolEdit.jsf" "GET")]]

[2013-12-19T17:50:58.227+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458227] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: hasResourcePermission] [[
[Web-Security] hasResource isGranted: true]]

[2013-12-19T17:50:58.227+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458227] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: hasResourcePermission] [[
[Web-Security] hasResource perm: ("javax.security.jacc.WebResourcePermission" "/jdbc/jdbcConnectionPoolEdit.jsf" "GET")]]

[2013-12-19T17:50:58.246+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=38 _ThreadName=admin-listener(4)] [timeMillis: 1387475458246] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.realm.file.FileRealm] [METHODNAME: init] [[
FileRealm : file=D:\Users\KDean\projects\FeeFracture\trunk\servers\glassfish4\glassfish\domains\feefracture\config\admin-keyfile]]

[2013-12-19T17:50:58.246+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=38 _ThreadName=admin-listener(4)] [timeMillis: 1387475458246] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.realm.file.FileRealm] [METHODNAME: init] [[
FileRealm : jaas-context=ignore]]

[2013-12-19T17:50:58.331+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=237 _ThreadName=admin-listener(46)] [timeMillis: 1387475458331] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.realm.file.FileRealm] [METHODNAME: init] [[
FileRealm : file=D:\Users\KDean\projects\FeeFracture\trunk\servers\glassfish4\glassfish\domains\feefracture\config\admin-keyfile]]

[2013-12-19T17:50:58.331+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=237 _ThreadName=admin-listener(46)] [timeMillis: 1387475458331] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.realm.file.FileRealm] [METHODNAME: init] [[
FileRealm : jaas-context=ignore]]

[2013-12-19T17:50:58.352+0000] [glassfish 4.0] [FINEST] [] [javax.enterprise.system.core.security.org.glassfish.security.services.impl.authorization] [tid: _ThreadID=237 _ThreadName=admin-listener(46)] [timeMillis: 1387475458352] [levelValue: 300] [CLASSNAME: org.glassfish.security.services.impl.authorization.AuthorizationServiceImpl] [METHODNAME: getAuthorizationDecision] [[
Authorization Service result for Subject:
Principal: admin
Principal: asadmin
Private Credential: Realm=admin-realm Username=admin Password=######## TargetName =
Private Credential: Realm=admin-realm Username=admin Password=######## TargetName =
was status=OK, decision=[1].]]

[2013-12-19T17:50:58.360+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=225 _ThreadName=admin-listener(34)] [timeMillis: 1387475458360] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.realm.file.FileRealm] [METHODNAME: init] [[
FileRealm : file=D:\Users\KDean\projects\FeeFracture\trunk\servers\glassfish4\glassfish\domains\feefracture\config\admin-keyfile]]

[2013-12-19T17:50:58.361+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=225 _ThreadName=admin-listener(34)] [timeMillis: 1387475458361] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.realm.file.FileRealm] [METHODNAME: init] [[
FileRealm : jaas-context=ignore]]

[2013-12-19T17:50:58.382+0000] [glassfish 4.0] [FINEST] [] [javax.enterprise.system.core.security.org.glassfish.security.services.impl.authorization] [tid: _ThreadID=225 _ThreadName=admin-listener(34)] [timeMillis: 1387475458382] [levelValue: 300] [CLASSNAME: org.glassfish.security.services.impl.authorization.AuthorizationServiceImpl] [METHODNAME: getAuthorizationDecision] [[
Authorization Service result for Subject:
Principal: admin
Principal: asadmin
Private Credential: Realm=admin-realm Username=admin Password=######## TargetName =
Private Credential: Realm=admin-realm Username=admin Password=######## TargetName =
was status=OK, decision=[1].]]

[2013-12-19T17:50:58.384+0000] [glassfish 4.0] [FINEST] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.login] [tid: _ThreadID=225 _ThreadName=admin-listener(34)] [timeMillis: 1387475458384] [levelValue: 300] [CLASSNAME: com.sun.enterprise.security.auth.login.LoginContextDriver] [METHODNAME: login] [[
Processing login with credentials of type: class com.sun.enterprise.security.auth.login.common.PasswordCredential]]

[2013-12-19T17:50:58.384+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.login] [tid: _ThreadID=225 _ThreadName=admin-listener(34)] [timeMillis: 1387475458384] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.login.LoginContextDriver] [METHODNAME: doPasswordLogin] [[
Logging in user [admin] into realm: admin-realm using JAAS module: fileRealm]]

[2013-12-19T17:50:58.384+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security] [tid: _ThreadID=225 _ThreadName=admin-listener(34)] [timeMillis: 1387475458384] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.BasePasswordLoginModule] [METHODNAME: initialize] [[
Login module initialized: class com.sun.enterprise.security.auth.login.FileLoginModule]]

[2013-12-19T17:50:58.384+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security] [tid: _ThreadID=225 _ThreadName=admin-listener(34)] [timeMillis: 1387475458384] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.BasePasswordLoginModule] [METHODNAME: abort] [[
JAAS authentication aborted.]]

[2013-12-19T17:50:58.384+0000] [glassfish 4.0] [FINEST] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.login] [tid: _ThreadID=225 _ThreadName=admin-listener(34)] [timeMillis: 1387475458384] [levelValue: 300] [CLASSNAME: com.sun.enterprise.security.auth.login.LoginContextDriver] [METHODNAME: doPasswordLogin] [[
doPasswordLogin fails
javax.security.auth.login.LoginException: Failed file login for admin.
at com.sun.enterprise.security.auth.login.FileLoginModule.authenticate(FileLoginModule.java:84)
at com.sun.enterprise.security.auth.login.PasswordLoginModule.authenticateUser(PasswordLoginModule.java:116)
at com.sun.enterprise.security.BasePasswordLoginModule.login(BasePasswordLoginModule.java:146)
at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:784)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:698)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:696)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:695)
at javax.security.auth.login.LoginContext.login(LoginContext.java:594)
at com.sun.enterprise.security.auth.login.LoginContextDriver.doPasswordLogin(LoginContextDriver.java:383)
at com.sun.enterprise.security.auth.login.LoginContextDriver.login(LoginContextDriver.java:241)
at com.sun.enterprise.security.auth.login.LoginContextDriver.login(LoginContextDriver.java:154)
at org.glassfish.admin.rest.cli.SecurityUtil.getAnonymousUser(SecurityUtil.java:344)
at org.glassfish.admin.rest.cli.IsAnonymousUserEnabledCommand.execute(IsAnonymousUserEnabledCommand.java:78)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
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.utils.ResourceUtil.runCommand(ResourceUtil.java:235)
at org.glassfish.admin.rest.resources.TemplateExecCommand.executeCommandLegacyFormat(TemplateExecCommand.java:161)
at org.glassfish.admin.rest.resources.TemplateCommandGetResource.processGetLegacyFormat(TemplateCommandGetResource.java:75)
at sun.reflect.GeneratedMethodAccessor152.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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.RestAdapter$2.service(RestAdapter.java:318)
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.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: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.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: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:744)
]]

[2013-12-19T17:50:59.808+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459808] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: setPolicyContext] [[
[Web-Security] Setting Policy Context ID: old = null ctxID = _admingui/_admingui]]

[2013-12-19T17:50:59.808+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459808] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Codesource with Web URL: file:/__admingui/__admingui]]

[2013-12-19T17:50:59.808+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459808] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Checking Web Permission with Principals : null]]

[2013-12-19T17:50:59.808+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459808] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Web Permission = ("javax.security.jacc.WebResourcePermission" "/jdbc/jdbcConnectionPoolEdit.jsf" "POST")]]

[2013-12-19T17:50:59.808+0000] [glassfish 4.0] [FINEST] [] [javax.enterprise.system.core.security] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459808] [levelValue: 300] [CLASSNAME: com.sun.enterprise.security.provider.BasePolicyWrapper] [METHODNAME: doImplies] [[
JACC Policy Provider: PolicyWrapper.implies, context (_admingui/_admingui)- result was(false) permission (("javax.security.jacc.WebResourcePermission" "/jdbc/jdbcConnectionPoolEdit.jsf" "POST"))]]

[2013-12-19T17:50:59.808+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.jmac.config] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459808] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.jmac.config.GFServerConfigProvider] [METHODNAME: getEntry] [[
getEntry for: HttpServlet – GFConsoleAuthModule
module class: org.glassfish.admingui.common.security.AdminConsoleAuthModule
options: {loginErrorPage=/loginError.jsf, loginPage=/login.jsf}

request policy: javax.security.auth.message.MessagePolicy@de1d100
response policy: null]]

[2013-12-19T17:50:59.809+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459809] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: setPolicyContext] [[
[Web-Security] Policy Context ID was: _admingui/_admingui]]

[2013-12-19T17:50:59.809+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459809] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Codesource with Web URL: file:/__admingui/__admingui]]

[2013-12-19T17:50:59.809+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459809] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Checking Web Permission with Principals : asadmin, admin]]

[2013-12-19T17:50:59.809+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459809] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Web Permission = ("javax.security.jacc.WebResourcePermission" "/jdbc/jdbcConnectionPoolEdit.jsf" "POST")]]

[2013-12-19T17:50:59.809+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459809] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: hasResourcePermission] [[
[Web-Security] hasResource isGranted: true]]

[2013-12-19T17:50:59.809+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459809] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: hasResourcePermission] [[
[Web-Security] hasResource perm: ("javax.security.jacc.WebResourcePermission" "/jdbc/jdbcConnectionPoolEdit.jsf" "POST")]]

[2013-12-19T17:50:59.834+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=223 _ThreadName=admin-listener(32)] [timeMillis: 1387475459834] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.realm.file.FileRealm] [METHODNAME: init] [[
FileRealm : file=D:\Users\KDean\projects\FeeFracture\trunk\servers\glassfish4\glassfish\domains\feefracture\config\admin-keyfile]]

[2013-12-19T17:50:59.834+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=223 _ThreadName=admin-listener(32)] [timeMillis: 1387475459834] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.realm.file.FileRealm] [METHODNAME: init] [[
FileRealm : jaas-context=ignore]]

[2013-12-19T17:50:59.888+0000] [glassfish 4.0] [FINEST] [] [javax.enterprise.system.core.security.org.glassfish.security.services.impl.authorization] [tid: _ThreadID=223 _ThreadName=admin-listener(32)] [timeMillis: 1387475459888] [levelValue: 300] [CLASSNAME: org.glassfish.security.services.impl.authorization.AuthorizationServiceImpl] [METHODNAME: getAuthorizationDecision] [[
Authorization Service result for Subject:
Principal: admin
Principal: asadmin
Private Credential: Realm=admin-realm Username=admin Password=######## TargetName =
Private Credential: Realm=admin-realm Username=admin Password=######## TargetName =
was status=OK, decision=[1].]]

[2013-12-19T17:50:59.936+0000] [glassfish 4.0] [WARNING] [test.connection.pool.failed] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service] [tid: _ThreadID=223 _ThreadName=admin-listener(32)] [timeMillis: 1387475459936] [levelValue: 900] [[
RAR8054: Exception while creating an unpooled [test] connection for pool [ X ], Connection could not be allocated because: Access denied for user 'ff_read_write'@'localhost' (using password: YES)]]

[2013-12-19T17:50:59.938+0000] [glassfish 4.0] [SEVERE] [] [org.glassfish.admingui] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459938] [levelValue: 1000] [[
RestResponse.getResponse() gives FAILURE. endpoint = 'https://localhost:4848/management/domain/resources/ping-connection-pool.json'; attrs = '

{id=X}

']]

Comment by Kevin Dean [ 19/Dec/13 ]

After bashing my head against the wall trying to figure out how to enable tracing in GlassFish or the MySQL JDBC driver that would log the aliased password, I finally took the easy route and wrote my own connection pool data source that extended MySQL's connection pool data source. I then overrode the "setPassword" method to log the password and lo and behold, we have an answer!!!

It seems that either the encryption or the decryption process mangles the password. Any password less than 10 characters long is fine, but the moment you hit ten characters, the process appends a single space character to the end. That space character remains until you hit 20 characters, at which point you have not one but TWO space characters at the end.

Comment by kumara [ 20/Dec/13 ]

Thanks for the detailed analysis and getting to the root cause. Need to investigate further. Problem demonstrated by following test code ...

import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.Charset;

public class Test {

    private final static Charset utf8 = Charset.forName("UTF-8");

    private static String getBytesInHex(byte[] bytes) {
        StringBuilder sb = new StringBuilder();
        for (byte b: bytes) {
             sb.append(String.format("%02X", b));
        }
        return sb.toString();
    }

    private static void encodeAndPrint(String password) {
        final ByteBuffer byteBuffer = utf8.encode(password);
        System.out.println("Encoded \"" + password + "\" to \"" + getBytesInHex(byteBuffer.array()) + "\"");
    }

    public static void main(String[] args) { 
        for (String s: args) {
             encodeAndPrint(s);
        }
    }
}

java Test abcd12345 abdcde12345 abcdefghij012345678 abcdefghij0123456789
Encoded "abcd12345" to "616263643132333435"
Encoded "abdcde12345" to "616264636465313233343500"
Encoded "abcdefghij012345678" to "6162636465666768696A30313233343536373800"
Encoded "abcdefghij0123456789" to "6162636465666768696A303132333435363738390000"

Need to dig deeper in utf8.encode() ...

Comment by Tim Quinn [ 20/Dec/13 ]

The problem turns out not to be in utf8.encode but in how GlassFish and the test code use the return value from array().

That method returns the entire array that is the backing store for the buffer, not just the valid portion that contains legitimate data.

For example, the test code should convert the byte buffer to a readable string this way:

    private static String getBytesInHex(final ByteBuffer bb) {
        final StringBuilder sb = new StringBuilder();
        while (bb.hasRemaining()) {
            sb.append(String.format("%02X", bb.get()));
        }
        return sb.toString();
    }

Note the use of hasRemaining() and get().

I'm already at work on a fix to the JCEKSPasswordAliasStore class (which contains the same incorrect use the array() method).

Comment by Tim Quinn [ 30/Dec/13 ]

Fix checked in.

Project: glassfish
Repository: svn
Revision: 63048
Author: tjquinn
Date: 2013-12-30 21:21:57 UTC
Link:

Log Message:
------------
GLASSFISH-20938 - GlassFish password aliases failing

Symptom: Password aliases longer than just a few characters were incorrectly handled.

Cause: Places in the new alias handling code use ByteBuffer and CharBuffer objects and the array() method. That method returns the entire backing array, not just the valid portion of the backing array. As longer password strings were created the xxxBuffer would legitimately allocate more bytes than the length of the password. The GlassFish code which uses the entire backing array would use the invalidate bytes in the backing array as well as the valid ones.

Fix: Change the code to use the position() and remaining() methods on ByteBuffer (one solution) and toString on CharBuffer to work with only the valid portion data in the buffer.

Tests: new unit test; remote queue EJB, deployment devtests; QL; others

Revisions:
----------
63048

Modified Paths:
---------------
trunk/main/nucleus/common/common-util/src/main/java/com/sun/enterprise/util/Utility.java
trunk/main/nucleus/security/services/src/main/java/org/glassfish/security/services/impl/JCEKSPasswordAliasStore.java

Added Paths:
------------
trunk/main/nucleus/security/services/src/test/java/org/glassfish/security/services/impl/PasswordAliasTest.java





[GLASSFISH-20936] change @RunLevel( value=10 ) to a public constant for com.sun.enterprise.transaction.startup.TransactionLifecycleService definition Created: 18/Dec/13  Updated: 19/Sep/14

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

Type: Improvement Priority: Trivial
Reporter: TangYong Assignee: paul_parkinson
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

change @RunLevel( value=10 ) to a public constant for com.sun.enterprise.transaction.startup.TransactionLifecycleService definition.

[original definition]
@Service
//todo: change value=10 to a public constant
@RunLevel( value=10 )
public class TransactionLifecycleService implements PostConstruct, PreDestroy

{ ...}

[fixing way]
@Service
@RunLevel( value=StartupRunLevel.VAL )
public class TransactionLifecycleService implements PostConstruct, PreDestroy {
...
}






[GLASSFISH-20935] When target a JMS resource to a cluster, should enforce no Node of any instances in the cluster has "localhost" as 'Node Host' Created: 18/Dec/13  Updated: 19/Sep/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 3.1.2, 3.1.2.2, 4.0
Fix Version/s: 4.1

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


 Description   

GlassFish JMS module forms MQ conventional cluster by taking 'Node Host' from each GlassFish instance's Node for imq.cluster.brokerlist and imq.cluster.masterbroker. Therefore the 'Node Host' of each GlassFish Node of the instances must not set to 'localhost' or else MQ conventional cluster may not be formed because 'localhost' can not represent the Node system's address on another system. This is especially important since the GlassFish default Node 'localhost-domain1' has its 'Node Host' set to 'localhost' by default which has often caused, as reported by GlassFish users, MQ cluster establishment problem on GlassFish cluster start up






[GLASSFISH-20930] JASPIC 1.1's register session makes authenticated identity available when SAM chose not to inherit the session Created: 16/Dec/13  Updated: 19/Sep/14  Resolved: 16/May/14

Status: Resolved
Project: glassfish
Component/s: security
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: arjan tijms Assignee: Nithya Ramakrishnan
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: 4_0_1-review

 Description   

JASPIC 1.1 introduced a feature where the container remembers the authenticated session. However, the SAM decides whether the application gets to see the identity that was stored in the container session or something else (see GLASSFISH-2031). (note though that the session should remain intact even when a SAM choses not the inherit/join it for a particular request)

When the SAM decides that the session should NOT be applied to the request, e.g. by invoking the handler with a CallerPrincipalCallback and a null for the Principal argument, then on GlassFish 4 a protected resource for which the identity in the container session would have access is correctly denied.

However, for a public resource the Servlet's request.getUserPrincipal incorrectly returns the principal from the container session. In case the SAM passed a null for the Principal in the CallerPrincipalCallback and invoked the handler with that, the unauthenticated user should have been associated with the request and hence request.getUserPrincipal should have returned a null.

I've created a unit test at https://github.com/javaee-samples/javaee7-samples/tree/master/jaspic/register-session that shows the incorrect behavior. I've also asked Ron Monzillo about the behavior and he confirmed that if the SAM really passes a null into CallerPrincipalCallback then the application should indeed not see anything else than a null from request.getUserPrincipal for that specific request.



 Comments   
Comment by arjan tijms [ 24/Apr/14 ]

Jeff, is there still a chance to change "future release' to 4.0.1?

The problem here is that JASPIC is apparently a rather difficult spec for vendors to comprehend and implement correctly, and the TCK sure isn't helping.

This leaves GlassFish as pretty much the only option left to convince vendors that things should be implemented in a certain way. If the spec isn't clear, the TCK non-existing for a certain range of features and GlassFish not implementing it correctly, then there's little hope that any other vendor will know how to implement it.

For the "remember authenticated session" feature this is especially important since it's not really clear at all how this should be implemented. We had a long discussion with Ron and a vendor representative about this and the confusion about the exact behavior was indeed rather big.

Comment by reza_rahman [ 24/Apr/14 ]

This honestly sounds like an issue to solve in a security JSR for Java EE 8+ which we've gotten quite a bit of community feedback on. I'm not sure but perhaps it's best to wait a bit more and tackle it properly there?

Comment by arjan tijms [ 24/Apr/14 ]

This honestly sounds like an issue to solve in a security JSR for Java EE 8+ which we've gotten quite a bit of community feedback on. I'm not sure but perhaps it's best to wait a bit more and tackle it properly there?

The entire concept of remembering a session definitely should be given another thought and this may indeed be done best in whatever discussion comes up for Java EE 8 and beyond (be it a new security JSR, a MR for JASPIC, a new major JASPIC release, or something else). It's perhaps a shame that the discussion I referred to above didn't took place on a public mailing list, but the summary of it is that the current specification for this is rather vague to say the least.

That said, this particular JIRA issue is concerned with just a small behavioral bug in the GlassFish code. Most likely a simple field isn't correctly cleared out somewhere at the right time.

Comment by reza_rahman [ 24/Apr/14 ]

If this is indeed a small amount of work that could be very helpful, I'd recommend digging into it and contributing a patch if practical? That may be great background for any Java EE 8+ security discussion anyway?

Comment by Nithya Ramakrishnan [ 16/May/14 ]

This issue is now resolved. The register session test case now passes.

Sending webintegration/src/main/java/com/sun/web/security/RealmAdapter.java
Transmitting file data .
Committed revision 63277.





[GLASSFISH-20929] GlassFish 4 startup hang on large scale cluster tests Created: 16/Dec/13  Updated: 19/Sep/14  Resolved: 15/Apr/14

Status: Resolved
Project: glassfish
Component/s: other
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Joe Di Pol Assignee: Joe Di Pol
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File 14034.deadlock     File 14057.deadlock     File 14067.deadlock    
Issue Links:
Dependency
blocks GLASSFISH-20925 Sporadic hangs/failures on GF4 startup Resolved
Related
is related to GLASSFISH-20950 Glassfish doesn't start due to deadlock Closed
is related to GLASSFISH-20598 Deadlock discovered in the v4 trunk w... Resolved

 Description   

On the large scale cluster tests that starts clusters of 50 instances we often have one or two instances that hang on startup. The instance server.log doesn't help much.

Sometimes the instance log only has the [NCLS-GFLAUNCHER-00005] message that lists the JVM args, and nothing after that. So in that case the hang occurred very early in startup.

Another time the hang occurred some point after:

[2013-12-16T10:53:29.119-0800] [glassfish 4.0] [INFO] [NCLS-SECURITY-01115]
 [javax.enterprise.system.core.security] 
[tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1387220006661] [timeMillis: 1387220009119] [levelValue: 800] 
[[
  Realm [certificate] of classtype 
[com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.]]

but before:

[2013-12-16T11:04:57.902-0800] [glassfish 4.0] [INFO] [SEC-SVCS-00100]
 [javax.enterprise.security.services] 
[tid: _ThreadID=17 _ThreadName=RunLevelControllerThread-1387220692473] 
[timeMillis: 1387220697902] [levelValue: 800] 
[[
  Authorization Service has successfully initialized.]]

of course log file buffering could make those observations inaccurate.

We have not yet caught the hang during runtime and done a jstack. That's probably the next thing that needs to be done.



 Comments   
Comment by Joe Di Pol [ 13/Jan/14 ]

It's possible this issue is caused by GLASSFISH-20950, but that has not been confirmed.

Comment by Joe Di Pol [ 15/Jan/14 ]

Attaching three deadlock thread dumps from the same cluster test run on the same host:
$ uname -a
SunOS sca00aiy 5.10 Generic_148889-02 i86pc i386 i86pc

$ /scratch/hudson/java/jdk1.7.0_45/bin/java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) Server VM (build 24.45-b08, mixed mode)

Here is one example:

Found one Java-level deadlock:
=============================
"RunLevelControllerThread-1389743217329":
  waiting to lock monitor 0x0845823c (object 0xdb2b9d18, a java.util.logging.LogManager),
  which is held by "RunLevelControllerThread-1389743217261"
"RunLevelControllerThread-1389743217261":
  waiting to lock monitor 0x08184b10 (object 0xdb2bb370, a java.util.logging.LogManager$LoggerContext),
  which is held by "RunLevelControllerThread-1389743217329"

Java stack information for the threads listed above:
===================================================
"RunLevelControllerThread-1389743217329":
	at java.util.logging.LogManager.drainLoggerRefQueueBounded(LogManager.java:911)
	- waiting to lock <0xdb2b9d18> (a java.util.logging.LogManager)
	at java.util.logging.LogManager.addLogger(LogManager.java:947)
	at java.util.logging.LogManager.demandLogger(LogManager.java:411)
	at java.util.logging.LogManager$LoggerContext.demandLogger(LogManager.java:495)
	at java.util.logging.LogManager$LoggerContext.processParentHandlers(LogManager.java:699)
	at java.util.logging.LogManager$LoggerContext.addLocalLogger(LogManager.java:632)
	- locked <0xdb2bb370> (a java.util.logging.LogManager$LoggerContext)
	at java.util.logging.LogManager$LoggerContext.addLocalLogger(LogManager.java:584)
	at java.util.logging.LogManager.addLogger(LogManager.java:949)
	at java.util.logging.LogManager.demandLogger(LogManager.java:411)
	at java.util.logging.Logger.demandLogger(Logger.java:343)
	at java.util.logging.Logger.getLogger(Logger.java:439)
	at org.glassfish.flashlight.FlashlightLoggerInfo.<clinit>(FlashlightLoggerInfo.java:60)
	at org.glassfish.flashlight.impl.provider.FlashlightProbeProviderFactory.<clinit>(FlashlightProbeProviderFactory.java:94)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at org.glassfish.hk2.utilities.reflection.ReflectionHelper.makeMe(ReflectionHelper.java:1117)
	at org.jvnet.hk2.internal.ClazzCreator.createMe(ClazzCreator.java:300)
	at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:417)
	at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456)
	at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:112)
	at org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:100)
	at org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	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:150)
	at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2395)
	at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:98)
	- locked <0xf10d8698> (a java.lang.Object)
	at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:598)
	at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:77)
	at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:245)
	at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:268)
	at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:409)
	at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456)
	at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:225)
	at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:82)
	at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2395)
	at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:98)
	- locked <0xf0b7fb88> (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:744)
"RunLevelControllerThread-1389743217261":
	at java.util.logging.LogManager$LoggerContext.findLogger(LogManager.java:518)
	- waiting to lock <0xdb2bb370> (a java.util.logging.LogManager$LoggerContext)
	at java.util.logging.LogManager.setLevelsOnExistingLoggers(LogManager.java:1457)
	- locked <0xdb2b9d18> (a java.util.logging.LogManager)
	at java.util.logging.LogManager.readConfiguration(LogManager.java:1216)
	at java.util.logging.LogManager.readConfiguration(LogManager.java:1089)
	at com.sun.enterprise.server.logging.LogManagerService.postConstruct(LogManagerService.java:288)
	at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:378)
	at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:426)
	at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456)
	at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:225)
	at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:82)
	at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2395)
	at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:98)
	- locked <0xf0b7fb20> (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 org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneLevel.run(CurrentTaskFuture.java:753)
	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)

Found 1 deadlock.
Comment by Joe Di Pol [ 15/Jan/14 ]

There have been deadlock issue in java.util.logging. One (https://bugs.openjdk.java.net/browse/JDK-8010939) has been fixed in 7 (as of u25) and 8, but another has only been fixed in Java 8 according to daniel.fuchs of the JDK team:

Yes - the new deadlock looks like
https://bugs.openjdk.java.net/browse/JDK-8027670 /
https://bugs.openjdk.java.net/browse/JDK-8029281
which should be fixed in 8.
(had a look at all three thread dumps - and they look
 all similar). 

Based on that I now suspect that we are hitting JDK-8027670 in JDK7u45.

It is unclear at this time as to if and when the fix will be ported to 7.

Next step is to try running the cluster test with 8 and see if that eliminates the hangs.

Comment by Joe Di Pol [ 16/Jan/14 ]

JDK engineer gave use a private JDK 7 build with the fix for JDK-8027670 ported to it, and it seems to have resolved the issue. Two runs with no deadlocks. We are hoping the fix gets into JDK7u60.

Comment by Joe Di Pol [ 07/Feb/14 ]

The fix was checked into JDK7u60 and that should resolve the issue.

Comment by Joe Di Pol [ 15/Apr/14 ]

We have verified this is fixed in JDK7u60





[GLASSFISH-20924] ConcurrentModificationException in StatsProviderManager.unregister() at startup Created: 11/Dec/13  Updated: 23/Jul/15  Resolved: 16/Dec/13

Status: Resolved
Project: glassfish
Component/s: monitoring
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Critical
Reporter: Joe Di Pol Assignee: Jennifer Chou
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File diff.txt     Java Source File StatsProviderManager.java    
Issue Links:
Dependency
blocks GLASSFISH-20925 Sporadic hangs/failures on GF4 startup Resolved

 Description   

On large scale GlassFish cluster testing we sometimes see the following exception on GlassFish instance startup resulting in the instance not coming up:

[#|2013-12-04T20:20:41.483+0000|SEVERE|glassfish 4.0|javax.enterprise.system.core|_ThreadID=1;_ThreadName=main;_TimeMillis=1386188441483;_LevelValue=1000;_MessageID=NCLS-CORE-00019;|
  Shutting down server due to startup exception
java.util.ConcurrentModificationException
    at java.util.Vector$Itr.checkForComodification(Vector.java:1156)
    at java.util.Vector$Itr.next(Vector.java:1133)
    at org.glassfish.external.probe.provider.StatsProviderManager.unregister(StatsProviderManager.java:100)
    at com.sun.enterprise.v3.services.impl.monitor.GrizzlyMonitoring.registerThreadPoolStatsProvider(GrizzlyMonitoring.java:145)
    at com.sun.enterprise.v3.services.impl.GlassfishNetworkListener.registerMonitoringStatsProviders(GlassfishNetworkListener.java:289)
    at com.sun.enterprise.v3.services.impl.GlassfishNetworkListener.start(GlassfishNetworkListener.java:107)
    at com.sun.enterprise.v3.services.impl.GrizzlyProxy.start0(GrizzlyProxy.java:267)
    at com.sun.enterprise.v3.services.impl.GrizzlyProxy.start(GrizzlyProxy.java:241)
    at com.sun.enterprise.v3.services.impl.GrizzlyService.createNetworkProxy(GrizzlyService.java:567)
    at com.sun.enterprise.v3.services.impl.GrizzlyService.postConstruct(GrizzlyService.java:490)
    at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:298)
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:346)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456)
    at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:225)
    at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:82)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2358)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:98)
    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:744) 


 Comments   
Comment by Jennifer Chou [ 11/Dec/13 ]

Synchronize the methods on StatsProviderManager that update the Vector toBeRegistered: registerStatsProvider, unregister,and setStatsProviderManagerDelegate. Hopefully, performance will not be an issue since these methods are very small.

Comment by oleksiys [ 11/Dec/13 ]

Jennifer, pls. change Vector to ArrayList. The Vector class is thread-safe itself (its methods are synchronized), but as we synchronize StatsProviderManager methods - we don't need extra synchronization.

Comment by Jennifer Chou [ 11/Dec/13 ]

Changed Vector to ArrayList.

Comment by Jennifer Chou [ 16/Dec/13 ]

Integrated management-api-3.2.1-b002 which contains the fix. This should fix the ConcurrentModificationException. If the problem is still seen in the large scale cluster test, please reopen this issue.

r63025 | jc129909 | 2013-12-16 10:52:43 -0500 (Mon, 16 Dec 2013) | 4 lines

Integrate management-api-3.2.1-b002 which contains the fix for GLASSFISH-20924.
Approved by Romain Grecourt.
Passed QL, admin devtests.

Index: pom.xml
===================================================================
— pom.xml (revision 63024)
+++ pom.xml (working copy)
@@ -161,7 +161,7 @@
<jax-rs-api.version>2.0</jax-rs-api.version>
<mimepull.version>1.9.3</mimepull.version>
<jbi.version>1.0</jbi.version>

  • <glassfish-management-api.version>3.2.0-b001</glassfish-management-api.version>
    + <glassfish-management-api.version>3.2.1-b002</glassfish-management-api.version>
    <btrace.version>1.0.5</btrace.version>
    <opendmk.version>1.0-b01-ea</opendmk.version>
    <v3-docs.version>4.0-b27</v3-docs.version>
Comment by dpandulev [ 23/Jul/15 ]

After having similar issue and upgrading to glassfish 4.1 i have the following exception:

Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException
Error Code: 0
Call: SELECT channel_core_timer_timestamp FROM channel_core_timers WHERE channel_core_timer_id = 1
Query: DataReadQuery(sql="SELECT channel_core_timer_timestamp FROM channel_core_timers WHERE channel_core_timer_id = 1")
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:316)
at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:135)
at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:346)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:307)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:581)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1625)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.incrementCallCount(DatasourceAccessor.java:321)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:613)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:558)
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2002)
at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:298)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:299)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelect(DatasourceCallQueryMechanism.java:281)
at org.eclipse.persistence.queries.DataReadQuery.executeNonCursor(DataReadQuery.java:197)
at org.eclipse.persistence.queries.DataReadQuery.executeDatabaseQuery(DataReadQuery.java:152)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899)
at org.eclipse.persistence.queries.DataReadQuery.execute(DataReadQuery.java:137)
at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:798)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1804)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1786)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1751)
at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:258)
at org.eclipse.persistence.internal.jpa.QueryImpl.getSingleResult(QueryImpl.java:517)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getSingleResult(EJBQueryImpl.java:400)
at com.egt.nse.services.aggregations.ArchiveChannelsTimerBean.getValidChannelTimersDate(ArchiveChannelsTimerBean.java:32)
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.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 org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
at sun.reflect.GeneratedMethodAccessor331.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.GeneratedMethodAccessor332.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.$Proxy416.getValidChannelTimersDate(Unknown Source)
at com.egt.nse.services.aggregations._EJB31_GeneratedArchiveChannelsTimerBeanIntf__Bean_.getValidChannelTimersDate(Unknown Source)
at com.egt.nse.services.aggregations.TransactionsAggregationManagerBean.aggregateData(TransactionsAggregationManagerBean.java:37)
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.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 org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
at sun.reflect.GeneratedMethodAccessor331.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.GeneratedMethodAccessor332.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.$Proxy384.aggregateData(Unknown Source)
at com.egt.nse.services.aggregations._EJB31_GeneratedTransactionsAggregationManagerBeanIntf__Bean_.aggregateData(Unknown Source)
at com.egt.nse.services.aggregations.AggregationManagerBean.tryUpdateTime(AggregationManagerBean.java:30)
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.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 org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:55)
at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
at sun.reflect.GeneratedMethodAccessor331.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.aroundTimeout(SystemInterceptorProxy.java:145)
at sun.reflect.GeneratedMethodAccessor346.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.BaseContainer.callEJBTimeout(BaseContainer.java:4051)
at com.sun.ejb.containers.EJBTimerService.deliverTimeout(EJBTimerService.java:1199)
at com.sun.ejb.containers.EJBTimerService.access$000(EJBTimerService.java:89)
at com.sun.ejb.containers.EJBTimerService$TaskExpiredWork.run(EJBTimerService.java:1919)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
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)
Caused by: java.sql.SQLException
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getConnection(ConnectorConnectionPoolAdminServiceImpl.java:1643)
at com.sun.enterprise.connectors.ConnectorRuntime.getConnection(ConnectorRuntime.java:639)
at org.glassfish.jdbcruntime.service.JdbcDataSource.getConnection(JdbcDataSource.java:86)
at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:123)
... 130 more
Caused by: java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
at java.util.ArrayList$Itr.remove(ArrayList.java:865)
at org.glassfish.jdbcruntime.JdbcPoolMonitoringExtension.unregisterPool(JdbcPoolMonitoringExtension.java:147)
at com.sun.enterprise.resource.pool.monitor.ConnectionPoolStatsProviderBootstrap.poolDestroyed(ConnectionPoolStatsProviderBootstrap.java:367)
at com.sun.enterprise.resource.pool.PoolLifeCycleRegistry.poolDestroyed(PoolLifeCycleRegistry.java:126)
at com.sun.enterprise.resource.pool.PoolManagerImpl.killPool(PoolManagerImpl.java:472)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.killPool(ConnectorConnectionPoolAdminServiceImpl.java:389)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.unloadAndKillPool(ConnectorConnectionPoolAdminServiceImpl.java:1391)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getUnpooledConnection(ConnectorConnectionPoolAdminServiceImpl.java:629)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getConnection(ConnectorConnectionPoolAdminServiceImpl.java:1627)
... 133 more





[GLASSFISH-20922] upgrading weld-osgi-bundle.jar into 2.2.1.Final Created: 10/Dec/13  Updated: 19/Sep/14  Resolved: 30/May/14

Status: Resolved
Project: glassfish
Component/s: cdi
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Task Priority: Critical
Reporter: TangYong Assignee: jjsnyder83
Resolution: Fixed Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: 4_0_1-approved

 Description   

upgrading weld-osgi-bundle.jar into 2.1.0.Final, in the version, there is the following big changes based on [1] and [2]

1. javax.inject has been removed from <_exportcontents> and javax.inject dependency has been removed

2. javax.enterprise.* has been removed from <_exportcontents> and javax.enterprise:cdi-api dependency has been removed

3. guava dependency has been removed

All is based on [3]and [4]

[1]: https://github.com/weld/core/blob/2.1/bundles/osgi/pom.xml
[2]: https://github.com/weld/core/commit/3e5cc452783161a9aae40160da1656216084bc33
[3]: https://issues.jboss.org/browse/WELD-1428
[4]: https://issues.jboss.org/browse/WELD-1477

Once upgrading 2.1.0.Final, these big changes will need GF distro to do the following:

1. javax.enterprise:cdi-api will be put into modules
2. whether current guava module in gf will meet the demand from weld-osgi-bundle. This needs to be confirm.



 Comments   
Comment by TangYong [ 10/Dec/13 ]

3. also confirm whether some modules which only depend on cdi api originally exported by weld-osgi-bundle, needs to be
switched into depending on javax.enterprise:cdi-api?

Comment by mauritzlovgren [ 01/Apr/14 ]

Might be important to inform current 4.0.0 users of the serious memory leak in the Weld version that is bundled with 4.0.0 release (Weld 2.0). Weld has released a fix for part of this memory leak that was causing big trouble in our production environment: http://weld.cdi-spec.org/news/2014/01/14/weld-212-final/. I assume that GF 4.0.1 will have a newer version of Weld, at least 2.0.5.Final or newer?).

Comment by elio.alves [ 14/Apr/14 ]

I fix this bug and update the weld version toweld-2.1.2.Final but I dont know how to commit.

Somebody can help-me?

Below my changes

update of lib weld-osgi-api to weld-2.1.2.Final because the atual version have a bug that mixing the sessions
update on BootstrapConfigurationImpl and ACLSingletonProvider to works with weld-2.1.2.Final. I implemented 4 methods that reuse the same old methods
I put two others bundles because the weld require it
I created another packager... but i dont know if are in the correct form, but, works fine

Comment by elio.alves [ 14/Apr/14 ]

How I can commit my changes?
This is my first fix in the java.net/jira

Comment by jjsnyder83 [ 15/Apr/14 ]

If you send me the changes I will get them committed in the next few days. There are a couple other steps that have to be done too before we can change the version.

Comment by elio.alves [ 28/May/14 ]

Hi jjsnyder83.

How I can send to you?

Comment by jjsnyder83 [ 28/May/14 ]

I am in the middle of updating GlassFish to CDI 1.2 and Weld 2.2.1.Final. I have a few tck failures to track down and then I will check it all in. Hopefully in a few days.

Comment by jjsnyder83 [ 30/May/14 ]

Committed revision 63317.

There are still a couple of tck failures. Jersey is causing a bunch and the Jersey team is supposed to update the version used in GlassFish today or tomorrow. Also there are 2 ejb test failures that should be fixed soon.





[GLASSFISH-20919] dontRollbackOn attribute does not seem to take subclasses into account Created: 09/Dec/13  Updated: 19/Sep/14  Resolved: 13/May/14

Status: Resolved
Project: glassfish
Component/s: jts
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: svanimpe Assignee: arjavdesai
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: 4_0_1-evangelists, 4_0_1-mustfix

 Description   

The following code causes a RollbackException:

@Path("test")
@Transactional(dontRollbackOn = {WebApplicationException.class})
public class TestWAE
{
    @PersistenceContext
    private EntityManager em;
    
    @GET
    public String testWAE()
    {
        throw new BadRequestException("Some reason");
    }
}

while this works fine:

@Path("test")
@Transactional(dontRollbackOn = {BadRequestException.class})
public class TestWAE
{
    @PersistenceContext
    private EntityManager em;
    
    @GET
    public String testWAE()
    {
        throw new BadRequestException("Some reason");
    }
}

According to https://javaee-spec.java.net/nonav/javadocs/javax/transaction/Transactional.html, they should both do the same thing: "the designated behavior applies to subclasses of that class as well".

I noticed this by accident. Maybe I'm missing something, but I figured reporting it wouldn't hurt



 Comments   
Comment by jclingan [ 01/May/14 ]

If bug evalutation shows that this issue breaks spec compliance, then we should fixes this issue.

Comment by arjavdesai [ 06/May/14 ]

svanimpe,

In above code, you are referring to this hierarchy, is that right?

extended by javax.ws.rs.WebApplicationException
extended by javax.ws.rs.ClientErrorException
extended by javax.ws.rs.BadRequestException

Comment by svanimpe [ 06/May/14 ]

That's right.

Comment by arjavdesai [ 07/May/14 ]

svanimpe,

Thanks for the quick response!

Can you do me a favor and get following info in your setup? I need to confirm/compare the same with my test:

@Path("test") 
@Transactional(dontRollbackOn = {WebApplicationException.class}) 
public class TestWAE 
{ 
    @PersistenceContext 
    private EntityManager em; 
     
    @GET 
    public String testWAE() 
    { 
        throw new BadRequestException("Some reason"); 
    } catch (RuntimeException runtimeException) { 
            System.out.println(runtimeException.getClass()); 
            System.out.println(runtimeException.getCause()); 
throw runtimeException; 
     } 

}
Comment by svanimpe [ 07/May/14 ]

I assume there's a missing try in your code? In that case:
getClass(): javax.ws.rs.BadRequestException
getCause(): null

On a side note: I lost the original example and while rebuilding it, I was unable to reproduce the issue as I forgot to add beans.xml to my project. Only after adding beans.xml did the issue pop up.

Comment by arjavdesai [ 07/May/14 ]

Yes, I missed it. Sorry about that!

Can you please attach/upload your project?

With GFS 4.0/JavaEE7, CDI 1.1 has implicit scanning i.e. beans.xml should not be needed.

Comment by svanimpe [ 07/May/14 ]

I don't see any way to attach a file, so I uploaded the project here: https://drive.google.com/file/d/0B-q-VDW3dbtyem1WQnZFaXowcms/edit?usp=sharing

Comment by arjavdesai [ 07/May/14 ]

Thanks! There should be

Attach file to this issue
Attach screenshot to this issue

On right-hand side, when you are in edit mode for JIRA.

Comment by arjavdesai [ 13/May/14 ]

Committed revision 63270 to fix the issue.





[GLASSFISH-20918] NullPointerException in Glassfish 4.0/Grizzly SelectorRunner Created: 09/Dec/13  Updated: 19/Sep/14  Resolved: 14/Jan/14

Status: Resolved
Project: glassfish
Component/s: grizzly-kernel
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: arie_golos Assignee: oleksiys
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Glassfish 4.0 (build 89, jdk 7, Amazon WS,
SMP Thu Jun 27 13:19:18 UTC 2013 (6efde93) x86_64 x86_64 x86_64 GNU/Linux
SUSE



 Description   

Occasional NullPointerException in Grizzly SelectorRunner after which one of the user facing ports stops listening (Connection closes:
[#|2013-12-07T09:09:14.201+0000|WARNING|glassfish 4.0|org.glassfish.grizzly.strategies.WorkerThreadIOStrategy|_ThreadID=75;_ThreadName=http-listener-3-kernel(1) SelectorRunner;_TimeMillis=1386407354201;_LevelValue=900;|GRIZZLY0010: Uncaught exception:
java.lang.NullPointerException
at com.sun.enterprise.v3.services.impl.monitor.ConnectionMonitor.onAcceptEvent(ConnectionMonitor.java:68)
at org.glassfish.grizzly.nio.NIOConnection.notifyProbesAccept(NIOConnection.java:544)
at org.glassfish.grizzly.nio.transport.TCPNIOServerConnection.onAccept(TCPNIOServerConnection.java:255)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:818)
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.executeIoEvent(WorkerThreadIOStrategy.java:101)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:89)
at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:409)
at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:378)
at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:342)
at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:274)
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:724)

#]
I am running a tcpdump trying to figure out what was causing it. It may take a couple of days.


 Comments   
Comment by Bilucciano [ 10/Jan/14 ]

Hi!

Same issue here, Glassfish is shutting down randomly every 2-4 days.

We're running under ubuntu server 12.04 64 bits and glassfish-4.0.1-b04-11_24_2013

[2014-01-09T12:40:03.053+0100] [glassfish 4.0] [WARNING] [] [org.glassfish.grizzly.strategies.WorkerThreadIOStrategy] [tid: _ThreadID=32 _ThreadName=http-listener-1-kernel(1) SelectorRunner] [timeMillis: 1389267603053] [levelValue: 900] [[
GRIZZLY0010: Uncaught exception:
java.lang.NullPointerException
at com.sun.enterprise.v3.services.impl.monitor.ConnectionMonitor.onAcceptEvent(ConnectionMonitor.java:68)
at org.glassfish.grizzly.nio.NIOConnection.notifyProbesAccept(NIOConnection.java:550)
at org.glassfish.grizzly.nio.transport.TCPNIOServerConnection.onAccept(TCPNIOServerConnection.java:251)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:527)
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.executeIoEvent(WorkerThreadIOStrategy.java:101)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:89)
at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:406)
at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:375)
at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:339)
at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:271)
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)
]]

Any help is appreciated,

Thanks!

Comment by arie_golos [ 10/Jan/14 ]

Hi, I filed an identical bug against Grizzly (Grizzly-1615) and that one has been answered by oleksiys. You can download the patched jar attached to that jira and try it out. We did not have the issue for about 3 weeks after installing the patch.

Comment by Bilucciano [ 10/Jan/14 ]

Hi,

I've tried to apply that patch, it seems to work ok on 4.0, but it doesn't work on 4.0.1.

Firstly, related to this issue: https://java.net/jira/browse/GLASSFISH-20902 cglib.jar was not found. After removing that line on osgi.properties, glassfish throws this:

Should I downgrade to 4.0 (i wouldn't like to really) or there is any solution?

Waiting for domain1 to start ....Error starting domain domain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:

Launching GlassFish on Felix platform
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime@3dd1d4b8 in service registry.
Completed shutdown of GlassFish runtime
We are in non-embedded mode, so org.glassfish.main.core.glassfish [215] has nothing to do.
Jan 10, 2014 3:54:11 PM com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder reconfigure
INFO: Provisioning options have changed, recreating the framework with a clean OSGi storage(aka cache).
Jan 10, 2014 3:54:11 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner createBundleProvisioner
INFO: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.
Jan 10, 2014 3:54:11 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry because it is not an absolute URI.
Jan 10, 2014 3:54:11 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry because it is not an absolute URI.
Exception in thread "main" java.lang.reflect.InvocationTargetException
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)
Caused by: A MultiException has 1 exceptions. They are:
1. org.glassfish.hk2.api.MultiException: A MultiException has 2 exceptions. They are:
1. com.sun.enterprise.module.ResolveError: Failed to start OSGiModuleImpl:: Bundle = [org.glassfish.main.core.kernel [211]], State = [NEW]
2. java.lang.IllegalStateException: Could not load descriptor SystemDescriptor(
implementation=com.sun.enterprise.v3.server.AppServerStartup$AppInstanceListener
contracts=

{com.sun.enterprise.v3.server.AppServerStartup$AppInstanceListener,org.glassfish.hk2.api.InstanceLifecycleListener}
scope=javax.inject.Singleton
qualifiers={}
descriptorType=CLASS
descriptorVisibility=NORMAL
metadata=Bundle-SymbolicName={org.glassfish.main.core.kernel},Bundle-Version={4.0.1.SNAPSHOT}
rank=0
loader=OsgiPopulatorPostProcessor.HK2Loader(OSGiModuleImpl:: Bundle = [org.glassfish.main.core.kernel [211]], State = [NEW],1975906811)
proxiable=null
proxyForSameScope=null
analysisName=null
id=213
locatorId=0
identityHashCode=378655269
reified=false)


at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.populateServiceLocator(AbstractModulesRegistryImpl.java:202)
at com.sun.enterprise.module.bootstrap.Main.createServiceLocator(Main.java:272)
at org.jvnet.hk2.osgiadapter.HK2Main.createServiceLocator(HK2Main.java:120)
at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime.newGlassFish(EmbeddedOSGiGlassFishRuntime.java:95)
at com.sun.enterprise.glassfish.bootstrap.GlassFishRuntimeDecorator.newGlassFish(GlassFishRuntimeDecorator.java:68)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntime.newGlassFish(OSGiGlassFishRuntime.java:91)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:113)
... 6 more
Caused by: A MultiException has 2 exceptions. They are:
1. com.sun.enterprise.module.ResolveError: Failed to start OSGiModuleImpl:: Bundle = [org.glassfish.main.core.kernel [211]], State = [NEW]
2. java.lang.IllegalStateException: Could not load descriptor SystemDescriptor(
implementation=com.sun.enterprise.v3.server.AppServerStartup$AppInstanceListener
contracts={com.sun.enterprise.v3.server.AppServerStartup$AppInstanceListener,org.glassfish.hk2.api.InstanceLifecycleListener}

scope=javax.inject.Singleton
qualifiers={}
descriptorType=CLASS
descriptorVisibility=NORMAL
metadata=Bundle-SymbolicName=

{org.glassfish.main.core.kernel}

,Bundle-Version=

{4.0.1.SNAPSHOT}

rank=0
loader=OsgiPopulatorPostProcessor.HK2Loader(OSGiModuleImpl:: Bundle = [org.glassfish.main.core.kernel [211]], State = [NEW],1975906811)
proxiable=null
proxyForSameScope=null
analysisName=null
id=213
locatorId=0
identityHashCode=378655269
reified=false)

at org.jvnet.hk2.internal.ServiceLocatorImpl.loadClass(ServiceLocatorImpl.java:1940)
at org.jvnet.hk2.internal.ServiceLocatorImpl.reifyDescriptor(ServiceLocatorImpl.java:395)
at org.jvnet.hk2.internal.ServiceLocatorImpl.reifyDescriptor(ServiceLocatorImpl.java:414)
at org.jvnet.hk2.internal.ServiceLocatorImpl.checkConfiguration(ServiceLocatorImpl.java:1463)
at org.jvnet.hk2.internal.ServiceLocatorImpl.addConfiguration(ServiceLocatorImpl.java:1818)
at org.jvnet.hk2.internal.DynamicConfigurationImpl.commit(DynamicConfigurationImpl.java:236)
at org.jvnet.hk2.osgiadapter.AbstractOSGiModulesRegistryImpl.parseInhabitants(AbstractOSGiModulesRegistryImpl.java:145)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.populateServiceLocator(AbstractModulesRegistryImpl.java:180)
... 12 more
Caused by: com.sun.enterprise.module.ResolveError: Failed to start OSGiModuleImpl:: Bundle = [org.glassfish.main.core.kernel [211]], State = [NEW]
at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:218)
at org.jvnet.hk2.osgiadapter.OsgiPopulatorPostProcessor$1.loadClass(OsgiPopulatorPostProcessor.java:77)
at org.jvnet.hk2.internal.ServiceLocatorImpl.loadClass(ServiceLocatorImpl.java:1932)
... 19 more
Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle org.glassfish.main.core.kernel [211]: Unable to resolve 211.0: missing requirement [211.0] osgi.wiring.package; (&(osgi.wiring.package=com.sun.enterprise.admin.event)(version>=4.0.0)(Unable to render embedded object: File ( Unable to resolve 146.0: missing requirement [146.0] osgi.wiring.package; (&(osgi.wiring.package=com.sun.enterprise.config.serverbeans)(version>=4.0.0)() not found.(version>=5.0.0))) [caused by: Unable to resolve 203.0: missing requirement [203.0] osgi.wiring.package; (&(osgi.wiring.package=org.glassfish.grizzly.config.dom)(version>=4.0.0)(!(version>=5.0.0)))]]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2037)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)
at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:210)
... 21 more

Command start-domain failed.

Thank you very much!

Comment by arie_golos [ 10/Jan/14 ]

I think oleksiys can help you with fixing 4.0.1. I am just a glassfish user.

Comment by Bilucciano [ 10/Jan/14 ]

I will use the patch and wait until oleksiys can help me then. Thank you for your help, saved my day!

Comment by oleksiys [ 14/Jan/14 ]

The issue is fixed as part of Grizzly 2.3.10 integration and will be available in the next nightly/promoted builds.
http://dlc.sun.com.edgesuite.net/glassfish/4.0.1/

Comment by oleksiys [ 28/Mar/14 ]

for the records, this issue corresponds to GRIZZLY-1615





[GLASSFISH-20904] updating the pom of experimental/glassfish-obr-builder into 4.0.1 Created: 19/Nov/13  Updated: 19/Sep/14  Resolved: 19/Nov/13

Status: Resolved
Project: glassfish
Component/s: OSGi-JavaEE
Affects Version/s: None
Fix Version/s: 4.1

Type: Improvement Priority: Trivial
Reporter: TangYong Assignee: TangYong
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Current pom of experimental/glassfish-obr-builder is as following:

<parent>
<groupId>org.glassfish.main</groupId>
<artifactId>glassfish-nucleus-parent</artifactId>
<version>4.0-SNAPSHOT</version>
</parent>

<artifactId>glassfish-obr-builder</artifactId>
<version>4.0-SNAPSHOT</version>

Needing to update the above into the following,

<parent>
<groupId>org.glassfish.main</groupId>
<artifactId>glassfish-nucleus-parent</artifactId>
<version>4.0.1-SNAPSHOT</version>
</parent>

<artifactId>glassfish-obr-builder</artifactId>
<version>4.0.1-SNAPSHOT</version>



 Comments   
Comment by TangYong [ 19/Nov/13 ]

Done

Revisions:
----------
62956





[GLASSFISH-20903] setting "org.jvnet.hk2.osgiadapter.level=FINER" in logging.properties caused GF domain starting failed Created: 19/Nov/13  Updated: 19/Sep/14

Status: Open
Project: glassfish
Component/s: hk2, logging
Affects Version/s: 4.0
Fix Version/s: 4.1

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


 Description   

Setting "org.jvnet.hk2.osgiadapter.level=FINER" in logging.properties caused GF domain starting failed.

This issue is a regression of 3.1.2.2.

[GF 4.0 scene]
Modifying glassfish4/glassfish\domains\domain1/config/logging.properties and setting the following,

org.jvnet.hk2.osgiadapter.level=FINER

Then, starting GF domain failed, and the following error happened on cmd shell,

Waiting for domain1 to start .............Error starting domain domain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:

...
Launching GlassFish on Felix platform
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime@1ead03b in service registry.
Registry Info:: Total repositories: 1, Total modules = 293
Attached repository: []
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.security.services [239]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.common.glassfish-mbeanserver [100]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.transaction.jta [191]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [javax.security.auth.message-api [145]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.jersey.containers.jersey-container-servlet-core [166]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.persistence.entitybean-container [76]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.resources.runtime [233]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-jca-plugin [54]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.registration.registration-api [230]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.connectors.admin [42]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.javax.json [140]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.metro.webservices-osgi [271]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.hk2.external.asm-all-repackaged [18]], State = [READY]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.orb.enabler [206]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.hk2.config [114]], State = [READY]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.fighterfish.osgi-javaee-base [289]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.web.javax.servlet.jsp.jstl [151]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admin.backup [19]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.persistence.common [222]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.persistence.gf-jpa-connector [85]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.transaction.jts [192]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [stax2-api [248]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.hk2.external.bean-validator [21]], State = [READY]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.dataprovider [63]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.corba.glassfish-corba-orb [96]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.persistence.cmp.enhancer [28]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.fighterfish.osgi-ejb-container [287]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [javax.batch-api [130]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.external.dbschema-repackaged [64]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.ha.shoal-cache-bootstrap [111]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-corba-plugin [51]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.apache.felix.fileinstall [280]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.web.gf-web-connector [88]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.deployment.deployment-client [67]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [com.google.guava [108]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.common.scattered-archive-api [236]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.hk2.api [113]], State = [READY]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.apache.felix.gogo.command [281]], State = [RESOLVED]]
Registered Module: [OSGiModuleImpl:: Bundle = [javax.enterprise.deploy-api [135]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [javax.resource-api [144]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-web-plugin [60]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.core.glassfish-extra-jre-packages [98]], State = [RESOLVED]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.tyrus.container-glassfish-cdi [252]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.jms.admin [181]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.tyrus.container-grizzly [253]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.eclipse.persistence.oracle [217]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.web.gf-weld-connector [89]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.registration.glassfish-registration [103]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.common.internal-api [120]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.gmbal.gmbal [105]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.connectors.internal-api [44]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.hk2.config-types [41]], State = [READY]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.jersey.ext.jersey-mvc [178]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.webservices.jsr109-impl [189]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.security.websecurity [268]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.security.ejb.security [75]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admin.util [8]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.web.jspcaching-connector [188]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.web.jsf-connector [185]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-community-branding-plugin [49]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.ha.ha-file-store [110]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [com.ibm.jbatch-ri-spi [35]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.jersey.core.jersey-server [179]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [javax.management.j2ee-api [142]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.core.glassfish [104]], State = [READY]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.concurrent.connector [38]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [javax.persistence [143]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.web.ha [265]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.hk2.external.cglib [22]], State = [READY]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.apache.felix.bundlerepository [208]], State = [RESOLVED]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.common.glassfish-ee-api [97]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.security.jaspic.provider.framework [126]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.persistence.jpa-container [184]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.registration.registration-impl [231]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [javax.transaction-api [152]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.web.javax.servlet.jsp [149]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.eclipse.persistence.jpa.modelgen [215]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.common.glassfish-api [90]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [jackson-core-asl [122]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.tyrus.websocket-core [258]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.web.naming [266]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.fighterfish.osgi-jpa [291]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.flashlight.flashlight-extra-jdk-packages [77]], State = [RESOLVED]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.javax.enterprise.concurrent [134]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admin.gf-restadmin-connector [87]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.common.glassfish-naming [101]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.jersey.media.jersey-media-json-jackson [170]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.persistence.cmp.model [31]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.security [240]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.jms.core [182]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-jts-plugin [57]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [woodstox-core-asl [276]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.osgi-platforms.osgi-cli-remote [219]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.ejb.ejb-container [72]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.metro.webservices-api-osgi [3]], State = [READY]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.web.weld-integration-fragment [273]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.eclipse.persistence.core [211]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.jersey.core.jersey-common [164]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.common.simple-glassfish-api [244]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.jdbc.config [160]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.external.j-interop-repackaged [121]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.shoal.cache [241]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.web.jstl-connector [190]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.core.kernel [193]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admin.core [7]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.fighterfish.osgi-web-container [293]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.fighterfish.osgi-cdi [285]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.jsonp-jaxrs [187]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.external.management-api [199]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.batch.glassfish-batch-commands [91]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.jersey.media.jersey-media-sse [175]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.jersey.ext.jersey-bean-validation [162]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-ejb-plugin [53]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-common-full-plugin [47]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-concurrent-plugin [50]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-common [48]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.tyrus.spi [257]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admin.config-api [40]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.security.ee [238]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.webservices.metro-glue [200]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.loadbalancer.load-balancer-admin [197]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [jackson-jaxrs [123]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.jms.gf-jms-injection [84]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.deployment.common [68]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [javax.jms-api [139]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.corba.glassfish-corba-csiv2-idl [93]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.pfl.pfl-dynamic [226]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.hk2.osgi-resource-locator [4]], State = [RESOLVED]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.eclipse.persistence.dbws [212]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.loadbalancer.gf-load-balancer-connector [86]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.jersey.containers.glassfish.jersey-gf-ejb [169]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.tyrus.container-servlet [254]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.web.cli [260]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.external.jmxremote_optional-repackaged [183]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.grizzly.glassfish-grizzly-extra-all [99]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.hk2.class-model [23]], State = [READY]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.pfl.pfl-tf-tools [227]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.deployment.javaee-full [70]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.jersey.media.jersey-media-multipart [174]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.security.webservices.security [272]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [javax.annotation-api [1]], State = [READY]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.resources.javamail-runtime [129]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.eclipse.persistence.moxy [216]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.hk2.osgi-adapter [218]], State = [RESOLVED]]
Registered Module: [OSGiModuleImpl:: Bundle = [javax.ws.rs-api [154]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [com.sun.pkg.client [229]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.web.sse [267]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admin.rest-client [234]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admin.cli [6]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [javax.servlet-api [147]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.web.glue [263]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.ejb.gf-ejb-connector [82]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.common.amx-core [9]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.common.amx-javaee [10]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-jms-plugin [56]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.web.gui-plugin-common [264]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-cluster-plugin [46]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.concurrent.impl [39]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.cluster.common [25]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.hk2.locator [115]], State = [READY]]
Registered Module: [OSGiModuleImpl:: Bundle = [com.ibm.jbatch-ri-runtime [36]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.osgi-platforms.osgi-container [220]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.jboss.weld.osgi-bundle [275]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.hk2.runlevel [116]], State = [READY]]
Registered Module: [OSGiModuleImpl:: Bundle = [com.sun.el.javax.el [132]], State = [RESOLVED]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.apache.felix.scr [284]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.corba.glassfish-corba-internal-api [94]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.external.ldapbp-repackaged [195]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.cluster.gms-adapter [106]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.connectors.runtime [45]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [javax.servlet.jsp.jstl-api [150]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.hk2.external.javax.inject [137]], State = [READY]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.fighterfish.osgi-jpa-extension [221]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.common.annotation-framework [11]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.external.trilead-ssh2-repackaged [250]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.external.ant [12]], State = [RESOLVED]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.jersey.core.jersey-client [163]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.deployment.javaee-core [69]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.jdbc.admin [159]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.orb.iiop [207]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.appclient.gf-client-module [80]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-ejb-lite-plugin [52]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.common.container-common [61]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-plugin-service [58]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [GlassFish-Application-Common-Module [14]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.orb.connector [205]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.jersey.containers.jersey-container-servlet [167]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.hk2.external.bean-validator-cdi [20]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.security.ssl-impl [246]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.fighterfish.osgi-http [288]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.grizzly.nucleus-grizzly-all [203]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [javax.ejb-api [131]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [javax.xml.registry-api [155]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.ha.shoal-cache-store [112]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.apache.felix.gogo.runtime [282]], State = [RESOLVED]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.cluster.admin [24]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.connectors.inbound-runtime [43]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.resources.connector [232]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.hk2.utils [117]], State = [READY]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.ejb.ejb-full-container [73]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.shoal.gms-api [242]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.hk2.core [62]], State = [READY]]
Registered Module: [OSGiModuleImpl:: Bundle = [javax.enterprise.concurrent-api [133]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.pfl.pfl-tf [228]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.resourcebase.resources.nucleus-resources [204]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.resources.javamail-connector [128]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.appclient.server.appclient-connector [15]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.appclient.server.appclient-server-core [16]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.appclient.acc-config [5]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [javax.interceptor-api [138]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.core.javaee-kernel [127]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.common.stats77 [247]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-updatecenter-plugin [59]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.pfl.pfl-basic-tools [224]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [javax.websocket-api [153]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.hk2.hk2 [118]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.common.util [37]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.shoal.gms-impl [243]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.fighterfish.osgi-jdbc [290]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.tyrus.core [255]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.pfl.pfl-basic [225]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.tyrus.server [256]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.security.appclient.security [17]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.cluster.ssh [26]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [javax.xml.rpc-api [156]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admin.rest-service [235]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.external.antlr-repackaged [13]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.connectors.work-management [277]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.jvnet.mimepull [201]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.batch.glassfish-batch-connector [92]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.jdbc.runtime [161]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admin.monitoring-core [202]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.fighterfish.osgi-ee-resources [286]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.external.schema2beans-repackaged [237]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.jersey.media.jersey-media-moxy [173]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.cluster.gms-bootstrap [107]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [com.sun.mail.javax.mail [141]], State = [RESOLVED]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.persistence.cmp.generator-database [29]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.webservices.soap-tcp [245]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [com.sun.jsftemplating [186]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.persistence.cmp.internal-api [30]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.apache.felix.eventadmin [279]], State = [RESOLVED]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.web.embed-api [262]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.transaction.internal-api [249]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.tyrus.client [251]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.eclipse.persistence.jpa [213]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.persistence.glassfish-oracle-jdbc-driver-packages [102]], State = [RESOLVED]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.persistence.cmp.support-ejb [32]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.jersey.media.jersey-media-json-jettison [171]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [jaxb-api [2]], State = [READY]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.core.logging [198]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.webservices.connector [269]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.jersey.ext.jersey-mvc-jsp [177]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.metro.webservices-extra-jdk-packages [270]], State = [RESOLVED]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.web.war-util [259]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.web.jersey-mvc-connector [176]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.apache.felix.gogo.shell [283]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.security.inmemory.jacc.provider [119]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.ha.ha-api [109]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.jersey.media.jersey-media-json-processing [172]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.fighterfish.osgi-jta [292]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.web.core [261]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.external.libpam4j-repackaged [196]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.apache.felix.configadmin [278]], State = [RESOLVED]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.persistence.cmp.support-sqlstore [33]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [jackson-mapper-asl [124]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.deployment.dol [71]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.persistence.cmp.ejb-mapping [27]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-jdbc-plugin [55]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [com.sun.xml.bind [158]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admin.launcher [194]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.flashlight.framework [78]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.pfl.pfl-asm [223]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.javax.faces [136]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [javax.security.jacc-api [146]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.eclipse.persistence.asm [210]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.jersey.containers.glassfish.jersey-gf-cdi [168]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.jms.gf-jms-connector [83]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.corba.glassfish-corba-omgapi [95]], State = [RESOLVED]]
Registered Module: [OSGiModuleImpl:: Bundle = [jackson-xc [125]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.eclipse.persistence.antlr [209]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.ejb.internal-api [74]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.codehaus.jettison.jettison [180]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [com.sun.xml.bind.extra [157]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.deployment.autodeploy [66]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.persistence.cmp.utility [34]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.connector.gf-admingui-connector [79]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.jersey.containers.jersey-container-grizzly2-http [165]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.connectors.gf-connectors-connector [81]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [javax.servlet.jsp-api [148]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.web.weld-integration [274]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.glassfish.main.deployment.admin [65]], State = [NEW]]
Registered Module: [OSGiModuleImpl:: Bundle = [org.eclipse.persistence.jpa.jpql [214]], State = [NEW]]

Found populator: com.sun.enterprise.v3.server.GFDomainXml

#!## LogManagerService.postConstruct : rootFolder=E:\NanjingJUG\qcon_fighterfish\glassfish-4.0\glassfish4\glassfish
#!## LogManagerService.postConstruct : templateDir=E:\NanjingJUG\qcon_fighterfish\glassfish-4.0\glassfish4\glassfish\lib\templates
#!## LogManagerService.postConstruct : src=E:\NanjingJUG\qcon_fighterfish\glassfish-4.0\glassfish4\glassfish\lib\templates\logging.properties
#!## LogManagerService.postConstruct : dest=E:\NanjingJUG\qcon_fighterfish\glassfish-4.0\glassfish4\glassfish\domains\domain1\config\logging.properties
Completed shutdown of GlassFish runtime
We are in non-embedded mode, so org.glassfish.main.core.glassfish [104] has nothing to do.
Nov 19, 2013 3:45:22 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner createBundleProvisioner
情報: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.
Nov 19, 2013 3:45:22 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry because it is not an absolute URI.
Nov 19, 2013 3:45:22 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry because it is not an absolute URI.
Nov 19, 2013 3:45:31 PM OSGiModuleImpl start
FINER: Ignoring start of bundle org.glassfish.main.admin.config-api [40] as it is in ACTIVE state
Nov 19, 2013 3:45:31 PM OSGiModuleImpl start
FINER: Ignoring start of bundle org.glassfish.main.admin.config-api [40] as it is in ACTIVE state
Nov 19, 2013 3:45:31 PM OSGiModuleImpl start
FINER: Ignoring start of bundle org.glassfish.main.admin.config-api [40] as it is in ACTIVE state
Exception in thread "main" java.lang.reflect.InvocationTargetException
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:601)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
Caused by: java.lang.NoClassDefFoundError: java/util/LinkedList
at org.glassfish.hk2.api.MultiException.<init>(MultiException.java:62)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneJob.fail(CurrentTaskFuture.java:496)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneJob.access$2000(CurrentTaskFuture.java:430)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:677)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:660)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneJob.run(CurrentTaskFuture.java:490)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpAllTheWay.go(CurrentTaskFuture.java:362)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpAllTheWay.access$100(CurrentTaskFuture.java:279)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture.go(CurrentTaskFuture.java:113)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.proceedTo(AsyncRunLevelContext.java:296)
at org.glassfish.hk2.runlevel.internal.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:66)
at com.sun.enterprise.v3.server.AppServerStartup.proceedTo(AppServerStartup.java:532)
at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:313)
at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:226)
at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:217)
at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
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)
... 6 more

Command start-domain failed.

[GF 4.0.1 scene]
Here, I used glassfish-4.0.1-b04-11_16_2013 nightly building version. while starting GF domain, cmd shell always display

"Waiting for domain1 to start ................................................................................................"

Then, after a long time, the following is displayed and in server.log, no any valuable info.

>asadmin start-domain
Waiting for domain1 to start ............................................................................................................................................................................................................................................................................................................................................................................
serverNoStart
Command start-domain failed.

However, this issue can not happen in GF 3.1.2.2.

From 4.0 scene, I felt that this seems to be related to HK2 layer. So, firstly requesting HK2 team to investigate it.






[GLASSFISH-20902] Needing to update ${hk2.bundles} of osgi.properties to remove cglib.jar while entering 4.0.1 age Created: 17/Nov/13  Updated: 19/Sep/14

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

Type: Bug Priority: Minor
Reporter: TangYong Assignee: Sanjeeb Sahoo
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

In http://dlc.sun.com.edgesuite.net/glassfish/4.0.1/nightly/, cglib.jar has been removed from modules, So, we must update osgi.properties to remove the following line:

$

{com.sun.aas.installRootURI}

modules/cglib.jar \






[GLASSFISH-20894] Fix the deployment devtests to make sure all of the tests can be passed as EE mode Created: 13/Nov/13  Updated: 19/Sep/14  Resolved: 19/Dec/13

Status: Resolved
Project: glassfish
Component/s: deployment, test
Affects Version/s: 4.0_b89_RC5
Fix Version/s: 4.1

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

All



 Description   

Nowadays, It is failed when running the deployment devtests, we need to fix the tests so that all of the devtests related to the deployment can be passed both in PE and EE mode.



 Comments   
Comment by Jeremy_Lv [ 19/Dec/13 ]

checked in the changes as r63037, reviewed by Hong.





[GLASSFISH-20888] when excute list-jndi-entries command,java.lang.NullPointerException is happenning Created: 08/Nov/13  Updated: 19/Sep/14  Resolved: 20/Mar/14

Status: Closed
Project: glassfish
Component/s: admin
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: lzg5039 Assignee: Chris Kasso
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

window32



 Description   

after execute the following command
1.asadmin start-domain
2.asadmin list-jndi-entries --context ejb/mgmt/MEJB
the following exception will be printted at the server.log of DAS
java.lang.NullPointerException
at org.glassfish.enterprise.iiop.impl.IiopFolbGmsClient.getAllClusterInstanceInfo(IiopFolbGmsClient.java:443)
at org.glassfish.enterprise.iiop.impl.IiopFolbGmsClient.<init>(IiopFolbGmsClient.java:152)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.setFOLBProperties(GlassFishORBManager.java:423)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:459)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.getORB(GlassFishORBManager.java:264)
at org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl.createORB(GlassFishORBFactoryImpl.java:93)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:163)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getProtocolManager(GlassFishORBHelper.java:231)
at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:830)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:590)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:143)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:137)
at com.sun.ejb.containers.StatelessContainerFactory.createContainer(StatelessContainerFactory.java:61)
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.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.kernel.javaee.MEJBNamingObjectProxy.deployMEJB(MEJBNamingObjectProxy.java:129)
at org.glassfish.kernel.javaee.MEJBNamingObjectProxy.create(MEJBNamingObjectProxy.java:96)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:480)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at com.sun.enterprise.naming.impl.SerialContext.list(SerialContext.java:786)
at javax.naming.InitialContext.list(InitialContext.java:455)
at javax.naming.InitialContext.list(InitialContext.java:455)
at com.sun.enterprise.admin.monitor.jndi.JndiNameLookupHelper.getJndiEntriesByContextPath(JndiNameLookupHelper.java:95)
at org.glassfish.admin.monitor.cli.ListJndiEntries.getNames(ListJndiEntries.java:134)
at org.glassfish.admin.monitor.cli.ListJndiEntries.execute(ListJndiEntries.java:96)
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:356)
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:356)
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.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:601)
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:140)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:158)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:101)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:353)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:343)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:237)
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:318)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:211)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:982)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:330)
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:496)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:175)
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:187)
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.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: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.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: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:837)
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:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:722)



 Comments   
Comment by Terry2013 [ 14/Mar/14 ]

Hi,Chris Kasso

After a few investigation about the source, I found the reason why NullPointerException happens.

org.glassfish.enterprise.iiop.impl.IiopFolbGmsClient
    private Map<String,ClusterInstanceInfo> getAllClusterInstanceInfo() {
        final Cluster myCluster = myServer.getCluster() ;★1
        fineLog( "getAllClusterInstanceInfo: myCluster {0}", myCluster ) ;

        final Config myConfig = getConfigForServer( myServer ) ;
        fineLog( "getAllClusterInstanceInfo: myConfig {0}", myConfig ) ;

        final Map<String,ClusterInstanceInfo> result =
            new HashMap<String,ClusterInstanceInfo>() ;

        for (Server server : myCluster.getInstances()) { ★2
            ClusterInstanceInfo cii = getClusterInstanceInfo( server, myConfig,
                false) ;
            if (cii != null) {
                result.put( server.getName(), cii ) ;
            }
        }

        fineLog( "getAllClusterInstanceInfo: result {0}", result ) ;
        return result ;
    }

★1.When myServer is DAS, myServer.getCluster() method return null.
★2.But when myCluster.getInstances() method is invoked , this method does not check whether myCluster is null.

Comment by Terry2013 [ 17/Mar/14 ]

Hi Chris,

I modify the following code, it works fine,could you please confirm it?
If the modification is OK, I will commit it.

org.glassfish.enterprise.iiop.impl.IiopFolbGmsClient
--- IiopFolbGmsClient.java	(revision 63160)
+++ IiopFolbGmsClient.java	(working copy)
@@ -440,11 +440,15 @@
         final Map<String,ClusterInstanceInfo> result =
             new HashMap<String,ClusterInstanceInfo>() ;
 
-        for (Server server : myCluster.getInstances()) {
-            ClusterInstanceInfo cii = getClusterInstanceInfo( server, myConfig,
-                false) ;
-            if (cii != null) {
-                result.put( server.getName(), cii ) ;
+        //When myServer is DAS's situation, myCluster is null.
+        //null check is needed.
+        if (myCluster != null) {
+            for (Server server : myCluster.getInstances()) {
+                ClusterInstanceInfo cii = getClusterInstanceInfo(server,
+                        myConfig, false);
+                if (cii != null) {
+                    result.put(server.getName(), cii);
+                }
             }
         }
 

Thank you.

Comment by Chris Kasso [ 19/Mar/14 ]

The fix looks fine to me.

Comment by Terry2013 [ 20/Mar/14 ]

the issue has been fixed in r63167.





[GLASSFISH-20887] Empty Cookie Header causes an exception and a 200 ok response Created: 07/Nov/13  Updated: 03/Feb/15  Resolved: 11/Nov/13

Status: Resolved
Project: glassfish
Component/s: grizzly-kernel
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: suparngp Assignee: oleksiys
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OS 10.9 Mavericks, Spring MVC


Tags: cookie, empty, exception, header, parsing, rest, spring

 Description   

I am facing a strange issue with the Glass Fish Community Edition. I am working on a RESTful backend using Spring MVC. The front end clients are either browsers or API clients like Resty or super agent (node.js).

All the requests from the browsers are served fine. However, in case of a SuperAgent client, glass fish throws this exception:

java.lang.IllegalArgumentException
at org.glassfish.grizzly.http.util.CookieParserUtils.parseClientCookies(CookieParserUtils.java:353)
at org.glassfish.grizzly.http.util.CookieParserUtils.parseClientCookies(CookieParserUtils.java:336)
at org.glassfish.grizzly.http.Cookies.processClientCookies(Cookies.java:220)
at org.glassfish.grizzly.http.Cookies.get(Cookies.java:131)
at org.glassfish.grizzly.http.server.Request.parseCookies(Request.java:1911)
at org.glassfish.grizzly.http.server.Request.getCookies(Request.java:1505)
at org.apache.catalina.connector.Request.parseSessionCookiesId(Request.java:4077)
at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:649)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:297)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
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:744)

After digging into this, I found out that this error is caused when a Cookie Header is being send from the client with an empty String, Like Cookie: ''. The worst part is After this exception is thrown, the request is not further processed (as expected) and a response is sent back from Glassfish with a status code of 200 OK. This is weird because any one can send a header with empty values and server shouldn't crash due to this. Secondly, if an exception is thrown, at least the status code should be like 400 Bad Request.

I was able to fix this problem temporarily by sending a dummy cookie header like Cookie: 'cook=ie'. Everything works fine in version 3 of Glass Fish.



 Comments   
Comment by oleksiys [ 11/Nov/13 ]

it's been fixed in trunk.

You can use this jar
https://dl.dropboxusercontent.com/u/7319744/nucleus-grizzly-all.jar

to patch Glassfish 4.0

Comment by suparngp [ 12/Nov/13 ]

Thanks. I just used the above jar and patched it. The problem is resolved.

Comment by armnotstrong [ 09/Aug/14 ]

hi @oleksiys,@suparngp
I currently run in to this problem too.
I download the nucleus-grizzly-all.jar(md5sum b7fc92c73d5360f7a83d318170c4eea0) given by oleksiys, replace with it in glassfish-4.0/glassfish/modules/nucleus-grizzly-all.jar, but the problem still there.

what went wrong?

Comment by oleksiys [ 25/Sep/14 ]

try to clean up the osgi cache
glassfish/domains/domain1/osgi-cache

Comment by cmundt [ 30/Jan/15 ]

I am not able to download the jar listed above. Is there away to resolve this in GF 4.0?

Comment by oleksiys [ 31/Jan/15 ]

The link still works for me.
Try this patch (2 files):
https://dl.dropboxusercontent.com/u/7319744/glassfish-4.0/nucleus-grizzly-all.jar
https://dl.dropboxusercontent.com/u/7319744/glassfish-4.0/glassfish-grizzly-extra-all.jar

Comment by cmundt [ 02/Feb/15 ]

I downloaded both of these and swapped out versions in my GF 4.0 build 89.
I also cleaned up the osgi-cache under both my Domain and Instance but I am still get the same Cookie Parse error.

Comment by oleksiys [ 03/Feb/15 ]

you're right, the patch doesn't have the fix.
working on it.

correspondent Grizzly issue https://java.net/jira/browse/GRIZZLY-1530

Comment by cmundt [ 03/Feb/15 ]

@oleksisy Thanks for the update.

Comment by oleksiys [ 03/Feb/15 ]

pls. try to download same 2 files again.

Comment by cmundt [ 03/Feb/15 ]

Downloaded and tested. Appears to be working. I am awaiting developer confirmation that they are good to go.

Thanks for the quick help.





[GLASSFISH-20881] java.lang.NullPointerException at com.sun.enterprise.deployment.util.DOLUtils.isRAConnectionFactory(DOLUtils.java:235) Created: 31/Oct/13  Updated: 10/Dec/14  Resolved: 01/Nov/13

Status: Resolved
Project: glassfish
Component/s: deployment
Affects Version/s: 3.1.2, 4.0
Fix Version/s: 4.1

Type: Bug Priority: Blocker
Reporter: Jeremy_Lv Assignee: Hong Zhang
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

All



 Description   

Here's the whole stacktrace about the NPE:

[2013-10-31T11:14:46.471+0800] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=72 _ThreadName=admin-listener(2)] [timeMillis: 1383189286471] [levelValue: 1000] [[
  Exception while deploying the app [jcaWeb3] : null. Related annotation information: annotation [@javax.annotation.Resource(shareable=true, mappedName=, description=, name=eis/connectionFactory3, type=class java.lang.Object, authenticationType=CONTAINER, lookup=)] on annotated element [private com.sun.work.ksk.ConnectionFactory Sample.cf] of type [FIELD]
null. Related annotation information: annotation [@javax.annotation.Resource(shareable=true, mappedName=, description=, name=eis/connectionFactory3, type=class java.lang.Object, authenticationType=CONTAINER, lookup=)] on annotated element [private com.sun.work.ksk.ConnectionFactory Sample.cf] of type [FIELD]
	at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:367)
	at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:375)
	at org.glassfish.apf.impl.AnnotationProcessorImpl.processAnnotations(AnnotationProcessorImpl.java:289)
	at org.glassfish.apf.impl.AnnotationProcessorImpl.processAnnotations(AnnotationProcessorImpl.java:271)
	at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:199)
	at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:134)
	at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:626)
	at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:462)
	at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:446)
	at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:419)
	at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:396)
	at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271)
	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.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:161)
	at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:203)
	at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:227)
	at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:96)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:881)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:821)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:377)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
	at org.glassfish.deployment.admin.InstanceDeployCommand.execute(InstanceDeployCommand.java:213)
	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:356)
	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:356)
	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.execCommandMultInMultOut(CommandResource.java:256)
	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:601)
	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:140)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:158)
	at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:101)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:353)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:343)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
	at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:237)
	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:318)
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:211)
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:982)
	at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:330)
	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:496)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:175)
	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:187)
	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.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: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.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: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:837)
	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:565)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
	at com.sun.enterprise.deployment.util.DOLUtils.isRAConnectionFactory(DOLUtils.java:235)
	at com.sun.enterprise.deployment.annotation.handlers.ResourceHandler.getDescriptors(ResourceHandler.java:313)
	at com.sun.enterprise.deployment.annotation.handlers.ResourceHandler.processResource(ResourceHandler.java:227)
	at com.sun.enterprise.deployment.annotation.handlers.ResourceHandler.processAnnotation(ResourceHandler.java:146)
	at com.sun.enterprise.deployment.annotation.handlers.AbstractResourceHandler.processAnnotation(AbstractResourceHandler.java:142)
	at com.sun.enterprise.deployment.annotation.factory.SJSASFactory$LazyAnnotationHandler.processAnnotation(SJSASFactory.java:148)
	at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:344)
	... 95 more
]]


 Comments   
Comment by Jeremy_Lv [ 31/Oct/13 ]

Hi, Hong:

Here's the related code:

DOLUtils.java
    public static boolean isRAConnectionFactory(ServiceLocator habitat, 
        String type, Application thisApp) {
        // first check if this is a connection factory defined in a resource
        // adapter in this application
        if (isRAConnectionFactory(type, thisApp)) {
            return true;
        }

        // then check if this is a connection factory defined in a standalone 
        // resource adapter
        Applications applications = habitat.getService(Applications.class);
        if (applications != null) {
            List<com.sun.enterprise.config.serverbeans.Application> raApps = applications.getApplicationsWithSnifferType(com.sun.enterprise.config.serverbeans.ServerTags.CONNECTOR, true);
            ApplicationRegistry appRegistry = habitat.getService(ApplicationRegistry.class);
            for (com.sun.enterprise.config.serverbeans.Application raApp : raApps) {
                ApplicationInfo appInfo = appRegistry.get(raApp.getName());
                if (isRAConnectionFactory(type, appInfo.getMetaData(Application.class))) {   
                    return true;
                }   
            }
        }
        return false; 
    }

After debugging the code, the appInfo will return the null when the value of raApp.getName() doesn't exist in the appRegistry. This situation cab be true because the raApps can collect all of the application deployed to the server, instance and cluster. However, the appRegistry will just get the attributes only deployed to the related instance or cluster, so the appInfo will return null when executing "ApplicationInfo appInfo = appRegistry.get(raApp.getName());"

So we need a null check here to avoid the NPE, Here's my patch to fix this particular issue:

DOLUtils.java
Index: DOLUtils.java
===================================================================
--- DOLUtils.java	(revision 62812)
+++ DOLUtils.java	(working copy)
@@ -232,6 +232,8 @@
             ApplicationRegistry appRegistry = habitat.getService(ApplicationRegistry.class);
             for (com.sun.enterprise.config.serverbeans.Application raApp : raApps) {
                 ApplicationInfo appInfo = appRegistry.get(raApp.getName());
+                if (appInfo == null)
+                    continue;
                 if (isRAConnectionFactory(type, appInfo.getMetaData(Application.class))) {   
                     return true;
                 }   

Please review my changes whether it is fine for me to check in?

Comment by Hong Zhang [ 31/Oct/13 ]

Yeah changes look fine. Please go ahead and check in after running the usual tests.

Comment by Jeremy_Lv [ 01/Nov/13 ]

have checked in the changes as revision 62935.

Comment by ceyhun [ 10/Dec/14 ]

How can i use this DOLUtils class for starting glassfish on eclipse?





[GLASSFISH-20847] Principal propagation not working when calling EJB from remote client Created: 08/Oct/13  Updated: 19/Sep/14  Resolved: 20/May/14

Status: Closed
Project: glassfish
Component/s: security
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Minor
Reporter: rtaugerbeck Assignee: Nithya Ramakrishnan
Resolution: Works as designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: ejb, secuirty

 Description   

I am not sure whether this is a bug or some kind of misconfiguration.

Let's assume the following scenario:

Two session beans with a simple method that returns the name of the current caller principal, whereas one of the methods is secured and the other one is not.

public class UnsecuredBean implements Unsecured {
@Resource
private SessionContext ctx;

public String getCaller()

{ return ctx.getCallerPrincipal() != null ? ctx.getCallerPrincipal().getName() : null; }

}

public class SecuredBean implements Secured {
@Resource
private SessionContext ctx;

@RolesAllowed("AuthenticatedUser")
public String getCaller()

{ return ctx.getCallerPrincipal() != null ? ctx.getCallerPrincipal().getName() : null; }

}

When the two beans are called after a programmatic login from within the container, e.g. from a Servlet or JSP, the authenticated principal is correctly propagated across the calls.

ProgrammaticLogin plogin = new ProgrammaticLogin();
plogin.login(...);

Secured secured = (Secured) ctx.lookup("Secured");
System.out.println(secured.getCaller());

Unsecured unsecured = (Unsecured) ctx.lookup("Unsecured");
System.out.println(unsecured.getCaller());

The result would be something like:

john
john

When the same code is executed from a remote client the principal is not propagated and the result is something like:

john
ANONYMOUS

Could you please fix this inconsistent behavior. I already tried to adjust the security configuration of the EJBs using the <ior-security-config> tag in glassfish-ejb-jar.xml, but without success.



 Comments   
Comment by Nithya Ramakrishnan [ 05/Mar/14 ]

Can you please clarify the following in your use case?

1. If both the Secured and Unsecured beans are called from a servlet with the identity propogated from the container, the caller principal is returned as "john" in both cases , even in case of the Unsecured Bean ?

2. While using ProgramaticLogin from a standalone java client from a remote JVM, the caller principal names are returned as "john" in case of the Secured bean and "ANONYMOUS" in case of the Unsecured Bean ?

Comment by Nithya Ramakrishnan [ 05/Mar/14 ]

If the above scenario is the usecase, then a possible explanation of the behaviour is as follows:

When using ProgrammaticLogin(), upon successful authentication, the container's SecurityContext is set with the principal provided.

So in case 1 when ProgrammaticLogin was performed from a web container , the principal was propogated to the EJB in question, as per the EJB 3.1 spec : (Sec 15.8.2.3), even though the Unsecured bean did not have any security annotations. Since the EJBs are not configured to use RunAs identities, the caller identity from the servlet/jsp is propagated . So the principal name is returned from both the Secured and Unsecured beans

If the client Web/EJB component is configured to use caller identity, and the caller C authenticated itself to S1, then the identity token contains the initiating client C’s identity.

In Case 2, when ProgrammaticLogin is performed from a remote non Java EE client, the ejb spec does not mandate propogation of the principal to the EJB . However if the EJB is marked with any of the security annotations, then principal name used in ProgrammaticLogin is picked up by the ejb container from the underlying csiv2 info.

Comment by Nithya Ramakrishnan [ 06/Mar/14 ]

Downgrading the issue, since the usage of ProgrammaticLogin is discouraged , and the usecase is specific to it

Comment by Nithya Ramakrishnan [ 06/Mar/14 ]

Since the call from a remote client using ProgrammaticLogin sees an ior-security-config that does not indicate client authentication, the username/password are not passed to the container.

Requesting the user to try an <ior-security-config> with <as-context> specifying USERNAME-PASSWORD for the Unsecured Ejb to make sure the caller principal is sent from ProgrammaticLogin to the ejb container

Comment by rtaugerbeck [ 06/Mar/14 ]

For clarification. I am working on a web application product/framework with quite a number of EJBs. We use (remote) JUnit tests for nightly regression tests of our service level APIs.
Some beans could be secured using constraints but the majority of beans can be accessed either by guests or registered users. At least, it is not always possible to decide at design time which constraints need to be applied.
In case of registered users it is desirable to know the current principal inside a bean implementation (e.g. for logging), no matter whether a bean is secured or not. IMHO RunAs identities do not help in this use case.
As mentioned in the description above principal propagation works fine when called from a ServletContext. When called from a remote client, like a JUnit test case, the behavior is different.
The issue is not critical as our primary scenario (web app) works well, but it is unsatisfactory to have an inconsistent behavior when running automated tests. In particular when the tests work well for all major app servers (Weblogic, WebSphere, JBoss) with the sole exception of Glassfish.

Comment by Nithya Ramakrishnan [ 06/Mar/14 ]

Thanks for clarifying.
Could you pls try a @PermitAll annotation on those beans that need to be accessed by guests . If that is not allowed, can you pls try the ior-security-config mentioned above ?

Comment by rtaugerbeck [ 05/May/14 ]

The @PermitAll annotation has no effect. When called from a remote client (after programmatic login) a call to SecuredBean#getCaller() still returns the user name whereas UnsecuredBean#getCaller() returns ANONYMOUS.
When I try to use a glassfish-ejb-jar.xml deployment descriptor with <auth-method>USERNAME_PASSWORD</auth-method> the behavior of UnsecuredBean#getCaller() is unchanged. Calling SecuredBean then results in a "Client not authorized for this invocation" exception, but that is obviously a different configuration problem and is not related to my original problem.

Comment by rtaugerbeck [ 05/May/14 ]

Content of the login.conf file for the application client:

default

{ com.sun.enterprise.security.auth.login.ClientPasswordLoginModule required debug=true; }

;

Comment by rtaugerbeck [ 05/May/14 ]

Content of glassfish-ejb-jar.xml deployment descriptor:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-ejb-jar PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 EJB 3.1//EN" "http://glassfish.org/dtds/glassfish-ejb-jar_3_1-1.dtd">
<glassfish-ejb-jar>
<enterprise-beans>
<ejb>
<ejb-name>SecuredBean</ejb-name>
<jndi-name>myproject.Secured</jndi-name>
<ior-security-config>
<transport-config>
<establish-trust-in-target>SUPPORTED</establish-trust-in-target>
<establish-trust-in-client>NONE</establish-trust-in-client>
</transport-config>
<as-context>
<auth-method>USERNAME_PASSWORD</auth-method>
</as-context>
<sas-context>
<caller-propagation>supported</caller-propagation>
</sas-context>
</ior-security-config>
</ejb>
<ejb>
<ejb-name>UnsecuredBean</ejb-name>
<jndi-name>myproject.Unsecured</jndi-name>
<ior-security-config>
<transport-config>
<establish-trust-in-target>SUPPORTED</establish-trust-in-target>
<establish-trust-in-client>NONE</establish-trust-in-client>
</transport-config>
<as-context>
<auth-method>USERNAME_PASSWORD</auth-method>
</as-context>
<sas-context>
<caller-propagation>supported</caller-propagation>
</sas-context>
</ior-security-config>
</ejb>
</enterprise-beans>
</glassfish-ejb-jar>

Comment by Nithya Ramakrishnan [ 12/May/14 ]

"When I try to use a glassfish-ejb-jar.xml deployment descriptor with <auth-method>USERNAME_PASSWORD</auth-method> the behavior of UnsecuredBean#getCaller() is unchanged.

Calling SecuredBean then results in a "Client not authorized for this invocation" exception, but that is obviously a different configuration problem and is not related to my original problem."

The exception happens because you have specified both USERNAME_PASSWORD in the auth-method and caller propogation as supported in the ior-config for the SecuredBean. Glassfish does not support alternative security mechanisms at this stage - both caller propogation and client authentication for eg.

When specifying the USERNAME_PASSWORD for the Unsecured bean, could you pls try with the required flag in as-context ? Caller authentication, can only be expected to occur, if it is "required" by the ejb.

Comment by Nithya Ramakrishnan [ 20/May/14 ]

Closing the issue as it is a configuration problem.
There is no way to make the glassfish appclient container / POJO client invoke the unsecured ejb using a non-anoymous caller principal.





[GLASSFISH-20828] HttpSessionBindingListener.valueUnbound() is always called right after valueBound() with a null HttpSessionBindingEvent.getValue() Created: 27/Sep/13  Updated: 19/Sep/14  Resolved: 18/Apr/14

Status: Resolved
Project: glassfish
Component/s: web_services
Affects Version/s: V3, 3.1.1, 3.1.2, 3.1.2.2
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: pbors Assignee: Lukas Jungmann
Resolution: Invalid Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Expected Behavior

Client code that register itself as a HttpSessionBindingListener insider GlassFish v3.1.2.2 and v4 should not be signaled via valueUnbound() unless the object is really being unbound from a session.

Actual Outcome

Whenever I register a HttpSessionBindingListener insider GlassFish v3.1.2.2 and v4 the valueUnbound() method is called with HttpSessionBindingEvent.getValue() null immediately after valueBound() when I register an object.

Steps to Reproduce

  1. Create your own filter and implementation of HttpSessionBindingListener
  2. Register an object and notice the sequence of callback as valueBound() with a valid HttpSessionBindingEvent.getValue() fallowed by valueUnbound() with a null HttpSessionBindingEvent.getValue()

Conform the JavaDoc on HttpSessionBindingListener the valueUnbound() method:

Notifies the object that it is being unbound from a session and identifies the session.

Thus it would be wrong to have it called immediately after valueBound().



 Comments   
Comment by pbors [ 27/Sep/13 ]

Related to GLASSFISH-4373

Comment by pbors [ 27/Sep/13 ]

Not a GlassFish bug, sorry for the wrong heads up.

For more details see this mailing list post.

Comment by Lukas Jungmann [ 18/Apr/14 ]

per last comment





[GLASSFISH-20824] NPE occured when delete ssh node Created: 25/Sep/13  Updated: 19/Sep/14

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

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

ubuntu



 Description   

I think this NPE will be thrown to the server.log by accident, Here's the stacktrace:

[2013-09-25T17:57:46.242+0800] [glassfish 4.0] [SEVERE] [] [] [tid: 
_ThreadID=218 _ThreadName=admin-listener(11)] [timeMillis: 
1380103066242] [levelValue: 1000] [[
   Error in dealiasing the password
${ALIAS=pswdalias-a8e4b8de291dcf51cffeec980ab48992d}: Alias pswdalias-a8e4b8de291dcf51cffeec980ab48992d does not exist]]

[2013-09-25T17:57:46.246+0800] [glassfish 4.0] [SEVERE] [NCLS-CORE-00003] [javax.enterprise.system.core] [tid: _ThreadID=218 _ThreadName=admin-listener(11)] [timeMillis: 1380103066246] [levelValue: 
1000] [[
   Exception while running a command
java.lang.NullPointerException
     at
org.glassfish.cluster.ssh.launcher.SSHLauncher.expandPasswordAlias(SSHLauncher.java:681)
     at
com.sun.enterprise.v3.admin.cluster.DeleteNodeSshCommand.getPasswords(DeleteNodeSshCommand.java:86)
     at
com.sun.enterprise.v3.admin.cluster.DeleteNodeRemoteCommand.execCommand(DeleteNodeRemoteCommand.java:225)
     at
com.sun.enterprise.v3.admin.cluster.DeleteNodeRemoteCommand.uninstallNode(DeleteNodeRemoteCommand.java:183)
     at
com.sun.enterprise.v3.admin.cluster.DeleteNodeRemoteCommand.executeInternal(DeleteNodeRemoteCommand.java:148)
     at
com.sun.enterprise.v3.admin.cluster.DeleteNodeSshCommand.execute(DeleteNodeSshCommand.java:76)
     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:356)
     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:356)
     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.utils.ResourceUtil.runCommand(ResourceUtil.java:253)
     at
org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:231)
     at
org.glassfish.admin.rest.resources.TemplateExecCommand.executeCommandLegacyFormat(TemplateExecCommand.java:157)
     at
org.glassfish.admin.rest.resources.TemplateCommandDeleteResource.processDeleteLegacyFormat(TemplateCommandDeleteResource.java:92)
     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:601)
     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:140)
     at
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:158)
     at
org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
     at
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:101)
     at
org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:353)
     at
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:343)
     at
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
     at
org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:237)
     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:318)
     at
org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:211)
     at
org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:982)
     at
org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:330)
     at
org.glassfish.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:316)
     at
org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
     at
com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:496)
     at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:175)
     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:187)
     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:837)
     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:565)
     at
org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
     at java.lang.Thread.run(Thread.java:722)
]]






[GLASSFISH-20812] java.lang.IllegalArgumentException when configurate the connector security map Created: 16/Sep/13  Updated: 19/Sep/14

Status: Open
Project: glassfish
Component/s: admin_gui
Affects Version/s: 4.0_b89_RC5
Fix Version/s: 4.1

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

All


Tags: 40-regression, 4_0_1-reviewed

 Description   

Here's the reproduced steps:
1). Login the admin console
2). try to access the Connector Connection pool page
3). Access the default Connector Connection pool called jms/__defaultConnectionFactory-Connection-Pool
4). Click the "Security Map" tap and create a new security map
5). Try to configurate the setting property in the security tap and save it.
6). java.lang.IllegalArgumentException will be thrown out to server.log and the property can't be saved!

Here's the stacktrace:

[2013-09-16T17:37:30.928+0800] [glassfish 4.0] [SEVERE] [NCLS-CORE-00003] [javax.enterprise.system.core] [tid: _ThreadID=201 _ThreadName=admin-listener(13)] [timeMillis: 1379324250928] [levelValue: 1000] [[
  Exception while running a command
MultiException stack 1 of 1
java.lang.IllegalArgumentException:  Invalid option: userGroupCommaStr
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.validateParameters(CommandRunnerImpl.java:1026)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1192)
	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.utils.ResourceUtil.runCommand(ResourceUtil.java:253)
	at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:231)
	at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:275)
	at org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:133)
	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:601)
	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:140)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:158)
	at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:101)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:353)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:343)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
	at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:237)
	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:318)
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:211)
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:982)
	at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:330)
	at org.glassfish.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:316)
	at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
	at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:496)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:175)
	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:187)
	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:837)
	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:565)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
	at java.lang.Thread.run(Thread.java:722)
]]

[2013-09-16T17:37:31.021+0800] [glassfish 4.0] [SEVERE] [] [org.glassfish.admingui] [tid: _ThreadID=42 _ThreadName=admin-listener(3)] [timeMillis: 1379324251021] [levelValue: 1000] [[
  RestResponse.getResponse() gives FAILURE.  endpoint = 'http://localhost:4848/management/domain/resources/connector-connection-pool/gtrvx/security-map'; attrs = '{userGroupCommaStr=value1, userGroups=value1, poolName=gtrvx, name=aaa, mappedUserName=bbb, mappedPassword=*******}']]


 Comments   
Comment by Jeremy_Lv [ 16/Sep/13 ]

Hi, Anissa:
As the server.log showed, the userGroupCommaStr is a invalid options. So what do you think?





[GLASSFISH-20810] NPE will be thrown to the server.log when save the default value of Availability Service page Created: 12/Sep/13  Updated: 19/Sep/14  Resolved: 04/Jun/14

Status: Resolved
Project: glassfish
Component/s: admin_gui, rest-interface
Affects Version/s: 4.1
Fix Version/s: 4.1

Type: Bug Priority: Critical
Reporter: Jeremy_Lv Assignee: Jason Lee
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

All


Issue Links:
Dependency
depends on GLASSFISH-18354 Edit and delete of virtual server fai... Resolved
Tags: 40-regression, 4_0_1-approved, admin, admin-gui

 Description   

Here's my reproduced steps:
1). start the domain
2). login the admin console
3). Access to the Avaliable Service page under default-config.
4). Type the Web Conatiner Availability page and save the default setting
5). Error in saving the default setting
6). The NPE will be thrown to the server.log, here's the stacktrace:

[2013-09-12T16:47:17.532+0800] [glassfish 4.0] [INFO] [NCLS-REST-00003] [javax.enterprise.admin.rest] [tid: _ThreadID=124 _ThreadName=admin-listener(6)] [timeMillis: 1378975637532] [levelValue: 800] [[
  An error occurred while processing the request. Please see the server logs for details.
java.lang.NullPointerException
	at org.glassfish.admin.rest.resources.PropertiesBagResource.setParentAndTagName(PropertiesBagResource.java:265)
	at org.glassfish.admin.rest.resources.generatedASM.WebContainerAvailabilityResource.getPropertiesBagResource(Unknown Source)
	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:601)
	at org.glassfish.jersey.server.internal.routing.SubResourceLocatorRouter$2.run(SubResourceLocatorRouter.java:228)
	at org.glassfish.jersey.server.internal.routing.SubResourceLocatorRouter.getResource(SubResourceLocatorRouter.java:245)
	at org.glassfish.jersey.server.internal.routing.SubResourceLocatorRouter.apply(SubResourceLocatorRouter.java:132)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:120)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:123)
	at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:104)
	at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:63)
	at org.glassfish.jersey.process.internal.Stages.process(Stages.java:197)
	at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:228)
	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:318)
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:211)
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:982)
	at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:330)
	at org.glassfish.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:316)
	at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
	at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:496)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:175)
	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:187)
	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:837)
	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:565)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
	at java.lang.Thread.run(Thread.java:722)
]]

Once the NPE was thrown out, All of the operation related to the Availability Service page are useless. So I think it is a critical issue need to be fix as soon as possible.



 Comments   
Comment by Jeremy_Lv [ 12/Sep/13 ]

Hi, Anissa:

I found this phenomenon can't be reproduced in the glassfish v3.1.2.2 right now, So I marked this issue as a 4.0-regression issue and need to be resolved! I will take some times to do some investigation about this failure soon.

Thanks

Comment by Jeremy_Lv [ 12/Sep/13 ]

After compared the PropertiesBagResource.java with glassfish v3's source, I have found the the PropertiesBagResource.setParentAndTagName has a null check there.

Here's the V3's code:

public void setParentAndTagName(Dom parent, String tagName) {
        if(parent == null) {
            return;
        }
        this.parent = parent;
        this.tagName = tagName;
        entity = parent.nodeElements(tagName);
    }

I hope anyone can help me to confirm about this.

Thanks

Comment by Jeremy_Lv [ 12/Sep/13 ]

this issue is similar to GLASSFISH-18354

Comment by Jeremy_Lv [ 12/Sep/13 ]

Although the NPE won't be thrown out after add a null check there, the property setting about the availability Service can't be saved successfully.

So the issue is still exist. Need to fix about this.

Comment by Jeremy_Lv [ 12/Sep/13 ]

Some of the error messages are as follows:

[2013-09-12T18:34:40.751+0800] [glassfish 4.0] [SEVERE] [] [org.glassfish.admingui] [tid: _ThreadID=43 _ThreadName=admin-listener(1)] [timeMillis: 1378982080751] [levelValue: 1000] [[
  RestResponse.getResponse() gives FAILURE.  endpoint = 'http://localhost:4848/management/domain/configs/config/default-config/availability-service/ejb-container-availability.json'; attrs = '{}']]
Comment by Anissa Lam [ 17/Apr/14 ]

It is not just affecting the default-config, but any config referenced by cluster.
Once the error occurs, you get the error in

web container availability tab
ejb container availability tab
jms availability.
when you just want to go to that tab. ie, the error occurs when displaying that tab.
further more, the error persist even AFTER a server restart.

We should try to fix this for 4.0.1.

Comment by Anissa Lam [ 24/Apr/14 ]

This is a REST issue, request Jason to work on it.

Comment by Jason Lee [ 04/Jun/14 ]

I think I've found a fix for this. Testing is in progress.

Comment by Jason Lee [ 04/Jun/14 ]

Fix and test committed (r63336)





[GLASSFISH-20792] Need to develop some dev tests to test the admin console Created: 03/Sep/13  Updated: 19/Sep/14  Resolved: 23/Oct/13

Status: Resolved
Project: glassfish
Component/s: admin_gui
Affects Version/s: 4.1
Fix Version/s: 4.1

Type: New Feature Priority: Critical
Reporter: Jeremy_Lv Assignee: Anissa Lam
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux, Mac OS



 Description   

Nowadays, the admin console's devtests is outdate, after a few discussions with Anissa, We decided to develop some new admin console's devtests based on the selenium IDE.

I have created a project on the Github to track on this:

https://github.com/LvSongping/GLASSFISH_ADMIN_CONSOLE_DEVTESTS

I have uploaded some initial tests related to the cluster page, I will continue to do this work in the future to accomplish all of the tests.



 Comments   
Comment by Jeremy_Lv [ 05/Sep/13 ]

Hi, Anissa:

I have finished all of the cluster related page's tests and updated the github's source. Then I will continue to finish the other page's tests

Thanks

Comment by Jeremy_Lv [ 08/Oct/13 ]

I have finished the initial version of the auto tests and also update the codes in the following github:
https://github.com/LvSongping/GLASSFISH_ADMIN_CONSOLE_DEVTESTS.

if any of you are interest in these test, please give me some suggestions about these.

Note: I will upgrade the test cases as the time passed by.

Comment by Jeremy_Lv [ 23/Oct/13 ]

All of the test suites have been checked in. You can checkout the code base on the following url:
https://svn.java.net/svn/glassfish~svn/trunk/main/appserver/tests/admingui

Marked this issue as resolved!





[GLASSFISH-20791] Creating a new maven archeType to generate a maven project template for supporting GlassFish OSGi EJB Created: 03/Sep/13  Updated: 19/Sep/14

Status: In Progress
Project: glassfish
Component/s: OSGi-JavaEE
Affects Version/s: None
Fix Version/s: 4.1

Type: New Feature Priority: Minor
Reporter: TangYong Assignee: TangYong
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Creating a new maven archeType to generate a maven project template for supporting GlassFish OSGi EJB.

The maven plugin should make an user can use GlassFish OSGi EJB more easy.






[GLASSFISH-20789] Failed to create cluster with jms option Created: 02/Sep/13  Updated: 19/Sep/14  Resolved: 09/Sep/13

Status: Resolved
Project: glassfish
Component/s: admin_gui
Affects Version/s: 4.1
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Jeremy_Lv Assignee: Anissa Lam
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

All


Attachments: PNG File error.png     Text File revision.patch    
Tags: 40-regression, admin-gui, jersey

 Description   

When I tried to create a cluster as the picture I have attached shows, It is failed because of the "java.lang.ClassCastException:".

Here's some of the failure exception in the server.log:
[2013-08-30T17:37:28.473+0800] [glassfish 4.0] [SEVERE] [] [org.glassfish.admingui] [tid: _ThreadID=47 _ThreadName=admin-listener(4)] [timeMillis: 1377855448473] [levelValue: 1000] [[
java.lang.Boolean cannot be cast to java.lang.String;
java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String;
restRequest: endpoint=http://localhost:4848/management/domain/clusters/cluster/cluster1/configure-jms-cluster
attrs=

{availabilityEnabled=false, clustertype=conventional, messageStoreType=file, configStoreType=masterbroker, property=prop1=value1:prop2=value2\:with\:colons:prop3=value3}

method=post]]

BTW: I have also confirmed that the cluster with jms option can be created in the glassfish v3.1.2, but it is failed in the glassfish v4. So I regarded it as a rollback issue in the glassfish v4.



 Comments   
Comment by Jeremy_Lv [ 02/Sep/13 ]

Hi, Anissa:
After a few investigation about the glassfish, I found it is cause by the following code:

AbstractFormProvider.java
    public <M extends MultivaluedMap<String, String>> void writeTo(
            M t,
            MediaType mediaType,
            OutputStream entityStream) throws IOException {
        final String charsetName = ReaderWriter.getCharset(mediaType).name();

        final StringBuilder sb = new StringBuilder();
        for (Map.Entry<String, List<String>> e : t.entrySet()) {    
         ★  for (String value : e.getValue()) {  ★
                if (sb.length() > 0) {
                    sb.append('&');
                }
                sb.append(URLEncoder.encode(e.getKey(), charsetName));
                if (value != null) {
                    sb.append('=');
                    sb.append(URLEncoder.encode(value, charsetName));
                }
            }
        }

It is because some of the value's type in the Map.Entry is boolean, however, it is because the boolean can't be cast to the String here so that it is failed to create the cluster with jms options.

Thanks
Jeremy Lv

Comment by Jeremy_Lv [ 02/Sep/13 ]

I also confirmed the early version of jersey does't have the AbstractFormProvider.java, it seems the AbstractFormProvider.java has imported when it comes to the glassfish v4

Comment by Jeremy_Lv [ 03/Sep/13 ]

Hi, Anissa:

I have confirmed this issue is caused by the upgrade of the jersey. After I have ignore the value of availabilityEnabled the cluster with jms options can be created successfully.

I have also confirmed the value of availabilityEnabled can't be added to the formData when create cluster with jms options in glassfish v3. So IMHO, I have revised the source as follows:

RestUtil.java
Index: src/main/java/org/glassfish/admingui/common/util/RestUtil.java
===================================================================
--- src/main/java/org/glassfish/admingui/common/util/RestUtil.java	(revision 62446)
+++ src/main/java/org/glassfish/admingui/common/util/RestUtil.java	(working copy)
@@ -554,6 +554,9 @@
             } else {
                 //formData.putSingle(key, (value != null) ? value.toString() : value);
                 try {
+                    //ignore the value of availabilityEnabled as it is useless
+                    if (key.equals("availabilityEnabled"))
+                        continue;
                     formData.putSingle(key, value);
                 } catch (ClassCastException ex) {
                     Logger logger = GuiUtil.getLogger();

In the glassfish v3, the sentence of formData.putSingle(key, value); will only storage the value which type is String, So it will regardless the value of availabilityEnabled as the type is boolean. However, when it comes to the glassfish v4, as the jersey side code upgrade, the sentence of formData.putSingle(key, value); will storage the every type of value including the boolean type, but the element of availabilityEnabled is useless when it comes to create the cluster with jms options. After all, I just do some changes to exclude the element of availabilityEnabled and the cluster with jms options can be created successfully.

Could you help me to confirm about my changes? I have also attached my patch in the JIRA.

Thanks
Jeremy Lv

Comment by Jeremy_Lv [ 03/Sep/13 ]

I have also ran the QL tests after I have applied the changes and all of the tests have passed, please review my changes whether it is fine for me to check in?

Thanks a lot!

Comment by Anissa Lam [ 04/Sep/13 ]

Thanks for suggesting the fix.
I need to take a closer look about this availabilityEnabled option in creating the cluster.
Will get back to you in a day or 2.

Comment by Anissa Lam [ 05/Sep/13 ]

I have looked at the patch. This issue need to be solved in another way.
buildMultivalueMap() is called everytime before doing a POST. Making changes in this has to be very careful as it may affect other commands, it is a very high risk change.
In fact, deploying an application will also go through this method. Thus if the availabilityEnabled option is selected when deploying the application to a cluster or other standalone instance, this option will be 'removed' by the new change, and thus the application will NOT be deployed correctly as the user request.
Need to figure out another more localized changes to fix this issue.

thanks for the suggestion though.

Comment by Jeremy_Lv [ 06/Sep/13 ]

Hi, Anissa:

Thanks for confirmation, I have a question about this issue:
1). what the option of availabilityEnabled used for when create the cluster with jms options, if the option is useless(As I can't find out anywhere to use this options here), how about delete availabilityEnabled related setting in the jmsHandlers.inc like this:

jmsHandlers.inc
Index: jmsHandlers.inc
===================================================================
--- jmsHandlers.inc	(revision 61862)
+++ jmsHandlers.inc	(working copy)
@@ -45,11 +45,9 @@
     //println("***** #{pageSession}\n\n\n\n\n\n");
     mapPut(map="#{requestScope.jmsAttrs}" key="clustertype" value="$pageSession{clusterType}");
     mapPut(map="#{requestScope.jmsAttrs}" key="property" value="$pageSession{properties}");
-    mapPut(map="#{requestScope.jmsAttrs}" key="availabilityEnabled" value="#{true}");
     if ('$pageSession{clusterType}=conventional') {
         mapPut(map="#{requestScope.jmsAttrs}" key="configStoreType" value="$pageSession{configStoreType}");
         mapPut(map="#{requestScope.jmsAttrs}" key="messageStoreType" value="$pageSession{messageStoreType}");
-        mapPut(map="#{requestScope.jmsAttrs}" key="availabilityEnabled" value="#{false}");
     }
 
     // Save JMS integration type

However, I have also tried to convert the availabilityEnabled's value from boolean to String, However, it will throw out the exception that the availabilityEnabled is an invalid option:

2013-09-06T10:14:50.640+0800] [glassfish 4.0] [SEVERE] [NCLS-CORE-00003] [javax.enterprise.system.core] [tid: _ThreadID=45 _ThreadName=admin-listener(3)] [timeMillis: 1378433690640] [levelValue: 1000] [[
  Exception while running a command
MultiException stack 1 of 1
java.lang.IllegalArgumentException:  Invalid option: availabilityEnabled
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.validateParameters(CommandRunnerImpl.java:1026)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1192)
	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.utils.ResourceUtil.runCommand(ResourceUtil.java:253)
	at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:231)
	at org.glassfish.admin.rest.resources.TemplateExecCommand.executeCommandLegacyFormat(TemplateExecCommand.java:157)
	at org.glassfish.admin.rest.resources.TemplateCommandPostResource.processPostLegacyFormat(TemplateCommandPostResource.java:97)
	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:601)
	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:140)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:158)
	at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:101)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:353)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:343)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
	at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:237)
	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:318)
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:211)
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:982)
	at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:330)
	at org.glassfish.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:316)
	at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
	at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:496)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:175)
	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:187)
	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:837)
	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:565)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
	at java.lang.Thread.run(Thread.java:722)
]]

[2013-09-06T10:14:50.666+0800] [glassfish 4.0] [SEVERE] [] [org.glassfish.admingui] [tid: _ThreadID=124 _ThreadName=admin-listener(6)] [timeMillis: 1378433690666] [levelValue: 1000] [[
  RestResponse.getResponse() gives FAILURE.  endpoint = 'http://localhost:4848/management/domain/clusters/cluster/c1/configure-jms-cluster'; attrs = '{availabilityEnabled=false, clustertype=conventional, messageStoreType=file, configStoreType=masterbroker, property=null}']]
Comment by Jeremy_Lv [ 06/Sep/13 ]

After checking about the jms side code, I have found the jms command doesn't support the option of availabilityEnabled, You can check about the ConfigureJMSCluster.java and you will found there's no defination about the option of availabilityEnabled.

Comment by Jeremy_Lv [ 06/Sep/13 ]

If we want the command support the option of availabilityEnabled, I think the changes would be like follows:

Index: admingui/common/src/main/java/org/glassfish/admingui/common/handlers/RestApiHandlers.java
===================================================================
--- admingui/common/src/main/java/org/glassfish/admingui/common/handlers/RestApiHandlers.java	(revision 62681)
+++ admingui/common/src/main/java/org/glassfish/admingui/common/handlers/RestApiHandlers.java	(working copy)
@@ -212,6 +212,10 @@
                     @HandlerOutput(name="result", type=Map.class)})
     public static void restRequest(HandlerContext handlerCtx) {
         Map<String, Object> attrs = (Map<String, Object>) handlerCtx.getInputValue("attrs");
+        if (attrs != null && attrs.containsKey(("availabilityEnabled"))){
+            String value = String.valueOf(attrs.get("availabilityEnabled"));
+            attrs.put("availabilityEnabled", value);
+        }
         String endpoint = (String) handlerCtx.getInputValue("endpoint");
         String method = (String) handlerCtx.getInputValue("method");
         boolean quiet = (Boolean) handlerCtx.getInputValue("quiet");
Index: jms/admin/src/main/java/org/glassfish/jms/admin/cli/ConfigureJMSCluster.java
===================================================================
--- jms/admin/src/main/java/org/glassfish/jms/admin/cli/ConfigureJMSCluster.java	(revision 62681)
+++ jms/admin/src/main/java/org/glassfish/jms/admin/cli/ConfigureJMSCluster.java	(working copy)
@@ -116,6 +116,9 @@
     @Param(name="configstoretype", optional=true, alias="cs")
     String configStoreType;
 
+    @Param(name="availabilityEnabled", optional=true, alias="ae")
+    String availabilityEnabled;
+
     @Param(name="messagestoretype", optional=true, alias="ms")
     String messageStoreType;

However, if we change like this, the option of availabilityEnabled will be avaiable when type as "configure-jms-cluster", As I can't find out any use of the availabilityEnabled option, I suggest to delete availabilityEnabled related setting in the jmsHandlers.inc.

Thanks
Jeremy Lv

Comment by Anissa Lam [ 06/Sep/13 ]

Let me check with the jms team about this availabilityEnabled option and get back to you.

Comment by Ed Bratt [ 06/Sep/13 ]

Clusters aren't fully tested in this GlassFish release as our focus was to deliver the content necessary for the Java EE RI. No doubt there will be issues (this appears to be one).
You may already know this, but you can manually configure a JMS cluster with ASAdmin commands. Here is an outline of the steps:
1. asadmin start-domain
2. asadmin create-cluster <cluster-name>
3. set jms-service type if necessary, e.g.
asadmin set <cluster-name>.jms-service.type=LOCAL
4. run configure-jms-cluster, e.g setup for enhanced cluster (where <gf-passfile> contains db password setting AS_ADMIN_JMSDBPASSWORD=<db-password>)
asadmin --passwordfile <gf-passfile> configure-jms-cluster --clustertype=enhanced --dbvendor=<vendor> --dbuser=<db-user-name> --dburl=<db-url> <cluster-name>
5. create instances, e.g. to creat a local instance
asadmin create-local-instance --cluster <cluster-name> <instance-name>
6. create any JMS resources
7. asadmin start-cluster

If you want to use high-availability DB for GlassFish MQ, e.g. --clustertype=enhanced copy the JDBC driver to
<glassfish-install-root>/glassfish4/mq/lib/ext/ before step 1 above.
(We tried this and it appears to work.)

Comment by Jeremy_Lv [ 07/Sep/13 ]

Hi, Ed Bratt:

I have tried about this too and it seems to work without availabilityEnabled options in the admin command. So is it no need to add the availabilityEnabled options in the command side?

Comment by Jeremy_Lv [ 09/Sep/13 ]

I have checked in the changes as the version 62705 to delete the availabilityEnabled options in the admin console.

Comment by amyk [ 09/Sep/13 ]

To clarify, 'availabilityEnabled' is not an option for 'asadmin configure-jms-cluster'

GlassFish 3.1.2

asadmin configure-jms-cluster --help
SYNOPSIS
configure-jms-cluster [--help]
[--clustertype=

{conventional|enhanced}]
[--configstoretype={masterbroker|shareddb}]
[--messagestoretype={file|jdbc}]
[--dbvendor database-vendor]
[--dbuser database-user]
[--dburl database-url]
[--property property-list]
cluster-name

GlassFish 4.0

asadmin configure-jms-cluster --help
SYNOPSIS
configure-jms-cluster [--help]
[--clustertype={conventional|enhanced}

]
[--configstoretype=

{masterbroker|shareddb}

]
[--messagestoretype=

{file|jdbc}

]
[--dbvendor database-vendor]
[--dbuser database-user]
[--dburl database-url]
[--property (name=value)[:name=value]*]
cluster-name

Comment by Jeremy_Lv [ 09/Sep/13 ]

Hi, Amyk:

Thanks for your clarification!

Comment by amyk [ 10/Sep/13 ]

From David Zhao:

The 'availabilityEnabled' was removed (no longer needed) for configuring JMS cluster, by the following revision for a long time:

Revision: 42142
Time: 10/26/2010 02:46 PM
Author: sats
Path: v3/jms/admin/src/main/java/org/glassfish/jms/admin/cli/ConfigureJMSCluster.java (trunk)
Message: changes to the configure-jms-cluster command as per ASARCH and MQ team suggestions

Comment by Jeremy_Lv [ 10/Sep/13 ]

amyk:

Your comments added here help me a lot! Thanks again!





[GLASSFISH-20784] Deadlock in loggers due to parallel startup of services Created: 28/Aug/13  Updated: 19/Sep/14  Resolved: 15/May/14

Status: Resolved
Project: glassfish
Component/s: hk2, logging
Affects Version/s: 4.1
Fix Version/s: 4.1

Type: Bug Priority: Critical
Reporter: Sanjeeb Sahoo Assignee: sandeep.shrivastava
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to GLASSFISH-20950 Glassfish doesn't start due to deadlock Closed
Tags: 4_0_1-review

 Description   

See the deadlock below. We were not seeing it earlier, because services were starting in a single thread, but HK2 team have enabled parallel startup of services and that's causing this deadlock. You may like to talk to HK2 team to disable parallel startup feature in glassfish for now.

Found one Java-level deadlock:
=============================
"RunLevelControllerThread-1377679090695":
waiting to lock monitor 0x82e187dc (object 0xb12e1030, a java.util.logging.LogManager$LoggerContext),
which is held by "RunLevelControllerThread-1377679090692"
"RunLevelControllerThread-1377679090692":
waiting to lock monitor 0x805034b4 (object 0xb12e0000, a java.util.logging.LogManager),
which is held by "RunLevelControllerThread-1377679090695"

Java stack information for the threads listed above:
===================================================
"RunLevelControllerThread-1377679090695":
at java.util.logging.LogManager$LoggerContext.findLogger(LogManager.java:489)

  • waiting to lock <0xb12e1030> (a java.util.logging.LogManager$LoggerContext)
    at java.util.logging.LogManager.setLevelsOnExistingLoggers(LogManager.java:1356)
  • locked <0xb12e0000> (a java.util.logging.LogManager)
    at java.util.logging.LogManager.readConfiguration(LogManager.java:1115)
    at java.util.logging.LogManager.readConfiguration(LogManager.java:988)
    at com.sun.enterprise.server.logging.LogManagerService.postConstruct(LogManagerService.java:288)
    at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:298)
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:345)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:454)
    at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:184)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2296)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:98)
  • locked <0xaa383cf8> (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:947)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:932)
    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:722)
    "RunLevelControllerThread-1377679090692":
    at java.util.logging.LogManager.drainLoggerRefQueueBounded(LogManager.java:811)
  • waiting to lock <0xb12e0000> (a java.util.logging.LogManager)
    at java.util.logging.LogManager$LoggerContext.addLocalLogger(LogManager.java:511)
  • locked <0xb12e1030> (a java.util.logging.LogManager$LoggerContext)
    at java.util.logging.LogManager.addLogger(LogManager.java:848)
    at java.util.logging.LogManager.demandLogger(LogManager.java:405)
    at java.util.logging.Logger.demandLogger(Logger.java:317)
    at java.util.logging.Logger.getLogger(Logger.java:408)
    at com.sun.enterprise.naming.util.LogFacade.<clinit>(LogFacade.java:55)
    at com.sun.enterprise.naming.impl.SerialInitContextFactory.getInitialContext(SerialInitContextFactory.java:155)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
    at javax.naming.InitialContext.init(InitialContext.java:242)
    at javax.naming.InitialContext.<init>(InitialContext.java:192)
    at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.<init>(GlassfishNamingManagerImpl.java:122)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
    at org.glassfish.hk2.utilities.reflection.ReflectionHelper.makeMe(ReflectionHelper.java:1092)
    at org.jvnet.hk2.internal.ClazzCreator.createMe(ClazzCreator.java:261)
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:336)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:454)
    at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:119)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2296)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:590)
    at org.jvnet.hk2.internal.IterableProviderImpl.get(IterableProviderImpl.java:88)
    at org.glassfish.kernel.javaee.MEJBService.postConstruct(MEJBService.java:82)
    at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:298)
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:345)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:454)
    at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:184)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2296)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:98)
  • locked <0xaa383dc8> (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:947)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:932)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneJob.run(CurrentTaskFuture.java:678)
    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:722)

Found 1 deadlock.



 Comments   
Comment by Joe Di Pol [ 05/May/14 ]

A couple of logging deadlocks were fixed in JDK7u60, so this problem may go away under JDK7u60 (or JDK8) or newer.

Comment by sandeep.shrivastava [ 15/May/14 ]

This is a JDK issue that has been already reported in https://bugs.openjdk.java.net/browse/JDK-8010939

The fix is available in JDK7u60 and later as Joe noted.





[GLASSFISH-20782] [Fighterfish Test]test_GLASSFISH_12975() has some regression Created: 27/Aug/13  Updated: 19/Sep/14

Status: Open
Project: glassfish
Component/s: OSGi, OSGi-JavaEE
Affects Version/s: None
Fix Version/s: 4.1

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

Windows
4.0.1/nightly/ 26-Aug-2013 07:25



 Description   

test_GLASSFISH_12975() causes Fighterfish Test failed as following,

[#|2013-08-27T15:16:29.922+0900|SEVERE|glassfish 4.0|org.ops4j.pax.exam.junit.JUnit4TestRunner|_ThreadID=1;_ThreadName=main;_TimeMillis=1377584189922;_LevelValue=1000;ClassName=org.ops4j.pax.exam.junit.JUnit4TestRunner$3;MethodName=evaluate;|
Exception
org.ops4j.pax.exam.TestContainerException: [test_GLASSFISH_12975(org.glassfish.fighterfish.test.it.T2_Test): Aether Error.]
at org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.invokeViaJUnit(JUnitProbeInvoker.java:112)
at org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.findAndInvoke(JUnitProbeInvoker.java:89)
at org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.call(JUnitProbeInvoker.java:72)
at org.ops4j.pax.exam.nat.internal.NativeTestContainer.call(NativeTestContainer.java:86)
at org.ops4j.pax.exam.spi.reactors.EagerSingleStagedReactor.invoke(EagerSingleStagedReactor.java:85)
at org.ops4j.pax.exam.junit.JUnit4TestRunner$3.evaluate(JUnit4TestRunner.java:289)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.ops4j.pax.exam.junit.JUnit4TestRunner.run(JUnit4TestRunner.java:87)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101)
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:601)
at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
at $Proxy0.invoke(Unknown Source)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
Caused by: java.io.IOException: Aether Error.
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:234)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:221)
at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:120)
at java.net.URL.openStream(URL.java:1037)
at org.glassfish.fighterfish.test.it.T2_Test.test_GLASSFISH_12975(T2_Test.java:742)
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:601)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:69)
at org.ops4j.pax.exam.invoker.junit.internal.ContainerTestRunner.runChild(ContainerTestRunner.java:58)
at org.ops4j.pax.exam.invoker.junit.internal.ContainerTestRunner.runChild(ContainerTestRunner.java:32)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:292)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
at org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.invokeViaJUnit(JUnitProbeInvoker.java:108)
... 26 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.glassfish.main.osgi-platforms:felix-webconsole-extension:jar:4.0.1-SNAPSHOT from/to maven-central (http://repo1.maven.org/maven2/): Error transferring file: repo1.maven.org
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:541)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:220)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:197)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:323)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:232)
... 51 more
Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact org.glassfish.main.osgi-platforms:felix-webconsole-extension:jar:4.0.1-SNAPSHOT from/to maven-central (http://repo1.maven.org/maven2/): Error transferring file: repo1.maven.org
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.flush(WagonRepositoryConnector.java:695)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.flush(WagonRepositoryConnector.java:689)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.get(WagonRepositoryConnector.java:445)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:460)
... 55 more
Caused by: org.apache.maven.wagon.TransferFailedException: Error transferring file: repo1.maven.org
at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:143)
at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:608)
at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.net.UnknownHostException: repo1.maven.org
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:378)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:473)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:203)
at sun.net.www.http.HttpClient.New(HttpClient.java:290)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:995)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:931)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:849)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1299)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:115)
... 8 more

#]


 Comments   
Comment by TangYong [ 27/Aug/13 ]

Noting that in test_GLASSFISH_12975() , the following,

String location2 = "mvn:org.glassfish.main.osgi-platforms/felix-webconsole-extension/4.0.1-SNAPSHOT/jar";

I used 4.0.1/nightly/ 26-Aug-2013 07:25 rather than SNAPSHOT from trunk, and, my local maven repo can not have such bundle, and repo1 or other maven repos have not such bundle too. So, pl. Sahoo explains the reason using 4.0.1-SNAPSHOT here. I think that the test failure is caused by the issue.

Thanks
Tang

Comment by Sanjeeb Sahoo [ 27/Aug/13 ]

We should change the URL in test to use 4.0.1-b01 which is available in maven central.

Comment by TangYong [ 27/Aug/13 ]

Will change it and also noticing that 4.0.1-b01 is in https://maven.java.net/content/groups/promoted rather than other repos including repo1, so, whether glassfish osgi fighterfish wiki will be updated to add a description?

Comment by Sanjeeb Sahoo [ 27/Aug/13 ]

See if we can use 4.0 instead of 4.0.1?

Comment by TangYong [ 27/Aug/13 ]

Let us to see the result of using 4.0.1-b01,

[#|2013-08-27T15:55:13.871+0900|SEVERE|glassfish 4.0|org.ops4j.pax.exam.junit.JUnit4TestRunner|_ThreadID=1;_ThreadName=main;_TimeMillis=1377586513871;_LevelValue=1000;ClassName=org.ops4j.pax.exam.junit.JUnit4TestRunner$3;MethodName=evaluate;|
Exception
org.ops4j.pax.exam.TestContainerException: [test_GLASSFISH_12975(org.glassfish.fighterfish.test.it.T2_Test): Admin Console Not Available expected:<200> but was:<401>]
at org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.invokeViaJUnit(JUnitProbeInvoker.java:112)
at org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.findAndInvoke(JUnitProbeInvoker.java:89)
at org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.call(JUnitProbeInvoker.java:72)
at org.ops4j.pax.exam.nat.internal.NativeTestContainer.call(NativeTestContainer.java:86)
at org.ops4j.pax.exam.spi.reactors.EagerSingleStagedReactor.invoke(EagerSingleStagedReactor.java:85)
at org.ops4j.pax.exam.junit.JUnit4TestRunner$3.evaluate(JUnit4TestRunner.java:289)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.ops4j.pax.exam.junit.JUnit4TestRunner.run(JUnit4TestRunner.java:87)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101)
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:601)
at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
at $Proxy0.invoke(Unknown Source)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
Caused by: java.lang.AssertionError: Admin Console Not Available expected:<200> but was:<401>
at org.junit.Assert.fail(Assert.java:93)
at org.junit.Assert.failNotEquals(Assert.java:647)
at org.junit.Assert.assertEquals(Assert.java:128)
at org.junit.Assert.assertEquals(Assert.java:472)
at org.glassfish.fighterfish.test.it.T2_Test.test_GLASSFISH_12975(T2_Test.java:780)
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:601)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:69)
at org.ops4j.pax.exam.invoker.junit.internal.ContainerTestRunner.runChild(ContainerTestRunner.java:58)
at org.ops4j.pax.exam.invoker.junit.internal.ContainerTestRunner.runChild(ContainerTestRunner.java:32)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:292)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
at org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.invokeViaJUnit(JUnitProbeInvoker.java:108)
... 26 more

#]

The above means that accessing "http://localhost:8080/osgi/system/console/bundles" failed.

Comment by TangYong [ 27/Aug/13 ]

4.0 is the same as 4.0.1, and noticing that in console, the following,

[#|2013-08-27T16:06:31.647+0900|WARNING|glassfish 4.0|org.glassfish.security.services|_ThreadID=301;_ThreadName=http-listener-1(2);_TimeMillis=1377587191647;_LevelValue=900;ClassName=org.glassfish.security.services.common.SecurityAccessValidator;MethodName=checkPerm;|
Check Permission failed in lookup for permission = ("org.glassfish.security.services.common.SecureServiceAccessPermission" "security/service/authentication")|#]

[#|2013-08-27T16:06:31.662+0900|INFO|glassfish 4.0|javax.enterprise.system.core.security|_ThreadID=300;_ThreadName=http-listener-1(1);_TimeMillis=1377587191662;_LevelValue=800;ClassName=com.sun.enterprise.security.provider.BasePolicyWrapper$2;MethodName=run;|
JACC Policy Provider: Failed Permission Check, context(null)- permission(("org.glassfish.security.services.common.SecureServiceAccessPermission" "security/service/authentication"))|#]

[#|2013-08-27T16:06:31.662+0900|WARNING|glassfish 4.0|org.glassfish.security.services|_ThreadID=300;_ThreadName=http-listener-1(1);_TimeMillis=1377587191662;_LevelValue=900;ClassName=org.glassfish.security.services.common.SecurityAccessValidator;MethodName=checkPerm;|
Check Permission failed in lookup for permission = ("org.glassfish.security.services.common.SecureServiceAccessPermission" "security/service/authentication")|#]

[#|2013-08-27T16:06:31.662+0900|INFO|glassfish 4.0|javax.enterprise.system.core.security|_ThreadID=302;_ThreadName=http-listener-1(3);_TimeMillis=1377587191662;_LevelValue=800;ClassName=com.sun.enterprise.security.provider.BasePolicyWrapper$2;MethodName=run;|
JACC Policy Provider: Failed Permission Check, context(null)- permission(("org.glassfish.security.services.common.SecureServiceAccessPermission" "security/service/authentication"))|#]

[#|2013-08-27T16:06:31.662+0900|WARNING|glassfish 4.0|org.glassfish.security.services|_ThreadID=302;_ThreadName=http-listener-1(3);_TimeMillis=1377587191662;_LevelValue=900;ClassName=org.glassfish.security.services.common.SecurityAccessValidator;MethodName=checkPerm;|
Check Permission failed in lookup for permission = ("org.glassfish.security.services.common.SecureServiceAccessPermission" "security/service/authentication")|#]

[#|2013-08-27T16:06:31.662+0900|INFO|glassfish 4.0|javax.enterprise.system.core.security|_ThreadID=304;_ThreadName=http-listener-1(5);_TimeMillis=1377587191662;_LevelValue=800;ClassName=com.sun.enterprise.security.provider.BasePolicyWrapper$2;MethodName=run;|
JACC Policy Provider: Failed Permission Check, context(null)- permission(("org.glassfish.security.services.common.SecureServiceAccessPermission" "security/service/authentication"))|#]

[#|2013-08-27T16:06:31.662+0900|WARNING|glassfish 4.0|org.glassfish.security.services|_ThreadID=304;_ThreadName=http-listener-1(5);_TimeMillis=1377587191662;_LevelValue=900;ClassName=org.glassfish.security.services.common.SecurityAccessValidator;MethodName=checkPerm;|
Check Permission failed in lookup for permission = ("org.glassfish.security.services.common.SecureServiceAccessPermission" "security/service/authentication")|#]

[#|2013-08-27T16:06:31.662+0900|INFO|glassfish 4.0|org.glassfish.fighterfish.test.it|_ThreadID=1;_ThreadName=main;_TimeMillis=1377587191662;_LevelValue=800;ClassName=T2_Test;MethodName=test_GLASSFISH_12975;|
Sleeping for 5 Seconds on testurl = http://localhost:8080/osgi/system/console/bundles|#]

...

Comment by Sanjeeb Sahoo [ 27/Aug/13 ]

I know why you see that error. It's explained in GLASSFISH-20646. So, we can't use version 4.0. We need a build of webconsole which is later than svn #svn #62246. 4.0.1-b01 won't help as far as I see.

Comment by Sanjeeb Sahoo [ 27/Aug/13 ]

The problem is like this:

FighterFish test suite includes a test for felix-webconsole-extension which is built as part of glassfish, but not installed by default. So, the test is relying on 4.0.1-SNAPSHOT. If we move all our OSGi modules to fighterfish project, we can easily solve this issue via binary integration. Could you own the migration of such modules from glassfish to fighterfish?

Thanks,
Sahoo

Comment by TangYong [ 27/Aug/13 ]

>Could you own the migration of such modules from glassfish to fighterfish?

Apart from felix-webconsole-extension, pl. exactly telling me other modules belonging to us.

About here's "migration", could you please tell me how do you operate, then, I will confirm whether I have the same operation permission。

Thanks
Tang

Comment by TangYong [ 27/Aug/13 ]

Having another temp way:

Making the test case is @Ignore, and letting the jira open, then, once releasing a version later than #svn #62246, I will re-confirm the jira and remove @Ignore.

Agree with me?

Comment by TangYong [ 28/Aug/13 ]

fixing has been checked in.

Revisions:
----------
62668

Comment by Sanjeeb Sahoo [ 29/Aug/13 ]

After this checkin, I noticed a failure while running tests in an environment with clean local maven repository:

[#|2013-08-28T12:44:21.385-0700|SEVERE|glassfish 4.0|org.ops4j.pax.exam.junit.JUnit4TestRunner|_ThreadID=1;_ThreadName=main;_TimeMillis=1377719061385;_LevelValue=1000;ClassName=org.ops4j.pax.exam.junit.JUnit4TestRunner$3;MethodName=evaluate;|
Exception
org.ops4j.pax.exam.TestContainerException: [test_GLASSFISH_12975(org.glassfish.fighterfish.test.it.T2_Test): Aether Error.]
at org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.invokeViaJUnit(JUnitProbeInvoker.java:112)
at org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.findAndInvoke(JUnitProbeInvoker.java:89)
at org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.call(JUnitProbeInvoker.java:72)
at org.ops4j.pax.exam.nat.internal.NativeTestContainer.call(NativeTestContainer.java:86)
at org.ops4j.pax.exam.spi.reactors.EagerSingleStagedReactor.invoke(EagerSingleStagedReactor.java:85)
at org.ops4j.pax.exam.junit.JUnit4TestRunner$3.evaluate(JUnit4TestRunner.java:289)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.ops4j.pax.exam.junit.JUnit4TestRunner.run(JUnit4TestRunner.java:87)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101)
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:601)
at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
at $Proxy0.invoke(Unknown Source)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
Caused by: java.io.IOException: Aether Error.
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:234)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:221)
at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:120)
at java.net.URL.openStream(URL.java:1037)
at org.glassfish.fighterfish.test.it.T2_Test.test_GLASSFISH_12975(T2_Test.java:742)
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:601)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:69)
at org.ops4j.pax.exam.invoker.junit.internal.ContainerTestRunner.runChild(ContainerTestRunner.java:58)
at org.ops4j.pax.exam.invoker.junit.internal.ContainerTestRunner.runChild(ContainerTestRunner.java:32)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:292)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
at org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.invokeViaJUnit(JUnitProbeInvoker.java:108)
... 26 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not find artifact org.glassfish.main.osgi-platforms:felix-webconsole-extension:jar:4.0.1-b02 in local (file:/scratch/java_re/BUILD_AREA/workspace/gf-trunk-fighterfish-it/.m2/repository/)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:541)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:220)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:197)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:323)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:232)
... 51 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact org.glassfish.main.osgi-platforms:felix-webconsole-extension:jar:4.0.1-b02 in local (file:/scratch/java_re/BUILD_AREA/workspace/gf-trunk-fighterfish-it/.m2/repository/)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:945)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.flush(WagonRepositoryConnector.java:695)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.flush(WagonRepositoryConnector.java:689)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.get(WagonRepositoryConnector.java:445)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:460)
... 55 more

This is a known issue in the version of pax-url used by our tests. pax-url only searches in default maven repository (ie central repo), but this artifact is available in promoted jvnet repo, hence it is unable to find.

I made the following checkin to fix the issue:

Log Message:
------------
Clean up test classpath. Add felix-webconsole-extension
as a dependency so that test can provision it. Currently test is not able to download it from
remote repo because pax-url only searches in central repo and it's not available there.

Revisions:
----------
62676

After this checkin, our hudson job has run fine.

Comment by TangYong [ 30/Aug/13 ]

I think that while I was checking in previous patch, I made a mistake that I have not cleaned my local repo which still contained 4.0.1-b02 ever being downloaded in some way, after I looked at the new checking in, I see.

Thanks Sahoo's deep confirmation!





[GLASSFISH-20781] list-jndi-entries command does not display Portable JNDI Name while deploying an EJB lite Created: 27/Aug/13  Updated: 19/Sep/14  Resolved: 03/Mar/14

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b89_RC5
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: TangYong Assignee: Chris Kasso
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

GlassFish 4


Attachments: Zip Archive test_results_GLASSFISH-20781.zip    

 Description   

Pl. seeing https://www.java.net/forum/topic/glassfish/glassfish/about-ejb-lite-and-portable-jndi-name



 Comments   
Comment by lzg5039 [ 29/Aug/13 ]

when execute the command of "asadmin list-jndi-entries --context java:global",the following exception will happen

remote failure: Naming Exception caught. Invocation exception: Got null ComponentInvocation
Invocation exception: Got null ComponentInvocation
Command list-jndi-entries failed.

it is a bug?

Comment by TangYong [ 29/Aug/13 ]

This must be a issue, for --context,

--context
The name of the JNDI context or subcontext. If context is not specified, all entries in the naming service are returned. If context (such as ejb) is specified, all those entries are returned.

So, the jira itself has told us that in 4.0, list-jndi-entries has been unavailable in some cases.

Comment by jifeng [ 01/Sep/13 ]

Hi
Chris

This is the exact precise place where the failure happens:

com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.java
// Some comments here
 private String getComponentId() throws NamingException {
        String id;

        ComponentInvocation ci;
        if (invMgr==null) {
            ci= habitat.<InvocationManager>getService(InvocationManager.class).getCurrentInvocation();
        } else {
            ci= invMgr.getCurrentInvocation();
        }
        
        if (ci == null) {
            throw new NamingException("Invocation exception: Got null ComponentInvocation ");★
        }
......
}

ci==null, so the code which is marked as "★" will throw the NamingException

I did debug for 'SerialContextProviderImp' class ,i found the Portable JNDI Name objects had been bound in SerialContextProviderImpl object。
however, when i executed the command of "asadmin list-jndi-entries --context java:global", the command did not find the Portable JNDI Name objects in 'SerialContextProviderImpl' class 。
the processing logic is right?

Comment by jifeng [ 12/Sep/13 ]

Hi
Chris

I have revised the source as follows:

com.sun.enterprise.naming.impl.SerialContext.java
Index: SerialContext.java
===================================================================
--- SerialContext.java	(revision 62639)
+++ SerialContext.java	(working copy)
@@ -92,7 +92,7 @@
 
     private static final String JAVA_URL = "java:";
 
-    private static final String JAVA_GLOBAL_URL = "java:global/";
+    private static final String JAVA_GLOBAL_URL = "java:global";
 
       }
 

It works fine,
Could you help me to review these changes?
If it is fine, could you tell me how to run the admin tests,i ran the QL tests and all of the QL tests are passed.

Comment by Chris Kasso [ 12/Sep/13 ]

The change looks good to me. To run the dev tests:

svn co https://svn.dev.java.net/svn/glassfish-svn/trunk/v2/appserv-tests

Set APS_HOME to the appserv-tests directory created from the checkout (e.g. /work2/ws/v2/appserv-tests)
Set S1AS_HOME to your GF build/install (e.g. .../distributions/glassfish/target/stage/glassfish4/glassfish)

Run the tests:

ant -D-Xmx912M all -Dverbose=true

You can add -Dteststorun=XXX to control the tests to run (where XXX is things like cli or cluster, etc)

Comment by jifeng [ 13/Nov/13 ]

Hi
Chris

Thank you for telling me how to run devTest.

But I found that there are some problems in DevTest of Admin modules
when I runned the test case without applying my patch.

In admin modules ,A total of 20 modules should be tested ,thereinto,
only 13 ones can be passed, while 7 of them can not be passed.
The test result of using my patch is exactly the same with the
test result without my patch , so, my patch is without problem in my opinion.

I have checked the reason which causes the admin module occur error,
some errors have nothing with glassfish, it is devTest's problem.

If Chris thinks that it is necessary to amend these problems, I'll be glad to do this job.

Comment by TangYong [ 13/Nov/13 ]

Chris,

The attachment is the test results before applying the patch and after applying the patch.
Pl. seeing it.

From the test results, I think that the patch looks fine.

Best Regards
Tang

Comment by Chris Kasso [ 13/Nov/13 ]

I think the fix is fine. Since the same tests fail before you apply the patch I wouldn't worry about them in this case.

Comment by jifeng [ 03/Mar/14 ]

the issue has been checked in as r63141.
D:\glassfishV4\glassfish~svn\trunk\main\appserver\common\glassfish-naming\src\main\java\com\sun\enterprise\naming\impl\SerialContext.java
D:\glassfishV4\glassfish~svn\trunk\main\appserver\common\glassfish-naming\src\main\java\com\sun\enterprise\naming\impl\SerialContext.java
Completed: At revision: 63141





[GLASSFISH-20780] Quicklook fails with version 2.2.0-b15 of HK2 when removing config beans Created: 26/Aug/13  Updated: 19/Sep/14  Resolved: 04/Sep/13

Status: Resolved
Project: glassfish
Component/s: hk2
Affects Version/s: future release
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: jwells Assignee: andriy.zhdanov
Resolution: Complete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

If you try to run QuickLook with hk2 2.2.0-b15 you get two failures:

FAILED: testRequestScopedJMSContextInjection
[testng] java.lang.AssertionError: Unexpected Results expected:<true> but was:<false>
[testng] at test.jms.injection.ClientTestNG.testRequestScopedJMSContextInjection(ClientTestNG.java:70)
[testng] ... Removed 26 stack frames
[testng] FAILED: testTransactionScopedJMSContextInjection
[testng] java.lang.AssertionError: Unexpected Results expected:<true> but was:<false>
[testng] at test.jms.injection.ClientTestNG.testTransactionScopedJMSContextInjection(ClientTestNG.java:82)
[testng] ... Removed 26 stack frames

If you look in the server log you will see stack traces like this:

java.lang.IllegalArgumentException
at org.glassfish.admin.amx.impl.util.ImplUtil.unregisterAMXMBeans(ImplUtil.java:61)
at org.glassfish.admin.amx.impl.util.ImplUtil.unregisterAMXMBeans(ImplUtil.java:81)
at org.glassfish.admin.amx.impl.config.AMXConfigLoader.configBeanRemoved(AMXConfigLoader.java:129)
at org.glassfish.admin.amx.impl.config.AMXConfigLoader.sortAndDispatch(AMXConfigLoader.java:197)
at org.glassfish.admin.amx.impl.config.AMXConfigLoader.transactionCommited(AMXConfigLoader.java:244)
at org.jvnet.hk2.config.Transactions$TransactionListenerJob.process(Transactions.java:365)
at org.jvnet.hk2.config.Transactions$TransactionListenerJob.process(Transactions.java:356)
at org.jvnet.hk2.config.Transactions$ListenerNotifier$1.call(Transactions.java:213)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at org.jvnet.hk2.config.Transactions$Notifier$1$1.run(Transactions.java:167)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)]]

The code where this is failing from AMXConfigLoader is:

else if (newValue == null && oldValue instanceof ConfigBeanProxy && amxIsRunning())

{ // REMOVE final ConfigBeanProxy cbp = (ConfigBeanProxy) oldValue; final ConfigBean cb = asConfigBean(ConfigBean.unwrap(cbp)); //debug( "AMXConfigLoader.sortAndDispatch: remove (recursive) ConfigBean: " + mRegistry.getObjectName(cb) ); configBeanRemoved(cb); }

Since a bunch of work went into the config subsystem in the area of removing config beans, that is likely where the issue arises.



 Comments   
Comment by jwells [ 26/Aug/13 ]

To reproduce:

build glassfish with hk2 changed to 2.2.0-b15 (edit nucleus/pom.xml and modify the hk2 entries to have 2.2.0-b15)
run quicklook
look at the server log file

Comment by andriy.zhdanov [ 02/Sep/13 ]

Here are changes needed to prevent those exceptions, but this does not fix quicklook.

Note, there are other stack traces containing 'lookup', that are most likely related to the Hk2-127 changes.

Index: all/main/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/util/ImplUtil.java
===================================================================
--- all/main/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/util/ImplUtil.java	(revision 62668)
+++ all/main/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/util/ImplUtil.java	(working copy)
@@ -78,7 +78,10 @@
 
     /** see javadoc for unregisterAMXMBeans(AMX) */
     public static void unregisterAMXMBeans(final MBeanServer mbs, final ObjectName objectName) {
-        unregisterAMXMBeans(ProxyFactory.getInstance(mbs).getProxy(objectName, AMXProxy.class));
+        AMXProxy proxy = ProxyFactory.getInstance(mbs).getProxy(objectName, AMXProxy.class);
+        if (proxy != null) { // since HK2-127 removes children as well
+            unregisterAMXMBeans(proxy);
+        } // else already processed by parent
     }
 
     /**
Index: all/main/appserver/common/glassfish-naming/src/main/java/com/sun/enterprise/naming/impl/TransientContext.java
===================================================================
--- all/main/appserver/common/glassfish-naming/src/main/java/com/sun/enterprise/naming/impl/TransientContext.java	(revision 62668)
+++ all/main/appserver/common/glassfish-naming/src/main/java/com/sun/enterprise/naming/impl/TransientContext.java	(working copy)
@@ -383,10 +383,6 @@
         if (name.equals("")) {
             throw new InvalidNameException("Cannot unbind empty name");
         }
-        if (bindings.get(name) == null) {
-            throw new NameNotFoundException(
-                    "Cannot find name to unbind");
-        }
         bindings.remove(name);
     }
 
Comment by jwells [ 02/Sep/13 ]

With those changes I am now seeing different exceptions in the log:

[2013-09-02T07:59:47.407-0700] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=217 _ThreadName=Thread-8] [timeMillis: 1378133987407] [levelValue: 1000] [[
java.lang.RuntimeException: javax.management.ReflectionException
at org.glassfish.admin.amx.core.proxy.ProxyFactory.getMBeanInfo(ProxyFactory.java:359)
at org.glas