[GLASSFISH-18205] Changing a log level via Admin Console breaks logging Created: 18/Jan/12  Updated: 18/Jan/12  Resolved: 18/Jan/12

Status: Resolved
Project: glassfish
Component/s: admin_gui
Affects Version/s: 3.1.1
Fix Version/s: 3.1.2_b17

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

Windows XP


Issue Links:
Duplicate
duplicates GLASSFISH-17161 NulllPointerException in GFFileHandle... Resolved
duplicates GLASSFISH-17037 Switching log levels persistently bre... Closed
Tags: logging

 Description   

I have somehow broken logging in my Glassfish 3.1.1 deployment.

All I did was attempt to bump up the level of one of the logs, via the "Logger Settings" view under Configurations -> server-config. I went to the "Log Levels" tab, found "javax.enterprise.system.core.security" and bumped it up from INFO to FINEST, then clicked Save.

From that point on, the last message in the log is "Updated log levels for loggers." Nothing else ever gets written to the logs anymore! I can stop, restart the server, but the log never changes. I decided to go UNDO that change to see if it would fix it, but it did not. I think there must be some kind of side effect that breaks logging when you try to set the levels via this "Logger Settings" interface.

I reinstalled Glassfish from scratch, and was able to reproduce it again. Just setting that one value to FINEST breaks logging.

Is this a known issue, and if so, are there any workarounds?



 Comments   
Comment by Anissa Lam [ 18/Jan/12 ]

Yes, this is a known issue in 3.1.1.
The cause is due to GLASSFISH-17037 which is release noted.
This is a duplicate of GLASSFISH-17161

The workaround is to run a CLI command after adjusting/changing the log levels in console.

%asadmin set-log-levels com.sun.enterprise.server.logging.GFFileHandler=ALL

Specify the --target option for a server instance if it is not the domain administration server (DAS).





[GLASSFISH-18203] Admin-Console: JMS-Ping fails - JMS type 'LOCAL' Created: 17/Jan/12  Updated: 17/Jan/12  Resolved: 17/Jan/12

Status: Resolved
Project: glassfish
Component/s: admin_gui
Affects Version/s: 3.1.1_b12
Fix Version/s: 3.1.2_b17

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

GlassFish 3.1.1 b12, RHEL 6, JDK 7



 Description   

Clicking on the 'ping' button to check JMS-connection within the console throws an error.

Server log shows the execption provided below.

It seems that the ping-command does not replace the variable used witin the 'port' property of the configured JMS-Host.

Configuration:
##############

/opt/sun/glassfish3/bin/asadmin --user admin --port 4849 list-jms-hosts --target instance-config
default_JMS_host

/opt/sun/glassfish3/bin/asadmin --user admin --port 4849 get instance-config.jms-service.*
instance-config.jms-service.addresslist-behavior=priority
instance-config.jms-service.addresslist-iterations=3
instance-config.jms-service.default-jms-host=default_JMS_host
instance-config.jms-service.init-timeout-in-seconds=60
instance-config.jms-service.reconnect-attempts=3
instance-config.jms-service.reconnect-enabled=true
instance-config.jms-service.reconnect-interval-in-seconds=5
instance-config.jms-service.type=LOCAL
instance-config.jms-service.jms-host.default_JMS_host.admin-password=admin
instance-config.jms-service.jms-host.default_JMS_host.admin-user-name=admin
instance-config.jms-service.jms-host.default_JMS_host.host=localhost
instance-config.jms-service.jms-host.default_JMS_host.lazy-init=true
instance-config.jms-service.jms-host.default_JMS_host.name=default_JMS_host
instance-config.jms-service.jms-host.default_JMS_host.port=$

{JMS_PROVIDER_PORT}

/opt/sun/glassfish3/bin/asadmin --user admin --port 4849 list-system-properties instance-config | grep JMS
JMS_PROVIDER_PORT=7677

[#|2012-01-17T12:49:10.941+0100|SEVERE|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=410241;_ThreadName=Thread-2;|com.sun.messaging.jms.JMSException: [C4003]: Error occurred on connection creation [localhost:7676]. - cause: java.net.ConnectException: Connection refused
at com.sun.messaging.jmq.jmsclient.ExceptionHandler.throwConnectionException(ExceptionHandler.java:280)
at com.sun.messaging.jmq.jmsclient.ExceptionHandler.handleConnectException(ExceptionHandler.java:226)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.readBrokerPorts(PortMapperClient.java:245)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.init(PortMapperClient.java:156)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.<init>(PortMapperClient.java:98)
at com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPConnectionHandler.<init>(TCPConnectionHandler.java:168)
at com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPStreamHandler.openConnection(TCPStreamHandler.java:141)
at com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnection(ConnectionInitiator.java:785)
at com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnectionNew(ConnectionInitiator.java:260)
at com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnection(ConnectionInitiator.java:214)
at com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnection(ConnectionInitiator.java:164)
at com.sun.messaging.jmq.jmsclient.ProtocolHandler.init(ProtocolHandler.java:843)
at com.sun.messaging.jmq.jmsclient.ProtocolHandler.<init>(ProtocolHandler.java:1562)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.openConnection(ConnectionImpl.java:2413)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.init(ConnectionImpl.java:1094)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.<init>(ConnectionImpl.java:454)
at com.sun.messaging.jmq.jmsclient.UnifiedConnectionImpl.<init>(UnifiedConnectionImpl.java:66)
at com.sun.messaging.jmq.jmsclient.XAConnectionImpl.<init>(XAConnectionImpl.java:64)
at com.sun.messaging.XAConnectionFactory.createXAConnection(XAConnectionFactory.java:97)
at com.sun.messaging.jms.ra.ManagedConnection.<init>(ManagedConnection.java:196)
at com.sun.messaging.jms.ra.ManagedConnectionFactory.createManagedConnection(ManagedConnectionFactory.java:226)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.getUnpooledConnection(ConnectorConnectionPoolAdminServiceImpl.java:698)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.testConnectionPool(ConnectorConnectionPoolAdminServiceImpl.java:426)
at com.sun.enterprise.connectors.ConnectorRuntime.pingConnectionPool(ConnectorRuntime.java:1086)
at org.glassfish.jms.admin.cli.JMSPing.pingConnectionPool(JMSPing.java:224)
at org.glassfish.jms.admin.cli.JMSPing.execute(JMSPing.java:137)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1045)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
at org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:202)
at org.glassfish.admin.rest.resources.TemplateExecCommand.executeCommand(TemplateExecCommand.java:127)
at org.glassfish.admin.rest.resources.TemplateCommandGetResource.processGet(TemplateCommandGetResource.java:78)
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.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
at com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer._service(GrizzlyContainer.java:182)
at com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer.service(GrizzlyContainer.java:147)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:184)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:337)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:198)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
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 java.net.Socket.<init>(Socket.java:425)
at java.net.Socket.<init>(Socket.java:208)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.makeSocketWithTimeout(PortMapperClient.java:272)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.readBrokerPorts(PortMapperC|#]



 Comments   
Comment by Jason Lee [ 17/Jan/12 ]

This issue is not present in 3.1.2, which is scheduled to be released early next month.

Comment by bthalmayr [ 17/Jan/12 ]

Has there been a bug-id to track this issue? I searched for it before opening this issue, but I have not found one which matched exactly what I experienced.

Comment by Jason Lee [ 17/Jan/12 ]

I don't recall one off-hand. It very likely may have been something found and fixed by the dev team, so no issue would have been filed.





[GLASSFISH-18161] Exception trying to create cluster in web distribution Created: 10/Jan/12  Updated: 13/Jan/12  Resolved: 10/Jan/12

Status: Closed
Project: glassfish
Component/s: admin_gui
Affects Version/s: 3.1.2_b16
Fix Version/s: 3.1.2_b17

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

ogs-3.1.2-web-b17-01_09_2012.zip


Attachments: Text File diff.text     Text File server.log.txt     JPEG File syntaxException.JPG    
Tags: 312_qa, 312_regression, 312_verified, 3_1_2-approved

 Description   

Start Admin Console and click on Clusters, New Cluster. The following exception is printed on screen:

class com.sun.jsftemplating.layout.SyntaxException

The server.log file contains:

[#|2012-01-09T19:00:41.191-0800|SEVERE|glassfish3.1.2|javax.enterprise.system.st
d.com.sun.enterprise.server.logging|_ThreadID=26;_ThreadName=Thread-2;|java.io.F
ileNotFoundException: /jms/jmsHandlers.inc
at com.sun.jsftemplating.util.IncludeInputStream.startInclude(IncludeInp
utStream.java:190)
at com.sun.jsftemplating.util.IncludeInputStream.read(IncludeInputStream
.java:80)
at com.sun.jsftemplating.util.IncludeInputStream.read(IncludeInputStream
.java:121)

Will attach screenshot and server.log.



 Comments   
Comment by Anissa Lam [ 10/Jan/12 ]

jms plugin is not included in the web distribution. The jms handler file needs to be in the cluster plugin.

What is the impact on the customer of the bug?
big impact. user will not be able to create cluster in web distribution.

What is the cost/risk of fixing the bug?
very min. Just move the file to the console cluster module

Is there an impact on documentation or message strings?
No

Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
verify that cluster can be created in both web and glassfish dist.

Which is the targeted build of 3.1.2 for this fix?
3_1_2_b17

Diff is attached.
admingui/jms-plugin/src/main/resources/jmsHandlers.inc is moved to
admingui/cluster/src/main/resources/shared/jmsHandlers.inc

Comment by Jason Lee [ 10/Jan/12 ]

Change looks good to me.

Comment by marina vatkina [ 10/Jan/12 ]

JMS is not part of the WEB profile in Java EE 6

Comment by Anissa Lam [ 10/Jan/12 ]

Fix checked into 3.1.2 branch.

Log Message:
------------
GLASSFISH-18161. Move the jms handler to console cluster plugin package, since jms plugin is not available in Web profile.
Approved by Joe.

Revisions:
----------
51996
Modified Paths:
---------------
branches/3.1.2/admingui/cluster/src/main/resources/cluster/clusterNew.jsf
Added Paths:
------------
branches/3.1.2/admingui/cluster/src/main/resources/shared/jmsHandlers.inc

============

Revisions:
----------
51997
Modified Paths:
---------------
branches/3.1.2/admingui/jms-plugin/src/main/resources/jmsAvailabilityService.jsf

Comment by lidiam [ 13/Jan/12 ]

verified in build ogs-3.1.2-web-b17.zip





[GLASSFISH-18160] View Raw Log button missing on clustered instance page Created: 10/Jan/12  Updated: 11/Jan/12  Resolved: 11/Jan/12

Status: Closed
Project: glassfish
Component/s: admin_gui
Affects Version/s: 3.1.2_b16
Fix Version/s: 3.1.2_b17

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

ogs-3.1.2-b17-01_09_2012.zip


Attachments: Text File log-diff.text     JPEG File raw-log-button-missing.JPG    
Tags: 312_gui_new, 312_qa, 312_verified, 3_1_2-approved

 Description   

View Raw Log button is missing on clustered instance page (see attached file).



 Comments   
Comment by Anissa Lam [ 10/Jan/12 ]

The fix below fixes the following:

  • add View Log Raw button in clustered instance page
  • for standalone instance, the View Log Raw button is enabled even when the instance is stopped.
  • The View Low Raw button is using the same logviewer window, thus prevent user to view the raw log and the formatted log at the same time.
  • What is the impact on the customer of the bug?
    Nothing really serious, but much better user experience if the above is fixed.

What is the cost/risk of fixing the bug?
very min. Those are very simple changes.

Is there an impact on documentation or message strings?
No

Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
The test plan related to view raw log

Which is the targeted build of 3.1.2 for this fix?
3_1_2_b17

Diff is attached.

Comment by Anissa Lam [ 11/Jan/12 ]

Fixed in 3.1.2 branch.

Log Message:
------------
GLASSFISH-18160. Changes related to View Log Raw buttons.

  • button is enabled only when instance is running; add button to cluster instance; separate raw log and formated log window.

Revisions:
----------
51998

Modified Paths:
---------------
branches/3.1.2/admingui/cluster/src/main/resources/standalone/standaloneInstanceGeneral.jsf
branches/3.1.2/admingui/cluster/src/main/resources/cluster/clusterInstanceEdit.jsf
branches/3.1.2/admingui/common/src/main/resources/appServer/serverInstGeneralPe.jsf

Comment by lidiam [ 11/Jan/12 ]

Verified in build ogs-3.1.2-b17.zip.





[GLASSFISH-18157] startup/deployment benchmark shows GC spending more time in permgen collection and resizing Created: 09/Jan/12  Updated: 10/Jan/12  Resolved: 10/Jan/12

Status: Resolved
Project: glassfish
Component/s: performance
Affects Version/s: 3.1.2_b16
Fix Version/s: 3.1.2_b17

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

Windows XP, Windows 7, Mac OS


Issue Links:
Dependency
blocks GLASSFISH-17720 regression in startup/deployment benc... Closed
Tags: 3_1_2-approved

 Description   

Startup/deployment benchmark has regressed for quite sometime in 3.1.2. Regression has been around 6%.
During profiling/analysis we have found GC is spending more time in collecting/resizing permanent generation. When we set the initial permsize size to 64m we see an improvement of 4 to 5% in startup/deployment benchmark. We have tried this setting on Windows XP, Windows 7 and Mac OSX, and all these platform have showed improvement in results. Based on this we would like to recommend -XX:PermSize=64m as out-of-the-box setting.



 Comments   
Comment by Joe Di Pol [ 09/Jan/12 ]

The proposed fix is to add "-XX:PermSize=64m" to server startup.

  • What is the impact on the customer of the bug?

There is not a significant customer impact, but the developer startup/deployment benchmark is included in our release criteria. There has been a regression in this benchmark, and this tuning parameter helps to mitigate that regression.

  • What is the cost/risk of fixing the bug?

The fix is trivial. We just need to add "-XX:PermSize=64m" to domain.xml. Possible risks:

1) The fix results in increased memory footprint. Mitigation: the performance team has already checked this and has seen no noticable increase in memory footprint.
2) The fix causes issues with jrockit as an unknown VM argument. Mitigation: we already set "-XX:MaxPermSize=192m" and jrockit just gives a warning and ignores the unknown option.

So given that the fix appears to be low risk.

  • Is there an impact on documentation or message strings?

No

  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?

No special testing required. The fix will be exercised during all tests.

  • Which is the targeted build of 3.1.2 for this fix?

17

Comment by Joe Di Pol [ 10/Jan/12 ]

3.1.2 branch r51992

Still need to port to trunk.





[GLASSFISH-18148] Unable to access AdminConsole on Win2008 with JDK1.7.0_02 - works with JDK1.6.0_30 Created: 07/Jan/12  Updated: 08/Jan/12  Resolved: 08/Jan/12

Status: Resolved
Project: glassfish
Component/s: admin_gui
Affects Version/s: 3.1.2_b16
Fix Version/s: 3.1.2_b17

Type: Bug Priority: Critical
Reporter: Alex Pineda Assignee: Anissa Lam
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 2008 R2 system with 64bit OS. GF 3.1.2 build16. JDK1.7.0_02. Firefox browser 3.6.25. Default GF installation


Attachments: Text File server.log    
Issue Links:
Duplicate
duplicates GLASSFISH-18137 Exception thrown when running on jdk ... Resolved
duplicates GLASSFISH-18133 JDK 1.7.0_02 - Nodes/instances creati... Resolved
is duplicated by GLASSFISH-18125 Cannot access admin console on clean ... Resolved
Tags: 312_qa

 Description   

This scenario works with JDK 1.6.0_30 without issues.

The issue is seen after installing GF3.1.2 build16 with JDK1.7.0_02 and attempting to get into the AdminConsole. Specific to http://localhost:4848. The installation is done with all default values (ports and no password), but when to attempting to login, the Admin Console username/password login screen is displayed and since no password was set, unable to login. In the server log the following is reported:

[#|2012-01-07T09:57:55.795-0800|SEVERE|glassfish3.1.2|org.glassfish.admin.rest.LazyJerseyInit|_ThreadID=72;_ThreadName=Thread-2;|java.lang.ClassNotFoundException: org.glassfish.admin.rest.resources.generatedASM.DomainResource not found by org.glassfish.main.admin.rest-service [221]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDele
gation(BundleWiringImpl.java:1460)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringIm
pl.java:72)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadCla
ss(BundleWiringImpl.java:1843)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at org.glassfish.admin.rest.LazyJerseyInit.getResourcesConfigForManageme
nt(LazyJerseyInit.java:259)
at org.glassfish.admin.rest.adapter.RestManagementAdapter.getResourcesCo
nfig (RestManagementAdapter.java:62)
at org.glassfish.admin.rest.adapter.RestAdapter.exposeContext(RestAdapte
r.java:340)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java
:148)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java
:179)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java
:117)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(Container
Mapper.java:238)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:8
49)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFil
ter.java:228)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultPro
tocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.jav
a:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.jav
a:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java
:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextT
ask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.
java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadP
ool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool
.java:513)
at java.lang.Thread.run(Thread.java:722) |#]

Attaching the server log as to provide more detail.



 Comments   
Comment by Anissa Lam [ 08/Jan/12 ]

We are seeing issues with JDK7u2. I filed GLASSFISH-18137 which is closed a duplicate of 18133.
Tom fixed 18133 on 1/6, and with that fix, Mitesh confirmed that the issues go away for him on his windows system. (Before the fix, he reproduced that consistently).
exception shown in the server.log is the same like the other two. I am marking this as duplicate.
Please try 1/7 nightly build, you can reopen if problem persists.





[GLASSFISH-18145] regression in instances joining cluster after "asadmin start-cluster" Created: 07/Jan/12  Updated: 10/Jan/12  Resolved: 09/Jan/12

Status: Resolved
Project: glassfish
Component/s: group_management_service
Affects Version/s: 3.1.2_b14, 3.1.2_b15, 3.1.2_b16
Fix Version/s: 3.1.2_b17

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

Attachments: Text File easqezorro1_domain.log    
Tags: 3_1_2-approved

 Description   

Also see shoal http://java.net/jira/browse/SHOAL-118.

The regression was introduced on 11/14 and/or 11/17 in fixing bug 13375653.
Link: https://bug.oraclecorp.com/pls/bug/webbug_print.show?c_rptno=13375653

Regression is multiple joins for same instance can occur in DAS after "asadmin start-cluster".
These multiple joins result in a slower time from start-cluster to when "asadmin get-health <cluster-name>"
shows all members have joined the cluster.

The time for the cluster to startup was well under 45 seconds for Glassfish Shoal SQE tests starting
a 9 instance cluster. Regression has resulted in timings that take over 65 seconds sometimes.
(there is quite a variance in how much slower startup can be. we did observe it taking over 65 seconds
for the submittted case)



 Comments   
Comment by Joe Fialli [ 07/Jan/12 ]

Fix has been identified, sanity tested by running one Glassfish Shoal SQE test and analyzing output.
No duplicate joins are occurring in DAS server log when run with shoal-gms-impl patch.
Waiting for full SQE test run on patch to ensure no regressions.

Change Control Form

  • What is the impact on the customer of the bug?

How likely is it that a customer will see the bug and how serious is the bug?
The customer is likely to observe that the time from calling "start-cluster" to "asadmin get-health <clustername>"
to list that all instances have started has gotten longer. Additionally, multiple joins per instance may occur.
(most code works off joined and ready notifications, so this problem has not impacted failover which has a joined and ready handler.)

Is it a regression?
It is a performance regression on how long it takes for all instances in cluster to join cluster after a start-cluster.
Yes. The regression was introduced fixing bug 13375653
Link: https://bug.oraclecorp.com/pls/bug/webbug_print.show?c_rptno=13375653

The regression impacts the Shoal Glassfish SQE tests since it double checks that the cluster is entirely up and healthy
and the time the test has to wait to check if cluster started correctly had to be increased from 45 seconds to 90 seconds.
Addressing this issue will remove having to change the existing SQE tests to account for this performance regression in
starting a 10 instance cluster.

Does it meet other bug fix criteria (security, performance, etc.)?
Fix will improve start-cluster performance.

  • What is the cost/risk of fixing the bug?

How risky is the fix? How much work is the fix? Is the fix complicated?

Fix is not risky. Only one file is changed and the change is
to add a single if conditional. The change eliminates duplicate
joins for a cluster member as the cluster starts up. Change was reviewed by Mahesh.

  • Is there an impact on documentation or message strings?
    There is no impact to documentation or message strings.
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
    Glassfish Shoal SQE tests are being run now.
  • Which is the targeted build of 3.1.2 for this fix?
    Next build.
Comment by Joe Fialli [ 09/Jan/12 ]

Shoal 1.6.17 integrated in into gf 3.1.2 workspace.
Fix available as part of glassfish 3.1.2 b17.

Comment by Joe Fialli [ 10/Jan/12 ]

Shoal 1.6.17 integrated into bg trunk as part of svn version 52009 on January 10, 2012.
Fix should be in next promoted build which is 4.0 b19.





[GLASSFISH-18143] JTA log directory value coming as ./jts for wsat Created: 06/Jan/12  Updated: 06/Feb/12  Resolved: 08/Jan/12

Status: Closed
Project: glassfish
Component/s: jts
Affects Version/s: 3.1.2
Fix Version/s: 3.1.2_b17

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

Tags: 3_1_2-approved

 Description   

WSIT-1606 is caused as JTA changes made for logging dir are resulting in WSAT logs not getting created.



 Comments   
Comment by marina vatkina [ 06/Jan/12 ]
  • What is the impact on the customer of the bug?

How likely is it that a customer will see the bug and how serious is the bug?
Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)?

WS-AT integration is broken because the directory is not calculated properly

  • What is the cost/risk of fixing the bug?

How risky is the fix? How much work is the fix? Is the fix complicated?

Very low risk - only WS-AT code uses the result

  • Is there an impact on documentation or message strings?

None

  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?

None

  • Which is the targeted build of 3.1.2 for this fix?

Next

Comment by marina vatkina [ 08/Jan/12 ]

Fixed with rev 51946





[GLASSFISH-18141] mappedName not working when injecting primitive or string custom resources Created: 06/Jan/12  Updated: 09/Jan/12  Resolved: 09/Jan/12

Status: Resolved
Project: glassfish
Component/s: naming
Affects Version/s: 3.1.2, 4.0
Fix Version/s: 3.1.2_b17, 4.0

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

Tags: 3_1_2-approved

 Description   

Link to GlassFish forum thread:

http://www.java.net/forum/topic/glassfish/glassfish/how-inject-resource-env-rev-using-primitivesandstringfactory

When injecting the custom resource with @Resouce, using lookup attr worked, but mappedName didn't.

More generally, it's beyond custom resource. Any such use of <env-entry> has this problem.



 Comments   
Comment by exabrial [ 06/Jan/12 ]

May or may/not be related to this issue:

http://java.net/jira/browse/GLASSFISH-18096

Comment by Cheng Fang [ 08/Jan/12 ]
  • What is the impact on the customer of the bug?
    How likely is it that a customer will see the bug and how serious is the bug?
    Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)?

Customers will come across this bug when use <env-entry> with mapped-name, or @Resource(mappedName=) for env-entry types. Not a regression, not related to security or performance.

  • What is the cost/risk of fixing the bug?
    How risky is the fix? How much work is the fix? Is the fix complicated?

Low risk, takes about 1 day of work, the fix is not complicated. Need to include mappedName when determining if an env-entry needs to be injected.

  • Is there an impact on documentation or message strings?
    No
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
    Regular tests.
  • Which is the targeted build of 3.1.2 for this fix?
    b17
Comment by scatari [ 09/Jan/12 ]

This is approved.

Comment by Cheng Fang [ 09/Jan/12 ]

Committed revision 51967. to trunk

Comment by Cheng Fang [ 09/Jan/12 ]

Committed revision 51975. to 3.1.2 branch.





[GLASSFISH-18140] create-password-alias description is wrong about passwords on the command line Created: 06/Jan/12  Updated: 10/Jan/12  Resolved: 10/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.1
Fix Version/s: 3.1.2_b17

Type: Bug Priority: Minor
Reporter: Bill Shannon Assignee: Paul Davies
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The create-password-alias description says:

This subcommand creates an alias for a password and stores it in domain.xml. An alias is a token of the form $

{ALIAS=password-alias-password}

. The password corresponding to the alias name is stored in an encrypted form. The create-password-alias command takes both a secure interactive form (in which the user is prompted for all information) and a more script-friendly form, in which the password is propagated on the command line.

I don't believe there's an option to pass the password on the command line. Instead, for scripts,
the password needs to be passed in a password file, and the command description should describe
how to do that.



 Comments   
Comment by Paul Davies [ 10/Jan/12 ]

Fix committed in revision 51972.





[GLASSFISH-18136] Blocking: RuntimeException modifying EJB Timer Service Created: 06/Jan/12  Updated: 11/Jan/12  Resolved: 06/Jan/12

Status: Closed
Project: glassfish
Component/s: admin_gui
Affects Version/s: 3.1.2_b16
Fix Version/s: 3.1.2_b17

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

ogs-3.1.2-b16.zip


Attachments: JPEG File runtime-exception.JPG     Text File server.log.txt    
Issue Links:
Duplicate
duplicates GLASSFISH-18107 error message appearing after 'save' ... Resolved
Tags: 312_blocking, 312_qa, 312_regression, 312_verified

 Description   

Saving of EJB Timer Service page causes RuntimeException on the screen. Steps to reproduce:

1. Create a cluster.
2. Go to cluster configuration, EJB Container -> EJB Timer Settings.
3. Hit Save, no need to enter anything, and the RuntimeException is displayed. DAS server.log contains the following:

[#|2012-01-05T16:52:57.096-0800|WARNING|glassfish3.1.2|javax.enterprise.resource.webcontainer.jsf.lifecycle|_ThreadID=112;_ThreadName=Thread-2;|java.lang.RuntimeException while attempting to process a 'command' event for 'saveButton'.
java.lang.RuntimeException: java.lang.RuntimeException while attempting to process a 'command' event for 'saveButton'.
...
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map
at org.glassfish.admingui.common.util.RestUtil.parseResponse(RestUtil.java:310)

This is a regression and it is blocking testing of listing ejb timers.



 Comments   
Comment by Anissa Lam [ 06/Jan/12 ]

This is dup. of GLASSFISH-18107.

Comment by lidiam [ 11/Jan/12 ]

Verified in build ogs-3.1.2-b17.zip.





[GLASSFISH-18135] Blocking: Log not displayed in raw log viewer Created: 06/Jan/12  Updated: 11/Jan/12  Resolved: 09/Jan/12

Status: Closed
Project: glassfish
Component/s: admin_gui
Affects Version/s: 3.1.2_b16
Fix Version/s: 3.1.2_b17, 4.0

Type: Bug Priority: Critical
Reporter: lidiam Assignee: andriy.zhdanov
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

ogs-3.1.2-b16.zip, DAS on solaris, console on WinXP, Chrome.


Attachments: JPEG File rawlogempty.JPG     File working.diff    
Tags: 312_blocking, 312_qa, 312_regression, 312_verified, 3_1_2-approved

 Description   

Raw Log Viewer does not display server.log. Steps to reproduce:

1. In Admin Console go to server node.
2. Click on Raw Log Viewer button - log is not displayed in the newly opened window.

This happens for DAS or any instance. It is a regression and it's blocking from further testing raw log viewer. I tried in both Chrome and Firefox with the same result.



 Comments   
Comment by Anissa Lam [ 06/Jan/12 ]

Here is what i see.
server installed on host1, enable secure admin.

If you launch gui using localhost:4848, then it will ask for admin username/password.
If you luanch gui using hostname:4848, then it won't ask for admin username/password, but didn't show anything.
Are you sure this is a regression ? If so, which build you see this working, that will help.

Comment by Anissa Lam [ 06/Jan/12 ]

accidentally mark fixed. reopen so Andriy can take a look.

Comment by andriy.zhdanov [ 09/Jan/12 ]
  • What is the impact on the customer of the bug?

Minimal.

  • What is the cost/risk of fixing the bug?

No risk.

  • Is there an impact on documentation or message strings?

No

  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?

View Raw Log

  • Which is the targeted build of 3.1.2 for this fix?

3_1_2_b17

Comment by andriy.zhdanov [ 09/Jan/12 ]

Committed revision 51981
Committed revision 51982

Comment by lidiam [ 11/Jan/12 ]

Verified in build ogs-3.1.2-b17.zip





[GLASSFISH-18134] Embedded SSL configuration needs default classname Created: 06/Jan/12  Updated: 06/Jan/12  Resolved: 06/Jan/12

Status: Resolved
Project: glassfish
Component/s: embedded
Affects Version/s: None
Fix Version/s: 3.1.2_b17, 4.0_b19

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

Tags: 3_1_2-approved

 Description   

Embedded SSL configuration should set the default server certificate and classname attributes.



 Comments   
Comment by Amy Roh [ 06/Jan/12 ]

Fixed in the trunk.

Sending web-embed/impl/src/main/java/org/glassfish/web/embed/impl/WebContainerImpl.java
Transmitting file data .
Committed revision 51917.

Comment by Amy Roh [ 06/Jan/12 ]
  • What is the impact on the customer of the bug?

The fix is required if custom keystore needs to be configured using embedded SslCOnfig API.

How likely is it that a customer will see the bug and how serious is the bug?

Only when the API is used. No security or performance impact.

  • What is the cost/risk of fixing the bug?

Cost is low. No impact on non-embedded or embedded that doesn't require this API.

How risky is the fix? How much work is the fix? Is the fix complicated?

Very low. Two lines to set default values.

  • Is there an impact on documentation or message strings?

No.

  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?

None. Embedded tests running in Hudson should be fine.

  • Which is the targeted build of 3.1.2 for this fix?

17

Comment by Amy Roh [ 06/Jan/12 ]

Fixed in 3.1.2.

Sending web-embed/impl/src/main/java/org/glassfish/web/embed/impl/WebContainerImpl.java
Transmitting file data .
Committed revision 51919.





[GLASSFISH-18133] JDK 1.7.0_02 - Nodes/instances creation - failed: java.lang.RuntimeException: Cannot find annotation org.glassfish .... Created: 05/Jan/12  Updated: 17/Jan/12  Resolved: 06/Jan/12

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: 3.1.2_b16
Fix Version/s: 3.1.2_b17, 4.0_b19

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

Attachments: Text File 51935.diff.txt    
Issue Links:
Duplicate
is duplicated by GLASSFISH-18148 Unable to access AdminConsole on Win2... Resolved
is duplicated by GLASSFISH-18125 Cannot access admin console on clean ... Resolved
Related
is related to GLASSFISH-18063 Require to username/password to acces... Resolved
is related to GLASSFISH-18112 Solaris 11, create-jmsdest, list-jmsd... Closed
Tags: 3_1_2-approved

 Description   

Three Win 2008 machines (all machines had Cygwin installation), 3.1.2 build 16. Tried to setup a cluster with three instances, one instance per a machine. But either nodes creation or instances creation or both
failed randomly with such messages:

=============================================================
remote failure: java.lang.RuntimeException: Cannot find annotation
org.glassfish
.config.support.Create with value _register-instance on method public
abstract c
om.sun.enterprise.config.serverbeans.Server
com.sun.enterprise.config.serverbean
s.Servers.getServer(java.lang.String)
Cannot find annotation org.glassfish.config.support.Create with value
_register-
instance on method public abstract
com.sun.enterprise.config.serverbeans.Server
com.sun.enterprise.config.serverbeans.Servers.getServer(java.lang.String)
==========================================================

For example, I've unzippped bits and tried such sequence of commands:

=============================================
asadmin start-domain
Waiting for domain1 to start ...
Successfully started the domain : domain1
domain Location: C:\export\glassfish3\glassfish\domains\domain1
Log File: C:\export\glassfish3\glassfish\domains\domain1\logs\server.log
Admin Port: 4848
Command start-domain executed successfully.

asadmin change-admin-password
Enter admin user name [default: admin]>
Enter admin password>
Enter new admin password>
Enter new admin password again>
Command change-admin-password executed successfully.

asadmin enable-secure-admin
Enter admin user name> admin
Enter admin password for user "admin">
You must restart all running servers for the change in secure admin to
take effect.
Command enable-secure-admin executed successfully.

asadmin stop-domain
Waiting for the domain to stop ....
Command stop-domain executed successfully.

asadmin start-domain
Waiting for domain1 to start ...
Successfully started the domain : domain1
domain Location: C:\export\glassfish3\glassfish\domains\domain1
Log File: C:\export\glassfish3\glassfish\domains\domain1\logs\server.log
Admin Port: 4848
Command start-domain executed successfully.

asadmin --user admin --passwordfile password.txt
create-cluster c1
Command create-cluster executed successfully.

asadmin --user admin --passwordfile password.txt
create-node-ssh --nodehost bigapp-x2250-1 node1
Command create-node-ssh executed successfully.

asadmin --user admin --passwordfile password.txt
create-node-ssh --nodehost bigapp-oblade-1 node2
Command create-node-ssh executed successfully.

asadmin --user admin --passwordfile password.txt
create-node-ssh --nodehost bigapp-oblade-2 node3
Command create-node-ssh executed successfully.

asadmin --user admin --passwordfile password.txt
create-instance --cluster c1 --node node1 in1
remote failure: java.lang.RuntimeException: Cannot find annotation
org.glassfish.config.support.Create with value _register-instance on method public
abstract com.sun.enterprise.config.serverbeans.Server
com.sun.enterprise.config.serverbean
s.Servers.getServer(java.lang.String)
Cannot find annotation org.glassfish.config.support.Create with value
_register-
instance on method public abstract
com.sun.enterprise.config.serverbeans.Server
com.sun.enterprise.config.serverbeans.Servers.getServer(java.lang.String)
Command create-instance failed.
=============================================================================

Other time create-node-ssh also failed:

=========================================================================
asadmin --user admin --passwordfile password.txt
create-node-ssh --nodhost bigapp-x2250-1 node1
emote failure: java.lang.RuntimeException: Cannot find annotation
org.glassfish
config.support.Create with value _create-node on method public abstract
com.sun
enterprise.config.serverbeans.Node
com.sun.enterprise.config.serverbeans.Nodes.
etNode(java.lang.String)
annot find annotation org.glassfish.config.support.Create with value
_create-no
e on method public abstract com.sun.enterprise.config.serverbeans.Node
com.sun.
nterprise.config.serverbeans.Nodes.getNode(java.lang.String)
ommand create-node-ssh failed.
=========================================================================



 Comments   
Comment by Tom Mueller [ 05/Jan/12 ]

The root cause of this problem appears to be a latent bug in the GenericCrudCommand.postConstruct method where the value of targetMethod is determined. The bug is triggered by the Nodes interface having two getNode methods:

public List<Node> getNode();
public Node getNode(String name);

The following for loop in GenericCrudCommand.postConstruct will pick either of them:

        // find now the accessor method.
        String methodName = myself.metadata().get("method-name").get(0);
        targetMethod=null;
        for (Method m : parentType.getMethods()) {
            if (m.getName().equals(methodName)) {
                targetMethod=m;
                break;
            }
        }

because it only compares the method name and not the signature. If this loop choses the second getNode method, then the @Create annotation is not found so you get the exception.

This has been there a long time, and it is a wonder that we haven't see this problem earlier. There must be something in the test environment that is causing the order of methods to change (but just sometimes).

An easy fix for this is to change the name of the second method to something other than getNode. Since it is a DuckTyped method, it can be called anything.

Comment by Tom Mueller [ 05/Jan/12 ]

Assigning to Joe to make the change in Nodes. If you feel that this really should be fixed in GenericCrudCommand, let's discuss.

Comment by Tom Mueller [ 05/Jan/12 ]

Note: I found the following exception message in the server log where this is happening:

[#|2012-01-05T11:40:20.938-0800|SEVERE|glassfish3.1.2|javax.enterprise.system.tools.admin.com.sun.enterprise.v3.admin|_ThreadID=89;_ThreadName=Thread-2;|Exception in command execution : java.lang.RuntimeException: Cannot find annotation org.glassfish.config.support.Create with value _create-node on method public abstract com.sun.enterprise.config.serverbeans.Node com.sun.enterprise.config.serverbeans.Nodes.getNode(java.lang.String)^M
java.lang.RuntimeException: Cannot find annotation org.glassfish.config.support.Create with value _create-node on method public abstract com.sun.enterprise.config.serverbeans.Node com.sun.enterprise.config.serverbeans.Nodes.getNode(java.lang.String)^M
at org.glassfish.config.support.GenericCrudCommand.getAnnotation(GenericCrudCommand.java:196)^M
at org.glassfish.config.support.GenericCreateCommand.postConstruct(GenericCreateCommand.java:90)

Node that the method in the exception message is the one that takes a String as an argument, not the one that takes no arguments, i.e., the one with the @Create annotation.

Comment by Tom Mueller [ 05/Jan/12 ]

Elena reports that she is using JDK 1.7.0_02 on the system. It may be that Java SE 7 returns the list of methods in a class in a different order from run to run, which would trigger this bug.

Comment by Joe Di Pol [ 05/Jan/12 ]

Tom, thanks for the legwork on this. I'll go ahead and change the method name so we can get a quick fix.

Comment by scatari [ 05/Jan/12 ]

This could very well be related to http://java.net/jira/browse/GLASSFISH-18063.

Comment by easarina [ 05/Jan/12 ]

I've tried to execute create-node-ssh on another Win 2008 machine and it wailed with the same error message. Was used the same JDK 1.7.0_02 and 3.1.2 b16.

Comment by Tom Mueller [ 06/Jan/12 ]

There are other config beans in 3.1.2 that have this same problem:

Nodes
Clusters
LbConfigs
LoadBalancers
Servers

Comment by Joe Di Pol [ 06/Jan/12 ]

Assigning back to Tom who has an idea for a generic fix to GenericCrudCommand.postConstruct().

Comment by Tom Mueller [ 06/Jan/12 ]
  • What is the impact on the customer of the bug?

How likely is it that a customer will see the bug and how serious is the bug?
Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)?

This bug shows up whenever JDK1.7.0_02 is uses. So any users that use that JDK will see this bug if they use Nodes, Servers, or load balancers.

  • What is the cost/risk of fixing the bug?

How risky is the fix? How much work is the fix? Is the fix complicated?

The fix effects the processing of generic CRUD commands. The fix is contained to a small area of the code, and the fix should be relatively simple (once the right fix is determined).

  • Is there an impact on documentation or message strings?
    No.
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?

Tests involving node creation/deletion, and load balancer creation/deletion.

  • Which is the targeted build of 3.1.2 for this fix?

17

Comment by Tom Mueller [ 06/Jan/12 ]

Fixed on the 3.1.2 branch in revision 51935.
Fixed on the trunk in revision 51936.

Comment by Alex Pineda [ 07/Jan/12 ]

I'm seeing a similar problem on a Win2008 with JDK1.7.0_02 when I try to start a local instance ("asadmin start-local-instance st1")after performing an update. No problem when I use JDK1.6.0_30.

The following errors were displayed when I tried to start the local instance in verbose mode:

CLI801 Instance is already synchronized
Jan 6, 2012 4:09:14 PM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: Successfully launched in 11 msec.
Launching GlassFish on Felix platform
[#|2012-01-06T16:09:18.486-0800|INFO|glassfish3.1.2|com.sun.enterprise.server.logging.GFFileHandler|_ThreadID=1;_ThreadName=main;|Running GlassFish Version: GlassFish Server Open Source Edition 3.1.2-b16 (build 16)|#]

[#|2012-01-06T16:09:18.854-0800|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=1;_ThreadName=main;|Exception in thread "main" |#]

[#|2012-01-06T16:09:18.862-0800|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=1_ThreadName=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(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMa
in.java:97)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
Caused by: java.lang.RuntimeException:javax.management.MBeanRegistrationExcepti
on: Exception thrown in preRegister method
at java.lang.management.ManagementFactory.addMXBean(ManagementFactory.ja
va:824)
at java.lang.management.ManagementFactory.getPlatformMBeanServer(Managem
entFactory.java:481)
at org.glassfish.admin.monitor.MonitoringBootstrap.setStatsProviderManag
erDelegate(MonitoringBootstrap.java:227)
at org.glassfish.admin.monitor.MonitoringBootstrap.enableMonitoringForPr
obeProviders(MonitoringBootstrap.java:634)
at org.glassfish.admin.monitor.MonitoringBootstrap.postConstruct(Monitor
ingBootstrap.java:176)
at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.
java:131)
at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreato
r.java:91)
at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.jav
a:82)
at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.jav
a:67)
at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingIn
habitant.java:139)
at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantIm
pl.java:78)
at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.ja
va:229)
at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartu
p.java:145)
at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.
java:136)
at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishI
mpl.java:79)
at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(Glass
FishDecorator.java:63)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishImpl.start(O
SGiGlassFishImpl.java:69)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(
GlassFishMain.java:117)
... 6 more
Caused by: javax.management.MBeanRegistrationException: Exception thrown in preRegister method
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.throwMBeanRegis
trationException(DefaultMBeanServerInterceptor.java:993)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.preRegister(Def
aultMBeanServerInterceptor.java:1009)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamic
MBean(DefaultMBeanServerInterceptor.java:919)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(
DefaultMBeanServerInterceptor.java:900)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(D
efaultMBeanServerInterceptor.java:324)
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.j
ava:512)
at com.sun.enterprise.v3.admin.DynamicInterceptor.registerMBean(DynamicI
nterceptor.java:472)
at java.lang.management.ManagementFactory$2.run(ManagementFactory.java:8
19)
at java.lang.management.ManagementFactory$2.run(ManagementFactory.java:8
15)
at java.security.AccessController.doPrivileged(Native Method)
at java.lang.management.ManagementFactory.addMXBean(ManagementFactory.ja
va:815)
... 23 more
Caused by: javax.management.InstanceAlreadyExistsException: MXBean already registered with name java.lang:type=GarbageCollector,name=PS Scavenge
at com.sun.jmx.mbeanserver.MXBeanLookup.addReference(MXBeanLookup.java:1
51)
at com.sun.jmx.mbeanserver.MXBeanSupport.register(MXBeanSupport.java:160
)
at javax.management.StandardMBean.preRegister(StandardMBean.java:1075)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.preRegister(Def
aultMBeanServerInterceptor.java:1007)
... 32 more

Comment by Joe Di Pol [ 13/Jan/12 ]

For reference, Sathyan found a JDK 7 bug that describes this change in behavior. It has been closed as not-a-bug:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7023180

Comment by Tom Mueller [ 17/Jan/12 ]

Diffs for revision 51935.





[GLASSFISH-18132] filter does not work with empty url Created: 05/Jan/12  Updated: 07/Jan/12  Resolved: 07/Jan/12

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

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

Tags: 3_1_2-approved

 Description   

While the url pattern "" is working for servlet, but it is not for filter.



 Comments   
Comment by Shing Wai Chan [ 05/Jan/12 ]
  • What is the impact on the customer of the bug?
    One cannot use the filter with url pattern "" without the fix.
  • What is the cost/risk of fixing the bug? Low. One line change in Grizzly code.
  • Is there an impact on documentation or message strings? No
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish? web
  • Which is the targeted build of 3.1.2 for this fix? b17
Comment by Shing Wai Chan [ 05/Jan/12 ]

I have committed the fix to
modules/utils/src/main/java/com/sun/grizzly/util/http/mapper/Mapper.java
in 1.9.x (Revision: e16b554dead432e23d7a7deb4d9764bc69fc650a).

The same fix has been ported to master (Revision: fa5dec929ba0dbae4d10596b50d6d6b02d7e6e09)
and Grizzly 2.1.x (Revision: ebf887922b87ed4374a4ebaa2a194554e1f8fb72).

Comment by agksmehx [ 06/Jan/12 ]

Please accept this customer's gratitude for such a prompt fix!

Comment by Ryan Lubke [ 07/Jan/12 ]

Sending packager/resources/pkg_conf.py
Sending pom.xml
Transmitting file data ..
Committed revision 51942.





GlassFish News page needs revisited (GLASSFISH-18126)

[GLASSFISH-18127] OLH for common task page needs change regarding to GlassFish News page Created: 05/Jan/12  Updated: 10/Jan/12  Resolved: 10/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.2_b16
Fix Version/s: 3.1.2_b17

Type: Sub-task Priority: Major
Reporter: Anissa Lam Assignee: Paul Davies
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Refer to main task.



 Comments   
Comment by Paul Davies [ 10/Jan/12 ]

Fix committed in revision 51972.





[GLASSFISH-18126] GlassFish News page needs revisited Created: 05/Jan/12  Updated: 05/Jan/12  Resolved: 05/Jan/12

Status: Resolved
Project: glassfish
Component/s: admin_gui
Affects Version/s: 3.1.1_b12
Fix Version/s: 3.1.2_b17

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

Attachments: PNG File commonTask.png     Text File diff.text    
Sub-Tasks:
Key
Summary
Type
Status
Assignee
GLASSFISH-18127 OLH for common task page needs change... Sub-task Resolved Paul Davies  
Tags: 3_1_2_approved

 Description   

In the common task page, there is a link to GlassFish News page.
This page is used to aggregate many different blogs, podcast, news, learning, supports etc. related to Java EE and GlassFish.
However, many of these blogs are not active, and outdated.
The page is based on jmaki code, and several browser are not able to show that page.
Errors such as "Unable to find widget constructor for jmaki.widgets.jmaki.blockList.Widget." as showing up.

Since the active blogs on that page is the Aquarium, it is decided to just have that link to the Aquarium blogs.



 Comments   
Comment by Anissa Lam [ 05/Jan/12 ]

The team decided to remove the GlassFish News page, and the link from the common task will bring up the Aquarium.

  • What is the impact on the customer of the bug?
    User is seeing outdated, inactive blog, may have browser issue and may have security issue related to jmaki.
  • What is the cost/risk of fixing the bug?
    1 day. rework the link and remove all jmaki related codes/jars.
  • Is there an impact on documentation or message strings?
    Yes. a doc sub task has been filed. GLASSFISH-18127
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
    Ensure the link in the common task section works fine.
  • Which is the targeted build of 3.1.2 for this fix?
    3.1.2_b17

The following files/jars are removed. The svn diff for additional changes is attached.

3.1.2/admingui/war/src/main/webapp/WEB-INF/lib/jMakiResources.jar
3.1.2/admingui/war/src/main/webapp/WEB-INF/lib/jsfcompounds-0.0.6.jar
3.1.2/admingui/war/src/main/webapp/WEB-INF/lib/ajax-wrapper-comp-1.8.1.jar

3.1.2/admingui/common/src/main/resources/sysnet/support.css (revision 51898)
3.1.2/admingui/common/src/main/resources/sysnet/sample.html (revision 51898)
3.1.2/admingui/common/src/main/resources/sysnet/learning.json (revision 51898)
3.1.2/admingui/common/src/main/resources/sysnet/support.jsf (revision 51898)
3.1.2/admingui/war/src/main/webapp/glue.js (revision 51898)
3.1.2/admingui/war/src/main/webapp/resources/xhp.json (revision 51898)

Comment by sirajg [ 05/Jan/12 ]

References to the jars being removed, should also be removed from sun-web.xml

Comment by Anissa Lam [ 05/Jan/12 ]

Yes, both web.xml and sun-web.xml has been modified to reflect the changes.
It is in diff.text thats attached.
Here it is again:

Index: war/src/main/webapp/WEB-INF/sun-web.xml
===================================================================
--- war/src/main/webapp/WEB-INF/sun-web.xml     (revision 51898)
+++ war/src/main/webapp/WEB-INF/sun-web.xml     (working copy)
@@ -61,6 +61,6 @@
        <parameter-encoding default-charset="UTF-8" />
  </locale-charset-info>

-<class-loader delegate="true" extra-class-path="WEB-INF/extra/webui-jsf-suntheme-4.0.2.8.jar:WEB-INF/extra/ajax-wrapper-comp-1.8.1.jar:WEB-INF/extra/dojo-ajax-nodemo-0.4.1.jar:WEB-INF/extra/webui-jsf-4.0.2.8.jar:WEB-INF/extra/commons-fileupload-1.1.1.jar:WEB-INF/extra/commons-io-1.3.1.jar:WEB-INF/extra/jMakiResources.jar:WEB-INF/extra/jsfcompounds-0.0.6.jar:WEB-INF/extra/json-1.0.jar:WEB-INF/extra/prototype-1.5.0.jar" />
+<class-loader delegate="true" extra-class-path="WEB-INF/extra/webui-jsf-suntheme-4.0.2.8.jar:WEB-INF/extra/dojo-ajax-nodemo-0.4.1.jar:WEB-INF/extra/webui-jsf-4.0.2.8.jar:WEB-INF/extra/commons-fileupload-1.1.1.jar:WEB-INF/extra/commons-io-1.3.1.jar:WEB-INF/extra/json-1.0.jar:WEB-INF/extra/prototype-1.5.0.jar" />

 </sun-web-app>
Index: war/src/main/webapp/WEB-INF/web.xml
===================================================================
--- war/src/main/webapp/WEB-INF/web.xml (revision 51898)
+++ war/src/main/webapp/WEB-INF/web.xml (working copy)
@@ -93,10 +93,6 @@
         <load-on-startup>1</load-on-startup>
     </servlet>
     <servlet>
-        <servlet-name>jMaki XmlHttpProxy Servlet</servlet-name>
-        <servlet-class>jmaki.xhp.XmlHttpProxyServlet</servlet-class>
-    </servlet>
-    <servlet>
         <servlet-name>ThemeServlet</servlet-name>
         <servlet-class>com.sun.webui.theme.ThemeServlet</servlet-class>
         <load-on-startup>2</load-on-startup>
@@ -126,10 +122,6 @@
         <url-pattern>/resource/*</url-pattern>
     </servlet-mapping>
     <servlet-mapping>
-        <servlet-name>jMaki XmlHttpProxy Servlet</servlet-name>
-        <url-pattern>/xhp</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
         <servlet-name>FacesServlet</servlet-name>
         <url-pattern>/html/*</url-pattern>
     </servlet-mapping>
Comment by Anissa Lam [ 05/Jan/12 ]

Changes checked into 3.1.2 branch.

Log Message:
------------
GLASSFISH-18126. Remove the aggregated GlassFish News page, and jMaki dependency. GlassFish News link now brings up the Aquarium.
Approved by Joe.

Revisions:
----------
51912

Modified Paths:
---------------
branches/3.1.2/admingui/war/src/main/webapp/WEB-INF/web.xml
branches/3.1.2/admingui/common/src/main/resources/commonTask.jsf
branches/3.1.2/admingui/war/src/main/webapp/WEB-INF/sun-web.xml
branches/3.1.2/admingui/core/src/main/resources/org/glassfish/admingui/core/Strings.properties





[GLASSFISH-18125] Cannot access admin console on clean install with no password. Created: 05/Jan/12  Updated: 08/Jan/12  Resolved: 08/Jan/12

Status: Resolved
Project: glassfish
Component/s: admin_gui
Affects Version/s: 3.1.1_b12
Fix Version/s: 3.1.2_b17

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

Windows 7 Professional SP1 x64
JRE 1.7.0_02-b13
JDK 1.7.0_02
GF 3.1.1 b12 from EE SDK installer


Attachments: Text File gf-server-log-error-20120105.txt    
Issue Links:
Duplicate
duplicates GLASSFISH-18148 Unable to access AdminConsole on Win2... Resolved
duplicates GLASSFISH-18063 Require to username/password to acces... Resolved
duplicates GLASSFISH-18133 JDK 1.7.0_02 - Nodes/instances creati... Resolved
Tags: admin-gui

 Description   

After install I had to run the asadmin create domain from the command prompt due to the identified problem of AS_JAVA variable pointing to the wrong place. During this I set the admin login as "admin" without a password. The command worked correctly and the server starts without problem.

When I attempt to browse to the admin gui I get the following in the server.log:

SEVERE: The log message is null.
java.lang.RuntimeException: Cannot find annotation org.glassfish.config.support.Create with value _register-instance on method public abstract com.sun.enterprise.config.serverbeans.Server com.sun.enterprise.config.serverbeans.Servers.getServer(java.lang.String)
...

and a host of further errors which are included in the attached log file.

I am then dropped at the login page for the admin gui, and using "admin" and no password will not allow me to access.

This is a fresh install after trying and failing to install various other options & packages. Previous versions were uninstalled and the glassfish directory deleted.



 Comments   
Comment by GeoffC [ 05/Jan/12 ]

I've moved to JRE6u30 and do not experience this issue.
Unfortunately not, after a restart this has come back again.

Comment by Anissa Lam [ 08/Jan/12 ]

There are a number of issues reported when using jdk7_02. The root cause is fixed by Tom for fixing GLASSFISH-18133.
Looking at the exception reported, this issues is whats reported in GLASSFISH-18133.

I am marking this resolved. You can try with 1/8 nightly build or wait for promoted build 17. If you still see the issue with these 2 builds, please reopen.





[GLASSFISH-18115] The server exited prematurely with exit code 0.Before it died, it produced the following output: Created: 04/Jan/12  Updated: 05/Jan/12  Resolved: 05/Jan/12

Status: Resolved
Project: glassfish
Component/s: grizzly-kernel
Affects Version/s: 3.1.2_b17
Fix Version/s: 3.1.2_b17

Type: Bug Priority: Critical
Reporter: Sreekanth Assignee: Ryan Lubke
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

GlassFish Server Open Source Edition 3.1.2-SNAPSHOT (build 17)
Java(TM) SE Runtime Environment (build 1.6.0_28-ea-b02)


Tags: 3_1_2-approved

 Description   

Hi,

I am facing this issue with latest glassfish 3.1.2
sreekanth@Spidy:/space/Sreekanth/servers/glassfish3/glassfish$ asadmin start-domain domain1
Waiting for domain1 to start ....Error starting domain domain1.
The server exited prematurely with exit code 0.
Before it died, it produced the following output:

Launching GlassFish on Felix platform
[#|2012-01-04T21:40:06.911+0530|INFO|glassfish3.1.2|com.sun.enterprise.server.logging.GFFileHandler|_ThreadID=1;_ThreadName=main;|Running GlassFish Version: GlassFish Server Open Source Edition 3.1.2-SNAPSHOT (build 17)|#]

[#|2012-01-04T21:40:07.020+0530|INFO|glassfish3.1.2|org.glassfish.ha.store.spi.BackingStoreFactoryRegistry|_ThreadID=10;_ThreadName=main;|Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry|#]

[#|2012-01-04T21:40:07.230+0530|SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=10;_ThreadName=main;|Unable to start v3. Closing all ports
com.sun.grizzly.config.GrizzlyConfigException: For input string: "28-ea"
at com.sun.grizzly.config.GrizzlyEmbeddedHttp.configureHttpListenerProperty(GrizzlyEmbeddedHttp.java:605)
at com.sun.grizzly.config.GrizzlyEmbeddedHttp.configureProtocol(GrizzlyEmbeddedHttp.java:337)
at com.sun.grizzly.config.GrizzlyEmbeddedHttp.configure(GrizzlyEmbeddedHttp.java:301)
at com.sun.grizzly.config.GrizzlyServiceListener.initializeListener(GrizzlyServiceListener.java:104)
at com.sun.grizzly.config.GrizzlyServiceListener.configure(GrizzlyServiceListener.java:89)
at com.sun.enterprise.v3.services.impl.GrizzlyListener.configure(GrizzlyListener.java:84)
at com.sun.enterprise.v3.services.impl.GrizzlyProxy.configureGrizzly(GrizzlyProxy.java:150)
at com.sun.enterprise.v3.services.impl.GrizzlyProxy.<init>(GrizzlyProxy.java:121)
at com.sun.enterprise.v3.services.impl.GrizzlyService.createNetworkProxy(GrizzlyService.java:445)
at com.sun.enterprise.v3.services.impl.GrizzlyService.postConstruct(GrizzlyService.java:353)
at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131)
at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78)
at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:253)
at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:145)
at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:136)
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.OSGiGlassFishImpl.start(OSGiGlassFishImpl.java:69)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
Caused by: java.lang.NumberFormatException: For input string: "28-ea"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:458)
at java.lang.Integer.parseInt(Integer.java:499)
at com.sun.grizzly.tcp.StaticResourcesAdapter.linuxSendFileSupported(StaticResourcesAdapter.java:452)
at com.sun.grizzly.tcp.StaticResourcesAdapter.<init>(StaticResourcesAdapter.java:102)
at com.sun.grizzly.tcp.StaticResourcesAdapter.<init>(StaticResourcesAdapter.java:94)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at com.sun.grizzly.config.GrizzlyEmbeddedHttp.configureHttpListenerProperty(GrizzlyEmbeddedHttp.java:600)
... 28 more

#]

[#|2012-01-04T21:40:07.232+0530|SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=10;_ThreadName=main;|Startup service failed to start : com.sun.enterprise.v3.services.impl.GrizzlyService|#]

[#|2012-01-04T21:40:07.261+0530|INFO|glassfish3.1.2|javax.enterprise.system.tools.admin.com.sun.enterprise.v3.admin|_ThreadID=11;_ThreadName=Thread-3;|Server shutdown initiated|#]

[#|2012-01-04T21:40:07.262+0530|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=11;_ThreadName=Thread-3;|Already stopped, so just returning|#]



 Comments   
Comment by Sreekanth [ 04/Jan/12 ]

Changing it to Grizzly

Comment by Ryan Lubke [ 04/Jan/12 ]
  • What is the impact on the customer of the bug?

Regression. JDK version parsing code was updated to distinguish between specific patch revisions to enable/disable
the sendfile feature within Grizzly. Using a non-final JDK exposed a problem with the code.

  • What is the cost/risk of fixing the bug?

Low cost. Requires new integration of Grizzly runtime. This is the only fix in 1.9 since the last integration.

How risky is the fix? How much work is the fix? Is the fix complicated?

Low risk.

  • Is there an impact on documentation or message strings?

No.

  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?

Repeat the process that prompted the logging of this issue.

  • Which is the targeted build of 3.1.2 for this fix?

b17.

Comment by Ryan Lubke [ 05/Jan/12 ]

Grizzly 1.9.44 integrated (r51893).





[GLASSFISH-18114] Collecting log files for a cluster also collects DAS files Created: 04/Jan/12  Updated: 21/Jan/12  Resolved: 21/Jan/12

Status: Closed
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.2_b16
Fix Version/s: 3.1.2_b17

Type: Bug Priority: Minor
Reporter: lidiam Assignee: Paul Davies
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

ogs-3.1.2-b16.zip


Tags: 312_gui_new, 312_qa

 Description   

Steps to reproduce:

1. Create a cluster with one instance and start it.
2. Go to Domain Logs page, select cluster and click on Collect Logs.
3. Open up the zip file and you will see all the DAS logs under "server" directory.

Only logs for cluster instances should be present in the zip file.



 Comments   
Comment by Anissa Lam [ 04/Jan/12 ]

I tried this using CLI, and get the DAS log file as well. Transfer to logging for evaluation.

Comment by naman_mehta [ 04/Jan/12 ]

It's not an issue. It's feature. User wants DAS log with cluster log also. Is there any issue, let me know else I will close this bug.

Comment by Anissa Lam [ 04/Jan/12 ]

So, regardless what the target is, the DAS server.log will be included ?
Not an issue for me. If thats how it suppose to be, you can close that as work as designed.

Comment by naman_mehta [ 04/Jan/12 ]

It's feature not an issue. server.log is always present when you collect cluster logs. It's designed in this way.

Comment by lidiam [ 05/Jan/12 ]

This is inconsistent, since downloading standalone instance server logs does not download DAS logs. Anyhow, it would be good to put this information in Admin Console on the Download Logs page that DAS logs will be downloaded when downloading cluster logs. It is not intuitive.

Comment by lidiam [ 05/Jan/12 ]

We should include information that DAS logs are downloaded with cluster logs on the Admin Console Download Logs page.

Comment by Paul Davies [ 10/Jan/12 ]

Fix committed in revision 51972

Comment by lidiam [ 20/Jan/12 ]

Tested in build ogs-3.1.2-b18.zip and the following is printed in online help:

-------
Note:

The ZIP archive also includes the log file for the domain administration server (DAS), regardless of whether you specify an instance or a cluster.
-------

The above is incorrect. DAS log files are only downloaded with cluster logs, but not standalone instance.

Comment by Paul Davies [ 21/Jan/12 ]

This issue is already captured in GLASSFISH-18181. I am closing this issue as a duplicate.





[GLASSFISH-18110] Return a non-null classloader for OSGi Archive Created: 02/Jan/12  Updated: 02/Jan/12  Resolved: 02/Jan/12

Status: Resolved
Project: glassfish
Component/s: OSGi
Affects Version/s: 3.1.1
Fix Version/s: 3.1.2_b17, 4.0

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

Issue Links:
Related
is related to GLASSFISH-18074 [OSGi] glassfish-resources.xml not pi... Open

 Description   

extras/osgi-container/src/main/java/org/glassfish/extras/osgicontainer/OSGiArchiveHandler.java returns null class loader and that causes problems for code that can't handle null class loader. e.g., try deploying an osgi bundle that contains META-INF/glassfish-resources.xml using "asadmin deploy --osgi" command such as and it will fail with following exception:

SEVERE: enterprise_naming.excep_in_copymutableobj
java.lang.IllegalArgumentException: Illegal null argument to ObjectInputStreamWithLoader
at com.sun.enterprise.naming.util.ObjectInputStreamWithLoader.<init>
(ObjectInputStreamWithLoader.java:69)
at com.sun.enterprise.naming.util.OSGiObjectInputOutputStreamFactoryImpl$
OSGiObjectInputStream.<init>(OSGiObjectInputOutputStreamFactoryImpl.java:152)
at com.sun.enterprise.naming.util.OSGiObjectInputOutputStreamFactoryImpl.
createObjectInputStream(OSGiObjectInputOutputStreamFactoryImpl.java:138)
at com.sun.enterprise.naming.util.NamingUtilsImpl.makeCopyOfObject
(NamingUtilsImpl.java:112)
at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.rebind
(LocalSerialContextProviderImpl.java:113)
at com.sun.enterprise.naming.impl.SerialContext.rebind(SerialContext.java:707)
at com.sun.enterprise.naming.impl.SerialContext.rebind(SerialContext.java:724)
at javax.naming.InitialContext.rebind(InitialContext.java:429)
at javax.naming.InitialContext.rebind(InitialContext.java:429)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.
publishObject(GlassfishNamingManagerImpl.java:206)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.
publishObject(GlassfishNamingManagerImpl.java:189)
at com.sun.appserv.connectors.internal.api.ResourceNamingService.
bindAppScopedNameForAppclient(ResourceNamingService.java:169)
at com.sun.appserv.connectors.internal.api.ResourceNamingService.
publishObject(ResourceNamingService.java:151)
at com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.
createConnectorConnectionPool(ConnectorConnectionPoolAdminServiceImpl.java:188)
at com.sun.enterprise.connectors.ConnectorRuntime.
createConnectorConnectionPool(ConnectorRuntime.java:283)
at com.sun.enterprise.resource.deployer.JdbcConnectionPoolDeployer.
actualDeployResource(JdbcConnectionPoolDeployer.java:165)
at com.sun.enterprise.resource.deployer.JdbcConnectionPoolDeployer.
deployResource(JdbcConnectionPoolDeployer.java:136)
at com.sun.enterprise.connectors.module.ResourcesDeployer.
deployResources(ResourcesDeployer.java:582)
at com.sun.enterprise.connectors.module.ResourcesDeployer.
deployResources(ResourcesDeployer.java:563)
at com.sun.enterprise.connectors.module.ResourcesDeployer.
processResources(ResourcesDeployer.java:802)
at com.sun.enterprise.connectors.module.ResourcesDeployer.event
(ResourcesDeployer.java:748)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:128)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy
(ApplicationLifecycle.java:398)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:391)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.
execute(CommandRunnerImpl.java:1291)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.
execute(CommandRunnerImpl.java:1259)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:679)

WARNING: RAR8035: Exception while creating jdbc connection pool
[

{ PoolInfo : (name=java:app/jdbc/my-test-pool), (applicationName=org.ancoron.osgi.test.bundles-glassfish-resources) }

] :
, java.lang.RuntimeException: Cant copy Serializable object:

See GLASSFISH-18074 for example.



 Comments   
Comment by Sanjeeb Sahoo [ 02/Jan/12 ]

trunk:
svn rev#51843
trunk/main/appserver/extras/osgi-container/src/main/java/org/glassfish/extras/osgicontainer/OSGiArchiveHandler.java

3.1.2:
svn rev#51844
extras/osgi-container/src/main/java/org/glassfish/extras/osgicontainer/OSGiArchiveHandler.java





[GLASSFISH-18108] Remove exception from user message Created: 31/Dec/11  Updated: 11/Jan/12  Resolved: 03/Jan/12

Status: Closed
Project: glassfish
Component/s: admin_gui
Affects Version/s: 3.1.2_b16
Fix Version/s: 3.1.2_b17, 4.0

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

ogs-3.1.2-b16.zip


Attachments: File working.diff    
Tags: 312_gui_new, 312_qa, 312_verified, 3_1_2_approved

 Description   

Create a cluster with no instances. Go to Domain Logs page. Select cluster and click Collect Logs. The popup message that shows up starts with java.lang.RuntimeException string. This string should be removed from the message.



 Comments   
Comment by andriy.zhdanov [ 03/Jan/12 ]
  • What is the impact on the customer of the bug?

Minimal.

  • What is the cost/risk of fixing the bug?

No risk.

  • Is there an impact on documentation or message strings?

No

  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?

Collect Domain Logs tests

  • Which is the targeted build of 3.1.2 for this fix?

3_1_2_b17

Comment by Anissa Lam [ 03/Jan/12 ]

changes look good.

Comment by andriy.zhdanov [ 03/Jan/12 ]

Committed revision 51858
Committed revision 51861

Comment by lidiam [ 11/Jan/12 ]

Verified in build ogs-3.1.2-b17.zip.





[GLASSFISH-18107] error message appearing after 'save' of new jdbc connection pool or resource Created: 30/Dec/11  Updated: 20/Jan/12  Resolved: 03/Jan/12

Status: Resolved
Project: glassfish
Component/s: admin_gui
Affects Version/s: 3.1.2_b16
Fix Version/s: 3.1.2_b17, 4.0_b21

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

windows 7, jdk 7u2, x64.


Attachments: File server_.7z    
Issue Links:
Duplicate
is duplicated by GLASSFISH-18129 Modifying values in LB Config throws ... Resolved
is duplicated by GLASSFISH-18136 Blocking: RuntimeException modifying ... Closed
Tags: 3_1_2-review, 3_1_x-exclude

 Description   

did a fresh install of glassfish 3.1.2 b16.

manually added the latest jdbc4 driver jar for postgresql to the domain

{x}

/lib directory then started the domain.

proceeded to add a JDBC Connection Pool, and after the initial 'save' button usage, was presented with (in the right hand pane) 'class java.lang.RuntimeException'.

I did find that the settings had been saved, however.

I proceeded to add a JDBC Resource for the newly added pool, and, upon using the 'save' button, was again rewarded with the same message being displayed.

Again, the pool definition did appear to have been saved.

I have attached the log file.



 Comments   
Comment by Anissa Lam [ 02/Jan/12 ]
  • What is the impact on the customer of the bug?
    User will not be able to save any property tables.
  • What is the cost/risk of fixing the bug?
    2 hours. Test and ensure the object type is a Map.
  • Is there an impact on documentation or message strings?
    No.
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
    Test to ensure that password is still masked when logged in server.log. Also verify that page with Property table can be saved properly.
  • Which is the targeted build of 3.1.2 for this fix?
    3.1.2_b17

Index: src/main/java/org/glassfish/admingui/common/util/RestUtil.java
===================================================================
— src/main/java/org/glassfish/admingui/common/util/RestUtil.java (revision 51836)
+++ src/main/java/org/glassfish/admingui/common/util/RestUtil.java (working copy)
@@ -220,6 +220,9 @@

private static Map maskOffPassword(Map<String, Object> attrs){
Map masked = new HashMap();
+ if (attrs == null)

{ + return masked; + }

for(String key : attrs.keySet()){
if (pswdAttrList.contains(key.toLowerCase())){
@@ -307,7 +310,10 @@
// Parse the response
String message = "";
ExitCode exitCode = ExitCode.FAILURE;

  • Map maskedAttr = maskOffPassword((Map<String, Object>)attrs);
    + Object maskedAttr = attrs;
    + if ((attrs != null) && (attrs instanceof Map)) { + maskedAttr = maskOffPassword((Map<String, Object>)attrs); + }

    if (response != null) {
    try {
    int status = response.getResponseCode();

Comment by Anissa Lam [ 03/Jan/12 ]

28) svn commit
Sending common/src/main/java/org/glassfish/admingui/common/util/RestUtil.java
Transmitting file data .
Committed revision 51859.

Comment by Anissa Lam [ 20/Jan/12 ]

Also fixed in the trunk.

Revisions:
----------
52218
Modified Paths:
---------------
trunk/main/appserver/admingui/common/src/main/java/org/glassfish/admingui/common/util/RestUtil.java





[GLASSFISH-18096] GlassFish ignores @Resource(authenticationType = AuthenticationType.CONTAINER) if no ejb-jar.xml is present in an EJB Created: 29/Dec/11  Updated: 05/Jan/12  Resolved: 05/Jan/12

Status: Resolved
Project: glassfish
Component/s: deployment
Affects Version/s: 3.1.1
Fix Version/s: 3.1.2_b17, 4.0

Type: Bug Priority: Major
Reporter: exabrial Assignee: Hong Zhang
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 3 days
Time Spent: Not Specified
Original Estimate: 3 days
Environment:

Windows xp x86, JDK6u30, gf v3.1.1


Attachments: Zip Archive glassfish-jca-problem.zip    
Tags: 3_1_2-approved, ejb, injection, jca, resource

 Description   

Summary: GlassFish ignores @Resource(authenticationType = AuthenticationType.CONTAINER) if no ejb-jar.xml is present in an EJB

Setup: When creating a Connnector Connection Pool, GF has a Security Maps tab. Enter the following:

Principal: *
Backend Principal: uid/password

Create an EJB with an injection point:

@Stateless
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
public class EchoServiceBean implements EchoService {

@Resource(
name = "view/EchoService",
type = ViewManagerClientFactory.class,
authenticationType = AuthenticationType.CONTAINER)
ViewManagerClientFactory clientFactory;

GlassFish will not pass the backend principal to the @Resource.

To make this work, put the same information in the ejb-jar.xml:
<session>
<ejb-name>EchoServiceBean</ejb-name>
<resource-ref>
<res-ref-name>view/EchoService</res-ref-name>
<res-type>com.argushealth.enterprise.viewmanager.ViewManagerClientFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</session>

The problem is in ConnectionManagerImpl. It uses pure XML to determine whether or not container managed authentication is required:

if (ref == null) {

if(getLogger().isLoggable(Level.FINE))

{ getLogger().log(Level.FINE, "poolmgr.no_resource_reference", jndiNameToUse); }

return internalGetConnection(mcf, defaultPrin, cxRequestInfo,

resourceShareable, jndiNameToUse, conn, true);

}

String auth = ref.getAuthorization();

This should also examine the @Resource annotation, rather than just doing a null-check if a the resource reference descriptor is null.

More info: http://www.java.net/forum/topic/glassfish/glassfish/gf-bug-getting-empty-credentials-jca-adapter



 Comments   
Comment by Jagadish [ 02/Jan/12 ]

The code in ConnectionManagerImpl retrieves the resource-reference which is a merged version of Annotation and Descriptor.
So, in all cases (eg: annotation alone is specified), we would still get the resource-reference.

connector-security-map is used to map the credentials from application server's security domain to EIS security domain.

Please refer the sample test that uses security-map in an RAR and the settings in web.xml.
https://svn.java.net/svn/glassfish~svn/trunk/v2/appserv-tests/devtests/connector/v3/securitymapweb

  • Refer "create-users" target in build.xml
  • Refer "create-security-maps" target in build.xml
  • Refer web.xml where the roles are defined for the web-component (it will be similar for ejb-component also)
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>basic secuity test</web-resource-name>
    <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>employee</role-name>
    <role-name>contractor</role-name>
    <role-name>management</role-name>
    </auth-constraint>
    </security-constraint>
    ..
    ..
    ..
    <security-role>
    <role-name>employee</role-name>
    </security-role>
    <security-role>
    <role-name>contractor</role-name>
    </security-role>
    <security-role>
    <role-name>management</role-name>
    </security-role>

So, a role by name "employee" will be translated into "map3/map3" principal/password in EIS security domain via connector-security-map.

Comment by exabrial [ 02/Jan/12 ]

Jagadish,

I think you missed the entire point of me logging this bug. If you specify the settings in XML, it works, if you use annotations, it doesn't work.

So your statements: "ConnectionManagerImpl retrieves the resource-reference which is a merged version of Annotation and Descriptor." is not true. I'm trying to log a bug and tell you the "merging" is not working.

-Jonathan

Comment by Jagadish [ 02/Jan/12 ]

Yes, I did try a pure annotation based resource injection and it worked fine.
eg:
@Resource(mappedName="jdbc/__default", shareable=false, authenticationType = AuthenticationType.APPLICATION)
DataSource ds1;
ds1.getConnection() //succeeded.

Please attach a sample (eg: a sample based on jdbc or jms resource is also fine) if you see the issue.

Comment by Jagadish [ 02/Jan/12 ]

Actual annotation was :
@Resource(mappedName="jdbc/__default", shareable=false, authenticationType = AuthenticationType.Container)
DataSource ds1;

Comment by exabrial [ 02/Jan/12 ]

I just confirmed it works fine for me as well on JDBC resources... The problem seems to occur on custom resource adapters.

I can create you a code example, but do you have a custom RAR laying around? If not, let me know and I'll create you an example.

Otherwise, set a breakpoint on this method:
public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo cxRequestInfo) throws ResourceException;

My implementation is as follows:

public ViewManagerConnection getConnection(Subject subject, ConnectionRequestInfo cxRequestInfo)
throws ResourceException {
String operatorId = null;
String operatorPassword = null;

if (overrideUserName != null)

{ operatorId = overrideUserName; operatorPassword = overridePassword; }

else {
for (PasswordCredential cred : subject.getPrivateCredentials(PasswordCredential.class)) {
operatorId = cred.getUserName();
operatorPassword = new String(cred.getPassword());

if (operatorId != null && operatorPassword != null)

{ break; }

}
}
....

Comment by exabrial [ 02/Jan/12 ]

Ok, I've spent 2 hours creating a test case for this bug and can easily reproduce it. Can we open the bug back up so I can add an attachment?

Comment by Jagadish [ 03/Jan/12 ]

re-opening the issue so as to attach the test-case.

Comment by exabrial [ 03/Jan/12 ]

JCA example

Comment by exabrial [ 03/Jan/12 ]

To recreate the problem:

  1. run "mvn clean install" on all the projects in this order:
    1. glassfish-jca-problem
    2. glassfish-jca-problem-ejb
    3. glassfish-jca-problem-jca
    4. glassfish-jca-problem-ear
  2. deploy the resulting EAR to glassfish
  3. create a new pool using the rar in the ear
  4. create a security map for the rar. the security map should be * for the front end principal and put a test username/password in the backend principal
  5. create the following jndi reference to the pool: jca/MyJCA
  6. click this link, then click the doSomethingAwesome button: http://localhost:8080/MyJCAWebServiceService/MyJCAWebService?Tester

Notice the username and password are empty

To fix the problem, thus proving that an ejb-jar.xml must be present:

  1. rename this file: /glassfish-jca-problem-ejb/src/main/resources/META-INF/RENAME TO ejb-jar_XML to /glassfish-jca-problem-ejb/src/main/resources/META-INF/ejb-jar.xml
  2. run "mvn clean install" on all the projects in this order:
    1. glassfish-jca-problem
    2. glassfish-jca-problem-ejb
    3. glassfish-jca-problem-jca
    4. glassfish-jca-problem-ear
  3. redeploy the ear
  4. click this link, then click the doSomethingAwesome button: http://localhost:8080/MyJCAWebServiceService/MyJCAWebService?Tester

Notice that a username and password are present

Comment by Jagadish [ 04/Jan/12 ]

Thanks Jonathan. I am able to reproduce the issue.
It looks like resource-env-ref is getting generated instead of resource-ref for @Resource annotation where type is a non standard class (eg: not one of javax.sql.DataSource/javax.jms.Queue/javax.jms.Topic etc.,). I shall investigate further and update the issue.

Comment by exabrial [ 04/Jan/12 ]

Thanks Jagadish, I really appreciate your time.

Incidentally, and I'm not sure if this is related, but you cannot inject a java.lang.String as a @Resource. Not sure if that is part of the specification, but it could be related. String injection does work if the String is a resource-env-ref, but does not work if it's a resource-ref.

Comment by Hong Zhang [ 05/Jan/12 ]
  • What is the impact on the customer of the bug?
    Not a regression, but this is something specified in the JSR 250 (common annotation spec) but we missed in the initial implementation.
  • What is the cost/risk of fixing the bug?
    The fix is available (and checked into trunk). The risk is small to medium.
  • Is there an impact on documentation or message strings?
    No.
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
    Regular set of the tests.
  • Which is the targeted build of 3.1.2 for this fix?
    The next promoted build of 3.1.2.
Comment by Hong Zhang [ 05/Jan/12 ]

exabrial: Jagadish and I looked at the issue, it seems it's something we missed in the initial implementation (that a @Resource with a connection factory that's defined in resource adapter should be mapped to resource-ref and not resource-env-ref). Thanks for reporting this and providing the test case! I have checked in the fix into trunk (v4) and submitted a change request for approval to check the fix into 3.1.2 branch.
For @Resource with String type, based on the spec (JSR250), it should be mapped to env-entry and the current implementation is consistent with that.

Comment by Hong Zhang [ 05/Jan/12 ]

fixed checked into both trunk and 3.1.2 branch.





[GLASSFISH-18095] Deployed app fails after updating/upgrading to GF 3.1.2 Created: 29/Dec/11  Updated: 19/Jan/12  Resolved: 05/Jan/12

Status: Resolved
Project: glassfish
Component/s: web_container
Affects Version/s: 3.1.2_b16
Fix Version/s: 3.1.2_b17

Type: Bug Priority: Critical
Reporter: Alex Pineda Assignee: Shing Wai Chan
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

System is running Oracle Enterprise Linux 5, JDK 1.6.0_30 along with GF 3.1.1 (build 12) release. Firefox 3.6.2 browser. Using internal repository located at http://bat-s10-1.us.oracle.com/sun_v3_release_test


Attachments: Text File server.log    
Tags: 3_1_2-approved

 Description   

There are two ways to see this problem during update/upgrading of the system. Update can be defined as "in-place" upgrade. Upgrade as "side-by-side" upgrade. The simplest and more direct is in the side-by-side upgrade test scenario. The overall steps are:

  • Install GF 3.1.1 full distribution on a OEL5 system using default values (port numbers and no password) in $HOME/glassfish311
  • Deploy hello.war sample application (available at https://glassfish.dev.java.net/downloads/quickstart/hello.war)
  • Shutdown the GF 3.1.1 server
  • Install GF 3.1.2 (build15 or build16) using default values at $HOME/glassfish3.
  • Verify the installation is proper. Shutdown the server
  • invoke asupgrade. Point the tool to the location of the GF 3.1.1 domain ($HOME/glassfish311/domains/domain1).
  • When done, start the GF 3.1.2 server (asadmin start-domain domain1).
  • Go to the deployed URL location (localhost:8080/hello).
    At this point, the hello.war app fails to display and the URL displays HTTP Status 500. In the GF 3.1.2 server log (attached to this report) the following is noted:

[#|2011-12-28T17:41:16.915-0800|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=22;_ThreadName=Thread-2;|StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP

PWC6197: An error occurred at line: 26 in the jsp file: /index.jsp
PWC6199: Generated servlet error:
string:///index_jsp.java:100: cannot access javax.servlet.jsp.jstl.core.ConditionalTagSupport
class file for javax.servlet.jsp.jstl.core.ConditionalTagSupport not found

PWC6197: An error occurred at line: 26 in the jsp file: /index.jsp
PWC6199: Generated servlet error:
string:///index_jsp.java:101: cannot find symbol
symbol : method setPageContext(javax.servlet.jsp.PageContext)
location: class org.apache.taglibs.standard.tag.rt.core.IfTag

PWC6197: An error occurred at line: 26 in the jsp file: /index.jsp
PWC6199: Generated servlet error:
string:///index_jsp.java:102: cannot find symbol
symbol : method setParent(<nulltype>)
location: class org.apache.taglibs.standard.tag.rt.core.IfTag

PWC6197: An error occurred at line: 26 in the jsp file: /index.jsp
PWC6199: Generated servlet error:
string:///index_jsp.java:104: cannot find symbol
symbol : method doStartTag()
location: class org.apache.taglibs.standard.tag.rt.core.IfTag

PWC6199: Generated servlet error:
string:///index_jsp.java:151: cannot find symbol
symbol : method doAfterBody()
location: class org.apache.taglibs.standard.tag.rt.core.IfTag

PWC6199: Generated servlet error:
string:///index_jsp.java:156: cannot find symbol
symbol : method doEndTag()
location: class org.apache.taglibs.standard.tag.rt.core.IfTag

PWC6199: Generated servlet error:
string:///index_jsp.java:157: reuse(javax.servlet.jsp.tagext.JspTag) in org.apache.jasper.runtime.TagHandlerPool cannot be applied to (org.apache.taglibs.standard.tag.rt.core.IfTag)

PWC6199: Generated servlet error:
string:///index_jsp.java:160: reuse(javax.servlet.jsp.tagext.JspTag) in org.apache.jasper.runtime.TagHandlerPool cannot be applied to (org.apache.taglibs.standard.tag.rt.core.IfTag)

PWC6197: An error occurred at line: 18 in the jsp file: /index.jsp
PWC6199: Generated servlet error:
string:///index_jsp.java:225: package javax.servlet.jsp.jstl.fmt does not exist

at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:129)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:299)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:392)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:625)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)



 Comments   
Comment by Bobby Bissett [ 29/Dec/11 ]

Am assigning to web container to check out the servlet package missing errors.

A domain upgrade should not be required to move from 3.1.X to 3.1.Y. In other words, you should be able to simply copy the 3.1.1 domain to the 3.1.2 domains directory and just start the 3.1.2 server. If that doesn't work, it's a bug unless someone has decided otherwise.

That being said, running a domain upgrade on any server shouldn't break that server, so "upgrading" should work in all of these cases:
3.1.1 -> 3.1.1
3.1.1 -> 3.1.2
3.1.2 -> 3.1.2

Comment by Alex Pineda [ 29/Dec/11 ]

I see the same problem if I do an Update (in-place upgrade)from 3.1.1 to 3.1.2 using the internal repository and if I execute an "image update". I just noted the simplest test scenario to help debug the issue.

Comment by Alex Pineda [ 29/Dec/11 ]

One more note. This test scenario passed with issues using GF3.1.2 build13.

Comment by Alex Pineda [ 29/Dec/11 ]

Correction. Please disregard the previous comment. I meant to say the test scenario worked without problems using GF3.1.2 build 13.

Comment by scatari [ 29/Dec/11 ]

Please also see the related issue http://java.net/jira/browse/GLASSFISH-18093

Comment by Shing Wai Chan [ 29/Dec/11 ]

In GlassFish, the jsp compilation classpath is from default-web.xml.
Due to maven versioning change, some of the jar files are renamed. Hence some of the jars cannot be found.

One can workaround the issue as follows:

  • create a dump jsp-impl.jar in modules dir with the following MANIFEST.MF

Class-Path: javax.el-api.jar javax.el.jar javax.faces.jar javax.servlet-api.jar javax.servlet.jsp-api.jar javax.servlet.jsp.jstl-api.jar

Note that there is no OSGi information there.

Comment by Sanjeeb Sahoo [ 30/Dec/11 ]

No, we can't have non-osgi modules in modules/.

May I know why jspc does not use lib/javaee.jar to refer to all API jars?

Comment by Shing Wai Chan [ 30/Dec/11 ]

According to my understanding, we keep the set of API jars small for jspc for performance.
Also, jspc need to have jasper implementation which is not path of claspath javaee.jar.

Comment by Shing Wai Chan [ 04/Jan/12 ]
  • What is the impact on the customer of the bug?
    It impacts any customer who upgrade from 3.1.1 to 3.1.2.
  • What is the cost/risk of fixing the bug? Low. pom.xml changes to include the missing jars.

How risky is the fix? How much work is the fix? Is the fix complicated?

  • Is there an impact on documentation or message strings? No
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish? jstl and jsf
  • Which is the targeted build of 3.1.2 for this fix? b18
Comment by Shing Wai Chan [ 05/Jan/12 ]

Per discussion, we will put the additional class path information in one of the existing jar scanned by Jsp compiler. In our case, we will put it inside web-glue.jar

Sending pom.xml
Transmitting file data .
Committed revision 51914.

Comment by Alex Pineda [ 17/Jan/12 ]

Which build is this issue fixed on. In the bug fix justification it says Build18, but in the "fixed version" element it says "build17". Can you please clarify.

Comment by Alex Pineda [ 19/Jan/12 ]

Verified fix in build 18. The sample app is viewable after the Upgrade.





[GLASSFISH-18094] Need Status if _create-instance-filesystem fails Created: 29/Dec/11  Updated: 29/Dec/11  Resolved: 29/Dec/11

Status: Resolved
Project: glassfish
Component/s: distributed management
Affects Version/s: None
Fix Version/s: 3.1.2_b17, 4.0_b17

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

Issue Links:
Dependency
depends on GLASSFISH-18084 das.properties needs work Open
Tags: 3_1_2-review

 Description   

1) make sure that a remote DCOM node is unable to call back to DAS. Pretty easy. Have DAS on a different domain, or not findable in DNS.
Very simple way – setup DAS on a laptop with a dynamic IP address. The instance machine won't find it.

2) run create-instance and it will fail to create the crucial das.properties file yet it returns success

Problem: We don't know how to get return status back from remote DCOM commands

Fix: make sure all the directories and files were created



 Comments   
Comment by Byron Nevins [ 29/Dec/11 ]

What is the impact on the customer of the bug?
Currently this happens:
create-instance will report that the instance was created successfully even though the local stuff didn't work

How likely is it that a customer will see the bug and how serious is the bug?
He will always see it.

Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)?
New feature.
What is the cost/risk of fixing the bug?
1 day

How risky is the fix? How much work is the fix? Is the fix complicated?
1 day. Fairly simple. Essentially no risk.

Is there an impact on documentation or message strings?
No

Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
QA should re-run DCOM tests to verify

Which is the targeted build of 3.1.2 for this fix?
B16

Comment by Byron Nevins [ 29/Dec/11 ]

I left out of the description – the problem is that after it fails on the remote node it is reported as a success to the user. And there is NO WAY the instance can run.

Comment by Byron Nevins [ 29/Dec/11 ]

Now the failure is noticede and this message is presented:

D:\gf\branches\3.1.2\cluster\ssh>\glassfish3\glassfish\bin\asadmin -W d:\pw create-instance --node laptop_node fubar300
Successfully created instance fubar300 in the DAS configuration, but failed to create the instance files on node laptop_node (bigapp-oblade-3).

Command failed on node laptop_node (bigapp-oblade-3): Command _create-instance-filesystem failed.

To complete this operation run the following command locally on host bigapp-oblade-3 from the GlassFish install location c:/glassfish3:

bin/asadmin --host WNEVINS-LAP --port 4848 create-local-instance --node laptop_node fubar300

===========

Notice how "WNEVINS-LAP" will never work from the instance machine which is sitting in a Lab inside Oracle.

Comment by Byron Nevins [ 29/Dec/11 ]

Another enhancement – the created instance dir should be whacked when there is a failure contacting DAS

Comment by Byron Nevins [ 29/Dec/11 ]

Added utility methods:

D:\gf\branches\3.1.2\cluster\common>svn commit . D:\gf\trunk\main\nucleus\cluster\common
Adding branches\3.1.2\cluster\common\src\main\java\com\sun\enterprise\util\cluster\Paths.java
Adding branches\3.1.2\cluster\common\src\test
Adding branches\3.1.2\cluster\common\src\test\java
Adding branches\3.1.2\cluster\common\src\test\java\com
Adding branches\3.1.2\cluster\common\src\test\java\com\sun
Adding branches\3.1.2\cluster\common\src\test\java\com\sun\enterprise
Adding branches\3.1.2\cluster\common\src\test\java\com\sun\enterprise\util
Adding branches\3.1.2\cluster\common\src\test\java\com\sun\enterprise\util\cluster
Adding branches\3.1.2\cluster\common\src\test\java\com\sun\enterprise\util\cluster\PathsTest.java
Adding trunk\main\nucleus\cluster\common\src\main\java\com\sun\enterprise\util\cluster\Paths.java
Adding trunk\main\nucleus\cluster\common\src\test
Adding trunk\main\nucleus\cluster\common\src\test\java
Adding trunk\main\nucleus\cluster\common\src\test\java\com
Adding trunk\main\nucleus\cluster\common\src\test\java\com\sun
Adding trunk\main\nucleus\cluster\common\src\test\java\com\sun\enterprise
Adding trunk\main\nucleus\cluster\common\src\test\java\com\sun\enterprise\util
Adding trunk\main\nucleus\cluster\common\src\test\java\com\sun\enterprise\util\cluster
Adding trunk\main\nucleus\cluster\common\src\test\java\com\sun\enterprise\util\cluster\PathsTest.java
Transmitting file data ....

Comment by Byron Nevins [ 29/Dec/11 ]

related

Comment by Byron Nevins [ 29/Dec/11 ]

D:\gf\branches\3.1.2\cluster>svn commit -F commit.txt ssh\src\main\java\org\glassfish\cluster\ssh\connect\NodeRunnerDcom.java D:\gf\trunk\main\nucleu
s\cluster\ssh\src\main\java\org\glassfish\cluster\ssh\connect\NodeRunnerDcom.java
Sending branches\3.1.2\cluster\ssh\src\main\java\org\glassfish\cluster\ssh\connect\NodeRunnerDcom.java
Sending trunk\main\nucleus\cluster\ssh\src\main\java\org\glassfish\cluster\ssh\connect\NodeRunnerDcom.java
Transmitting file data ..
Committed revision 51823.





[GLASSFISH-18079] RuntimeException when switching from DCOM to SSH node Created: 23/Dec/11  Updated: 13/Jan/12  Resolved: 05/Jan/12

Status: Closed
Project: glassfish
Component/s: admin_gui
Affects Version/s: 3.1.2_b15
Fix Version/s: 3.1.2_b17, 4.0

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

ogs-3.1.2-b15.zip on solaris sparc, node on windows xp


Attachments: JPEG File runtimeException.JPG     File server.log.exception     File server.log.exception2.with.password    
Tags: 312_gui_new, 312_qa, 312_verified, 3_1_2-approved

 Description   

I created a DCOM node and tried to switch it to SSH. After several minutes of waiting got RuntimeException on the screen (screenshot attached). The following exception is in server.log (also attached):

[#|2011-12-22T19:46:05.012-0800|WARNING|glassfish3.1.2|javax.enterprise.resource
.webcontainer.jsf.lifecycle|_ThreadID=212;_ThreadName=Thread-2;|java.lang.reflec
t.InvocationTargetException while attempting to process a 'command' event for 's
aveButton'.
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException while at
tempting to process a 'command' event for 'saveButton'.
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHa
ndlers(LayoutElementBase.java:422)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHa
ndlers(LayoutElementBase.java:394)
at com.sun.jsftemplating.layout.event.CommandActionListener.invokeComman
dHandlers(CommandActionListener.java:150)
at com.sun.jsftemplating.layout.event.CommandActionListener.processActio
n(CommandActionListener.java:98)
at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:
769)
at javax.faces.component.UICommand.broadcast(UICommand.java:300)
at com.sun.webui.jsf.component.WebuiCommand.broadcast(WebuiCommand.java:
166)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1
259)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicat
ionPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java
:1542)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:343)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:217)
at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:233)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:217)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:279)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
ava:655)
at org.apache.catalina.core.StandardPipeline.doChainInvoke(StandardPipel
ine.java:600)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESess
ionLockingStandardPipeline.java:91)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:162)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.j
ava:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(Container
Mapper.java:232)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:8
49)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFil
ter.java:228)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultPro
tocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.jav
a:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.jav
a:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java
:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextT
ask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.
java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadP
ool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool
.java:513)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handl
er.java:442)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHa
ndlers(LayoutElementBase.java:420)
... 43 more
Caused by: com.sun.jersey.api.client.ClientHandlerException: java.io.Interrupted
IOException: Operation interrupted
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle
(URLConnectionClientHandler.java:149)
at com.sun.jersey.api.client.filter.CsrfProtectionFilter.handle(CsrfProt
ectionFilter.java:97)
...

I cannot create an SSH node on this windows system, so did not expect the conversion to go through. However, we should not be printing exceptions on the screen in such cases.



 Comments   
Comment by lidiam [ 23/Dec/11 ]

I managed to create an SSH node on the same windows system using password. Hence, I tried this scenario again: first created a DCOM node and then tried to convert it to an SSH node using password (as opposed to key file). Again got runtime exception on the screen after a long time of what looked like a hang. The server.log is attached as server.log.exception2.with.password.

Comment by Anissa Lam [ 02/Jan/12 ]

The stack trace shows IOException,
Caused by: com.sun.jersey.api.client.ClientHandlerException: java.io.Interrupted
IOException: Operation interrupted

How long have you waited to see this ?

For me, i cannot get to this state even though i waited for over 10 min. I only see the "Long Process is detected" box. Waited for a long time, and click the "x" to remove that box, and i can go back to other screens without problem.

If you do the conversion using CLI, using update-node-ssh , what did you get ?

Comment by lidiam [ 04/Jan/12 ]

I tried CLI and it worked fine, no hang, node got converted to SSH and I can ping it successfully from Admin Console after conversion. The command I used was:

asadmin update-node-ssh --nodehost <host name> --sshport 22 --sshuser <user name> jedy

The command passed by Admin Console may be passing many more parameters, such as the Glassfish installation directory, since it's filled out. In my case the Glassfish install dir is C:\as\dcomtest... meaning, it contains backslashes, not sure if that causes issues.

Comment by Anissa Lam [ 05/Jan/12 ]

What is the impact on the customer of the bug?
User is seeing Runtime exception on screen, which should never happen.

What is the cost/risk of fixing the bug?
Minimal. Catch the exception instead of letting it propagated onward.

Is there an impact on documentation or message strings?
No

Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
Run this same test and see that the exception is logged in server.log, and the error displayed to user nicely.

Which is the targeted build of 3.1.2 for this fix?
3_1_2_b17

Note that this fix is to ensure no runtime exception is seen on screen. If there is issue of converting SSH to DCOM or vise versa, another bug should be open for that.

Index: src/main/java/org/glassfish/admingui/common/handlers/RestApiHandlers.java
===================================================================
— src/main/java/org/glassfish/admingui/common/handlers/RestApiHandlers.java (revision 51836)
+++ src/main/java/org/glassfish/admingui/common/handlers/RestApiHandlers.java (working copy)
@@ -40,6 +40,7 @@

package org.glassfish.admingui.common.handlers;

+import java.util.logging.Logger;
import com.sun.jsftemplating.annotation.Handler;
import com.sun.jsftemplating.annotation.HandlerInput;
import com.sun.jsftemplating.annotation.HandlerOutput;
@@ -218,7 +219,23 @@
if (GuiUtil.isEmpty(endpoint))

{ handlerCtx.setOutputValue("result", new HashMap()); }

else{

  • handlerCtx.setOutputValue("result", RestUtil.restRequest(endpoint, attrs, method, handlerCtx, quiet, throwException));
    + try { + Map result = RestUtil.restRequest(endpoint, attrs, method, handlerCtx, quiet, throwException); + handlerCtx.setOutputValue("result", result ); + }

    catch(Exception ex)

    Unknown macro: {+ Logger logger = GuiUtil.getLogger();+ if (logger.isLoggable(Level.FINE)) { + ex.printStackTrace(); + }+ Map maskedAttr = RestUtil.maskOffPassword(attrs);+ GuiUtil.getLogger().log(+ Level.SEVERE,+ ex.getMessage() + ";n" ++ ex.getCause() + ";n" + + GuiUtil.getCommonMessage("LOG_REST_REQUEST_INFO", new Object[]{endpoint, maskedAttr, method}));+ GuiUtil.handleError(handlerCtx, GuiUtil.getMessage("msg.error.checkLog"));+ return;+ }

    }
    }

Index: src/main/java/org/glassfish/admingui/common/util/RestUtil.java
===================================================================
— src/main/java/org/glassfish/admingui/common/util/RestUtil.java (revision 51859)
+++ src/main/java/org/glassfish/admingui/common/util/RestUtil.java (working copy)
@@ -218,7 +218,7 @@
return parseResponse(restResponse, handlerCtx, endpoint, (useData && "post".equals(method))? data: attrs, quiet, throwException);
}

  • private static Map maskOffPassword(Map<String, Object> attrs){
    + public static Map maskOffPassword(Map<String, Object> attrs){
    Map masked = new HashMap();
    if (attrs == null){
    return masked;
Comment by scatari [ 05/Jan/12 ]

Should the Log Level be SEVERE for this not so common use case?

Comment by Anissa Lam [ 05/Jan/12 ]

I believe this needs to be logged at SEVERE, whether it is common or not.
Whenever there is exception thrown from the REST, the request is not able to perform successfully. Although it really shouldn't happen. This maybe post, get, delete. Any action that user wants to perform has failed. We should log that.
Note that the exception stack trace is only logged in FINE level.

Comment by Anissa Lam [ 05/Jan/12 ]

Changes checked into both trunk and 3.1.2 branch.

GLASSFISH-18079. Catch runtime exception in restRequest handler for the rare case that REST is throwing exception.

Revisions:
----------
51906

Modified Paths:
---------------
branches/3.1.2/admingui/common/src/main/java/org/glassfish/admingui/common/util/RestUtil.java
branches/3.1.2/admingui/common/src/main/java/org/glassfish/admingui/common/handlers/RestApiHandlers.java

===============

Revisions:
----------
51907

Modified Paths:
---------------
trunk/main/appserver/admingui/common/src/main/java/org/glassfish/admingui/common/util/RestUtil.java
trunk/main/appserver/admingui/common/src/main/java/org/glassfish/admingui/common/handlers/RestApiHandlers.java

Comment by lidiam [ 13/Jan/12 ]

Verified in build ogs-3.1.2-b17.zip. Exception no longer printed, but switching from DCOM to SSH is still not possible in Admin Console. I'll log a separate issue for that.





Admin GUI doesn't throw exception when JMS cluster type is set to enhanced for the EMBEDDED mode. (GLASSFISH-18019)

[GLASSFISH-18077] Add page title help for JMS Availability screen Created: 22/Dec/11  Updated: 10/Jan/12  Resolved: 10/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.2_b15
Fix Version/s: 3.1.2_b17

Type: Sub-task Priority: Major
Reporter: Anissa Lam Assignee: Mike Fitch
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

There should be warning in the Availability -> JMS Availability screen page title regarding data migration.
This is like the warning in the HA admin guide.
http://docs.oracle.com/cd/E18930_01/html/821-2426/abdbx.html#scrolltoc

Caution - Before using this procedure to reconfigure an existing cluster, you must follow the special procedures to migrate to another type of broker cluster, as described in To Migrate Between Types of Embedded or Local Conventional Broker Clusters. Failing to perform these special procedures could lead to data loss or corruption and even render your setup unusable, depending on the JMS operations performed on the existing cluster.

We probably want to rephrase it. Please contact Amy for the changes.



 Comments   
Comment by Mike Fitch [ 10/Jan/12 ]

Fixed and committed in rev 51974. Added the following:

Caution: Before using this page to reconfigure an existing cluster, follow the special procedures to migrate to another type of broker cluster, as described here in the High Availability Administration Guide. Failing to perform these special procedures could lead to data loss or corruption and even render your setup unusable, depending on the JMS operations performed on the existing cluster.





[GLASSFISH-18071] misleading error message when remote instance doesn't start due to synchronization failure Created: 21/Dec/11  Updated: 03/Jan/12  Resolved: 03/Jan/12

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: 3.1.2
Fix Version/s: 3.1.2_b17, 4.0

Type: Bug Priority: Critical
Reporter: Tom Mueller Assignee: Tom Mueller
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: 3_1_2-approved

 Description   

An attempt to start a remote instance with 3.1.2 and the trunk is failing. Here is an example of the error messages from the cluster devtests:

Caused by: java.lang.IllegalStateException: The server requires a valid admin password to be set before it can start. Please set a password using the change-admin-password command.
at com.sun.enterprise.admin.util.GenericAdminAuthenticator.postConstruct(GenericAdminAuthenticator.java:163)



 Comments   
Comment by Tom Mueller [ 21/Dec/11 ]
  • What is the impact on the customer of the bug?
    huge - can't start remote instance in default developer mode.

How likely is it that a customer will see the bug and how serious is the bug?
Very likely.
Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)?
Yes.

  • What is the cost/risk of fixing the bug?

How risky is the fix? How much work is the fix? Is the fix complicated?
Still determining what the fix has to be, but this has to be fixed.

  • Is there an impact on documentation or message strings?
    No.
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
    Any test that starts a remote instance.
  • Which is the targeted build of 3.1.2 for this fix?
    Next one.
Comment by Tom Mueller [ 22/Dec/11 ]

Upon further examination of this error, the reason for not being able to start is actually because the synchronization failed. Earlier in the log was the following message:

Command failed on node n-ssh-domain1-5 (hit-s10-13.us.oracle.com): Warning: Synchronization with DAS failed, continuing startup...

The conditions under which this, and only this message is printed are:

a. synchronizeFiles returns false to start-local-instance
b. domain.xml file exists

(a) happens only if an exception occurs during synchronization, the domain.xml file existed before synchronization started, it still exists, and the timestamp of the domain.xml file was not changed during the synchronization process.

The _create-instance-filesystem command copies the domain.xml when the instance is created.

So to recreate this problem, do the following:

asadmin start-domain
asadmin create-instance --node localhost-domain1 i1
asadmin stop-domain
asadmin start-local-instance i1

Note that you must use "create-instance" and not "create-local-instance" in the 2nd command. create-local-instance doesn't run _create-instance-filesystem so the domain.xml is not copied over.

Comment by Tom Mueller [ 03/Jan/12 ]

Fixed on the 3.1.2 branch in revision 51864.
Fixed on the trunk in revision 51865.

The fix is to cause the sync to fail with an exception if the sync has never finished successfully.





[GLASSFISH-18069] asadmin documentation incorrect regarding backslash escapes Created: 21/Dec/11  Updated: 10/Jan/12  Resolved: 10/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.1
Fix Version/s: 3.1.2_b17

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


 Description   

From Paul:

Documented Behavior: The asadmin(1M) man page states that on Windows systems in single command mode, the backslash character does not require an escape character.
Actual Behavior: With create-system-property, the backslash character must be escaped, even on Windows systems in single mode.

Documented Behavior: Example 7 in asadmin(1M) shows that 4 backslashes are need to specify the \ in an option argument on Linux and UNIX systems.
Actual Behavior: A single \ as an escape character is sufficient for the set subcommand.

While looking at the examples in asadmin(1M), I became confused as to why 4 backslashes are required in Example 7, whereas only 2 are required in Example 8. From the descriptions in the asadmin(1M) man page, I would not have been able to predict this difference.

From Tom:
The reason why example 8 doesn't require the 4 backslashes is because the option being passed in is not a properties list (a set of name=value pairs separated with : or some other separator). This is unlike example 7 where the jvm-options are a properties list.

From Paul:
This point is implied by the examples, but is not stated explicitly. Part of the fix will be to update the documentation to make this point explicit.



 Comments   
Comment by Paul Davies [ 10/Jan/12 ]

Fix committed in revision 51972





[GLASSFISH-18063] Require to username/password to access admin console locally at the local system in b14 Open Source GlassFish promoted build 14 Created: 20/Dec/11  Updated: 09/Feb/12  Resolved: 08/Jan/12

Status: Resolved
Project: glassfish
Component/s: admin_gui
Affects Version/s: 3.1.2_b14
Fix Version/s: 3.1.2_b17

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

Ubuntu with Jdk 1.7.0_02


Attachments: Text File b14-server.log     Text File b16-server.log     PNG File secure-admin-required.png    
Issue Links:
Duplicate
is duplicated by GLASSFISH-18125 Cannot access admin console on clean ... Resolved
Related
is related to GLASSFISH-18133 JDK 1.7.0_02 - Nodes/instances creati... Resolved
Tags: 3_1_2-release-note-added, 3_1_2-release-notes, admin-gui

 Description   

Require to username/password to access admin console locally at the local system in b14 Open Source GlassFish promoted build 14

On promoted build 14 open source Glassfish 4848 prompt for admin_user/admin_password when trying to access the Admin Console the first startup.
But on promoted build 13 open source Glassfish 4848 it do not prompt any admin_user/admin_password to access the Admin Console at all.

Both are just the prompted zip build.

On promoted b13 zip build, when first unzip and start the domain the first time, it will not create ~/.asadminpass at all.
On promoted b14 zip build, when first unzip and start the domain the first time, it will create ~/.asadminpass

In build 13 when I test remotely login from other system, it will prompt.
http://vmlin.us.oracle.com:4848/
http://vmlin.us.oracle.com:4848/j_security_check

Testing locally on the system no prompt for build 13
http://vmlin:4848/
http://vmlin.us.oracle.com:4848/
http://localhost:4848/

However on build 14, it will prompt anyway remote or locally.



 Comments   
Comment by Anissa Lam [ 20/Dec/11 ]

There has been long email discussion on this, which provides very useful info regarding this bug.
Capturing it here.

On 12/19/2011 4:25 PM, Tim Quinn wrote:
> (adding Mitesh to the fun, and Paul too for a possible heads-up on a release note)
>
> On Dec 19, 2011, at 4:19 PM, Homer Yau wrote:
>
>> Hi Tim,
>>
>> If "~/.asadminpass" exist (empty file), now even b13 will have Administration Console will ask for User Name and Password.
>>
> I was able to reproduce this problem following these steps:
>
> 1. I changed my browser config to use a proxy and NOT exclude localhost or 127.0.0.1. (The default setting was to exclude those.) I did NOT use the Oracle standard wpad.dat for the proxy config; I set the proxy to adc-proxy.oracle.com:80 and cleared out the "No Proxy For" field (this is with Firefox).
>
> 2. I tried to launch the admin console using myHostName.us.oracle.com from Firefox. I get the username/password prompt.
>
> 3. If I use localhost:4848 the browser does not prompt me for credentials; it goes right to the main console screen.
>
> I see two aspects to this:
>
> a. Requests that come through a proxy are treated as remote.
>
> I set a breakpoint in the GenericAdminAuthenticator (which is what all Grizzly adapters for admin requests use) which invokes NetUtils.isThisHostLocal to decide if the requesting host is local or not. That method returns false (meaning "not local").
>
> I am no expert at this part, but there are some http headers which, if present, could imply that the request was forwarded through a proxy. I am not sure how easy it is to use such headers to correctly identify the original source of the request. Even if we changed the authentication logic to do that it's possible (at least it seems possible to me - I'm not sure) that we'd open up a security hole; someone could find out where the DAS is running and then falsify headers to make it look as if a truly remote request came from the DAS host through a proxy.
>
> So I do not think we should change the current behavior that detects remoteness.
>
>
> b. The console or the REST code which it invokes might not be correctly processing the GenericAdminAuthenticator.loginAsAdmin return value.
>
> The GAA.loginAsAdmin method is returning FORBIDDEN in this case (because the request seems to have come from a remote system) but the user is asked for the username and password instead of being told that remote admin is currently disabled.
>
> I am not sure whether this is due to the way the REST logic works or how the console interprets what the REST logic sends back.
>
The REST layer sends back FORBIDDEN. (See [1], specifically code in bold for corresponding code form RestAdapter.java). Anissa, can you please check what the console does with this value.

[1] Code form RestAdapter

AdminAccessController.Access access = authenticate(req);
if (access == AdminAccessController.Access.FULL)

{ exposeContext(); //delegate to adapter managed by Jersey. ((GrizzlyAdapter)adapter).service(req, res); }

else { // Access != FULL

String msg;
int status;
if (access == AdminAccessController.Access.NONE)

{ status = HttpURLConnection.HTTP_UNAUTHORIZED; msg = localStrings.getLocalString("rest.adapter.auth.userpassword", "Invalid user name or password"); res.setHeader("WWW-Authenticate", "BASIC"); }

else

{ assert access == AdminAccessController.Access.FORBIDDEN; status = HttpURLConnection.HTTP_FORBIDDEN; msg = localStrings.getLocalString("rest.adapter.auth.forbidden", "Remote access not allowed. If you desire remote access, please turn on secure admin"); }

reportError(req, res, status, msg);
}

Thanks,
Mitesh

>
> Anissa and Mitesh, it looks like we need to turn to you for the next step with this.
>
> My opinion is that, in this use case, the console should let the user know that remote admin is currently disabled. I suppose the message could also include something about a proxy being involved, but that might just confuse a normal end-user.
>
> We should also add a release note that if users try to use the console from a system through a proxy on another system back to the original system, while using the system's full host name (instead of localhost or 127.0.0.1) then they will be denied access because the request will be treated as a remote request, which would require that secure admin be enabled.
>
> Note that, when I use the normal wpad.dat Oracle proxy set-up in Firefox then I can launch the console even specifying the full host name for my system. In fact, even with Firefox set up to use a hard-coded proxy address if I leave the default setting in place to bypass the proxy for localhost and 127.0.0.1 then launching the console works fine. So, while I think Homer has found something we should fix it should not happen often in normally-configured environments.
>
> - Tim
>
>> [homer@vmlin ~]$ cat ~/.asadminpass
>> # Do not edit this file by hand. Use login interface instead.
>>
>>
>>
>> Thanks,
>> Homer Yau
>>
>> Tim Quinn wrote:
>>>
>>> On Dec 19, 2011, at 1:42 PM, Tom Mueller wrote:
>>>
>>>> When I unzip and run start-domain with the current build, I do not see a ~/.asadminpass, but when I run uptime, then one shows up, and it is empty.
>>>>
>>>> Is it possible that you have a proxy enabled in your browser? If so, even though you access "vmlin.us.oracle.com" from that host, the request will still go through the proxy and from the server's perspective, it is a remote request, so secure admin is required.
>>>
>>> Tom has nicely identified a possible reason that the asadmin command works as we expect but the browser does not, which is precisely why I suggested the asadmin test. Thanks for running the test and sending us the results.
>>>
>>> (By the way, I don't think the empty ~/.asadminpass is a problem. I just wanted you to delete any such file before running the test to be sure we knew exactly what the test conditions were.)
>>>
>>> I am adding Anissa to this thread, now that it seems that we see this odd behavior with the console but not with the asadmin command-line tool.
>>>
>>> - Tim
>>>
>>>>
>>>> Tom
>>>>
>>>>

Comment by Jason Lee [ 20/Dec/11 ]

As far as I can tell, I'm following the proxy instructions correctly, but when I access http://myoracleip:4848/, I get a login screen with the secure admin message. When I try to access http://localhost:4848/ through the proxy, I get a message from the McAfee proxy server telling me it can't connect (presumably, it's trying to connect to 127.0.0.1:4848 relative to it rather me). What am I missing?

Comment by Tim Quinn [ 20/Dec/11 ]

Not sure about the access to localhost via the proxy.

I think the key concern is that accessing http://myoracleip:4848 (through the proxy) should display the "remote administration is currently disabled" message instead of prompting for credentials.

Comment by Jason Lee [ 21/Dec/11 ]

I'll test again, but I'm pretty sure that's what I got (secure admin message when through the proxy).

Comment by Homer Yau [ 21/Dec/11 ]

I just create the issue again on the system again.

I will send you the login information on the separate email and attached the exception of the server.log on this bug.

Comment by Homer Yau [ 04/Jan/12 ]

I could still recreated on the same issue on promoted build 16 of the GlassFish Server Open Source Edition promoted build 16.

I have also attached the server.log of promoted b16.

Comment by Anissa Lam [ 08/Jan/12 ]

There seems several issues reported in this bug, I believe all is taken care of. Marking this as fixed based on the following.

1. login screen is presented to user when going to "localhost:4848" using jdk7_02. I can consistently reproduce this using b16, and see the exception:
[#|2012-01-06T16:46:45.092-0800|SEVERE|glassfish3.1.2|org.glassfish.admin.rest.resources.GeneratorResource|_ThreadID=87;_ThreadName=Thread-2;|java.lang.RuntimeException: Cannot find annotation org.glassfish.config.support.Create with value _create-node on method public abstract com.sun.enterprise.config.serverbeans.Node com.sun.enterprise.config.serverbeans.Nodes.getNode(java.lang.String)
at org.glassfish.config.support.GenericCrudCommand.getAnnotation(GenericCrudCommand.java:196)
This is very similar to the exceptions shown in GLASSFISH-18133. Once i switch to 1/8 nightly build, which has the fix to GLASSFISH-18133, the problem goes away. (System configuration, JDK, env, all stayed the same except use the nightly build). So, i believe the root cause is fixed.

2. Regarding to browser proxy setting issue.

I tried the following:

  • using localhost:4848, regardless what the browser's proxy setting, commonTask page shows up, skipping login page. This is correct and as expected.
  • If I change the browser proxy setting, so it won't skip proxy for "localhost, 127.0.01", and then launch console by going to <hostname:4848>, then console will not bypass the login screen, and the screen says clearly: "Secure Admin must be enabled to access the DAS remotely.". (see attached screen). According to Tim's evaluation, this is expected and console is showing the message clearly. So, console is behaving correctly.

I am marking this issue fixed. Homer can verify using 1/8 nightly build or wait for promoted build 17 to verify the fix. (Not sure if i should mark this as duplicate of GLASSFISH-18133, since GUI really didn't change any code to address this issue. The fix is in 18133).

There is the tag 3_1_2-release-notes added. Paul should add to the release note what Tim suggested.

Comment by Anissa Lam [ 08/Jan/12 ]

screenshot showing the login error msg.

Comment by Tim Quinn [ 08/Feb/12 ]

Workarounds (already mentioned in the release note Rebecca has already written):

Do not use a proxy server, or use localhost or 127.0.0.1 as the host name.

Another possible workaround:

Enable secure admin so that what GlassFish interprets as a remote request will be accepted:

With the server (and no other instances) running: (I am showing asadmin commands here because, presumably, console access fails due to this issue!)

asadmin change-admin-password Respond to the prompts - you must set a non-empty new password for GlassFish to accept the next command.

asadmin enable-secure-admin

asadmin restart-domain

When you log into the admin console or run the asadmin command you will need to use the new, non-empty password.

Comment by Rebecca Parks [ 09/Feb/12 ]

Added to 3.1.2 Release Notes:

Description

If you try to use the Administration Console from a system through a proxy server on another system back to the original system, while using the system's full host name (instead of localhost or 127.0.0.1) you are denied access because the request is treated as a remote request, which requires that secure admin be enabled.

Workaround

Do one of the following:

  • Do not use a proxy server.
  • Use localhost or 127.0.0.1 as the host name.
  • Enable secure admin so that what GlassFish Server interprets as a remote request is accepted as such.

To enable secure admin, see "Managing Administrative Security" in the Oracle GlassFish Server Security Guide.





[GLASSFISH-18055] Cannot open log viewer for an instance on a dcom node Created: 20/Dec/11  Updated: 01/Feb/12  Resolved: 05/Jan/12

Status: Closed
Project: glassfish
Component/s: logging
Affects Version/s: 3.1.2_b14
Fix Version/s: 3.1.2_b17, 4.0

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

ogs-3.1.2-b14.zip


Attachments: Text File 18055.txt     JPEG File dcomnode-logviewer-hang.JPG     Text File server.log    
Issue Links:
Related
is related to GLASSFISH-18295 javaee6u4_ri-3.1.2-b20.zip, domain fa... Closed
Tags: 312_gui_new, 312_qa, 3_1_2-approved

 Description   

Created a dcom node and an instance under this node. Started the instance and clicked on View Log Files. New window opens but it does not display the log viewer but keeps waiting for the DAS. There is nothing printed to server.log. Log viewer works fine with an instance on an SSH node. Tried switching to server.log of an instance on a DCOM node in log viewer but again it displayed an hour glass and kept waiting for DAS response.



 Comments   
Comment by lidiam [ 20/Dec/11 ]

There is an exception in server.log after all:

[#|2011-12-19T19:07:54.702-0800|SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.server.logging.logviewer.backend|_ThreadID=131;_ThreadName=Thread-2;|CORE10005: Exception in fetching record using query:

{0}

java.io.IOException: There was a problem while connecting to jed-asqe-43:135

server.log attached.

Comment by Anissa Lam [ 20/Dec/11 ]

Code to get the logs is the same regardless of what kind of node the instance is using.
The exception is from javax.enterprise.system.core.com.sun.enterprise.server.logging.logviewer.backend

transfer to 'logging' for evaluation.

Comment by Byron Nevins [ 03/Jan/12 ]

Sending cluster\cli\src\main\java\com\sun\enterprise\admin\cli\cluster\InstallNodeDcomCommand.java
Sending cluster\common\src\main\java\com\sun\enterprise\util\cluster\windows\io\WindowsRemoteFile.java
Sending cluster\common\src\main\java\com\sun\enterprise\util\cluster\windows\io\WindowsRemoteFileCopyProgress.java
Sending cluster\compare.bat
Sending cluster\copyy.bat
Sending cluster\setfiles.bat
Transmitting file data ......
Committed revision 51863.

Comment by naman_mehta [ 04/Jan/12 ]
  • What is the impact on the customer of the bug?
    This bug won't allow customer to view server.log file if instance is setup on windows using dcom node.
  • How likely is it that a customer will see the bug and how serious is the bug?
    It's serious bug.
  • Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)?
    No
  • What is the cost/risk of fixing the bug?
    Need changes in log viewer back end code.
  • How risky is the fix? How much work is the fix? Is the fix complicated?
    No impact on other modules.
  • Is there an impact on documentation or message strings?
    No
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
    It's log viewer related issue, QA need to setup dcom node on windows and verify by log viewer screen from admin console.
  • Which is the targeted build of 3.1.2 for this fix?
    3.1.2 b17
Comment by naman_mehta [ 04/Jan/12 ]

Attached Change list(18055.txt) for log viewer back end code.

Comment by naman_mehta [ 05/Jan/12 ]

3.1.2
Sending logging/src/main/java/com/sun/enterprise/server/logging/logviewer/backend/LogFilter.java
Sending logging/src/main/java/com/sun/enterprise/server/logging/logviewer/backend/LogFilterForInstance.java
Transmitting file data ..
Committed revision 51898.

4.0
Sending src/main/java/com/sun/enterprise/server/logging/logviewer/backend/LogFilter.java
Sending src/main/java/com/sun/enterprise/server/logging/logviewer/backend/LogFilterForInstance.java
Transmitting file data ..
Committed revision 51900.





[GLASSFISH-18054] [508] Layout Table in the Login Page not defined clearly. Created: 20/Dec/11  Updated: 25/Jan/12  Resolved: 25/Jan/12

Status: Resolved
Project: glassfish
Component/s: admin_gui
Affects Version/s: 3.1.2_b14
Fix Version/s: 3.1.2_b17, 3.1.2_b20, 4.0

Type: Bug Priority: Minor
Reporter: shaline Assignee: andriy.zhdanov
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS: solaris sparc 10
FF 8.0.1
GF 3.1.2 SCF b14


Attachments: File common-tasks-layout-table.bmp     JPEG File edit-node.JPG     JPEG File login.JPG     JPEG File new-jdbc-pool.JPG     File new-jdbc-resource.bmp     JPEG File new-load-balancer.JPG     JPEG File server-general-information.JPG     File wodstock.diff     File woodstock2.diff     File working-internal.diff     File working.diff    
Issue Links:
Related
is related to GLASSFISH-18252 [508] Layout Table in the CommonTasks... Resolved
Tags: 3_1_2-508, 3_1_2_approved

 Description   

After we enable secure admin, and access console from a remote browser, the Login Screen in console has a layout table which could be confused by screen reader as data table.OGHAG toolbar Table Analyzer reports ERROR for the Layout table in the Login page:
Attached the OGHAG Table Report for the login page:



 Comments   
Comment by shaline [ 22/Dec/11 ]

Few more tables in the Console have this issue in 3.1.2 SCF b15.
They are:
Add Resources Page
New Node Page
New JDBC Pool Page
New JDBC resource Page
Edit Node Page
New Http Load Balancer Page
Common Tasks Page.
Attached the Screen shots for these pages for reference.

Comment by andriy.zhdanov [ 04/Jan/12 ]

Thought fix based on http://webaim.org/standards/508/checklist:

Either add role="presentation" to a table or appropriate <th> element

Comment by andriy.zhdanov [ 06/Jan/12 ]
  • What is the impact on the customer of the bug?

Minimal (508 issue).

  • What is the cost/risk of fixing the bug?

No risk.

  • Is there an impact on documentation or message strings?

No

  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?

Sanity test login page.

  • Which is the targeted build of 3.1.2 for this fix?

3_1_2_b17

Comment by andriy.zhdanov [ 06/Jan/12 ]

Fix in woodstock (branches/Woodstock_402_Branch):

Committed revision 1599

Comment by andriy.zhdanov [ 06/Jan/12 ]

Fixed loginform in glassfish:

Committed revision 51930.
Committed revision 51931.
Committed revision 51932.

Comment by Anissa Lam [ 09/Jan/12 ]

Woodstock 4.0.2.9 has been integrated to Glassfish on both 3.1.2 branch and trunk.
Marking the bug fixed.

Comment by shaline [ 19/Jan/12 ]

I see the error from the OGHAG table inspector , for the Login Page and the Common Tasks Window. In the rest of the screens reported in the issue, like New Nodes page, New JDBC Pools page etc are all fixed. For Login Page and Common Tasks, the error still shows up on GF 3.1.2 Promoted b18.

Comment by andriy.zhdanov [ 24/Jan/12 ]

Fix for OGF loginpage. The fix for commonTasks table must be in woodstock.

  • What is the impact on the customer of the bug?

Minimal (508 issue).

  • What is the cost/risk of fixing the bug?

No risk.

  • Is there an impact on documentation or message strings?

No

  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?

Sanity test login page.

  • Which is the targeted build of 3.1.2 for this fix?

3_1_2_b20

Comment by andriy.zhdanov [ 25/Jan/12 ]

Fix for CommonTasks section in woodstock

Comment by andriy.zhdanov [ 25/Jan/12 ]

Fixed login page in OGF:
Committed revision 3653
Committed revision 3654

Fix for CommonTasks is tracked in separate issue GLASSFISH-18252





[GLASSFISH-18043] Delete and uninstall node deletes a CONFIG node Created: 17/Dec/11  Updated: 13/Jan/12  Resolved: 10/Jan/12

Status: Closed
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.2_b14
Fix Version/s: 3.1.2_b17

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

ogs-3.1.2-b14.zip


Tags: 312_gui_new, 312_qa, 312_verified

 Description   

When clicking on Delete and Uninstall for a CONFIG node, the node is deleted. This should not be allowed, since CONFIG node cannot be uninstalled on a remote machine, thus it is misleading. There is a Delete button, to remove the node from domain.xml.



 Comments   
Comment by Anissa Lam [ 17/Dec/11 ]

The node listing table allows multiple selection. Whenever there is any row selected, both "delete" and "delete and uninstall" button will be enabled, since user may select multiple types of node, including CONFIG, SSH and DCOM, we cannot just enable the Delete button only.
Just like when there is start and stop button on instances table, both button will be enabled whenever any row is selected, even though the start instance button doesn't apply to instance that already started. It will just be an no-op.

The page title help hasn't been updated to mention about the new "Delete and Uninstall" button. It should explain what "Delete and Uninstall" means, and mention that if the type is CONFIG, the CONFIG node will be deleted as uninstall will not apply.

Transfer to 'doc' for adding this info.

Comment by lidiam [ 19/Dec/11 ]

Could we have an additional popup when user selects to "Delete and Uninstall" a CONFIG node? We could notify them that node will not be uninstalled, only deleted in domain.xml and if they click OK, then we proceed. I presume we can detect that user selected a CONFIG node, versus SSH or DCOM, right? The "Delete and Uninstall" should work fine for both SSH and DCOM, only CONFIG is different.

Comment by Paul Davies [ 06/Jan/12 ]

The page title help is fine as is. It doesn't mention any of the other buttons, so I see no need to describe the behavior of Delete and Uninstall in the page title help. This information should be added to the online help for the nodes page.

Comment by Paul Davies [ 10/Jan/12 ]

Fix committed in revision 51972.

Comment by lidiam [ 13/Jan/12 ]

Verified in build ogs-3.1.2-b17.zip





[GLASSFISH-18019] Admin GUI doesn't throw exception when JMS cluster type is set to enhanced for the EMBEDDED mode. Created: 15/Dec/11  Updated: 07/Jan/12  Resolved: 07/Jan/12

Status: Resolved
Project: glassfish
Component/s: admin_gui
Affects Version/s: 3.1.2_b14
Fix Version/s: 3.1.2_b17

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

Attachments: File 18019-new.diff     File 18019.diff    
Sub-Tasks:
Key
Summary
Type
Status
Assignee
GLASSFISH-18077 Add page title help for JMS Availabil... Sub-task Resolved Mike Fitch  
Tags: 312_qa, 3_1_2-approved

 Description   

Enhanced jms clusters are not supported in EMBEDDED mode(default mode) so there is no point in giving enhanced cluster option at the time of cluster creation in admin GUI.

When I try to create enhanced cluster using admin CLI before changing the jms type to LOCAL, I got the following error. I didn't see the similar error in GUI.

./asadmin create-cluster cluster1
Command create-cluster executed successfully.
./asadmin configure-jms-cluster --clustertype=enhanced --dbvendor=mysql --dbuser=root --dburl="jdbc:mysql://hostname:portno/dbname?password=xxx" cluster1
remote failure: EMBEDDED JMS integration mode is not supported for Enhanced clusters. Please use the asadmin.set command to change the JMS integration mode
Command configure-jms-cluster failed.

steps to reproduce the problem
------------------------------

create cluster using admin gui
select Message Queue Cluster Config Type as custom
select JMS Cluster Type: enhanced
and enter Database related properties

Admin GUI throws completely different error related to JMS Config Store Type.

-Sarada



 Comments   
Comment by Anissa Lam [ 19/Dec/11 ]

I think there are several issues we need to fix in this page.

1. use configure-jms-cluster endpoint instead of through the config bean when doing this Save. Seems the command itself will provide errors like reported, but through config bean 'set' will not.

2. Also shows "type" from <jms-service>. Do not allow the combination of "EMBEDDED" with Availability on. I am not sure if we should change this to a dropdown of 2 options (Conventional & Enhanced ). This matches the CLI usage more, and match the Cluster creation screen.

3. Need to allow user to use Password Alias besides Password.

The following is for usability, hope we can get to that.

4. In the PageTitle help, add a link that can bring user to the JMS configuration page. Just like in Server -> Monitoring tab, a link is shown allowing user to go to the monitoring configuration page.

5. On the JMS Configuration page, also add a link to the JMS Availability page.

6. When Availability is selected, no need to show Configuration Store type and Message Store type since for Enhanced (HA) cluster, those 2 info is ignored. Always show the DB infos.

7. when "file" is chosen, the DB info should not be shown as that is not needed.

Comment by Jason Lee [ 21/Dec/11 ]
  • What is the impact on the customer of the bug?

High impact. Functionality is incomplete.

  • What is the cost/risk of fixing the bug?

Moderate risk. Tests added to verify functionality.

  • Is there an impact on documentation or message strings?

New strings have been added.

  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?

Console devtests.

  • Which is the targeted build of 3.1.2 for this fix?

b16

Comment by Jason Lee [ 21/Dec/11 ]

Fix committed (r51702)

Comment by Anissa Lam [ 27/Dec/11 ]

I don't see any of my comments have been implemented. Reopen the bug.

However, since this Availability -> JMS Availability tab is basically the same thing as configuring the JMS cluster during the cluster creation, we (Amy, Sarada and Anissa) believed that it will be best that this page behaves and layout EXACTLY as the JMS section in the create cluster page. Maybe easier for Jason to factor the code so it can be shared in both pages. That will keep care of many of my previous comments except #4 and #5.

  • 4. In the PageTitle help on the JMS Availability page, add a link that can bring user to the JMS configuration page. Just like in Server -> Monitoring tab, a link is shown allowing user to go to the monitoring configuration page.
  • 5. On the JMS Configuration page, also add a link to the JMS Availability page.

Basically, user can switch between these 2 pages (JMS Availability and JMS Configuration) page easily.

One additional thing that is needed for this JMS Availability tab is that

  • if there is any instance that uses this config is running (instances in a cluster, standalone instance), then have a label or static text field, saying something like "all instance must be stopped when changing this configuration", and make all the fields Read Only.
Comment by Jason Lee [ 06/Jan/12 ]

Diff of changes for new JMS Availability tab and other related changes

Comment by Jason Lee [ 06/Jan/12 ]

Changes committed (r51938). Leaving issue open for Anissa and QA to verify, and make any additional changes that may be necessary.

Comment by Anissa Lam [ 07/Jan/12 ]

The remaining issues has been checked in. I accidentally put in the wrong issue #. should have said GLASSFISH-18019.

I am marking this resolved. 1/7 nightly build should have all the changes.

Log Message:
------------
GLASSFISH-51938. cleanup and fix the remaining JMS issues:

  • tree highlight, title page help text, provides link in the 2 jms pages to point to each other so user can switch easily.
    Revisions:
    ----------
    51939
    Modified Paths:
    ---------------
    branches/3.1.2/admingui/cluster/src/main/resources/org/glassfish/cluster/admingui/Strings.properties
    branches/3.1.2/admingui/jms-plugin/src/main/resources/jmsHandlers.inc
    branches/3.1.2/admingui/jms-plugin/src/main/resources/jmsAvailabilityService.jsf
    branches/3.1.2/admingui/jms-plugin/src/main/resources/org/glassfish/jms/admingui/Strings.properties




[GLASSFISH-18009] Help topic "To Create a ZIP Archive of All Log Files" (task-logging-collectlogfiles.html in common module) contains TBD Created: 15/Dec/11  Updated: 09/Jan/12  Resolved: 09/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.1
Fix Version/s: 3.1.2_b17

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


 Description   

The "To Create a ZIP Archive of All Log Files" topic doesn't tell you what to do. Instead, its only step is "TBD".



 Comments   
Comment by Rebecca Parks [ 19/Dec/11 ]

Already fixed. The instructions are under task-collectdomainlogs. The duplicate task-logging-collectlogfiles has been removed.

Comment by Rebecca Parks [ 09/Jan/12 ]

Fixed in bundled docs for HCF.





[GLASSFISH-18002] Substeps in online help topics are numbered as primary steps Created: 14/Dec/11  Updated: 10/Jan/12  Resolved: 10/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.2_b14
Fix Version/s: 3.1.2_b17

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

Attachments: JPEG File Snap3.jpg    

 Description   

As shown in screenshot, substeps use arabic numbering just like steps. In past releases, substeps have used lowercase alpha sequencing to differentiate them from steps.



 Comments   
Comment by Mike Fitch [ 15/Dec/11 ]

Fix implemented and tested locally, will appear publicly in build 17.

Comment by Mike Fitch [ 10/Jan/12 ]

Fix committed in rev 51972.





[GLASSFISH-18001] Online help for common module contains weird header content Created: 14/Dec/11  Updated: 10/Jan/12  Resolved: 10/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.2_b14
Fix Version/s: 3.1.2_b17

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

Attachments: JPEG File screenshot-1.jpg    

 Description   

It appears that help topics in the common module have navigation buttons at the top of the page:

Skip Headers |Previous|
Previous |Next|
Next

This should not appear.



 Comments   
Comment by Mike Fitch [ 15/Dec/11 ]

Fix implemented and tested locally, will appear publicly in build 17.

Comment by Mike Fitch [ 10/Jan/12 ]

Fix committed in rev 51972.





[GLASSFISH-18000] Online help for common module appears separately in help table of contents Created: 14/Dec/11  Updated: 10/Jan/12  Resolved: 10/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.2_b14
Fix Version/s: 3.1.2_b17

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

Attachments: JPEG File screenshot-1.jpg    

 Description   

In 3.1.2_b14, the online help contents appears as:

  • GlassFish Server Administration Console Reference
  • GlassFish Server Administration Console Tasks
  • Oracle GlassFish Server 3.1.2 Common Online Help
  • GlassFish Server Administration Console Reference
  • GlassFish Server Administration Console Tasks

The third top-level group should not appear, and its two subordinate entries should be merged into the other help modules' Reference and Tasks items.



 Comments   
Comment by Mike Fitch [ 15/Dec/11 ]

Fix implemented and tested locally, will appear publically in build 17.

Comment by Mike Fitch [ 10/Jan/12 ]

Fix committed in rev 51972.





[GLASSFISH-17998] Admin GUI slow when viewing Connection Pool with validation set to table. Created: 14/Dec/11  Updated: 09/Jan/12  Resolved: 09/Jan/12

Status: Resolved
Project: glassfish
Component/s: admin_gui
Affects Version/s: 3.1.1, 3.1.2_b13
Fix Version/s: 3.1.2_b17

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

Unix and Oracle Database 10g


Tags: 3_1_2_approved, admin-gui, connection, explorer, firefox, jdbc, slow, table, validation

 Description   

With Glassfish 3.x installed and using Oracle 10/11 database and the Glassfish is configured with say ojdbc6.jar and a few connection pool
is created.

When one setup the connection pool with "table" validation, the admin gui
does a AJAX call to get all the database table NAMES.
The issue here is two fold:

1) It is very slow (10-20 sec) for a out of the box Oracle database
as the DatabaseMetaData.getTables() return close to 20K tables names
This has to be done it seems for every viewing of connection
pool with "table" validation set.

2) Next, the Javascript code to manipulate and ADD <OPTION> is
also VERY VERY slow. It is not optimized.
(This is setTableOptions() in the jdbcConnectionPoolAdvanceJS.inc)

The request here is
1) Can this be made to be much lazier (as it is very slow)
(instead of automatically).
2) Somehow having 20K tables names (it a lot). Is there possibly
somehow a better control is made to avoid this..

    • Note: optimizing the "Javascript" improves the DOM display but
      in the case of a out of the box Oracle, 20K table name thru AJAX
      for some reason is slow (10-15 sec) so maybe there should be
      some "cut-off".


 Comments   
Comment by gfuser9999 [ 15/Dec/11 ]

Here's a sample timing: (where the Oracle10/11g normal
user is used. Do note that the Database.getMetaData.getTables()
by itself would give 20,000 tables (ie: PUBLIC., SYS., XDB.*
and also the user's Tables but Oracle internal
tables are amounting to those large numbers).

The AJAX get (by profiling)
--------------------------

  • Sent and get response (equivalent to _get-jdbc-tables-names)
    locally is rought 4-8 secs (or using plain Java POJO)
  • Now on IE8 (windows): 10-20 secs
  • The time to run the jdbcConnectionPoolAdvanceJS.inc
    setTableOptions takes 4-5 mins.

You can see that piece of Javascript manipulation is
very inefficient by always doing DOM manipulation
per table entry. By changing to manual
innerHTML (does not work on IE but Firefox), one
can get the whole OPTIONS set in 30 sec.

The whole point is that
------------------------
1) If people do select TABLE validation, IF there is
already a previous configured entry (found in domain.xml)
Please do not run this combobox everytime, instead
select the use value and set that radiobutton.
(If really the user need to choose then maybe
do it).

-> this is to avoid for every new page visit the SLOWness

2) You may want to improve the DHTML and as expressed
maybe the GUI choose to changed to choose the set of
tables name somewhat lazily or (a button to press to
get all these tables (which the user then knows he would
have to wait).

Comment by Anissa Lam [ 15/Dec/11 ]

This is also filed as internal bug#13503774
When we resolve this bug, please update the internal bug as well.

Comment by sumasri [ 06/Jan/12 ]
  • What is the impact on the customer of the bug?
    Loading of JDBC Connection pool advanced page is taking a very long time, if the user has many validation tables when connection validation is turned on and validation method is table.
  • What is the cost/risk of fixing the bug?
    1 day..No risk. It will even optimize the page loading.
  • Is there an impact on documentation or message strings?
    No
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
    Manual testing and play around connection validation section in JDBC connection pool advanced page.
  • Which is the targeted build of 3.1.2 for this fix?
    3.1.2_b17

Diff:
Index: src/main/resources/jdbcConnectionPoolAdvance.jsf
===================================================================
— src/main/resources/jdbcConnectionPoolAdvance.jsf (revision 51842)
+++ src/main/resources/jdbcConnectionPoolAdvance.jsf (working copy)
@@ -113,14 +113,6 @@
}
gf.createAttributeMap(keys=

{"className"}

values={"$attribute

{encodedClassName}

"} map="#

{pageSession.validCNAttrMap}");
if ("#{pageSession.valueMap.isConnectionValidationRequired}=true") {
- if ("#{pageSession.valueMap.connectionValidationMethod}=table") {
- gf.restRequest(endpoint="#{sessionScope.REST_URL}/resources/get-validation-table-names"
- attrs="#{pageSession.attrMap}"
- method="get"
- result="#{requestScope.result}");
- setPageSessionAttribute(key="tableNameList" value="#{requestScope.result.data.extraProperties.validationTableNames}");
- gf.containedIn(list="#{pageSession.tableNameList}" testStr="#{pageSession.valueMap.validationTableName}" contain="#{requestScope.isTableNames}");
- }
if ("#{pageSession.valueMap.connectionValidationMethod}=custom-validation") {
gf.restRequest(endpoint="#{sessionScope.REST_URL}/resources/get-validation-class-names"
attrs="#{pageSession.validCNAttrMap}

"
@@ -133,15 +125,10 @@
setAttribute(key="emptyStr" value="");
setPageSessionAttribute(key="myTableOption" value="dropdown");
setPageSessionAttribute(key="myValidCNOption" value="dropdown");

  • if (# {requestScope.isTableNames}) {
    - setPageSessionAttribute(key="tableDropDownValue" value="#{pageSession.valueMap.validationTableName}");
    - }
    - if (!#{requestScope.isTableNames}

    ) {

  • if (# {pageSession.valueMap.validationTableName}) {
    - if ("!(#{pageSession.valueMap.validationTableName}

    ='')") {

  • setPageSessionAttribute(key="tableTextValue" value="# {pageSession.valueMap.validationTableName}");
    - setPageSessionAttribute(key="myTableOption" value="text");
    - }
    + if (#{pageSession.valueMap.validationTableName}

    )

    Unknown macro: {+ if ("!(#{pageSession.valueMap.validationTableName}='')") {
    + setPageSessionAttribute(key="tableTextValue" value="#{pageSession.valueMap.validationTableName}");+ setPageSessionAttribute(key="myTableOption" value="text"); }

    }
    if (#

    {requestScope.isClassNames}) { @@ -149,7 +136,7 @@ }
    if (!#{requestScope.isClassNames}

    ) {
    if (#

    {pageSession.valueMap.validationClassname}) {
    - if ("!(#{pageSession.valueMap.validationClassName}='')") {
    + if ("!(#{pageSession.valueMap.validationClassname}

    ='')") {
    setPageSessionAttribute(key="validCNTextValue" value="#

    {pageSession.valueMap.validationClassname}");
    setPageSessionAttribute(key="myValidCNOption" value="text");
    }
    Index: src/main/resources/jdbcConnectionPoolAdvanceButtons.inc
    ===================================================================
    — src/main/resources/jdbcConnectionPoolAdvanceButtons.inc (revision 51842)
    +++ src/main/resources/jdbcConnectionPoolAdvanceButtons.inc (working copy)
    @@ -63,6 +63,10 @@
    if ("#{pageSession.myValidCNOption}=text") {
    setValueExpression(expression="#{pageSession.valueMap['validationClassname']}", value="#{pageSession.validCNTextValue}");
    }
    + gf.filterMap(map="#{pageSession.valueMap}" attrNames={'validationClassname'} keep="#{true}" resultMap="#{validationClassNameMap}");
    + gf.createEntity(endpoint="#{pageSession.resourceUrl}"
    + attrs="#{validationClassNameMap}"
    + );
    }
    }

    Index: src/main/resources/org/glassfish/jdbc/admingui/Strings.properties
    ===================================================================
    — src/main/resources/org/glassfish/jdbc/admingui/Strings.properties (revision 51842)
    +++ src/main/resources/org/glassfish/jdbc/admingui/Strings.properties (working copy)
    @@ -102,6 +102,7 @@
    jdbcPool.valCNHelp=If custom-validation is selected, specify validation classname.
    jdbcPool.tableName=Table Name:
    jdbcPool.tableNameHelp=If table validation is selected, select or enter the table name.
    +jdbcPool.populatetableNames=Populate Table Names
    jdbcPool.failOnAny=On Any Failure:
    jdbcPool.failOnAnyHelp=Close all connections and reconnect on failure, otherwise reconnect only when used
    jdbcPool.closeAll=Close All Connections
    Index: src/main/resources/jdbcConnectionPoolAdvanceJS.inc
    ===================================================================
    — src/main/resources/jdbcConnectionPoolAdvanceJS.inc (revision 51842)
    +++ src/main/resources/jdbcConnectionPoolAdvanceJS.inc (working copy)
    @@ -45,13 +45,14 @@
    function disableTableField(selStr, selValidCNVal) {
    var val = document.getElementById("$pageSession{valMethod}").value;
    var isConnValidation = document.getElementById("$pageSession{conValidationId}").checked;
    - if (isConnValidation && val == 'table'){
    + if (isConnValidation && val == 'table'){
    disableAllJdbcRadioButtons(false, 'table');
    - var dropDownVal = document.getElementById("$pageSession{tableDropdownTextId}").value;
    - if (dropDownVal == '') {
    + var index = findSelectOptionIndex(document.getElementById("$pageSession{tableDropdownTextId}"), selStr);
    + alert(index);
    + if (index == undefined || index == -1) { enableJdbcRadioButtons('text', 'table'); } else {
    - if(dropDownVal == selStr) {
    + if(index >= 0) {
    document.getElementById('$pageSession{tableTextId}').value='';
    enableJdbcRadioButtons('dropdown', 'table');
    }
    @@ -61,11 +62,13 @@
    enableJdbcRadioButtons('text', 'table');
    }
    }
    + enableBtnComponent('$pageSession{tableNamesButtonId}');
    disableComponent('$pageSession{validCNDropdownTextId}', 'select');
    disableTextComponent('$pageSession{validCNTextId}');
    disableAllJdbcRadioButtons(true, 'validCN');
    }else if (isConnValidation && val == 'custom-validation') {
    disableAllJdbcRadioButtons(false, 'validCN');
    + disableBtnComponent('$pageSession{tableNamesButtonId}');
    var dropDownVal = document.getElementById("$pageSession{validCNDropdownTextId}").value;
    if (dropDownVal == '') { enableJdbcRadioButtons('text', 'validCN'); @@ -85,6 +88,7 @@ disableAllJdbcRadioButtons(true, 'table'); }else{
    disableComponent('$pageSession{tableDropdownTextId}', 'select');
    + disableBtnComponent('$pageSession{tableNamesButtonId}');
    disableTextComponent('$pageSession{tableTextId}');
    disableAllJdbcRadioButtons(true, 'table');
    disableComponent('$pageSession{validCNDropdownTextId}', 'select');
    @@ -100,16 +104,7 @@
    function getDropdownInfo(tableAttrs, validCNAttrs, tableVal, validCNVal) {
    var isConnValidation = document.getElementById("$pageSession{conValidationId}").checked;
    var methodVal = document.getElementById("$pageSession{valMethod}").value;
    - if (isConnValidation && methodVal == 'table'){
    - var b= tableAttrs.toString();
    - admingui.ajax.invoke("gf.restRequest", {
    - endpoint:"#{sessionScope.REST_URL}/resources/get-validation-table-names",
    - attrs:b,
    - method:"get",
    - result:""}, function(result) {
    - processResult(result, tableVal, "validationTableNames=", "$pageSession{tableDropdownTextId}");
    - }, 3, false);
    - } else if (isConnValidation && methodVal == 'custom-validation'){
    + if (isConnValidation && methodVal == 'custom-validation'){
    var c= validCNAttrs.toString();
    admingui.ajax.invoke("gf.restRequest", {
    endpoint:"#{sessionScope.REST_URL}/resources/get-validation-class-names",
    @@ -121,6 +116,20 @@
    }
    }

    + function getValidationTableNames(tableAttrs, tableVal) {
    + var b= tableAttrs.toString();
    + var size = document.getElementById("$pageSession{tableDropdownTextId}").options.length;
    + if (size < 1) {
    + admingui.ajax.invoke("gf.restRequest", {
    + endpoint:"#{sessionScope.REST_URL}/resources/get-validation-table-names",
    + attrs:b,
    + method:"get",
    + result:""}, function(result) {
    + processResult(result, tableVal, "validationTableNames=", "$pageSession{tableDropdownTextId}");
    + }, 3, false);
    + }
    + }
    +
    function processResult(result, selStr, searchStr, dropdownId) {
    if(result.result.data != undefined){
    var exitCode = result.result.data.exit_code.toString();
    Index: src/main/resources/advancePool.inc
    ===================================================================
    — src/main/resources/advancePool.inc (revision 51842)
    +++ src/main/resources/advancePool.inc (working copy)
    @@ -146,7 +146,7 @@
    <sun:propertySheetSection id="connectionValidationPropertySheet" label="$resource{i18njdbc.jdbcPool.Validation}">

    <sun:property id="conValidationProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18njdbc.jdbcPool.conValidation}" helpText="$resource{i18njdbc.jdbcPool.conValidationHelp}">
    - <sun:checkbox label="$resource{i18n.common.Required}" selected="#{pageSession.valueMap.isConnectionValidationRequired}" selectedValue="true" onChange="javascript: getDropdownInfo('#{pageSession.attrMap}', '#{pageSession.validCNAttrMap}', '#{pageSession.valueMap.validationTableName}', '#{pageSession.valueMap.validationClassName}'); disableTableField('#{pageSession.valueMap.validationTableName}','#{pageSession.valueMap.validationClassName}');" >
    + <sun:checkbox label="$resource{i18n.common.Required}" selected="#{pageSession.valueMap.isConnectionValidationRequired}" selectedValue="true" onChange="javascript: getDropdownInfo('#{pageSession.attrMap}', '#{pageSession.validCNAttrMap}', '#{pageSession.valueMap.validationTableName}', '#{pageSession.valueMap.validationClassname}

    '); disableTableField('#

    {pageSession.valueMap.validationTableName}','#{pageSession.valueMap.validationClassname}');" >
    <!afterCreate
    getClientId(component="$this{component}" clientId=>$page{conValidationId});
    />
    @@ -155,7 +155,7 @@

    <sun:property id="methodProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18njdbc.jdbcPool.valMethod}" >
    <sun:dropDown id="valMethod" selected="#{pageSession.valueMap.connectionValidationMethod}"
    - labels={"auto-commit" "meta-data" "custom-validation" "table"} onChange="javascript: getDropdownInfo('#{pageSession.attrMap}', '#{pageSession.validCNAttrMap}', '#{pageSession.valueMap.validationTableName}

    ', '#

    {pageSession.valueMap.validationClassName}'); disableTableField('#{pageSession.valueMap.validationTableName}', '#{pageSession.valueMap.validationClassName}

    ');">
    + labels=

    {"auto-commit" "meta-data" "custom-validation" "table"}

    onChange="javascript: getDropdownInfo('#

    {pageSession.attrMap}', '#{pageSession.validCNAttrMap}', '#{pageSession.valueMap.validationTableName}', '#{pageSession.valueMap.validationClassname}'); disableTableField('#{pageSession.valueMap.validationTableName}', '#{pageSession.valueMap.validationClassname}');">
    <!afterCreate
    getClientId(component="$this{component}" clientId=>$page{valMethod});
    />
    @@ -177,6 +177,11 @@
    getClientId(component="$this{component}" clientId=>$page{tableDropdownTextId});
    />
    </sun:dropDown>
    + <sun:button id="tableNamesButton" primary="#{false}" text="$resource{i18njdbc.jdbcPool.populatetableNames}" onClick="javascript: getValidationTableNames('#{pageSession.attrMap}

    ', '#

    {pageSession.valueMap.validationTableName}'); disableTableField('#{pageSession.valueMap.validationTableName}

    ', '#

    {pageSession.valueMap.validationClassname}

    ');return false;">
    + <!afterCreate
    + getClientId(component="$this

    {component}

    " clientId=>$page

    {tableNamesButtonId}

    );
    + />
    + </sun:button>
    "<br />
    <sun:radioButton id="optB" name="textOption" onClick="javascript: enableJdbcRadioButtons('text', 'table');" />
    <sun:textField id="tableText" columns="$int

    {55}

    " maxLength="#

    {sessionScope.fieldLengths['maxLength.jdbcPool.tableText']}

    " text="#

    {pageSession.tableTextValue}

    " >

Comment by sumasri [ 09/Jan/12 ]

While loading the JDBC Connection pool advanced page, removed the get-validation-table-names call to reduce the loading time of a page.
Added a button in the connection validation section to get all the table names.

3.1.2 commit message:
Sending jdbc/src/main/resources/advancePool.inc
Sending jdbc/src/main/resources/jdbcConnectionPoolAdvance.jsf
Sending jdbc/src/main/resources/jdbcConnectionPoolAdvanceButtons.inc
Sending jdbc/src/main/resources/jdbcConnectionPoolAdvanceJS.inc
Sending jdbc/src/main/resources/org/glassfish/jdbc/admingui/Strings.properties
Transmitting file data .....
Committed revision 51960.

Trunk commit revision:51961

Diff:
Index: src/main/resources/jdbcConnectionPoolAdvance.jsf
===================================================================
— src/main/resources/jdbcConnectionPoolAdvance.jsf (revision 51959)
+++ src/main/resources/jdbcConnectionPoolAdvance.jsf (working copy)
@@ -113,14 +113,6 @@
}
gf.createAttributeMap(keys=

{"className"}

values={"$attribute

{encodedClassName}

"} map="#

{pageSession.validCNAttrMap}");
if ("#{pageSession.valueMap.isConnectionValidationRequired}=true") {
- if ("#{pageSession.valueMap.connectionValidationMethod}=table") {
- gf.restRequest(endpoint="#{sessionScope.REST_URL}/resources/get-validation-table-names"
- attrs="#{pageSession.attrMap}"
- method="get"
- result="#{requestScope.result}");
- setPageSessionAttribute(key="tableNameList" value="#{requestScope.result.data.extraProperties.validationTableNames}");
- gf.containedIn(list="#{pageSession.tableNameList}" testStr="#{pageSession.valueMap.validationTableName}" contain="#{requestScope.isTableNames}");
- }
if ("#{pageSession.valueMap.connectionValidationMethod}=custom-validation") {
gf.restRequest(endpoint="#{sessionScope.REST_URL}/resources/get-validation-class-names"
attrs="#{pageSession.validCNAttrMap}

"
@@ -131,17 +123,12 @@
}
}
setAttribute(key="emptyStr" value="");

  • setPageSessionAttribute(key="myTableOption" value="dropdown");
    + setPageSessionAttribute(key="myTableOption" value="text");
    setPageSessionAttribute(key="myValidCNOption" value="dropdown");
  • if (# {requestScope.isTableNames}) {
    - setPageSessionAttribute(key="tableDropDownValue" value="#{pageSession.valueMap.validationTableName}");
    - }
    - if (!#{requestScope.isTableNames}

    ) {

  • if (# {pageSession.valueMap.validationTableName}) {
    - if ("!(#{pageSession.valueMap.validationTableName}

    ='')") {

  • setPageSessionAttribute(key="tableTextValue" value="# {pageSession.valueMap.validationTableName}");
    - setPageSessionAttribute(key="myTableOption" value="text");
    - }
    + if (#{pageSession.valueMap.validationTableName}

    )

    Unknown macro: {+ if ("!(#{pageSession.valueMap.validationTableName}='')") {
    + setPageSessionAttribute(key="tableTextValue" value="#{pageSession.valueMap.validationTableName}");+ setPageSessionAttribute(key="myTableOption" value="text"); }

    }
    if (#

    {requestScope.isClassNames}) { @@ -149,7 +136,7 @@ }
    if (!#{requestScope.isClassNames}

    ) {
    if (#

    {pageSession.valueMap.validationClassname}) {
    - if ("!(#{pageSession.valueMap.validationClassName}='')") {
    + if ("!(#{pageSession.valueMap.validationClassname}

    ='')") {
    setPageSessionAttribute(key="validCNTextValue" value="#

    {pageSession.valueMap.validationClassname}");
    setPageSessionAttribute(key="myValidCNOption" value="text");
    }
    Index: src/main/resources/jdbcConnectionPoolAdvanceButtons.inc
    ===================================================================
    — src/main/resources/jdbcConnectionPoolAdvanceButtons.inc (revision 51948)
    +++ src/main/resources/jdbcConnectionPoolAdvanceButtons.inc (working copy)
    @@ -63,6 +63,10 @@
    if ("#{pageSession.myValidCNOption}=text") {
    setValueExpression(expression="#{pageSession.valueMap['validationClassname']}", value="#{pageSession.validCNTextValue}");
    }
    + gf.filterMap(map="#{pageSession.valueMap}" attrNames={'validationClassname'} keep="#{true}" resultMap="#{validationClassNameMap}");
    + gf.createEntity(endpoint="#{pageSession.resourceUrl}"
    + attrs="#{validationClassNameMap}"
    + );
    }
    }

    Index: src/main/resources/org/glassfish/jdbc/admingui/Strings.properties
    ===================================================================
    — src/main/resources/org/glassfish/jdbc/admingui/Strings.properties (revision 51948)
    +++ src/main/resources/org/glassfish/jdbc/admingui/Strings.properties (working copy)
    @@ -102,6 +102,7 @@
    jdbcPool.valCNHelp=If custom-validation is selected, specify validation classname.
    jdbcPool.tableName=Table Name:
    jdbcPool.tableNameHelp=If table validation is selected, select or enter the table name.
    +jdbcPool.populatetableNames=Populate Table Names
    jdbcPool.failOnAny=On Any Failure:
    jdbcPool.failOnAnyHelp=Close all connections and reconnect on failure, otherwise reconnect only when used
    jdbcPool.closeAll=Close All Connections
    Index: src/main/resources/jdbcConnectionPoolAdvanceJS.inc
    ===================================================================
    — src/main/resources/jdbcConnectionPoolAdvanceJS.inc (revision 51959)
    +++ src/main/resources/jdbcConnectionPoolAdvanceJS.inc (working copy)
    @@ -45,13 +45,24 @@
    function disableTableField(selStr, selValidCNVal) {
    var val = document.getElementById("$pageSession{valMethod}").value;
    var isConnValidation = document.getElementById("$pageSession{conValidationId}").checked;
    - if (isConnValidation && val == 'table'){
    + if (isConnValidation && val == 'table'){
    disableAllJdbcRadioButtons(false, 'table');
    - var dropDownVal = document.getElementById("$pageSession{tableDropdownTextId}").value;
    - if (dropDownVal == '') {
    - enableJdbcRadioButtons('text', 'table');
    + var index = findSelectOptionIndex(document.getElementById("$pageSession{tableDropdownTextId}"), selStr);
    + var optionsExists = (document.getElementById("$pageSession{tableDropdownTextId}").options.length > 0);
    + var isSelStrExists = (selStr != null) && (selStr != '') && (isWhitespace(selStr) == false);
    + if (index == undefined || index == -1) {
    + if (isSelStrExists == true) { + enableJdbcRadioButtons('text', 'table'); + }
    + else {
    + if (optionsExists == true) { + enableJdbcRadioButtons('dropdown', 'table'); + } else { + enableJdbcRadioButtons('text', 'table'); + }
    + }
    } else {
    - if(dropDownVal == selStr) {
    + if(index >= 0) {
    document.getElementById('$pageSession{tableTextId}').value='';
    enableJdbcRadioButtons('dropdown', 'table');
    }
    @@ -61,11 +72,13 @@
    enableJdbcRadioButtons('text', 'table');
    }
    }
    + enableBtnComponent('$pageSession{tableNamesButtonId}');
    disableComponent('$pageSession{validCNDropdownTextId}', 'select');
    disableTextComponent('$pageSession{validCNTextId}');
    disableAllJdbcRadioButtons(true, 'validCN');
    }else if (isConnValidation && val == 'custom-validation') {
    disableAllJdbcRadioButtons(false, 'validCN');
    + disableBtnComponent('$pageSession{tableNamesButtonId}');
    var dropDownVal = document.getElementById("$pageSession{validCNDropdownTextId}").value;
    if (dropDownVal == '') { enableJdbcRadioButtons('text', 'validCN'); @@ -85,6 +98,7 @@ disableAllJdbcRadioButtons(true, 'table'); }else{
    disableComponent('$pageSession{tableDropdownTextId}', 'select');
    + disableBtnComponent('$pageSession{tableNamesButtonId}');
    disableTextComponent('$pageSession{tableTextId}');
    disableAllJdbcRadioButtons(true, 'table');
    disableComponent('$pageSession{validCNDropdownTextId}', 'select');
    @@ -100,16 +114,7 @@
    function getDropdownInfo(tableAttrs, validCNAttrs, tableVal, validCNVal) {
    var isConnValidation = document.getElementById("$pageSession{conValidationId}").checked;
    var methodVal = document.getElementById("$pageSession{valMethod}").value;
    - if (isConnValidation && methodVal == 'table'){
    - var b= tableAttrs.toString();
    - admingui.ajax.invoke("gf.restRequest", {
    - endpoint:"#{sessionScope.REST_URL}/resources/get-validation-table-names",
    - attrs:b,
    - method:"get",
    - result:""}, function(result) {
    - processResult(result, tableVal, "validationTableNames=", "$pageSession{tableDropdownTextId}");
    - }, 3, false);
    - } else if (isConnValidation && methodVal == 'custom-validation'){
    + if (isConnValidation && methodVal == 'custom-validation'){
    var c= validCNAttrs.toString();
    admingui.ajax.invoke("gf.restRequest", {
    endpoint:"#{sessionScope.REST_URL}/resources/get-validation-class-names",
    @@ -121,6 +126,20 @@
    }
    }

    + function getValidationTableNames(tableAttrs, tableVal) {
    + var b= tableAttrs.toString();
    + var size = document.getElementById("$pageSession{tableDropdownTextId}").options.length;
    + if (size < 1) {
    + admingui.ajax.invoke("gf.restRequest", {
    + endpoint:"#{sessionScope.REST_URL}/resources/get-validation-table-names",
    + attrs:b,
    + method:"get",
    + result:""}, function(result) {
    + processResult(result, tableVal, "validationTableNames=", "$pageSession{tableDropdownTextId}");
    + }, 3, false);
    + }
    + }
    +
    function processResult(result, selStr, searchStr, dropdownId) {
    if(result.result.data != undefined){
    var exitCode = result.result.data.exit_code.toString();
    @@ -129,7 +148,8 @@
    if (res != null) {
    var index = res.indexOf(searchStr);
    if (index != -1) { - var tableNamesStr = res.substring(index + searchStr.length + 1, (res.length) - 2); + var lastIndex = res.indexOf("]", index + searchStr.length + 1); + var tableNamesStr = res.substring(index + searchStr.length + 1, lastIndex); setDropdownOptions(tableNamesStr, selStr, dropdownId); }
    }
    Index: src/main/resources/advancePool.inc
    ===================================================================
    — src/main/resources/advancePool.inc (revision 51948)
    +++ src/main/resources/advancePool.inc (working copy)
    @@ -146,7 +146,7 @@
    <sun:propertySheetSection id="connectionValidationPropertySheet" label="$resource{i18njdbc.jdbcPool.Validation}">

    <sun:property id="conValidationProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18njdbc.jdbcPool.conValidation}" helpText="$resource{i18njdbc.jdbcPool.conValidationHelp}">
    - <sun:checkbox label="$resource{i18n.common.Required}" selected="#{pageSession.valueMap.isConnectionValidationRequired}" selectedValue="true" onChange="javascript: getDropdownInfo('#{pageSession.attrMap}', '#{pageSession.validCNAttrMap}', '#{pageSession.valueMap.validationTableName}', '#{pageSession.valueMap.validationClassName}'); disableTableField('#{pageSession.valueMap.validationTableName}','#{pageSession.valueMap.validationClassName}');" >
    + <sun:checkbox label="$resource{i18n.common.Required}" selected="#{pageSession.valueMap.isConnectionValidationRequired}" selectedValue="true" onChange="javascript: getDropdownInfo('#{pageSession.attrMap}', '#{pageSession.validCNAttrMap}', '#{pageSession.valueMap.validationTableName}', '#{pageSession.valueMap.validationClassname}

    '); disableTableField('#

    {pageSession.valueMap.validationTableName}','#{pageSession.valueMap.validationClassname}');" >
    <!afterCreate
    getClientId(component="$this{component}" clientId=>$page{conValidationId});
    />
    @@ -155,7 +155,7 @@

    <sun:property id="methodProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18njdbc.jdbcPool.valMethod}" >
    <sun:dropDown id="valMethod" selected="#{pageSession.valueMap.connectionValidationMethod}"
    - labels={"auto-commit" "meta-data" "custom-validation" "table"} onChange="javascript: getDropdownInfo('#{pageSession.attrMap}', '#{pageSession.validCNAttrMap}', '#{pageSession.valueMap.validationTableName}

    ', '#

    {pageSession.valueMap.validationClassName}'); disableTableField('#{pageSession.valueMap.validationTableName}', '#{pageSession.valueMap.validationClassName}

    ');">
    + labels=

    {"auto-commit" "meta-data" "custom-validation" "table"}

    onChange="javascript: getDropdownInfo('#

    {pageSession.attrMap}', '#{pageSession.validCNAttrMap}', '#{pageSession.valueMap.validationTableName}', '#{pageSession.valueMap.validationClassname}'); disableTableField('#{pageSession.valueMap.validationTableName}', '#{pageSession.valueMap.validationClassname}');">
    <!afterCreate
    getClientId(component="$this{component}" clientId=>$page{valMethod});
    />
    @@ -177,6 +177,11 @@
    getClientId(component="$this{component}" clientId=>$page{tableDropdownTextId});
    />
    </sun:dropDown>
    + <sun:button id="tableNamesButton" primary="#{false}" text="$resource{i18njdbc.jdbcPool.populatetableNames}" onClick="javascript: getValidationTableNames('#{pageSession.attrMap}

    ', '#

    {pageSession.valueMap.validationTableName}'); disableTableField('#{pageSession.valueMap.validationTableName}

    ', '#

    {pageSession.valueMap.validationClassname}

    ');return false;">
    + <!afterCreate
    + getClientId(component="$this

    {component}

    " clientId=>$page

    {tableNamesButtonId}

    );
    + />
    + </sun:button>
    "<br />
    <sun:radioButton id="optB" name="textOption" onClick="javascript: enableJdbcRadioButtons('text', 'table');" />
    <sun:textField id="tableText" columns="$int

    {55}

    " maxLength="#

    {sessionScope.fieldLengths['maxLength.jdbcPool.tableText']}

    " text="#

    {pageSession.tableTextValue}

    " >





[GLASSFISH-17989] EJB Container doesn't use default constructor while instantiating of a session bean Created: 13/Dec/11  Updated: 05/Jan/12  Resolved: 05/Jan/12

Status: Resolved
Project: glassfish
Component/s: ejb_container
Affects Version/s: 3.1.1
Fix Version/s: 3.1.2_b17

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

Attachments: Zip Archive testcase-GLASSFISH-17989.zip    
Tags: 3_1_2-approved

 Description   

I have a simple stateless session bean class with two constructors. The first one is default constructor without parameters. The second one has one parameter. The constructors are not annotated with @Inject annotation. When EJB Container instantiates the bean, it uses constructor with one parameter. But this is against the specification JSR 299:

If a bean class does not explicitly declare a constructor using @Inject, the constructor that accepts no parameters is the bean constructor.

Here are my sample classes:

MyBean.java
@Stateless
public class MyBean {
    public MyBean() {
        System.out.println("default constructor");
    }
    public MyBean(MyClass myObject) {
        System.out.println("constructor with parameter");
    }
}
MyBean2.java
@Singleton
@Startup
public class MyBean2 {    
    @EJB
    private MyBean bean;    
    @PostConstruct
    private void postConstruct() {
        System.out.println("Bean: " + bean);
    }
}

P.S. If I add a second parameter to my constructor with parameter, an exception will be thrown:

 java.lang.VerifyError: (class: my/package/__EJB31_Generated__MyBean__Intf____Bean__, method: <init> signature: ()V) Expecting to find integer on stack
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
	at java.lang.Class.getConstructor0(Class.java:2699)
	at java.lang.Class.newInstance0(Class.java:326)
	at java.lang.Class.newInstance(Class.java:308)
	at com.sun.ejb.containers.BaseContainer.instantiateOptionalEJBLocalBusinessObjectImpl(BaseContainer.java:3861)
	at com.sun.ejb.containers.StatelessSessionContainer.initializeHome(StatelessSessionContainer.java:253)
	at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:167)
	at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:230)
	at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:290)
	at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:101)
	at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:186)
	at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:257)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
	at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
	at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:459)
	at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209)
	at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
	at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238)
	at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
	at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
	at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
	at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
	at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
	at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
	at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
	at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
	at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
	at java.lang.Thread.run(Thread.java:619)


 Comments   
Comment by marina vatkina [ 14/Dec/11 ]

I cannot reproduce the error - EJB container never calls non-default constructor. Please attach the test case that reproduces the problem and reopen the issue

Comment by Volodja Medvid [ 15/Dec/11 ]

I throw a RuntimeException in non-default constructor. If I deploy this test case to GlassFish Server Open Source Edition 3.1.1 (build 12) the exception will be thrown:

java.lang.RuntimeException: non-default constructor called
	at beans.MyBean.<init>(MyBean.java:15)
	at beans.__EJB31_Generated__MyBean__Intf____Bean__.<init>(Unknown Source)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at java.lang.Class.newInstance0(Class.java:355)
	at java.lang.Class.newInstance(Class.java:308)
	at com.sun.ejb.containers.BaseContainer.instantiateOptionalEJBLocalBusinessObjectImpl(BaseContainer.java:3861)
	at com.sun.ejb.containers.StatelessSessionContainer.initializeHome(StatelessSessionContainer.java:253)
	at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:167)
	at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:230)
	at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:290)
	at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:101)
	at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:186)
	at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:257)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
	at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:360)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
	at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:145)
	at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:575)
	at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:461)
	at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:389)
	at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:380)
	at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:209)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)

With GlassFish Server Open Source Edition 3.1.2-b13 (build 13) I have the same problem.

Comment by marina vatkina [ 15/Dec/11 ]

The error is in local beans

Comment by Cheng Fang [ 16/Dec/11 ]

bean constructor with params should only be invoked by
ejb container if it's annotated with @Inject and CDI is enabled. Otherwise, the default no-arg
constructor is used.

Relevant part of CDI spec (JSR 299):
3.7.1. Declaring a bean constructor
The bean constructor may be identified by annotating the constructor @Inject.
...
If a bean class does not explicitly declare a constructor using @Inject, the constructor that accepts no parameters is the
bean constructor.

Comment by Cheng Fang [ 16/Dec/11 ]
  • What is the impact on the customer of the bug?

How likely is it that a customer will see the bug and how serious is the bug?
Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)?

Moderate impact on customers. Customers will see this bug in certain applications where bean classes
contain multiple constructors. Not related to security or performance.
Not a regression.

  • What is the cost/risk of fixing the bug?

How risky is the fix? How much work is the fix? Is the fix complicated?

The fix is low risk and not complicated, approximately 1 person day of work.

  • Is there an impact on documentation or message strings?
    No.
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
    Regular QA tests. I will augument ejb devtests.
  • Which is the targeted build of 3.1.2 for this fix?
    b15.
Comment by Cheng Fang [ 05/Jan/12 ]

Committed revision 51901. to trunk.

Comment by Cheng Fang [ 05/Jan/12 ]

Committed revision 51903. to 3.1.2 branch.





[GLASSFISH-17981] Error in promotion frame with secure admin enabled Created: 12/Dec/11  Updated: 06/Jan/12  Resolved: 06/Jan/12

Status: Closed
Project: glassfish
Component/s: other
Affects Version/s: None
Fix Version/s: 3.1.2_b17

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

Tags: 3_1_2-approved

 Description   

When secure admin is enabled, the Admin Console requests the promotion frame (https://www.sun.com/software/products/appsrvr/promotions/v3.html) via SSL. The frame fails to load, though, due to an expired certificate on the site, resulting in either an error message in the browser, or a large blank area on the page.



 Comments   
Comment by jclingan [ 06/Jan/12 ]

Certificate fixed. Closing issue.

Comment by jclingan [ 06/Jan/12 ]

Fixed.





Two load options give the same load time, hence one should be removed (GLASSFISH-18006)

[GLASSFISH-17980] Current naming for loading Admin Console at startup field is ambiguous Created: 12/Dec/11  Updated: 09/Jan/12  Resolved: 09/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.2_b14
Fix Version/s: 3.1.2_b17

Type: Sub-task Priority: Major
Reporter: lidiam Assignee: Rebecca Parks
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

ogs-3.1.2-b14-12_12_2011.zip



 Description   

The field and its choices for setting levels of loading Admin Console during DAS startup is ambiguous. The field is currently called: "Load console after DAS startup" and the selections are:

DEFAULT
OFF
LOW
HIGH

The field name and options together are not self explanatory, while they should be. What does the "LOW" refer to in conjunction with "Load console after DAS startup"? Currently, user will have to either guess or look at documentation in order to understand what these settings do and that should not be necessary.



 Comments   
Comment by Anissa Lam [ 13/Dec/11 ]

I have added the key for displaying the options. They are in the Strings.properties files.

domain.loadOnStartup=Load console after DAS startup:
domain.loadOnStartupHelp=Load Admin Console after server startup. This may affect the resources used by the server, however, this will speed up the accessing time of Admin Console.
domain.loadOnStartupDefault=Default
domain.loadOnStartupOff=Off
domain.loadOnStartupLow=Low
domain.loadOnStartupHigh=High

Transfer this to Doc. Paul can provide more meaningful words for the dropdown selection and ensure that matches the online help.
He can also modify the inline help to give more info about each options if needed.

Comment by lidiam [ 15/Dec/11 ]

We should also look at the name of the field itself, if it needs changing. Currently it says: "Load console after DAS startup". Admin Console is always loaded after the server starts up. It's either part of that startup process or not.

Another question is with regards to inline help. Currently it reads:

"Load Admin Console after server startup. This may affect the resources used by the server, however, this will speed up the accessing time of Admin Console."

What server resources may be affected by the different timing of Admin Console loading?

Comment by Anissa Lam [ 17/Dec/11 ]

This bug is also taken care of when fixing GLASSFISH-18006.

Comment by Paul Davies [ 19/Dec/11 ]

Reopened to track changes to online help.

Comment by Paul Davies [ 19/Dec/11 ]

The addition of the option for controlling whether the Administration Console is loaded when the DAS is started requires additions to the online help.

Comment by Rebecca Parks [ 20/Dec/11 ]

Always and Never seem obvious, but what exactly is the behavior of Usage Based? What usage are we talking about and how does this usage determine when the console is loaded? I need a good explanation for the online help.

Comment by Rebecca Parks [ 21/Dec/11 ]

Added the following explanations to the online help:

Usage Based - Loads the Administration Console after the Domain Administration Server (DAS) if the console has been used in the last 24 hours or if other server instances exist aside from the DAS. This is the default.

Always - Always loads the Administration Console after the DAS. The console is loaded after the main GlassFish Server startup sequence has completed.

Never - Never loads the Administration Console after the DAS. Both are loaded in the main GlassFish Server startup sequence.

Comment by lidiam [ 22/Dec/11 ]

The explanation for Never is confusing to me. Both Admin Console and DAS are loaded in the main Glassfish Server startup sequence for the settings: Always and Usage Based (if used in past 24 hours or has instances). When user sets loading to Never, Admin Console will not be loaded during the startup sequence, but only when user sends the first access request (basically tries to access Admin Console). If user never accesses Admin Console it will never be loaded with this setting at all.

Comment by Rebecca Parks [ 22/Dec/11 ]

Thanks, Lidia, for clarifying. I changed the Never description to:

Never loads the Administration Console after the DAS. The console is loaded when access to it is requested.

Comment by Rebecca Parks [ 09/Jan/12 ]

Fixed in bundled docs for HCF.





[GLASSFISH-17973] Connection leaks when using max-connection-usage-count Created: 12/Dec/11  Updated: 09/Jan/12  Resolved: 09/Jan/12

Status: Resolved
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1, 3.1.1, 3.1.2_b12, 3.1.2_b13
Fix Version/s: 3.1.2_b17, 4.0

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

Attachments: GZip Archive server-increased-timeout.log.gz     Text File server-thread43.log     GZip Archive server-usage-count-10.log.gz     GZip Archive server-validate-fine-b14.log.gz     GZip Archive server-validation-fine.log.gz     GZip Archive server-validation.log.gz     GZip Archive stress-test-bundles.tar.gz     File test-connection-leaks.sh    
Tags: 3_1_2-review

 Description   

I just made some tests with JDBC connection pool tuning and PostgreSQL.

As PostgreSQL doesn't have a lot of timeout options (at least version 8.x doesn't), I wanted to prevent certain bad things to happen by configuring our JDBC connection pools to not reuse connection for a long time and so I am now testing the "max-connection-usage-count" parameter.

However, enabling this parameter gives me connection leaks. I've already filed a bug for EclipseLink as I think this only happens, when a connection is being destroyed after being used for X times:


But still I get the feeling that there is also some ToDo on the GlassFish side as my tests reveal. For these tests I did the following:

  1. setup clean GlassFish 3.1.2 promoted
  2. modify domain.xml derby pool (add these):
    steady-pool-size="1"
    max-pool-size="10"
    statement-leak-timeout-in-seconds="10"
    statement-leak-reclaim="true"
    idle-timeout-in-seconds="10"
    connection-leak-timeout-in-seconds="15"
    connection-leak-reclaim="true"
    max-connection-usage-count="10"
    fail-all-connections="true"
    
  3. deploy the attached test bundles (copy files into .../autodeploy/bundles/)
  4. start derby
  5. start domain
  6. wait some time and see the server log


Here is a trace of a task that shows up log messages I'm worried about (resourceadapter logging set to FINE):

$ sed -ne '/ThreadID=43;/,/^$/p' domains/domain1/server.log

[#|2011-12-11T23:51:29.481+0100|INFO|glassfish3.1.2|org.ancoron.movie.stresstest.StressTestBean|_ThreadID=43;_ThreadName=Thread-2;|Running task #24|#]

[#|2011-12-11T23:51:29.698+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.connectors.ConnectorRegistry;MethodName=getInstance;|returning the connector registry|#]

[#|2011-12-11T23:51:29.702+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.connectors.ConnectionManagerImpl;MethodName=allocateConnection;|RAR5036:Resource reference is not defined for JNDI name [jdbc/__default__nontx]|#]

[#|2011-12-11T23:51:29.703+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.connectors.ConnectorRegistry;MethodName=getInstance;|returning the connector registry|#]

[#|2011-12-11T23:51:29.703+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.gjc.spi.ManagedConnectionFactory;MethodName=logFine;|In equals|#]

[#|2011-12-11T23:51:30.020+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.connectors.ConnectorRegistry;MethodName=getDescriptor;|Found/returing Connector descriptor in connector registry.|#]

[#|2011-12-11T23:51:30.020+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.connectors.ConnectionManagerImpl;MethodName=logFine;|ConnectionMgr: poolName DerbyPool  txLevel : 1|#]

[#|2011-12-11T23:51:30.020+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.pool.PoolManagerImpl;MethodName=logFine;|Returning noTxResourceManager|#]

[#|2011-12-11T23:51:32.391+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.pool.ConnectionPool;MethodName=logFine;|Resource Pool: getting on wait queue|#]

[#|2011-12-11T23:51:50.608+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.pool.ConnectionPool;MethodName=getResource;|removing wait monitor from queue: java.lang.Object@7bf51a2f|#]

[#|2011-12-11T23:51:53.289+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.pool.ConnectionPool;MethodName=getResource;|Resource Pool: elapsed time (ms) to get connection for [ResourceSpec :- 
connectionPoolName : DerbyPool
isXA_ : false
resoureId : jdbc/__default__nontx
resoureIdType : 1
pmResource : false
nonTxResource : true
lazyEnlistable : false
lazyAssociatable : false] : 23268|#]

[#|2011-12-11T23:51:53.290+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.gjc.spi.ManagedConnection;MethodName=logFine;|In getConnection|#]

[#|2011-12-11T23:51:53.290+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.gjc.spi.ManagedConnection;MethodName=executeInitSql;|Starting Init SQL|#]

[#|2011-12-11T23:51:53.291+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.gjc.spi.ManagedConnection;MethodName=executeInitSql;|Finished executing Init SQL|#]

[#|2011-12-11T23:51:53.292+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.pool.PoolManagerImpl;MethodName=logFine;|Returning noTxResourceManager|#]

[#|2011-12-11T23:51:53.292+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.rm|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.rm.NoTxResourceManagerImpl;MethodName=logFine;|NoTxResourceManagerImpl :: enlistResource called|#]

[#|2011-12-11T23:51:53.372+0100|FINEST|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.util|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.gjc.util.StatementLeakDetector;MethodName=startStatementLeakTracing;|Scheduled Statement leak tracing timer task|#]

[#|2011-12-11T23:51:53.373+0100|FINEST|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.util|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.gjc.util.StatementLeakDetector;MethodName=stopStatementLeakTracing;|Stopped Statement leak tracing timer task|#]

[#|2011-12-11T23:51:53.374+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.pool.PoolManagerImpl;MethodName=logFine;|Returning noTxResourceManager|#]

[#|2011-12-11T23:51:53.374+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.rm|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.rm.NoTxResourceManagerImpl;MethodName=logFine;|NoTxResourceManagerImpl :: delistResource called|#]

[#|2011-12-11T23:51:53.374+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.pool.ConnectionPool;MethodName=resourceClosed;|Pool: resourceClosed: 67|#]

[#|2011-12-11T23:51:53.381+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.gjc.spi.ManagedConnection;MethodName=logFine;|In cleanup|#]

[#|2011-12-11T23:51:53.549+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.gjc.spi.ManagedConnection;MethodName=logFine;|In destroy|#]

[#|2011-12-11T23:51:53.606+0100|FINEST|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.allocator|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator;MethodName=destroyResource;|destroyResource for LocalTxConnectorAllocator done|#]

[#|2011-12-11T23:51:53.607+0100|INFO|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;|RAR7113: destroying connection since it has reached the maximum usage of : 1|#]

[#|2011-12-11T23:51:53.607+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.pool.ConnectionPool;MethodName=notifyWaitingThreads;|Notifying wait monitor : java.lang.Object@3b86a79a|#]

[#|2011-12-11T23:51:53.607+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.pool.ConnectionPool;MethodName=resourceClosed;|Pool: resourceFreed: 67|#]

[#|2011-12-11T23:51:53.607+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.connectors.ConnectorRegistry;MethodName=getInstance;|returning the connector registry|#]

[#|2011-12-11T23:51:53.608+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.connectors.ConnectionManagerImpl;MethodName=allocateConnection;|RAR5036:Resource reference is not defined for JNDI name [jdbc/__default__nontx]|#]

[#|2011-12-11T23:51:53.608+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.connectors.ConnectorRegistry;MethodName=getInstance;|returning the connector registry|#]

[#|2011-12-11T23:51:53.608+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.gjc.spi.ManagedConnectionFactory;MethodName=logFine;|In equals|#]

[#|2011-12-11T23:51:53.608+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.connectors.ConnectorRegistry;MethodName=getDescriptor;|Found/returing Connector descriptor in connector registry.|#]

[#|2011-12-11T23:51:53.608+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.connectors.ConnectionManagerImpl;MethodName=logFine;|ConnectionMgr: poolName DerbyPool  txLevel : 1|#]

[#|2011-12-11T23:51:53.609+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.pool.PoolManagerImpl;MethodName=logFine;|Returning noTxResourceManager|#]

[#|2011-12-11T23:51:54.410+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.gjc.spi.ManagedConnectionFactory;MethodName=logFine;|In createManagedConnection|#]

[#|2011-12-11T23:51:54.413+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.gjc.spi.ManagedConnectionFactory;MethodName=logFine;|In equals|#]

[#|2011-12-11T23:51:54.416+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.gjc.spi.ManagedConnectionFactory;MethodName=logFine;|In equals|#]

[#|2011-12-11T23:51:54.417+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.gjc.spi.ManagedConnectionFactory;MethodName=logFine;|In getResourceAdapter|#]

[#|2011-12-11T23:51:54.418+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.pool.ConnectionPool;MethodName=createSingleResource;|Time taken to create a single resource : jdbc/__default__nontx and adding to the pool (ms) : 8|#]

[#|2011-12-11T23:51:54.418+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.pool.ConnectionPool;MethodName=addResource;|Pool: resource added|#]

[#|2011-12-11T23:51:54.600+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.pool.ConnectionPool;MethodName=addResource;|Pool: resource added|#]

[#|2011-12-11T23:51:54.602+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.pool.ConnectionPool;MethodName=getResource;|Resource Pool: elapsed time (ms) to get connection for [ResourceSpec :- 
connectionPoolName : DerbyPool
isXA_ : false
resoureId : jdbc/__default__nontx
resoureIdType : 1
pmResource : false
nonTxResource : true
lazyEnlistable : false
lazyAssociatable : false] : 993|#]

[#|2011-12-11T23:51:54.637+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.gjc.spi.ManagedConnection;MethodName=logFine;|In getConnection|#]

[#|2011-12-11T23:51:54.679+0100|WARNING|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors|_ThreadID=43;_ThreadName=Thread-2;|RAR5117 : Failed to obtain/create connection from connection pool [ DerbyPool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException: This Managed Connection is not valid as the physical connection is not usable|#]

[#|2011-12-11T23:51:54.746+0100|WARNING|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=43;_ThreadName=Thread-2;|RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: This Managed Connection is not valid as the physical connection is not usable]|#]

[#|2011-12-11T23:51:54.753+0100|INFO|glassfish3.1.2|org.eclipse.persistence.session.file:/tmp/osgiapp8911206436065082297/_MovieUnit|_ThreadID=43;_ThreadName=Thread-2;|Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query. Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: This Managed Connection is not valid as the physical connection is not usable
Error Code: 0
Call: SELECT DISTINCT c_type FROM mov_video WHERE (c_id = ?)
        bind => [1 parameter bound]
Query: ReadObjectQuery(name="readObject" referenceClass=VideoEntityImpl sql="SELECT DISTINCT c_type FROM mov_video WHERE (c_id = ?)").|#]

[#|2011-12-11T23:51:54.753+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.connectors.ConnectorRegistry;MethodName=getInstance;|returning the connector registry|#]

[#|2011-12-11T23:51:54.754+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.connectors.ConnectionManagerImpl;MethodName=allocateConnection;|RAR5036:Resource reference is not defined for JNDI name [jdbc/__default__nontx]|#]

[#|2011-12-11T23:51:54.754+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.connectors.ConnectorRegistry;MethodName=getInstance;|returning the connector registry|#]

[#|2011-12-11T23:51:54.755+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.gjc.spi.ManagedConnectionFactory;MethodName=logFine;|In equals|#]

[#|2011-12-11T23:51:54.757+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.connectors.ConnectorRegistry;MethodName=getDescriptor;|Found/returing Connector descriptor in connector registry.|#]

[#|2011-12-11T23:51:54.758+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.connectors.ConnectionManagerImpl;MethodName=logFine;|ConnectionMgr: poolName DerbyPool  txLevel : 1|#]

[#|2011-12-11T23:51:54.759+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.pool.PoolManagerImpl;MethodName=logFine;|Returning noTxResourceManager|#]

[#|2011-12-11T23:51:55.434+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.pool.ConnectionPool;MethodName=getResource;|Resource Pool: elapsed time (ms) to get connection for [ResourceSpec :- 
connectionPoolName : DerbyPool
isXA_ : false
resoureId : jdbc/__default__nontx
resoureIdType : 1
pmResource : false
nonTxResource : true
lazyEnlistable : false
lazyAssociatable : false] : 673|#]

[#|2011-12-11T23:51:55.434+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.gjc.spi.ManagedConnection;MethodName=logFine;|In getConnection|#]

[#|2011-12-11T23:51:55.434+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.gjc.spi.ManagedConnection;MethodName=executeInitSql;|Starting Init SQL|#]

[#|2011-12-11T23:51:55.434+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.gjc.spi.ManagedConnection;MethodName=executeInitSql;|Finished executing Init SQL|#]

[#|2011-12-11T23:51:55.435+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.pool.PoolManagerImpl;MethodName=logFine;|Returning noTxResourceManager|#]

[#|2011-12-11T23:51:55.435+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.rm|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.rm.NoTxResourceManagerImpl;MethodName=logFine;|NoTxResourceManagerImpl :: enlistResource called|#]

[#|2011-12-11T23:51:55.437+0100|FINEST|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.util|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.gjc.util.StatementLeakDetector;MethodName=startStatementLeakTracing;|Scheduled Statement leak tracing timer task|#]

[#|2011-12-11T23:51:55.442+0100|FINEST|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.util|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.gjc.util.StatementLeakDetector;MethodName=stopStatementLeakTracing;|Stopped Statement leak tracing timer task|#]

[#|2011-12-11T23:51:55.443+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.pool.PoolManagerImpl;MethodName=logFine;|Returning noTxResourceManager|#]

[#|2011-12-11T23:51:55.443+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.rm|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.rm.NoTxResourceManagerImpl;MethodName=logFine;|NoTxResourceManagerImpl :: delistResource called|#]

[#|2011-12-11T23:51:55.455+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.pool.ConnectionPool;MethodName=resourceClosed;|Pool: resourceClosed: 97|#]

[#|2011-12-11T23:51:55.455+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.gjc.spi.ManagedConnection;MethodName=logFine;|In cleanup|#]

[#|2011-12-11T23:51:55.539+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.gjc.spi|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.gjc.spi.ManagedConnection;MethodName=logFine;|In destroy|#]

[#|2011-12-11T23:51:55.539+0100|FINEST|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.allocator|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator;MethodName=destroyResource;|destroyResource for LocalTxConnectorAllocator done|#]

[#|2011-12-11T23:51:55.540+0100|INFO|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;|RAR7113: destroying connection since it has reached the maximum usage of : 1|#]

[#|2011-12-11T23:51:55.541+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.pool.ConnectionPool;MethodName=notifyWaitingThreads;|Notifying wait monitor : java.lang.Object@1465d8d2|#]

[#|2011-12-11T23:51:55.541+0100|FINE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=43;_ThreadName=Thread-2;ClassName=com.sun.enterprise.resource.pool.ConnectionPool;MethodName=resourceClosed;|Pool: resourceFreed: 97|#]

[#|2011-12-11T23:51:55.541+0100|INFO|glassfish3.1.2|org.ancoron.movie.stresstest.StressTestBean|_ThreadID=43;_ThreadName=Thread-2;|... task #24 was successful|#]


...and more or less exactly 15 seconds later (the connection leak timeout):

[#|2011-12-11T23:52:10.450+0100|WARNING|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=1114;_ThreadName=Thread-2;
|A potential connection leak detected for connection pool DerbyPool. The stack trace of the thread is provided below : 
com.sun.enterprise.resource.pool.ConnectionPool.setResourceStateToBusy(ConnectionPool.java:324)
com.sun.enterprise.resource.pool.ConnectionPool.getResourceFromPool(ConnectionPool.java:758)
com.sun.enterprise.resource.pool.ConnectionPool.getUnenlistedResource(ConnectionPool.java:632)
com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:526)
com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:381)
com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:242)
com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:167)
com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:338)
com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:301)
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:190)
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:160)
com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:113)
org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:123)
org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:330)
org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:293)
org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:565)
org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1508)
org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.incrementCallCount(DatasourceAccessor.java:305)
org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:579)
org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:535)
org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1717)
org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:566)
org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:207)
org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193)
org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectOneRow(DatasourceCallQueryMechanism.java:666)
org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectOneRowFromTable(ExpressionQueryMechanism.java:2656)
org.eclipse.persistence.descriptors.InheritancePolicy.selectOneRowUsingDefaultMultipleTableSubclassRead(InheritancePolicy.java:1462)
org.eclipse.persistence.descriptors.InheritancePolicy.selectOneRowUsingMultipleTableSubclassRead(InheritancePolicy.java:1492)
org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectOneRow(ExpressionQueryMechanism.java:2624)
org.eclipse.persistence.queries.ReadObjectQuery.executeObjectLevelReadQuery(ReadObjectQuery.java:450)
org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1081)
org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:844)
org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1040)
org.eclipse.persistence.queries.ReadObjectQuery.execute(ReadObjectQuery.java:418)
org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1128)
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2871)
org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1516)
org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1498)
org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1449)
org.eclipse.persistence.internal.jpa.EntityManagerImpl.executeQuery(EntityManagerImpl.java:820)
org.eclipse.persistence.internal.jpa.EntityManagerImpl.findInternal(EntityManagerImpl.java:760)
org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:653)
org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:532)
com.sun.enterprise.container.common.impl.EntityManagerWrapper.find(EntityManagerWrapper.java:320)
org.ancoron.movie.jpa.impl.MovieJPAServiceImpl.get(MovieJPAServiceImpl.java:65)
org.ancoron.movie.jpa.impl.MovieJPAServiceImpl.getVideo(MovieJPAServiceImpl.java:82)
sun.reflect.GeneratedMethodAccessor171.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:616)
org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388)
com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:616)
com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360)
com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
$Proxy111.getVideo(Unknown Source)
sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:616)
org.glassfish.osgicdi.impl.OSGiServiceFactory$DynamicInvocationHandler.invoke(OSGiServiceFactory.java:234)
$Proxy164.getVideo(Unknown Source)
org.ancoron.movie.ejb.MovieEJBImpl.getVideo(MovieEJBImpl.java:70)
sun.reflect.GeneratedMethodAccessor147.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:616)
org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388)
com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:49)
sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:616)
com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:616)
com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360)
com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
$Proxy162.getVideo(Unknown Source)
sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:616)
org.glassfish.osgicdi.impl.OSGiServiceFactory$DynamicInvocationHandler.invoke(OSGiServiceFactory.java:234)
$Proxy157.getVideo(Unknown Source)
org.ancoron.movie.stresstest.StressTestBean$1.run(StressTestBean.java:71)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
java.lang.Thread.run(Thread.java:679)

Monitoring Statistics :

 Monitoring Statistics for 
DerbyPool|#]

[#|2011-12-11T23:52:10.450+0100|INFO|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=1114;_ThreadName=Thread-2;|Reclaiming the leaked connection of pool [ DerbyPool ] and destroying it so as to avoid both the application that leaked the connection and any other request that can potentially acquire the same connection from the pool end up using the connection at the same time|#]


Running the tests without the "max-connection-usage-count" is totally fine and not a single connection leak is detected, nor do other problems occur.



 Comments   
Comment by Mitesh Meswani [ 14/Dec/11 ]

Can you please try bumping up connection-leak-timeout-in-seconds and see whether the "leaks" are still detected?

Comment by chaoslayer [ 14/Dec/11 ]

Of course I can and will do.

However, this simple test with very short timeout values has been established because I saw
the same behavior in another application where timeouts are much higher, e.g.:

max-wait-time-in-millis="60000"
init-sql="SET statement_timeout TO 30000"
idle-timeout-in-seconds="300"
connection-leak-reclaim="true"
connection-leak-timeout-in-seconds="3600"
connection-creation-retry-interval-in-seconds="10"
fail-all-connections="true"
statement-leak-reclaim="true"
statement-leak-timeout-in-seconds="60"
statement-cache-size="0"
steady-pool-size="10"
max-pool-size="100"


As the result is the same in terms of warnings and leaks and also the stacktraces look identical
up to the application layer I don't think it will yield different results, but I'll do it anyways.

P.S.: can someone edit the issue description and shorten the line length of the embedded log excerpt?
Seems like I don't have the permission to do so. Thanx

Comment by chaoslayer [ 14/Dec/11 ]

Just made another run with increased connection leak timeout (600 seconds).

Results:

$ egrep 'Running task #[0-9]+' logs/server.log* | wc -l
10000
$ egrep 'task #[0-9]+ was successful' logs/server.log* | wc -l
10000
$ egrep 'task #[0-9]+ failed' logs/server.log* | wc -l
0
$ grep 'A potential connection leak' logs/server.log* | wc -l
3
$ grep 'Communication failure detected' logs/server.log* | wc -l
6
$ grep 'RAR5114' logs/server.log* | wc -l
4
$ grep 'RAR5117' logs/server.log* | wc -l
4
$ grep 'RAR7113' logs/server.log* | wc -l
934
Comment by chaoslayer [ 14/Dec/11 ]

Attached server-increased-timeout.log.gz containing the full run with connection-leak-timeout-in-seconds set to 600 seconds.

Comment by Shalini [ 15/Dec/11 ]

From the logs, the connection leak tracing happens when a particular connection
that is got from the pool is not closed within the specified time (600 seconds). Could you
observe at random points of time, the number of connection made to the database
using netstat or some other mechanism?

There are also some connection failure messages, to track this, the connection
validation could be turned on with table as the validation-method and a valid
connection-validation-table-name could be provided. This will detect the connection
failures and a FINE log would display the stacktrace of this failure.

The configuration fail-all-connections=true works when connection validation is turned on
and if there is a connection validation failure.

From the logs, i understand that your application spawns multiple threads around 10000,
each getting and closing a connection. Does each task do anything else with the
connection got from the pool? It would be great if you could describe more about your application.

I would also like to know if this behavior is seen only when you use eclipselink. A default
installation of glassfish with these same pool settings, goes through fine?

Comment by ancoron [ 16/Dec/11 ]

OK, here we go:

The test "application" being used consists of 3 main parts:

  • a Stateless EJB using CMP (JPA) as a data access layer
  • a Stateless EJB providing business logic and using the data access SLSB
  • a "client" Singleton EJB used as an automatic test starter

The code for the test client Singleton is here:

@Singleton
@Startup
public class StressTestBean {

    private static final Logger log = Logger.getLogger(StressTestBean.class.getName());
    private static final ExecutorService exec = Executors.newCachedThreadPool();
    
    @Inject
    @OSGiService(dynamic=true)
    private MovieService svc;
    
    @Resource
    private TimerService timers;

    @PostConstruct
    protected void init() {
        timers.createSingleActionTimer(3000, new TimerConfig());
    }
    
    @Timeout
    protected void timeout() {
        final int num = 10000;
        log.log(Level.INFO,
                "Starting in-container stress test with {0} tasks...",
                String.valueOf(num));
        
        for(int i=0; i<num; i++) {
            final int tmp = i;
            exec.execute(new Runnable() {

                @Override
                public void run() {
                    log.log(Level.INFO,
                            "Running task #{0}",
                            String.valueOf(tmp));
                    try {
                        svc.getVideo(Long.valueOf(
                                Math.round(Math.random() * Long.MAX_VALUE)
                                ));
                        
                        log.log(Level.INFO,
                                "... task #{0} was successful",
                                String.valueOf(tmp));
                    } catch(MovieServiceException msx) {
                        log.log(Level.INFO,
                                "... task #" + tmp + " failed",
                                msx);
                    }
                }
            });
        }
        
    }
}


For the test itself there are no entries in the tables (or at least it doesn't matter).

I have re-configured the datasource with validation, increased the max-wait-time and enabled
basically anything GlassFish offers for datasource/connection/statement validation/checking/recovery:

<jdbc-connection-pool validation-table-name="mov_video"
                      steady-pool-size="1"
                      statement-timeout-in-seconds="60"
                      connection-leak-reclaim="true"
                      idle-timeout-in-seconds="120"
                      max-wait-time-in-millis="120000"
                      connection-creation-retry-attempts="10"
                      validate-atmost-once-period-in-seconds="30"
                      statement-leak-timeout-in-seconds="90"
                      connection-creation-retry-interval-in-seconds="5"
                      max-pool-size="10"
                      datasource-classname="org.apache.derby.jdbc.ClientDataSource"
                      res-type="javax.sql.DataSource"
                      max-connection-usage-count="10"
                      connection-leak-timeout-in-seconds="600"
                      statement-leak-reclaim="true"
                      name="DerbyPool"
                      init-sql="SELECT COUNT(*) FROM mov_video"
                      transaction-isolation-level="read-committed"
                      ping="true"
                      fail-all-connections="true"
                      >
    <property name="PortNumber" value="1527"></property>
    <property name="Password" value="APP"></property>
    <property name="User" value="APP"></property>
    <property name="serverName" value="localhost"></property>
    <property name="DatabaseName" value="sun-appserv-samples"></property>
    <property name="connectionAttributes" value=";create=true"></property>
    <property name="prefer-validate-over-recreate" value="true"></property>
</jdbc-connection-pool>


All the rest is default and apart from the bundles and logging there is no
modification of the tested GlassFish 3.1.2-b13.

For testing I've written a little script to ease getting results and tracking things.

Note that I used the monitoring for collecting some data.

  • jdbc-connection-pool="HIGH"
  • accessing the REST API using curl

Please note the values for "current-conns" in the following outputs. Those are exactly
what the monitoring via REST API reports (may be another bug - only happens when under
heavy load - when that monitoring data is most needed to be exact).

Here is the output for a test run with logging kept at INFO:

Starting database in the background.
Log redirected to /srv/servers/glassfish/3.1.2-b13/glassfish/databases/derby.log.
Command start-database executed successfully.
Waiting for domain1 to start .....
Successfully started the domain : domain1
domain  Location: /srv/servers/glassfish/3.1.2-b13/glassfish/domains/domain1
Log File: /srv/servers/glassfish/3.1.2-b13/glassfish/domains/domain1/logs/server.log
Admin Port: 4848
Command start-domain executed successfully.
[2011-12-16T01:31:58.610] ...waiting for deployment to finish...
[2011-12-16T01:32:13.829] Deployment successful :)
Command enable-monitoring executed successfully.
Command enable-monitoring executed successfully.
[2011-12-16T01:32:20.191] tasks=81, current-conns=9
[2011-12-16T01:32:22.002] tasks=150, current-conns=6
[2011-12-16T01:32:23.065] tasks=227, current-conns=7
[2011-12-16T01:32:24.150] tasks=292, current-conns=8
[2011-12-16T01:32:25.244] tasks=358, current-conns=7
[2011-12-16T01:32:26.334] tasks=419, current-conns=8
[2011-12-16T01:32:27.435] tasks=519, current-conns=8
[2011-12-16T01:32:28.539] tasks=635, current-conns=8
[2011-12-16T01:32:29.657] tasks=710, current-conns=5
[2011-12-16T01:32:32.344] tasks=779, current-conns=7
[2011-12-16T01:32:33.594] tasks=1051, current-conns=8
[2011-12-16T01:32:34.793] tasks=1534, current-conns=9
[2011-12-16T01:32:35.969] tasks=2024, current-conns=8
[2011-12-16T01:32:37.143] tasks=2569, current-conns=4
[2011-12-16T01:32:38.427] tasks=3290, current-conns=5
[2011-12-16T01:32:39.712] tasks=3958, current-conns=5
[2011-12-16T01:32:41.001] tasks=4600, current-conns=3
[2011-12-16T01:32:42.236] tasks=5364, current-conns=2
[2011-12-16T01:32:43.427] tasks=6330, current-conns=5
[2011-12-16T01:32:44.618] tasks=7330, current-conns=1
[2011-12-16T01:32:45.858] tasks=8467, current-conns=6
[2011-12-16T01:32:47.138] tasks=9736, current-conns=4
[2011-12-16T01:32:48.349] tasks=10000, current-conns=-3
[2011-12-16T01:32:48.361] Waiting for connection leak timeout (600 seconds)...
[2011-12-16T01:42:49.764] Test results: statement-leaks=4, connection-leaks=9
Waiting for the domain to stop .....
Command stop-domain executed successfully.
Fri Dec 16 01:42:58 CET 2011 : Connection obtained for host: 0.0.0.0, port number 1527.
Fri Dec 16 01:42:58 CET 2011 : Apache Derby Network Server - 10.8.1.2 - (1095077) shutdown
Command stop-database executed successfully.


And here is the output for logging set to FINE:

Starting database in the background.
Log redirected to /srv/servers/glassfish/3.1.2-b13/glassfish/databases/derby.log.
Command start-database executed successfully.
Waiting for domain1 to start ...
Successfully started the domain : domain1
domain  Location: /srv/servers/glassfish/3.1.2-b13/glassfish/domains/domain1
Log File: /srv/servers/glassfish/3.1.2-b13/glassfish/domains/domain1/logs/server.log
Admin Port: 4848
Command start-domain executed successfully.
[2011-12-16T02:03:37.115] ...waiting for deployment to finish...
[2011-12-16T02:03:51.353] Deployment successful :)
Command enable-monitoring executed successfully.
Command enable-monitoring executed successfully.
[2011-12-16T02:04:03.034] tasks=0, current-conns=4
[2011-12-16T02:04:04.156] tasks=0, current-conns=4
[2011-12-16T02:04:05.279] tasks=0, current-conns=5
[2011-12-16T02:04:06.409] tasks=0, current-conns=5
[2011-12-16T02:04:07.584] tasks=0, current-conns=5
[2011-12-16T02:04:08.719] tasks=0, current-conns=5
[2011-12-16T02:04:09.866] tasks=0, current-conns=5
[2011-12-16T02:04:11.039] tasks=0, current-conns=5
[2011-12-16T02:04:12.218] tasks=0, current-conns=5
[2011-12-16T02:04:13.367] tasks=0, current-conns=5
[2011-12-16T02:04:14.544] tasks=0, current-conns=5
[2011-12-16T02:04:15.717] tasks=0, current-conns=5
[2011-12-16T02:04:16.874] tasks=0, current-conns=5
[2011-12-16T02:04:18.072] tasks=0, current-conns=5
[2011-12-16T02:04:19.254] tasks=0, current-conns=6
[2011-12-16T02:04:22.071] tasks=0, current-conns=6
[2011-12-16T02:04:23.279] tasks=0, current-conns=6
[2011-12-16T02:04:24.466] tasks=0, current-conns=6
[2011-12-16T02:04:25.657] tasks=0, current-conns=6
[2011-12-16T02:04:26.854] tasks=0, current-conns=7
[2011-12-16T02:04:28.210] tasks=0, current-conns=7
[2011-12-16T02:04:29.373] tasks=0, current-conns=7
[2011-12-16T02:04:30.567] tasks=0, current-conns=7
[2011-12-16T02:04:31.759] tasks=0, current-conns=9
[2011-12-16T02:04:32.978] tasks=0, current-conns=9
[2011-12-16T02:04:34.177] tasks=0, current-conns=9
[2011-12-16T02:04:35.414] tasks=0, current-conns=10
[2011-12-16T02:04:36.634] tasks=0, current-conns=10
[2011-12-16T02:04:37.856] tasks=0, current-conns=10
[2011-12-16T02:04:39.051] tasks=0, current-conns=10
[2011-12-16T02:04:40.280] tasks=0, current-conns=10
[2011-12-16T02:04:41.514] tasks=6, current-conns=10
[2011-12-16T02:04:42.952] tasks=23, current-conns=8
[2011-12-16T02:04:44.209] tasks=30, current-conns=8
[2011-12-16T02:04:45.427] tasks=57, current-conns=6
[2011-12-16T02:04:46.772] tasks=70, current-conns=8
[2011-12-16T02:04:47.986] tasks=88, current-conns=7
[2011-12-16T02:04:49.629] tasks=154, current-conns=6
[2011-12-16T02:04:50.825] tasks=273, current-conns=5
[2011-12-16T02:04:52.074] tasks=383, current-conns=2
[2011-12-16T02:04:53.406] tasks=491, current-conns=0
[2011-12-16T02:04:54.631] tasks=570, current-conns=-3
[2011-12-16T02:04:55.897] tasks=669, current-conns=0
[2011-12-16T02:04:57.166] tasks=775, current-conns=0
[2011-12-16T02:04:58.445] tasks=888, current-conns=-1
[2011-12-16T02:04:59.669] tasks=994, current-conns=1
[2011-12-16T02:05:00.978] tasks=1124, current-conns=-1
[2011-12-16T02:05:02.207] tasks=1234, current-conns=-3
[2011-12-16T02:05:03.482] tasks=1352, current-conns=-5
[2011-12-16T02:05:04.733] tasks=1477, current-conns=-4
[2011-12-16T02:05:05.964] tasks=1585, current-conns=-4
[2011-12-16T02:05:07.231] tasks=1714, current-conns=-8
[2011-12-16T02:05:08.499] tasks=1838, current-conns=-7
[2011-12-16T02:05:09.751] tasks=1962, current-conns=-9
[2011-12-16T02:05:11.042] tasks=2088, current-conns=-10
[2011-12-16T02:05:12.339] tasks=2206, current-conns=-13
[2011-12-16T02:05:13.642] tasks=2325, current-conns=-13
[2011-12-16T02:05:14.975] tasks=2465, current-conns=-14
[2011-12-16T02:05:16.308] tasks=2606, current-conns=-15
[2011-12-16T02:05:17.610] tasks=2750, current-conns=-18
[2011-12-16T02:05:18.893] tasks=2885, current-conns=-16
[2011-12-16T02:05:20.228] tasks=3016, current-conns=-18
[2011-12-16T02:05:21.519] tasks=3149, current-conns=-23
[2011-12-16T02:05:22.993] tasks=3312, current-conns=-21
[2011-12-16T02:05:24.336] tasks=3452, current-conns=-21
[2011-12-16T02:05:25.638] tasks=3579, current-conns=-21
[2011-12-16T02:05:27.028] tasks=3725, current-conns=-23
[2011-12-16T02:05:28.367] tasks=3933, current-conns=-28
[2011-12-16T02:05:29.674] tasks=4127, current-conns=-25
[2011-12-16T02:05:30.984] tasks=4356, current-conns=-28
[2011-12-16T02:05:32.303] tasks=4613, current-conns=-32
[2011-12-16T02:05:33.599] tasks=4742, current-conns=-31
[2011-12-16T02:05:34.930] tasks=4930, current-conns=-31
[2011-12-16T02:05:36.257] tasks=5143, current-conns=-34
[2011-12-16T02:05:37.584] tasks=5372, current-conns=-37
[2011-12-16T02:05:38.907] tasks=5596, current-conns=-39
[2011-12-16T02:05:40.247] tasks=5845, current-conns=-39
[2011-12-16T02:05:41.600] tasks=6088, current-conns=-40
[2011-12-16T02:05:43.001] tasks=6349, current-conns=-42
[2011-12-16T02:05:44.397] tasks=6624, current-conns=-43
[2011-12-16T02:05:46.177] tasks=6719, current-conns=-44
[2011-12-16T02:05:47.562] tasks=6999, current-conns=-48
[2011-12-16T02:05:48.952] tasks=7267, current-conns=-44
[2011-12-16T02:05:50.309] tasks=7542, current-conns=-45
[2011-12-16T02:05:51.738] tasks=7903, current-conns=-49
[2011-12-16T02:05:53.128] tasks=8208, current-conns=-50
[2011-12-16T02:05:54.528] tasks=8514, current-conns=-48
[2011-12-16T02:05:55.944] tasks=8820, current-conns=-49
[2011-12-16T02:05:57.336] tasks=9119, current-conns=-50
[2011-12-16T02:05:58.744] tasks=9454, current-conns=-50
[2011-12-16T02:06:00.180] tasks=9805, current-conns=-54
[2011-12-16T02:06:01.567] tasks=10000, current-conns=-62
[2011-12-16T02:06:01.585] Waiting for connection leak timeout (600 seconds)...
[2011-12-16T02:16:02.992] Test results: statement-leaks=1, connection-leaks=14
Waiting for the domain to stop .....
Command stop-domain executed successfully.
Fri Dec 16 02:16:12 CET 2011 : Connection obtained for host: 0.0.0.0, port number 1527.
Fri Dec 16 02:16:12 CET 2011 : Apache Derby Network Server - 10.8.1.2 - (1095077) shutdown
Command stop-database executed successfully.


For using a different JPA implementation inside GlassFish I don't have much
experience (it has to work with OSGi, too).

Can you recommend some how-to?

Comment by ancoron [ 16/Dec/11 ]

Attached server-validation.log.gz, which is the server.log for the latest test run with logging kept at INFO.

Attached server-validation-fine.log.gz, which is the server.log for the latest test run with logging kept at FINE.

Comment by ancoron [ 16/Dec/11 ]

Attached the test script test-connection-leaks.sh, which should be put directly into .../glassfish/.

This script just starts GlassFish, observes various things during the test run and shuts down everything afterwards. So you still have to provide a configured GlassFish first including the test OSGi bundles.

Comment by Shalini [ 16/Dec/11 ]

You could take a glassfish installation from http://dlc.sun.com.edgesuite.net/glassfish/3.1.2/promoted/ and then deploy this application (war/war file) after starting the domain. I still see that connection validation is not turned on. The "is-connection-validation-required" attribute should be set to true and "connection-validation-method" attribute should be set to "table" along with the validation-table-name attribute.

The log level of resourceadapter could be set to FINE to observe the connection validation failure messages.

Comment by Mitesh Meswani [ 16/Dec/11 ]

Assigning to Shalini as the current discussions on this issue are around jdbc connector functionality.

Comment by ancoron [ 16/Dec/11 ]

I always take the GlassFish binaries from there, anyway...

I've attached a new version of the test script that now also includes the
real number of connections established to derby.

Additionally I've included the database setup into the script prior to
starting GlassFish to avoid the connection failures at first start.

With that I've made a new run:

  1. download 3.1.2 promoted b14
  2. copy bundles into .../autodeploy/bundles/
  3. reconfigure default derby connection pool:
    <jdbc-connection-pool name="DerbyPool"
                          datasource-classname="org.apache.derby.jdbc.ClientDataSource"
                          res-type="javax.sql.DataSource"
                          steady-pool-size="1"
                          max-pool-size="10"
                          ping="true"
                          max-wait-time-in-millis="120000"
                          transaction-isolation-level="read-committed"
                          is-connection-validation-required="true"
                          connection-validation-method="table"
                          validation-table-name="mov_video"
                          validate-atmost-once-period-in-seconds="30"
                          fail-all-connections="true"
                          init-sql="SELECT COUNT(*) FROM mov_video"
                          connection-creation-retry-attempts="10"
                          connection-creation-retry-interval-in-seconds="5"
                          max-connection-usage-count="10"
                          idle-timeout-in-seconds="120"
                          connection-leak-timeout-in-seconds="600"
                          connection-leak-reclaim="true"
                          statement-timeout-in-seconds="60"
                          statement-leak-timeout-in-seconds="90"
                          statement-leak-reclaim="true"
                          >
        <property name="PortNumber" value="1527"></property>
        <property name="Password" value="APP"></property>
        <property name="User" value="APP"></property>
        <property name="serverName" value="localhost"></property>
        <property name="DatabaseName" value="sun-appserv-samples"></property>
        <property name="connectionAttributes" value=";create=true"></property>
        <property name="prefer-validate-over-recreate" value="true"></property>
    </jdbc-connection-pool>
    
  4. reconfigure logging to not rotate and set the following:
    javax.enterprise.resource.resourceadapter.level=FINE
    
  5. run the test script inside .../glassfish/:
    ...
    Successfully started the domain : domain1
    domain  Location: /srv/servers/glassfish/3.1.2-b14/glassfish/domains/domain1
    Log File: /srv/servers/glassfish/3.1.2-b14/glassfish/domains/domain1/logs/server.log
    Admin Port: 4848
    Command start-domain executed successfully.
    [2011-12-16T11:17:27.264] ...waiting for deployment to finish...
    [2011-12-16T11:17:35.354] Deployment successful :)
    Command enable-monitoring executed successfully.
    Command enable-monitoring executed successfully.
    [2011-12-16T11:17:40.256] tasks=0, current-conns=10, active-derby-conns=10
    [2011-12-16T11:17:41.339] tasks=0, current-conns=10, active-derby-conns=10
    [2011-12-16T11:17:42.410] tasks=1, current-conns=10, active-derby-conns=10
    [2011-12-16T11:17:43.496] tasks=1, current-conns=5, active-derby-conns=9
    [2011-12-16T11:17:44.565] tasks=1, current-conns=5, active-derby-conns=9
    [2011-12-16T11:17:45.651] tasks=1, current-conns=9, active-derby-conns=9
    [2011-12-16T11:17:46.760] tasks=1, current-conns=10, active-derby-conns=10
    [2011-12-16T11:17:47.873] tasks=1, current-conns=9, active-derby-conns=11
    [2011-12-16T11:17:49.011] tasks=1, current-conns=10, active-derby-conns=10
    [2011-12-16T11:17:51.654] tasks=1, current-conns=9, active-derby-conns=9
    [2011-12-16T11:17:59.728] tasks=1, current-conns=9, active-derby-conns=9
    [2011-12-16T11:18:00.847] tasks=1, current-conns=9, active-derby-conns=10
    [2011-12-16T11:18:01.975] tasks=1, current-conns=9, active-derby-conns=10
    [2011-12-16T11:18:22.888] tasks=1, current-conns=9, active-derby-conns=10
    [2011-12-16T11:18:32.313] tasks=1, current-conns=9, active-derby-conns=10
    [2011-12-16T11:18:33.465] tasks=1, current-conns=9, active-derby-conns=10
    [2011-12-16T11:18:44.495] tasks=1, current-conns=9, active-derby-conns=10
    [2011-12-16T11:18:47.382] tasks=1, current-conns=10, active-derby-conns=10
    [2011-12-16T11:18:48.555] tasks=2, current-conns=10, active-derby-conns=10
    [2011-12-16T11:18:49.962] tasks=3, current-conns=10, active-derby-conns=10
    [2011-12-16T11:18:51.238] tasks=7, current-conns=10, active-derby-conns=10
    [2011-12-16T11:18:52.384] tasks=32, current-conns=7, active-derby-conns=10
    [2011-12-16T11:18:54.027] tasks=56, current-conns=8, active-derby-conns=10
    [2011-12-16T11:18:55.217] tasks=65, current-conns=7, active-derby-conns=10
    [2011-12-16T11:18:56.392] tasks=96, current-conns=7, active-derby-conns=10
    [2011-12-16T11:18:57.572] tasks=132, current-conns=6, active-derby-conns=10
    [2011-12-16T11:18:58.963] tasks=180, current-conns=0, active-derby-conns=6
    [2011-12-16T11:19:00.211] tasks=316, current-conns=-1, active-derby-conns=10
    [2011-12-16T11:19:01.378] tasks=368, current-conns=2, active-derby-conns=9
    [2011-12-16T11:19:02.532] tasks=368, current-conns=2, active-derby-conns=9
    [2011-12-16T11:19:03.897] tasks=449, current-conns=2, active-derby-conns=10
    [2011-12-16T11:19:05.185] tasks=579, current-conns=0, active-derby-conns=10
    [2011-12-16T11:19:06.357] tasks=733, current-conns=-2, active-derby-conns=10
    [2011-12-16T11:19:07.546] tasks=866, current-conns=-2, active-derby-conns=10
    [2011-12-16T11:19:08.756] tasks=1004, current-conns=-2, active-derby-conns=10
    [2011-12-16T11:19:09.945] tasks=1126, current-conns=-3, active-derby-conns=10
    [2011-12-16T11:19:11.141] tasks=1239, current-conns=-6, active-derby-conns=10
    [2011-12-16T11:19:12.422] tasks=1372, current-conns=-7, active-derby-conns=11
    [2011-12-16T11:19:13.648] tasks=1508, current-conns=-6, active-derby-conns=10
    [2011-12-16T11:19:14.872] tasks=1666, current-conns=-6, active-derby-conns=10
    [2011-12-16T11:19:16.110] tasks=1813, current-conns=-9, active-derby-conns=11
    [2011-12-16T11:19:17.327] tasks=1946, current-conns=-11, active-derby-conns=9
    [2011-12-16T11:19:18.578] tasks=2096, current-conns=-9, active-derby-conns=9
    [2011-12-16T11:19:19.797] tasks=2237, current-conns=-11, active-derby-conns=10
    [2011-12-16T11:19:21.024] tasks=2376, current-conns=-14, active-derby-conns=9
    [2011-12-16T11:19:22.288] tasks=2522, current-conns=-15, active-derby-conns=9
    [2011-12-16T11:19:23.772] tasks=2706, current-conns=-17, active-derby-conns=10
    [2011-12-16T11:19:25.151] tasks=2852, current-conns=-19, active-derby-conns=10
    [2011-12-16T11:19:26.404] tasks=2990, current-conns=-23, active-derby-conns=9
    [2011-12-16T11:19:27.664] tasks=3136, current-conns=-23, active-derby-conns=10
    [2011-12-16T11:19:28.894] tasks=3277, current-conns=-26, active-derby-conns=9
    [2011-12-16T11:19:30.193] tasks=3429, current-conns=-27, active-derby-conns=10
    [2011-12-16T11:19:31.461] tasks=3590, current-conns=-27, active-derby-conns=10
    [2011-12-16T11:19:32.867] tasks=3788, current-conns=-30, active-derby-conns=9
    [2011-12-16T11:19:34.132] tasks=3991, current-conns=-37, active-derby-conns=7
    [2011-12-16T11:19:35.437] tasks=4257, current-conns=-33, active-derby-conns=10
    [2011-12-16T11:19:36.729] tasks=4510, current-conns=-33, active-derby-conns=10
    [2011-12-16T11:19:38.026] tasks=4772, current-conns=-34, active-derby-conns=10
    [2011-12-16T11:19:39.314] tasks=4999, current-conns=-36, active-derby-conns=10
    [2011-12-16T11:19:40.712] tasks=5230, current-conns=-34, active-derby-conns=10
    [2011-12-16T11:19:42.032] tasks=5428, current-conns=-34, active-derby-conns=10
    [2011-12-16T11:19:43.331] tasks=5691, current-conns=-35, active-derby-conns=10
    [2011-12-16T11:19:44.629] tasks=5962, current-conns=-37, active-derby-conns=9
    [2011-12-16T11:19:45.929] tasks=6204, current-conns=-41, active-derby-conns=9
    [2011-12-16T11:19:47.243] tasks=6443, current-conns=-40, active-derby-conns=11
    [2011-12-16T11:19:48.558] tasks=6655, current-conns=-42, active-derby-conns=10
    [2011-12-16T11:19:49.884] tasks=6872, current-conns=-41, active-derby-conns=10
    [2011-12-16T11:19:51.260] tasks=7250, current-conns=-49, active-derby-conns=10
    [2011-12-16T11:19:52.618] tasks=7746, current-conns=-43, active-derby-conns=10
    [2011-12-16T11:19:53.964] tasks=8160, current-conns=-43, active-derby-conns=11
    [2011-12-16T11:19:55.326] tasks=8543, current-conns=-47, active-derby-conns=9
    [2011-12-16T11:19:56.734] tasks=8777, current-conns=-46, active-derby-conns=10
    [2011-12-16T11:19:58.132] tasks=9159, current-conns=-47, active-derby-conns=10
    [2011-12-16T11:19:59.555] tasks=9671, current-conns=-50, active-derby-conns=10
    [2011-12-16T11:20:00.898] tasks=9997, current-conns=-58, active-derby-conns=9
    [2011-12-16T11:20:02.260] tasks=9997, current-conns=-58, active-derby-conns=9
    [2011-12-16T11:20:03.606] tasks=9998, current-conns=-58, active-derby-conns=8
    [2011-12-16T11:20:04.968] tasks=9999, current-conns=-58, active-derby-conns=7
    [2011-12-16T11:20:06.336] tasks=10000, current-conns=-58, active-derby-conns=6
    [2011-12-16T11:20:06.348] Waiting for connection leak timeout (600 seconds)...
    [2011-12-16T11:20:56.362] ...550 seconds left...
    [2011-12-16T11:21:56.383] ...490 seconds left...
    [2011-12-16T11:22:56.404] ...430 seconds left...
    [2011-12-16T11:23:56.425] ...370 seconds left...
    [2011-12-16T11:24:56.446] ...310 seconds left...
    [2011-12-16T11:25:56.467] ...250 seconds left...
    [2011-12-16T11:26:56.488] ...190 seconds left...
    [2011-12-16T11:27:56.509] ...130 seconds left...
    [2011-12-16T11:28:56.528] ...70 seconds left...
    [2011-12-16T11:29:56.549] ...10 seconds left...
    [2011-12-16T11:30:06.608] Test results: statement-leaks=0, connection-leaks=10
    ...
    


I've also attached a new server.log: server-validate-fine-b14.log.gz

I hope I now did everything correctly to get connection validation.

If you want to have a look at the full code of the test bundles, just go here:

Comment by Shalini [ 22/Dec/11 ]

Looks like this is an issue with the max-connection-usage count attribute only. When i executed the test case without leak tracing
off, i could reproduce this issue. Will put in a fix for this issue soon.

Comment by ancoron [ 22/Dec/11 ]

Thank you.

Comment by prasads [ 26/Dec/11 ]

Changing component to JDBC and adding 3_1_2-review tag as per discussion with Shalini

Comment by Shalini [ 09/Jan/12 ]

Fixed in trunk.

The max connection usage operation is modified to remove a resource handle from the pool when its usage count is more than max connection usage count directly.

Sending appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/pool/AssocWithThreadResourcePool.java
Sending appserver/connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/pool/ConnectionPool.java
Sending appserver/connectors/connectors-runtime/src/main/resources/com/sun/logging/enterprise/resource/resourceadapter/LogStrings.properties
Transmitting file data ...
Committed revision 51959.

Comment by Shalini [ 09/Jan/12 ]

Fixed in 3.1.2 branch :

Sending connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/pool/AssocWithThreadResourcePool.java
Sending connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/pool/ConnectionPool.java
Sending connectors/connectors-runtime/src/main/resources/com/sun/logging/enterprise/resource/resourceadapter/LogStrings.properties
Transmitting file data ...
Committed revision 51962.

Comment by chaoslayer [ 09/Jan/12 ]

Thank you very much for the fix.

I'm also glad to see this fix landed in the 3.1.2 branch.





Log Viewer should provide "tail" like feature (GLASSFISH-17507)

[GLASSFISH-17929] OLH: mention about raw log viewer Created: 08/Dec/11  Updated: 09/Jan/12  Resolved: 09/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.2_b13
Fix Version/s: 3.1.2_b17

Type: Sub-task Priority: Major
Reporter: Anissa Lam Assignee: Rebecca Parks
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

GUI task has completed. There is no Help button in the raw log viewer itself.
A button is added in the DAS general page to bring up the raw log viewer, so the DAS general page OLH will need to mention that.



 Comments   
Comment by Rebecca Parks [ 08/Dec/11 ]

Added reference and task pages in the online help for the raw log viewer.

Comment by Rebecca Parks [ 09/Jan/12 ]

Fixed in bundled docs for HCF.





[GLASSFISH-17846] tx subsystem can get initialized during shutdown Created: 30/Nov/11  Updated: 30/Dec/11  Resolved: 30/Dec/11

Status: Resolved
Project: glassfish
Component/s: jts
Affects Version/s: 3.1.2, 4.0
Fix Version/s: 3.1.2_b17, 4.0

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

Tags: 3_1_2-approved, spo

 Description   

TransactionLifecycleService.onShutdown() should use a config api to figure out if shutdown needs to be called or not. Currently it can potentially initialize tx subsystem at server shutdown!



 Comments   
Comment by marina vatkina [ 28/Dec/11 ]
  • What is the impact on the customer of the bug?

On a server stop when the transaction manager wasn't started

  • What is the cost/risk of fixing the bug?

Replace habitat.getByContract() with habitat.getInhabitantByType() followed by an assertion and a inhabitant.get()

  • Is there an impact on documentation or message strings?

No

  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?

Regular tests

  • Which is the targeted build of 3.1.2 for this fix?
    b17
Comment by marina vatkina [ 30/Dec/11 ]

Fixed in 3.1.2 with rev 51824
Fixed on trunk with rev 51809





[GLASSFISH-17840] docuemnt capture-schema utility Created: 28/Nov/11  Updated: 09/Jan/12  Resolved: 09/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.2_b01, 4.0
Fix Version/s: 3.1.2_b17

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


 Description   

The capture-schema utility is no longer documented under utility commands section of reference guide. It needs to be reinstated. Opening an issue as advised by Paul.

The utility has not changed since Glassfish 2.x. Please refer to this link for 2.x documentation of this utility http://docs.oracle.com/cd/E19879-01/821-0179/6nl8hchvh/index.html



 Comments   
Comment by Rebecca Parks [ 01/Dec/11 ]

I recreated the capture-schema man page and will close this bug after the man pages are sent out for review.

Comment by Rebecca Parks [ 09/Jan/12 ]

Fixed in bundled docs for HCF.





Make Monitoring page more visible (GLASSFISH-17506)

[GLASSFISH-17827] OLH : Monitoring Data Page Created: 24/Nov/11  Updated: 09/Jan/12  Resolved: 09/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.2
Fix Version/s: 3.1.2_b17

Type: Sub-task Priority: Major
Reporter: sumasri Assignee: Rebecca Parks
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Refer to main task for more details.
Added one tree node(monitoring data).
Added monitoring section under common tasks.
By clicking on the above, it goes to the monitoring info table.



 Comments   
Comment by Rebecca Parks [ 06/Dec/11 ]

Drafted online help for the new Monitoring page and its table. Added appropriate cross references to and from other help pages.

Comment by Rebecca Parks [ 09/Jan/12 ]

Fixed in bundled docs for HCF.





Lack of ssl.json and file-cache option for Network Config (GLASSFISH-17462)

[GLASSFISH-17820] OLH: attribute field changes in network config page Created: 23/Nov/11  Updated: 09/Jan/12  Resolved: 09/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.2_b06
Fix Version/s: 3.1.2_b17

Type: Sub-task Priority: Major
Reporter: Anissa Lam Assignee: Rebecca Parks
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

there will probably be changes in the field. More info will be added to the main task when start working on this. refer to the main task for details



 Comments   
Comment by Paul Davies [ 03/Jan/12 ]

The parent issue is being fixed in 3.1.2. The fix version of this subtask is updated to match.

Comment by Paul Davies [ 03/Jan/12 ]

Selected wrong affected version last time.

Comment by Anissa Lam [ 03/Jan/12 ]

The resulting UI changes means that for "admin-listener" and "sec-admin-listener" protocol, user will not be able to change the security enabled checkbox. since both the checkbox is read only.

In the online help, we may want to mention that the network listener should change the protocol they want to use (pick admin-listener or sec-admin-listener), depending whether they want security on, instead of changing this attribute.
Warn user about security being comprised if they switch to use "admin-listener' since out-of-box configuration for default-config (which any cluster/instance) derived from has secure admin enabled, thus using 'sec-admin-listener' protocol.

Comment by Rebecca Parks [ 04/Jan/12 ]

In the protocol choosing step of the task "To Create a Network Listener," added:

To enable security for the network listener, choose a protocol with security enabled.
The protocol determines whether security is enabled for the network listener.

Changed Next Steps to:

If you enabled security for the protocol used by the network listener, you can use the SSL tab to edit the SSL settings of the protocol.

In the task "To Edit a Network Listener," added this step:

Select the Protocol used by the network listener to change its settings. For example, you can enable security. You cannot choose a different protocol.

Changed Next Steps to:

You can use the SSL, HTTP, and File Cache tabs to edit the settings for the protocol associated with the network listener. The SSL tab is meaningful only if you enabled security for the protocol.

Changed the security step for both tasks to:

The read-only Security Enabled checkbox indicates whether security is enabled for the protocol used by the network listener.

In the New Network Listener reference page, added this to Use an Existing Protocol:

The protocol determines whether security is enabled for the network listener.

Added this to Protocol:

Select the Protocol used by the network listener to change its settings. For example, you can enable security.

Changed Security for both reference pages to:

If this option is selected, security is enabled for the protocol used by the network listener. The Security field is a read-only field.

Comment by Rebecca Parks [ 09/Jan/12 ]

Fixed in bundled docs for HCF.





Redeploying an application does not show "High Availability" button (GLASSFISH-17200)

[GLASSFISH-17819] OLH: redeploy screen Created: 23/Nov/11  Updated: 09/Jan/12  Resolved: 09/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.2
Fix Version/s: 3.1.2_b17

Type: Sub-task Priority: Major
Reporter: Anissa Lam Assignee: Rebecca Parks
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

A new check box will be added to the redeploy screen.



 Comments   
Comment by Rebecca Parks [ 06/Dec/11 ]

Added the Availability Enabled description to the reference and task pages for redeployment in the online help. Because this check box is not present in the Console as of build 13, I made my best guess as to where the check box appears relative to other options.

Comment by Rebecca Parks [ 09/Jan/12 ]

Fixed in bundled docs for HCF.





add support for add-resources (GLASSFISH-17625)

[GLASSFISH-17817] OLH: add-resources Created: 23/Nov/11  Updated: 09/Jan/12  Resolved: 09/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.2
Fix Version/s: 3.1.2_b17

Type: Sub-task Priority: Major
Reporter: Anissa Lam Assignee: Rebecca Parks
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

refer to main task for UI changes.



 Comments   
Comment by Rebecca Parks [ 07/Dec/11 ]

This feature doesn't appear to be in build 13. I need to add it to the help by tomorrow, 12/8, for SCF. Are there DHQA slides, screen shots, or something to tell me what this will look like?

Comment by Rebecca Parks [ 08/Dec/11 ]

Added a reference page in the online help. Investigating whether a task page is needed and if so where to put it.

Comment by Rebecca Parks [ 09/Dec/11 ]

Added an online help task page as well.

Comment by Rebecca Parks [ 09/Jan/12 ]

Fixed in bundled docs for HCF.





support list-timers (GLASSFISH-17629)

[GLASSFISH-17814] OLH: list timers Created: 23/Nov/11  Updated: 09/Jan/12  Resolved: 09/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.2
Fix Version/s: 3.1.2_b17

Type: Sub-task Priority: Major
Reporter: Anissa Lam Assignee: Rebecca Parks
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Refer to main task for UI changes



 Comments   
Comment by Rebecca Parks [ 08/Dec/11 ]

Described the EJB timer table in the reference and task pages for migrating EJB timers in the online help.

Comment by Rebecca Parks [ 09/Jan/12 ]

Fixed in bundled docs for HCF.





support collect-log-files command (GLASSFISH-17627)

[GLASSFISH-17813] OLH: collect log files Created: 23/Nov/11  Updated: 09/Jan/12  Resolved: 09/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.2
Fix Version/s: 3.1.2_b17

Type: Sub-task Priority: Major
Reporter: Anissa Lam Assignee: Rebecca Parks
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

refer to main task for UI changes



 Comments   
Comment by Rebecca Parks [ 07/Dec/11 ]

Added reference and task pages to the online help for this feature.

Comment by Rebecca Parks [ 09/Jan/12 ]

Fixed in bundled docs for HCF.





display information returned by uptime (GLASSFISH-17585)

[GLASSFISH-17812] OLH: uptime info Created: 23/Nov/11  Updated: 09/Jan/12  Resolved: 09/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.2
Fix Version/s: 3.1.2_b17

Type: Sub-task Priority: Major
Reporter: Anissa Lam Assignee: Rebecca Parks
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

refer to main task for UI changes



 Comments   
Comment by Rebecca Parks [ 07/Dec/11 ]

Added a brief description of the Uptime read-only display to the Admin Server General Information reference page and the To View General Information for the DAS task page in the online help.

Comment by Rebecca Parks [ 09/Jan/12 ]

Fixed in bundled docs for HCF.





UI improvements to listing and creating Network Listeners (GLASSFISH-17778)

[GLASSFISH-17797] OLH: new simplified create network listener page will need new help page. Created: 22/Nov/11  Updated: 09/Jan/12  Resolved: 09/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.2
Fix Version/s: 3.1.2_b17

Type: Sub-task Priority: Major
Reporter: Anissa Lam Assignee: Rebecca Parks
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

With the changes on the creation of network listener, OLH will need to be modified.



 Comments   
Comment by Rebecca Parks [ 22/Nov/11 ]

Is there a spec or a related bug that describes the changes that will be implemented?

Comment by Anissa Lam [ 22/Nov/11 ]

I was told to file doc bugs as sub task, so I thought i don't need to point to the gui issue.
Yes, the UI change is mentioned in GLASSFISH-17778 , and this issue is created as a sub-task of that.

When i actually implement the change, I will continue update the GUI issue. Please refer to that.

Comment by Rebecca Parks [ 07/Dec/11 ]

This feature doesn't appear to be in build 13. I need to add it to the help by tomorrow, 12/8, for SCF. Are there DHQA slides, screen shots, or something to tell me what this will look like?

Comment by Rebecca Parks [ 08/Dec/11 ]

Added reference and task pages to the online help for the HTTP Listener pages in the Console.

Comment by Anissa Lam [ 10/Dec/11 ]

The GUI change has checked into both 3.1.2 and 4.0, please ensure that help will be in 4.0 as well.

Comment by Rebecca Parks [ 12/Dec/11 ]

The 3.1.2 help will be used as a starting point for 4.0, so this will happen automatically.

Comment by Rebecca Parks [ 09/Jan/12 ]

Fixed in bundled docs for HCF.





Support change-master-broker in GUI (GLASSFISH-17779)

[GLASSFISH-17794] OLH: mention the additional text field for master broker Created: 22/Nov/11  Updated: 10/Jan/12  Resolved: 10/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: None
Fix Version/s: 3.1.2_b17

Type: Sub-task Priority: Major
Reporter: Anissa Lam Assignee: Mike Fitch
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

An additional fields will be provided for user to change the master broker. OLH will need to mention that.



 Comments   
Comment by Mike Fitch [ 10/Jan/12 ]

Updated online help for Java Message Service page.

Fix committed in rev 51972.





support configure-jms-cluster in GUI (GLASSFISH-17582)

[GLASSFISH-17793] OLH: support for configure-jms-cluster Created: 22/Nov/11  Updated: 12/Jan/12  Resolved: 10/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: None
Fix Version/s: 3.1.2_b17

Type: Sub-task Priority: Major
Reporter: Anissa Lam Assignee: Mike Fitch
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

configure-jms-cluster allows user to do the configuration after the cluster is created and before the cluster is starte the first time.
There will be changes in the process of creating the cluster.



 Comments   
Comment by Anissa Lam [ 07/Jan/12 ]

The feature is now supported and completed in console.
This includes adding the JMS section when creating a cluster.
The UI shown in this section is duplicated in the JMS Availability tab. This means, the JMS Availability tab has a completely different UI than before.
Please ensure that the OLH for both the create cluster page and the JMS Availability page be modified accordingly.
Please checkout the 1/7/2012 nightly build to see these changes.

Comment by Anissa Lam [ 08/Jan/12 ]

In the email thread, Sarada mentioned the following for the JMS availability tab.

">The text on JMS Availability window needs to be changed. Annisa has filed a JIRA task for that. When the instance is running, it should say something that you "can not make configuration change when instance(s) are running, please stop the instance(s)" and gray out all fields; When no instance running, it should say a warning - something like "if reconfiguration cause data store change, unless you want to discard existing data in the current store, please make sure you have migrated existing data, as instructed by <MQ Administration Guide link> to the new data store to be configured to."

Note that for the case where there is running instance, there is already warning shown to the user and all the fields are read only. User will not be able to change that.
I don't know what the doc link should be.
There is the following key in admingui/jms-plugin/.../Strings.properties file

availability.jmsAvailability=JMS Availability
availability.jmsAvailabilityInfo=Configure the Availability of the JMS Cluster. Click <a href="#

{request.contextPath}

/jms/jmsService.jsf?configName=#

{configName}

">here</a> to configure the JMS Service.
availability.jmsAvailabilityInfoHelp=

Mike, please add the doc link to the availability.jmsAvailabilityInfoHelp key. This will be displayed after the jmsAvailabilityInfo key.

If there is any question, please contact Amy and Sarada. I have forwarded the email to you.

Comment by Mike Fitch [ 10/Jan/12 ]

Updated online help for New Cluster and JMS Availability pages to reflect new UI.

Fix committed in rev 51972.

Added inline help to JMS Availability page. See GLASSFISH-18077 for details.

Comment by saradak [ 12/Jan/12 ]

There should be some text displayed for the users when they select Remote mode in create cluster screen. It is users responsibility to setup the brokers in Remote mode.

We can point them to
"To Configure a GlassFish Cluster to Use a Remote Broker Cluster" page in the
doc http://docs.oracle.com/cd/E18930_01/html/821-2426/abdbx.html#abdb"

-Sarada





support get-client-stubs (GLASSFISH-17554)

[GLASSFISH-17790] OLH: modify the Application Info page about downloading client stubs jars Created: 22/Nov/11  Updated: 09/Jan/12  Resolved: 09/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: None
Fix Version/s: 3.1.2_b17

Type: Sub-task Priority: Major
Reporter: Anissa Lam Assignee: Rebecca Parks
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

For AppClient jars, there will be additional action to download the client jars.



 Comments   
Comment by Rebecca Parks [ 22/Nov/11 ]

Is there a spec or related bug that describes the implementation of this change?

Comment by Anissa Lam [ 22/Nov/11 ]

This is a sub-task of GLASSFISH-17554. Please refer to that for more details.
thanks

Comment by Rebecca Parks [ 06/Dec/11 ]

Created new help task: To Download Application Client Stubs

Comment by Rebecca Parks [ 09/Jan/12 ]

Fixed in bundled docs for HCF.





EJB services (async, timer, etc.) should be using common, configurable thread pool (GLASSFISH-16735)

[GLASSFISH-17735] Need to document ejb container common thread pool configuration Created: 15/Nov/11  Updated: 09/Jan/12  Resolved: 09/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.2, 4.0
Fix Version/s: 3.1.2_b17

Type: Sub-task Priority: Major
Reporter: Cheng Fang Assignee: Rebecca Parks
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Need to document the feature implemented in issue http://java.net/jira/browse/GLASSFISH-16735 (EJB services (async, timer, etc.) should be using common, configurable thread pool)

The configuration is in domain.xml<ejb-container>, for example,

<ejb-container>
<property name="thread-core-pool-size" value="10"></property>
<property name="thread-max-pool-size" value="100"></property>
<property name="thread-queue-capacity" value="5000"></property>
<property name="thread-keep-alive-seconds" value="600"></property>
<property name="allow-core-thread-timeout" value="false"></property>
<property name="prestart-all-core-threads" value="false"></property>
</ejb-container> 

All of the above properties are optional. Their default values:

thread-core-pool-size: 16
thread-max-pool-size: 32
thread-queue-capacity: Integer.MAX_VALUE
thread-keep-alive-seconds: 60
allow-core-thread-timeout: false
prestart-all-core-threads: false



 Comments   
Comment by Paul Davies [ 15/Nov/11 ]

If possible, these properties should be described in the context of the GlassFish Server administrative interfaces through which they are set (for example, --properties in an asadmin subcommand, the properties table of a page in the Administration Console). If no such interfaces exist, the documentation should explain how set these properties by using the set command, including the full dotted name. The documentation should not encourage users to edit domain.xml in plain text by reproducing the XML representation of the properties in this issue report.

Comment by Rebecca Parks [ 15/Nov/11 ]

The documentation will have to explain use of the set command for these properties. There appears to be no other way to use the command line to set them. Since the set command man page doesn't describe every property and attribute that can be set, this issue doesn't apply to the man pages.

As for online help, the GHEJL help set is affected. Previously, no EJB container properties were defined, but now these six new ones are.

In the unbundled documentation, the EJB container chapters of the Admin Guide and the Dev Guide are affected.

The doc team needs descriptions of all these properties. Names and defaults aren't enough.

Comment by Cheng Fang [ 15/Nov/11 ]

These properties are shadows of those in java.util.concurrent.ThreadPoolExecutor. Their names are self-explanatory. For details GlassFish documents could just reference Java SE javadoc
http://download.oracle.com/javase/6/docs/api/java/util/concurrent/ThreadPoolExecutor.html

Comment by Rebecca Parks [ 02/Dec/11 ]

Added the following to the EJB Container section of the online help:

Properties Specific to the EJB Container

The following properties are available for configuring the EJB container.

thread-core-pool-size
Specifies the minimum number of threads in the EJB container’s common thread pool. The default value is 16.

thread-max-pool-size
Specifies the maximum number of threads in the EJB container’s common thread pool. The default value is 32.

thread-queue-capacity
Specifies the size, in bytes, of the thread pool queue, which stores new requests while new threads are created if more than thread-core-pool-size threads are running. The default value is the Integer.MAX_VALUE for the operating system.

thread-keep-alive-seconds
Specifies the time, in seconds, past which threads in excess of thread-core-pool-size are terminated. The default value is 60.

allow-core-thread-timeout
If set to true, all threads, even core threads, are subject to termination after thread-keep-alive-seconds. The default value is false.

prestart-all-core-threads
If set to true, threads in the EJB container’s common thread pool are started even if no new requests have arrived, and the pool has a non-empty queue. If set to false, threads are not started until new requests arrive, and the pool is initially empty. The default value is false.

Comment by Rebecca Parks [ 06/Dec/11 ]

Added a link to ThreadPoolExecutor to the online help and changed these property descriptions according to feedback from Cheng:

thread-core-pool-size
Specifies the number of core threads in the EJB container’s common thread pool. The default value is 16.

thread-queue-capacity
Specifies the size of the thread pool queue, which stores new requests if more than thread-core-pool-size threads are running. The default value is the Integer.MAX_VALUE.

prestart-all-core-threads
If set to true, all core threads in the EJB container’s common thread pool are started, causing them to idly wait for work. If set to false, threads are not started until new requests arrive. The default value is false.

Comment by Rebecca Parks [ 09/Jan/12 ]

Fixed in bundled docs for HCF.





[GLASSFISH-17510] Be more rigorous about requiring user to set an admin password Created: 27/Oct/11  Updated: 10/Jan/12  Resolved: 10/Jan/12

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: 3.1.1, 4.0
Fix Version/s: 3.1.2_b17, 4.0

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

Issue Links:
Dependency
depends on GLASSFISH-17512 enable-secure-admin should fail if th... Resolved
depends on GLASSFISH-17513 change-admin-password must require a ... Resolved
depends on GLASSFISH-17514 start-domain must prompt for a new ad... Resolved
depends on GLASSFISH-17515 DAS server startup must detect and ha... Resolved
depends on GLASSFISH-17516 OGS zip distributions should be confi... Resolved
depends on GLASSFISH-17517 change-admin-password should work as ... Resolved
depends on GLASSFISH-17525 Enhance create-file-user/update-file-... Resolved
Tags: 3_1_2-approved

 Description   

By default glassfish allows users to configure glassfish with an empty admin password. This may be acceptable for the local administration scenario (where the DAS will not accept remote admin connections), but it is not acceptable for the remote administrative case.

This bug is an umbrella bug and contains a number of sub-tasks for the various fixes needed to address this issue. An overview of the approach is given in the following (internal) wiki page:

http://aseng-wiki.us.oracle.com/asengwiki/display/GlassFish/3.1.2+Secure+By+Default



 Comments   
Comment by Joe Di Pol [ 10/Jan/12 ]

All sub-bugs have been resolved in 3.1.2, so I'm resolving this umbrella bug.





[GLASSFISH-17504] High Availability (HA) webapps slow, corrupted sessions, and java.util.concurrent.TimeoutException Created: 27/Oct/11  Updated: 05/Feb/12  Resolved: 06/Jan/12

Status: Resolved
Project: glassfish
Component/s: web_container
Affects Version/s: 3.1.1
Fix Version/s: 3.1.2_b17

Type: Bug Priority: Critical
Reporter: lprimak Assignee: Mahesh Kannan
Resolution: Fixed Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:
  • Linux, 8GB RAM, 8-core Intel CPU, Cluster of 2 machines.
  • Both session loss and slowness coincide directly with the TimeoutException
  • The app used is our internal app, we are having trouble to reproducing this wit cluster.jsp directly
  • aside from the --distributable-- directive, there is no tuning in web.xml, there is no glassfish-web.xml at all
  • application is deployed from the Admin GUI, with no changes in any of the checkboxes, aside from the 'availability
  • availability is set at deployment time, not after
  • no relaxVersionSemantics property
  • session loss occurs frequently but not always, but always there is shoal TimeoutException in the logs that corresponds to session loss
  • session size is around 50k
  • cluster has 2 nodes, both are full (not virtual) machines
  • There is no traffic (test server) just sitting trying to use the app with one browser
  • The issue happens whether you use a load balancer or not, even when hitting the server directly,

although it's much easier to reproduce with a sticky-session load balancer (apache/mod-proxy-ajp)


Attachments: Zip Archive server_logs.zip    
Tags: 3_1_2-approved, availability, replication, sessions, shoal

 Description   

I set up a cluster, and deployed my JSP application onto it.
It works great until I turn on high-availability for this application via the Admin console.
Once I do that, it becomes very slow, and session state gets lost every 2 requests or so.
Disabling high-availability cures the problem.

I did run verity_multicast, GMS is running, cluster health is good, followed the documentation,
and didn't do anything 'weird' or customized'.
I also have in my web application.

There are no errors in the log files. When I turn on high-availability, I do get this error very frequently:
[#|2011-03-06T02:13:00.297-0500|WARNING|glassfish3.1|org.shoal.ha.cache.command.load_request|_ThreadID=27;_ThreadName=Thread-1;|LoadRequestCommand timed out while waiting for result java.util.concurrent.TimeoutException|#]



 Comments   
Comment by shreedhar_ganapathy [ 27/Oct/11 ]

Couple of questions :
1. Have you tied using any of the supported LBs with sticky sessions enabled i.e. Apache with mod_jk (we dont support mod_proxy ajp yet although I suspect this may not be contributing to the issue)
or try Oracle Iplanet Web Server/Apache/IIS with GlassFish LB Plugin

2. Does your app employ Ajax calls? Ajax based request responses may result in request version numbers within sessions to be incremented incrementally before a given request has completed replication and returned - as a result, this may result in sessions not be found for that incremented request version number causing a new session to be created.
In order to work around this, you have to place the relaxCacheVersionSemantics property in the glassfish-web.xml descriptor.

Here's a snippet

<session-config>
<session-manager persistence-type="replicated">
<manager-properties>
<property name="relaxCacheVersionSemantics" value="true"/>
</manager-properties>
</session-manager>
</session-config>

Let us know if any of the above resolves/reproduces the issue with more information. At our end we are trying to reproduce with our apps but cannot reproduce.

If its possible to share your app, that would also help.

Comment by lprimak [ 28/Oct/11 ]

I tried relaxCacheVersionSemantics=true code, but it did not work.

I did not try the load balancer, but that isn't even involved. When I hit Glassfish server directly
without any load balancer, the issue still exists.
I cannot share the application, because it is very database-driven and I can't give access to that for obvious reasons.

Comment by Mahesh Kannan [ 01/Nov/11 ]

You said that there are two machines involved. When you use a browser, typically, the cookies (for example JSESSIONID) will NOT be sent to the second machine. This could be the reason why session failover may not be working for you. (However, this wont be an issue if you use an LB)

I suggest you setup an LB and try your app. OR you can create a cluster of two instances that run on the same machine. If you have the instances running on the same server instance (same machine), you can use a browser to jump from one instance to another.

hope this helps.

Comment by lprimak [ 01/Nov/11 ]

Believe me, the load balancer is not the issue. This is in no way related to the load balancer. I tried all kinds of setup with no results. with load balancer, without, trying to isolate the problem is how I created non load balance test.

In my non load balancer Tests I just hit only one instance so replication wasn't even used, but the session loss was still there and the timeout exception too. The timeout exception is the key he and needs to be found and fixed.

This issue is going on in multiple environments and reported by multiple users. This is not an invalid issue. This is not an environmental issue. This is a bug in glassfish and shoal in particular. This is not an operator error. This has been going for more than a year with lots of people trying lots of things to fix it with no results.

Comment by Tushar Patidar [ 15/Nov/11 ]

I observed the same behavior with logs indicating LoadRequestCommand timed out while waiting for result java.util.concurrent.TimeoutException. I have deployed a 2 instance cluster spanning two separate physical hosts. Instances keep on logging such WARNING messages. I have fronted the cluster with Apache mod_jk LB.

Comment by michalkurtak [ 16/Nov/11 ]

Hello.
We are observing same problem. We have 2 node cluster with 4 instances (2 instances on one node). Cluster is very very slow. It is obvious when static content (e.g. images) is served in parallel from glassfish servers. 120B images are served in 3-4 seconds. We have haproxy with sticky session loadbalancer in front of cluster. So requests arrive on same instance and session is lost.

We have this message in logs:
[#|2011-11-15T16:12:37.526+0100|WARNING|glassfish3.1|org.shoal.ha.cache.command.load_request|_ThreadID=47;_ThreadName=Thread-2;|LoadRequestCommand timed out while waiting for result java.util.concurrent.TimeoutException|#]

Comment by Mahesh Kannan [ 14/Dec/11 ]

shoal replication module currently, doesn't handle the case when there are no replication partners. It just attempts to replicate data even if there are no replica instances running. I have a patch that fixes the issue. Will be available in the next shoal promotion.

Regarding TimeoutException, it (TimeoutException) is thrown only when load requests (to load a session from replica) fails to load within a reasonable time. This is not the root cause itself. The root cause is to identify why the sessions are not found.

Had a discussion with the web container team and it looks like there is a race condition when AJax calls are involved. I am working on the fix for this as well.

Comment by lprimak [ 14/Dec/11 ]

Can you elaborate a bit further on this?
I have two instances in the cluster, shouldn't they be the required replication partners?
Also, I have no AJAX calls, but this the web site can trigger a race condition by just retrieving many URLs in parallel with the same session ID cookie.

Comment by Mahesh Kannan [ 21/Dec/11 ]

<comment>

Can you elaborate a bit further on this?
I have two instances in the cluster, shouldn't they be the required replication partners?
Also, I have no AJAX calls, but this the web site can trigger a race condition by just retrieving many URLs in parallel with the same session ID cookie.

<comment>

If you have two instances then they are discovered and one will act as a replica for the other.

You mentioned that there could be parallel threads accessing the same session. This is what exactly AJAX type applications do. In this case, the web container will issue a bunch of save (or updateTimeStamp) calls to the replication module in parallel for the same session ID. Either the web container and / or the replication module need to handle concurrent saving of same sessions properly.

This issue is exactly same as 17344

Comment by lprimak [ 22/Dec/11 ]

Is there a Glassfish plugin or a version that I can test with now to see if this is really true? I remember that the Shoal team cannot reproduce the problem right now, and I would love to confirm that this indeed is the cause of the problem.
Thanks!

Comment by Mahesh Kannan [ 27/Dec/11 ]

There is no plugin to test this. We are trying to provide a fix for this issue in 3.1.2. Can you please reproduce the issue using your app on 3.1.2 (using the latest nightly build).

I am currently testing a patch that fixes this issue. Once the patch is ready and integrated, you pick up the next available promoted build of 3.1.2 to test it.

Comment by Mahesh Kannan [ 03/Jan/12 ]

I have the patch ready (using GlassFish 3.1.2 trunk).

If you have your tests setup on 3.1.2, I can post the patch.

Will checkin after code review

Comment by lprimak [ 04/Jan/12 ]

Can you post a binary release somewhere so I don't have to compile, apply patch and download? I never built from source and would like to avoid it if possible.
Thanks

Comment by jjackb [ 05/Jan/12 ]

I am also interested in a binary release to test the patch because this might be the solution to this bug:
http://java.net/jira/browse/GLASSFISH-15575
-> reported in early 2011 during gf 3.1 beta-testing and describes the same problem and log entries
-> problem still exists with gf 3.1.1 in production environment

Comment by Mahesh Kannan [ 06/Jan/12 ]

The promoted builds are available at:

http://dlc.sun.com.edgesuite.net/glassfish/3.1.2/promoted/

Please wait for the next promotion

Comment by Mahesh Kannan [ 06/Jan/12 ]

You also need to update your sun-web.xml with the following content:

Note that the manager-properties contains: relaxCacheVersionSemantics

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
<sun-web-app error-url="">
<context-root>/ctestservlet</context-root>
<class-loader delegate="true"/>
<session-config>
<session-manager persistence-type="replicated">
<manager-properties>
<property name="persistenceFrequency" value="web-method"/>
<property name="relaxCacheVersionSemantics" value="true"/>
</manager-properties>
<store-properties>
<property name="persistenceScope" value="session"/>
</store-properties>
</session-manager>
<session-properties/>
<cookie-properties/>
</session-config>
<jsp-config>
<property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class java code.</description>
</property>
</jsp-config>
</sun-web-app>

Comment by Mahesh Kannan [ 06/Jan/12 ]

I am going to close this issue. If you update the sun-web.xml with the relaxCacheVersionSemantics, you should see a considerable increase in performance.

Without the relaxCacheVersionSemantics, there were too many load requests to load the session from replica instance causing a considerable delay in loading the page.

I will keep issue number 17344 open though (http://java.net/jira/browse/GLASSFISH-17344)

Comment by Joe Di Pol [ 06/Jan/12 ]

From Mahesh:

  • What is the impact on the customer of the bug?
    Moderate.
  • How likely is it that a customer will see the bug and how serious is the bug?
    Customers who are using AJAX will face this issue.
  • Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)?
    Yes. 2.x handled AJAX related calls well
  • What is the cost/risk of fixing the bug?
    Moderate

How risky is the fix? How much work is the fix? Is the fix complicated?
Moderate. I had to touch 9 files (all in) failover / replication module. The fix is straightforward but had to touch 9 files

  • Is there an impact on documentation or message strings?
    No changes to docs required. Since 2.x documentation already talks about AJAX related settings that must be specified in glass fish-web.xml
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
    SQE HA tests. These tests have been run with the patch and all passed.
  • Which is the targeted build of 3.1.2 for this fix?
    Next build
Comment by Mahesh Kannan [ 06/Jan/12 ]

Tested with the ctestservlet mentioned in 15575. The real issue here is that the app uses multiple gifs/jpegs that causes a browser to make concurrent requests to the server. Due to the absence of relaxVersionSemantics in sun-web.xml, the web container makes approximately 7 load_requests to the replication layer for every page access!

Some of the load_requests were lost because we do batching (using a map) based on sessionid.

I have fixed the loss of load_requests with fix to shoal (commit version 1732).
After adding the relaxVersionSemantics to the app, there were no session loss.

<comment from submitter>
cluster has 2 nodes, both are full (not virtual) machines. There is no traffic (test server) just sitting trying to use the app with one browser
</comment from submitter>

I would like to add that if there are multiple physical machines, you have to use a load balancer otherwise jsessionid cookie will not be automatically sent by the browser. This has nothing to with replication or web container. This is how browsers work.

Comment by Joe Fialli [ 10/Jan/12 ]

Shoal 1.6.17 integrated into bg trunk as part of svn version 52009 on January 10, 2012.
Fix should be in next promoted build which is 4.0 b19.

Comment by Joe Fialli [ 10/Jan/12 ]

Shoal 1.6.17 integrated into bg trunk as part of svn version 52009 on January 10, 2012.
Fix should be in next promoted build which is 4.0 b19.

Comment by lprimak [ 04/Feb/12 ]

Looks like this is confirmed fixed now. Thanks a lot for your efforts.
I didn't even need to do this: <property name="relaxCacheVersionSemantics" value="true"/>
and it still works great!

Comment by lprimak [ 05/Feb/12 ]

Looks the replication problems are not fixed in 3.1.2b20,
Some session attributes are getting lost, seemingly being overwritten
by another node in the cluster with older data.
The TimeoutExceptinos and slow performance are fixed though.

I opened another issue regarding this:
http://java.net/jira/browse/GLASSFISH-18322





[GLASSFISH-17480] Improve domain.xml attributes docs: upload-timeout-millis, max-post-size Created: 25/Oct/11  Updated: 10/Jan/12  Resolved: 10/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.1
Fix Version/s: 3.1.2_b17

Type: Improvement Priority: Major
Reporter: oleksiys Assignee: Mike Fitch
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

max-post-size:
<http max-post-size="...">
add note this limit is applicable to application/x-www-form-urlencoded only.

upload-timeout-millis:
Improve description to make definition clearer.

On mailing list I wrote this:
"It's max milliseconds we wait when trying to read next chunk of uploading data. If you send at least 1 byte each (upload-timeout-millis - 1) - you're fine."

Probably we need to rephrase it



 Comments   
Comment by Paul Davies [ 25/Oct/11 ]

For more information, see the forum thread Unclear definitions of HTTP listener settings

Comment by oleksiys [ 27/Oct/11 ]

for the request-timeout-seconds attribute, we have to mention that value "-1" means disable timeout.

Comment by Anissa Lam [ 01/Nov/11 ]

When fixing http://java.net/jira/browse/GLASSFISH-17539, I have added that -1 means disabling it. so, the inline-help for the few timeout attributes has been modified.
However, please ensure other doc, eg. OLH has this covered.

Comment by Mike Fitch [ 10/Jan/12 ]

Updated help page as per issue, plus added info about the 3 options for which -1 means "disable".

Committed in rev 51972.

Comment by Mike Fitch [ 10/Jan/12 ]

Setting "Fix Version" to 3.1.2_b17





[GLASSFISH-17468] WebappClassLoader leak after undeployment Created: 25/Oct/11  Updated: 06/Jan/12  Resolved: 06/Jan/12

Status: Resolved
Project: glassfish
Component/s: web_services
Affects Version/s: None
Fix Version/s: 3.1.2_b17, 4.0

Type: Bug Priority: Major
Reporter: Shing Wai Chan Assignee: Lukas Jungmann
Resolution: Fixed Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File test.war     PNG File webappclassloader.png    
Tags: 3_1_2-approved

 Description   

If one use a deploy a war with annotation, access it and undeploy, then the WebappClassLoader is still in memory. This is because the "deployment-jar-scanner" thread is still referencing the WebappClassLoader as context class loader.

I confirm that the issue is gone if I do the following:
Index: src/main/java/com/sun/enterprise/v3/server/ApplicationLifecycle.java
===================================================================
— src/main/java/com/sun/enterprise/v3/server/ApplicationLifecycle.java (revision 50397)
+++ src/main/java/com/sun/enterprise/v3/server/ApplicationLifecycle.java (working copy)
@@ -2166,6 +2166,7 @@
Thread t = new Thread(r);
t.setName("deployment-jar-scanner");
t.setDaemon(true);
+ t.setContextClassLoader(null);
return t;
}
});

I also notice that the corresponding code in ApplicationLifecycle was invoked twice.
First and second invocation has context classloader URLClassLoader and WebappClassLoader respectively.

The stack traces are as follows:
(1) at java.lang.Thread.dumpStack(Thread.java:1273)
at com.sun.enterprise.v3.server.ApplicationLifecycle$4.newThread(ApplicationLifecycle.java:2169)
at java.util.concurrent.ThreadPoolExecutor.addThread(ThreadPoolExecutor.java:672)
at java.util.concurrent.ThreadPoolExecutor.addIfUnderCorePoolSize(ThreadPoolExecutor.java:697)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:652)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:92)
at org.glassfish.hk2.classmodel.reflect.Parser.parse(Parser.java:296)
at com.sun.enterprise.v3.server.ApplicationLifecycle.getDeployableTypes(ApplicationLifecycle.java:509)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:351)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:459)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:680)

(2) at java.lang.Thread.dumpStack(Thread.java:1273)
at com.sun.enterprise.v3.server.ApplicationLifecycle$4.newThread(ApplicationLifecycle.java:2169)
at java.util.concurrent.ThreadPoolExecutor.addThread(ThreadPoolExecutor.java:672)
at java.util.concurrent.ThreadPoolExecutor.addIfUnderCorePoolSize(ThreadPoolExecutor.java:697)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:652)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:92)
at org.glassfish.hk2.classmodel.reflect.Parser.parse(Parser.java:296)
at org.glassfish.hk2.classmodel.reflect.Parser.parse(Parser.java:243)
at com.sun.enterprise.deployment.annotation.impl.ModuleScanner.addScanDirectory(ModuleScanner.java:326)
at com.sun.enterprise.deployment.annotation.impl.WarScanner.process(WarScanner.java:149)
at com.sun.enterprise.deployment.annotation.impl.WarScanner.process(WarScanner.java:72)
at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:563)
at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:445)
at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:432)
at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:408)
at com.sun.enterprise.deployment.archivist.Archivist.openWith(Archivist.java:267)
at com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:240)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:175)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:94)
at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:828)
at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:770)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:368)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:459)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:680)



 Comments   
Comment by Hong Zhang [ 25/Oct/11 ]

I am investigating now why stack trace #2 happens and whether we could eliminate it. I think we should only do the scanning once now in ALC#getDeployableTypes, will confirm with Jerome.

Comment by Hong Zhang [ 28/Oct/11 ]

Further investigation showed the DOL need to scan annotations when it's not from the normal deployment code path (like when the connector code load the connector system application). Now the DOL code wil only scan annotation when it's not previously processed. Also set the system classloader as the context classloader of the scanning thread so the thread will not inherit its parent thread's context classloader by accident which might cause memory leak.

Comment by Cheng Fang [ 03/Nov/11 ]

With 3.1.2 build (rev 50642, 11/3), still see 1 instance of WebAppClassLoader and WebAppClassLoader$1 in memory after deploy, undeploy and GC.

Comment by Cheng Fang [ 03/Nov/11 ]

In visualvm heap dump, the GC root points to org/apache/catalina/core/ContainerBase$ContainerBackgroundProcessor

Comment by Hong Zhang [ 03/Nov/11 ]

If the GC root points to org/apache/catalina/core/ContainerBase$ContainerBackgroundProcessor, it's probably a different issue than the original issue. I will let Shingwai investigate that. Can you attach the application you used?

Comment by Cheng Fang [ 03/Nov/11 ]

a simple test war attached (servlet and ejb) that I used to see the remaining instance of WebAppClassLoader.

Comment by Shing Wai Chan [ 29/Nov/11 ]

The WebappClassLoader mentioned above is from default web module.
If one use visual vm, in fact, we can see that there are two more WebappClassLoader.
One of them is associated to _timer of EjbContainerUtilImpl.
The other seems to be from deployment side.

Assign to ejb container team to investigate the _timer issue first.
If this one is resolved and the second one still persists, then deployment team may like to look at the second one.

Comment by Cheng Fang [ 14/Dec/11 ]

avoid starting JDK timer in application class loader. The life of _timer field is longer than deployed apps, and any reference to app class loader in JDK timer thread will cause class loader leak.

Comment by Cheng Fang [ 14/Dec/11 ]
  • What is the impact on the customer of the bug?

Moderate. Customers are experiencing memory leak as a result.

  • How likely is it that a customer will see the bug and how serious is the bug?
    Customers are more likely to see the bug if their app is big, or they look carefully. Memory leak may build up and cause bigger problem. Also exposing app classloader outside its application is not appropriate.
  • Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)?

Not regression, but related to performance and security.

  • What is the cost/risk of fixing the bug?
    How risky is the fix? How much work is the fix? Is the fix complicated?

Low risk. Fix is not complicated (need to adjust context class loader in EjbContainerUtilImpl class). About 1 day work.

  • Is there an impact on documentation or message strings?

No.

  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?

Regular QA tests. I will run quicklook tests and ejb devtests.

  • Which is the targeted build of 3.1.2 for this fix?
    b15
Comment by bebbo [ 14/Dec/11 ]

There are way more references to undeployed applications. Some of them are WeakHashMaps or so, but this also fills the memory up if the key is referenced somehow.

=== references

  • many threads (not only the Keepalive) are still having a reference to on of the undeployed class loaders
  • javax.security.auth.login.Configuration: contextClassLoader
  • org.apache.catalina.startup.ContextConfig: contextDigester -> errorHandler

=== maybe refs or weak (dunno)

  • org.glassfish.webservices.JAXWSServletModule: modules -> values() -> endpoints -> endpoint -> seiModel -> jaxbContext -> beanInfoMap -> properties -> acc -> getClass().getClassLoader()
  • javax.naming.spi.NamingManager -> initctx_factory_builder -> sc -> habitat -> byType -> store -> values() -> real -> object -> endpoint -> webComponentImpl -> webBundleDescriptor -> classLoader
  • javax.naming.spi.NamingManager -> initctx_factory_builder -> sc -> habitat -> byType -> store -> values() -> real -> object -> apps -> appClassLoader
  • javax.naming.spi.NamingManager -> initctx_factory_builder -> sc -> habitat -> byType -> store -> values() -> real -> object -> apps -> modules -> moduleClassLoader
  • javax.naming.spi.NamingManager -> initctx_factory_builder -> sc -> habitat -> byType -> store -> values() -> real -> object -> apps -> modules -> moduleClassLoader -> engines -> appCtr -> ejbAppClassLoader
  • com.sun.corba.ee.impl.orbutil.copyobject.ClassCopierOrdinaryImpl -> classToClassFieldCopier
  • com.sun.corba.ee.impl.orbutil.copyobject.ObjectCopierImpl -> ccf -> factoryCache -> cache -> values() -> classFieldCopier -> myClass.getClassLoader()
  • com.sun.jaspic.config.factory.BaseAuthConfigFactory -> provider2IdsMap -> keySet() -> serverConfigMap -> values() -> callbackHandler -> handler -> handlerContext -> this$0 -> seiModel -> jaxbContext -> classes -> getClassLoader()
  • some Threads -> currentWork -> orb -> transportManager -> selector -> contextClassLoader
  • some Threads -> currentWork -> orb -> mom -> tree -> objectNameMap -> mediator -> activeObjectMap -> servantToEntry -> bindingMap -> theObjectRef.getClass().getClassLoader()
  • some Threads -> currentWork -> orb -> mom -> tree -> objectNameMap -> mediator -> loacator -> appClassLoader

===weak stuff:

  • many threads are having references in its thread local maps
  • java.lang.reflect.Proxy: loaderToCache and proxyClasses
  • com.sun.naming.internal.ResourceManager: propertiesCache
  • com.sun.corba.ee.spi.orb.ORB: globalPM -> classToClassData -> map

... I wrote some code which nulls lotta stuff (see above) in contextDestroyed() of a ContextListener:

  • if you deploy undeploy the app the memory is released
  • if you deploy and really use the app, then undeploy, still some memory is kept
Comment by shreedhar_ganapathy [ 15/Dec/11 ]

The log shows the following in the first stack trace - So reassigning to ORB team for first pass evaluation.

Caused by: java.lang.NullPointerException
at com.sun.logging.LogDomains$1.initResourceBundle(LogDomains.java:429)
at com.sun.logging.LogDomains$1.<init>(LogDomains.java:356)
at com.sun.logging.LogDomains.getLogger(LogDomains.java:353)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.<clinit>(GlassFishORBHelper.java:85)

Comment by shreedhar_ganapathy [ 15/Dec/11 ]

Sorry wrong issue marked. Reverting to original assignment.

Comment by Cheng Fang [ 16/Dec/11 ]

Committed revision 51606. to trunk containers/EjbContainerUtilImpl.java

Comment by Cheng Fang [ 16/Dec/11 ]

Committed revision 51607. to 3.1.2 branch containers/EjbContainerUtilImpl.java

With these fix, there should be only 1 WebappClassLoader instance in memory(which belongs to the default web app), after multiple deploy/undeploy. The WebappClassLoader leaking has been fixed.

Assign to Shing Wai to evaluate other improvements.

Comment by syvalta [ 20/Dec/11 ]

I can confirm that "org.glassfish.webservices.JAXWSServletModule: modules" cause reference to undeployed application and thus prevent proper GC:

--> class org.glassfish.webservices.JAXWSServletModule (84 bytes) (static field modules)
--> java.util.Hashtable@0x963a6220 (40 bytes) (field table)
--> [Ljava.util.Hashtable$Entry;@0x963ae4d8 (52 bytes) (Element 4 of [Ljava.util.Hashtable$Entry;@0x963ae4d8)
--> java.util.Hashtable$Entry@0x98705e40 (24 bytes) (field value)
--> org.glassfish.webservices.JAXWSServletModule@0x9870d440 (16 bytes) (field endpoints)
--> java.util.Hashtable@0x98715708 (40 bytes) (field table)
--> [Ljava.util.Hashtable$Entry;@0x98718ef8 (52 bytes) (Element 3 of [Ljava.util.Hashtable$Entry;@0x98718ef8)
--> java.util.Hashtable$Entry@0x9871cae8 (24 bytes) (field value)
--> com.sun.xml.ws.transport.http.servlet.ServletAdapter@0x988c9c88 (42 bytes) (field endpoint)
--> com.sun.xml.ws.server.WSEndpointImpl@0x988e4740 (90 bytes) (field implementationClass)
--> class test.TestWebService (84 bytes) (??)
--> org.glassfish.web.loader.WebappClassLoader@0x987ccdd0 (164 bytes)

From a comment in the code it is also clear that reference is not cleared:
//Map of uri->BoundEndpoint used to implement getBoundEndpoint. Map is rather
//than Set, so that when a new endpoint is redeployed at a given uri, the old
//endpoint will be replaced by the new endpoint. The values() method of the
//field is returned by <code>getBoundEndpoints</code>.
private final Hashtable<String, BoundEndpoint> endpoints = new Hashtable<String, BoundEndpoint>();

Comment by Shing Wai Chan [ 20/Dec/11 ]

According to the comment above, it seems that there is similar issue in JAXWS.
Assign to web service for further investigation.

Comment by Bhakti Mehta [ 20/Dec/11 ]

Reassigning to Lukas from the webservices team

Comment by Lukas Jungmann [ 02/Jan/12 ]

corrected fixfor version

Comment by Lukas Jungmann [ 04/Jan/12 ]

fixed in trunk/4.0 - revision 51881. Can I ask someone for verification, please? Thanks!

Comment by Martin Grebac [ 06/Jan/12 ]

Lukas, would you please attach the fix diff here and follow the GF process and request 3.1.2 fix integration? Thanks.

Comment by Lukas Jungmann [ 06/Jan/12 ]

fix diff: http://java.net/projects/glassfish/sources/svn/revision/51881

license header update: http://java.net/projects/glassfish/sources/svn/revision/51899

Comment by Lukas Jungmann [ 06/Jan/12 ]

fixed also in 3.1.2 branch:

lukas@lucas-ubuntu:/space/sources/glassfish/3.1.2/webservices/jsr109-impl$ svn ci -m "GLASSFISH-17468: WebappClassLoader leak after undeployment"
Sending jsr109-impl/src/main/java/org/glassfish/webservices/JAXWSServletModule.java
Transmitting file data .
Committed revision 51933.





[GLASSFISH-17462] Lack of ssl.json and file-cache option for Network Config Created: 24/Oct/11  Updated: 08/Feb/12  Due: 24/Oct/11  Resolved: 10/Jan/12

Status: Closed
Project: glassfish
Component/s: admin_gui
Affects Version/s: 3.1.2_b06
Fix Version/s: 3.1.2_b17

Type: Bug Priority: Minor
Reporter: li.wu Assignee: srinik76
Resolution: Fixed Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified
Environment:

Bundle:java_ee_sdk-6u4-b06-jdk-linux-ml.sh
OS: OEL6 32bit
Browser: Firefox3.6 IE8
locale: en_US


Attachments: JPEG File admin_listener_filecache.jpg     JPEG File admin_listener_http.jpg     JPEG File admin_listener_ssl2.jpg     JPEG File general_tab_only.jpg     JPEG File network_config_protocol_error.jpg     Text File server.log    
Issue Links:
Dependency
depends on GLASSFISH-18111 create-ssl fails for protocol admin-l... Resolved
Duplicate
is duplicated by GLASSFISH-17893 Error thrown in console when admin-li... Resolved
Sub-Tasks:
Key
Summary
Type
Status
Assignee
GLASSFISH-17820 OLH: attribute field changes in netw... Sub-task Resolved Rebecca Parks  
Tags: 3_1_2-approved

 Description   

1. Install the bundle;
2. Logon Admin Console;
3. Click Configurations>default-config>Network Config>Network Listeners>admin listener, and click HTTP tab. NullPointerException occurs. Click File Cache tab, "An error has occurred-OPTIONS http://localhost:4848/management/domain/configs/config/default-config/network-config/protocols/protocol/pu-protocol/http/file-cache returned a response status of 404 Not Found".
4. Click Configurations>default-config>Network Config>Protocols>admin-http-redirect, and click HTTP tab. NullPointerException occurs as above. Click File Cache tab, same error occurs as above.
5. Click Configurations>default-config>Network Config>Protocols>pu-protocol, and click HTTP tab. NullPointerException occurs as above. Click File Cache tab, same error occurs as above.
6. Click Configurations>default-config>Network Config>Protocols>admin-listener, and click SSL tab,"An error has occurred-REST Request 'http://localhost:4848/management/domain/configs/config/default-config/network-config/protocols/protocol/admin-listener/ssl.json' failed with response code '404'".

I checked the generated files of domain1, there is no ssl.json. Also I got server.log which recorded NullPointerException.



 Comments   
Comment by srinik76 [ 14/Dec/11 ]
  • What is the impact on the customer of the bug?
    How likely is it that a customer will see the bug and how serious is the bug?
    Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)?

In console when user select default-config, network config and protocols ssl and file handler pages will fail.
Not a regression. When customer selects the page under default-config->network-config and protocols, some of the pages will throw exceptions which is very serious

  • What is the cost/risk of fixing the bug?
    How risky is the fix? How much work is the fix? Is the fix complicated?

Fix not complicated. straight forward fix, fix discussed with tim quinn.

  • Is there an impact on documentation or message strings?
    No.
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
    Manual testing
  • Which is the targeted build of 3.1.2 for this fix?
    3.1.2_b15
Comment by srinik76 [ 16/Dec/11 ]

Index: common/src/main/java/org/glassfish/admingui/common/handlers/WebAppHandlers.java
===================================================================
— common/src/main/java/org/glassfish/admingui/common/handlers/WebAppHandlers.java (revision 51338)
+++ common/src/main/java/org/glassfish/admingui/common/handlers/WebAppHandlers.java (working copy)
@@ -53,8 +53,10 @@
package org.glassfish.admingui.common.handlers;

import com.sun.jsftemplating.annotation.HandlerInput;
+import com.sun.jsftemplating.annotation.HandlerOutput;
import com.sun.jsftemplating.annotation.Handler;
import com.sun.jsftemplating.layout.descriptors.handler.HandlerContext;
+import com.sun.enterprise.config.serverbeans.ServerTags;

import java.net.URLEncoder;
import java.util.ArrayList;
@@ -176,4 +178,52 @@
}
}

+ @Handler(id="gf.getProtocols",
+ input=

{ + @HandlerInput(name="configName", type=String.class, required=true) + },
+ output={ + @HandlerOutput(name = "result", type = java.util.List.class) + })
+ public static void getProtocols(HandlerContext handlerCtx) {
+ String configName = (String) handlerCtx.getInputValue("configName");
+ String endpoint = GuiUtil.getSessionValue("REST_URL") + "/configs/config/" + configName + "/network-config/protocols/protocol";
+ List<Map> result = new ArrayList<Map>();
+ try {
+ List<Map> childElements = (List<Map>) RestUtil.buildChildEntityList(endpoint, "", null, null, "name");
+ for (Map m: childElements) {
+ String name = (String) m.get("name");
+ if (!(name.equals(ServerTags.PORT_UNIF_PROTOCOL_NAME) || name.equals(ServerTags.REDIRECT_PROTOCOL_NAME))) { + result.add(m); + }
+ }
+ handlerCtx.setOutputValue("result", result);
+ } catch (Exception ex) { + GuiUtil.handleException(handlerCtx, ex); + }
+ }
+ @Handler(id="gf.getNetworkListeners",
+ input={ + @HandlerInput(name="configName", type=String.class, required=true) + }

,
+ output=

{ + @HandlerOutput(name = "result", type = java.util.List.class) + }

)
+ public static void getNetworkListeners(HandlerContext handlerCtx) {
+ String configName = (String) handlerCtx.getInputValue("configName");
+ String endpoint = GuiUtil.getSessionValue("REST_URL") + "/configs/config/" + configName + "/network-config/network-listeners/network-listener";
+ try {
+ List<Map> childElements = (List<Map>) RestUtil.buildChildEntityList(endpoint, "", null, null, "name");
+ for (Map m: childElements) {
+ String name = (String) m.get("protocol");
+ if (name.equals(ServerTags.PORT_UNIF_PROTOCOL_NAME))

{ + m.put("protocol", ServerTags.SEC_ADMIN_LISTENER_PROTOCOL_NAME); + }

+ }
+ handlerCtx.setOutputValue("result", childElements);
+ } catch (Exception ex)

{ + GuiUtil.handleException(handlerCtx, ex); + }

+ }
}

Index: common/src/main/java/org/glassfish/admingui/common/handlers/CommonHandlers.java
===================================================================
— common/src/main/java/org/glassfish/admingui/common/handlers/CommonHandlers.java (revision 51338)
+++ common/src/main/java/org/glassfish/admingui/common/handlers/CommonHandlers.java (working copy)
@@ -49,6 +49,7 @@

package org.glassfish.admingui.common.handlers;

+import com.sun.enterprise.config.serverbeans.ServerTags;
import com.sun.jsftemplating.annotation.Handler;
import com.sun.jsftemplating.annotation.HandlerInput;
import com.sun.jsftemplating.annotation.HandlerOutput;
@@ -68,12 +69,15 @@
import java.util.logging.Level;
import java.util.logging.Logger;
import java.text.SimpleDateFormat;
+import java.util.ArrayList;

import javax.faces.component.UIComponent;
import javax.faces.component.UIInput;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
+import javax.management.ObjectName;
import javax.servlet.http.HttpServletResponse;
+import org.glassfish.admingui.common.tree.FilterTreeEvent;

import org.glassfish.admingui.common.util.GuiUtil;
import org.glassfish.admingui.common.util.MiscUtil;
@@ -709,7 +713,28 @@
Boolean isAIX = AIX.equalsIgnoreCase(System.getProperty("os.name"));
handlerCtx.setOutputValue("result", isAIX);
}
+
+ /**
+ * <p> This handler filters out not required protocols from the list of protocols available
+ */
+ @Handler( id="filterProtocols")
+ public static List filterProtocols(HandlerContext context) {
+ FilterTreeEvent event = (FilterTreeEvent) context.getEventObject();
+ List protocols = event.getChildObjects();
+ ArrayList result = new ArrayList();
+
+ if(protocols != null && protocols.size() > 0){
+ for (int i=0; i < protocols.size(); i++){
+ String protocol = (String) protocols.get;
+ if (!(protocol.equals(ServerTags.PORT_UNIF_PROTOCOL_NAME) || protocol.equals(ServerTags.REDIRECT_PROTOCOL_NAME)))

{ + result.add(protocol); + }

+ }
+ }
+ return result;
+ }

+

Index: web/src/main/resources/grizzly/pluginTreeNodeGrizzly.jsf
===================================================================
— web/src/main/resources/grizzly/pluginTreeNodeGrizzly.jsf (revision 51248)
+++ web/src/main/resources/grizzly/pluginTreeNodeGrizzly.jsf (working copy)
@@ -78,6 +78,7 @@
<!facet image>
<sun:iconHyperlink id="treeIcon" icon="TREE_FOLDER" url="/web/grizzly/protocols.jsf?configName=$

{configName}" border="0" immediate="true" alt="$resource{i18n_web.tree.grizzly.protocols}"/>
</facet>
+ <!filterTree filterProtocols() />
</dynamicTreeNode>

<dynamicTreeNode id="transports"
Index: web/src/main/resources/grizzly/networkListeners.jsf
===================================================================
— web/src/main/resources/grizzly/networkListeners.jsf (revision 51248)
+++ web/src/main/resources/grizzly/networkListeners.jsf (working copy)
@@ -110,7 +110,7 @@
setPageSessionAttribute(key="selfUrl", value="#{pageSession.parentUrl}/#{pageSession.childType}");
setPageSessionAttribute(key="rest-api" value="true");

- gf.getChildList(parentEndpoint="#{pageSession.parentUrl}", childType="#{pageSession.childType}", result="#{requestScope.listOfRows}");
+ gf.getNetworkListeners(configName="#{pageSession.configName}", result="#{requestScope.listOfRows}");
createMap(result="#{pageSession.valueMap}");
mapPut(map="#{pageSession.valueMap}" key="target" value="#{pageSession.configName}");
setPageSessionAttribute(key="confirmDeleteMsg" value="$resource{i18n_web.msg.JS.confirmDeleteNL}");
Index: web/src/main/resources/grizzly/protocols.jsf
===================================================================
— web/src/main/resources/grizzly/protocols.jsf (revision 51248)
+++ web/src/main/resources/grizzly/protocols.jsf (working copy)
@@ -99,7 +99,7 @@
setPageSessionAttribute(key="rest-api" value="true");
setPageSessionAttribute(key="networkListenerUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/network-listeners/network-listener");
gf.getChildrenNamesList(endpoint="#{pageSession.networkListenerUrl}", id="name", result="#{pageSession.networkListeners}");
- gf.getChildList(parentEndpoint="#{pageSession.selfUrl}", childType="#{pageSession.childType}", result="#{requestScope.listOfRows}");
+ gf.getProtocols(configName="#{pageSession.configName}", result="#{requestScope.listOfRows}");
foreach (var="protocol" list="#{requestScope.listOfRows}") {
createList(size="0" result="#{pageSession.listenerList}");
foreach (var="listener" list="#{pageSession.networkListeners}") {
Index: web/src/main/resources/grizzly/networkListenerEdit.jsf
===================================================================
— web/src/main/resources/grizzly/networkListenerEdit.jsf (revision 51541)
+++ web/src/main/resources/grizzly/networkListenerEdit.jsf (working copy)
@@ -65,9 +65,11 @@
setPageSessionAttribute(key="selfUrl", value="#{pageSession.parentUrl}/#{pageSession.childType}/#{pageSession.Name}");
setPageSessionAttribute(key="rest-api" value="true");
gf.getEntityAttrs(endpoint="#{pageSession.selfUrl}", valueMap="#{pageSession.valueMap}");
-
+ setPageSessionAttribute(key="protocolName" value="#{pageSession.valueMap['protocol']}");
+ if ("#{pageSession.valueMap['protocol']}=$constant{com.sun.enterprise.config.serverbeans.ServerTags.PORT_UNIF_PROTOCOL_NAME}"){
+ setPageSessionAttribute(key="protocolName" value="$constant{com.sun.enterprise.config.serverbeans.ServerTags.SEC_ADMIN_LISTENER_PROTOCOL_NAME}");
+ }
setPageSessionAttribute(key="convertToFalseList" value={"enabled", "jkEnabled"});
- setPageSessionAttribute(key="protocolName" value="#{pageSession.valueMap['protocol']}")
urlencode(value="#{pageSession.protocolName}" encoding="UTF-8" result="#{pageSession.encodedProtocolName}");
setPageSessionAttribute(key="parentUrl2", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/protocols");
setPageSessionAttribute(key="childType2" value="protocol");
@@ -128,7 +130,7 @@

<sun:property id="protocol" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n_web.grizzly.networkListener.protocol}" >
//<sun:staticText id="protocol" text="#{pageSession.valueMap['protocol']}" />
- <sun:hyperlink id="protocol" text="#{pageSession.valueMap['protocol']}" url="#{request.contextPath}/web/grizzly/protocolEdit.jsf?name=#{pageSession.valueMap['protocol']}&configName=#{configName}

" />
+ <sun:hyperlink id="protocol" text="#

{pageSession.protocolName}" url="#{request.contextPath}/web/grizzly/protocolEdit.jsf?name=#{pageSession.protocolName}

&configName=#

{configName}" />
</sun:property>

<sun:property id="http-protocol" rendered="#{pageSession.showHttp}" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="HTTP Protocol: " >
@@ -137,7 +139,7 @@
gf.restRequest(endpoint="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/network-listeners/network-listener/#{pageSession.Name}/find-http-protocol.json" method="get" result="#{pageSession.httpProtocol}");
setPageSessionAttribute(key="httpProtocolName" value="#{pageSession.httpProtocol.data.properties.protocol}");
setPageSessionAttribute(key="sameAsProtocol" value="#{false}");
- if ("#{pageSession.httpProtocolName}=#{pageSession.valueMap['protocol']}")
+ if ("#{pageSession.httpProtocolName}=#{pageSession.protocolName}")
setPageSessionAttribute(key="sameAsProtocol" value="#{true}");
if(! #{pageSession.sameAsProtocol}){
setPageSessionAttribute(key="showHttp" value="#{true}")

Index: web/src/main/resources/grizzly/networkListenerEdit.jsf
===================================================================
— web/src/main/resources/grizzly/networkListenerEdit.jsf (revision 51541)
+++ web/src/main/resources/grizzly/networkListenerEdit.jsf (working copy)
@@ -65,9 +65,11 @@
setPageSessionAttribute(key="selfUrl", value="#{pageSession.parentUrl}/#{pageSession.childType}/#{pageSession.Name}");
setPageSessionAttribute(key="rest-api" value="true");
gf.getEntityAttrs(endpoint="#{pageSession.selfUrl}", valueMap="#{pageSession.valueMap}");
-
+ setPageSessionAttribute(key="protocolName" value="#{pageSession.valueMap['protocol']}");
+ if ("#{pageSession.valueMap['protocol']}=$constant{com.sun.enterprise.config.serverbeans.ServerTags.PORT_UNIF_PROTOCOL_NAME}"){
+ setPageSessionAttribute(key="protocolName" value="$constant{com.sun.enterprise.config.serverbeans.ServerTags.SEC_ADMIN_LISTENER_PROTOCOL_NAME}");
+ }
setPageSessionAttribute(key="convertToFalseList" value={"enabled", "jkEnabled"});
- setPageSessionAttribute(key="protocolName" value="#{pageSession.valueMap['protocol']}")
urlencode(value="#{pageSession.protocolName}" encoding="UTF-8" result="#{pageSession.encodedProtocolName}");
setPageSessionAttribute(key="parentUrl2", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/protocols");
setPageSessionAttribute(key="childType2" value="protocol");
@@ -128,7 +130,7 @@

<sun:property id="protocol" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n_web.grizzly.networkListener.protocol}" >
//<sun:staticText id="protocol" text="#{pageSession.valueMap['protocol']}" />
- <sun:hyperlink id="protocol" text="#{pageSession.valueMap['protocol']}" url="#{request.contextPath}/web/grizzly/protocolEdit.jsf?name=#{pageSession.valueMap['protocol']}&configName=#{configName}

" />
+ <sun:hyperlink id="protocol" text="#

{pageSession.protocolName}" url="#{request.contextPath}/web/grizzly/protocolEdit.jsf?name=#{pageSession.protocolName}

&configName=#

{configName}

" />
</sun:property>

<sun:property id="http-protocol" rendered="#

{pageSession.showHttp}

" labelAlign="left" noWrap="#

{true}" overlapLabel="#{false}" label="HTTP Protocol: " >
@@ -137,7 +139,7 @@
gf.restRequest(endpoint="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/network-listeners/network-listener/#{pageSession.Name}/find-http-protocol.json" method="get" result="#{pageSession.httpProtocol}");
setPageSessionAttribute(key="httpProtocolName" value="#{pageSession.httpProtocol.data.properties.protocol}");
setPageSessionAttribute(key="sameAsProtocol" value="#{false}");
- if ("#{pageSession.httpProtocolName}=#{pageSession.valueMap['protocol']}")
+ if ("#{pageSession.httpProtocolName}=#{pageSession.protocolName}")
setPageSessionAttribute(key="sameAsProtocol" value="#{true}

");
if(! #

{pageSession.sameAsProtocol}

){
setPageSessionAttribute(key="showHttp" value="#

{true}

")

Comment by srinik76 [ 16/Dec/11 ]

Checked in the changes into 3.1.2

Sending common/src/main/java/org/glassfish/admingui/common/handlers/CommonHandlers.java
Sending common/src/main/java/org/glassfish/admingui/common/handlers/WebAppHandlers.java
Sending web/src/main/resources/grizzly/networkListenerEdit.jsf
Sending web/src/main/resources/grizzly/networkListeners.jsf
Sending web/src/main/resources/grizzly/pluginTreeNodeGrizzly.jsf
Sending web/src/main/resources/grizzly/protocols.jsf
Transmitting file data ......
Committed revision 51609.

Comment by srinik76 [ 16/Dec/11 ]

Checked in the changes to trunk

Sending admingui/common/src/main/java/org/glassfish/admingui/common/handlers/CommonHandlers.java
Sending admingui/common/src/main/java/org/glassfish/admingui/common/handlers/WebAppHandlers.java
Sending admingui/web/src/main/resources/grizzly/networkListenerEdit.jsf
Sending admingui/web/src/main/resources/grizzly/networkListeners.jsf
Sending admingui/web/src/main/resources/grizzly/pluginTreeNodeGrizzly.jsf
Sending admingui/web/src/main/resources/grizzly/protocols.jsf
Transmitting file data ......
Committed revision 51613.

Comment by li.wu [ 31/Dec/11 ]

"REST Request 'https://localhost:4848/management/domain/configs/config/default-config/network-config/protocols/protocol/admin-listener/ssl.json' failed with response code '404'." occurs in b16 (java_ee_sdk-6u4-b16-windows-ml.exe). Steps to reproduce:
1. Install the bundle on windows7;
2. Login admin console;
3. Click default-config ---> Network config ---> Protocols ---> admin listener, and switch to SSL tab, the error occurs again. Pls check picture attached.
4. Check default-config ---> Network config ---> Network Listeners --->admin listener, there is only General tab, without SSL,HTTP,File Cache tabs.

Comment by Anissa Lam [ 31/Dec/11 ]

I am seeing the step#3 error, ie, the SSL tab error for "admin-listener" protocol. We should not show 404 error on screen. However, "admin-listener" protocol really wasn't used at all by anything. User should be editing "sec-admin-listener" which is the protocol really used by "admin-listener" Network Listener.

I am not seeing step#4 error. There are all the tabs there for "admin-listener" Netwok Listener.

I do notice another issue though. There is no Save button on the Edit Protocol General page. Srini, please add this button back.

Comment by li.wu [ 31/Dec/11 ]

There is general tab only for "admin-listener" Netwok Listeners.

Comment by srinik76 [ 02/Jan/12 ]

Step # 3 error able to reproduce, found it is because of back end error. Raised a issue 18111 and linked to this.

Step # 4 error not able to reproduce in my latest workspace as anissa sees.

I will introduce save button on edit protocol general page for configs other than sever-config.

The fix is attached to the issue

Index: protocolEdit.jsf
===================================================================
— protocolEdit.jsf (revision 51846)
+++ protocolEdit.jsf (working copy)
@@ -107,6 +107,17 @@
<sun:title id="propertyContentPage" title="$resource

{i18n_web.grizzly.protocolEditPageTitle}

" helpText="$resource

{i18n_web.grizzly.protocolEditPageTitleHelp}

">
<!facet pageButtonsTop>
<sun:panelGroup id="topButtons">
+ <sun:button id="saveButton" disabled="#

{disableSaveButton}

" text="$resource

{i18n.button.Save}

"
+ onClick="if (guiValidate('#

{reqMsg}

','#

{reqInt}

','#

{reqPort}

')) {submitAndDisable(this, '$resource

{i18n.button.Processing}

');}; return false;" >
+ <!command
+ prepareSuccessfulMsg();
+ gf.createEntity(endpoint="#

{pageSession.selfUrl}

"
+ attrs="#

{pageSession.valueMap}

"
+ convertToFalse="#

{pageSession.convertToFalseList}

"
+ );
+ gf.redirect(page="#

{pageSession.selfPage}

&alertType=$

{alertType}

&alertSummary=$

{alertSummary}

&alertDetail=$

{alertDetail}

");
+ />
+ </sun:button>
<sun:button id="cancelButton" immediate="#

{true}

" primary="#

{false}

" rendered="#

{pageSession.showCancelButton}

" text="$resource

{i18n.button.Cancel}

" >
<!command
gf.redirect(page="#

{parentPage}

?configName=#

{configName}

");

Comment by srinik76 [ 02/Jan/12 ]
  • What is the impact on the customer of the bug?
    How likely is it that a customer will see the bug and how serious is the bug?
    Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)?

When the user selects SSL tab under admin-listener protocol in default-config or configs copied from default-config.
Also Save Button for protocol general page needs to be reinserted.

  • What is the cost/risk of fixing the bug?
    How risky is the fix? How much work is the fix? Is the fix complicated?

There are 2 fixes. 1 fix depends on security back end issue 18111 and introducing save button is simple fix.

  • Is there an impact on documentation or message strings?
    No.
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
    Manual testing
  • Which is the targeted build of 3.1.2 for this fix?
    3.1.2_b17, if the dependent issue 18111 gets fixed before 3.1.2_b17
Comment by Anissa Lam [ 02/Jan/12 ]

Want to clarify this for Joe.
There are 2 issues here,
1. creating <ssl> element for "admin-listener" fails in the backend, reported as GLASSFISH-18111, thus affects GUI.
2. Missing a Save Button in Edit Protocol page. We should fix that now.

My comments and questions regarding the code review:

Srini said:
>>I will introduce save button on edit protocol general page for configs other than sever-config.

and then the code change:
>> + <sun:button id="saveButton" disabled="#

{disableSaveButton}" text="$resource{i18n.button.Save}"

First, i don't see how #{disableSaveButton}

is assigned the value. If the attached code is checked in, then #

{disableSaveButton}

will be null, the button will always be enabled regardless. Doesn't match the comment.

The fix of "introduce save button on edit protocol general page for configs other than sever-config." is not correct. User need to be able to modify other protocol, eg "http-listener1" in server-config.
The fix should be

  • If the protocol name is sec-admin-listener or admin-listener, then the Save button is disabled, regardless which conifg this is.

Please change the code accordingly.
thanks.
Anissa.

Comment by srinik76 [ 03/Jan/12 ]

As per Anissa's comment changed the logic when save button and checkbox should be disabled in protocol edit page

Index: protocolEdit.jsf
===================================================================
— protocolEdit.jsf (revision 51846)
+++ protocolEdit.jsf (working copy)
@@ -71,12 +71,6 @@
setPageSessionAttribute(key="hasPropertySheet" value="#

{true}" );
setPageSessionAttribute(key="hasPropertyTable" value="#{false}" );
setSessionAttribute(key="secureCancelUrl" value="#{pageSession.selfPage}")
- setPageSessionAttribute(key="readOnly" value="#{false}" );
- if ("(#{pageSession.Name}=admin-listener)") {
- if ("(#{pageSession.configName}=server-config)") {
- setPageSessionAttribute(key="readOnly" value="#{true}

" );

  • }
  • }
    //If secure admin is enabled, we will not show the other tabs since GUI doesn't have support for handling low level grizzly config yet.
    setPageSessionAttribute(key="showSSLTab" value="# {true}");
    setPageSessionAttribute(key="showHttpTab" value="#{true}

    ");
    @@ -97,7 +91,14 @@
    setPageSessionAttribute(key="showFileCacheTab" value="#

    {false}");
    }
    }
    -
    + // If protocol is sec-admin-listener or admin-listener, then save button and security enabled checkbox is disabled
    + setPageSessionAttribute(key="readOnly" value="#{false}

    " );
    + setPageSessionAttribute(key="disableSaveButton" value="#

    {false}");
    + if (" (#{pageSession.Name}=$constant{com.sun.enterprise.config.serverbeans.ServerTags.SEC_ADMIN_LISTENER_PROTOCOL_NAME})
    + || (#{pageSession.Name}=$constant{com.sun.enterprise.config.serverbeans.ServerTags.ADMIN_LISTENER_ID})"){
    + setPageSessionAttribute(key="disableSaveButton" value="#{true}");
    + setPageSessionAttribute(key="readOnly" value="#{true}" );
    + }
    />
    </event>
    <sun:form id="propertyForm">
    @@ -107,6 +108,17 @@
    <sun:title id="propertyContentPage" title="$resource{i18n_web.grizzly.protocolEditPageTitle}" helpText="$resource{i18n_web.grizzly.protocolEditPageTitleHelp}">
    <!facet pageButtonsTop>
    <sun:panelGroup id="topButtons">
    + <sun:button id="saveButton" disabled="#{disableSaveButton}" text="$resource{i18n.button.Save}"
    + onClick="if (guiValidate('#{reqMsg}','#{reqInt}','#{reqPort}')) {submitAndDisable(this, '$resource{i18n.button.Processing}');}; return false;" >
    + <!command
    + prepareSuccessfulMsg();
    + gf.createEntity(endpoint="#{pageSession.selfUrl}"
    + attrs="#{pageSession.valueMap}"
    + convertToFalse="#{pageSession.convertToFalseList}"
    + );
    + gf.redirect(page="#{pageSession.selfPage}&alertType=${alertType}&alertSummary=${alertSummary}&alertDetail=${alertDetail}");
    + />
    + </sun:button>
    <sun:button id="cancelButton" immediate="#{true}" primary="#{false}

    " rendered="#

    {pageSession.showCancelButton}

    " text="$resource

    {i18n.button.Cancel}

    " >
    <!command
    gf.redirect(page="#

    {parentPage}

    ?configName=#

    {configName}

    ");

Comment by srinik76 [ 04/Jan/12 ]

checked into 3.1.2 branch

Sending protocolEdit.jsf
Transmitting file data .
Committed revision 51871.

Checked into trunk

Sending protocolEdit.jsf
Transmitting file data .
Committed revision 51872.

Comment by srinik76 [ 04/Jan/12 ]

Waiting for 18111 to be fixed, if back end is fixed, GUI pages should be working fine without 404 error

Comment by Anissa Lam [ 10/Jan/12 ]

The critical fix about adding the button back has been checked in.
The remaining issue depends on backend. A solution has been identified, ie adding an empty <ssl> element to the "admin-listener" protocol.
Once backend implements that, the issue will be fixed. Nothing needs to be done in the GUI side.

I will downgrade this to P4 now, and once GLASSFISH-18111 is fixed, will mark this resolved.

Comment by Anissa Lam [ 10/Jan/12 ]

GLASSFISH-18111 is excluded from 3.1.2. As there is nothing needs to be done in the console according to the suggested fix in that issue, closing this as resolved.

Comment by li.wu [ 08/Feb/12 ]

Close this bug and tracing GLASSFISH-18111 instead.





[GLASSFISH-17387] [UB]incorrect debug options in docs Created: 06/Oct/11  Updated: 09/Jan/12  Resolved: 09/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.1
Fix Version/s: 3.1.2_b17

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


 Description   

3.1.1 online docs contain some incorrect or inconsistent debug options, for example,

http://download.oracle.com/docs/cd/E18930_01/html/821-2418/gekvq.html#scrolltoc has this:

set VMARGS=-Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8118

"-Xdebug" is not needed.

Also need to use "-agentlib..." as the preferred options in all docs to specify debug options since JDK 5 or 6 is already required.



 Comments   
Comment by Rebecca Parks [ 12/Dec/11 ]

Changed -Xrunjdwp to -agentlib throughout the chapter and removed -Xdebug from the client example.





[GLASSFISH-17314] System.out.printf split into multiple lines in server.log Created: 18/Sep/11  Updated: 14/Mar/12  Resolved: 09/Jan/12

Status: Closed
Project: glassfish
Component/s: logging
Affects Version/s: 4.0
Fix Version/s: 3.1.2_b07, 3.1.2_b17, 4.0

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

Tags: 3_1_2-approved

 Description   

I have the following lines in ejb class:

System.out.printf("This is a printf in class %s%n", this);

It shows up in server.log as 2 separate lines:

[#|2011-09-17T21:03:30.437-0400|INFO|glassfish4.0|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=13;_ThreadName=Thread-2;|This is a printf in class |#]

[#|2011-09-17T21:03:30.437-0400|INFO|glassfish4.0|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=13;_ThreadName=Thread-2;|com.sun.ejb.devtest.SlessBean@4ae54c6|#]

I expect it to be 1 single line in server.log.

out.println doesn't have this problem.



 Comments   
Comment by naman_mehta [ 24/Oct/11 ]

This issue is applicable to 3.1.2 also.

Comment by naman_mehta [ 24/Oct/11 ]
  • What is the impact on the customer of the bug (is it a regression? which of the criteria does it meet?)
    No. It's just formatting of string under server.log file.
  • How likely is it that a customer will see the bug?
    If they use system.out.printf then it's often.
  • How long will it take you to implement the fix?
    1 day
  • How risky is the fix?
    No risk
  • Do regression tests exist for this issue to verify the fix?
    Attaching the sample to verify the same
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
    No QA, but attaching the sample to verify the same
  • Which is the targeted build of 3.1.2 for this fix?
    3.1.2 b08

As we have our own LoggingOutputStream but not overrided method printf exists there. So during the call off System.out.printf it's printing data in separate line.

File diff for the same:
Index: src/main/java/com/sun/common/util/logging/LoggingOutputStream.java
===================================================================
— src/main/java/com/sun/common/util/logging/LoggingOutputStream.java (revision 50341)
+++ src/main/java/com/sun/common/util/logging/LoggingOutputStream.java (working copy)
@@ -43,6 +43,8 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.PrintStream;
+import java.util.Formatter;
+import java.util.Locale;
import java.util.logging.Level;
import java.util.logging.LogManager;
import java.util.logging.Logger;
@@ -202,6 +204,15 @@
}
}

+
+ public PrintStream printf(String str, Object... args)

{ + StringBuilder sb = new StringBuilder(); + Formatter formatter = new Formatter(sb, Locale.getDefault()); + formatter.format(str,args); + print(sb.toString()); + return null; + }

+
public void print(String x) {
if (checkLocks())
super.print;

Comment by naman_mehta [ 24/Oct/11 ]

Fixed the same.

svn:50419,50420

Comment by Cheng Fang [ 04/Jan/12 ]

The following uses still suffer from the same problem:

System.out.printf(Locale, message, args);

System.out.format(message, args);

System.out.format(Locale, message, args);

Some logging output from the above statements:

[#|2012-01-04T11:38:53.173-0500|INFO|44.0|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-2;|### printf with locale in |#]

[#|2012-01-04T11:38:53.173-0500|INFO|44.0|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-2;|test.TestBean@565b6f28|#]

[#|2012-01-04T11:38:53.173-0500|INFO|44.0|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-2;|### format in |#]

[#|2012-01-04T11:38:53.174-0500|INFO|44.0|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-2;|test.TestBean@565b6f28|#]

[#|2012-01-04T11:38:53.174-0500|INFO|44.0|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-2;|### format with locale in |#]

[#|2012-01-04T11:38:53.174-0500|INFO|44.0|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-2;|test.TestBean@565b6f28|#]
Comment by naman_mehta [ 06/Jan/12 ]
  • What is the impact on the customer of the bug?
    This bug shows log messages in different lines.
  • How likely is it that a customer will see the bug and how serious is the bug?
    Not much.
  • Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)?
    No
  • What is the cost/risk of fixing the bug?
    Need to override methods in LoggingOutputStream. Attached file diff for the same.
  • How risky is the fix? How much work is the fix? Is the fix complicated?
    No impact on other modules.
  • Is there an impact on documentation or message strings?
    No
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
    It's not functionality issue just displaying message in server.log file so no need of specific test.
    String testing = "naman mehta";

System.out.printf("This is a printf in class %s%n 1.", testing);

System.out.printf(Locale.ENGLISH, "This is a printf in class %s%n 2.", testing);

System.out.format("This is a printf in class %s%n 3.", testing);

System.out.format(Locale.ENGLISH, "This is a printf in class %s%n 4.", testing);

  • Which is the targeted build of 3.1.2 for this fix?
    3.1.2 b17

Index: src/main/java/com/sun/common/util/logging/LoggingOutputStream.java
===================================================================
— src/main/java/com/sun/common/util/logging/LoggingOutputStream.java (revision 51897)
+++ src/main/java/com/sun/common/util/logging/LoggingOutputStream.java (working copy)
@@ -213,6 +213,30 @@
return null;
}

+ public PrintStream printf(Locale locale, String str, Object... args)

{ + StringBuilder sb = new StringBuilder(); + Formatter formatter = new Formatter(sb, locale); + formatter.format(str,args); + print(sb.toString()); + return null; + }

+
+ public PrintStream format(String format, Object... args)

{ + StringBuilder sb = new StringBuilder(); + Formatter formatter = new Formatter(sb, Locale.getDefault()); + formatter.format(Locale.getDefault(), format, args); + print(sb.toString()); + return null; + }

+
+ public PrintStream format(Locale locale,String format, Object... args)

{ + StringBuilder sb = new StringBuilder(); + Formatter formatter = new Formatter(sb, locale); + formatter.format(locale, format, args); + print(sb.toString()); + return null; + }

+
public void print(String x) {

Comment by naman_mehta [ 09/Jan/12 ]

Made required changes and fixed for 3.1.2 & 4.0.





[GLASSFISH-17286] [UB]wrong params for AppservPasswordLoginModule#commitUserAuthentication Created: 11/Sep/11  Updated: 09/Jan/12  Resolved: 09/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.1_b12
Fix Version/s: 3.1.2_b17

Type: Bug Priority: Trivial
Reporter: Bobby Bissett Assignee: Rebecca Parks
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

From http://download.oracle.com/docs/cd/E18930_01/html/821-2418/beabo.html#beabs

— begin —
The authenticateUser method must end with the following sequence:

String[] grpList;
// populate grpList with the set of groups to which
// _username belongs in this realm, if any
commitUserAuthentication(_username, _password,
_currentRealm, grpList);
— end —

But the actual method param is only the grpList param in the 3.1.1 (b12) code and in the JavaDocs:

http://glassfish.java.net/nonav/docs/v3/api/com/sun/appserv/security/AppservPasswordLoginModule.html#commitUserAuthentication(java.lang.String[])



 Comments   
Comment by Rebecca Parks [ 12/Dec/11 ]

Removed other params from the code sample.





[GLASSFISH-17245] Provide the online help for introspect check box in JDBC Connection pool create page 1. Created: 26/Aug/11  Updated: 10/Jan/12  Resolved: 10/Jan/12

Status: Resolved
Project: glassfish
Component/s: docs
Affects Version/s: 3.1.2_b10
Fix Version/s: 3.1.2_b17

Type: New Feature Priority: Major
Reporter: sumasri Assignee: