[GLASSFISH-17013] Significant apparent regression in ORB start-up from 2.1 to 3.1.1 Created: 11/Jul/11  Updated: 08/Feb/12

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

Type: Bug Priority: Blocker
Reporter: Tim Quinn Assignee: Harshad Vilekar
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency
blocks GLASSFISH-16543 Performance regression in JavaEE (ejb... Open
Tags: 3_1_2-exclude

 Description   

Using profiles Scott collected (with JIT turned off) for 2.1.1 and 3.1.1, I found that ORB initialization seems to show a significant regression:

Numbers are CPU seconds:

In 3.1.1:

10.527 GlassFishORBFHelper.getORB

In 2.1 is what I think is the equivalent

4.093 com.sun.enterprise.util.ORBManager.getORB

I do not have access to them right now, but IIRC other profiles with JIT turned on also showed a major regression in ORB start-up.






[GLASSFISH-17147] App client cannot find EJB behind NAT Created: 04/Aug/11  Updated: 18/Oct/12

Status: Open
Project: glassfish
Component/s: orb
Affects Version/s: 3.1, 3.1.1
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: pablopina Assignee: Harshad Vilekar
Resolution: Unresolved Votes: 7
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 11.04,
Sun JDK 6 u26,
GF 3.1, 3.1.1


Issue Links:
Related
is related to GLASSFISH-17151 EJB remote deployed on GF 3.1 behind ... Reopened
is related to GLASSFISH-17153 Appclient launched using JWS from any... Resolved
Tags: orb-review

 Description   

Attempting to launch an app client oever NAT

Public IP: 175.38.163.224
Private IP: 10.1.1.6
NAT on port 3700 of router to port 3700 of 10.1.1.6

In Domain.xml, i added

<jvm-options>-Dcom.sun.corba.ee.ORBVAAHost=175.38.163.224</jvm-options>
<jvm-options>-Dcom.sun.corba.ee.ORBVAAPort=3700</jvm-options>
<jvm-options>-Dcom.sun.corba.ee.ORBUserConfigurators.com.sun.corba.ee.impl.plugin.hwlb.VirtualAddressAgentImpl=x</jvm-options>

Behind NAT I type in the browser

http://175.38.163.224:8080/MockEar/MockEar-app-client

Java Web Start gets launched reports

java.io.FileNotFoundException: http://175.38.163.224:8080/___JWSappclient/___system/___dyn/___system_s1...

http://www.java.net/forum/topic/glassfish/glassfish/gf-311-cant-launch-app-client-behind-nat

I've tried clearing JWS cache, the java web start folder in glassfish/domains/domain1 and redeploying but nothing.

Additionally, when setting ORBVAAHost, etc the app client doesn't launch within the local network where the server is deployed.



 Comments   
Comment by pablopina [ 05/Aug/11 ]

After another night of 'research' I feel i can be a bit more specific:

I went past the JWS error:

java.io.FileNotFoundException: http://175.38.163.224:8080/___JWSappclient/___system/___dyn/___system_s1...

Now it looks like it downloads all the jars, java console starts, the main class gets loaded, I have a
static

{ System.out.println("Class loaded") }

just before
@EJB MyEJMRemote remoteEJB;

In the console, i get to see 'Class loaded'

but then it doesn't go past there.... I've been waiting for over 10 minutes and it doesn't report error message

Comment by pablopina [ 27/Sep/11 ]

Tim,

Will this sove the issue?

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

Comment by Tim Quinn [ 27/Sep/11 ]

It's possible that the changes described in 17151 would resolve your latest problem as well.

Are you able and interested in trying the changes described there in your environment, just as a test, to see if they resolve the problem you are seeing?

I meant to do so earlier, but given that the client is now launching properly this issue is more directly related to the ORB, so I'm going to transfer the issue to that team. It's certainly related to 17151.

I'm also changing the title of the issue to reflect the later problem.

Comment by pablopina [ 27/Sep/11 ]

Tim,

According to Blaise (the reporter of GLASSFISH-17151) they just had to rebuild orb-iiop.jar.

Now that you have reassigned it to the ORB team i'll wait a couple of days to see if they are able to respond (as I am very busy atm) and if they are unable to, yeah, i'll give it a go myself.

Comment by Harshad Vilekar [ 09/Dec/11 ]

Does this work OK with latest 3.1.2 build ? GlASSFISH-17151 is fixed in 3.1.2.





[GLASSFISH-17151] EJB remote deployed on GF 3.1 behind a NAT unaccessible via a simple Java app Created: 05/Aug/11  Updated: 19/Sep/14

Status: Reopened
Project: glassfish
Component/s: orb
Affects Version/s: 3.1
Fix Version/s: 4.1

Type: Bug Priority: Blocker
Reporter: Blaise Gosselin Assignee: Harshad Vilekar
Resolution: Unresolved Votes: 5
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS Linux Debian 6
JDK 1.6.0.26


Issue Links:
Related
is related to GLASSFISH-17147 App client cannot find EJB behind NAT Open
Tags: 3_1_2-exclude, 3_1_2-release-note-added, 3_1_2-release-notes, orb-review

 Description   

I have 2 Glassfish servers version 3.1: a FRONT server and a BACK server.
The FRONT server is in a DMZ.
The BACK server is in on a private lan, not accessible directly from the DMZ, but through a firewall that does a NAT on the IP of the BACK server.
-> IP-PU-B = Public IP address of the BACK
-> IP-PR-B = Private IP address of the BACK

Thus, the FRONT server only knows the public IP of the BACK server (the "NATed" IP). The Glassfish on the BACK server knows only its own "private" IP address, not its NATed address (it is only valid for machines on the DMZ).

Here is my client code:
try {
InitialContext context = new InitialContext();
System.out.println("Context initialized!");
HelloService service = (HelloService) context.lookup("HelloEJB");
System.out.println("Service retrieved!");
String name = service.countryCount();
System.out.println("Hello " + name);
} catch (Exception e) {
e.printStackTrace();
}

And here is my jndi.properties content in my client app:
java.naming.factory.initial = com.sun.enterprise.naming.SerialInitContextFactory
java.naming.factory.url.pkgs = com.sun.enterprise.naming
java.naming.factory.state = com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl
org.omg.CORBA.ORBInitialHost = IP-PU-B
org.omg.CORBA.ORBInitialPort = 3700

This code doesn't work if I launch my application from the DMZ trying to access the EJB remote via the IP address IP-PU-B.
This code works if I launch the application from "inside the network" trying to access the EJB remote via the IP address IP-PR-B.

The problem is due to the IIOP protocol as implemented on the Glassfish server. It does a first call on the ORB to locate the EJB (which is deployed on the same server as the ORB). Thus, the ORB sends the private IP to the client, instead of the public IP (which it has no way of knowing, as it is determined by the firewall)... The client then tries to connect on the private IP, which does not go though the firewall.

We have already tried the following solutions:

  • Connecting to a Remote EJB Module Through a Firewall
    Link: http://download.oracle.com/docs/cd/E19226-01/820-7695/6niugesud/index.html
    We have put the IP-PU-B as value for the variable "com.sun.corba.ee.ORBVAAHost".
    In that case, the problem between the FRONT and the BACK still exists, and moreover there is also a problem when I try to access the EJB remote from the Java application run on the BACK to the EJB remote on the BACK.
  • Replace Network address of the orb-listener-1, no better result.
  • Use of variable "java.rmi.server.hostname", no better result.

Is there a specific way to configure Glassfish behind a NAT to make it send the public IP instead of the private one?

Thanks in advance for your help!



 Comments   
Comment by Blaise Gosselin [ 09/Aug/11 ]

Important info: I just tested with the version 3.0.1, and it works correctly when I change the "Network address" of the "orb-listener-1".

It must then be a regression...

Comment by Nicolasdew [ 14/Sep/11 ]

Hello everyone,

we are experiencing the same problem using glassfish 3.1.1
The weirdest thing when setting the parameter com.sun.corba.ee.ORBVAAHost = "our_public_address" is that sometimes i can see that this address is taken into account and sometimes not.
I can see that by analyzing the GIOP packet on wireshark.
Is it confirmed that it is a regression or a misuse ?
Thank you for your reply.

Comment by Blaise Gosselin [ 22/Sep/11 ]

Hi,

Is it possible to have an answer to this problem please?

We are currently facing CDI problems with version 3.0.1, while it is the only one that works through a firewall => WE ARE STUCK for the moment, and we will probably have to use another AS (such as JBoss) if one solution is not proposed/found to our issues! At least maybe you could indicate us the class/lib to change in the GF 3.1 to make it work through a firewall as expected!

Thanks in advance for your help!

KR,

Comment by Blaise Gosselin [ 27/Sep/11 ]

Good news: we have solved this issue by our-self!

A colleague of mine has investigated in the Glassfish source, and here is the result.

Modifications in org.glassfish.enterprise.iiop.impl.GlassFishORBManager:

  1. Change method getClearTextIiopListener to test the “security-enabled” attribute of the iiop-listener (our clear text listener had an SSL element, probably set by the administration console…).
GlassFishORBManager.java
    private IiopListener getClearTextIiopListener() {
        if (iiopListeners != null)  {
            for (IiopListener il : iiopListeners) {
                if (!"true".equals(il.getSecurityEnabled())) {
                    return il ;
                }
            }
        }
		
        return null ;
    }
  1. Change the checkForAddrAny method to set the ORBConstants.SERVER_HOST_PROPERTY property to orbInitialHost. This allows us to send the hostname to the front server, and not the un-NATed IP. This is the same behavior as in Glassfish 3.0, and is needed in our case (natted network between the EJB server and the client).
GlassFishORBManager.java
    private String checkForAddrAny(Properties props, String orbInitialHost) {
        if ((orbInitialHost.equals("0.0.0.0")) || (orbInitialHost.equals("::"))
                || (orbInitialHost.equals("::ffff:0.0.0.0"))) {
            try {
                String localAddress = java.net.InetAddress.getLocalHost().getHostAddress();
                return localAddress;
            } catch (java.net.UnknownHostException uhe) {
                logger.log(Level.WARNING,
                    "Unknown host exception - Setting host to localhost");
				
                return DEFAULT_ORB_INIT_HOST;
            }
        } else {
            props.setProperty(ORBConstants.SERVER_HOST_PROPERTY, orbInitialHost);
            return orbInitialHost;
        }
    }

That's it!

Comment by Harshad Vilekar [ 15/Oct/11 ]

The fix is putback to 3.1.2 workspace. Blaise, could you please confirm if the issue is resolved in (tonight's or later) 3.1.2 build ?

First change was not required - getSsl() correctly returns null for ClearTextIiopListener. Please check you admin settings if there is issue.

Comment by Harshad Vilekar [ 16/Nov/11 ]

The fix is verified by the reporter.

Comment by Harshad Vilekar [ 16/Dec/11 ]

Although the fix works with NAT, it has a side effect - resulting in regression (GLASSFISH-17689). Fix is reverted.

Comment by mone_java [ 24/Jan/12 ]

I have the same problem.... I tried with glassfish 3.1.2-b19-01_23_2012....

this is what my client sends to the server (wireshark):

0000 00 13 49 e2 a3 e9 f4 6d 04 16 75 5e 08 00 45 00 ..I....m ..u^..E.
0010 01 60 ad b9 40 00 40 06 6b 86 c0 a8 01 23 4f 0e .`..@.@. k....#O.
0020 0f 7f c3 9e 0e 75 34 13 d6 8c 7e 5c 1a d8 80 18 .....u4. ..~\....
0030 00 5c 21 ab 00 00 01 01 08 0a 00 37 7b 6c 00 23 .!..... ...7{l.#
0040 e1 d3 47 49 4f 50 01 02 00 00 00 00 01 20 00 00 ..GIOP.. ..... ..
0050 00 05 03 00 00 00 00 00 00 00 00 00 00 0b 4e 61 ........ ......Na
0060 6d 65 53 65 72 76 69 63 65 00 00 00 00 06 5f 69 meServic e....._i
0070 73 5f 61 00 00 00 00 00 00 03 00 00 00 11 00 00 s_a..... ........
0080 00 02 00 02 00 00 4e 45 4f 00 00 00 00 02 00 14 ......NE O.......
0090 00 00 00 00 00 06 00 00 00 a6 00 00 00 00 00 00 ........ ........
00a0 00 28 49 44 4c 3a 6f 6d 67 2e 6f 72 67 2f 53 65 .(IDL:om g.org/Se
00b0 6e 64 69 6e 67 43 6f 6e 74 65 78 74 2f 43 6f 64 ndingCon text/Cod
00c0 65 42 61 73 65 3a 31 2e 30 00 00 00 00 01 00 00 eBase:1. 0.......
00d0 00 00 00 00 00 6a 00 01 02 00 00 00 00 0a 31 32 .....j.. ......12
00e0 37 2e 30 2e 31 2e 31 00 95 21 00 00 00 19 af ab 7.0.1.1. .!......
00f0 cb 00 00 00 00 02 00 00 00 65 00 00 00 08 00 00 ........ .e......
0100 00 00 00 00 00 00 14 00 00 00 00 00 00 02 00 00 ........ ........
0110 00 01 00 00 00 20 00 00 00 00 00 01 00 01 00 00 ..... .. ........
0120 00 02 05 01 00 01 00 01 00 20 00 01 01 09 00 00 ........ . ......
0130 00 01 00 01 01 00 00 00 00 26 00 00 00 02 00 02 ........ .&......
0140 00 00 00 00 00 28 49 44 4c 3a 6f 6d 67 2e 6f 72 .....(ID L:omg.or
0150 67 2f 43 6f 73 4e 61 6d 69 6e 67 2f 4e 61 6d 69 g/CosNam ing/Nami
0160 6e 67 43 6f 6e 74 65 78 74 3a 31 2e 30 00 ngContex t:1.0.

and this what my server sends to my client:

0000 f4 6d 04 16 75 5e 00 13 49 e2 a3 e9 08 00 45 00 .m..u^.. I.....E.
0010 02 72 fb 33 40 00 33 06 29 fa 4f 0e 0f 7f c0 a8 .r.3@.3. ).O.....
0020 01 23 0e 75 c3 9e 7e 5c 1a d8 34 13 d7 b8 80 18 .#.u..~\ ..4.....
0030 00 6c cf 72 00 00 01 01 08 0a 00 23 e2 05 00 37 .l.r.... ...#...7
0040 7b 6c 47 49 4f 50 01 02 00 01 00 00 02 32 00 00 {lGIOP.. .....2..
0050 00 05 00 00 00 03 00 00 00 02 4e 45 4f 00 00 00 ........ ..NEO...
0060 00 02 00 14 00 00 00 00 00 06 00 00 01 30 00 00 ........ .....0..
0070 00 00 00 00 00 28 49 44 4c 3a 6f 6d 67 2e 6f 72 .....(ID L:omg.or
0080 67 2f 53 65 6e 64 69 6e 67 43 6f 6e 74 65 78 74 g/Sendin gContext
0090 2f 43 6f 64 65 42 61 73 65 3a 31 2e 30 00 00 00 /CodeBas e:1.0...
00a0 00 01 00 00 00 00 00 00 00 f4 00 01 02 00 00 00 ........ ........
00b0 00 0e 31 39 32 2e 31 36 38 2e 31 2e 32 30 32 00 ..192.16 8.1.202.
00c0 0e 74 00 00 00 19 af ab cb 00 00 00 00 02 00 00 .t...... ........
00d0 00 64 00 00 00 08 00 00 00 00 00 00 00 00 14 00 .d...... ........
00e0 00 00 00 00 00 03 00 00 00 01 00 00 00 20 00 00 ........ ..... ..
00f0 00 00 00 01 00 01 00 00 00 02 05 01 00 01 00 01 ........ ........
0100 00 20 00 01 01 09 00 00 00 01 00 01 01 00 00 00 . ...... ........
0110 00 26 00 00 00 02 00 02 00 00 00 00 00 21 00 00 .&...... .....!..
0120 00 7c 00 00 00 00 00 00 00 01 00 00 00 00 00 00 .|...... ........
0130 00 24 00 00 00 20 00 00 00 66 00 00 00 00 00 00 .$... .. .f......
0140 00 01 00 00 00 0e 31 39 32 2e 31 36 38 2e 31 2e ......19 2.168.1.
0150 32 30 32 00 0e ec 00 40 00 00 00 00 00 08 06 06 202....@ ........
0160 67 81 02 01 01 01 00 00 00 17 04 01 00 08 06 06 g....... ........
0170 67 81 02 01 01 01 00 00 00 07 64 65 66 61 75 6c g....... ..defaul
0180 74 00 04 00 00 00 00 00 00 00 00 00 00 01 00 00 t....... ........
0190 00 08 06 06 67 81 02 01 01 01 00 00 00 0f 00 00 ....g... ........
01a0 00 00 00 00 00 2b 49 44 4c 3a 6f 6d 67 2e 6f 72 .....+ID L:omg.or
01b0 67 2f 43 6f 73 4e 61 6d 69 6e 67 2f 4e 61 6d 69 g/CosNam ing/Nami
01c0 6e 67 43 6f 6e 74 65 78 74 45 78 74 3a 31 2e 30 ngContex tExt:1.0
01d0 00 00 00 00 00 01 00 00 00 00 00 00 00 a2 00 01 ........ ........
01e0 02 00 00 00 00 0e 31 39 32 2e 31 36 38 2e 31 2e ......19 2.168.1.
01f0 32 30 32 00 0e 74 00 00 00 4d af ab cb 00 00 00 202..t.. .M......
0200 00 20 00 00 00 64 00 00 00 09 53 31 41 53 2d 4f . ...d.. ..S1AS-O
0210 52 42 00 00 00 00 00 00 00 02 00 00 00 08 52 6f RB...... ......Ro
0220 6f 74 50 4f 41 00 00 00 00 0d 54 4e 61 6d 65 53 otPOA... ..TNameS
0230 65 72 76 69 63 65 00 00 00 00 00 00 00 08 00 00 ervice.. ........
0240 00 01 00 00 00 01 14 00 00 00 00 00 00 02 00 00 ........ ........
0250 00 01 00 00 00 20 00 00 00 00 00 01 00 01 00 00 ..... .. ........
0260 00 02 05 01 00 01 00 01 00 20 00 01 01 09 00 00 ........ . ......
0270 00 01 00 01 01 00 00 00 00 26 00 00 00 02 00 02 ........ .&......

As you can see the server send to my client the private IP and not the public.... I don't understand what i can do for resolve this....
Thank you a lot!

set the public IP as IP for IIOP listener, will that not solve the problem ?

Comment by Rebecca Parks [ 24/Jan/12 ]

This has been flagged for the 3.1.2 Release Notes, but I'm not sure what the Release Notes should say. I think I understand the problem, which is summed up in this paragraph:

"The problem is due to the IIOP protocol as implemented on the Glassfish server. It does a first call on the ORB to locate the EJB (which is deployed on the same server as the ORB). Thus, the ORB sends the private IP to the client, instead of the public IP (which it has no way of knowing, as it is determined by the firewall)... The client then tries to connect on the private IP, which does not go though the firewall."

What I'm not sure I understand is the workaround. Is it the code that Blaise posted?

Comment by Harshad Vilekar [ 25/Jan/12 ]

There is no properly tested workaround available for this issue.

Comment by mone_java [ 25/Jan/12 ]

So for now, it is impossible to communicate with an EJB on a server debian? I have not tried it with windows server ... The code of Blaise Gosselin has been applied, or has been removed? Otherwise for now try with that code, because I need it to work!

ps And another question... Why the client sends to the server 127.0.1.1 ?

Comment by mone_java [ 29/Jan/12 ]

I tried the version 3.1.2_b06 but does not work.... What is your setting of the iiop listener?

Comment by thezebulette [ 16/Apr/12 ]

hello
I think I had the same problem trying to deploy my Eclipse RCP application ( EJB3 inside )

I don't have any problem accesing glassfish server on private adress
I can't ( and I had try all) calling my application on public adress outside the DMZ ..

What are the clue in fine ? any

Comment by ymajoros [ 15/Jan/13 ]

Hi,

Is it possible to have an answer to this problem please?

I work with Blaise Gosselin, who made the patch in #4, and we still have the issue. We have to patch every new version of Glassfish as described.

Thanks in advance for your help!

KR,

Comment by Tom Mueller [ 07/Feb/13 ]

Targeting for 4.0.1 as bugs related to the orb do not need to be fixed for the RI/SDK.

Comment by hoseka [ 22/Apr/13 ]

Hi all!
Can I solve this problem in version 3.1.2?
Does the correction proposed by Blaise Gosselin work?
Where can I get the source orb-iiop.jar to fix it and replace in my glassfish?

Comment by skgaju [ 05/Sep/13 ]

has anyone tried setting public IP to IIOP listener and Blaise Gosselin patch.





[GLASSFISH-18398] GF 3.1.1 works one time only! No next restart is possible until reinstalling GF. Created: 22/Feb/12  Updated: 22/Feb/12

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

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

GF 3.1.1 within NetBeans 7.1


Tags: GF, GlassFish, NB, NetBeans, reainstalling, reinstall

 Description   

When developing an applicaition within NB_7.1+GF_3.1.1 I can start it once only. If any error in my application occurs I cannot restart GF - even restarting OS and/or cleaning osgi-cache inside GF's "domain1" wont not help. Deinstalling GF with NB installer/deinstaller + restarting WinXP + installing again GF+3.1.1 with NB_7.1 installer is the only option o force it back to work.

Very frustrating...






[GLASSFISH-18405] ejb lookup failed from netbeans 7.0 based ejb-client with glassfish 3.1.1 Created: 24/Feb/12  Updated: 11/Jul/12

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

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

Operating System = Mac OS X version 10.7.3 running on x86_64
Java; VM; Vendor = 1.6.0_29; Java HotSpot(TM) 64-Bit Server VM 20.4-b02-402; Apple Inc.
Runtime = Java(TM) SE Runtime Environment 1.6.0_29-b11-402-11D50b


Attachments: Text File messages.log     Text File messages.log     Zip Archive TestEJB.zip     Zip Archive TestNB.zip    
Tags: ejb, glassfish, glassfish-3-1-1, netbeans

 Description   

An exception occurs at first try to lookup for an remote ejb facade, same client works with same ejb-modules hosted on glassfish 3.0.1:

java.lang.ClassNotFoundException: com.sun.ejb.codegen.GenericEJBHome_Generated
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:262)
Caused: java.lang.ClassNotFoundException: com.sun.ejb.codegen.GenericEJBHome_Generated starting from SystemClassLoader[62 modules] with possible defining loaders null and declared parents [ModuleCL@61f52b85[de.crosssoft.usradm.CSBenutzerverwaltung.Data], ModuleCL@1830e4a7[org.netbeans.modules.settings], ModuleCL@7ec78e02[org.netbeans.core.output2], ModuleCL@4f50f0e2[org.openide.explorer], ModuleCL@7595ddb5[org.netbeans.modules.options.keymap], ModuleCL@2e1ed620[org.netbeans.modules.keyring], ModuleCL@7ba76fdd[org.netbeans.core.ui], ModuleCL@3f2620b5[de.crosssoft.CSBaseGuiUtilModule], ModuleCL@75787005[org.netbeans.modules.favorites], ModuleCL@45ed957d[org.netbeans.core.windows], ...47 more]
at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:264)
at org.netbeans.ModuleManager$SystemClassLoader.loadClass(ModuleManager.java:557)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at com.sun.corba.ee.impl.util.JDKBridge.loadClass(JDKBridge.java:234)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.loadClass(Util.java:640)
at com.sun.corba.ee.impl.presentation.rmi.StubFactoryFactoryDynamicBase.createStubFactory(StubFactoryFactoryDynamicBase.java:73)
Caused: org.omg.CORBA.BAD_OPERATION: FEIN: IOP01210035: ClassNotFoundException while attempting to load interface com.sun.ejb.codegen.GenericEJBHome_Generated vmcid: OMG minor code: 35 completed: Maybe
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 com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:248)
at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:95)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.handleFullLogging(WrapperGenerator.java:387)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.access$400(WrapperGenerator.java:107)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator$2.invoke(WrapperGenerator.java:511)
at com.sun.corba.ee.spi.orbutil.proxy.CompositeInvocationHandlerImpl.invoke(CompositeInvocationHandlerImpl.java:99)
at $Proxy31.classNotFound3(Unknown Source)
at com.sun.corba.ee.impl.presentation.rmi.StubFactoryFactoryDynamicBase.createStubFactory(StubFactoryFactoryDynamicBase.java:76)
at com.sun.corba.ee.impl.util.Utility.loadStub(Utility.java:835)
Caused: org.omg.CORBA.BAD_OPERATION: WARNUNG: IOP01211205: Exception in loadStub vmcid: OMG minor code: 1205 completed: No
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 com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:248)
at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:95)
[catch] at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.handleFullLogging(WrapperGenerator.java:387)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.access$400(WrapperGenerator.java:107)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator$2.invoke(WrapperGenerator.java:511)
at com.sun.corba.ee.spi.orbutil.proxy.CompositeInvocationHandlerImpl.invoke(CompositeInvocationHandlerImpl.java:99)
at $Proxy54.exceptionInLoadStub(Unknown Source)
at com.sun.corba.ee.impl.util.Utility.loadStub(Utility.java:842)
at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:252)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:406)
at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:75)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at com.sun.enterprise.naming.impl.SerialContext.getObjectInstance(SerialContext.java:556)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:514)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
...



 Comments   
Comment by Sanjeeb Sahoo [ 24/Feb/12 ]

transfer to ejb container

Comment by olafj [ 10/Apr/12 ]

Is there any progress on this issue? Can i help with more information? Are there other related issues?

Comment by marina vatkina [ 10/Apr/12 ]

Please attach a test case.

Comment by olafj [ 12/Jun/12 ]

Attached a testcase: EJB-Module, Netbeans Platform Application. Error still occurs with Netbeans Platform 7.0 and Glassfish 3.1.2

Comment by olafj [ 19/Jun/12 ]

Is there any progress on this issue? Do you need more information? Can i help to clearify open questions?

Comment by marina vatkina [ 19/Jun/12 ]

Please provide the exact steps on how to reproduce the error.

Comment by olafj [ 20/Jun/12 ]

Thats very simple.

Build and deploy ejb-project.
Build and run client-project (netbeans platform app).
After app-startup a top component with a "jbutton1" is open. button's click event handler tries to get an initial context and tries call a function of a remote stateless session bean.
Ejb-request fails.

Comment by marina vatkina [ 21/Jun/12 ]

Assigning to ORB module to check why the just loaded class can't be found.

Comment by olafj [ 03/Jul/12 ]

Any new ideas? How can i help?
Without a solution we can not proceed with development. We are going to migrate to Java 7 and Netbeans 7.2, but without an upgrade to Glassfish 3.1.2 that makes no sense for us.

Comment by olafj [ 11/Jul/12 ]

Can you please tell me the status quo of this issue?





[GLASSFISH-18536] GF callback handler blocking a JASPIC provider when Principal is unknown Created: 21/Mar/12  Updated: 16/Apr/14

Status: Open
Project: glassfish
Component/s: security
Affects Version/s: None
Fix Version/s: future release

Type: Bug Priority: Blocker
Reporter: bjb Assignee: JeffTancill
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 2008 64bits


Tags: JASPIC, blocking, groups, principal, unknown, users

 Description   

When sending an unknown Principal (principal not valid as per a local JAAS config) but valid on a global perspective (all checks was done in the JASPIC provider), the GF CallerPrincipal handler will throw a blocking exception in the process :

com.sun.enterprise.security.auth.realm.NoSuchUserException: Cet utilisateur [USER@INTRA-DEV01.DOMAIN-DEV01.LOCAL] n'existe pas. at com.sun.enterprise.security.auth.realm.file.FileRealm.getGroupNames(FileRealm.java:329) at com.sun.enterprise.security.auth.login.LoginContextDriver.jmacLogin(LoginContextDriver.java:566) at com.sun.enterprise.security.jmac.callback.BaseContainerCallbackHandler.processCallerPrincipal(BaseContainerCallbackHandler.java:257) at com.sun.enterprise.security.jmac.callback.BaseContainerCallbackHandler.processCallback(BaseContainerCallbackHandler.java:197) at com.sun.enterprise.security.jmac.callback.ServerContainerCallbackHandler.handleSupportedCallbacks(ServerContainerCallbackHandler.java:76) at com.sun.enterprise.security.jmac.callback.BaseContainerCallbackHandler.handle(BaseContainerCallbackHandler.java:187) at com.sun.enterprise.security.jmac.callback.ContainerCallbackHandler.handle(ContainerCallbackHandler.java:83) at net.java.spnego.PACSpnegoServerAuthModule.updateCallerPrincipal(PACSpnegoServerAuthModule.java:550) at net.java.spnego.PACSpnegoServerAuthModule.validateRequest(PACSpnegoServerAuthModule.java:354) at com.sun.enterprise.security.jmac.config.GFServerConfigProvider$GFServerAuthContext.validateRequest(GFServerConfigProvider.java:1171) at com.sun.web.security.RealmAdapter.validate(RealmAdapter.java:1445) at com.sun.web.security.RealmAdapter.invokeAuthenticateDelegate(RealmAdapter.java:1323) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:551) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:623) at org.apache.catalina.core.StandardPipeline.doChainInvoke(StandardPipeline.java:600) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96) 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:330) 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: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:662)

The problem is that groups that were provided before with a call to the GF handler (Group handler) is not used but insteand GF access the default realm (file) to fetch the user's groups.

This is blocking usage of non-JAAS bridge profile JASPIC providers.

To lower the state of this issue, either fix the issue or provide a way to bypass this issue.



 Comments   
Comment by bjb [ 24/Mar/12 ]

Hi Kumar,

Please lower the priority level as it is actually not blocking but only misleading.

It will not block non-JAAS bridge but simply push a wrong track to people debugging.

The core issue has been logged as :
http://java.net/jira/browse/GLASSFISH-18556

When runing in JASPIC mode, such an issue should not be raised.

Rgs,
JB

Comment by kumarjayanti [ 25/Mar/12 ]

This issue does sound like it needs a fix. The caller principal callback is trying to do an identity assertion in this case forcing people to also configure a realm that can be used to fetch the groups of the user. This was done to meet requirements of some other usecases but now i realize this is not appropriate. Instead the Group Principal Callback should be explicitly used in this case.

I will fix this for 3.1.2 Patch releases and glassfish trunk.

Thanks for raising this issue.

Comment by arjan tijms [ 13/Apr/13 ]

Is this still the same issue as reported? I've done a lot of JASPIC testing with GlassFish 3.1.2.2 but never encountered this issue. There is something fishy going on though.

The caller principal callback is trying to do an identity assertion in this case

I think you mean the caller principal callback handler right? Since the caller principal callback is a very simple DTO style class that only stores the Subject and the Principal or Name.

The handler (in BaseContainerCallbackHandler.processCallerPrincipal) does a call to the LoginContextDriver, but it itself does not do any identity assertion:

if (isCertRealm) {
    if (principal  instanceof X500Principal) {
        LoginContextDriver.jmacLogin(fs, (X500Principal)principal);
    }
} else {
    if (!principal.equals(SecurityContext.getDefaultCallerPrincipal())) {
        LoginContextDriver.jmacLogin(fs, principal.getName(), realmName);
    }
}

The LoginContextDriver.jmacLogin however does attempt to do this:

 public static Subject jmacLogin(Subject subject, String identityAssertion, String realm) throws LoginException {

        if (subject == null) {
            subject = new Subject();
        }
        final Subject fs = subject;
        String userName = identityAssertion;

        try {
            if (realm == null || "".equals(realm)) {
                realm = Realm.getDefaultRealm();
            }
            Realm realmInst = Realm.getInstance(realm);
            final Enumeration groups = realmInst.getGroupNames(userName);
            if (groups != null && groups.hasMoreElements()) {
                AppservAccessController.doPrivileged(new PrivilegedAction() {

                    public java.lang.Object run() {
                        while (groups.hasMoreElements()) {
                            String grp = (String) groups.nextElement();
                            fs.getPrincipals().add(new Group(grp));
                        }
                        return fs;
                    }
                });
            }
        } catch (Exception ex) {
            if (_logger.isLoggable(Level.FINE)) {
                _logger.log(Level.FINE, "Exception when trying to populate groups for CallerPrincipal " + identityAssertion, ex);
            }
        }
        return subject;
    }

When using JASPIC, the passed in realm will be "" and when that happens this method obtains the default realm ("file") and tries to get the group names from that (realmInst.getGroupNames(userName);).

If this throws an exception (in my testing a NPE is typically thrown) it is ignored by the catch, so the problem as described for this issue doesn't seem to occur anymore (that is, the exception is still thrown, but it doesn't interrupt the authentication flow).

I'm afraid though that if I happened to have this file realm defined with a user that happened to have the same name as the user I'm trying to authenticate with JASPIC, that this user would suddenly get a set of extra roles. If my application happened to have roles with the same name, then this could be a rather big problem.





[GLASSFISH-18953] Unable to start Cluster Instances when using JDK-7 on RHEL 5 Created: 27/Jul/12  Updated: 13/May/13

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

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

Oracle Glassfish 3.1.2.2
RHEL 5
JDK 7u4


Tags: JDK-7, JDK7, RHEL

 Description   

After upgrading from GF 3.1.2 to 3.1.2.2 on DAS, removing cluster instances and recreating them, the instances will not start using JDK 7. The following exception is seen:

<snip>

[#|2012-07-27T09:04:36.428-0400|WARNING|oracle-glassfish3.1.2|javax.enterprise.system.tools.admin.com.sun.enterprise.v3.admin.cluster|_ThreadID=1570;_ThreadName=Thread-2;|Could not start instance Instance1 on node QA-Node-1 (btsqa01dfw.bot.testnet.rim.net).: Command ' /home/glassfish/glassfish3/glassfish/bin/asadmin --_auxinput - --interactive=false start-local-instance --node QA-Node-1 --sync normal Instance1' failed on node QA-Node-1 (<removed>): Waiting for Instance1 to start ......Error starting instance Instance1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:

Launching GlassFish on Felix platform
Completed shutdown of GlassFish runtime
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
Caused by: java.lang.RuntimeException: javax.management.MBeanRegistrationException: Exception thrown in preRegister method
at java.lang.management.ManagementFactory.addMXBean(ManagementFactory.java:824)
at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:481)
at org.glassfish.admin.monitor.MonitoringBootstrap.setStatsProviderManagerDelegate(MonitoringBootstrap.java:227)
at org.glassfish.admin.monitor.MonitoringBootstrap.enableMonitoringForProbeProviders(MonitoringBootstrap.java:634)
at org.glassfish.admin.monitor.MonitoringBootstrap.postConstruct(MonitoringBootstrap.java:176)
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:229)
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)
... 6 more
Caused by: javax.management.MBeanRegistrationException: Exception thrown in preRegister method
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.throwMBeanRegistrationException(DefaultMBeanServerInterceptor.java:993)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.preRegister(DefaultMBeanServerInterceptor.java:1009)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:919)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:512)
at com.sun.enterprise.v3.admin.DynamicInterceptor.registerMBean(DynamicInterceptor.java:472)
at java.lang.management.ManagementFactory$2.run(ManagementFactory.java:819)
at java.lang.management.ManagementFactory$2.run(ManagementFactory.java:815)
at java.security.AccessController.doPrivileged(Native Method)
at java.lang.management.ManagementFactory.addMXBean(ManagementFactory.java: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:151)
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(DefaultMBeanServerInterceptor.java:1007)
... 32 more

Command start-local-instance failed.: To complete this operation run the following command locally on host <removed> from the GlassFish install location /home/glassfish/glassfish3:

bin/asadmin start-local-instance --node QA-Node-1 --sync normal Instance1|#]

[#|2012-07-27T09:04:36.434-0400|SEVERE|oracle-glassfish3.1.2|org.glassfish.admingui|_ThreadID=1567;_ThreadName=Thread-2;|RestResponse.getResponse() gives FAILURE. endpoint = 'https://localhost:4848/management/domain/servers/server/Instance1/start-instance'; attrs = '{}'|#]

[#|2012-07-27T09:04:36.435-0400|SEVERE|oracle-glassfish3.1.2|org.glassfish.admingui|_ThreadID=1567;_ThreadName=Thread-2;|Error in instanceAction ;
endpoint=https://localhost:4848/management/domain/servers/server/Instance1/start-instance;attrsMap=null|#]

</snip>

After downgrading java to JDK 6, everything works correctly. It should be noted that this behaviour is seen for the following JDK versions: 1.7.0_02, 1.7.0_03, 1.7.0_04, 1.7.0_05



 Comments   
Comment by kneecha [ 09/Aug/12 ]

I am having the same issue using 1.7.0_04-b20. The stack trace is basically the same except the GarbageCollector, name is different:

Caused by: javax.management.InstanceAlreadyExistsException: MXBean already registered with name java.lang:type=GarbageCollector,name=ParNew

Comment by skgaju [ 24/Aug/12 ]

workaround remove the jvm-option from all server/clusters configs
NOT from DAS config
-Djavax.management.builder.initial=com.sun.enterprise.v3.admin.AppServerMBeanServerBuilder

Fix for this issue

bash-2.05b# svn diff src/main/java/com/sun/enterprise/admin/servermgmt/V2ToV3ConfigUpgrade.java
Index: src/main/java/com/sun/enterprise/admin/servermgmt/V2ToV3ConfigUpgrade.java
===================================================================
— src/main/java/com/sun/enterprise/admin/servermgmt/V2ToV3ConfigUpgrade.java (revision 5906)
+++ src/main/java/com/sun/enterprise/admin/servermgmt/V2ToV3ConfigUpgrade.java (working copy)
@@ -152,6 +152,7 @@
"-XX:LogFile",
};

+
// these are added to all configs
private static final String[] ADD_LIST = new String[] {
"-XX:+UnlockDiagnosticVMOptions",
@@ -169,14 +170,14 @@
"-Dfelix.fileinstall.bundles.startTransient=true",
"-Dfelix.fileinstall.disableConfigSave=false",
"-Dfelix.fileinstall.log.level=2",

  • "-Djavax.management.builder.initial=com.sun.enterprise.v3.admin.AppServerMBeanServerBuilder",
    "-Dorg.glassfish.web.rfc2109_cookie_names_enforced=false",
    "-Djava.ext.dirs=$ {com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}

    /jre/lib/ext$

    {path.separator}

    $

    {com.sun.aas.instanceRoot}

    /lib/ext",
    };

// these are added to DAS only
private static final String[] ADD_LIST_DAS = new String[]

{ - "-Dosgi.shell.telnet.port=6666" + "-Dosgi.shell.telnet.port=6666", + "-Djavax.management.builder.initial=com.sun.enterprise.v3.admin.AppServerMBeanServerBuilder" }

;

Comment by manuel_b [ 13/May/13 ]

I am also encountering this issue after upgrading our cluster nodes from Java 6 to Java 7:

..
Caused by: javax.management.InstanceAlreadyExistsException: MXBean already registered with name java.lang:type=GarbageCollector,name=Copy
at com.sun.jmx.mbeanserver.MXBeanLookup.addReference(MXBeanLookup.java:151)
at com.sun.jmx.mbeanserver.MXBeanSupport.register(MXBeanSupport.java:160)
...

I will remove the mentioned jvm property from the node configuration.

Works! Thanks for the hints here.





[GLASSFISH-20795] EclipseLink 2.5.0 JPQL Parser breaks column alias handling in ORDER BY clause Created: 04/Sep/13  Updated: 05/Sep/13

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

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

Glassfish 4 (b89), EclipseLink 2.5.0 (included)


Tags: eclipselink, jpa, jpql

 Description   

Column alias (result_variable) handling as defined in JPA Spec 2.1 (JSR-338) "4.9 ORDER BY Clause" is not working with the default EclipseLink 2.5.0 JPQL Parser (Hermes) provided in Glassfish 4.0 (b89). If a basic JPQL query contains two column aliases and there is an ORDER BY clause on the first alias, EclipseLink returns the following exception:

Exception Description: Problem compiling [SELECT c.cuNumber, c.nameLast AS last_name, c.nameFirst AS first_name FROM Customer c ORDER BY last_name].
[70, 79] The identification variable 'last_name' is not defined in the FROM clause.

Example:
========
Create an entity 'Customer' similar to:

@Entity
@Access(AccessType.FIELD)
@Table(name = "CUSTOMER")
public class Customer implements Serializable {

...
@Column(name = "CU_NUMBER")
private String cuNumber;
@Column(name = "HY_NAME_LAST")
private String nameLast;
@Column(name = "HY_NAME_FIRST")
private String nameFirst;
...
}

In a SLSB use:

...
@PersistenceContext(unitName = "TEST_PU")
EntityManager em;
...

Query query = em.createQuery("SELECT c.cuNumber, c.nameLast AS last_name, c.nameFirst AS first_name FROM Customer c ORDER BY last_name");
...

This fails with:
Exception Description: Problem compiling [SELECT c.cuNumber, c.nameLast AS last_name, c.nameFirst AS first_name FROM Customer c ORDER BY last_name].
[70, 79] The identification variable 'last_name' is not defined in the FROM clause.

If you use the second alias in the order by clause the query is executed successfully.
The same query is running without any error in Glassfish 3.1.2.2 using supplied EclipseLink version.

It seems to be a EclipseLink JPQL Parser Bug.
As a workaround you can switch back to the prior EclipseLink 2.4 JPQL Parser by using the following configuration in your persistence.xml:
<property name="eclipselink.jpql.parser" value="org.eclipse.persistence.queries.ANTLRQueryBuilder"/>
But I don't think the old JPQL parser is JEE 7 compliant.



 Comments   
Comment by dimaki [ 04/Sep/13 ]

See also here: http://www.eclipse.org/forums/index.php/t/489531/

Comment by PascalFilion [ 05/Sep/13 ]

The bug has been fixed and will be part of the next patch release (2.4.3 and 2.5.1). A nightly build can be picked up if required.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=410808





[GLASSFISH-20927] java.lang.ArrayIndexOutOfBoundsException on modifucation of the empty HashSet serialized over corba (JDK 1.7.0_u45) Created: 16/Dec/13  Updated: 03/Jun/14

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

Type: Bug Priority: Blocker
Reporter: Peter Butkovic Assignee: russellgold
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

fedora 17, Oracle JDK 1.7.0_u45


Tags: 4_0_1-evangelists, 4_0_1-reviewed

 Description   

When modifying empty HashSet that has been previously serialized over Corba, Following exception happens:

...
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1636631191
at java.util.HashMap.put(HashMap.java:498)
at java.util.HashSet.add(HashSet.java:217)
...

The reason seems to be in the one of the latest changes done in the JDK 1.7.0_u45 (I compared only to JDK 1.7.0_u25, where problem doesn't occur) within the internal implementation of the HashMap.

Namely following sections harm it:

In the HashMap:

public V put(K key, V value) {
if (table == EMPTY_TABLE)

{ inflateTable(threshold); }

...
so after the serialization / deserialization table is not equal to EMPTY_TABLE any more => won't ever call
inflateTable(threshold);
=> internal field: table won't be initialized (is empty) => later modifications fail with ArrayIndexOutOfBoundsException.

The source of the trouble seem to be optimization via introducing EMPTY_TABLE variable. However JDK expects to call readObject() on deserialization, where the reference would be fixed, corba seem to ignore it however.

See the attached test program (Arquilian with embedded glassfish 3.1.2) for reproducing the error. Simply run:
mvn test

Please note that failure comes from the:
BBean.wontWork(...)
as corba serialization already happened.

If modification is done prio to that => in:
ABean.worksOK
=> set won't be empty during corba serialization time
(commented out section)
problem won't happen.



 Comments   
Comment by Peter Butkovic [ 16/Dec/13 ]

I guess I'm not allowed to attach anything Well, that's weird.

Anyway, the test case is available on github: https://github.com/typekpb/GLASSFISH-20927

to reproduce, go for the:
git clone https://github.com/typekpb/GLASSFISH-20927 GLASSFISH-20927
cd GLASSFISH-20927
mvn test

Just make sure to test with the Oracle JDK 1.7.0_u45

Comment by mduigou [ 17/Dec/13 ]

See also GLASSFISH-20814 which is related.

Comment by russgold [ 20/Dec/13 ]

I can duplicate it using your test case. What I don't seem to be able to do is attach a debugger to server process in which the failure is happening - that could be related by lack of familiarity with Arquillian.

Comment by Peter Butkovic [ 21/Dec/13 ]

would this work for you? http://arquillian.org/guides/getting_started/#debug_the_test

Comment by russgold [ 24/Dec/13 ]

This is actually the same issue as GLASSFISH-20814; We will fix it in GF 4 and then look into back porting. Further comments will be found on the other bug.





[GLASSFISH-20998] JMS messages lose message properties when sent via JMSContext. Selector's don't work. Created: 01/Mar/14  Updated: 03/Jun/14

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

Type: Bug Priority: Blocker
Reporter: pranahata Assignee: David Zhao
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: 4_0_1-reviewed

 Description   

When sending a message via JMSContext, none of the properties sent on the message arrive at the client, making jms message selectors unusable.

You can use the same test case as here, https://java.net/jira/browse/GLASSFISH-20973



 Comments   
Comment by Nigel Deakin [ 03/Mar/14 ]

Seems to work for me. Can you please paste the exact code you used to set the property?

I tried these two variants:

setting it directly on the Message:

try (JMSContext context = connectionFactory.createContext()){
   TextMessage textMessage = context.createTextMessage("Hello world");
   textMessage.setStringProperty("MyProperty", "Koala");
   context.createProducer().send(inboundQueue,m);
}

and setting it via the JMSProducer

try (JMSContext context = connectionFactory.createContext()){
   context.createProducer().setProperty("MyProperty", "Wombat").send(inboundQueue,"Hello world");
}

and checked the property was set on the received message using

String myProp = message.getStringProperty("MyProperty");

and confirmed that the expected property value was set.





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

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

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

Glassfish 4.0.1-b05-ml, Ubuntu Linux 12.04 LTS


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

 Description   

Hello

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

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

Here is what I found inside the log:

[2014-05-23T19:11:45.498+0000] [glassfish 4.0] [WARNING] [] [javax.enterprise.web.core] [tid: _ThreadID=42 _ThreadName=admin-listener(3)] [timeMillis: 1400872305498] [levelValue: 900] [[
Servlet.service() for servlet FacesServlet threw exception
java.lang.AbstractMethodError: javax.ws.rs.core.UriBuilder.uri(Ljava/lang/String;)Ljavax/ws/rs/core/UriBuilder;
at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:119)
at org.glassfish.jersey.client.JerseyWebTarget.<init>(JerseyWebTarget.java:71)
at org.glassfish.jersey.client.JerseyClient.target(JerseyClient.java:177)
at org.glassfish.jersey.client.JerseyClient.target(JerseyClient.java:68)
at org.glassfish.admingui.common.util.RestUtil.get(RestUtil.java:862)
at org.glassfish.admingui.common.util.RestUtil.restRequest(RestUtil.java:209)
at org.glassfish.admingui.common.handlers.RestApiHandlers.restRequest(RestApiHandlers.java:224)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:442)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:420)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:394)
at com.sun.jsftemplating.layout.descriptors.LayoutComponent.beforeCreate(LayoutComponent.java:348)
at com.sun.jsftemplating.layout.descriptors.LayoutComponent.getChild(LayoutComponent.java:288)
at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:556)
at com.sun.jsftemplating.layout.LayoutViewHandler.createView(LayoutViewHandler.java:255)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:254)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:121)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:875)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:739)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:575)
at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:546)
at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:428)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:378)
at org.glassfish.admingui.common.security.AdminConsoleAuthModule.validateRequest(AdminConsoleAuthModule.java:224)
at com.sun.enterprise.security.jmac.config.GFServerConfigProvider$GFServerAuthContext.validateRequest(GFServerConfigProvider.java:1175)
at com.sun.web.security.RealmAdapter.validate(RealmAdapter.java:1654)
at com.sun.web.security.RealmAdapter.invokeAuthenticateDelegate(RealmAdapter.java:1521)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:606)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:702)
at org.apache.catalina.core.StandardPipeline.doChainInvoke(StandardPipeline.java:678)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:215)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:291)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:209)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:137)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:115)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:291)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:209)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:137)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:115)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:291)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:209)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:137)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:115)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:550)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:744)
]]



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

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

Comment by jimnicolson [ 08/Jul/14 ]

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

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

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

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

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

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

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

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

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

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

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

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

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

Here is what I did:

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

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

Comment by peter_pilgrim [ 08/Jul/14 ]

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

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

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

<VirualHost> ...

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

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

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

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

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

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

Comment by jimnicolson [ 09/Jul/14 ]

Hi Romain

Thanks for the quick response...

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

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

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

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

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

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

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

Regards





[GLASSFISH-21164] On deploy jpa validation Eclipselink do not recognize entity class if has lambda expressions inside a method Created: 13/Aug/14  Updated: 13/Aug/14

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

Type: Bug Priority: Blocker
Reporter: fantarama Assignee: Srini
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

java jdk 1.8_05


Tags: eclipselink, jpa

 Description   

During deploy process if a jpa entity (@Entity) in one of his methods has a java 8 lambda expression the entity is not recognized has a jpa entity and skipped. This cause validation error during deployment if the entity is in relation with others.



 Comments   
Comment by Hong Zhang [ 13/Aug/14 ]

assign to persistence team for evaluation

Comment by Lukas Jungmann [ 13/Aug/14 ]

this is fixed in EclipseLink 2.6.0, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=429992 GF currently uses 2.5.2

Comment by fantarama [ 13/Aug/14 ]

Thanks, but is there a future plan to update GF to 2.6.0? Any workaround to be able to deploy the application?





[GLASSFISH-21254] Usertransactions are blocked by firewall Created: 14/Nov/14  Updated: 21/Nov/14

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

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

Windows (or any client / server setup separated by a firewall)


Tags: firewall, usertransaction

 Description   

EJB method calls are blocked by the firewall if run in a UserTransaction. This appears to be because the server will attempt to connect to the client on a different port to the original, which the firewall will then block.

Steps to reproduce are fairly straightforward.

1. Ensure that the firewall has been configured to allow EJB lookups.
2. Deploy an EJB with a method that has a transaction type of REQUIRED or SUPPORTS to the web server.
3. On the client machine, look up the UserTransaction and call begin().
4. Next, look up the EJB and call the method with the transaction type of REQUIRED or SUPPORTS.
5. The client code will eventually time out and stacktrace. The webserver log file will report that the connection to the client machine failed.

If the UserTransaction.begin() method is never called, then the method invocation will succeed as expected.



 Comments   
Comment by riksweeney [ 21/Nov/14 ]

[#|2014-11-10T04:21:43.852+0000|WARNING|glassfish3.1.2|javax.enterprise.system.core.transaction.com.sun.jts.jta|_ThreadID=16;_ThreadName=Thread-4;|JTS5071: Unexpected error occurred in registerSynchronization
org.omg.CORBA.COMM_FAILURE: FINE: IOP00410001: Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: xx.xx.xxx.x; port: 52574 vmcid: OMG minor code: 1 completed: No
at sun.reflect.GeneratedConstructorAccessor168.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:248)
at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:95)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.handleFullLogging(WrapperGenerator.java:387)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.access$400(WrapperGenerator.java:107)
at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator$2.invoke(WrapperGenerator.java:511)
at com.sun.corba.ee.spi.orbutil.proxy.CompositeInvocationHandlerImpl.invoke(CompositeInvocationHandlerImpl.java:99)
at $Proxy149.connectFailure(Unknown Source)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:257)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:270)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:129)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:223)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:228)
at org.omg.CORBA.portable.ObjectImpl._request(ObjectImpl.java:431)
at org.omg.CosTransactions._CoordinatorStub.register_synchronization(_CoordinatorStub.java:235)
at com.sun.jts.CosTransactions.TopCoordinator.register_synchronization(TopCoordinator.java:2430)
at com.sun.jts.jta.TransactionState.registerSynchronization(TransactionState.java:433)
at com.sun.jts.jta.TransactionImpl.registerSynchronization(TransactionImpl.java:313)
at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.createImportedTransaction(JavaEETransactionManagerSimplified.java:1551)
at com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.getTransaction(JavaEETransactionManagerJTSDelegate.java:279)
at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.getTransaction(JavaEETransactionManagerSimplified.java:922)
at com.sun.ejb.containers.BaseContainer.useClientTx(BaseContainer.java:4703)
at com.sun.ejb.containers.BaseContainer.preInvokeTx(BaseContainer.java:4616)
at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1914)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:205)
at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:79)
at $Proxy568.findAll(Unknown Source)
at sun.reflect.GeneratedMethodAccessor133.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie.dispatchToMethod(ReflectiveTie.java:144)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:174)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:528)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:199)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1624)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1486)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:990)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:214)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:742)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:539)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2324)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection timed out: connect
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:339)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:242)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:274)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:129)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:223)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:228)
at org.omg.CORBA.portable.ObjectImpl._request(ObjectImpl.java:431)
at org.omg.CosTransactions._CoordinatorStub.register_synchronization(_CoordinatorStub.java:235)
at com.sun.jts.CosTransactions.TopCoordinator.register_synchronization(TopCoordinator.java:2430)
at com.sun.jts.jta.TransactionState.registerSynchronization(TransactionState.java:433)
at com.sun.jts.jta.TransactionImpl.registerSynchronization(TransactionImpl.java:314)
at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.createImportedTransaction(JavaEETransactionManagerSimplified.java:1551)
at com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.getTransaction(JavaEETransactionManagerJTSDelegate.java:279)
at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.getTransaction(JavaEETransactionManagerSimplified.java:922)
at com.sun.ejb.containers.BaseContainer.useClientTx(BaseContainer.java:4703)
at com.sun.ejb.containers.BaseContainer.preInvokeTx(BaseContainer.java:4616)
at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1914)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:205)
at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:79)
at $Proxy568.findAll(Unknown Source)
at sun.reflect.GeneratedMethodAccessor133.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie.dispatchToMethod(ReflectiveTie.java:144)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:174)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:528)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:199)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1624)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1486)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:990)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:215)
... 5 more
Caused by: java.net.ConnectException: Connection timed out: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:532)
at com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:110)
at org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:324)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:242)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:270)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:129)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:223)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:228)
at org.omg.CORBA.portable.ObjectImpl._request(ObjectImpl.java:431)
at org.omg.CosTransactions._CoordinatorStub.register_synchronization(_CoordinatorStub.java:235)
at com.sun.jts.CosTransactions.TopCoordinator.register_synchronization(TopCoordinator.java:2430)
at com.sun.jts.jta.TransactionState.registerSynchronization(TransactionState.java:433)
at com.sun.jts.jta.TransactionImpl.registerSynchronization(TransactionImpl.java:313)
at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.createImportedTransaction(JavaEETransactionManagerSimplified.java:1551)
at com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.getTransaction(JavaEETransactionManagerJTSDelegate.java:279)
at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.getTransaction(JavaEETransactionManagerSimplified.java:922)
at com.sun.ejb.containers.BaseContainer.useClientTx(BaseContainer.java:4703)
at com.sun.ejb.containers.BaseContainer.preInvokeTx(BaseContainer.java:4616)
at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1914)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:205)
at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:79)
at $Proxy568.findAll(Unknown Source)
at sun.reflect.GeneratedMethodAccessor133.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie.dispatchToMethod(ReflectiveTie.java:144)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:174)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:528)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:199)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1624)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1486)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:990)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:214)
... 5 more





[GLASSFISH-14389] [BLOCKING] asadmin -m * and asadmin --monitor=true * is not working as it mention on the online --help. Created: 03/Nov/10  Updated: 18/Feb/13

Status: Reopened
Project: glassfish
Component/s: monitoring
Affects Version/s: 3.1
Fix Version/s: future release

Type: Bug Priority: Critical
Reporter: Homer Yau Assignee: Byron Nevins
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Dependency
depends on GLASSFISH-14461 Extra "server." in monitoring output ... Resolved
Issuezilla Id: 14,389
Tags: added-devtest

 Description   

"asadmin -m *" and "asadmin --monitor=true *" is not working as it mention on
the online --help.

I have created a cluster instance for monitoring test and turn it to "HIGH".

-bash-3.2$ asadmin list -m *
Command list executed successfully.

-bash-3.2$ asadmin list -m=true *
Command list executed successfully.

You could see what online help says, I think it confuse user.
It says the " ./asadmin list * " to see all the monitoring element.

-bash-3.2$ asadmin list --help

User need to know the element start point and need to able to list.
The following command works.

-bash-3.2$ asadmin list -m=true monitoring-server.*
-bash-3.2$ asadmin list -m monitoring-server.*
monitoring-server :
monitoring-server.server
monitoring-server.server.applications
monitoring-server.server.applications.__default-web-module
monitoring-server.server.applications.__default-web-module.server
monitoring-server.server.applications.__default-web-module.server.default
monitoring-server.server.applications.__default-web-module.server.jsp
monitoring-server.server.applications.standalonewebmod1
monitoring-server.server.applications.standalonewebmod1.server
monitoring-server.server.applications.standalonewebmod1.server.default
monitoring-server.server.applications.standalonewebmod1.server.jsp
monitoring-server.server.applications.standalonewebmod1.server.standalonewebmod1_Servlet1
monitoring-server.server.applications.standalonewebmod1.server.standalonewebmod1_Servlet2
monitoring-server.server.applications.standalonewebmod2
monitoring-server.server.applications.standalonewebmod2.server
monitoring-server.server.applications.standalonewebmod2.server.ErrorServlet
monitoring-server.server.applications.standalonewebmod2.server.ReceiveBytes
monitoring-server.server.applications.standalonewebmod2.server.SecureServlet
monitoring-server.server.applications.standalonewebmod2.server.SendBytes
monitoring-server.server.applications.standalonewebmod2.server.default
monitoring-server.server.applications.standalonewebmod2.server.jsp
monitoring-server.server.applications.standalonewebmod2.server.standalonewebmod2_Servlet1
monitoring-server.server.applications.standalonewebmod2.server.standalonewebmod2_Servlet2
monitoring-server.server.applications.webapp1
monitoring-server.server.applications.webapp1.webapp1webmod1\.war
monitoring-server.server.applications.webapp1.webapp1webmod1\.war.server
monitoring-server.server.applications.webapp1.webapp1webmod1\.war.server.default
monitoring-server.server.applications.webapp1.webapp1webmod1\.war.server.jsp
monitoring-server.server.applications.webapp1.webapp1webmod1\.war.server.webapp1webmod1_Servlet1
monitoring-server.server.applications.webapp1.webapp1webmod1\.war.server.webapp1webmod1_Servlet2
monitoring-server.server.applications.webapp1.webapp1webmod2\.war
monitoring-server.server.applications.webapp1.webapp1webmod2\.war.server
monitoring-server.server.applications.webapp1.webapp1webmod2\.war.server.default
monitoring-server.server.applications.webapp1.webapp1webmod2\.war.server.jsp
monitoring-server.server.applications.webapp1.webapp1webmod2\.war.server.webapp1webmod2_Servlet1
monitoring-server.server.applications.webapp1.webapp1webmod2\.war.server.webapp1webmod2_Servlet2
monitoring-server.server.applications.webapp2
monitoring-server.server.applications.webapp2.webapp2webmod1\.war
monitoring-server.server.applications.webapp2.webapp2webmod1\.war.server
monitoring-server.server.applications.webapp2.webapp2webmod1\.war.server.default
monitoring-server.server.applications.webapp2.webapp2webmod1\.war.server.jsp
monitoring-server.server.applications.webapp2.webapp2webmod1\.war.server.webapp2webmod1_Servlet1
monitoring-server.server.applications.webapp2.webapp2webmod1\.war.server.webapp2webmod1_Servlet2
monitoring-server.server.applications.webapp2.webapp2webmod2\.war
monitoring-server.server.applications.webapp2.webapp2webmod2\.war.server
monitoring-server.server.applications.webapp2.webapp2webmod2\.war.server.default
monitoring-server.server.applications.webapp2.webapp2webmod2\.war.server.jsp
monitoring-server.server.applications.webapp2.webapp2webmod2\.war.server.webapp2webmod2_Servlet1
monitoring-server.server.applications.webapp2.webapp2webmod2\.war.server.webapp2webmod2_Servlet2
monitoring-server.server.web
monitoring-server.server.web.jsp
monitoring-server.server.web.request
monitoring-server.server.web.servlet
monitoring-server.server.web.session

Command list executed successfully.



 Comments   
Comment by Nazrul [ 03/Nov/10 ]

This is blocking tests execution for monitoring.

Comment by Byron Nevins [ 03/Nov/10 ]

I'm guessing that it is behaving exactly the same as V3 final release – in
which case it will be a big deal...

Comment by Byron Nevins [ 05/Nov/10 ]

"I have created a cluster instance for monitoring test and turn it to "HIGH"."

What does the above mean? How about simply copying & pasting the actual
commands you ran?

Comment by Byron Nevins [ 05/Nov/10 ]

What did you set to high?

Comment by Byron Nevins [ 05/Nov/10 ]

Output from 3.0.1

C:\glassfishv3\glassfish\bin>asadmin list -m "*"
server
server.applications
server.applications.AuthAdmin
server.applications.AuthAdmin.server
server.applications.AuthAdmin.server.AuthCreationManager
server.applications.AuthAdmin.server.AuthManager
server.applications.AuthAdmin.server.AuthUpdateManager
server.applications.AuthAdmin.server.Registrar
server.applications.AuthAdmin.server.Signup
server.applications.AuthAdmin.server.default
server.applications.AuthAdmin.server.jsp
server.applications.__default-web-module
server.applications.__default-web-module.server
server.applications.__default-web-module.server.default
server.applications.__default-web-module.server.jsp
server.http-service
server.http-service.__asadmin
server.http-service.__asadmin.request
server.http-service.server
server.http-service.server.request
server.jvm
server.jvm.class-loading-system
server.jvm.compilation-system
server.jvm.garbage-collectors
server.jvm.garbage-collectors.Copy
server.jvm.garbage-collectors.MarkSweepCompact
server.jvm.memory
server.jvm.operating-system
server.jvm.runtime
server.jvm.thread-system
server.jvm.thread-system.thread-10
server.jvm.thread-system.thread-12
server.jvm.thread-system.thread-13
server.jvm.thread-system.thread-14
server.jvm.thread-system.thread-15
server.jvm.thread-system.thread-16
server.jvm.thread-system.thread-18
server.jvm.thread-system.thread-2
server.jvm.thread-system.thread-20
server.jvm.thread-system.thread-22
server.jvm.thread-system.thread-23
server.jvm.thread-system.thread-24
server.jvm.thread-system.thread-3
server.jvm.thread-system.thread-30
server.jvm.thread-system.thread-31
server.jvm.thread-system.thread-32
server.jvm.thread-system.thread-33
server.jvm.thread-system.thread-34
server.jvm.thread-system.thread-35
server.jvm.thread-system.thread-36
server.jvm.thread-system.thread-37
server.jvm.thread-system.thread-38
server.jvm.thread-system.thread-39
server.jvm.thread-system.thread-4
server.jvm.thread-system.thread-40
server.jvm.thread-system.thread-41
server.jvm.thread-system.thread-42
server.jvm.thread-system.thread-43
server.jvm.thread-system.thread-44
server.jvm.thread-system.thread-45
server.jvm.thread-system.thread-46
server.jvm.thread-system.thread-47
server.jvm.thread-system.thread-49
server.jvm.thread-system.thread-5
server.jvm.thread-system.thread-9
server.network
server.network.admin-listener
server.network.admin-listener.connection-queue
server.network.admin-listener.file-cache
server.network.admin-listener.keep-alive
server.network.admin-listener.thread-pool
server.network.http-listener-1
server.network.http-listener-1.connection-queue
server.network.http-listener-1.file-cache
server.network.http-listener-1.keep-alive
server.network.http-listener-1.thread-pool
server.network.http-listener-2
server.network.http-listener-2.connection-queue
server.network.http-listener-2.file-cache
server.network.http-listener-2.keep-alive
server.network.http-listener-2.thread-pool
server.security
server.security.web
server.transaction-service
server.web
server.web.jsp
server.web.request
server.web.servlet
server.web.session

Command list executed successfully.

Comment by Byron Nevins [ 05/Nov/10 ]

Homer -
I know what you do NOT want it to do.

What do you WANT it to do?

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

I can see exactly why you are getting the results you documented. Vijay
programmed it three months ago to do this:

Take the arg. and parse out everything before the first dot. If there is no dot
– then take the entire string. That is the server name
Then call that server and run the get command on it...

So say you give these args:

server.* --> name of server == "server"

  • --> name of remote server == "*" !!!

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

So in your case it contacts the server named "", sees that "" is not running
and returns nothing.

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

Comment by Byron Nevins [ 05/Nov/10 ]

I get no output from:

asadmin list -m monitoring-server.*

I'm guessing that monitoring-server is the name of a server instance you created?
Why am I guessing?

Comment by Byron Nevins [ 05/Nov/10 ]

I have no instructions on WHAT EXACTLY it should do.
I will implement solution #3 if I don't hear back soon...

asadmin list -m "*"

to do

What it does right now is very brain-dead. It blindly assumes that "*" is the
name of a server instance. So obviously that should change. But change to what?

(1) Assume the user wants a list of everything for DAS and every running server
instance. Call every instance and stick all the outputs into one big list

(2) Fail with an error saying something like "You must specify a server"

(3) *Assume* that if there is no server name that the user wants output from
DAS.

I like (3) – it knits together with 3.0.1 output the best.

Comment by Byron Nevins [ 05/Nov/10 ]

Here is how V2 handles 'get -m "*"'

case 1 – only DAS is running

C:\glassfish\bin>asadmin list -m "*"
server
server.applications
server.applications.WSTXServices
server.applications.__JWSappclients
server.applications.__JWSappclients.sys\.war
server.applications.__default-web-module
server.applications.adminapp
server.applications.admingui
server.connector-service
server.http-service
server.http-service.server
server.jms-service
server.jvm
server.orb
server.orb.connection-managers
server.resources
server.thread-pools

case 2: DAS and i1 are running

C:\glassfish\bin>asadmin list -m "*"
i1
i1.applications
i1.applications.WSTXServices
i1.applications.__JWSappclients
i1.applications.__JWSappclients.sys\.war
i1.applications.__default-web-module
i1.connector-service
i1.http-service
i1.http-service.server
i1.jms-service
i1.jvm
i1.orb
i1.orb.connection-managers
i1.resources
i1.thread-pools
server
server.applications
server.applications.WSTXServices
server.applications.__JWSappclients
server.applications.__JWSappclients.sys\.war
server.applications.__default-web-module
server.applications.adminapp
server.applications.admingui
server.connector-service
server.http-service
server.http-service.server
server.jms-service
server.jvm
server.orb
server.orb.connection-managers
server.resources
server.thread-pools

Comment by Byron Nevins [ 07/Nov/10 ]

Notice how the output is:

monitoring-server.server.applications

In V2 it would have been:

monitoring-server.applications

    • blocking bug created for this – 14461
Comment by Byron Nevins [ 07/Nov/10 ]

There used to be 5 lines of code figuring out what part of the "pattern" is
really the regular expression pattern and what part is the target. And handling
defaults, etc.

Now there is ~~ 300 lines of code doing this. It needs massive, but rapid,
testing by Homer informally at a console. E.g. here are a bunch of commands
that should all do what you would hope they would do

You have a cluster c1 with 2 instances c1i1, c1i2 and 2 stand-alone instance i1,i2

asadmin get -m "*" – get EVERYTHING from EVERY instance and DAS
asadmin get -m "server.*" - get everything from DAS
asadmin get -m "c1.*" get everything from c1i1 and c1i2
asadmin get -m "c1i1.*" get everything from c1i1
asadmin get -m "c1i1.server.*" exactly like above. ignore the "server."
asadmin get -m "." – just like ""

And on and on and on – you'll think of more!
asadmin get -m "
asadmin get -m "
asadmin get -m "

Comment by Byron Nevins [ 07/Nov/10 ]

There are 2 parts to this bug – get and list
get is now fixed.
list is next to be fixed.

Homer – get is ready for your testing!

C:\gf\v3\core\kernel>svn commit -F ..\qqq
Sending kernel\src\main\java\com\sun\enterprise\v3\admin\GetCommand.java
Sending
kernel\src\main\java\com\sun\enterprise\v3\admin\LocalStrings.properties
Adding
kernel\src\main\java\com\sun\enterprise\v3\admin\MonitoringReporter.java
Transmitting file data ...
Committed revision 42545.

Comment by Byron Nevins [ 10/Nov/10 ]

List is done now too.

Finis!

Comment by Tom Mueller [ 03/May/12 ]

Reopening this issue because the admin devtests are failing (sometimes) when the test that was written for this issue is enabled.

It appears that this is related to retrieving monitoring data from remote instances.





[GLASSFISH-16355] startup and footprint of larger size application deployment to 3.x Created: 14/Apr/11  Updated: 06/Mar/12

Status: Open
Project: glassfish
Component/s: performance
Affects Version/s: 3.1
Fix Version/s: not determined

Type: Bug Priority: Critical
Reporter: Nazrul Assignee: Scott Oaks
Resolution: Unresolved Votes: 6
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency
depends on GLASSFISH-16543 Performance regression in JavaEE (ejb... Open
depends on GLASSFISH-17044 [PERF] gmbal objects consuming large ... Open
depends on GLASSFISH-16540 it takes a long time to boostrap EJB ... Resolved
depends on GLASSFISH-16460 Performance regression in server startup Resolved
depends on GLASSFISH-16747 Excessive memory requirements in EJB app Resolved
depends on GRIZZLY-1144 SocketChannelOutputBuffer consumes to... Resolved
depends on GLASSFISH-17914 Don't initialize StatsProviderRegistr... Closed
Tags: 3_1-next, 3_1_1-scrubbed, 3_1_2-exclude

 Description   

Refer to this blog for description of the problem: http://ktschmidt.blogspot.com/2011/04/is-glassfish-v3-slower-and-bigger.html

Scott Oaks confirmed that the startup time issue is valid.

Also refer to this forum thread: http://forums.java.net/node/798503



 Comments   
Comment by Hong Zhang [ 15/Apr/11 ]

Assign the umbrella issue to Tom. The deployment could have a sub issue of the umbrella issue.

Comment by Tom Mueller [ 15/Apr/11 ]

Not sure why this is an admin issue. Assigning it to performance.

Comment by Nazrul [ 15/Apr/11 ]

Adding 3_1-next tag. We need a fix for this during 3.1.1.

Comment by Tim Quinn [ 09/Jun/11 ]

Linking the apparent MQ start-up regression to this more-or-less umbrella issue.

Comment by Scott Oaks [ 13/Jul/11 ]

Remaining different in heap usage after startup is attributable to retained gmbal-related references.

Comment by Scott Oaks [ 22/Nov/11 ]

We are tracking a new set of tests for this in 3.1.2.

In this set of tests (which includes one large app with multiple jars and wars, including EJBs, JSPs, MDB, etc., and one smaller web app), the heap after starting with the apps deployed in 2.1.1 consumes 41.2MB; in 3.1.2 it consumes 59.7MB. This is before an ORB is started, and hence does not include the gmbal-related references. [So that earlier comment about everything being related to gmbal is in error.] There is no load generated in this test, so lazily-initialized things will benefit the test, which may or may not be a good thing (but it follows the scenario in the posting that drives this bug).

Where does that 18.5MB come from? Here is the short answer:
Additional classes: 4MB
HK2: 4MB
Felix: 5MB
Grizzly: 3MB
Stats Provider: 2MB

In a scenario like this where a significant part of the EE modules are loaded, one place we lose out is in the infrastructure for modularization. In simple terms of classes loaded, 3.1.2 is loading 11% more classes (10K vs 9K), and the class objects themselves consume 50% more heap (12M vs 8M). That is a reflection of the added features as well as the added modularization, of course.

Then there is the memory consumed by instances of the classes. The single instance of org.jvnet.jk2.component.Habitat consumes 1.6MB of heap. However, there are are other habitats (subclasses) as well, and they are consuming at least another 1.2MB of heap (for their MultiMap) and a significant amount of memory for the LazyInhabitant objects. Total consumed by HK2 is in excess of 3.9MB.

Instances of Felix classes consume at least 4MB of heap (not including the classes held by the Felix ModuleClassLoader). The big amounts of memory there are held by Felix ModuleImpls (again not including the inner classloader objects); memory here is consumed by CapabilityImpl, RequirementImpl, and ResolverState. I realize there is overlap between some of those classes, but the 4MB calculation in the tool will have removed that overlap, and in particular the 1.2MB of heap consumed by ResolverState appears independent of the CapabilityImpl/RequirementImpl. So without understanding the code better, I can just say that it heap usage is between 4 and 5.2MB (or bigger).

Grizzly processorTasks consume 3.1MB more heap.
In 2.1.1, the three processor tasks queues consume 2.25MB of heap
In 3.1.2, the there five processor tasks queues consuming 5.3MB of heap
This is a default-configured domain

Stats Provider Registry consumes 2MB of heap

Comment by Scott Oaks [ 23/Nov/11 ]

The extra classes contribute as well to the regression in the time to restart the server: they cause a few expansions of the perm gen as it fills up with the extra classes.

In 2.1.1, a server restart with the EJB apps deployed goes through one resizing of permgen on my laptop; in 3.1.2, there are three or four. If we increase the initial size of perm gen (keeping the max size at 192m), we can improve the server restart in this scenario by 11%. But that will affect the footprint of other smaller deployments, so some discussion on the trade-offs here needs to occur.

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

We won't be making any more progress on this for 3.1.2 so I'm excluding from the release. We did get a gmbal fix into Metro that helps WS applications, but not EJB. The ORB fix has proven more difficult (see linked gmbal bug).

Comment by Tom Mueller [ 06/Mar/12 ]

Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.





[GLASSFISH-16717] LB tests compilation error on AIX due to com.sun.net.ssl.HostnameVerifier dependency Created: 24/May/11  Updated: 04/Jan/12

Status: Open
Project: glassfish
Component/s: test
Affects Version/s: 3.1.1_b06
Fix Version/s: None

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

AIX 6.1, IBM JDK 1.6.0


Tags: 3_1_1-scrubbed

 Description   

The SQE HA LB tests have dependency on JDK package com.sun.net.ssl.HostnameVerifier that doesn't exist on IBM JDK. Compilcation error on IBM JDK for LB tests:

compile-common:
[javac] Compiling 130 source files to /export/home/ming/gf-ha-qe/build
[javac] /export/home/ming/gf-ha-qe/functional/lb/src/com/sun/dft/glassfish/lb/RR/http/MultipleFailoverHttpOnly.java:24: package com.sun.net.ssl does not exist
[javac] import com.sun.net.ssl.HostnameVerifier;
[javac] ^
[javac] /export/home/ming/gf-ha-qe/functional/lb/src/com/sun/dft/glassfish/lb/RR/http/OnlyHttpsListeners.java:21: package com.sun.net.ssl does not exist
[javac] import com.sun.net.ssl.HostnameVerifier;
[javac] ^
[javac] /export/home/ming/gf-ha-qe/functional/lb/src/com/sun/dft/glassfish/lb/RR/https_routing_off/BasicHttps.java:23: package com.sun.net.ssl does not exist
[javac] import com.sun.net.ssl.HostnameVerifier;
[javac] ^
[javac] /export/home/ming/gf-ha-qe/functional/lb/src/com/sun/dft/glassfish/lb/RR/https_routing_off/FailoverHttpHttpHttpsSingleSession.java:24: package com.sun.net.ssl does not exist
[javac] import com.sun.net.ssl.HostnameVerifier;
[javac] ^

java version "1.6.0"
Java(TM) SE Runtime Environment (build pap3260sr9fp1-20110208_03(SR9 FP1))



 Comments   
Comment by Alex Pineda [ 24/May/11 ]

Need help to find the solution to this issue

Comment by Alex Pineda [ 24/May/11 ]

Changing the category to "other" as we, QA, needs help with this issue.

Comment by scatari [ 24/May/11 ]

This is a test issue, consider using javax.net.ssl.HostnameVerifier instead of Sun specific implementation. The alternative is to bundle Sun Implementation in a special jar and use it in the classpath. Assigning back to the test Engineer.





[GLASSFISH-16973] Unable to deploy EJB application to second embedded glassfish instance. Created: 06/Jul/11  Updated: 14/Feb/13

Status: Open
Project: glassfish
Component/s: orb
Affects Version/s: 3.1.1, 4.0
Fix Version/s: future release

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

any


Attachments: Text File console.log.txt     Java Source File Test.java    
Tags: 3_1_2-exclude

 Description   

This is a case where :

1. I create a embedded glassfish instance, start it, deploy a ejb app, and stop/dispose the instance. Note that the application is not undeployed prior to the stop (the case is slightly different from GLASSFISH-16965)

2. I create a second embedded glassfish instance, start it, deploy the same app as in (1), stop/dispose the instance.

But the deployment of ejb app to the second instance fails with

 "java.lang.RuntimeException: Error while binding JNDI name org.glassfish.tests.embedded.ejb.remoteejb.RemoteEJBInf__3_x_Internal_RemoteBusinessHome__ for EJB : RemoteEJB". 

Steps to reproduce:

1. Download the attached Test.java
2. Download remoteejb.jar from GLASSFISH-16546
3. Set S1AS_HOME to point to your 3.1.1 installation
4. javac -g -cp $S1AS_HOME/lib/embedded/glassfish-embedded-static-shell.jar Test.java
5. java -cp $S1AS_HOME/lib/embedded/glassfish-embedded-static-shell.jar: Test; // I have attached my console output.

I happen to exercise this case because of the workaround mentioned in GLASSFISH-16916 by Harshad. Unfortunately the workaround does not work because of this issue.



 Comments   
Comment by marina vatkina [ 06/Jul/11 ]

One more area not designed for a restart in the same VM...

Comment by marina vatkina [ 06/Jul/11 ]

Note that embeddable EJB Container works fine because it completely disposes GFRuntime.

Comment by Cheng Fang [ 10/Jul/11 ]

There was an error when calling unpublishCosNamingObject for EJB internal home jndi name during shutdown. So these 2 entries remain in TransientContext bindings. My proposal is to ignore this orb failure and continue to unbind them from TransientContext.

The stacktrace:

java.lang.NullPointerException
	at com.sun.corba.ee.impl.orb.ORBImpl.getInvocationInfo(ORBImpl.java:1911)
	at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.getClientRequestDispatcher(CorbaClientDelegateImpl.java:308)
	at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.releaseReply(CorbaClientDelegateImpl.java:290)
	at org.omg.CORBA.portable.ObjectImpl._releaseReply(ObjectImpl.java:474)
	at org.omg.CosNaming._NamingContextStub.unbind(_NamingContextStub.java:301)
	at com.sun.jndi.cosnaming.CNCtx.callUnbind(CNCtx.java:712)
	at com.sun.jndi.cosnaming.CNCtx.unbind(CNCtx.java:768)
	at com.sun.jndi.cosnaming.CNCtx.unbind(CNCtx.java:752)
	at javax.naming.InitialContext.unbind(InitialContext.java:416)
	at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.unpublishCosNamingObject(GlassfishNamingManagerImpl.java:260)
	at com.sun.ejb.containers.BaseContainer$JndiInfo.unpublish(BaseContainer.java:5618)
	at com.sun.ejb.containers.BaseContainer.doContainerCleanup(BaseContainer.java:4298)
	at com.sun.ejb.containers.BaseContainer.onShutdown(BaseContainer.java:4237)
	at org.glassfish.ejb.startup.EjbApplication.stop(EjbApplication.java:307)
	at org.glassfish.internal.data.EngineRef.stop(EngineRef.java:169)
	at org.glassfish.internal.data.ModuleInfo.stop(ModuleInfo.java:302)
	at org.glassfish.internal.data.ApplicationInfo.stop(ApplicationInfo.java:322)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.unload(ApplicationLifecycle.java:999)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.disable(ApplicationLifecycle.java:1971)
	at com.sun.enterprise.v3.server.ApplicationLoaderService.stopApplication(ApplicationLoaderService.java:454)
	at com.sun.enterprise.v3.server.ApplicationLoaderService.preDestroy(ApplicationLoaderService.java:422)
	at com.sun.hk2.component.AbstractCreatorInhabitantImpl.dispose(AbstractCreatorInhabitantImpl.java:83)
	at com.sun.hk2.component.SingletonInhabitant.release(SingletonInhabitant.java:81)
	at com.sun.hk2.component.EventPublishingInhabitant.release(EventPublishingInhabitant.java:108)
	at com.sun.hk2.component.LazyInhabitant.release(LazyInhabitant.java:133)
	at com.sun.enterprise.v3.server.AppServerStartup.stop(AppServerStartup.java:425)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.stop(GlassFishImpl.java:88)
	at Test.main(Test.java:22)
Comment by Cheng Fang [ 10/Jul/11 ]

Tried this following fix in GlassFishNamingManagerImpl, the attached the test passed:

Index: src/main/java/com/sun/enterprise/naming/impl/GlassfishNamingManagerImpl.java
===================================================================
--- src/main/java/com/sun/enterprise/naming/impl/GlassfishNamingManagerImpl.java	(revision 47909)
+++ src/main/java/com/sun/enterprise/naming/impl/GlassfishNamingManagerImpl.java	(working copy)
@@ -258,7 +258,7 @@
 
         try {
             getCosContext().unbind(name);
-        } catch(NamingException cne) {
+        } catch(Exception cne) {
            _logger.log(Level.WARNING, "Error during CosNaming.unbind for " + name); 
         }
Comment by Cheng Fang [ 12/Jul/11 ]

Assign to orb team to evaluate the ORB NPE.

Comment by Harshad Vilekar [ 14/Feb/13 ]

Defer the restart requirement. There are missing defensive null value checks at some places in the ORB code.





[GLASSFISH-17074] Jersey picks wrong JAXB Context when Accept: header is missing Created: 20/Jul/11  Updated: 15/Dec/11

Status: Open
Project: glassfish
Component/s: jax-rs
Affects Version/s: 3.1.1_b11
Fix Version/s: None

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

Win7 Pro SP1 64 Bit de_DE


Tags: 3_1_2-exclude

 Description   

(This problem was already discussed with Jakub Podlesak of the Jersey team. He has a GF3Fail.war which proofs the failure).

When a client does not care of the returned document type, it does not send an Accept: header. So the server is free to decide for a type that it thinks fits best. In case there is NO @Produces annotation found in a resource, and the application containing that resource has registered its own context provider HAVING a @Produces annotation, it is obvious that THIS custom provider shall be used to marshal the returned entity AND to define the use Content-Type: header when responding.

Actually this is not working in GFv3.1.1_b11 as the contained Jersey engine does NOT pick that custom context provider, but instead ALWAYS asks its own JSON context provider to marshal the result. This is working when the declared return type of the resource method is the custom JAXB class (actually it would be more smart to FIRST give the application-defined provider a chance to marshal the response before picking a Jersey-addon, but this is a different story).

But it is NOT WORKING (JSON context says it does not know that entity class) in case the declared return type is javax.ws.rs.core.Response and the actual entity class is to be retrieved from the dynamically provided entity given to Response.ok(CustomClass)! In that case the JSON provider is picked, which says it does not know that class.

As long as the JSON provider is picked by Jersey, it MUST add the dynamically the class found in the actual dynamic response.

A far better solution obviously would be to FIRST ask the application-provided providers to do the marshalling as this obviously is what the application programmer tries to achieve (as he doesn't know of the JSON provider at all).

There are two possible workarounds, which both render unuseable in case neither the code of the client not the code of the WAR is available to the GlassFish v3 administrator. As a result, this is a showstopper for non-programmers and such must get fixed ASAP.

(A) Change the client to always provide Accept: header – Only possible if the GlassFish administrator has control over all users, what is ridiculous in case of public anonymous services. Also this does not reflect the typical web scenario, where a client can safely assume to get back anything as long as the server can send anything (which this server could if not having this bug).

(B) Add @Provides(contentType) to the resource method – Only possible if the GlassFish administrator has control over the WAR's source code, what is ridiculous in case of running third party off-the-shelf applications provides by large ISVs ("We tested with application server XYZ and will not change our WAR just to make it run in your buggy server!").



 Comments   
Comment by mkarg [ 26/Jul/11 ]

Any progress here regarding a real fix? I mean, the workaround is nice and simple but enforces a software change either on the client or the server (what to do if one has no access to the source?). There should be a solution that does not need any changes in the application.

Comment by Jakub Podlesak [ 29/Jul/11 ]

Lowering the priority to Critical, as there are workarounds for the issue (see above),
so i do not consider it a show-stopper.

I still do not know what is wrong, as (in spite of what's written in the description)
the provided JAXB context is picked up and used by the JSON provider.
It could also be a class-loading issue.

Anyway, it is generally a good practice to use the @Produces annotation in order
to mark the resource methods with media types intended to be produced. And this
good practice is broken here.

Comment by mkarg [ 01/Aug/11 ]

As the solution enforces a source code change in the deployed application, this breaks the WORA principle and such IS a showstopper for ISVs. You cannot expect that every GlassFish administrator has full access to the source code of all deployed applications, and you cannot expect ISVs to change their source code (possibly developed with a different JAX-RS product) just to make it run on Jersey.

Comment by scatari [ 04/Nov/11 ]

Please evaluate this for possible inclusion into 3.1.2.

Comment by Jakub Podlesak [ 15/Dec/11 ]

Excluding from 3.1.2

Please see the reasoning in my previous comment above.
The custom context resolver is indeed being utilized.

The workaround (A) could still be considered.
Because even when server does not have direct control over
all the clients, one can utilize a server side filter which could
add the accept header to all incoming requests, when such a header
is missing.





[GLASSFISH-17107] LDAP authentication gets replaced by File authentication as a side-effect of bootAMX Created: 26/Jul/11  Updated: 06/Jan/12

Status: Open
Project: glassfish
Component/s: amx
Affects Version/s: 9.0pe, 3.1.1_b10
Fix Version/s: None

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

Windows 7


Tags: 3_1_1-next, 3_1_1-scrubbed, 3_1_2-exclude

 Description   

We have an enterprise application consisting of several parts where access is restricted to users holding specific roles. The server-config's default realm is an LDAPRealm. One of our EJBs uses AMX to retrieve details about available connection pools. To make sure AMX is available, the EJB invokes bootAMX the first time this information is requested:

final MBeanServer mBeanServer = java.lang.management.ManagementFactory.getPlatformMBeanServer();
...
final ObjectName jdbcPoolObjName = new ObjectName("amx:type=jdbc-connection-pool,*");
Set<ObjectName> connectionPoolNames = mBeanServer.queryNames(jdbcPoolObjName, null);
if (connectionPoolNames.isEmpty()) {
mBeanServer.invoke(new ObjectName("amx-support:type=boot-amx"), "bootAMX", new Object[0], new String[0]);
...

This works fine for the first request, but any following requests are rejected with authentication failure. From the server.log I can see that File authentication is attempted for these requests:

...
Caused by: javax.security.auth.login.LoginException: Failed file login for user1.
at com.sun.enterprise.security.auth.login.FileLoginModule.authenticate(FileLoginModule.java:84)
...

This is also the case for attempts to access other part of our application. The same problem occurs if AMX is booted by other means, e.g. by making a connection to the Admin Service with JConsole. It looks like the AMX boot process has a side-effect that makes GlassFish ignore its default realm.

However, if I log in to the GlassFish Admin Console after booting AMX, the situation goes back to normal. The server.log output from this is (I use the default settings for logging):

[#|2011-07-26T08:42:39.492+0200|INFO|glassfish3.1.1|com.sun.jersey.server.impl.application.WebApplicationImpl|_ThreadID=26;_ThreadName=Thread-2;|Initiating Jersey application, version 'Jersey: 1.8 06/24/2011 12:17 PM'|#]

Somehow, this has a side-effect that brings the default realm back into play.

(The problem was discovered when migrating the application from GlassFish version 2. It has been reproduced with both b10 and b13 of the 3.1.1 version.)



 Comments   
Comment by kumarjayanti [ 26/Jul/11 ]

I do believe this is an issue and i had filed a similar issue on AMX earlier though it is not resolved yet. I think that bug became irrelevant because Admin GUI no longer uses AMX.

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

Assigning to AMX team.

Comment by paal [ 26/Jul/11 ]

I have tried to switch to LDAPRealm for authentication of GlassFish admin user, by redefining the server-config's 'admin-realm' as an LDAPRealm, adding a group named 'asadmin' in OpenDS, and adding a user 'admin2' as member of the 'asadmin' group. This works fine for login as 'admin2' in the GlassFish Admin Console, but booting AMX still switches things to File authentication.

However, if I also define the default-config's 'admin-realm' as an LDAPRealm, and remove all FileRealms and CertificateRealms from both server-config and default-config, the problem finally disappears. I have confirmed that the presence of another type of realm (DataSourceRealm, our own custom realm) does not cause similar problems.

Comment by prasads [ 06/Jan/12 ]

Excluding from 3.1.2





[GLASSFISH-17281] javax.ejb.AsyncResult in Remote interfaces with DTOs generates ClassCastException on client Created: 08/Sep/11  Updated: 23/Nov/12

Status: In Progress
Project: glassfish
Component/s: orb
Affects Version/s: 3.1.1_b12
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: vins4java Assignee: Harshad Vilekar
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows Vista SP2
JDK 1.6.0_26


Attachments: Zip Archive AsyncTestCase-src.zip     File module-a-ear.ear     File module-b-ear.ear    
Tags: 3_1_2-exclude, asynchronous, ejb31

 Description   

Scenario:

  • 2 ear apps say A and B (module-a-ear and module-b-ear)
  • each ear has contains an ejb-jar (module-a-ejb and module-b-ejb)
  • A's ejb exposes remote interface with an @Asyncronous method
  • the asyncronous method returns a serializable DTO (ADto)
  • both A and B have the same copy of A's ejbClient in their ear's root (module-a-ejbClient.jar)

when a method of B calls a remote asynch method on A, the call is perfomed but when Future<ADto> is done, on module-b-ejb side a ClassCastException is thrown when invoking:
ADto wrappedDto = futureDto.get();

EJB 3.1 specs don't make dinstinction about local or remote interface for @Asynchrouse annotation.They also don't put any limitation in Future<V>, so Data Transfer Objects (serializable) must be supported, right?

In order to have a very simple test case (didn't want to create JEE appclient..) I've annotated module-b-ejb as WebService so that you can call module-b-ejb method via glassfish admin gui webservice tester. You can find a stacktrace in the attached zip file. I also provided the 2 deployable ear files.

IMHO:
Debugging on client side (using eclipse debugger) I had a look at classloader of the ADto instance received from A: it's the A's classloader, not B's! It's strange because I tried also to change method in the "old traditional" synch fashion( public ADto doAsync() ) and on client side the returning ADto correclty comes from A's classloader. Does this help?



 Comments   
Comment by vins4java [ 14/Oct/11 ]

any update on this issue?

Comment by Cheng Fang [ 14/Oct/11 ]

I was able to reproduce it on trunk build. Stack trace is the same as in your attachment(except slightly different line numbers):

        at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:5219)
        at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5117)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4905)
        at com.sun.ejb.containers.WebServiceInvocationHandler.invoke(WebServiceInvocationHandler.java:207)
        at $Proxy234.testIt(Unknown Source)
        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 org.glassfish.webservices.InvokerImpl.invoke(InvokerImpl.java:82)
        at org.glassfish.webservices.EjbInvokerImpl.invoke(EjbInvokerImpl.java:82)
        at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:150)
        at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:261)
        at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:100)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:641)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:600)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:585)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:482)
        at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:116)
        at org.glassfish.webservices.MonitoringPipe.process(MonitoringPipe.java:142)
        at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:119)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:641)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:600)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:585)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:482)
        at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:116)
        at com.sun.enterprise.security.webservices.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:212)
        at com.sun.enterprise.security.webservices.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:144)
        at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:119)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:641)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:600)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:585)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:482)
        at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:314)
        at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:608)
        at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:259)
        at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:162)
        at org.glassfish.webservices.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:116)
        at org.glassfish.webservices.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:87)
        at org.glassfish.webservices.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:198)
        at org.glassfish.webservices.EjbWebServiceServlet.service(EjbWebServiceServlet.java:129)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
        at org.glassfish.grizzly.servlet.ServletHandler$FilterChainImpl.doFilter(ServletHandler.java:985)
        at org.glassfish.grizzly.servlet.ServletHandler$FilterChainImpl.invokeFilterChain(ServletHandler.java:928)
        at org.glassfish.grizzly.servlet.ServletHandler.doServletService(ServletHandler.java:382)
        at org.glassfish.grizzly.servlet.ServletHandler.service(ServletHandler.java:335)
        at com.sun.enterprise.v3.server.HK2Dispatcher.dispatch(HK2Dispatcher.java:113)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:236)
        at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:163)
        at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:161)
        at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:286)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:223)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:155)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:134)
        at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:78)
        at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:827)
        at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:103)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:111)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:131)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:508)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:488)
        at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.ClassCastException: module.a.ejb.ADto cannot be cast to module.a.ejb.ADto
        at module.b.ejb.BBean.testIt(BBean.java:36)
        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 org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
        at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5392)
        at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:624)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:790)
        at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:576)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
        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.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:851)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:790)
        at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:361)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5364)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5352)
        at com.sun.ejb.containers.WebServiceInvocationHandler.invoke(WebServiceInvocationHandler.java:195)
        ... 60 more
Comment by Cheng Fang [ 18/Oct/11 ]

If you do not call future.isDone() on the client side, I suspect it will work.

Comment by vins4java [ 18/Oct/11 ]

unfortunately your suspect seems to be wrong: I get the same error even if I comment isDone() call on client ejb.
I've tested this modification on Glassfish 3.1.1-build12 ( on ubuntu with java-6-sun-1.6.0.26 ).
Did you try it with trunk version (3.2)?

Comment by Cheng Fang [ 19/Oct/11 ]

Looks like the payload didn't go thru proper marshalling and unmarshalling when both sides are colocated. It could also be some caching problem.

Comment by vins4java [ 25/Oct/11 ]

So you tried deploying each ear in two different JVMs (on the same physical machine or two different ones) and it worked, or you are supposing so? let me know if there's a way for me to help you to solve this problem. We are going to rely on this feature in short/med term...

Comment by Cheng Fang [ 25/Oct/11 ]

If the two modules are deployed into separate JVM, either same host or different hosts, that should work.
There is total separation of classloaders and so shouldn't be any CCE. What I found now is the DAO instance
on the ejb server side is different from the DAO instance on the client side, which means the serialization and
deserialization did happen. But the wrong classloader (the server side classloader) was used to reconstruct
the DAO on the client side. The client side application classloader should've been used for that.

Another complication is it is not the Java serialization protocol that's been used here. I'm trying to find out
how classloader is picked to copy objects by GlassFish corba and its related modules (see
glassfish.home/modules/glassfish-corba-orb.jar, pfl*.jar).

Again I think this issue only happens with all of the following:
remote async ejb method invocations;
both client and server modules are colocated in the same JVM;
some application class (e.g., business interface classes) are duplicated in both client and server modules

If you package client module and ejb module inside the same EAR file, and extract all shared classes into EAR/lib/xxx.jar,
without duplicating them in client and ejb modules, that should help avoid this CCE. I just tried it and worked.

Comment by Cheng Fang [ 04/Nov/11 ]

In org/glassfish/pfl/dynamic/copyobject/impl/ClassCopierOrdinaryImpl (in modules/pfl-dynamic.jar)
obj.getClass() is called to get the Class, which is then used to create a class copier, which in turn creates the constructor. It is hence associated with the class loader of the source object, not the target.

This part of the code is executed to copy all fields of a source object.

After changing to use thread context class loader in instead of
obj.getClass(), it worked without CCE. There could be other places the kind of changes are also necessary. Also not clear about the full implication or side effects.

Comment by Cheng Fang [ 04/Nov/11 ]

re-assign to orb team for further evaluation.

Comment by Harshad Vilekar [ 15/Dec/11 ]

Cheng and I exchanged email on this - and decided to target this issue post 3.1.2

Comment by juergenschmied [ 23/Nov/12 ]

I get this problem after upgrading from 3.1.2 to 3.1.2.2. A application that was working before is now broken with this error. Would it help do use a Future<ByteArrayOutputStream> an do serialization/deserialization by myself? It looks like this bug does not affect build-in classes.

Thanks!





[GLASSFISH-17310] Remote session bean call with entity - data problem/corba stream corruption when using IP address Created: 16/Sep/11  Updated: 25/Nov/11

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

Type: Bug Priority: Critical
Reporter: sarnoth Assignee: Harshad Vilekar
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: 3_1_2-exclude

 Description   

When a session bean is called remotely and either its parameters or return value contain an entity bean there is a data transmission problem that seems to be caused by corba stream corruption when the InitialContext was created using an IP address.

The problem manifests as follows:

  • If a single entity is passed in or out of the method it is received with all values set to null even though they were filled in on the sending side.
  • If a List of entities is passed in or out an exception is generated from within the corba stack indicating stream corruption. The exact exception varies depending on the makeup of the entity.

The problem can be reproduced in two ways:

  • From a simple standalone program construct an InitialContext with a properties object where an IP address is specified for org.omg.CORBA.ORBInitialHost. Call a method on a remote session bean interface passing in a new instance of an entity bean or receiving one as a return value.
  • Deploy two ears to the same cluster. One ear should contain a session bean with remote interface and entity bean. The other ear should contain a component that calls the session bean in the first ear via an injected reference (@EJB MyTestSessionRemote foo and passes in an entity or receives one as a return value. This is the real show stopper since we do not have control over the host name used in this case so we have no way to make sure that it is not an IP address. This always fails and is preventing us from being able to migrate to glassfish 3.1.1.

Additional notes:

  • This happens only for entities, not for other objects or lists of object. The state of the entity does not matter (new, managed, detached).
  • The problem happens only when an IPv4 IP address is used. It does not happen when a host name is used and it does not happen when an IPv6 address is used.
  • A tcpdump on the side of an external client passing in an entity through a remote interface shows that the data is being sent across the wire, so it would seem to be a problem on the deserialization side.
  • The problem happens if IP addresses are used with the "com.sun.appserv.iiop.endpoints" property as well as if an IP address is used with the "org.omg.CORBA.ORBInitialHost" property.

Simple standalone client example that demonstrates the problem:
public static void main(String[] args) throws NamingException {
Properties contextEnv = new Properties();
// contextEnv.setProperty("org.omg.CORBA.ORBInitialHost", "testhostname"); // problem does not happen
contextEnv.setProperty("org.omg.CORBA.ORBInitialHost", "x.y.z.w"); // problem happens
// contextEnv.setProperty("org.omg.CORBA.ORBInitialHost", "[::FFFF:x.y.z.w]"); // problem does not happen
contextEnv.setProperty("org.omg.CORBA.ORBInitialPort", "11037");
InitialContext ctx = new InitialContext(contextEnv);
TestSessionRemote t = (TestSessionRemote)ctx.lookup(TestSessionRemote.class.getName());
TestEntity e = new TestEntity(1, "test1", 1L); // int, String, Long
t.test(e); // when the problem happens the received values are 0, null, null
}

Let me know if there is any more information that I can provide. This is a critical issue for us.



 Comments   
Comment by Cheng Fang [ 16/Sep/11 ]

assign to orb for initial evaluation.

Are these entities serializable, or employ any custom serialization?

Comment by sarnoth [ 16/Sep/11 ]

The entities implement Serializable and have a serialVersionUID. There is no custom serialization and all the column types are simple (int, String, Long). Below is a test entity that I used to reproduce the problem.

@Entity
@Table(schema = "svrmgr", name = "site_code")
public class TestEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    
    @Id
    @Column(name = "site_id", nullable = false)
    private int id;
    
    @Column(name = "site_name", nullable = false)
    private String name;
    
    @Column(name = "initial_duration_seconds", nullable = false)
    private Long value;
    
    public TestEntity() {
    }

    public TestEntity(int id, String name, Long value) {
        this.id = id;
        this.name = name;
        this.value = value;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getValue() {
        return value;
    }

    public void setValue(Long value) {
        this.value = value;
    }
}
Comment by Cheng Fang [ 18/Nov/11 ]

so the key points here are IPv4 IP address and the de-serialization of entity objects. Have you tried configuring or disabling eclipselink weaving? Not sure if that's related, just some wild guess.

Comment by sarnoth [ 21/Nov/11 ]

I tried disabling weaving and that did work around the problem.

Comment by thomas.giger [ 25/Nov/11 ]

We see exactly the same problem (except for the fact that the hostname does not work either)
In our environment, disabling weaving is not an option..? Are there any other work-arounds known?





[GLASSFISH-17449] Redeploy memory leak Created: 20/Oct/11  Updated: 11/Jun/14

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

Type: Bug Priority: Critical
Reporter: jelinj14 Assignee: russgold
Resolution: Unresolved Votes: 12
Labels: None
Remaining Estimate: 1 day
Time Spent: Not Specified
Original Estimate: 1 day
Environment:

windows 7, 64bit


Attachments: File keepalive-ref.tiff     File runtest.sh    
Tags: 3_1_2-exclude, 4_0_1-approved, 4_0_1-evangelists, memoryleak, orb-review, redeploy

 Description   

Redeployment causes memory leaks, using jmap and jhat can resolve for example: org.glassfish.javaee.full.deployment.EarClassLoader this class has instance each deploy and undeploy even if app is undeployed



 Comments   
Comment by Hong Zhang [ 21/Oct/11 ]

Assign to tim to take a look as he has done a lot of work of tracking down memory leak in 3.1.1.

Comment by Tim Quinn [ 21/Oct/11 ]

I was able to reproduce the problem.

I deployed a simple EAR (containing an EJB) 100 times, and saw 100 EarClassLoader instances remaining live, even after forcing GCs using jconsole.

(I will attach the simple shell script I used.)

Run the script, then browse to http://localhost:7000.

At least part of the problem seems to be caused by EJB monitoring retaining a reference to each StatelessSessionContainer, which in turn has a reference to EarClassLoader.

I am transferring this to the EJB team for investigation into cleaning up the references from monitoring when a container is retired.

Comment by Tim Quinn [ 21/Oct/11 ]

Attached runtest.sh for repeatedly deploying an app and monitoring memory usage.

Comment by jelinj14 [ 21/Oct/11 ]

When the application is bigger, (I have about 70 stateless session beans on EJB side) it causes big memory leak, every deploy is about 90MB leaks. But I'm not sure whether is it only EarClassLoader.
Thanks for resolve.

Comment by Tim Quinn [ 21/Oct/11 ]

There might well be other issues besides the one I found so far. Once that one is resolved we will look into this again for other leaks.

Comment by Cheng Fang [ 25/Oct/11 ]

Hi Tim, I tried your script with my test EAR on trunk build, and had different results. After finishing your script (100 deploy/undeploy), the result page shows only 3 instances of EarClassLoader.

I then tried deployed/undeploy one by one, and also shows any time after GC, the count is at most 3. The small number of left over instances could be related to annotation processing tasks.

Comment by Tim Quinn [ 25/Oct/11 ]

Cheng,

Perhaps something has changed between 3.1.1 and 4.0 (trunk) then. (I do not have a chance right now to try it myself on the trunk.)

Can whatever the change is be back-ported to 3.1.2? (I realize that requires understanding what change(s) are responsible for the better behavior in 4.0).

Comment by Cheng Fang [ 25/Oct/11 ]

Related to http://java.net/jira/browse/GLASSFISH-17468 (WebappClassLoader leak after undeployment)

Comment by Cheng Fang [ 03/Nov/11 ]

Once issue 17468 is resolved, it will help eliminate some causes of leaks.

Another source of leaks, when deploying apps with remote ejb, is from orb layer. An instance of com.sun.corba.ee.impl.javax.rmi.CORBA.KeepAlive holds a reference to the EarClassLoader after undeploy.

Comment by Cheng Fang [ 03/Nov/11 ]

Attached a screen shot of reference from com.sun.corba.ee.impl.javax.rmi.CORBA.KeepAlive

Comment by Cheng Fang [ 03/Nov/11 ]

re-assign to orb team to evaluate if we can reset the context class loader when creating the KeepAlive thread, to avoid inheriting the app class loader from the parent thread.

Comment by notabenem [ 02/Dec/13 ]

Just run into this on Glassfish 4: com.sun.corba.ee.impl.javax.rmi.CORBA.KeepAlive prevents the EAR from being garbage collected.
This pretty much eliminates the possibility of a reliable reloading mechanism (Continuous delivery)

Comment by electricsam [ 15/Jan/14 ]

I too can confirm that this is occurring in Glassfish 4.0

Comment by electricsam [ 30/Jan/14 ]

I've investigated a workaround until this is fixed. I found references to the current EarClassLoader (to be undeployed) in the following locations:

1. contextClassLoader in various threads
2. Direct references in ThreadLocals in varous threads
3. A contextClassLoader reference in the selector thread of the following field heirerchy: thread.orb.transportManager.selector
4. A contextClassLoader reference in the static resyncThread field of the com.sun.jts.CosTransactions.RecoveryManager class
5. Lots of indirect references in the ThreadLocals in the admin-listener threads

The below listed code will attempt to clean up items 1-3 when an app is undeployed (or redeployed).

For item 4, I was unable to get a reference to the RecoveryManager that had a contextClassLoader reference, but it is static and not as bad as a thread pool issue.

For item 5, the number of references and the object hierarchy depth made a workaround difficult. My best attempt was to limit the pool size for the admin-thread-pool to 5 with a min of 0 and a timeout of 0 (Although, I never see the pool shrink after it reaches capacity). There is still a leak here, but does not seem to grow past a certain point.

Hopefully this will help the GF dev that looks at this issue or any GF users with the same problem until then.

Bar.java
package test;

import java.lang.reflect.Array;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.PreDestroy;
import javax.ejb.Singleton;
import javax.ejb.Startup;

@Singleton
@Startup
public abstract class ClassLoaderCleaner {

    private static final Logger logger = Logger.getLogger(ClassLoaderCleaner.class.getName());

    private ClassLoader loader = null;

    @PreDestroy
    protected void destroy() {
        try {
            loader = getClass().getClassLoader();
            cleanUp();
        } catch (Throwable e) {
            logger.log(Level.SEVERE, null, e);
        }
    }

    private void cleanUp() {
        Thread[] threads = getThreads();
        for (Thread thread : threads) {
            if (thread != null) {
                cleanContextClassLoader(thread);
                cleanOrb(thread);
                cleanThreadLocal(thread);

            }

        }
    }
    
        private Thread[] getThreads() {
        ThreadGroup rootGroup = Thread.currentThread().getThreadGroup();
        ThreadGroup parentGroup;
        while ((parentGroup = rootGroup.getParent()) != null) {
            rootGroup = parentGroup;
        }

        Thread[] threads = new Thread[rootGroup.activeCount()];
        while (rootGroup.enumerate(threads, true) == threads.length) {
            threads = new Thread[threads.length * 2];
        }
        return threads;
    }

    private boolean loaderRemovable(ClassLoader cl) {
        if (cl == null) {
            return false;
        }
        Object isDoneCalled = getObject(cl, "doneCalled");
        if (cl.getClass().getName().equals(loader.getClass().getName())
                && isDoneCalled instanceof Boolean && (Boolean) isDoneCalled) {
            return true;
        }
        return loader == cl;
    }

    private Field getField(Class clazz, String fieldName) {
        Field f = null;
        try {
            f = clazz.getDeclaredField(fieldName);
        } catch (NoSuchFieldException ex) {

        } catch (SecurityException ex) {
            logger.log(Level.WARNING, "Unable to get field " + fieldName + " on " + clazz.getName(), ex);
        }

        if (f == null) {
            Class parent = clazz.getSuperclass();
            if (parent != null) {
                f = getField(parent, fieldName);
            }
        }
        if (f != null) {
            f.setAccessible(true);
        }
        return f;
    }

    private Object getObject(Object instance, String fieldName) {
        Class clazz = instance.getClass();
        Field f = getField(clazz, fieldName);
        if (f != null) {
            try {
                return f.get(instance);
            } catch (IllegalArgumentException | IllegalAccessException ex) {
                logger.log(Level.WARNING, "Unable to get " + fieldName + " on " + clazz.getName(), ex);
            }
        }
        return null;
    }

    private void cleanContextClassLoader(Thread thread) {
        if (loaderRemovable(thread.getContextClassLoader())) {
            thread.setContextClassLoader(null);
            logger.log(Level.INFO, "Cleaned context classloader {0}", thread.getName());
        }
    }

    private void cleanOrb(Thread thread) {
        Object currentWork = getObject(thread, "currentWork");
        if (currentWork != null) {
            Object orb = getObject(currentWork, "orb");
            if (orb != null) {
                Object transportManager = getObject(orb, "transportManager");
                if (transportManager != null) {
                    Thread selector = (Thread) getObject(transportManager, "selector");
                    if (selector != null && loaderRemovable(selector.getContextClassLoader())) {
                        selector.setContextClassLoader(null);
                        logger.log(Level.INFO, "Cleaned orb ref {0}", thread.getName());
                    }
                }
            }
        }
    }

    private void removeThreadLocal(Object entry, Object threadLocals, Thread thread) {
        ThreadLocal threadLocal = (ThreadLocal) getObject(entry, "referent");
        if (threadLocal != null) {
            Class clazz = null;
            try {
                clazz = Class.forName("java.lang.ThreadLocal$ThreadLocalMap");
            } catch (ClassNotFoundException ex) {
                logger.log(Level.WARNING, null, ex);
            }
            if (clazz != null) {
                Method removeMethod = null;
                Method[] methods = clazz.getDeclaredMethods();
                if (methods != null) {
                    for (Method method : methods) {
                        if (method.getName().equals("remove")) {
                            removeMethod = method;
                            removeMethod.setAccessible(true);
                            break;
                        }
                    }
                }
                if (removeMethod != null) {
                    try {
                        removeMethod.invoke(threadLocals, threadLocal);
                        logger.log(Level.INFO, "Cleaned threadlocal {0}", thread.getName());
                    } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
                        logger.log(Level.SEVERE, null, ex);
                    }
                }

            }

        }
    }

    private void cleanThreadLocal(Thread thread) {
        Object threadLocals = getObject(thread, "threadLocals");
        if (threadLocals != null) {
            Object table = getObject(threadLocals, "table");
            if (table != null) {
                int size = Array.getLength(table);
                for (int i = 0; i < size; i++) {
                    Object entry = Array.get(table, i);
                    if (entry != null) {
                        Field valueField = getField(entry.getClass(), "value");
                        if (valueField != null) {
                            try {
                                Object value = valueField.get(entry);
                                if (value != null && value instanceof ClassLoader && loaderRemovable((ClassLoader) value)) {
                                    removeThreadLocal(entry, threadLocals, thread);
                                }
                            } catch (IllegalArgumentException | IllegalAccessException ex) {
                                logger.log(Level.WARNING, "Unable to get threadlocal value", ex);
                            }

                        }
                    }

                }
            }
        }
    }

}
Comment by Ed Bratt [ 20/May/14 ]

Assigned FYI ...

Comment by russgold [ 11/Jun/14 ]

If, as notabenem says, it is the KeepAlive objects preventing the garbage collection, that suggests that deploying the EAR is calling javax.rmi.CORBA.registerTarget, but undeploying is not calling javax.rmi/CORBA.unexportObject for each of the remote objects.

I'm going to look through the source to see where this is being called.





[GLASSFISH-17491] (JDK) could not execute list-domains with asadmin after installed GF completely Created: 26/Oct/11  Updated: 28/Nov/11

Status: Open
Project: glassfish
Component/s: installation
Affects Version/s: 3.1.1_b12
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: sunny-gui Assignee: Snjezana Sevo-Zenzerovic
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Server OS: RHEL 5 x86 and OEL 5 x86
Bundle: java_ee_sdk-6u3-web-b12c-jdk7-linux-ml.sh
Server Locales: en, ko, zh_CN


Attachments: JPEG File enbundle_error.jpg     JPEG File en_RHEL5x86_error.jpg     JPEG File ko_oel5x86_error.jpg    
Tags: 3_1_2-exclude

 Description   

could not execute list-domains with asadmin after installed GF completely

To reproduce:
1. Install GF with bundle named "java_ee_sdk-6u3-web-b12c-jdk7-linux-ml.sh", which download at http://javaweb.us.oracle.com/java/re/javaeesdk/6u3/promoted/b12c/archive/bundles/

2. In termianl, go to GF_Install_HOME/bin, run ./asadmin list-domains

There are error message, said

Error: dl failure on lien 875
Error: failed /root/glassfish3/jdk7/jre/lib/i386/client/libjvm.so, because /root/glassfish3/jdk7/lib/i386/client/libjvm.so:cannot restore segement prot after reloc: Permission denied

This issue can reproducible in following env.
1. RHEL 5 x86, en_US.UTF-8, ko_KR.UTF-8 and zh_CN.UTF-8 locales
2. OEL 5 x86, en_US.UTF-8

Attached screen shots for your reference.



 Comments   
Comment by scatari [ 26/Oct/11 ]

Could you please check if you can run commands like "java -version" or "javac" against the installed JDK. Looks like this could be a broken JDK installation.

Comment by sunny-gui [ 27/Oct/11 ]

Checked with non-ml bundle, java_ee_sdk-6u3-web-b12c-jdk7-linux.sh, this issue is reproducible in OEL 5 x86.

Try to run command "java -version" under /root/glassfish3/jdk7/bin/, and happens same error, attached screen shot for this.

Comment by Snjezana Sevo-Zenzerovic [ 27/Oct/11 ]

This type of error is usually due to JDK not working properly under SELinux. I presume SELinux is enabled on affected systems and to verify that this is the root cause you can temporarily disable SELinux by running 'setenforce 0' command prior to running installer or subsequent asadmin commands.

FWIW, I found this JDK issue with similar error, but in that case 32 bit JDK was being run on 64 bit Linux system and I presume this is not the case here:

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

Comment by Snjezana Sevo-Zenzerovic [ 27/Oct/11 ]

Same issue reported on CentOS with original JDK distribution:

http://comments.gmane.org/gmane.linux.centos.general/116308

So, this problem doesn't seem to be limited to bundled JDK and I think we'll need to verify the workaround and document it.

Comment by sunny-gui [ 28/Oct/11 ]

In the already installed GF env, I executed following commands.
1. setenforce 0
2. ./asadmin list-domains
3. ./asadmin start-domain

Sanity check in commands and AdminConsole, it works fine.

Comment by Snjezana Sevo-Zenzerovic [ 28/Nov/11 ]

Excluding from 3.1.2 release since this is really JDK issue. We may need to release note it, just in case.





[GLASSFISH-17719] Debugger is broken for deployed Glassfish Application Created: 14/Nov/11  Updated: 23/Feb/14

Status: Open
Project: glassfish
Component/s: ide-integration
Affects Version/s: 3.1.1
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: crazytrain411 Assignee: vince kraemer
Resolution: Unresolved Votes: 14
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Glassfish 3.11
Windows 7
JDK 1.6 update 29 both 32 and 64 bit


Tags: 3_1_2-exclude, debugger, deployment, domain, glassfish

 Description   

When deploying a glassfish application through the Eclipse, the debugger is not working in the following ways:

-Does not highlight and bring up the current thread and code for the breakpoint
-Can not step through code

This happens only when running the application AFTER:
-Deleting the contents of the folder folder glassfish\domains\<domainname>\eclipseApps
-Right clicking the domain and selecting X Remove while the application is running and stopping the application
-Possibly when Running the application for the very first time (did not reproduce)

This is an extremely frustrating bug and a potential blocker, re-posted here because of no response on Eclipse plugins and help is needed.



 Comments   
Comment by crazytrain411 [ 14/Nov/11 ]

I'm pretty sure I've seen it other cases but these are the ones we have reproduced with consistency.

Comment by crazytrain411 [ 01/Dec/11 ]

Here are my latest findings regarding this issue. I'm also able to consistently reproduce with the following in addition to the two methods described above.

1) The debugger gets broken if there is a spring bean definition error and deployment fails. Upon fixing the error and running again the debugger is in a broken state.

2) If there are breakpoints set in a class and the class signature is changed the debugger will be in the broken state until the breakpoints are removed and the application is run again.

Comment by eduardohbcs [ 01/Dec/11 ]

I'm also facing the same issue in both ways described.

My environment is:
Windows 7
64-bit JDK 1.6 update 27
Glassfish 3.1.1 (build 12)
Eclipse Indigo sr1 (build id 20110615-0604)
Glassfish Plugin (Oracle Glassfish Server Tools) version 4.2.0.201111040904

This issue is really painful and hurts productivity ...

Comment by sinago [ 06/Dec/11 ]

Same environment as eduardohbcs with the same problem. Productivity has been brought to a halt due to this issue.

Comment by lgraf [ 12/Feb/12 ]

We are also facing this issue with the latest version of the Oracle GlassFish Server Tools (1.7.3.201106220649).

Steps to reproduce:
1. Debug app on server.
2. Debugging work as expected.
3. Undeploy app (remove from server).
4. Stop server.
5. Debug app on server again.
6. Debugging doesn't work properly (thread doesn't get the focus). At this point only manually focusing the thread after each step helps.

This is really a productivity killer. Any plans when this will get fixed?

Also iam a bit confused about the glassfish plugin project http://java.net/jira/browse/GLASSFISHPLUGINS. Is this the JIRA for the eclipse pluign: http://marketplace.eclipse.org/node/867? Iam asking because the versioning in JIRA seems to be different (does not contain the latest version (1.7.3) from the marketplace/updatesite).

Comment by kumara [ 13/Feb/12 ]

-> ide_integration sub-component

Comment by crazytrain411 [ 24/Feb/12 ]

Its been 4 months since the issue was reported. There's 6 participants and 9 votes. Can this at least be looked at?

If more information is required please specify.

Comment by crazytrain411 [ 06/Jun/12 ]

Found a workaround for this ridiculous bug. Thanks Glassfish guys for being useless to help with this for 7 months.

Close the debug view and reopen it, done.

There is a link between eclipseApps directory and the <application> block in domain.xml. Its horribly broken.

Goodbye

Comment by idididid [ 11/Jun/12 ]

Hello, I am facing the same problem.

I noticed few more things:

On the Debug view, in my stack trace, I found the exact class with the breakpoint is paused and it had this comment: "(Suspended breakpoint at line XX)". When I clicked the line, suddenly the green line appeared. Yet, as soon as I clicked F6 to continue, It went out of sync again, just the next line became suspended. Weird.

I checked the processes running on my computer and found that there are several "java.exe" processes running at the same time. (eclipse runs on javaw.exe). After further investigation I found out that when there is only one "java.exe" running - everything works fine and I am able to debug. Then, restarting the server creates sometimes a new "java.exe" and this is the point where I can't debug anymore. Maybe eclipse got confused...

Any thoughts?

Ido

Comment by adi3000 [ 29/Jul/12 ]

For information this issue seems to be cross platform. With my platform (from Sun) , debugging is very painfull. Even with removing the Debug view and reopen it

Eclipse 3.8
Sun JDK 7u3 (even with openJDK 6u29)
Glassfish 3.1.2
Eclipse Glassfish Server Tools 2.0.1

I can't trace properly my debugging, just approximatively follow with random F8/F6 and close reopen debug view. It not helping at all. Seems to be the same issue than idididid
If somebody could help on it or find a workaround

Thanks

EDIT : Find a better workaround : using another glassfish server (not the one included with Glassfish plugin ), I've maid a proc on my redmine :

http://code.a-dream-zone.com/redmine/issues/26

Workaround : Use another glassfish server than the one include on eclipse plugin
1- Download http://dlc.sun.com.edgesuite.net/glassfish/3.1.2/release/glassfish-3.1.2.zip
2- Unzip anywhere you want (ie : on your workspace)
3- On Window > Preference > Server > Runtime Environment clic on Add...
4- Choose GlassFish Server Open Source Edition 3 (Java EE 6)
5- Check Create a new local server (to display it below Internal Glassfish Server
6- Use the proper JDK (jdk1.7.0_03)
7- Application Server Directory : /path-to-your-workspace/glassfishv3/glassfish (must be the glassfishv3/glassfish directory of the place where you unzip your glassfish server), then click next
8- Leave Administration Id and password as default (admin and blank password), check than Domain Directory follow path to glassfishv3/glassfish/domains/domain1
9- Click on finish, the new server should have appeared as GlassFish Server Open Source Edition 3 (Java EE 6) on your Server view

Deploy your application as you've done under Internal Glassfish 3.1.2 (dont forget to check the runtime environment of each project to be using the right server libraires)

Comment by adi3000 [ 30/Jul/12 ]

4- Choose GlassFish Server Open Source Edition 3 (Java EE 6)

Excuse me for this mistake but I was using a 3.0.1 server first and then upgrade it to 3.1.2. It does not seem to be the same thing as when I just erase my server to perform my tutorial, I found that glassfish modules lib are not the same. So instead of using Open Source Edution 3, use the Glassfish 3.1.2 (obvious isn't it ?)

Good luck for the rest

Comment by xiul [ 19/Aug/13 ]

Idob from stackoverflow.com found a workaround, I test it and it works for me, I'm using glassfish 3.1.2.1 with the eclipse (STS) extension 3.1.2 and jdk 7

source: http://stackoverflow.com/questions/10685361/eclipse-skipping-breakpoints

"Set remote debug

1. Go to your glassfish admin console and set your glassfish to work on debug mode.
Click on configuration --> server-config --> JVM settings, and check debug enabled check box.
Restart server

2. In eclipse - start server on normal mode (not debug - it is useless).

3. Go to Debug configurations and locate "Remote Java Application"

4. Create a new Remote java app debug config

5. Enter name (lets say Glassfish-Debug)

6. Choose project to debug

7. Enter your own IP address in the host section and set the port to 9009

That's it. Now all you have to do is always start your Glassfish in normal mode and then go to Debug configurations and run This Glassfish remote debugging you just set.

And now I'm getting to the annoying part: After rebuild your project, sometimes you might get again out of sync. You just need to disconnect the remote debugging session and run it again. Small price to pay.

I hope it helps."

Comment by arjan tijms [ 23/Feb/14 ]

Just for everyone's information, this issue is still current with GlassFish 4.0 and the latest server runtime as of the time of writing. Tested on OS X and Ubuntu.





[GLASSFISH-18084] das.properties needs work Created: 23/Dec/11  Updated: 18/Feb/13

Status: Open
Project: glassfish
Component/s: distributed management
Affects Version/s: 3.1.2_b15, 4.0_b16
Fix Version/s: future release

Type: Bug Priority: Critical
Reporter: Byron Nevins Assignee: Byron Nevins
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency
blocks GLASSFISH-18094 Need Status if _create-instance-files... Resolved
Tags: 3_1_2-exclude

 Description   

Say I have this setup:

DAS is running on my laptop which is connected via VPN to a huge corporation. Let's say Oracle. My official hostname is "laptop"
The remote computer that will host instances is sitting at the Corporation behind the firewall.

Now I create a node and an instance on the remote computer using SSH or DCOM. That creates a file called

das.properties

Inside das.properties is the information to call back to DAS. In my case here the hostname is laptop. There are three problems:

(1) the hostname "laptop" is useless. There is NO WAY the remote machine can find its way to my laptop with that name. It would have to have an IP address.

(2) There was NO HANDSHAKE when the instance was created! The command should have failed. The user has no idea that there is no way for the remote to call DAS back ever.

(3) this also happens across domains. E.g. if the 2 machines have these names that are in DNS – it still won't work:
somehost.in.oracle.com
another.us.oracle.com

Why? The domain gets chopped off. If 'another' is the remote it will look for DAS at
somehost.us.oracle.com

(4) I ran it with a secure DAS – yet isSecure is set to false in DAS.properties.
(5) The protocol is set http. Shouldn't it be https?

WORKAROUND:
After das.properties is created, hand-edit the hostname to something that the remote machine can access.



 Comments   
Comment by kshitiz_saxena [ 04/Jan/12 ]

Instead of manual edit, set address for admin-listener in DAS :
asadmin set configs.config.server-config.network-config.network-listeners.network-listener.admin-listener.address=<YOUR IP ADDRESS>

This works.

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

Not a 3.1.2 stopper





[GLASSFISH-18222] [JRockit-intermittent] Observed 100% CPU usage & deploy taking > 5 minutes when running the Coherence HA tests Created: 19/Jan/12  Updated: 26/Mar/13

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

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

Attachments: Zip Archive coh-test-logs-1.zip     Zip Archive coh-test-logs-2.zip    
Issue Links:
Dependency
blocks GLASSFISH-18190 [JRockit] 100% CPU usage by 2 instanc... Closed
Tags: 312_qa, 3_1_2-exclude, 3_1_2-release-note-added, 3_1_2-release-notes, 3_1_2_review

 Description   

GF Build: 18
Setup: 10 instance cluster (3 machines)
Platform: OEL6
JDK: JRockit
Has this test passed before: No. This is the first time that the combination OEL6 + JRockit + CoherenceTests is being tried out.

Parent Issue: 18160. Observed with build 17. 18222 is a result of further investigation.

Following observed when running Coherence tests (specifically while deploy of the coherence enabled application is on):

  • 100% CPU usage on some machines. "top" was run manually on all the machines involved in the setup if it was observed that one of the test's deploy method was taking unusually long.
  • This was not the case with all Coherence HA tests.
  • In some Coherence HA tests when the invocation of "asadmin deploy" was observed to be taking long (> 5 minutes), some instance logs were observed to contain thread dumps, while others have coherence related exceptions.
  • Tests that hit this issue ended up failing as instances did not seem to be available to service a http request for the application in question.
  • Different instances (1 or more) were observed to be utilizing 100% of the CPU during different tests.
  • In one of the tests a lot of GMS FAILURE_EVENTs have been observed while the deploy is on. Since 100% CPU usage has been observed during the deploy, it is quite likely that GMS alive messages (don't remember the exact terminology) were getting missed.

Logs from 2 different tests have been attached:
a) The first set is that of a test that showed a number of GMS FAILURE_EVENTs. This test happened to run before the test from which the second set of logs was collected.
b) The second set of logs shows thread dumps (see log of st-cluster/instance105) and exceptions (see log of st-cluster/instance106).
Note: The setup was able to continue the tests run after stalling for a bit. The second set of logs have been attached for a test after it had already stalled the tests run for about 2 hrs. A "kill -SIGABRT pid" was done on the instances that were taking 100% CPU (instanc101 & instance104 - second set of logs). Those kill steps seem to have generated thread dumps in the logs. Instances 101 and 104 got restarted after the kill -SIGABRT.

Client logs are in the ant.output file.

  • Deploy for the first set of logs begins at 3:58:33 AM
  • Deploy for the second set of logs begins at 4:10:52 AM

The coherence cache server's logs are also available - see coherence/<machine-name>/cache-server.log.

  • There was only a single storage enable cache server running. It formed the cluster with the storage-disabled GF cache nodes
  • The cache-server.log shows indications of failed members around the time of deploy for both the test cases.

NOTE: A core dump is also available. This was obtained before and for a different test run than the 2 sets of attached test logs. A "kill -SIGABRT pid" in this case had created a core dump rather than a thread dump in the instance logs.

  • Please send us an email and we will send its location.


 Comments   
Comment by Shing Wai Chan [ 20/Jan/12 ]

I notice the following coherence related messages in the instance log files.
Per discussion with James, this is very likely due to a resource or network issue.
So, this may be a result rather a cause of 100% cpu usage.

#|2012-01-19T04:06:40.072-0800|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=25;_ThreadName=Thread-2;|2012-01-19 04:06:40.070/1652.885 Oracle Coherence GE 3.7.0.0 <Error> (thread=Termination Thread, member=n/a): Full Thread Dump

[#|2012-01-19T04:06:40.294-0800|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=25;_ThreadName=Thread-2;|2012-01-19 04:06:40.293/1653.108 Oracle Coherence GE 3.7.0.0 <Error> (thread=http-thread-pool-24849(2), member=n/a): Error while starting cluster: com.tangosol.net.RequestTimeoutException: Timeout during service start: ServiceInfo(Id=0, Name=Cluster, Type=Cluster
MemberSet=ServiceMemberSet(
OldestMember=n/a
ActualMemberSet=MemberSet(Size=9, BitSetCount=2
Member(Id=1, Timestamp=2012-01-19 03:38:42.501, Address=10.133.185.54:8088, MachineId=13878, Location=site:us.oracle.com,machine:jed-asqe-24,process:8642, Role=CoherenceServer)
Member(Id=13, Timestamp=2012-01-19 03:58:48.887, Address=10.133.185.54:8090, MachineId=13878, Location=site:us.oracle.com,machine:jed-asqe-24,process:11176)
Member(Id=14, Timestamp=2012-01-19 03:58:50.606, Address=10.133.185.54:8092, MachineId=13878, Location=site:us.oracle.com,machine:jed-asqe-24,process:9028)
Member(Id=16, Timestamp=2012-01-19 03:59:12.252, Address=10.133.185.20:8090, MachineId=13844, Location=site:us.oracle.com,machine:jed-asqe-25,process:2421)
Member(Id=17, Timestamp=2012-01-19 03:59:19.923, Address=10.133.185.20:8094, MachineId=13844, Location=site:us.oracle.com,machine:jed-asqe-25,process:2408)
Member(Id=18, Timestamp=2012-01-19 04:00:47.551, Address=10.133.185.55:8088, MachineId=13879, Location=site:us.oracle.com,machine:jed-asqe-26,process:15657)
Member(Id=19, Timestamp=2012-01-19 04:01:02.177, Address=10.133.185.55:8090, MachineId=13879, Location=site:us.oracle.com,machine:jed-asqe-26,process:15651)
Member(Id=20, Timestamp=2012-01-19 04:01:04.076, Address=10.133.185.55:8092, MachineId=13879, Location=site:us.oracle.com,machine:jed-asqe-26,process:15690)
Member(Id=21, Timestamp=2012-01-19 04:01:18.349, Address=10.133.185.55:8094, MachineId=13879, Location=site:us.oracle.com,machine:jed-asqe-26,process:15658)
)
MemberId/ServiceVersion/ServiceJoined/MemberState
1/3.7/Thu Jan 19 03:38:42 PST 2012/JOINED,
13/3.7/Thu Jan 19 03:58:48 PST 2012/JOINED,
14/3.7/Thu Jan 19 03:58:50 PST 2012/JOINED,
16/3.7/Thu Jan 19 03:59:13 PST 2012/JOINED,
17/3.7/Thu Jan 19 03:59:19 PST 2012/JOINING,
18/3.7/Thu Jan 19 04:00:47 PST 2012/JOINED,
19/3.7/Thu Jan 19 04:01:02 PST 2012/JOINED,
20/3.7/Thu Jan 19 04:01:04 PST 2012/JOINED,
21/3.7/Thu Jan 19 04:01:18 PST 2012/JOINED
)
)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onStartupTimeout(Grid.CDB:6)
at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.start(Service.CDB:28)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.start(Grid.CDB:6)
at com.tangosol.coherence.component.net.Cluster.onStart(Cluster.CDB:61)
at com.tangosol.coherence.component.net.Cluster.start(Cluster.CDB:11)
at com.tangosol.coherence.component.util.SafeCluster.startCluster(SafeCluster.CDB:4)
at com.tangosol.coherence.component.util.SafeCluster.restartCluster(SafeCluster.CDB:10)
at com.tangosol.coherence.component.util.SafeCluster.ensureRunningCluster(SafeCluster.CDB:26)
at com.tangosol.coherence.component.util.SafeCluster.start(SafeCluster.CDB:2)
at com.tangosol.net.CacheFactory.ensureCluster(CacheFactory.java:427)
at com.tangosol.coherence.servlet.SessionHelper.checkEdition(SessionHelper.java:295)
at com.tangosol.coherence.servlet.SessionHelper.configure(SessionHelper.java:107)
at com.tangosol.coherence.servlet.SessionHelper.ensureSessionHelper(SessionHelper.java:482)
at com.tangosol.coherence.servlet.glassfish31.CoherenceWebSessionManager.init(CoherenceWebSessionManager.java:133)
at com.tangosol.coherence.servlet.glassfish31.CoherenceWebSessionManager.start(CoherenceWebSessionManager.java:577)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5370)
at com.sun.enterprise.web.WebModule.start(WebModule.java:503)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:735)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2010)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1661)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:302)
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.InstanceDeployCommand.execute(InstanceDeployCommand.java:187)
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:1066)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1295)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1260)
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:747)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1046)
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:105)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:91)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:56)
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)

Comment by Shing Wai Chan [ 24/Jan/12 ]

Does the same test pass in Oracle JDK?

Comment by varunrupela [ 24/Jan/12 ]

Yes. The coherence tests passed with Oracle JDK. The collected logs from that run do not contain any Thread Dumps and do not indicate delay in execution of DAS commands.

Will send a mail with the results link.

Comment by Shing Wai Chan [ 25/Jan/12 ]

Can you increase the memory for JRockit JVM? I would like to know whether the problems went away after the change.

Comment by varunrupela [ 25/Jan/12 ]

Is there an indication that memory has been an issue ?

Comment by sherryshen [ 30/Jan/12 ]

GF Build: 19
Setup: 10 instance cluster (3 machines)
Platform: OEL6
JDK: JRockit

The execution is hanging on coherence in run 10b,
jed-asqe-28 97% cpu
asqeopteron1,3 2.7% cpu

http://agni-1.us.oracle.com/JSPWiki/Wiki.jsp?page=V312HATest
Varun checked the the log on asqe-log, and found that
both the runs (10a and 10b) have Coherence related failures
due to issue 18222.

*****
[root@jed-asqe-28 coherence-http-runtime]# find . -name "ant.output" | xargs grep "30000"
./com.sun.dft.glassfish.http.failover.runtime.HttpFailoverRuntimeTest4/ant.output: [testng] INFO: The asadmin command - /space/gf-ha/glassfish3/bin/asadmin --user admin deploy --availabilityenabled=true --force=true --target st-cluster /space/gf-ha/agent-repository/glassfish-samples/clusterjsp.ear is taking longer than 300000 milliseconds.
./com.sun.dft.glassfish.http.failover.runtime.HttpFailoverRuntimeTest24/ant.output: [testng] INFO: The asadmin command - /space/gf-ha/glassfish3/bin/asadmin --user admin deploy --availabilityenabled=true --force=true --target st-cluster /space/gf-ha/agent-repository/web/runtime/SimpleSession.war is taking longer than 300000 milliseconds.
[root@jed-asqe-28 coherence-http-runtime]#
[root@jed-asqe-28 coherence-http-runtime]# find . -name "server.log" | xargs grep "Thread Dump"
./com.sun.dft.glassfish.http.failover.runtime.HttpFailoverRuntimeTest4/failoverRuntimeThroughLB/logs/st-cluster/instance101/logs/server.log:[#|2012-01-29T23:36:01.649-0800|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=24;_ThreadName=Thread-4;|2012-01-29 23:36:01.642/437.818 Oracle Coherence GE 3.7.0.0 <Error> (thread=Recovery Thread, member=n/a): Full Thread Dump
*****

http://agni-1.us.oracle.com/net/asqe-logs.us.oracle.com/export1/3.1.2/Results/build19/ha/oel6nm/all/coherence-http-runtime/com.sun.dft.glassfish.http.failover.runtime.HttpFailoverRuntimeTest4/failoverRuntimeThroughLB/logs/st-cluster/instance101/logs/server.log
http://agni-1.us.oracle.com/net/asqe-logs.us.oracle.com/export1/3.1.2/Results/build19/ha/oel6nm/all/coherence-http-runtime/com.sun.dft.glassfish.http.failover.runtime.HttpFailoverRuntimeTest4/failoverRuntimeThroughLB/logs/coherence/jed-asqe-28.us.oracle.com/cache-server.log

Comment by Shing Wai Chan [ 30/Jan/12 ]

In one of the thread dump, we notice the following:

Thread[Cluster|SERVICE_STARTING|STATE_ANNOUNCE|Member(Id=0, Timestamp=2012-01-29 23:30:08.126, Address=10.133.185.4:8090, MachineId=13828, Location=site:us.oracle.com,machine:jed-asqe-28,process:32266),5,Cluster]
com.tangosol.coherence.component.util.daemon.queueProcessor.packetProcessor.PacketPublisher.drainOverflow(PacketPublisher.CDB:0)
com.tangosol.coherence.component.util.daemon.queueProcessor.packetProcessor.PacketPublisher$InQueue.add(PacketPublisher.CDB:8)
com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.dispatchMessage(Grid.CDB:62)
com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.post(Grid.CDB:46)
com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.send(Grid.CDB:1)
com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.ClusterService.onTimerAnnouncing(ClusterService.CDB:68)
com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.ClusterService.onNotify(ClusterService.CDB:11)
com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
java.lang.Thread.run(Thread.java:662)

Comment by Joe Di Pol [ 01/Feb/12 ]

Current thinking is that this may be a problem with the Coherence code on JRockit. This will not be resolved in time for 3.1.2. We should document this in the release notes as a known issue with JRockit. The work-around is to use the normal Oracle JDK.

Comment by Shing Wai Chan [ 02/Feb/12 ]

If you see the 100% cpu usage again, then please collect the following information. This will help coherence team to debug this further:

  • If this is reproducible, can we take thread dumps every few seconds?
  • Do we know which processes are using up CPU? (using top the pid and then identify what process that pid is)
  • Do we know if this is in user land or kernel? (from top)
Comment by Shing Wai Chan [ 06/Feb/12 ]

An issue is filed on Coherence as follows:
13689509: 100% CPU USAGE IN DEPLOYING COHERENCE 3.7.1 WEB APPLICATION WITH JROCKIT.

Comment by varunrupela [ 07/Feb/12 ]

We are Observing similar thread dumps and GMS related failures in the GF instance server logs with coherence 3.7.1 as well. Will work on collecting the requested frequent thread dumps and then upload the logs.

Comment by Tom Mueller [ 07/Mar/12 ]

Bulk update to set Fix Version to "not determined" for issues that had it set to a version that has already been released.





[GLASSFISH-18322] High Availability (HA) Session loses session attributes during replication Created: 05/Feb/12  Updated: 03/Oct/12

Status: Open
Project: glassfish
Component/s: failover
Affects Version/s: 3.1.2_b20
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: lprimak Assignee: Mahesh Kannan
Resolution: Unresolved Votes: 5
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:
  • Linux, 8GB RAM, 8-core Intel CPU, One Cluster of 2 machines, no traffic
  • Availability enabled
  • relaxCacheVersionSemantics enabled
  • Everything else is install default

Tags: 3_1_2-exclude, 3_1_2-next

 Description   

See thread:
http://www.java.net/forum/topic/glassfish/glassfish/glassfish-31-final-high-availability-web-apps-slow-and-loses-session-state

See other related JIRA issue:
http://java.net/jira/browse/GLASSFISH-17344

Running Ajax applications reproduces this quickly.
Running non-Ajax applications it happens rarely, but still does.

I tested this in a single machine with a browser with my app in one window
and HaJsp.jsp in the other to see what's going on with the sessions.


I just tried 3.1.2b20 release, and while the performance is good now and TimeoutExceptions are gone, the Sessino state replication does not work correctly.

It seems the node with the older data is overwriting the node with the newer data:

  • a session attribute1 gets added to node1
  • a session attribute2 gets added to node2
  • node 1 all of the sudden only sees attribute2, attribute1 gets lost

This happens only with Availability turned on



 Comments   
Comment by jjackb [ 06/Feb/12 ]

As mentioned in another related (but closed issue), i have difficulties with testing session failover.

With gf3.1.1 it was possible to create a cluster with two local instances and emulating a session failover by calling e.g.:

http://localhost:28080/your/Servlet

then change URL to the second instance:

http://localhost:28081/your/Servlet

While gf 3.1.1 made the (session) failover, gf 3.1.2 always creates a new session (maybe since fixing #17504).

Is it a bug or feature? Please respond on this. Thanks.

Comment by Joe Di Pol [ 17/Feb/12 ]

Too late to address in 3.1.2. Tagging for consideration in next release.

Comment by hmeerlo [ 20/Jul/12 ]

Hi,

any news or progress on this issue? This seems like a rather important problem. Right now I am forced to use synchronous replication which makes the whole thing very slow.

Thanx

Comment by lprimak [ 03/Oct/12 ]

The session state replication now works as of GF 3.1.2.2 and relaxVersionSemantics=true

Failover of AJAX application doesn't happen seamlessly though, although reloading the page after failover
does work. Not sure if that's related to this problem.

I believe it's good enough to close this issue





[GLASSFISH-18360] Update tool configuration breaks default network behaviour Created: 14/Feb/12  Updated: 02/Nov/13

Status: Open
Project: glassfish
Component/s: update_center
Affects Version/s: 3.1.1_b12
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: thehpi Assignee: Snjezana Sevo-Zenzerovic
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux debian squeeze (6.0.4). Running my web applications in the same jvm as the DAS


Tags: 3_1_2-exclude, 3_1_2-next

 Description   

The update tool creates at some point a .updatetool directory with a init.cfg file.
The init.cfg file contains (after default installation and executing latest updates)

[main]
date: 1328646278464
optin.update.notification: true
image_list: /home/glassfish_prod/glassfish312/bin/..
[network]
proxy.use.system: true
proxy.required: false

The setting

proxy.use.system: true

Is used by the class

com.sun.pkg.client.SystemInfo

to set the following system property

java.net.useSystemProxies=true

This class is executed when glassfish starts up.

This setting overrides the setting in $

{JAVA_HOME}/jre/lib/net.properties

The actual problem I'm having is that the jvm (read glassfish) will crash when I
excecute several threads which call an external web service.

The crash dump shows (partial)

Stack: [0x00007fd589d79000,0x00007fd589e7a000], sp=0x00007fd589e71578, free space=993k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libdbus-1.so.3+0x28de0] dbus_malloc+0xa0

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j sun.net.spi.DefaultProxySelector.getSystemProxy(Ljava/lang/String;Ljava/lang/String;)Ljava/net/Proxy;+0
j sun.net.spi.DefaultProxySelector.access00(Lsun/net/spi/DefaultProxySelector;Ljava/lang/String;Ljava/lang/String;)Ljava/net/Proxy;+3
j sun.net.spi.DefaultProxySelector.run()Ljava/net/Proxy;+151
j sun.net.spi.DefaultProxySelector.run()Ljava/lang/Object;+1
v ~StubRoutines::call_stub
J java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object;
j sun.net.spi.DefaultProxySelector.select(Ljava/net/URI;)Ljava/util/List;+223
j sun.net.www.protocol.http.HttpURLConnection.plainConnect()V+314
j sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect()V+9
j sun.net.www.protocol.http.HttpURLConnection.getOutputStream()Ljava/io/OutputStream;+134
j sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream()Ljava/io/OutputStream;+4
j com.sun.xml.ws.mex.client.HttpPoster.post(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/io/InputStream;+60

The DefaultProxySelector (see top of stack) contains the following static block

static {
final String key = "java.net.useSystemProxies";
Boolean b = (Boolean) AccessController.doPrivileged(
new PrivilegedAction() {
public Object run() {
return NetProperties.getBoolean(key);
}});
if (b != null && b.booleanValue()) { java.security.AccessController.doPrivileged( new sun.security.action.LoadLibraryAction("net")); hasSystemProxies = init(); }

This will set the hasSystemProxies boolean only when the java.net.useSystemProxies system property is true.
The hasSystemProxies boolean is checked in the select method and only if it is true it will call the getSystemProxy
method which will crash the jvm (when multiple threads do so).

So actually, there probably is a concurrency bug/problem with the libdbus native library which causes the actual crash.

But: I expect the system proxy not to be checked (as specified by ${JAVA_HOME}

/jre/lib/net.properties)
Update tool is being initialized when glassfish starts up and the proxy.use.system=true setting will cause
the system property java.net.useSystemProxies to be set to true which effectively causes the problem.



 Comments   
Comment by Bobby Bissett [ 14/Feb/12 ]

Moving to 'update center' category. I know the categories are confusing, but 'upgrade tool' is for asupgrade which acts on a domain so that an older domain can be used with a newer GF installation.

Comment by Joe Di Pol [ 17/Feb/12 ]

Too late for 3.1.2. Tagging to revisit for next release.

Comment by kovica [ 19/Jul/12 ]

As a workaround you could make java use direct connection instead of trying system proxies.
Do this:

  • cd $GLASSFISH_INSTALL_DIR/bin
  • edit file pkg and search for line
    echo "proxy.use.system=true" >> "$BOOTSTRAPPROPS"
  • change it to:
    echo "proxy.use.system=false" >> "$BOOTSTRAPPROPS"

Do the same with updatetool file if you want to install the graphical GUI to update tool

Comment by thehpi [ 19/Jul/12 ]

The pkg file does not contain this line. The pkg.bat file however does.
I did find this line in the file $GLASSFISH_INSTALL_DIR/pkg/lib/pkg-bootstub.sh
So it looks like this is the file that needs the fix.

Comment by kovica [ 19/Jul/12 ]

Sorry, I don't point out that I'm using glassfish-3.1.2.zip as the installation file.

Comment by ljnelson [ 02/Nov/13 ]

Hello; this bug appears to be related to research done as part of https://java.net/jira/browse/GLASSFISH-12213. It affects GlassFish 3.1.2.2 as well.

Notes for posterity and non-GlassFish-team people:

The Java pkg client has a class called com.sun.pkg.client.SystemInfo. At some point GlassFish must cause this class to get loaded at startup.

When this class loads, it ends up having its loadProxyInfo() method called.

This method looks for either an init.cfg or a defaults.cfg file in various locations. One of those locations is (on my Mac, as an example) /Users/ljnelson/Library/Application Support/updatetool.

If it finds such a file, and if that file has a property setting of:

proxy.use.system = true

...then SystemInfo will call System.setProperty("java.net.useSystemProxies", "true").

This has a couple of side effects.

The first side effect is that it overrides whatever is present in $JAVA_HOME/jre/lib/net.properties in its java.net.useSystemProxies line. (Actually it's not clear to me this file is consulted under GlassFish, as sun.net.NetProperties constructs the path to that file by doing something basically identical to System.getProperty("java.home") + "/lib/net.properties", which at least on my Mac would not involve the jre subdirectory.) So the value of the java.net.useSystemProxies property is essentially always true when GlassFish is running.

Next, this has the effect of triggering a non-threadsafe native library load and execution by way of sun.net.spi.DefaultProxySelector, resulting in https://java.net/jira/browse/GLASSFISH-12213 (the potential of a JVM crash). Briefly, since DefaultProxySelector concludes that system proxies are to be used, it makes use of libgconf which turns out to be at the root of this JVM bug: http://bugs.sun.com/view_bug.do?bug_id=7188755 This JVM issue is fixed in a later build of Java 7.

The workaround for this bug (maybe?) and GLASSFISH-12213 is most likely to make sure that defaults.cfg or init.cfg contains the line:

proxy.use.system = false

,,,as that will avoid the System.setProperty() call in SystemInfo and hence the native library load.





[GLASSFISH-18451] install-node-dcom does not function Created: 05/Mar/12  Updated: 26/Jun/12

Status: Open
Project: glassfish
Component/s: distributed management
Affects Version/s: 3.1.2_b23
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: jp2011 Assignee: Byron Nevins
Resolution: Unresolved Votes: 5
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows server 2008 R2 Sp1
Glassfish 3.1.2 Release


Tags: dcom

 Description   

I initially tried using a windows domain account to install the node and that didn't work as per GLASSFISH-18327. That issue was also incorrectly marked as resolved. Network captures show that the release version of Glassfish 3.1.2 still does not use the domain account, but attempts to use the local account.

After giving up with this, I created a new local account on the remote machine called glassfish. Granted full access to the 2 required registry keys and added the account to the administrators group. Attempting to install the remote node using this account still fails with the following message:

Successfully verified that the host, hostname, is not the local machine as required. Successfully resolved host name to: hostname/10.65.30.xxx Successfully connected to DCOM Port at port 135 on host hostname. Successfully connected to NetBIOS Session Service at port 139 on host hostname. Successfully connected to Windows Shares at port 445 on host hostname. The remote file, C: doesn't exist on hostname: Access is denied.

I performed a network capture and can tell you the following:

1. The user account is successfully authenticated with STATUS_SUCCESS (0x00000000)
2. SMB is attempting to access \\hostname\C$ no matter what I set the remote test directory to.
3. NT Status: STATUS_FS_DRIVER_REQUIRED (0xc000019c) is returned from the remote host but I suspect this is normal and used for dynamic library loading for the file system.

4. NT Status: STATUS_ACCESS_DENIED (0xc0000022) is returned on attempting to connect to \\hostname\C$

The documentation does not state any other prerequisite or permissions that need to be setup for this to function. What is missing?



 Comments   
Comment by Byron Nevins [ 06/Mar/12 ]

what is the exact command you're running?

Comment by jp2011 [ 06/Mar/12 ]

To make things even simpler, it is reproducible by the validate-dcom command alone.

Password file contains the following line: AS_ADMIN_WINDOWSPASSWORD=$

{ALIAS=glassfish-alias}

I have setup the alias already in asadmin as per the documentation.

c:\glassfish3\bin>asadmin --passwordfile passwordfile.txt validate-dcom -w glassfish remotehost
remote failure:
Successfully verified that the host, remotehost, is not the local machine as required.
Successfully resolved host name to: remotehost/10.65.30.187
Successfully connected to DCOM Port at port 135 on host remotehost.
Successfully connected to NetBIOS Session Service at port 139 on host remotehost
nc.
Successfully connected to Windows Shares at port 445 on host remotehost.
The remote file, C: doesn't exist on remotehost: Access is denied.

Command validate-dcom failed.

I can speak to the network capture I took as well, but that would be easier offline to this web portal.

Comment by Byron Nevins [ 06/Mar/12 ]

Can you access the c$ share from another computer – say

net use X: \\other\c$

?

Comment by Byron Nevins [ 06/Mar/12 ]

Please make sure theses items are setup correctly, especially the third one:

1. Server service is in the started state and is set to start automatically.
2. Remote Registry service is also in the started state and is set to start automatically.
3. Set the Local Policy for Network Access:Control Panel" > "Administrative Tools" -> "Local Security Policy"> "Local Policies" -> "Security Options" -> "Network Access: Sharing security model for local accounts" Make sure it is set to Classic

Comment by ljnelson [ 28/Mar/12 ]

I have exactly the same problem.

I installed and ran setup-local-dcom on the remote machine as an administrator. It claimed it ran successfully.

Then I made sure that your steps 1-3 above were taken. I had to manually start the remote registry service.

My remote machine is running Windows 7 Professional on a 64-bit machine with all updates installed.

Here is my command and output:

ljnelson$ asadmin --passwordfile ~/.glassfish.passwords --port=9048 validate-dcom --windowsuser lnelson --windowsdomain jenzabar --remotetestdir 'C:\crap' --verbose true 10.63.4.42
remote failure: 
Successfully verified that the host, 10.63.4.42, is not the local machine as required.
Successfully resolved host name to: /10.63.4.42
Successfully connected to DCOM Port at port 135 on host 10.63.4.42.
Successfully connected to NetBIOS Session Service at port 139 on host 10.63.4.42.
Successfully connected to Windows Shares at port 445 on host 10.63.4.42.
The remote file, C:\crap doesn't exist on 10.63.4.42 : The parameter is incorrect.

Command validate-dcom failed.

C:\crap is a directory present on the remote machine. I haven't set it up to be shared in any way, but I haven't done anything else to it, either. Any path supplied to --remotetestdir is considered to not exist. I've tried moving slashes around and doubling up backslashes in case it's a path issue; it's not.

Hope this data point helps.

Comment by lb54 [ 11/Apr/12 ]

Hi.
I have also this issue:
Win 2003 SP2 (Domain Admin Server, GF 3.1.1, updated to 3.1.2)
Win 2008 Server R2 Enterprise SP1 (node, formerly connected through SSH via cygwin)
User is authorized for both machines. DCOM is planned to replace the SSH-communication.

Message is from Web Console is:
Successfully verified that the host, myserver.host.xx, is not the local machine as required. Successfully resolved host name to: myserver.host.xx/<IP-Address> Successfully connected to DCOM Port at port 135 on host myserver.host.xx. Successfully connected to NetBIOS Session Service at port 139 on host gibson-10.tecis.hh. Successfully connected to Windows Shares at port 445 on host myserver.host.xx. The remote file, C: doesn't exist on myserver.host.xx : Logon failure: unknown user name or bad password.

The CLI also fails with:
remote failure: Command install-node-dcom failed.

com.sun.enterprise.util.cluster.windows.process.WindowsException: Logon failure: unknown user name or bad password.
Command create-node-dcom failed.

Is there a way to "workaround" this or do I have to wait for an update?

Comment by jp2011 [ 11/Apr/12 ]

There has been no fix for this because the cause is still unknown to Oracle. The workaround is do not use DCOM. We have personally abandoned Windows as a platform for production/QA in favour of RHEL 5 Linux distro. SSH is built in, and the cluster runs a lot faster with less overhead. The downside is that you have to learn Linux commands. But really, is this that bad?

Comment by lb54 [ 13/Apr/12 ]

I agree with you.
BUT: Telling my company to use Linux Servers instead of Windows will not work, they don't want to hear that.
Using SSH Nodes on Windows System with cygwin seems to be an alternative. But I used Glassfish 3.1.1 with ssh (cygwin) already, the communication seems to be not very stable (long running startup processes and long loading "Clusters" page with the Web Console).

@Byron: Is there a plan for this bugfix so far?

Comment by mr_daemon [ 16/Apr/12 ]

I did some incredibly tedious debugging and was able to get it to work:

For the validate-dcom test to pass, since it seems to ignore the parameter for the test directory entirely and always use C:\ regardless, you must disable the new (vista+) policy that prevents users from elevating their privileges over the network by navigatinig to

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

and creating a new DWORD named LocalAccountTokenFilterPolicy of 1. This will allow the delete-me.bat file to be created there.

However this then breaks again:

PS D:\private> d:\glassfish3\bin\asadmin.bat --passwordfile dcom-pw.txt validate-dcom -w glassfish -v=true qlsvrnode2
remote failure:
Successfully verified that the host, qlsvrnode2, is not the local machine as required.
Successfully resolved host name to: qlsvrnode2/192.168.9.11
Successfully connected to DCOM Port at port 135 on host qlsvrnode2.
Successfully connected to NetBIOS Session Service at port 139 on host qlsvrnode2.
Successfully connected to Windows Shares at port 445 on host qlsvrnode2.
Successfully accessed C: on qlsvrnode2 using DCOM.
Successfully wrote delete_me.bat to C: on qlsvrnode2 using DCOM.
Could not connect to WMI (Windows Management Interface) on qlsvrnode2. : Error setting up remote connection to WMI

This is not mentionned at all in the documentation, but turns out you also need to change ownership and set permissions to the following registry key, in addition to the ones already listed:

HKEY_CLASSES_ROOT\CLSID\{76A64158-CB41-11D1-8B02-00600806D9B6}

Once this is accomplished, everything works as advertised.

I am not fond of the security implications but at least it works and is at least more reliable than Cygwin+sshd.

Comment by Byron Nevins [ 19/Apr/12 ]

Thanks for the excellent comments and work everyone. I'll try and address this problem soon.

Comment by lb54 [ 26/Apr/12 ]

Hi Byron.
Are there any plans to release this fix so far? Or is the "hack" described above the official solution?

Thanks for info.

Best wishes.

Basti

Comment by lb54 [ 16/May/12 ]

Hi there.
It seems that no one is working on this ticket right now.
Is there a chance to get a fix for this in the near future?
Unfortunatly the "quick fix" described above does not work for me, so I need another workaround or this bug fixed.

Can anyone help me?

Thanks.

Basti

Comment by mtobler [ 25/Jun/12 ]

I have not been able to get this to work on a set of 2008 R2 Servers
which I am trying to cluster. Unfortunately I am unable to get the ssh
functionality to work as well which leaves me with no clustering
capability and wondering why we used Glassfish.
Is anyone going to work on this anytime soon?

I added the following to 18327 but am adding it here as requested:
asadmin> validate-dcom --passwordfile do-not-delete gf01
remote failure:
Successfully verified that the host, gf01, is not the local machine as required.
Successfully resolved host name to: gf01/172.18.11.169
Successfully connected to DCOM Port at port 135 on host gf01.
Successfully connected to NetBIOS Session Service at port 139 on host gf01.
Successfully connected to Windows Shares at port 445 on host gf01.
The remote file, C: doesn't exist on gf01 : Logon failure: unknown user name or bad password.

I am using a domain and the user is a domain user.

I have gone through every document I can find on this issue and have verified all settings/registry keys/etc are correct. I have tried this via asdamin and via the console and get the same result.

Comment by Byron Nevins [ 26/Jun/12 ]

Sorry I overlooked the activity on this issue. I'll try to look into it soon. mtobler – please document what you did/what happened etc. Are you using a Windows Domain?





[GLASSFISH-18556] Characters out of JASPIC GroupPrincipalCallback Created: 24/Mar/12  Updated: 24/Apr/14

Status: Open
Project: glassfish
Component/s: security
Affects Version/s: None
Fix Version/s: future release

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

Attachments: Java Source File PolicyFileTest.java    
Tags: JASPIC, character, exception, group, restriction

 Description   

At this time, not all the characters can be used in a group set by GroupPrincipal callback.

Using thoses character will result into bad PolicyFile with non matching rule.

As a consequence, user will not be granted access as per the JACC checks.

(no exception raised, lowering the log level will result into unrelated exception beeing traced as a wrong track)

Example of such a group is :

ROLE_\01\05\00\00\00\00\00\05\15\00\00\00\8a\16\77\12\f6\70\d2\67\92\01\99\5a\b2\34\00\00

Issues here are the backslash () but I anticipate other characters could be at risks.

AFAIK, at this time there is no restricted character requirement as per JASPIC on the group.



 Comments   
Comment by kumarjayanti [ 25/Mar/12 ]

Will try to get comments from Ron on this.

Comment by bjb [ 26/Mar/12 ]

In the PolicyFile, the parseGrantEntry call

e.codeBase = match("quoted string");

But \ was configure as a quote char !

The internal java.io.StreamTokenizer indicates in line 635, that if a \ is used this is for escaping : C style or octal/hexa. But line 661+ there is no search for a second
to be reaplced by a single \ (aka '
') !

So the problem is whatever we do around \ char we will not get a bijective result (writer/parser).

But I've found reference saying that double backslash was used in PolicyFile as single backslash
http://www.eli.sdsu.edu/courses/spring99/cs696/notes/security/security.html
But I have not found that in the JDK code.

I will see to create a simple testcase for this PolicyFile corner case.
If it confirms my assumptions, I will open a JDK bug.

Until, it is fixes, the \ is a char that should be prohibited from group valid characters until we get the StreamTokenizer fixed

Anyway the domain of values for a name and the bijective nature of PolicyFile has to be confirmed from the JVM team.

Comment by bjb [ 26/Mar/12 ]

I've create a JUnit test case to show the JDK bug :

http://pastebin.com/HxmQJWmk

Comment by monzillo [ 26/Mar/12 ]

http://docs.oracle.com/javase/6/docs/technotes/guides/security/PolicyFiles.html

please see section entitled "Win32 Systems, File Paths, and Property Expansion"

Although I do not think what you are seeing is win32 specific, it seems that you must escape the "\" (when it occurs in your group or role names) with a preceding "\".

Comment by bjb [ 26/Mar/12 ]

JUnit test case to show the issue

Comment by bjb [ 26/Mar/12 ]

I think this has nothing to do with platformspecific as the test I have performed is "in memory" only (see version 2 attached in jira).

First the Policy Writer parser does not use double backslash for the backslash escaping while writing (cf generated policy file from GF).

Then, I can not use multiple escape as the parser (streamtokenizer from James ;P ) did not implement the double backslash escaping as usual in C :
http://en.wikipedia.org/wiki/C_syntax#Backslash_escapes

Most backslashes escapes are handled in the stream tokenizer but the escape of the backslash it self apparently.

I've submit another test case suit with triple (double 1/2) and quadruple (real double) backslash. Only the first test with single backslash (aka octet value) works.





[GLASSFISH-18583] PrecompileJSP Option during Application deployment causes PWC6112: Failed to load or instantiate TagExtraInfo class: org. Created: 30/Mar/12  Updated: 19/Oct/12

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

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

SunOS 5.10 Generic_144489-11 i86pc i386 i86pc
Version: GlassFish Server Open Source Edition 3.1.1 (build 12)


Attachments: Zip Archive ccanet.zip    
Tags: PWC6112, PrecompileJSP, admin-gui

 Description   

PreCompileJSP Option during Application deployment causes the following error.
But gets deployes without the precompileJSP option
and also same deployment file works on Glassfish 2.1 with the precompile opion without any issues.

Error:
[#|2012-03-29T17:32:10.465-0500|INFO|glassfish3.1.1|org.glassfish.admingui|_ThreadID=28;_ThreadName=Thread-2;|Exception Occurred :Error occurred during deployment: E
xception while preparing the app : JSP Compilation Error: org.apache.jasper.JasperException: file:/opt/appsvr/glassfish/domains/domain1/applications/ccanet/ccanet_wa
r/Index.jsp(1,45) PWC6112: Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib.tiles.UseAttributeTei – file:/opt/appsvr/glassfish/domains/dom
ain1/applications/ccanet/ccanet_war/Index.jsp(1,45) PWC6112: Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib.tiles.UseAttributeTei. Please
see server.log for more details.
Exception while invoking class com.sun.enterprise.web.WebDeployer prepare method : java.lang.RuntimeException: JSP Compilation Error: org.apache.jasper.JasperExcepti
on: file:/opt/appsvr/glassfish/domains/domain1/applications/ccanet/ccanet_war/Index.jsp(1,45) PWC6112: Failed to load or instantiate TagExtraInfo class: org.apache.s
truts.taglib.tiles.UseAttributeTei – file:/opt/appsvr/glassfish/domains/domain1/applications/ccanet/ccanet_war/Index.jsp(1,45) PWC6112: Failed to load or instantiat
e TagExtraInfo class: org.apache.struts.taglib.tiles.UseAttributeTei
JSP Compilation Error: org.apache.jasper.JasperException: file:/opt/appsvr/glassfish/domains/domain1/applications/ccanet/ccanet_war/Index.jsp(1,45) PWC6112: Failed t
o load or instantiate TagExtraInfo class: org.apache.struts.taglib.tiles.UseAttributeTei – file:/opt/appsvr/glassfish/domains/domain1/applications/ccanet/ccanet_war
/Index.jsp(1,45) PWC6112: Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib.tiles.UseAttributeTei Exception while invoking class com.su
n.enterprise.web.WebDeployer prepare method : java.lang.RuntimeException: JSP Compilation Error: org.apache.jasper.JasperException: file:/opt/appsvr/glassfish/domain
s/domain1/applications/ccanet/ccanet_war/Index.jsp(1,45) PWC6112: Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib.tiles.UseAttributeTei –
file:/opt/appsvr/glassfish/domains/domain1/applications/ccanet/ccanet_war/Index.jsp(1,45) PWC6112: Failed to load or instantiate TagExtraInfo class: org.apache.stru
ts.taglib.tiles.UseAttributeTei
JSP Compilation Error: org.apache.jasper.JasperException: file:/opt/appsvr/glassfish/domains/domain1/applications/ccanet/ccanet_war/Index.jsp(1,45) PWC6112: Failed t
o load or instantiate TagExtraInfo class: org.apache.struts.taglib.tiles.UseAttributeTei – file:/opt/appsvr/glassfish/domains/domain1/applications/ccanet/ccanet_war
/Index.jsp(1,45) PWC6112: Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib.tiles.UseAttributeTei|#]
------

the index.jsp refered above:
----------------------------
< % @ taglib uri="struts-tiles" prefix="tiles" % >
<tiles:insert template="/core/corePage.jsp">
<tiles:put name="header" content="/core/jsp/layout/header.jsp"/>
<tiles:put name="topNavBar" content="/core/jsp/layout/topNavBar.jsp"/>
<tiles:put name="errorsAndMessages" content="/core/jsp/layout/errorsAndMessages.jsp"/>
<tiles:put name="mainwindow" content="/core/jsp/layout/Index.jsp"/>
</tiles:insert>



 Comments   
Comment by kchung [ 02/Apr/12 ]

When deploying without precompilejsp, I got the following error. Please fix the test case.

[#|2012-04-02T13:56:43.252-0700|SEVERE|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=17;_ThreadName=Thread-2;|Exception while loading the app : EJB Container initialization error
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at com.cca.core.security.info.UserProfileInfo.<clinit>(UserProfileInfo.java:59)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.sun.enterprise.deployment.util.TypeUtil.getMethod(TypeUtil.java:399)
at com.sun.enterprise.deployment.MethodDescriptor.getMethod(MethodDescriptor.java:287)
at org.glassfish.ejb.security.application.EJBSecurityManager.convertEJBMethodPermissions(EJBSecurityManager.java:550)
at org.glassfish.ejb.security.application.EJBSecurityManager.loadPolicyConfiguration(EJBSecurityManager.java:256)
at org.glassfish.ejb.security.application.EJBSecurityManager.initialize(EJBSecurityManager.java:317)
at org.glassfish.ejb.security.application.EJBSecurityManager.<init>(EJBSecurityManager.java:190)
at org.glassfish.ejb.security.factory.EJBSecurityManagerFactory.createManager(EJBSecurityManagerFactory.java:209)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:229)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:299)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:105)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:186)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.jav

Comment by Anissa Lam [ 19/Oct/12 ]

I am moving this bug to web-container as Kinman is looking at it.





[GLASSFISH-18594] jsftemplating optionally depend on dataprovider packages Created: 04/Apr/12  Updated: 11/Feb/13

Status: Open
Project: glassfish
Component/s: admin_gui
Affects Version/s: 3.1.2
Fix Version/s: future release

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

Tags: spo

 Description   

jsftemplating has badly setup its OSGi metadata. Although it requires dataprovider packages,
it optionally imports them. So, it breaks any kind of automatic deployment that does not deploy optional modules. This should be fixed. When you do fix this issue, please remove the dead module called appserver/admingui/jsftemplating because jsftemplating is built in a separate workspace called https://svn.java.net/svn/jsftemplating~svn/trunk



 Comments   
Comment by TangYong [ 22/Jun/12 ]

Dear Anissa,Sahoo,

In the current gfv4 trunk, appserver\admingui\jsftemplating still exists, and in admingui's pom.xml,
the jsftemplating module is not put in build process. So, the appserver\admingui\jsftemplating is indeedly
a dead module. It should be removed from appserver\admingui.





[GLASSFISH-18632] orb-connector brings in a lot of dependencies Created: 16/Apr/12  Updated: 19/Sep/14

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

Type: Bug Priority: Critical
Reporter: Sanjeeb Sahoo Assignee: Harshad Vilekar
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: spo

 Description   

orb-connector is getting started at startup time and it has a lot of dependencies, so this needs to be fixed asap.






[GLASSFISH-18722] [PERF] Standalone client fails receiving 1k or longer string via IIOP (Blocking IIOP-based perf tests) Created: 13/May/12  Updated: 19/Sep/14

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

Type: Bug Priority: Critical
Reporter: amitagarwal Assignee: Harshad Vilekar
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: PSRBUG, Sev2_Candidate, vikkumar_func

 Description   

Accessing a remote EJB to get 1k, 100k strings via a standalone client fails with error. This issue is present in 3.1.2 as well. In Solaris this happens all the time, for Linux it happens more on secure listener and sometimes on non-secure listener too.

java.rmi.MarshalException: CORBA COMM_FAILURE 1330446373 No; nested exception is:
org.omg.CORBA.COMM_FAILURE: WARNING: 00410037: Timeout while reading data in buffer manager vmcid: OMG minor code: 37 completed: No
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:258)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:211)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:150)
at com.sun.corba.ee.impl.presentation.rmi.codegen.CodegenStubBase.invoke(CodegenStubBase.java:227)
at weblogic.performance.benchmarks.rmi._EJBRMIBenchmarks_DynamicStub.getString(weblogic/performance/benchmarks/rmi/_EJBRMIBenchmarks_DynamicStub.java)
at weblogic.performance.benchmarks.rmi.clients.GetStringUser.op(RMIUser.java:148)
at weblogic.performance.benchmarks.rmi.clients.RMIUser.execute(RMIUser.java:70)
at weblogic.performance.utils.controller.ClientThread.run(ClientThread.java:81)
Caused by: org.omg.CORBA.COMM_FAILURE: WARNING: 00410037: Timeout while reading data in buffer manager vmcid: OMG minor code: 37 completed: No
at $Proxy28.bufferReadManagerTimeout(Unknown Source)
at com.sun.corba.ee.impl.encoding.BufferManagerReadStream.underflow(BufferManagerReadStream.java:142)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_1.grow(CDRInputStream_1_1.java:113)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_octet_array(CDRInputStream_1_0.java:714)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.getConvertedChars(CDRInputStream_1_0.java:2335)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_2.read_wstring(CDRInputStream_1_2.java:171)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1077)
at com.sun.corba.ee.impl.encoding.CDRInputObject.read_value(CDRInputObject.java:531)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$14.read(DynamicMethodMarshallerImpl.java:383)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.readResult(DynamicMethodMarshallerImpl.java:482)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:201)
... 6 more
java.rmi.MarshalException: CORBA COMM_FAILURE 1330446373 No; nested exception is:
org.omg.CORBA.COMM_FAILURE: WARNING: 00410037: Timeout while reading data in buffer manager vmcid: OMG minor code: 37 completed: No
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:258)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:211)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:150)
at com.sun.corba.ee.impl.presentation.rmi.codegen.CodegenStubBase.invoke(CodegenStubBase.java:227)
at weblogic.performance.benchmarks.rmi._EJBRMIBenchmarks_DynamicStub.getString(weblogic/performance/benchmarks/rmi/_EJBRMIBenchmarks_DynamicStub.java)
at weblogic.performance.benchmarks.rmi.clients.GetStringUser.op(RMIUser.java:148)
at weblogic.performance.benchmarks.rmi.clients.RMIUser.execute(RMIUser.java:70)
at weblogic.performance.utils.controller.ClientThread.run(ClientThread.java:81)
Caused by: org.omg.CORBA.COMM_FAILURE: WARNING: 00410037: Timeout while reading data in buffer manager vmcid: OMG minor code: 37 completed: No
at $Proxy28.bufferReadManagerTimeout(Unknown Source)
at com.sun.corba.ee.impl.encoding.BufferManagerReadStream.underflow(BufferManagerReadStream.java:142)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_1.grow(CDRInputStream_1_1.java:113)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_octet_array(CDRInputStream_1_0.java:714)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.getConvertedChars(CDRInputStream_1_0.java:2335)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_2.read_wstring(CDRInputStream_1_2.java:171)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1077)
at com.sun.corba.ee.impl.encoding.CDRInputObject.read_value(CDRInputObject.java:531)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$14.read(DynamicMethodMarshallerImpl.java:383)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.readResult(DynamicMethodMarshallerImpl.java:482)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:201)
... 6 more
null



 Comments   
Comment by Harshad Vilekar [ 14/May/12 ]

Could you rerun the test with the flag : "-Dcom.sun.corba.ee.ORBDebug=transport". Please set this on both the client and the GlassFish server. And include the server log and the client side output.

Also, is it possible to attach the test that duplicates the issue ? I ran a simple app that invokes a remote method that returns a string of size > 100K. The call is repeated 1000 times, but it couldn't duplicate the failure on my Solaris / Linux box.

Comment by Scott Oaks [ 04/Dec/12 ]

In May at perf team meetings, we discussed that the ORBDebug output would be too large for this test to make sense of, and that we expected the behavior might change after the summertime ORB integrations (but the latter isn't hte case; this is still an issue).

Comment by Harshad Vilekar [ 11/Feb/13 ]

Looking at the issue now. Tried the test case provided by Amit, and could duplicate the client side exception on my Linux box with the latest GF 4.0 build.





[GLASSFISH-18803] no response for a chunked package Created: 13/Jun/12  Updated: 14/Dec/12

Status: Open
Project: glassfish
Component/s: grizzly-kernel
Affects Version/s: 3.1.2_b23
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: yavuzs Assignee: oleksiys
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: 1 day
Time Spent: Not Specified
Original Estimate: 1 day
Environment:

SunOs, x86, 64bit


Attachments: File seac808012.cap    
Tags: http, http-listener

 Description   

there is a server that sends us chunked requests (by POST), our application on glassfish takes these packages and process them. but somehow, some of the packages are not processed by the application, also there is no log activity about these packages. but when we capture the network activity we can see that the request has come to the server.
we tried "-Dcom.sun.enterprise.web.connector.grizzly.enableSnoop=true" parameter. with this parameter, for the lost request there is no log.
here is a lost request:
Host: 192.168.100.10:49205
Transfer-Encoding: chunked

185
<?xml version='1.0' encoding='UTF-8'?>
<env:Envelope xmlns:env='http://www.w3.org/2003/05/soap-envelope' xmlns:seadac='http://www.schange.com/2004/SeaDAC/triggers'>
<env:Header><seadac:transaction transaction-id='

{20321632-B758-442a-ADFE-6E4607343AE3}

' origination-time='2012-06-12T08:29:04Z' env:role='http://www.w3.org/2003/05/soap-envelope/ultimateReceiver'/></env:Header>
<env:Body>
80
<seadac:subscription-notification subscription-id='

{1942B6B8-158F-4279-B9E9-0429671BEC67}

' current-request='3' next-request='4'>
c7
<seadac:hierarchy-changed hierarchy-uid='539401'><seadac:node-added hierarchy-uid='539710' asset-uid='528673'/></seadac:hierarchy-changed></seadac:subscription-notification></env:Body></env:Envelope>
0

you can find the capture attached.
frame 7824 and 7825 are the same request that the server sends to all subscribed clients. for this example there are two client subscribed. the gf application and the tomcat application. as you see, at the frame 7824 tomcat responded the request but at the frame 7825 fg did not respond the request.
regards,



 Comments   
Comment by yavuzs [ 19/Jun/12 ]

any response?

Comment by oleksiys [ 14/Dec/12 ]

sorry for the late response.
is it still the case w/ Glassfish 3.1.2.2?

thanks.

Comment by yavuzs [ 14/Dec/12 ]

the version is : GlassFish Server Open Source Edition 3.1.2 (build 23)

Comment by oleksiys [ 14/Dec/12 ]

yes, I understand, but there is a newer version (patch release) where this issue might have been fixed.
are you able to reproduce the issue consistently, or it happens sporadically?

Comment by yavuzs [ 14/Dec/12 ]

it happens sporadically. we didn't try new patch yet.





[GLASSFISH-18897] Remove non OSGI (exception-annotation-processor.jar) from glassfish-corba-orb of glassfish-corba bundle Created: 13/Jul/12  Updated: 16/Jul/12

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

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

cp glassfish3/glassfish/config/osgi.properties glassfish3/glassfish/domains/domain1/config
set glassfish.osgi.ondemand=true
Start Glassfish server (./asadmin start-domain -v)


Attachments: Text File Error.txt    
Tags: corba, packager

 Description   

glassfish-corba artifact has a dependency on artifact id glassfish-corba-orb with group id org.glassfish.corba; being an external jar it has a dependency on exception-annotation-processor.jar which is non OSGI and has no OSGI metadata available. Because of this plain jar being packaged and available in modules directory in distribution the server fails to startup.

The JAR needs to be removed from getting packaged during the build.

Please find the Exception attached.






[GLASSFISH-18941] [PERF] additional regression in startup/deployment benchmark due to latest HK2 integration Created: 25/Jul/12  Updated: 19/Sep/14

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

Type: Bug Priority: Critical
Reporter: amitagarwal Assignee: jwells
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency
depends on GLASSFISH-20206 Boot GlassFish startup services in pa... Closed
blocks GLASSFISH-18693 [PERF] regression in startup/deployme... Resolved
Tags: PSRBUG, devx_web

 Description   

Recent HK2 integration has caused an additional regression in startup/deployment benchmark.
Before integration total elapsed time for startup/benchmark was already 22% down, now its 33% down. Footprint has gone up by additional 16 MB. Startup time has gone up over a second.

Will add more info once I collect profiles.



 Comments   
Comment by matt_so [ 20/Aug/12 ]

New result using:
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)

Retained Heap Different between Glassfish b39 to b45:
1) org.jvnet.hk2.component.MultiMap
B39: 3,669 Objects, 6,994,112 bytes
B45: 4,264 Objects, 8,132,384 bytes

2) org.jvnet.hk2.component.DescriptorImpl
B39: 3121 Objects, 6,426,808 bytes
B45: 3702 Objects, 7,337,352 bytes

3) org.jvnet.hk2.component.Habitat
B39: 1 Object, 4,756,520 bytes
B45: 3 Objects, 5,838,024 bytes

Comment by jwells [ 20/Aug/12 ]

Is there any way to see what are the extra objects created? Like some sort of graph or something?

I'm most freaked out about the MultiMaps, which really should be going away...

Comment by Tom Mueller [ 15/Feb/13 ]

Assigning back to John. If you need help collecting more data on this part of the regression, please contact me, but do not assign the issue back to Amit. Eliminating the regression in the developer benchmark is a release criteria for the Java EE 7 release, so this is a high priority issue.

Comment by jwells [ 21/Feb/13 ]

I have made a change to the HK2 initialization files (hk2-locator/default etc) such that they are smaller in size. In theory this should help with boot time. Can we get another measurement on startup time?

Comment by Tom Mueller [ 21/Feb/13 ]

John, the startup time is measured daily via this hudson job:

http://hudson-sca.us.oracle.com/job/as-dev-benchmark-trunk-win/ (internal link)

There is no need to reassign this issue back to Scott to get a measurement.
Another option is to run this benchmark yourself. The procedure for running it is in the configuration of the hudson job.

From the latest results it looks like you change may have produced an improvement.

Comment by Tom Mueller [ 22/Feb/13 ]

This must be fixed for 4.0.

Comment by jwells [ 26/Apr/13 ]

We have made many fixes, some of which have been rejected for stability reasons. Deferring this to 4.0.1

Comment by pbelbin [ 23/Jul/13 ]

does the parallel startup functionality apply also to the parallel startup of deployed apps?

this is a pain point for me with some of the GF 3.1.2 servers I look after.





[GLASSFISH-18979] Eclipse IDE shutdown when GlassFish console admin tab closed Created: 06/Aug/12  Updated: 19/Oct/12

Status: Open
Project: glassfish
Component/s: ide-integration
Affects Version/s: 3.1.2
Fix Version/s: None

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

windows 7 x64 Ultimate - Eclipse JEE Juno


Attachments: Text File hs_err_pid1220.log    
Tags: admin-gui, administration, eclipse

 Description   

I've installed the GlassFish Server Adapter Tools on Eclipse JEE Juno as well as the GlassFish Application Server Open Source Edition version 3.1.2, now whenever i open the GlassFish Admin Console from within Eclipse's Internal Browser then try to close that tab, Eclipse immediatly shuts down and creates an error log file in my Eclipse home folder. (I've attached the .log file with this issue)

I've noticed that this problem only occurs when i close the tab of the Admin Console after i've logged in. If i just Open the Admin Console inside Eclipse but do not login and close the tab, nothing wrong happens.

I've also been able to reproduce the same weird behaviour on Eclipse JEE Indigo. Notice that if i switch the Web Browser preference to [Default Internet Browser or any other browser] this problem doesn't happen as i can close those browser pages without any worries.

p.s: i tried with different versions of the jdk : 1.6 u 26 and u33 as well as jdk 1.7 u 5 (all jdks and jres are 32 bits versions)



 Comments   
Comment by Anissa Lam [ 19/Oct/12 ]

Request Vince to look into this. I am not sure what console can do for this behavior.





[GLASSFISH-19650] Server throws com.sun.xml.ws.client.ClientTransportException: The server sent HTTP status code 500: Internal Server Error Created: 07/Feb/13  Updated: 07/Feb/13

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

Type: Bug Priority: Critical
Reporter: mayurbonde Assignee: michael.y.chen
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: doesnt

 Description   

I have deployed jax-ws web service into glassfish.My client request for the service method which takes process 5000 to 10000 records.In between processing server throws clientTransportException with following stack-trace.
com.sun.xml.ws.client.ClientTransportException: The server sent HTTP status code 500: Internal Server Error
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.createResponsePacket(HttpTransportPipe.java:314)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:265)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:184)
at com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:109)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:641)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:600)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:585)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:482)
at com.sun.xml.ws.client.Stub.process(Stub.java:323)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:161)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:113)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:93)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:144)
at $Proxy190.webservicemethodcall(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

I try to monitor the glassfish request but it show errorcount 1 which gives me no proper reason of errorcount.
It has been observed that after throwing exception my service method properly functioning unto last line of method at server.But at client get exception before rendering the response.It look like Client connection drops before returning response.Once return object populated properly it wont find pipe to return response.
I have tried with all combination of timeout.
With larger data get i got this exception.






[GLASSFISH-19851] Nucleus admin dev tests do not do a proper cleanup. Created: 13/Mar/13  Updated: 13/Mar/13

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

Type: Bug Priority: Critical
Reporter: Marek Potociar Assignee: Justin Lee
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: jersey, test-framework

 Description   

GF nucleus admin dev tests run before GF nucleus QL tests cause false negatives because GF nucleus admin dev tests do not clean-up GF test instance properly. This leads to observable false negatives behaviour on the same cleanly checked out sources, for example:

  1. run GF nucleus quick look - PASS
  2. run GF nucleus admin dev tests - PASS
  3. run GF nucleus quick look again - FAIL

Or:

  1. run GF nucleus admin dev tests - PASS
  2. run GF nucleus admin dev tests - FAIL

This issue complicates pre-integration testing required by Jersey and has cost us a lot of wasted effort on Jersey side.

From what we observed, a possible problem with admin dev tests AFAIK is that they leave a few GF instances running which may lead to port conflicts in the subsequently run test suites.






[GLASSFISH-20094] Undeploy on Glassfish causes connection pool to be no more usable (Grails) Created: 28/Mar/13  Updated: 25/Jun/13

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

Type: Bug Priority: Critical
Reporter: pierre.fabier.camineo Assignee: vivekp
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Glassfish 3.1.2.2
Grails 2.2.1
Windows 7 or Debian


Tags: admin-gui, classloader, datasource, driver, grails, jdbc, jndi, postgresql

 Description   

Hi,

I'm working on a grails 2.2.1 project running on glassfish 3.1.2.2, using a jndi pooled datasource connected to a postgres 9.2 database.
When I deploy for the first time the application, I have no issues, everything works fine.

But, everytime I undeploy (or redeploy) my application, my connection pool stops working.
If I try to ping using glassfish admin console, I get this error :

Avertissement: RAR8054: Exception while creating an unpooled [test] connection for pool [ sample ], Connection could not be allocated because: No suitable driver found for jdbc:postgresql://localhost:5432/sample?loginTimeout=0&socketTimeout=0&prepareThreshold=5&unknownLength=2147483647&loglevel=0&tcpkeepalive=false
Grave: RestResponse.getResponse() donne FAILURE. endpoint = http://localhost:4848/management/domain/resources/ping-connection-pool.json ; attrs =

{id=sample}

'

I repeat : my connection pool works fine when I deploy (I have the postgresql driver in "/glassfish/lib", my connection pool is correctly configured, etc.), it's only when I undeploy that I have troubles.
This bug is highly reproductible, I even did a small grails project that reproduces the problem, you only need to have to configure a jndi datasource connected to a "sample" database (jndi/sample) on your glassfish server.

Here is the github link :
https://github.com/fabier/GlassfishJDBCGrailsPostgresql
And the war :
https://www.dropbox.com/s/cb9hmgc6lfabl5x/GlassfishJDBCGrailsPostgresql-0.1.war
and the domains.xml file:
https://www.dropbox.com/s/ljealpfp0zxj2r4/domain.xml

On grails side, my connection to the pool is configured this way:
environments {
production {
dataSource

{ dbCreate = "create-drop" jndiName = "jdbc/sample" }

}
}

I think this bug is severe, since it kills a connection pool that can be shared amongst other webapps or ears.
For information, I did a bit of research, sensing it might be some sort of class unloader associated with undeployment, I found log4j that could be linked to this problem, so I tryed :
-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
but it didn't help.
Last point : in fact, postgresql driver is fully unloaded, so that other connection pools using postgresql driver are not usable after an undeploy.

Please help.
Thanks.

Pierre FABIER
Ingénieur d'Etude
Parc technologique du canal
13, avenue de l'Europe
31520 Ramonville-Saint-Agne (France)
Tel: 09 74 77 14 21 - Fax: 09 59 64 78 74
www.camineo.com



 Comments   
Comment by pierre.fabier.camineo [ 28/Mar/13 ]

Link to same issue on grails ML:
http://grails.1312388.n4.nabble.com/Undeploy-on-Glassfish-causes-connection-pool-to-be-no-more-usable-td4643041.html

Comment by pierre.fabier.camineo [ 08/Apr/13 ]

Re,

I did some investigations:

  • If I use MySQL instead of PostgreSQL (after changing the driver and re-configuring the pool), I cannot reproduce this problem. So PostgreSQL is involved in this problem too.
  • If I use Tomcat instead of Glassfish, I cannot reproduce this problem. So Glassfish is involved.
  • If I do not use grails, and deploy a standard J2EE app like «petstore» (<a href="http://www.oracle.com/technetwork/java/petstore1-3-1-02-139690.html">link</a>) using PostgreSQL jndi datasource, I cannot reproduce the problem. So Grails is involved too.
  • If I use Glassfish 3.0, Glassfish 3.1 or Glassfish 3.1.2.2, I still reproduce the problem, so the version of glassfish doesn't change anything.
  • If I use PostgreSQL 9.0, PostgreSQL 9.1 or PostgreSQL 9.2, I still reproduce the problem, so the version of PostgreSQL doesn't change anything.
  • Most incredible thing I discovered (that made me fall out of my chair) : If I undeploy a grails app using a MySQL datasource on a glassfish server that declares a UNUSED connection pool to a PostgreSQL database, the MySQL pool still works, but the PostgreSQL pool doesn't !!! it shows the «No suitable driver found» error, as there was no problem prior to undeploying.

Please help me, I'm stuck with this problem, and no one seems to be able to answer me.


Pierre FABIER
Ingénieur d'Etude
Parc technologique du canal
13, avenue de l'Europe
31520 Ramonville-Saint-Agne (France)
Tel: 09 74 77 14 21 - Fax: 09 59 64 78 74

Comment by pierre.fabier.camineo [ 25/Jun/13 ]

I posted this message 3 months ago, can someone help me with this, please ?


Pierre FABIER
Ingénieur d'Etude
Parc technologique du canal
13, avenue de l'Europe
31520 Ramonville-Saint-Agne (France)
Tel: 09 74 77 14 21 - Fax: 09 59 64 78 74





[GLASSFISH-20322] Configuration parsing (domain.xml) slows down server startup Created: 16/Apr/13  Updated: 19/Sep/14

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

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

Tags: devx_web

 Description   

Parsing the domain.xml during server startup takes about 420 ms for 271 elements using 88 config bean classes. On the system where this was measured, system startup takes about 3400 ms, so domain.xml parsing is about 8% of the startup time. Of this 420 ms, about 275 is spent in DomainXml.parseDomainXml.

Much of the DomainXml.parseDomainXml time is spent loading the classes. Just the parsing part (based on measuring MiniXmlParser) takes about 25 ms. The current parser is tightly coupled to the use of the model, which is derived from the config bean class. To make this parallel, this would need to be separated. The XML document would need to be parsed to determine the list of needed config bean models and the data to populate the Dom objects (stored in a form that is independent of the model). Then, using multiple threads, the config bean classes could be loaded and the Dom objects created. In addition to class loading, whenever a config bean is created, there is a call to the GlassFishConfigBean.initializationCompleted method which calls the AMX PendingConfigBeans class to add the config bean to a queue that is used by AMX if/when it initializes.

The time outside of parseDomainXml (about 145 ms) is spent in the decorate method which adds indices to the service locator for various config objects.

This issue is for exploring and implementing ways to reduce the time needed to parse the domain.xml with the goal of improving the server startup time.



 Comments   
Comment by Tom Mueller [ 18/Apr/13 ]

For comparison, 3.1.2 parses 251 elements using 71 config bean classes. The time to do this using the same system as before is 166 ms total with 85 ms of that being in DomainXml.parseDomainXml.

If parsing scaled linearly with either the number of elements or the number of classes, we would expect the time in 4.0 to be about 180-205 ms (not the 420 that is being measure currently). So there seems to be an opportunity here for about 200 ms of improvement.

Comment by Tom Mueller [ 19/Apr/13 ]

One source of the slow down is in the GlassFishConfigBean.initializationCompleted method. In 4.0, this code was changed from:

habitat.getComponent(CageBuilder.class, "PendingConfigBeans");

to

getServiceLocator().<ConfigBeanListener>getAllServices(ConfigBeanListener.class)

The latter code is much more complex resulting in many more intermediate objects being created that the former. However, this only accounts for about 6 ms of difference.

Comment by Tom Mueller [ 19/Apr/13 ]

Another data point. I copied a 3.1.2 domain.xml into a 4.0 domain and measured the time: 362 ms with 234 in parseDomainXml (compares with 166/85).

Comment by Tom Mueller [ 23/Apr/13 ]

Here is some additional timing data for the DomainXml.run method.

The DomDocument.buildModel shows calls to the ConfigModel constructor with the time (in usecs).
The Configparser.handleElement lines show the breakdown of the time spent in the ConfigParser.handleElement method as follows:

make = document.make
fill = fill attributes
children = parse the child elements - NOTE: this includes the complete handleElement time for the all the children
reg = dom.register
con = dom.ensureConstraints(children)
ic = dom.setChildren(children) (if nec.) and dom.initializationCompleted()

All times are in usec.

DomDocument.buildModel com.sun.enterprise.config.serverbeans.SystemPropertyInjector 210
DomDocument.buildModel com.sun.enterprise.config.serverbeans.ResourceRefInjector 31
DomDocument.buildModel org.jvnet.hk2.config.types.PropertyInjector 35
DomDocument.buildModel com.sun.enterprise.config.serverbeans.ApplicationRefInjector 41
DomDocument.buildModel com.sun.enterprise.config.serverbeans.ServerInjector 312
DomDocument.buildModel com.sun.enterprise.config.serverbeans.ServersInjector 370
DomDocument.buildModel org.glassfish.api.admin.config.ApplicationNameInjector 22
DomDocument.buildModel com.sun.enterprise.config.serverbeans.SystemApplicationsInjector 76
DomDocument.buildModel com.sun.enterprise.config.serverbeans.HealthCheckerInjector 31
DomDocument.buildModel com.sun.enterprise.config.serverbeans.ServerRefInjector 107
DomDocument.buildModel com.sun.enterprise.config.serverbeans.ClusterExtensionInjector 34
DomDocument.buildModel com.sun.enterprise.config.serverbeans.ClusterInjector 342
DomDocument.buildModel com.sun.enterprise.config.serverbeans.ClustersInjector 403
DomDocument.buildModel com.sun.enterprise.config.serverbeans.ResourceInjector 23
DomDocument.buildModel com.sun.enterprise.config.serverbeans.ResourcesInjector 77
DomDocument.buildModel com.sun.enterprise.config.serverbeans.AuthRealmInjector 42
DomDocument.buildModel com.sun.enterprise.config.serverbeans.ModuleLogLevelsInjector 179
DomDocument.buildModel com.sun.enterprise.config.serverbeans.LogServiceInjector 304
DomDocument.buildModel org.glassfish.grizzly.config.dom.SslInjector 168
DomDocument.buildModel com.sun.enterprise.config.serverbeans.JmxConnectorInjector 294
DomDocument.buildModel com.sun.enterprise.config.serverbeans.NodeAgentInjector 809
DomDocument.buildModel com.sun.enterprise.config.serverbeans.NodeAgentsInjector 861
DomDocument.buildModel com.sun.enterprise.config.serverbeans.SecureAdminInternalUserInjector 30
DomDocument.buildModel com.sun.enterprise.config.serverbeans.SecureAdminPrincipalInjector 34
DomDocument.buildModel com.sun.enterprise.config.serverbeans.SecureAdminInjector 170
DomDocument.buildModel com.sun.enterprise.config.serverbeans.DomainExtensionInjector 13
DomDocument.buildModel com.sun.enterprise.config.serverbeans.ApplicationsInjector 28
DomDocument.buildModel com.sun.enterprise.config.serverbeans.SshAuthInjector 35
DomDocument.buildModel com.sun.enterprise.config.serverbeans.SshConnectorInjector 95
DomDocument.buildModel com.sun.enterprise.config.serverbeans.NodeInjector 210
DomDocument.buildModel com.sun.enterprise.config.serverbeans.NodesInjector 272
DomDocument.buildModel org.glassfish.grizzly.config.dom.ThreadPoolInjector 65
DomDocument.buildModel com.sun.enterprise.config.serverbeans.ThreadPoolsInjector 121
DomDocument.buildModel org.glassfish.api.monitoring.ContainerMonitoringInjector 27
DomDocument.buildModel com.sun.enterprise.config.serverbeans.ModuleMonitoringLevelsInjector 132
DomDocument.buildModel com.sun.enterprise.config.serverbeans.MonitoringServiceInjector 300
DomDocument.buildModel com.sun.enterprise.config.serverbeans.AccessLogInjector 70
DomDocument.buildModel com.sun.enterprise.config.serverbeans.HttpAccessLogInjector 24
DomDocument.buildModel com.sun.enterprise.config.serverbeans.VirtualServerInjector 163
DomDocument.buildModel com.sun.enterprise.config.serverbeans.HttpServiceInjector 363
DomDocument.buildModel com.sun.enterprise.config.serverbeans.AvailabilityServiceExtensionInjector 17
DomDocument.buildModel com.sun.enterprise.config.serverbeans.AvailabilityServiceInjector 125
DomDocument.buildModel com.sun.enterprise.config.serverbeans.ProfilerInjector 53
DomDocument.buildModel com.sun.enterprise.config.serverbeans.JavaConfigInjector 275
DomDocument.buildModel com.sun.enterprise.config.serverbeans.DiagnosticServiceExtensionInjector 24
DomDocument.buildModel com.sun.enterprise.config.serverbeans.DiagnosticServiceInjector 128
DomDocument.buildModel com.sun.enterprise.config.serverbeans.FailureDetectionInjector 35
DomDocument.buildModel com.sun.enterprise.config.serverbeans.GroupManagementServiceInjector 137
DomDocument.buildModel org.glassfish.grizzly.config.dom.SelectionKeyHandlerInjector 39
DomDocument.buildModel org.glassfish.grizzly.config.dom.TransportInjector 129
DomDocument.buildModel org.glassfish.grizzly.config.dom.TransportsInjector 293
DomDocument.buildModel org.glassfish.grizzly.config.dom.FileCacheInjector 49
DomDocument.buildModel org.glassfish.grizzly.config.dom.SpdyInjector 58
DomDocument.buildModel org.glassfish.grizzly.config.dom.HttpInjector 434
DomDocument.buildModel org.glassfish.grizzly.config.dom.ProtocolFinderInjector 45
DomDocument.buildModel org.glassfish.grizzly.config.dom.PortUnificationInjector 124
DomDocument.buildModel org.glassfish.grizzly.config.dom.HttpRedirectInjector 39
DomDocument.buildModel org.glassfish.grizzly.config.dom.ProtocolFilterInjector 42
DomDocument.buildModel org.glassfish.grizzly.config.dom.ProtocolChainInjector 119
DomDocument.buildModel org.glassfish.grizzly.config.dom.ProtocolChainInstanceHandlerInjector 192
DomDocument.buildModel org.glassfish.grizzly.config.dom.ProtocolInjector 1041
DomDocument.buildModel org.glassfish.grizzly.config.dom.ProtocolsInjector 1110
DomDocument.buildModel org.glassfish.grizzly.config.dom.NetworkListenerInjector 75
DomDocument.buildModel org.glassfish.grizzly.config.dom.NetworkListenersInjector 166
DomDocument.buildModel org.glassfish.grizzly.config.dom.NetworkConfigInjector 1705
DomDocument.buildModel com.sun.enterprise.config.serverbeans.AuditModuleInjector 43
DomDocument.buildModel com.sun.enterprise.config.serverbeans.JaccProviderInjector 46
DomDocument.buildModel com.sun.enterprise.config.serverbeans.ResponsePolicyInjector 27
DomDocument.buildModel com.sun.enterprise.config.serverbeans.RequestPolicyInjector 25
DomDocument.buildModel com.sun.enterprise.config.serverbeans.ProviderConfigInjector 173
DomDocument.buildModel com.sun.enterprise.config.serverbeans.MessageSecurityConfigInjector 246
DomDocument.buildModel com.sun.enterprise.config.serverbeans.SecurityServiceInjector 543
DomDocument.buildModel org.glassfish.api.admin.config.ContainerInjector 14
DomDocument.buildModel com.sun.enterprise.config.serverbeans.DasConfigInjector 78
DomDocument.buildModel com.sun.enterprise.config.serverbeans.AdminServiceInjector 186
DomDocument.buildModel com.sun.enterprise.config.serverbeans.ConfigInjector 4457
DomDocument.buildModel com.sun.enterprise.config.serverbeans.ConfigsInjector 4519
DomDocument.buildModel com.sun.enterprise.config.serverbeans.DomainInjector 13578
DomDocument.buildModel org.glassfish.security.services.config.SecurityProviderConfigInjector 21
DomDocument.buildModel org.glassfish.security.services.config.SecurityProviderInjector 107
DomDocument.buildModel org.glassfish.security.services.config.SecurityConfigurationInjector 186
DomDocument.buildModel org.glassfish.security.services.config.SecurityConfigurationsInjector 240
DomDocument.buildModel org.glassfish.security.services.config.AuthenticationServiceInjector 49
DomDocument.buildModel org.glassfish.security.services.config.LoginModuleConfigInjector 47
Configparser.handleElement property make=34 fill=5 children=27 reg=1875 con=16 ic=3451
Configparser.handleElement property make=39 fill=5 children=7 reg=547 con=3 ic=79
Configparser.handleElement login-module-config make=34 fill=6 children=6694 reg=736 con=18 ic=59
Configparser.handleElement security-provider make=35 fill=6 children=7749 reg=391 con=16 ic=51
Configparser.handleElement property make=34 fill=4 children=6 reg=222 con=2 ic=51
Configparser.handleElement property make=37 fill=4 children=6 reg=221 con=3 ic=50
Configparser.handleElement login-module-config make=33 fill=6 children=781 reg=220 con=4 ic=49
Configparser.handleElement security-provider make=40 fill=6 children=1208 reg=217 con=4 ic=52
Configparser.handleElement authentication-service make=34 fill=16 children=9971 reg=521 con=4 ic=49
DomDocument.buildModel org.glassfish.security.services.config.AuthorizationServiceInjector 50
DomDocument.buildModel org.glassfish.security.services.provider.authorization.AuthorizationProviderConfigInjector 71
Configparser.handleElement authorization-provider-config make=37 fill=5 children=7 reg=409 con=5 ic=56
Configparser.handleElement security-provider make=34 fill=6 children=729 reg=227 con=5 ic=49
Configparser.handleElement authorization-service make=34 fill=4 children=1142 reg=364 con=4 ic=49
Configparser.handleElement security-configurations make=28 fill=1 children=12594 reg=468 con=5 ic=52
DomDocument.buildModel com.sun.enterprise.config.serverbeans.ManagedJobConfigInjector 55
Configparser.handleElement managed-job-config make=38 fill=1 children=7 reg=576 con=7 ic=52
Configparser.handleElement system-applications make=28 fill=1 children=6 reg=451 con=4 ic=52
DomDocument.buildModel org.glassfish.jdbc.config.JdbcResourceInjector 64
Configparser.handleElement jdbc-resource make=41 fill=7 children=6 reg=27385 con=7 ic=63
Configparser.handleElement jdbc-resource make=47 fill=8 children=8 reg=230 con=5 ic=54
DomDocument.buildModel org.glassfish.jdbc.config.JdbcConnectionPoolInjector 247
Configparser.handleElement property make=31 fill=5 children=6 reg=259 con=3 ic=56
Configparser.handleElement property make=35 fill=4 children=6 reg=235 con=3 ic=50
Configparser.handleElement jdbc-connection-pool make=122 fill=8 children=857 reg=893 con=9 ic=59
Configparser.handleElement property make=35 fill=4 children=7 reg=251 con=3 ic=53
Configparser.handleElement property make=36 fill=4 children=6 reg=233 con=2 ic=50
Configparser.handleElement property make=35 fill=4 children=6 reg=235 con=4 ic=119
Configparser.handleElement property make=56 fill=7 children=9 reg=366 con=4 ic=74
Configparser.handleElement property make=52 fill=7 children=8 reg=341 con=4 ic=71
Configparser.handleElement property make=50 fill=6 children=8 reg=334 con=4 ic=74
Configparser.handleElement jdbc-connection-pool make=121 fill=10 children=3079 reg=318 con=8 ic=74
DomDocument.buildModel org.glassfish.connectors.config.BackendPrincipalInjector 39
DomDocument.buildModel org.glassfish.connectors.config.SecurityMapInjector 147
DomDocument.buildModel org.glassfish.connectors.config.ConnectorConnectionPoolInjector 437
Configparser.handleElement connector-connection-pool make=133 fill=19 children=10 reg=1269 con=7 ic=85
DomDocument.buildModel org.glassfish.connectors.config.ConnectorResourceInjector 96
Configparser.handleElement connector-resource make=79 fill=10 children=9 reg=742 con=6 ic=74
Configparser.handleElement resources make=27 fill=1 children=37912 reg=432 con=8 ic=78
Configparser.handleElement resource-ref make=48 fill=4 children=8 reg=557 con=4 ic=78
Configparser.handleElement resource-ref make=43 fill=5 children=7 reg=305 con=4 ic=70
Configparser.handleElement resource-ref make=42 fill=5 children=8 reg=308 con=4 ic=70
Configparser.handleElement server make=88 fill=7 children=1835 reg=1361 con=10 ic=74
Configparser.handleElement servers make=45 fill=1 children=3499 reg=394 con=4 ic=50
Configparser.handleElement node make=53 fill=8 children=6 reg=461 con=6 ic=50
Configparser.handleElement nodes make=32 fill=1 children=694 reg=322 con=4 ic=53
Configparser.handleElement system-property make=33 fill=6 children=6 reg=392 con=3 ic=50
Configparser.handleElement access-log make=42 fill=1 children=6 reg=337 con=4 ic=54
Configparser.handleElement virtual-server make=67 fill=6 children=6 reg=531 con=8 ic=51
Configparser.handleElement virtual-server make=63 fill=4 children=6 reg=221 con=4 ic=50
Configparser.handleElement http-service make=37 fill=1 children=1667 reg=672 con=7 ic=50
DomDocument.buildModel org.glassfish.orb.admin.config.OrbInjector 48
DomDocument.buildModel org.glassfish.orb.admin.config.IiopListenerInjector 96
DomDocument.buildModel com.sun.enterprise.config.serverbeans.SslClientConfigInjector 46
DomDocument.buildModel org.glassfish.orb.admin.config.IiopServiceInjector 355
Configparser.handleElement orb make=32 fill=4 children=6 reg=549 con=4 ic=51
Configparser.handleElement iiop-listener make=50 fill=7 children=6 reg=469 con=8 ic=52
Configparser.handleElement ssl make=87 fill=4 children=6 reg=676 con=4 ic=56
Configparser.handleElement iiop-listener make=47 fill=8 children=922 reg=253 con=5 ic=49
Configparser.handleElement ssl make=87 fill=6 children=6 reg=151 con=4 ic=50
Configparser.handleElement iiop-listener make=50 fill=7 children=399 reg=219 con=4 ic=52
Configparser.handleElement iiop-service make=36 fill=1 children=3663 reg=352 con=6 ic=53
Configparser.handleElement jmx-connector make=52 fill=9 children=6 reg=436 con=5 ic=50
Configparser.handleElement property make=34 fill=5 children=5 reg=246 con=3 ic=49
Configparser.handleElement property make=33 fill=5 children=6 reg=236 con=2 ic=53
Configparser.handleElement property make=33 fill=4 children=6 reg=239 con=2 ic=53
Configparser.handleElement das-config make=53 fill=1 children=6 reg=374 con=4 ic=54
Configparser.handleElement admin-service make=45 fill=5 children=2431 reg=21538 con=8 ic=69
DomDocument.buildModel org.glassfish.connectors.config.ConnectorServiceInjector 60
Configparser.handleElement connector-service make=33 fill=2 children=7 reg=383 con=5 ic=53
DomDocument.buildModel com.sun.enterprise.transaction.config.TransactionServiceInjector 58
Configparser.handleElement transaction-service make=35 fill=5 children=7 reg=835 con=5 ic=58
DomDocument.buildModel org.glassfish.batch.spi.impl.BatchRuntimeConfigurationInjector 28
Configparser.handleElement batch-runtime-configuration make=46 fill=2 children=11 reg=25673 con=4 ic=61
DomDocument.buildModel com.sun.enterprise.connectors.jms.config.JmsHostInjector 59
DomDocument.buildModel com.sun.enterprise.connectors.jms.config.JmsServiceInjector 209
Configparser.handleElement jms-host make=30 fill=5 children=7 reg=16884 con=6 ic=63
Configparser.handleElement jms-service make=77 fill=7 children=17130 reg=578 con=7 ic=80
DomDocument.buildModel org.glassfish.weld.connector.CDIServiceInjector 34
Configparser.handleElement cdi-service make=38 fill=2 children=9 reg=647 con=4 ic=77
DomDocument.buildModel org.glassfish.web.config.serverbeans.SessionPropertiesInjector 42
DomDocument.buildModel org.glassfish.web.config.serverbeans.ManagerPropertiesInjector 62
DomDocument.buildModel org.glassfish.web.config.serverbeans.StorePropertiesInjector 50
DomDocument.buildModel org.glassfish.web.config.serverbeans.SessionManagerInjector 244
DomDocument.buildModel org.glassfish.web.config.serverbeans.SessionConfigInjector 412
DomDocument.buildModel org.glassfish.web.config.serverbeans.WebContainerInjector 517
Configparser.handleElement manager-properties make=37 fill=1 children=9 reg=766 con=7 ic=98
Configparser.handleElement store-properties make=36 fill=1 children=9 reg=436 con=5 ic=89
Configparser.handleElement session-manager make=31 fill=1 children=1699 reg=416 con=7 ic=75
Configparser.handleElement session-properties make=36 fill=1 children=9 reg=407 con=5 ic=73
Configparser.handleElement session-config make=31 fill=2 children=2918 reg=404 con=6 ic=74
Configparser.handleElement web-container make=38 fill=2 children=3523 reg=462 con=7 ic=73
Configparser.handleElement diagnostic-service make=61 fill=2 children=8 reg=463 con=7 ic=73
Configparser.handleElement property make=39 fill=5 children=8 reg=343 con=4 ic=73
Configparser.handleElement property make=39 fill=6 children=8 reg=332 con=3 ic=73
Configparser.handleElement auth-realm make=40 fill=8 children=1150 reg=587 con=6 ic=74
Configparser.handleElement property make=37 fill=6 children=7 reg=329 con=4 ic=73
Configparser.handleElement property make=38 fill=6 children=8 reg=254 con=3 ic=49
Configparser.handleElement auth-realm make=44 fill=6 children=999 reg=198 con=4 ic=48
Configparser.handleElement auth-realm make=26 fill=4 children=6 reg=200 con=4 ic=47
Configparser.handleElement property make=23 fill=4 children=5 reg=228 con=3 ic=48
Configparser.handleElement jacc-provider make=29 fill=5 children=389 reg=616 con=6 ic=79
Configparser.handleElement jacc-provider make=47 fill=10 children=9 reg=309 con=7 ic=81
Configparser.handleElement property make=38 fill=6 children=8 reg=352 con=4 ic=80
Configparser.handleElement audit-module make=40 fill=7 children=599 reg=619 con=6 ic=79
Configparser.handleElement request-policy make=34 fill=4 children=9 reg=428 con=4 ic=81
Configparser.handleElement response-policy make=35 fill=5 children=8 reg=416 con=5 ic=80
Configparser.handleElement property make=46 fill=6 children=8 reg=352 con=4 ic=77
Configparser.handleElement property make=40 fill=6 children=8 reg=338 con=4 ic=76
Configparser.handleElement property make=43 fill=6 children=8 reg=388 con=4 ic=83
Configparser.handleElement property make=41 fill=6 children=9 reg=380 con=4 ic=74
Configparser.handleElement provider-config make=48 fill=7 children=4110 reg=677 con=8 ic=75
Configparser.handleElement request-policy make=31 fill=4 children=8 reg=209 con=4 ic=79
Configparser.handleElement response-policy make=35 fill=4 children=8 reg=218 con=4 ic=74
Configparser.handleElement property make=40 fill=6 children=8 reg=367 con=4 ic=75
Configparser.handleElement property make=39 fill=6 children=8 reg=359 con=4 ic=74
Configparser.handleElement property make=38 fill=6 children=9 reg=290 con=3 ic=54
Configparser.handleElement property make=37 fill=6 children=9 reg=287 con=3 ic=51
Configparser.handleElement property make=39 fill=7 children=8 reg=265 con=3 ic=51
Configparser.handleElement provider-config make=49 fill=8 children=3502 reg=265 con=6 ic=50
Configparser.handleElement request-policy make=20 fill=2 children=6 reg=156 con=3 ic=51
Configparser.handleElement response-policy make=35 fill=4 children=8 reg=171 con=3 ic=50
Configparser.handleElement property make=39 fill=6 children=9 reg=307 con=3 ic=51
Configparser.handleElement property make=40 fill=6 children=8 reg=269 con=3 ic=50
Configparser.handleElement property make=40 fill=6 children=8 reg=269 con=3 ic=51
Configparser.handleElement provider-config make=33 fill=5 children=2110 reg=260 con=6 ic=50
Configparser.handleElement request-policy make=22 fill=2 children=6 reg=158 con=3 ic=50
Configparser.handleElement response-policy make=36 fill=4 children=9 reg=171 con=3 ic=50
Configparser.handleElement property make=42 fill=6 children=9 reg=285 con=4 ic=51
Configparser.handleElement property make=40 fill=6 children=8 reg=272 con=3 ic=51
Configparser.handleElement property make=40 fill=7 children=8 reg=287 con=4 ic=79
Configparser.handleElement property make=39 fill=6 children=9 reg=272 con=3 ic=50
Configparser.handleElement provider-config make=48 fill=7 children=2631 reg=262 con=6 ic=50
Configparser.handleElement message-security-config make=47 fill=6 children=14822 reg=505 con=5 ic=50
Configparser.handleElement request-policy make=20 fill=3 children=7 reg=171 con=3 ic=50
Configparser.handleElement response-policy make=28 fill=1 children=6 reg=198 con=3 ic=51
Configparser.handleElement property make=40 fill=6 children=8 reg=287 con=3 ic=50
Configparser.handleElement property make=40 fill=7 children=8 reg=282 con=3 ic=51
Configparser.handleElement provider-config make=34 fill=6 children=1664 reg=239 con=5 ic=53
Configparser.handleElement message-security-config make=41 fill=3 children=2116 reg=216 con=4 ic=50
Configparser.handleElement property make=28 fill=4 children=6 reg=271 con=3 ic=49
Configparser.handleElement security-service make=68 fill=1 children=25506 reg=407 con=7 ic=50
Configparser.handleElement java-config make=48 fill=9 children=1085 reg=637 con=12 ic=57
Configparser.handleElement file-cache make=27 fill=1 children=6 reg=360 con=5 ic=56
Configparser.handleElement http make=80 fill=5 children=534 reg=518 con=5 ic=53
Configparser.handleElement protocol make=35 fill=4 children=1285 reg=405 con=7 ic=51
Configparser.handleElement file-cache make=25 fill=1 children=5 reg=151 con=4 ic=51
Configparser.handleElement http make=79 fill=4 children=295 reg=149 con=5 ic=50
Configparser.handleElement ssl make=66 fill=5 children=6 reg=151 con=4 ic=50
Configparser.handleElement protocol make=42 fill=6 children=1026 reg=211 con=6 ic=49
Configparser.handleElement file-cache make=24 fill=1 children=6 reg=155 con=3 ic=51
Configparser.handleElement http make=77 fill=5 children=301 reg=170 con=5 ic=51
Configparser.handleElement protocol make=45 fill=3 children=702 reg=213 con=7 ic=48
Configparser.handleElement protocols make=22 fill=1 children=4366 reg=352 con=5 ic=50
Configparser.handleElement network-listener make=38 fill=9 children=5 reg=427 con=4 ic=51
Configparser.handleElement network-listener make=38 fill=8 children=6 reg=209 con=4 ic=49
Configparser.handleElement network-listener make=37 fill=7 children=6 reg=210 con=4 ic=49
Configparser.handleElement network-listeners make=26 fill=1 children=1470 reg=314 con=6 ic=49
Configparser.handleElement transport make=52 fill=3 children=5 reg=474 con=4 ic=51
Configparser.handleElement transports make=25 fill=1 children=659 reg=292 con=6 ic=50
Configparser.handleElement network-config make=45 fill=2 children=7865 reg=327 con=6 ic=49
Configparser.handleElement thread-pool make=35 fill=7 children=5 reg=402 con=4 ic=50
Configparser.handleElement thread-pool make=36 fill=3 children=6 reg=209 con=4 ic=48
Configparser.handleElement thread-pool make=34 fill=4 children=6 reg=210 con=3 ic=49
Configparser.handleElement thread-pools make=23 fill=1 children=1344 reg=288 con=4 ic=49
Configparser.handleElement module-monitoring-levels make=63 fill=1 children=6 reg=375 con=5 ic=49
Configparser.handleElement monitoring-service make=29 fill=1 children=561 reg=350 con=6 ic=49
Configparser.handleElement failure-detection make=24 fill=1 children=6 reg=303 con=3 ic=49
Configparser.handleElement group-management-service make=35 fill=0 children=449 reg=328 con=5 ic=49
Configparser.handleElement availability-service make=39 fill=0 children=6 reg=374 con=5 ic=49
Configparser.handleElement config make=68 fill=4 children=124925 reg=516 con=15 ic=50
Configparser.handleElement access-log make=30 fill=0 children=6 reg=151 con=4 ic=49
Configparser.handleElement property make=25 fill=4 children=6 reg=310 con=3 ic=51
Configparser.handleElement virtual-server make=48 fill=4 children=485 reg=217 con=4 ic=50
Configparser.handleElement virtual-server make=46 fill=4 children=6 reg=213 con=4 ic=48
Configparser.handleElement http-service make=25 fill=1 children=1571 reg=148 con=5 ic=48
Configparser.handleElement orb make=23 fill=3 children=5 reg=149 con=4 ic=48
Configparser.handleElement iiop-listener make=39 fill=6 children=6 reg=222 con=5 ic=50
Configparser.handleElement ssl make=107 fill=7 children=8 reg=233 con=5 ic=56
Configparser.handleElement iiop-listener make=84 fill=11 children=543 reg=285 con=5 ic=52
Configparser.handleElement ssl make=60 fill=5 children=6 reg=162 con=5 ic=51
Configparser.handleElement iiop-listener make=59 fill=7 children=397 reg=283 con=5 ic=50
Configparser.handleElement iiop-service make=25 fill=1 children=2976 reg=198 con=5 ic=51
Configparser.handleElement jmx-connector make=42 fill=8 children=6 reg=217 con=5 ic=49
Configparser.handleElement property make=41 fill=6 children=8 reg=304 con=3 ic=50
Configparser.handleElement das-config make=63 fill=2 children=8 reg=169 con=4 ic=50
Configparser.handleElement admin-service make=44 fill=5 children=1337 reg=193 con=5 ic=49
Configparser.handleElement manager-properties make=24 fill=1 children=6 reg=154 con=4 ic=50
Configparser.handleElement store-properties make=40 fill=1 children=8 reg=175 con=4 ic=50
Configparser.handleElement session-manager make=24 fill=1 children=653 reg=193 con=4 ic=51
Configparser.handleElement session-properties make=36 fill=2 children=8 reg=188 con=6 ic=63
Configparser.handleElement session-config make=28 fill=1 children=1363 reg=195 con=5 ic=50
Configparser.handleElement web-container make=34 fill=2 children=1721 reg=192 con=5 ic=49
DomDocument.buildModel org.glassfish.ejb.config.EjbTimerServiceInjector 54
DomDocument.buildModel org.glassfish.ejb.config.EjbContainerInjector 218
Configparser.handleElement ejb-timer-service make=38 fill=1 children=6 reg=665 con=4 ic=53
Configparser.handleElement ejb-container make=66 fill=2 children=855 reg=468 con=5 ic=50
DomDocument.buildModel org.glassfish.ejb.config.MdbContainerInjector 63
Configparser.handleElement mdb-container make=43 fill=2 children=9 reg=370 con=4 ic=53
Configparser.handleElement jms-host make=31 fill=6 children=6 reg=225 con=4 ic=51
Configparser.handleElement jms-service make=56 fill=7 children=427 reg=198 con=5 ic=50
Configparser.handleElement module-log-levels make=66 fill=1 children=6 reg=487 con=4 ic=51
Configparser.handleElement log-service make=61 fill=5 children=683 reg=390 con=4 ic=50
Configparser.handleElement property make=24 fill=4 children=6 reg=304 con=3 ic=50
Configparser.handleElement property make=40 fill=6 children=8 reg=291 con=3 ic=50
Configparser.handleElement auth-realm make=28 fill=5 children=954 reg=270 con=4 ic=49
Configparser.handleElement property make=27 fill=4 children=6 reg=283 con=3 ic=49
Configparser.handleElement property make=41 fill=6 children=9 reg=289 con=3 ic=50
Configparser.handleElement auth-realm make=41 fill=6 children=940 reg=264 con=5 ic=49
Configparser.handleElement auth-realm make=42 fill=6 children=8 reg=225 con=4 ic=49
Configparser.handleElement property make=24 fill=4 children=5 reg=282 con=3 ic=50
Configparser.handleElement jacc-provider make=44 fill=6 children=452 reg=261 con=4 ic=49
Configparser.handleElement jacc-provider make=42 fill=6 children=6 reg=215 con=4 ic=49
Configparser.handleElement property make=28 fill=5 children=5 reg=322 con=2 ic=51
Configparser.handleElement audit-module make=41 fill=6 children=507 reg=262 con=4 ic=50
Configparser.handleElement request-policy make=21 fill=2 children=6 reg=174 con=3 ic=50
Configparser.handleElement response-policy make=33 fill=5 children=8 reg=178 con=3 ic=72
Configparser.handleElement property make=40 fill=5 children=8 reg=451 con=5 ic=85
Configparser.handleElement property make=44 fill=6 children=7 reg=306 con=4 ic=52
Configparser.handleElement property make=41 fill=6 children=8 reg=305 con=3 ic=50
Configparser.handleElement property make=39 fill=6 children=9 reg=300 con=2 ic=51
Configparser.handleElement provider-config make=32 fill=5 children=2879 reg=273 con=7 ic=50
Configparser.handleElement request-policy make=22 fill=3 children=6 reg=166 con=3 ic=51
Configparser.handleElement response-policy make=35 fill=5 children=8 reg=181 con=3 ic=50
Configparser.handleElement property make=47 fill=6 children=9 reg=313 con=3 ic=51
Configparser.handleElement property make=41 fill=7 children=8 reg=300 con=3 ic=70
Configparser.handleElement property make=42 fill=6 children=8 reg=458 con=4 ic=85
Configparser.handleElement property make=43 fill=6 children=8 reg=447 con=4 ic=80
Configparser.handleElement property make=40 fill=6 children=7 reg=438 con=4 ic=82
Configparser.handleElement provider-config make=54 fill=8 children=3784 reg=347 con=9 ic=82
Configparser.handleElement request-policy make=33 fill=4 children=8 reg=253 con=4 ic=77
Configparser.handleElement response-policy make=34 fill=4 children=8 reg=257 con=4 ic=83
Configparser.handleElement property make=47 fill=6 children=8 reg=474 con=4 ic=79
Configparser.handleElement property make=43 fill=6 children=8 reg=495 con=5 ic=86
Configparser.handleElement property make=45 fill=7 children=9 reg=480 con=5 ic=88
Configparser.handleElement provider-config make=56 fill=8 children=3177 reg=352 con=9 ic=80
Configparser.handleElement request-policy make=33 fill=4 children=9 reg=247 con=5 ic=85
Configparser.handleElement response-policy make=32 fill=4 children=6 reg=179 con=3 ic=52
Configparser.handleElement property make=28 fill=5 children=5 reg=349 con=3 ic=52
Configparser.handleElement property make=27 fill=4 children=5 reg=302 con=3 ic=55
Configparser.handleElement property make=27 fill=3 children=6 reg=304 con=3 ic=51
Configparser.handleElement property make=26 fill=4 children=6 reg=304 con=3 ic=52
Configparser.handleElement provider-config make=54 fill=9 children=2748 reg=295 con=6 ic=51
Configparser.handleElement message-security-config make=42 fill=5 children=14852 reg=271 con=5 ic=51
Configparser.handleElement security-service make=71 fill=2 children=20883 reg=202 con=8 ic=51
Configparser.handleElement transaction-service make=43 fill=8 children=9 reg=162 con=5 ic=49
Configparser.handleElement diagnostic-service make=60 fill=2 children=8 reg=181 con=4 ic=50
Configparser.handleElement java-config make=70 fill=6 children=902 reg=169 con=10 ic=51
DomDocument.buildModel org.glassfish.web.config.serverbeans.WebContainerAvailabilityInjector 90
Configparser.handleElement web-container-availability make=31 fill=1 children=9 reg=743 con=5 ic=62
DomDocument.buildModel org.glassfish.ejb.config.EjbContainerAvailabilityInjector 59
Configparser.handleElement ejb-container-availability make=48 fill=6 children=9 reg=417 con=4 ic=51
DomDocument.buildModel com.sun.enterprise.connectors.jms.config.JmsAvailabilityInjector 90
Configparser.handleElement jms-availability make=45 fill=1 children=14 reg=383 con=4 ic=51
Configparser.handleElement availability-service make=51 fill=2 children=2575 reg=203 con=6 ic=49
Configparser.handleElement file-cache make=27 fill=1 children=5 reg=162 con=4 ic=52
Configparser.handleElement http make=89 fill=3 children=311 reg=155 con=5 ic=50
Configparser.handleElement protocol make=35 fill=3 children=683 reg=221 con=7 ic=49
Configparser.handleElement file-cache make=24 fill=1 children=6 reg=154 con=4 ic=50
Configparser.handleElement http make=76 fill=3 children=298 reg=153 con=5 ic=49
Configparser.handleElement ssl make=64 fill=5 children=6 reg=157 con=4 ic=50
Configparser.handleElement protocol make=35 fill=4 children=1019 reg=216 con=6 ic=49
Configparser.handleElement file-cache make=23 fill=1 children=6 reg=155 con=4 ic=50
Configparser.handleElement http make=76 fill=4 children=298 reg=158 con=5 ic=49
Configparser.handleElement protocol make=35 fill=3 children=668 reg=218 con=6 ic=49
Configparser.handleElement file-cache make=23 fill=1 children=6 reg=159 con=4 ic=50
Configparser.handleElement http make=75 fill=4 children=302 reg=157 con=5 ic=49
Configparser.handleElement ssl make=61 fill=8 children=5 reg=158 con=4 ic=49
Configparser.handleElement protocol make=36 fill=4 children=1065 reg=222 con=6 ic=49
Configparser.handleElement http-redirect make=23 fill=2 children=6 reg=367 con=3 ic=51
Configparser.handleElement protocol make=36 fill=3 children=528 reg=224 con=6 ic=50
Configparser.handleElement protocol-finder make=26 fill=5 children=6 reg=396 con=4 ic=51
Configparser.handleElement protocol-finder make=28 fill=6 children=6 reg=210 con=4 ic=50
Configparser.handleElement port-unification make=24 fill=1 children=979 reg=314 con=5 ic=51
Configparser.handleElement protocol make=36 fill=3 children=1438 reg=226 con=6 ic=50
Configparser.handleElement protocols make=27 fill=1 children=7673 reg=149 con=6 ic=54
Configparser.handleElement network-listener make=39 fill=8 children=6 reg=222 con=4 ic=49
Configparser.handleElement network-listener make=38 fill=7 children=6 reg=215 con=3 ic=49
Configparser.handleElement network-listener make=38 fill=7 children=6 reg=216 con=4 ic=48
Configparser.handleElement network-listeners make=27 fill=1 children=1272 reg=149 con=6 ic=48
Configparser.handleElement transport make=55 fill=3 children=6 reg=211 con=4 ic=48
Configparser.handleElement transports make=25 fill=1 children=394 reg=148 con=5 ic=48
Configparser.handleElement network-config make=40 fill=2 children=10196 reg=148 con=6 ic=47
Configparser.handleElement thread-pool make=34 fill=3 children=5 reg=216 con=4 ic=48
Configparser.handleElement thread-pool make=35 fill=5 children=5 reg=216 con=4 ic=49
Configparser.handleElement thread-pools make=22 fill=1 children=761 reg=149 con=4 ic=47
Configparser.handleElement failure-detection make=24 fill=1 children=5 reg=150 con=3 ic=48
Configparser.handleElement group-management-service make=34 fill=1 children=288 reg=149 con=4 ic=48
Configparser.handleElement system-property make=28 fill=6 children=6 reg=216 con=3 ic=47
Configparser.handleElement system-property make=26 fill=4 children=6 reg=227 con=3 ic=47
Configparser.handleElement system-property make=27 fill=4 children=5 reg=215 con=3 ic=48
Configparser.handleElement system-property make=27 fill=4 children=6 reg=220 con=3 ic=47
Configparser.handleElement system-property make=26 fill=4 children=6 reg=218 con=2 ic=48
Configparser.handleElement system-property make=26 fill=4 children=6 reg=226 con=3 ic=47
Configparser.handleElement system-property make=26 fill=4 children=6 reg=221 con=3 ic=47
Configparser.handleElement system-property make=26 fill=4 children=6 reg=221 con=2 ic=48
Configparser.handleElement system-property make=26 fill=3 children=6 reg=224 con=2 ic=48
Configparser.handleElement system-property make=26 fill=4 children=6 reg=225 con=3 ic=47
Configparser.handleElement module-monitoring-levels make=53 fill=1 children=6 reg=149 con=4 ic=48
Configparser.handleElement monitoring-service make=29 fill=1 children=319 reg=149 con=5 ic=48
Configparser.handleElement config make=54 fill=4 children=56491 reg=213 con=17 ic=47
Configparser.handleElement configs make=29 fill=1 children=182537 reg=372 con=4 ic=48
Configparser.handleElement property make=29 fill=5 children=6 reg=344 con=3 ic=47
Configparser.handleElement secure-admin-principal make=23 fill=2 children=6 reg=386 con=3 ic=49
Configparser.handleElement secure-admin-principal make=24 fill=3 children=7 reg=212 con=2 ic=47
Configparser.handleElement secure-admin make=29 fill=3 children=917 reg=368 con=5 ic=49
Configparser.handleElement clusters make=24 fill=0 children=6 reg=311 con=4 ic=49
Configparser.handleElement applications make=23 fill=0 children=6 reg=156 con=4 ic=47
Configparser.handleElement domain make=3450 fill=44 children=244486 reg=189 con=10 ic=50
DomainXml.run 440432

Comment by Tom Mueller [ 24/Apr/13 ]

The Dom.register time is unusually long for three config beans:

Configparser.handleElement jdbc-resource make=38 fill=6 children=7 reg=28745 con=6 ic=72
Configparser.handleElement batch-runtime-configuration make=23 fill=1 children=7 reg=11790 con=6 ic=95
Configparser.handleElement jms-host make=37 fill=6 children=7 reg=11095 con=6 ic=72

Most of the registration time (> 95%) is spent in the following line:

ctrs.add(myselfReified.getImplementationClass());

If we can eliminate, delay, or rewrite this call, we could cut 30-40ms off of the domain.xml parse time.

Comment by Tom Mueller [ 01/May/13 ]

Still working on this for 4.0.

Comment by Tom Mueller [ 01/May/13 ]

A possible improvement:

The TranslatedConfigView.getProxy method (in the nucleus/admin/config-api module) creates a new proxy every time it is called even though proxies are immutable objects. If it caches proxy objects, the hit rate is fairly high. However, most of the time is spent creating a proxy the first time. Creating a proxy the second time is about 10-40 microseconds whereas creating a proxy the first time can take milliseconds. So the savings from caching proxies is only a few milliseconds for the entire startup process.

Here's a diff for adding a proxy cache:

--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -57,6 +57,9 @@
 import java.security.UnrecoverableKeyException;
 import java.security.cert.CertificateException;
 import java.io.IOException;
+import java.lang.reflect.InvocationHandler;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * View that translate configured attributes containing properties like ${foo.bar}
@@ -67,6 +70,7 @@
 public class TranslatedConfigView implements ConfigView {
 
     final static Pattern p = Pattern.compile("([^\\$]*)\\$\\{([^\\}]*)\\}([^\\$]*)");
+    final static Map<ProxyKey,Object> proxyCache = new HashMap<ProxyKey,Object>();
 
     private static final String ALIAS_TOKEN = "ALIAS";
     private static int MAX_SUBSTITUTION_DEPTH = 100;
@@ -147,9 +151,23 @@
 
     @Override
     public <T extends ConfigBeanProxy> T getProxy(Class<T> proxyType) {
-        return proxyType.cast(Proxy.newProxyInstance(proxyType.getClassLoader(), new Class[]{proxyType},
-                 this));
+        ProxyKey pk = new ProxyKey(proxyType, this);
+        synchronized (proxyCache) {
+            Object proxy = proxyCache.get(pk);
+            if (proxy == null) {
+                //long s = System.nanoTime();
+                proxy = Proxy.newProxyInstance(proxyType.getClassLoader(), new Class[]{proxyType},
+                     this);
+                proxyCache.put(pk, proxy);
+                //long e = System.nanoTime(); 
+                //System.out.println("TranslatedConfigView.getProxy miss " + proxyType.getName() + " " + this + " " + (e-s)/1000);
+            } else {
+                //System.out.println("TranslatedConfigView.getProxy hit " + proxyType.getName() + " " + this);
     }
+            return proxyType.cast(proxy);
+        }
+    }
+    
     static ServiceLocator habitat;
     public static void setHabitat(ServiceLocator h) {
          habitat = h;
@@ -204,4 +222,39 @@
        }
 
     
+    static class ProxyKey { 
+        private Class aClass;
+        private InvocationHandler handler;
+        
+        public ProxyKey(Class c, InvocationHandler h) {
+            aClass = c;
+            handler = h;
 }
+
+        @Override
+        public boolean equals(Object obj) {
+            if (obj == null) {
+                return false;
+            }
+            if (getClass() != obj.getClass()) {
+                return false;
+            }
+            final ProxyKey other = (ProxyKey) obj;
+            if (this.aClass != other.aClass && (this.aClass == null || !this.aClass.equals(other.aClass))) {
+                return false;
+            }
+            if (this.handler != other.handler && (this.handler == null || !this.handler.equals(other.handler))) {
+                return false;
+            }
+            return true;
+        }
+        
+        @Override
+        public int hashCode() {
+            int hash = 3;
+            hash = 29 * hash + (this.aClass != null ? this.aClass.hashCode() : 0);
+            hash = 29 * hash + (this.handler != null ? this.handler.hashCode() : 0);
+            return hash;
+        }
+    }
+}

Comment by Tom Mueller [ 02/May/13 ]

Here is a summary of what we have found out so far concerning domain.xml parsing.

Of the 420 ms spent in 4.0 (254 ms more than 3.1.2):

  • 6 ms is spent calling getAllServices(ConfigBeanListener.class) rather than getComponent(CageBuilder.class, "PendingConfigBeans");
  • 58 ms is spent processing config beans that were not there in 3.1.2
  • 51 ms is spent getting the implementation class for 3 config beans (I have not confirmed this, but I expect this is not done as part of domain.xml parsing in 3.1.2)
  • 50 ms is spent calling Config.addIndex (time is spent creating proxies that were not created as part of domain.xml parsing before)

This accounts for 175 ms of the 254 ms.

Comment by Mahesh Kannan [ 06/May/13 ]

Part of the problem is that Dom.register calls:
ctrs.add(myselfReified.getImplementationClass());

Which basically loads the class and hence activates the bundle. Maybe,
we should explore if the above can be avoided. Probably we should just
store the implementation class name (as opposed to storing implementation
class itself).

Having said that, this is too risky to make any changes to the config system so
late in the release cycle.

Comment by Mahesh Kannan [ 06/May/13 ]

Since this is a risky fix, marking this for 4.0.1





[GLASSFISH-20507] NullPointerException in RuntimeModelBuilder.java line 195 Created: 10/May/13  Updated: 28/Oct/14

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

Type: Bug Priority: Critical
Reporter: mkarg Assignee: Iaroslav Savytskyi
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

GlassFish 3.1.2.2, Win 7 Pro SP 1 (32 Bit), JDK 1.7.0_21


Attachments: GZip Archive GF_20507.tar.gz    
Tags: 4_0_1-approved, incomplete

 Description   

Application is working well on GlassFish 3.1.1, but not on 3.1.2.2!

When deploying on GlassFish 3.1.2.2 instead (with same environmental conditions), it crashes when JAXB-unmarshalling the exact same data! Since it works in GF 3.1.1, it seems GF 3.1.2.2 replaces working parts of JAXB by failing replacements!

Simplified stack trace:

com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder$IDTransducerImpl.parse() (line 195) <--- throws NPE here
com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse() (line 247)
...
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal() (line 219)
de.quipsy.util.http.HttpClient (line ...) <--- catched in my code when doing marshaller.unmarshal(InputStream).

Strange but true, this happens only with some XML content, but not with any other. And no, the InputStream is not null.

We cannot migrate from 3.1.1 to 3.1.2.2 because of this issue!



 Comments   
Comment by Martin Grebac [ 13/May/13 ]

Hi, thanks for submission. We can't do anything about it without the (as minimal as possible) reproducible testcase. Have you tried running your application against latest JAXB to verify if the issue is already fixed?

Comment by mkarg [ 13/May/13 ]

The problem is that the fault only happens in the middle of our full-size Enterprise application, which is a rather heavy sized EAR that Needs lots of resources and database tables to get to that Point that is crashing, unfortunately. I do not see any chance to provide a test case. So you need to tell me things I can trace to help you (like enabling Special logging levels). JAXB is the one contained in JRE 7u21. Is that what you mean with "latest" or how to make GlassFish use "latest"?

Comment by mkarg [ 02/Apr/14 ]

Bug still exists in GF 4.0 running on JDK 1.8.0!

This is a showstopper for us to migrate from 3.1.1 to 4.0 or at least 3.1.2.2.

Comment by mkarg [ 02/Apr/14 ]

Unfortunately I cannot test against 4.0.1-nightly-latest due to https://java.net/jira/browse/GLASSFISH-21027. As soon as GLASSFISH-21027 is fixed I will try whether the bug is possibly gone in 4.0.1 (in 4.0.0 it is still existing).

Comment by mkarg [ 03/Apr/14 ]

I found out that the problem can be reproduced in my EAR by the following:

  • Use @XmlID on a public String member of @XmlRootElement class Parent.
  • Use @XmlRefID on @XmlAttribute private Parent myParent within class Child.
  • Child itself is parent to another child, having @XmlID on its own so the Grand Child uses @XmlRefID again, etc.
    -> You get a chain of @XmlID parent – @XmlIDRef child – @XmlIDRef grandchild.

When unmarshalling such a JAXB tree in some cases (more often than not in my application) the failure occurs.

I can proof this by simple removing the @XmlID / @XmlIDRef annoations, which makes the unmarshalling work correctly, but certainly leading to wrong results (included copies of the parents instead of referenced singletons).

We really are stuck with this! It is a total showstopper! Please help us with a fix! If there is anything we can do to speed this up, please tell us right now!

Comment by mkarg [ 03/Apr/14 ]

Test project (WAR file incl. source code and Maven build script demonstrating the bug) sent directory to Iaroslav Savytskyi. The bug only happens with a class uses both, @XmlID and @XmlJavaTypeAdapter.

Comment by mkarg [ 10/Apr/14 ]

Provided WAR file with test code a week ago but did not even get any ack of receipt so far. Possibly you didn't get my emails or your answers are getting lost. Can you please ack here so I know that you received the test code?

Comment by Iaroslav Savytskyi [ 10/Apr/14 ]

User's test case.

Comment by Iaroslav Savytskyi [ 10/Apr/14 ]

Hi,

To be honest I can't promise any terms when we'll be able to start working on this.

Comment by mkarg [ 12/Apr/14 ]

Can you please provide us with a time frame when Oracle might be able to fix this critical bug? I mean, it is OK if this is not solved in the next weeks certainly, but we should have a GlassFish including a fixed JAXB within the next six months if any possible. In the end we talk about a showstopper without any existing workaround.

Comment by mkarg [ 19/May/14 ]

It's been six weeks since last contact so I'd like to kindly ask if meanwhile the planning is done, hence, whether at least Oracle could commit to fix this before GF 4.0.2 GA?

Comment by mkarg [ 20/Jun/14 ]

Another eight weeks later and not even a "ping" echo from Oracle on this crash issue. I wonder what's going on? Given up bug fixing on JAXB or possible the JAXB team sent to holidays in the caribbean sea? :-D

Comment by kdevaras [ 22/Jun/14 ]

The bug has been assigned to me(internally) and I'll be picking up this issue from this week.

Thanks.

Comment by mkarg [ 22/Jun/14 ]

That sounds very promising. I am looking forward to the final solution!

Comment by mkarg [ 05/Aug/14 ]

kdevaras, I really don't want to bother, but I would be totally happy if you could post a status update; thanks!

Comment by kdevaras [ 06/Aug/14 ]

I forgot to update it here.

There are actually a couple of updates.

The NPE is here:
UnmarshallingContext.getInstance().addToIdTable(value);

UnmarshallingContext.getInstance() is null.

An UnmarshallingContext instance is pushed to and popped from a ThreadLocal when entering a method and exiting a method respectively.

While debugging, it appeared that a pop was called out of turn. Hence the getInstance() call returned null.

This issue may be fixed in jaxb 2.2.8/2.2.9 as the Threadlocal strategy was reworked for an NPE. I'm trying to verify with that version.

Thanks.

Comment by kdevaras [ 06/Aug/14 ]

Btw, Glassfish seems to be using 2.2.5-5.

Comment by mkarg [ 06/Aug/14 ]

Thanks for the status update.

As GF-4.0.1 is soon to come, can you please inform GF team that 4.0.1 must not be published before your fix is merged into GF? I think it is really essential for GF as JAXB is a core technology. Without a recent status update they may think there will be no fix in time and publish without pulling latest JAXB. Thanks.

Comment by kdevaras [ 06/Aug/14 ]

Not sure if I can ask that.

Even if the fix is merged after the release, I'll try to provide a patch that can applied.

Thanks.

Comment by mkarg [ 09/Sep/14 ]

kdevaras, I'm currently reviewing the list of issues I reported against GF4 and kindly like to ask for a status update on the following of your above comments: "This issue may be fixed in jaxb 2.2.8/2.2.9 as the Threadlocal strategy was reworked for an NPE. I'm trying to verify with that version.". Did you find the time for this test and hence can you confirm that the problem is gone in JAXB 2.2.9? Also I wonder what the correct way is to ask the GlassFish team to incorporate at least 2.2.9 in GF 4.0.1 / 4.1 (whom to ask for that)?

Comment by kdevaras [ 28/Oct/14 ]

I got caught up with urgent issues. I'm now back to this one.

Strangely, I don't seem to be able to reproduce this issue anymore.
I'm using the same steps you described in go.cmd. I've checked on both 3.1.2.7 and 3.1.2.8.





[GLASSFISH-20611] JAX-RS Resources Are Not Monitored Created: 06/Jun/13  Updated: 06/Jun/13

Status: Open
Project: glassfish
Component/s: jax-rs, monitoring
Affects Version/s: None
Fix Version/s: None

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

Tags: fishcat

 Description   

Monitoring of plain JAX-RS resources does not work. JAX-RS resources do not even appear with "HIGH" monitoring level.






[GLASSFISH-20627] Downloading of larger files stalls when using AJP Created: 12/Jun/13  Updated: 24/Jul/13

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

Type: Bug Priority: Critical
Reporter: Peter Salomonsen Assignee: michael.y.chen
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu server 13.04, OpenJDK 1.7.0_21, Glassfish 4.0 b89 (official version), Apache 2


Tags: AJP, Glassfish

 Description   

I have a 6 MB file served from Glassfish through AJP/mod_jk and Apache 2. Downloading this using wget stops after approx 735 KB. If I truncate the file to e.g. 512KB downloading works fine.

Download works fine when accessing port 8080 directly, the problem is only through AJP. I've put the files in a directory under the docroot folder of domain 1.

I've set up a test case server and can also provide Amazon AMI image of this if you need this. The problem can be seen by trying downloading the following files:

original file (stalls):
http://ec2-54-228-91-14.eu-west-1.compute.amazonaws.com/gf4ajptest/motions.mp3

truncated file (works fine):
http://ec2-54-228-91-14.eu-west-1.compute.amazonaws.com/gf4ajptest/motions_truncated.mp3



 Comments   
Comment by Peter Salomonsen [ 20/Jun/13 ]

Since no response on this I've stopped the server, but as said I can provide the AMI image so that you can see the bug in action if you need it.

Comment by Simon Martinelli [ 19/Jul/13 ]

Same issue here:
Works: https://jtaf.ch:8181/jtaf/images/background.jpg
Don't: https://jtaf.ch/jtaf/images/background.jpg

Comment by traxus [ 24/Jul/13 ]

I have the same problem, downloads stall and ultimately time out. Had to rollback to GF 3.1.1, when it last time worked.





[GLASSFISH-20732] java.lang.OutOfMemoryError: PermGen space error during re-deployment of EARs from IDE (Netbeans/Eclipse) Created: 30/Jul/13  Updated: 05/Dec/13

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

Type: Bug Priority: Critical
Reporter: nabizamani Assignee: michael.y.chen
Resolution: Unresolved Votes: 9
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OS X, Glassfish 4 Build 89, Netbeans 7.3.1, Eclipse 4.3 (Kepler)


Tags: deployment, ear, glassfish4, outofmemory, permgen

 Description   

There seems to be a Memory Leak available in Glassfish 4 which becomes visible when you deploy ear files again and again. This error is also available in Glassfish 3. Working with ear projects does not make fun at all as long as the issue is not fixed. My productivity is during development is also decreased a lot!!!! Therefore I believe this issue is at least critical.

Please download the ear file from http://localhost:8080/download/tutorials/struts2/struts2-multi-module-demo.zip. It comes from my tutorial at http://www.nabisoft.com/tutorials/struts2/maven-struts-2-enterprise-application-based-on-java-ee-7-and-glassfish-4, so please check there for details about what you can find in the ear archive. Basically it is a Struts 2 project based on Java EE 7, Tiles, maven...

The bug can be reproduced in Eclipse and Netbeans, so I guess this is not an Eclipse nor a Netbeans issue. To reproduce the bug do the following in your Netbeans IDE (or Eclipse):

  1. Make sure to adapt the persistence.xml in the struts2-module-ejb module and make sure the corresponding JDBC resource is available on your Glassfish 4 (for details see the tutorial, which uses a PostgreSQL database).
  2. import the project into Netbeans
  3. deploy to your local Glassfish 4 server from within Netbeans and wait until deployment has finished
  4. go to MessageServiceBean.java (struts2-module-ejb module), change something (i.e. add an empty line somewhere)
  5. save the change to trigger a re-deployment
  6. wait until re-deployment has finished
  7. in your browser hit http://localhost:8080/service/message/ (I think this step helps to make the bug occur earlier than without this step)
  8. check the glassfish output in netbeans
  9. repeat steps 4-7 about 20-35 times (check glassfish output after each re-deployment).

I typically get this error after around 10-25 re-deployments. Please let me know if you can reproduce the issue, I am willing to help as much as I can!

Below you can see how the error looks like (by the way: after restarting Glassfish after the error the deployed application is not deployed anymore). Depending on when exactly theOutOfMemory error happens you will get a slightly different log or stack trace. In the past I have this error much faster with large ear projects, but my clients do not allow me to publish details...

EXAMPLE 1:

 
INFO: Loading application struts2-module-ear#struts2-module-service-1.0-SNAPSHOT.war at [/service]
WARNING: Unable to load class com.nabisoft.jaxrs.application.ApplicationConfig, reason: java.lang.ClassNotFoundException: com.nabisoft.jaxrs.application.ApplicationConfig
WARNING: Unable to load class com.nabisoft.jaxrs.application.ApplicationConfig, reason: java.lang.ClassNotFoundException: com.nabisoft.jaxrs.application.ApplicationConfig
WARNING: Unable to load class com.nabisoft.jaxrs.provider.MyJacksonJsonProvider, reason: java.lang.ClassNotFoundException: com.nabisoft.jaxrs.provider.MyJacksonJsonProvider
WARNING: Unable to load class com.nabisoft.tutorials.mavenstruts.service.MessageService, reason: java.lang.ClassNotFoundException: com.nabisoft.tutorials.mavenstruts.service.MessageService
WARNING: Unable to load class com.nabisoft.tutorials.mavenstruts.service.MessageService, reason: java.lang.ClassNotFoundException: com.nabisoft.tutorials.mavenstruts.service.MessageService
SEVERE: WebModule[/struts2-module-war]Exception starting filter struts2
java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:792)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:1183)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1728)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1611)
at org.apache.struts2.dispatcher.ng.InitOperations.cleanup(InitOperations.java:114)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:69)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:131)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:5297)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5909)
at com.sun.enterprise.web.WebModule.start(WebModule.java:691)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1041)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:1024)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2278)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1924)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:139)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:537)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at org.glassfish.deployment.admin.ReDeployCommand.execute(ReDeployCommand.java:131)

WARNING: java.lang.OutOfMemoryError: PermGen space
java.lang.OutOfMemoryError: PermGen space
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2483)
at java.lang.Class.getConstructor0(Class.java:2793)
at java.lang.Class.newInstance(Class.java:345)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:399)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:396)
at java.security.AccessController.doPrivileged(Native Method)
at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:395)
at sun.reflect.MethodAccessorGenerator.generateSerializationConstructor(MethodAccessorGenerator.java:113)
at sun.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:331)
at java.io.ObjectStreamClass.getSerializableConstructor(ObjectStreamClass.java:1376)
at java.io.ObjectStreamClass.access$1500(ObjectStreamClass.java:72)
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:493)
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:468)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:468)
at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:365)
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:602)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at org.apache.catalina.session.StandardManager.readSessions(StandardManager.java:550)
at com.sun.enterprise.web.WebModule.loadSessions(WebModule.java:1762)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2280)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1924)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:139)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)

SEVERE: Exception while invoking class com.sun.enterprise.web.WebApplication start method
java.lang.Exception: java.lang.OutOfMemoryError: PermGen space
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:168)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:537)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at org.glassfish.deployment.admin.ReDeployCommand.execute(ReDeployCommand.java:131)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
at org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
at java.lang.Thread.run(Thread.java:724)

SEVERE: Exception during lifecycle processing
java.lang.Exception: java.lang.OutOfMemoryError: PermGen space
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:168)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:537)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at org.glassfish.deployment.admin.ReDeployCommand.execute(ReDeployCommand.java:131)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
at org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
at java.lang.Thread.run(Thread.java:724)

SEVERE: Exception while loading the app
SEVERE: Ausnahme beim Deployment der Anwendung [struts2-module-ear]
SEVERE: Exception during lifecycle processing
java.lang.OutOfMemoryError: PermGen space
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2483)
at java.lang.Class.getConstructor0(Class.java:2793)
at java.lang.Class.newInstance(Class.java:345)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:399)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:396)
at java.security.AccessController.doPrivileged(Native Method)
at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:395)
at sun.reflect.MethodAccessorGenerator.generateSerializationConstructor(MethodAccessorGenerator.java:113)
at sun.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:331)
at java.io.ObjectStreamClass.getSerializableConstructor(ObjectStreamClass.java:1376)
at java.io.ObjectStreamClass.access$1500(ObjectStreamClass.java:72)
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:493)
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:468)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:468)
at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:365)
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:602)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at org.apache.catalina.session.StandardManager.readSessions(StandardManager.java:550)
at com.sun.enterprise.web.WebModule.loadSessions(WebModule.java:1762)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2280)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1924)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:139)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)

SEVERE: PermGen space
 

EXAMPLE 2:

 
WARNING: PER01000: Got SQLException executing statement "CREATE TABLE MESSAGES (ID SERIAL NOT NULL, CREATEDON TIMESTAMP NOT NULL, MESSAGE VARCHAR(64) NOT NULL, PRIMARY KEY (ID))": org.postgresql.util.PSQLException: ERROR: relation "messages" already exists
INFO: EJB5181:Portable JNDI names for EJB MessageServiceBean: [java:global/struts2-module-ear/struts2-module-ejb/MessageServiceBean, java:global/struts2-module-ear/struts2-module-ejb/MessageServiceBean!com.nabisoft.tutorials.mavenstruts.ejb.MessageServiceBean]
INFO: EJB5181:Portable JNDI names for EJB MessageService: [java:global/struts2-module-ear/struts2-module-service-1.0-SNAPSHOT/MessageService, java:global/struts2-module-ear/struts2-module-service-1.0-SNAPSHOT/MessageService!com.nabisoft.tutorials.mavenstruts.service.MessageService]
WARNING: java.lang.OutOfMemoryError: PermGen space
java.lang.OutOfMemoryError: PermGen space
at sun.misc.Unsafe.defineClass(Native Method)
at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:63)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:399)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:396)
at java.security.AccessController.doPrivileged(Native Method)
at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:395)
at sun.reflect.MethodAccessorGenerator.generateConstructor(MethodAccessorGenerator.java:94)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:48)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.reflect.Proxy.newInstance(Proxy.java:748)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:739)
at org.glassfish.external.statistics.impl.CountStatisticImpl.<init>(CountStatisticImpl.java:55)
at org.glassfish.external.statistics.impl.CountStatisticImpl.<init>(CountStatisticImpl.java:69)
at org.glassfish.web.admin.monitor.ServletInstanceStatsProvider.<init>(ServletInstanceStatsProvider.java:78)
at org.glassfish.web.admin.monitor.WebStatsProviderBootstrap.registerApplicationStatsProviders(WebStatsProviderBootstrap.java:167)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2275)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1924)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:139)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:537)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at org.glassfish.deployment.admin.ReDeployCommand.execute(ReDeployCommand.java:131)

SEVERE: Exception while invoking class com.sun.enterprise.web.WebApplication start method
java.lang.Exception: java.lang.OutOfMemoryError: PermGen space
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:168)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:537)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at org.glassfish.deployment.admin.ReDeployCommand.execute(ReDeployCommand.java:131)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
at org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
at java.lang.Thread.run(Thread.java:724)

SEVERE: Exception during lifecycle processing
java.lang.Exception: java.lang.OutOfMemoryError: PermGen space
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:168)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:537)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at org.glassfish.deployment.admin.ReDeployCommand.execute(ReDeployCommand.java:131)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
at org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
at java.lang.Thread.run(Thread.java:724)

SEVERE: Exception while loading the app
SEVERE: Undeployment failed for context /service
SEVERE: Undeployment failed for context /struts2-module-war
SEVERE: Exception while loading the app : java.lang.OutOfMemoryError: PermGen space
 



 Comments   
Comment by nabizamani [ 30/Jul/13 ]

My fault, the correct url for downloading the ear file is http://www.nabisoft.com/download/tutorials/struts2/struts2-multi-module-demo.zip

Unfortunately, I have no permission to attach the ear file to this ticket and I have no permission to edit my previous post (for correcting the url...)

Comment by nabizamani [ 25/Nov/13 ]

Can anyone reproduce this issue? I would be happy to help you reproducing the issue.

ps
I did not add all the external references above which seem to be spam! Can someone please remove them??

Comment by mauritzlovgren [ 05/Dec/13 ]

Also seeing this issue when redeploying artifacts to Glassfish a few times.

Getting this during undeploy:

[2013-12-05T18:24:38.309+0100] [glassfish 4.0] [SEVERE] [] [javax.enterprise.web.util] The web application [/crm] created a ThreadLocal with key of type [org.glassfish.pfl.dynamic.codegen.impl.CurrentClassLoader$1] (value [org.glassfish.pfl.dynamic.codegen.impl.CurrentClassLoader$1@742a8d28]) and a value of type [org.glassfish.web.loader.WebappClassLoader] (value [WebappClassLoader (delegate=true; repositories=WEB-INF/classes/)]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

The amount of classes loaded in PermGen increases after each redeploy and never gets collected (even during Full GC), so seems there is a leak somewhere here.

We use PrimeFaces 4.0.4 on GlassFish 4.0 b89. The issue is present whether deployment is performed through IDE (Eclipse / IntelliJ / NetBeans) or through asadmin / admin GUI.





[GLASSFISH-20746] support building GlassFish with maven 3.1.x Created: 07/Aug/13  Updated: 07/Aug/13

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

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

Tags: build, maven, maven-plugin

 Description   

Maven 3.1.0 breaks plugin compatibility.

It introduces usage of @Inject annotation and enforces aether (official lib for resolving dependency / artifacts).

All official plugins and most of the codehaus plugins have been updated.
We will have to upgrade all of the ones used in our workspace.

Then all in-house plugins (e.g hk2 plugins, glassfishbuild plugin and so on) will have to drop usage of javadoc / plexus specific annotation and move to the new model.






[GLASSFISH-20852] Flood of ehcache threads spawned and in WAITING state Created: 14/Oct/13  Updated: 14/Oct/13

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

Type: Bug Priority: Critical
Reporter: LeoInside Assignee: michael.y.chen
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Solaris x86


Tags: ehcache, thread

 Description   

We found there was a spawning of net.sf.ehcache.CacheManager thread on the server so we restarted glassfish service..

However, it reproduced after restart..

At the moment, we have 3,716 threads running in gfish JVM (3,680 of them are daemon threads)..

3,514 of those threads are spawned by ehcache and they are all in WAITING state, please see a segment of JVM report below:

--------------------------------------------------------------------------------
Thread Execution Information:
-----------------------
Thread "net.sf.ehcache.CacheManager@1a18c55" thread-id: 44,127 thread-state: WAITING Waiting on lock: java.util.TaskQueue@1874082
at: java.lang.Object.wait(Native Method)
at: java.lang.Object.wait(Object.java:485)
at: java.util.TimerThread.mainLoop(Timer.java:483)
at: java.util.TimerThread.run(Timer.java:462)
Thread Synchronization Statistics:
-----------------------
Number of times this thread was blocked (to enter/reenter a Monitor): 0
Number of times this thread waited for a notification (i.e. it was in WAITING or TIMED_WAITING state): 1
Total CPU time for this thread: 0 seconds 270,640 nanoseconds.
User-level CPU time for this thread: 0 seconds 270,640 nanoseconds.
Object Monitors currently held or requested by this thread: []
Ownable Synchronizers (e.g. ReentrantLock and ReentrantReadWriteLock) held by this thread: []
--------------------------------------------------------------------------------
Thread Execution Information:
-----------------------
Thread "net.sf.ehcache.CacheManager@19c8377" thread-id: 44,126 thread-state: WAITING Waiting on lock: java.util.TaskQueue@9c541c
at: java.lang.Object.wait(Native Method)
at: java.lang.Object.wait(Object.java:485)
at: java.util.TimerThread.mainLoop(Timer.java:483)
at: java.util.TimerThread.run(Timer.java:462)
Thread Synchronization Statistics:
-----------------------
Number of times this thread was blocked (to enter/reenter a Monitor): 0
Number of times this thread waited for a notification (i.e. it was in WAITING or TIMED_WAITING state): 1
Total CPU time for this thread: 0 seconds 248,052 nanoseconds.
User-level CPU time for this thread: 0 seconds 248,052 nanoseconds.
Object Monitors currently held or requested by this thread: []
Ownable Synchronizers (e.g. ReentrantLock and ReentrantReadWriteLock) held by this thread: []






[GLASSFISH-20892] Replicated SFSBs do not work at all with Availability enabled Created: 11/Nov/13  Updated: 24/Aug/14

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

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

ALL


Tags: availability, ejb, ejb_3_2, sfsb

 Description   

When Availability is enabled for an application (asadmin deploy --availabilityenabled ...)
HA SFSBs stop working.
This happens whether in a cluster or not, but in my testing, I always had a cluster configured, but not actually used.

When getting a reference to them from JNDI and calling a method
InitialContext ctxt = ...
MySFSBLocal local = ctxt.lookup("...");
local.businessMethod() - Always Fails.

Exception is something like this:
[2013-11-11T00:54:19.267-0500] [glassfish 4.0] [SEVERE] [AS-EJB-00004] [javax.enterprise.ejb.container] [tid: _ThreadID=46 _ThreadName=ajp-listener-1(7)] [timeMillis: 13841
49259267] [levelValue: 1000] [[
[NRU-com.baw.website.beans.sfsb.impl.UserSession]: Cannot load from BACKUPSTORE FOR Key: <[1f00900a45b119c2-ee0001106f31d6b1-6]>]]

relaxVersionSemantics is set to true, and this used to work perfectly in GF3.1.2.2

Related Ticket: https://java.net/jira/browse/GLASSFISH-18551 (Maybe)
Also Related: https://java.net/jira/browse/GLASSFISH-18323

HA SFSBs are configured in glassfish-ejb-jar.xml:
<glassfish-ejb-jar>
<enterprise-beans>
<ejb availability-enabled="true">
<ejb-name>UserSession</ejb-name>
</ejb>
<ejb availability-enabled="true">
<ejb-name>SharedWebstats</ejb-name>
</ejb>
</enterprise-beans>
</glassfish-ejb-jar>



 Comments   
Comment by lprimak [ 13/Nov/13 ]

The bean in question weren't serializable. GF 3.1 used to work with them anyway, but not GF 4.0,
so issue isn't critical now, but the error was very hard to track down

Comment by lprimak [ 19/Nov/13 ]

According to the spec, SFSBs do not need to be serializable, so this breaks the EJB spec as well

Comment by lprimak [ 24/Aug/14 ]

Does this have to do anything with this bug?
https://java.net/jira/browse/GLASSFISH-20318
It says its fixed, but I have my doubts

Comment by lprimak [ 24/Aug/14 ]

Yup, not fixed.

------------------------
[2014-08-24T15:36:28.304-0400] [glassfish 4.1] [WARNING] [] [javax.enterprise.ejb.container] [tid: _ThreadID=99 _ThreadName=ajp-listener-1(5)] [timeMillis: 1408908988304] [levelValue: 900] [[

javax.ejb.EJBException
at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:748)
at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:698)
at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:515)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4566)
at com.sun.ejb.containers.StatefulSessionContainer.postInvokeTx(StatefulSessionContainer.java:1853)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2074)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2044)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy798.isDisableStats(Unknown Source)
at com.baw.website.beans.ui.layout.Layout.isStatsEnabled(Layout.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:363)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at com.sun.el.parser.AstValue.getValue(AstValue.java:140)
at com.sun.el.parser.AstValue.getValue(AstValue.java:204)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226)
at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50)
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:457)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:852)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1854)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:456)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.baw.website.filters.CmsFilter.doFilter(CmsFilter.java:32)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.flowlogix.filters.EjbPingFilter.doFilter(EjbPingFilter.java:44)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.filter.GzipResponseFilter.doFilter(GzipResponseFilter.java:149)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.filter.FacesExceptionFilter.doFilter(FacesExceptionFilter.java:56)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.facesviews.FacesViewsForwardingFilter.doFilter(FacesViewsForwardingFilter.java:130)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.baw.website.filters.CmsFilter.doFilter(CmsFilter.java:32)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.flowlogix.filters.EjbPingFilter.doFilter(EjbPingFilter.java:44)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:115)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.flowlogix.security.WebSecurityFilter$1.call(WebSecurityFilter.java:90)
at com.flowlogix.security.WebSecurityFilter$1.call(WebSecurityFilter.java:84)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at com.flowlogix.security.WebSecurityFilter.doFilter(WebSecurityFilter.java:83)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.baw.website.filters.ShiroInitFilter.doFilter(ShiroInitFilter.java:41)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:175)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at com.flowlogix.security.ShiroSecurityInterceptor.propagateShiroSecurity(ShiroSecurityInterceptor.java:64)
at sun.reflect.GeneratedMethodAccessor376.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
... 107 more
]]

[2014-08-24T15:36:28.307-0400] [glassfish 4.1] [SEVERE] [] [javax.enterprise.resource.webcontainer.jsf.application] [tid: _ThreadID=99 _ThreadName=ajp-listener-1(5)] [timeMillis: 1408908988307] [levelValue: 1000] [[
Error Rendering View[/index.xhtml]
javax.el.ELException: /resources/templates/layout.xhtml @194,60 rendered="#

{layout.statsEnabled}

": javax.ejb.EJBException
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:114)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:457)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:852)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1854)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:456)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.baw.website.filters.CmsFilter.doFilter(CmsFilter.java:32)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.flowlogix.filters.EjbPingFilter.doFilter(EjbPingFilter.java:44)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.filter.GzipResponseFilter.doFilter(GzipResponseFilter.java:149)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.filter.FacesExceptionFilter.doFilter(FacesExceptionFilter.java:56)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.facesviews.FacesViewsForwardingFilter.doFilter(FacesViewsForwardingFilter.java:130)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.baw.website.filters.CmsFilter.doFilter(CmsFilter.java:32)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.flowlogix.filters.EjbPingFilter.doFilter(EjbPingFilter.java:44)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:115)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.flowlogix.security.WebSecurityFilter$1.call(WebSecurityFilter.java:90)
at com.flowlogix.security.WebSecurityFilter$1.call(WebSecurityFilter.java:84)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at com.flowlogix.security.WebSecurityFilter.doFilter(WebSecurityFilter.java:83)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.baw.website.filters.ShiroInitFilter.doFilter(ShiroInitFilter.java:41)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:175)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.el.ELException: javax.ejb.EJBException
at javax.el.BeanELResolver.getValue(BeanELResolver.java:368)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at com.sun.el.parser.AstValue.getValue(AstValue.java:140)
at com.sun.el.parser.AstValue.getValue(AstValue.java:204)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226)
at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50)
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
... 92 more
Caused by: javax.ejb.EJBException
at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:748)
at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:698)
at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:515)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4566)
at com.sun.ejb.containers.StatefulSessionContainer.postInvokeTx(StatefulSessionContainer.java:1853)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2074)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2044)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy798.isDisableStats(Unknown Source)
at com.baw.website.beans.ui.layout.Layout.isStatsEnabled(Layout.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:363)
... 99 more
Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at com.flowlogix.security.ShiroSecurityInterceptor.propagateShiroSecurity(ShiroSecurityInterceptor.java:64)
at sun.reflect.GeneratedMethodAccessor376.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
... 107 more
]]

[2014-08-24T15:36:28.338-0400] [glassfish 4.1] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=99 _ThreadName=ajp-listener-1(5)] [timeMillis: 1408908988338] [levelValue: 900] [[
StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
java.lang.IllegalArgumentException: object is not an instance of declaring class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at com.flowlogix.security.ShiroSecurityInterceptor.propagateShiroSecurity(ShiroSecurityInterceptor.java:64)
at sun.reflect.GeneratedMethodAccessor376.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy798.isDisableStats(Unknown Source)
at com.baw.website.beans.ui.layout.Layout.isStatsEnabled(Layout.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:363)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at com.sun.el.parser.AstValue.getValue(AstValue.java:140)
at com.sun.el.parser.AstValue.getValue(AstValue.java:204)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226)
at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50)
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:457)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:852)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1854)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:456)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.baw.website.filters.CmsFilter.doFilter(CmsFilter.java:32)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.flowlogix.filters.EjbPingFilter.doFilter(EjbPingFilter.java:44)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.filter.GzipResponseFilter.doFilter(GzipResponseFilter.java:149)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.filter.FacesExceptionFilter.doFilter(FacesExceptionFilter.java:56)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.facesviews.FacesViewsForwardingFilter.doFilter(FacesViewsForwardingFilter.java:130)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.baw.website.filters.CmsFilter.doFilter(CmsFilter.java:32)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.flowlogix.filters.EjbPingFilter.doFilter(EjbPingFilter.java:44)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:115)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.flowlogix.security.WebSecurityFilter$1.call(WebSecurityFilter.java:90)
at com.flowlogix.security.WebSecurityFilter$1.call(WebSecurityFilter.java:84)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at com.flowlogix.security.WebSecurityFilter.doFilter(WebSecurityFilter.java:83)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.baw.website.filters.ShiroInitFilter.doFilter(ShiroInitFilter.java:41)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:175)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)
]]

[2014-08-24T15:36:39.431-0400] [glassfish 4.1] [SEVERE] [AS-EJB-00004] [javax.enterprise.ejb.container] [tid: _ThreadID=97 _ThreadName=ajp-listener-1(3)] [timeMillis: 1408908999431] [levelValue: 1000] [[
[NRU-com.baw.website.beans.sfsb.impl.SharedWebstats]: Cannot load from BACKUPSTORE FOR Key: <[1f00900a0983b5c6-ee0001103a22bcb3-1]>]]

[2014-08-24T15:36:39.432-0400] [glassfish 4.1] [WARNING] [AS-EJB-00056] [javax.enterprise.ejb.container] [tid: _ThreadID=97 _ThreadName=ajp-listener-1(3)] [timeMillis: 1408908999432] [levelValue: 900] [[
A system exception occurred during an invocation on EJB SharedWebstats, method: public void com.baw.website.beans.sfsb.impl.SharedWebstats.ping()]]

[2014-08-24T15:36:39.432-0400] [glassfish 4.1] [WARNING] [] [javax.enterprise.ejb.container] [tid: _ThreadID=97 _ThreadName=ajp-listener-1(3)] [timeMillis: 1408908999432] [levelValue: 900] [[

javax.ejb.NoSuchObjectLocalException: The EJB does not exist. session-key: 1f00900a0983b5c6-ee0001103a22bcb3-1
at com.sun.ejb.containers.StatefulSessionContainer._getContext(StatefulSessionContainer.java:1626)
at com.sun.ejb.containers.BaseContainer.getContext(BaseContainer.java:2579)
at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1971)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:210)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy798.ping(Unknown Source)
at com.flowlogix.ejb.StatefulUtil.pingStateful(StatefulUtil.java:68)
at com.flowlogix.web.services.EjbModule$1.service(EjbModule.java:46)
at $HttpServletRequestHandler_584822218a2dad.service(Unknown Source)
at org.got5.tapestry5.jquery.services.AjaxUploadServletRequestFilter.service(AjaxUploadServletRequestFilter.java:27)
at $HttpServletRequestHandler_584822218a2dad.service(Unknown Source)
at org.tynamo.security.services.impl.SecurityConfiguration$1.call(SecurityConfiguration.java:56)
at org.tynamo.security.services.impl.SecurityConfiguration$1.call(SecurityConfiguration.java:54)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at org.tynamo.security.services.impl.SecurityConfiguration.service(SecurityConfiguration.java:54)
at $HttpServletRequestFilter_584822218a2dab.service(Unknown Source)
at $HttpServletRequestHandler_584822218a2dad.service(Unknown Source)
at org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)
at $HttpServletRequestHandler_584822218a2dad.service(Unknown Source)
at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
at $HttpServletRequestHandler_584822218a2dad.service(Unknown Source)
at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
at $HttpServletRequestFilter_584822218a2d9e.service(Unknown Source)
at $HttpServletRequestHandler_584822218a2dad.service(Unknown Source)
at org.apache.tapestry5.services.TapestryModule$1.service(TapestryModule.java:852)
at $HttpServletRequestHandler_584822218a2dad.service(Unknown Source)
at $HttpServletRequestHandler_584822218a2d9d.service(Unknown Source)
at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:171)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)
]]





[GLASSFISH-20899] @PrePassivate / @PostActivate get called on every bean invocation when Availability is enabled Created: 14/Nov/13  Updated: 24/Aug/14

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

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

ALL


Tags: availability, ejb, sfsb

 Description   

When running on GF 3.1, everything works fine,
but when upgraded to GF 4.0, @Stateful bean's @PrePassivate / @PostActivate
calls get invoked for every bean method invocation, which isn't good

This only happens when Availability is enabled for the application.
When it's not, everything works fine as well.



 Comments   
Comment by lprimak [ 19/Nov/13 ]

When using passivationCapable = false, the behavior is correct,
leading me to believe that this is a simple bug vs. ejb spec issue

Comment by lprimak [ 19/Nov/13 ]

Related Issue:
https://java.net/jira/browse/EJB_SPEC-116

Comment by lprimak [ 19/Nov/13 ]

Also, transient fields get lost on failover in GF 4.0:

@Stateful
public class MyBean implements Serializable
{
private String myState;
private final transient Set<String> myTransient = new HashSet<>();
}

When HA-failover happens to a copy of MyBean on another cluster node,
myTransient is null

which is a regression from GF 3.1 and is how I found this error in the first place

Comment by marina vatkina [ 19/Nov/13 ]

When passivationCapable = false the HA is not happening - see EJB 3.2 spec for the warning

Comment by lprimak [ 20/Nov/13 ]

Also, in the code above, the SFSB implements Serializable.
This is related to another issue with Glassfish.
SFSBs should not have to implement Serializable. But, in HA, if they don't another exception is thrown.

Related JIRA:
https://java.net/jira/browse/GLASSFISH-20892

Comment by lprimak [ 24/Aug/14 ]

How does this relate to this bug?
https://java.net/jira/browse/GLASSFISH-20318
According to that bug non-serializable SFSB should work,
Does this deal with transient fields correctly?

Comment by lprimak [ 24/Aug/14 ]

This is not completely fixed. As of GF 4.1 August 21, 2014,
when trying to access not-serializable SFSBs in Availability HA cluster configuration,
I get the exceptions below:
Related issues:
https://java.net/jira/browse/GLASSFISH-20892
https://java.net/jira/browse/GLASSFISH-20899
---------------------------
[2014-08-24T15:36:28.304-0400] [glassfish 4.1] [WARNING] [] [javax.enterprise.ejb.container] [tid: _ThreadID=99 _ThreadName=ajp-listener-1(5)] [timeMillis: 1408908988304] [levelValue: 900] [[
javax.ejb.EJBException
at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:748)
at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:698)
at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:515)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4566)
at com.sun.ejb.containers.StatefulSessionContainer.postInvokeTx(StatefulSessionContainer.java:1853)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2074)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2044)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy798.isDisableStats(Unknown Source)
at com.baw.website.beans.ui.layout.Layout.isStatsEnabled(Layout.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:363)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at com.sun.el.parser.AstValue.getValue(AstValue.java:140)
at com.sun.el.parser.AstValue.getValue(AstValue.java:204)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226)
at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50)
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:457)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:852)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1854)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:456)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.baw.website.filters.CmsFilter.doFilter(CmsFilter.java:32)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.flowlogix.filters.EjbPingFilter.doFilter(EjbPingFilter.java:44)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.filter.GzipResponseFilter.doFilter(GzipResponseFilter.java:149)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.filter.FacesExceptionFilter.doFilter(FacesExceptionFilter.java:56)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.facesviews.FacesViewsForwardingFilter.doFilter(FacesViewsForwardingFilter.java:130)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.baw.website.filters.CmsFilter.doFilter(CmsFilter.java:32)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.flowlogix.filters.EjbPingFilter.doFilter(EjbPingFilter.java:44)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:115)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.flowlogix.security.WebSecurityFilter$1.call(WebSecurityFilter.java:90)
at com.flowlogix.security.WebSecurityFilter$1.call(WebSecurityFilter.java:84)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at com.flowlogix.security.WebSecurityFilter.doFilter(WebSecurityFilter.java:83)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.baw.website.filters.ShiroInitFilter.doFilter(ShiroInitFilter.java:41)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:175)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at com.flowlogix.security.ShiroSecurityInterceptor.propagateShiroSecurity(ShiroSecurityInterceptor.java:64)
at sun.reflect.GeneratedMethodAccessor376.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
... 107 more
]]
[2014-08-24T15:36:28.307-0400] [glassfish 4.1] [SEVERE] [] [javax.enterprise.resource.webcontainer.jsf.application] [tid: _ThreadID=99 _ThreadName=ajp-listener-1(5)] [timeMillis: 1408908988307] [levelValue: 1000] [[
Error Rendering View[/index.xhtml]
javax.el.ELException: /resources/templates/layout.xhtml @194,60 rendered="#

{layout.statsEnabled}

": javax.ejb.EJBException
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:114)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:457)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:852)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1854)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:456)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.baw.website.filters.CmsFilter.doFilter(CmsFilter.java:32)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.flowlogix.filters.EjbPingFilter.doFilter(EjbPingFilter.java:44)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.filter.GzipResponseFilter.doFilter(GzipResponseFilter.java:149)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.filter.FacesExceptionFilter.doFilter(FacesExceptionFilter.java:56)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.facesviews.FacesViewsForwardingFilter.doFilter(FacesViewsForwardingFilter.java:130)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.baw.website.filters.CmsFilter.doFilter(CmsFilter.java:32)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.flowlogix.filters.EjbPingFilter.doFilter(EjbPingFilter.java:44)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:115)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.flowlogix.security.WebSecurityFilter$1.call(WebSecurityFilter.java:90)
at com.flowlogix.security.WebSecurityFilter$1.call(WebSecurityFilter.java:84)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at com.flowlogix.security.WebSecurityFilter.doFilter(WebSecurityFilter.java:83)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.baw.website.filters.ShiroInitFilter.doFilter(ShiroInitFilter.java:41)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:175)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.el.ELException: javax.ejb.EJBException
at javax.el.BeanELResolver.getValue(BeanELResolver.java:368)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at com.sun.el.parser.AstValue.getValue(AstValue.java:140)
at com.sun.el.parser.AstValue.getValue(AstValue.java:204)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226)
at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50)
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
... 92 more
Caused by: javax.ejb.EJBException
at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:748)
at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:698)
at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:515)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4566)
at com.sun.ejb.containers.StatefulSessionContainer.postInvokeTx(StatefulSessionContainer.java:1853)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2074)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2044)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy798.isDisableStats(Unknown Source)
at com.baw.website.beans.ui.layout.Layout.isStatsEnabled(Layout.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:363)
... 99 more
Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at com.flowlogix.security.ShiroSecurityInterceptor.propagateShiroSecurity(ShiroSecurityInterceptor.java:64)
at sun.reflect.GeneratedMethodAccessor376.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
... 107 more
]]
[2014-08-24T15:36:28.338-0400] [glassfish 4.1] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=99 _ThreadName=ajp-listener-1(5)] [timeMillis: 1408908988338] [levelValue: 900] [[
StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
java.lang.IllegalArgumentException: object is not an instance of declaring class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at com.flowlogix.security.ShiroSecurityInterceptor.propagateShiroSecurity(ShiroSecurityInterceptor.java:64)
at sun.reflect.GeneratedMethodAccessor376.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy798.isDisableStats(Unknown Source)
at com.baw.website.beans.ui.layout.Layout.isStatsEnabled(Layout.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:363)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at com.sun.el.parser.AstValue.getValue(AstValue.java:140)
at com.sun.el.parser.AstValue.getValue(AstValue.java:204)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226)
at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50)
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:457)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:852)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1854)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:456)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.baw.website.filters.CmsFilter.doFilter(CmsFilter.java:32)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.flowlogix.filters.EjbPingFilter.doFilter(EjbPingFilter.java:44)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.filter.GzipResponseFilter.doFilter(GzipResponseFilter.java:149)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.filter.FacesExceptionFilter.doFilter(FacesExceptionFilter.java:56)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.facesviews.FacesViewsForwardingFilter.doFilter(FacesViewsForwardingFilter.java:130)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.baw.website.filters.CmsFilter.doFilter(CmsFilter.java:32)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.flowlogix.filters.EjbPingFilter.doFilter(EjbPingFilter.java:44)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.omnifaces.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:115)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.flowlogix.security.WebSecurityFilter$1.call(WebSecurityFilter.java:90)
at com.flowlogix.security.WebSecurityFilter$1.call(WebSecurityFilter.java:84)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at com.flowlogix.security.WebSecurityFilter.doFilter(WebSecurityFilter.java:83)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.baw.website.filters.ShiroInitFilter.doFilter(ShiroInitFilter.java:41)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:175)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)
]]
[2014-08-24T15:36:39.431-0400] [glassfish 4.1] [SEVERE] [AS-EJB-00004] [javax.enterprise.ejb.container] [tid: _ThreadID=97 _ThreadName=ajp-listener-1(3)] [timeMillis: 1408908999431] [levelValue: 1000] [[
[NRU-com.baw.website.beans.sfsb.impl.SharedWebstats]: Cannot load from BACKUPSTORE FOR Key: <[1f00900a0983b5c6-ee0001103a22bcb3-1]>]]
[2014-08-24T15:36:39.432-0400] [glassfish 4.1] [WARNING] [AS-EJB-00056] [javax.enterprise.ejb.container] [tid: _ThreadID=97 _ThreadName=ajp-listener-1(3)] [timeMillis: 1408908999432] [levelValue: 900] [[
A system exception occurred during an invocation on EJB SharedWebstats, method: public void com.baw.website.beans.sfsb.impl.SharedWebstats.ping()]]
[2014-08-24T15:36:39.432-0400] [glassfish 4.1] [WARNING] [] [javax.enterprise.ejb.container] [tid: _ThreadID=97 _ThreadName=ajp-listener-1(3)] [timeMillis: 1408908999432] [levelValue: 900] [[
javax.ejb.NoSuchObjectLocalException: The EJB does not exist. session-key: 1f00900a0983b5c6-ee0001103a22bcb3-1
at com.sun.ejb.containers.StatefulSessionContainer._getContext(StatefulSessionContainer.java:1626)
at com.sun.ejb.containers.BaseContainer.getContext(BaseContainer.java:2579)
at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1971)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:210)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy798.ping(Unknown Source)
at com.flowlogix.ejb.StatefulUtil.pingStateful(StatefulUtil.java:68)
at com.flowlogix.web.services.EjbModule$1.service(EjbModule.java:46)
at $HttpServletRequestHandler_584822218a2dad.service(Unknown Source)
at org.got5.tapestry5.jquery.services.AjaxUploadServletRequestFilter.service(AjaxUploadServletRequestFilter.java:27)
at $HttpServletRequestHandler_584822218a2dad.service(Unknown Source)
at org.tynamo.security.services.impl.SecurityConfiguration$1.call(SecurityConfiguration.java:56)
at org.tynamo.security.services.impl.SecurityConfiguration$1.call(SecurityConfiguration.java:54)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at org.tynamo.security.services.impl.SecurityConfiguration.service(SecurityConfiguration.java:54)
at $HttpServletRequestFilter_584822218a2dab.service(Unknown Source)
at $HttpServletRequestHandler_584822218a2dad.service(Unknown Source)
at org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)
at $HttpServletRequestHandler_584822218a2dad.service(Unknown Source)
at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
at $HttpServletRequestHandler_584822218a2dad.service(Unknown Source)
at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
at $HttpServletRequestFilter_584822218a2d9e.service(Unknown Source)
at $HttpServletRequestHandler_584822218a2dad.service(Unknown Source)
at org.apache.tapestry5.services.TapestryModule$1.service(TapestryModule.java:852)
at $HttpServletRequestHandler_584822218a2dad.service(Unknown Source)
at $HttpServletRequestHandler_584822218a2d9d.service(Unknown Source)
at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:171)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)
]]





[GLASSFISH-20970] Classloader leak in PoolResizeTimerTask Created: 04/Feb/14  Updated: 03/Jun/14

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

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

Tags: 4_0_1-evangelists, 4_0_1-reviewed

 Description   

There is a classloader leak in the com.sun.ejb.containers.util.pool.NonBlockingPool and com.sun.ejb.containers.util.pool.NonBlockingPool$PoolResizeTimerTask.

When a application is re-deployed instances of these two classes are created as described in https://java.net/jira/browse/GLASSFISH-16676

This also leads to a classloader leak, which eventually prevents re-deployment of applications.



 Comments   
Comment by electricsam [ 04/Feb/14 ]

Here is the reference tree to the GC root:

this - EarClassLoader

  • parent - WebappClassLoader
    • <classloader> - GenericEJBHome_Generated
      • cls - PresentationManagerImpl$ClassDataImpl
        • value - WeakHashMapSafeReadLock$Entry
          • [] - WeakHashMapSafeReadLock$Entry[]
            • table - WeakHashMapSafeReadLock
              • map - PresentationManagerImpl$1
                • classToClassData - PresentationManagerImpl
                  • presentationMgr - POAProtocolMgr
                    • protocolMgr - StatelessSessionContainer
                      • this$0 - StatelessSessionContainer$SessionContextFactory
                        • factory - NonBlockingPool
                          • this$0 - NonBlockingPool$PoolResizeTimerTask
Comment by electricsam [ 05/Feb/14 ]

I think the actual issue is that there is a hard reference in the dictionary map in PresentationManagerImpl$ClassDataImpl

Here is some cleanup code that I've tried running in the @PreDestroy method of a singleton startup bean to try to clean up classloader leaks. This seems to get rid of many of them. This is just test code.

public abstract class ClassLoaderCleaner {

    private static final Logger logger = Logger.getLogger(ClassLoaderCleaner.class.getName());

    private ClassLoader loader = null;

    protected void destroy() {
        try {
            loader = getClass().getClassLoader();
            cleanUp();
        } catch (Throwable e) {
            logger.log(Level.SEVERE, null, e);
        }
    }

    private Thread[] getThreads() {
        ThreadGroup rootGroup = Thread.currentThread().getThreadGroup();
        ThreadGroup parentGroup;
        while ((parentGroup = rootGroup.getParent()) != null) {
            rootGroup = parentGroup;
        }

        Thread[] threads = new Thread[rootGroup.activeCount()];
        while (rootGroup.enumerate(threads, true) == threads.length) {
            threads = new Thread[threads.length * 2];
        }
        return threads;
    }

    private boolean loaderRemovable(ClassLoader cl) {
        if (cl == null) {
            return false;
        }
        Object isDoneCalled = getObject(cl, "doneCalled");
        if (cl.getClass().getName().equals(loader.getClass().getName())
                && isDoneCalled instanceof Boolean && (Boolean) isDoneCalled) {
            return true;
        }
        return loader == cl;
    }

    private Field getField(Class clazz, String fieldName) {
        Field f = null;
        try {
            f = clazz.getDeclaredField(fieldName);
        } catch (NoSuchFieldException ex) {

        } catch (SecurityException ex) {
            logger.log(Level.WARNING, "Unable to get field " + fieldName + " on " + clazz.getName(), ex);
        }

        if (f == null) {
            Class parent = clazz.getSuperclass();
            if (parent != null) {
                f = getField(parent, fieldName);
            }
        }
        if (f != null) {
            f.setAccessible(true);
        }
        return f;
    }

    private Object getObject(Object instance, String fieldName) {
        Class clazz = instance.getClass();
        Field f = getField(clazz, fieldName);
        if (f != null) {
            try {
                return f.get(instance);
            } catch (IllegalArgumentException | IllegalAccessException ex) {
                logger.log(Level.WARNING, "Unable to get " + fieldName + " on " + clazz.getName(), ex);
            }
        }
        return null;
    }

    private void cleanUp() {
        Thread[] threads = getThreads();
        for (Thread thread : threads) {
            if (thread != null) {
                cleanContextClassLoader(thread);
                cleanOrb(thread);
                cleanThreadLocal(thread);
                cleanTimers(thread);
            }

        }
    }

    private void cleanContextClassLoader(Thread thread) {
        if (loaderRemovable(thread.getContextClassLoader())) {
            thread.setContextClassLoader(null);
            logger.log(Level.INFO, "Cleaned context classloader {0}", thread.getName());
        }
    }

    private void cleanOrb(Thread thread) {
        Object currentWork = getObject(thread, "currentWork");
        if (currentWork != null) {
            Object orb = getObject(currentWork, "orb");
            if (orb != null) {
                Object transportManager = getObject(orb, "transportManager");
                if (transportManager != null) {
                    Thread selector = (Thread) getObject(transportManager, "selector");
                    if (selector != null && loaderRemovable(selector.getContextClassLoader())) {
                        selector.setContextClassLoader(null);
                        logger.log(Level.INFO, "Cleaned orb ref {0}", thread.getName());
                    }
                }
            }
        }
    }

    private void removeThreadLocal(Object entry, Object threadLocals, Thread thread) {
        ThreadLocal threadLocal = (ThreadLocal) getObject(entry, "referent");
        if (threadLocal != null) {
            Class clazz = null;
            try {
                clazz = Class.forName("java.lang.ThreadLocal$ThreadLocalMap");
            } catch (ClassNotFoundException ex) {
                logger.log(Level.WARNING, null, ex);
            }
            if (clazz != null) {
                Method removeMethod = null;
                Method[] methods = clazz.getDeclaredMethods();
                if (methods != null) {
                    for (Method method : methods) {
                        if (method.getName().equals("remove")) {
                            removeMethod = method;
                            removeMethod.setAccessible(true);
                            break;
                        }
                    }
                }
                if (removeMethod != null) {
                    try {
                        removeMethod.invoke(threadLocals, threadLocal);
                        logger.log(Level.INFO, "Cleaned threadlocal {0}", thread.getName());
                    } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
                        logger.log(Level.SEVERE, null, ex);
                    }
                }

            }

        }
    }

    private void cleanThreadLocal(Thread thread) {
        Object threadLocals = getObject(thread, "threadLocals");
        if (threadLocals != null) {
            Object table = getObject(threadLocals, "table");
            if (table != null) {
                int size = Array.getLength(table);
                for (int i = 0; i < size; i++) {
                    Object entry = Array.get(table, i);
                    if (entry != null) {
                        Field valueField = getField(entry.getClass(), "value");
                        if (valueField != null) {
                            try {
                                Object value = valueField.get(entry);
                                if (value != null && value instanceof ClassLoader && loaderRemovable((ClassLoader) value)) {
                                    removeThreadLocal(entry, threadLocals, thread);
                                }
                            } catch (IllegalArgumentException | IllegalAccessException ex) {
                                logger.log(Level.WARNING, "Unable to get threadlocal value", ex);
                            }

                        }
                    }

                }
            }
        }
    }

    private void cleanTimers(Thread thread) {
        Object queue = getObject(thread, "queue");
        if (queue != null) {
            Object queue2 = getObject(queue, "queue");
            if (queue2 != null) {
                Object[] taskArray = (Object[]) queue2;
                for (Object timerTask : taskArray) {
                    if (timerTask != null) {
                        Object timerService = getObject(timerTask, "timerService_");
                        if (timerService != null) {
                            Object ejbContainerUtil = getObject(timerService, "ejbContainerUtil");
                            if (ejbContainerUtil != null) {

                                Object orbHelper = getObject(ejbContainerUtil, "orbHelper");
                                if (orbHelper != null) {
                                    Object protocolManager = getObject(orbHelper, "protocolManager");
                                    if (protocolManager != null) {
                                        Object presentationMgr = getObject(protocolManager, "presentationMgr");
                                        if (presentationMgr != null) {
                                            //PresentationManagerImpl$1
                                            Object classToClassData = getObject(presentationMgr, "classToClassData");
                                            if (classToClassData != null) {
                                                Object lock = getObject(classToClassData, "lock");
                                                //WeakHashMapSafeReadLock
                                                Object map = getObject(classToClassData, "map");
                                                if (lock != null && lock instanceof ReentrantReadWriteLock && map != null && map instanceof Map) {
                                                    ReentrantReadWriteLock theLock = (ReentrantReadWriteLock) lock;
                                                    Set<Object> toBeRemoved = new HashSet<>();
                                                    synchronized (presentationMgr) {
                                                        synchronized (classToClassData) {
                                                            theLock.writeLock().lock();
                                                            try {
                                                                Map theMap = (Map) map;
                                                                for (Object key : theMap.keySet()) {
                                                                    if (key != null) {
                                                                        //PresentationManagerImpl$ClassDataImpl
                                                                        Object value = theMap.get(key);

                                                                        if (value != null) {
                                                                            Object cls = getObject(value, "cls");
                                                                            if (cls != null && cls instanceof Class) {
                                                                                ClassLoader cl = ((Class) cls).getClassLoader();
                                                                                if (cl != null) {
                                                                                    if (loaderRemovable(cl) || loaderRemovable(cl.getParent())) {
                                                                                        toBeRemoved.add(key);
                                                                                    }
                                                                                }
                                                                            }

                                                                            Object dictionary = getObject(value, "dictionary");
                                                                            if (dictionary != null && dictionary instanceof Map) {
                                                                                Iterator it = ((Map) dictionary).values().iterator();
                                                                                while (it.hasNext()) {
                                                                                    Object o = it.next();
                                                                                    if (o != null  && o instanceof Class) {
                                                                                        ClassLoader cl = ((Class) o).getClassLoader();
                                                                                        if (cl != null) {
                                                                                            if (loaderRemovable(cl) || loaderRemovable(cl.getParent())) {
                                                                                                it.remove();
                                                                                                logger.log(Level.INFO, "Cleaned dictionary: {0}", thread.getName());
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }

                                                                            }

                                                                        }
                                                                    }
                                                                }

                                                            } finally {
                                                                theLock.writeLock().unlock();
                                                            }
                                                        }
                                                    }

                                                    Method removeMethod = null;
                                                    Method[] methods = presentationMgr.getClass().getDeclaredMethods();
                                                    if (methods != null) {
                                                        for (Method method : methods) {
                                                            if (method.getName().equals("flushClass")) {
                                                                removeMethod = method;
                                                                removeMethod.setAccessible(true);
                                                                break;
                                                            }
                                                        }
                                                    }
                                                    if (removeMethod != null) {
                                                        for (Object cls : toBeRemoved) {
                                                            try {
                                                                removeMethod.invoke(presentationMgr, cls);
                                                                logger.log(Level.INFO, "Cleaned classToClassData: {0}", thread.getName());
                                                            } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
                                                                logger.log(Level.SEVERE, null, ex);
                                                            }
                                                        }
                                                    }

                                                }

                                            }
                                        }
                                    }
                                }

                                Object timer = getObject(ejbContainerUtil, "_timer");
                                if (timer != null && timer instanceof Timer) {
                                    int purged = ((Timer) timer).purge();
                                    logger.log(Level.INFO, "Cleaned timer {0}. Purged {1} tasks.", new Object[]{thread.getName(), purged});
                                }
                            }
                        }
                    }
                }
            }
        }
    }

}

There is still a leak in a thread local with the following tree

this     - value: org.glassfish.javaee.full.deployment.EarClassLoader #6
 <- loader     - class: com.sun.ejb.containers.CMCSingletonContainer, value: org.glassfish.javaee.full.deployment.EarClassLoader #6
  <- container     - class: com.sun.ejb.containers.EJBLocalObjectInvocationHandler, value: com.sun.ejb.containers.CMCSingletonContainer #9
   <- optionalEjbLocalBusinessObjectImpl     - class: com.sun.ejb.containers.SingletonContextImpl, value: com.sun.ejb.containers.EJBLocalObjectInvocationHandler #12
    <- [0]     - class: java.lang.Object[], value: com.sun.ejb.containers.SingletonContextImpl #10
     <- elementData     - class: java.util.ArrayList, value: java.lang.Object[] #96711
      <- beans     - class: com.sun.ejb.containers.ContainerSynchronization, value: java.util.ArrayList #97409
       <- sync     - class: com.sun.ejb.containers.EjbContainerUtilImpl$TxData, value: com.sun.ejb.containers.ContainerSynchronization #2
        <- containerData     - class: com.sun.enterprise.transaction.JavaEETransactionImpl, value: com.sun.ejb.containers.EjbContainerUtilImpl$TxData #2
         <- clientTx     - class: com.sun.ejb.EjbInvocation, value: com.sun.enterprise.transaction.JavaEETransactionImpl #2
          <- inv     - class: com.sun.enterprise.security.authorize.HandlerData, value: com.sun.ejb.EjbInvocation #5
           <- value     - class: java.lang.ThreadLocal$ThreadLocalMap$Entry, value: com.sun.enterprise.security.authorize.HandlerData #6
            <- [121]     - class: java.lang.ThreadLocal$ThreadLocalMap$Entry[], value: java.lang.ThreadLocal$ThreadLocalMap$Entry #1185
             <- table     - class: java.lang.ThreadLocal$ThreadLocalMap, value: java.lang.ThreadLocal$ThreadLocalMap$Entry[] #179
              <- threadLocals (thread object)     - class: java.lang.Thread, value: java.lang.ThreadLocal$ThreadLocalMap #179




[GLASSFISH-20982] @RequestScoped and @SessionScoped beans do not work in requests initiated by a forward Created: 13/Feb/14  Updated: 24/Mar/15

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

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

Linux, jdk 1.7.0_45


Tags: 4_0_1-reviewed

 Description   

When a method on a @RequestScoped or @SessionScoped bean is invoked where the request came from a forward, a org.jboss.weld.context.ContextNotActiveException is thrown.

In my setup, I have a second application that handles some resource requests. In my main app, I request the resource with a forward:

request.getServletContext().getContext("/resource").getRequestDispatcher(path).forward(request, response)

I also have some common auditing code which uses @RequestScoped and @SessionScoped beans. These beans work correctly in the main app with a user invoked request, but not in the servlet handling the forward (and possibly include).

@RequestScoped
public class RequestDataTracker {

    private String action;
    private final UUID requestId = UUID.randomUUID();
    private String sessionId;
    private String username;

    public String getSessionId() {
        return sessionId;
    }

    public void setSessionId(String sessionId) {
        if (this.sessionId == null) {
            this.sessionId = sessionId;
        }
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        if (this.username == null) {
            this.username = username;
        }
    }

    public UUID getRequestId() {
        return requestId;
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    @Override
    public String toString() {
        return "RequestDataTracker{" + "action=" + action + ", requestId=" + requestId + ", sessionId=" + sessionId + ", username=" + username + '}';
    }

}

I have a BaseLoggingServlet that extends HttpServlet that has the logic for logging. The LoggingServlet extends that and implements methods to get and set data in an injected RequestDataTracker

public abstract class LoggingServlet extends BaseLoggingServlet {

    @Inject
    protected RequestDataTracker requestDataTracker;

    @Override
    protected String getUsername(HttpServletRequest request) {
        String username = SessionUtil.getSessionObject(request, CmdCtrConsts.USERNAME, String.class, false);
        if(username == null){
            username = (String) request.getAttribute(CmdCtrConsts.ACTUAL_USERNAME);
        }
        requestDataTracker.setUsername(username);
        return requestDataTracker.getUsername();
    }

    @Override
    protected UUID getRequestId(HttpServletRequest request) {
         return requestDataTracker.getRequestId();
    }

    @Override
    protected String getSessionId(HttpServletRequest request) {
        String sessionId = super.getSessionId(request);
        requestDataTracker.setSessionId(sessionId);
        return requestDataTracker.getSessionId();
    }
}

The following exception is thrown:

org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.enterprise.context.RequestScoped
	at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:667)
	at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:74)
	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79)
	at com.me.myproduct.logging.performance.RequestDataTracker$Proxy$_$$_WeldClientProxy.setSessionId(Unknown Source)
	at com.me.myproduct.core.common.logging.LoggingServlet.logAndProcess(LoggingServlet.java:27)
	at com.me.myproduct.core.common.logging.LoggingServlet.doGet(LoggingServlet.java:48)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
	at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:875)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:739)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:575)
	at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:546)
	at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:428)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:378)
	at com.me.myproduct.core.servlets.RequestDispatcherUtil.forward(RequestDispatcherUtil.java:51)
	at com.me.myproduct.core.servlets.portlet.ServeResourceDispatcherServlet.processRequest(ServeResourceDispatcherServlet.java:64)
	at com.me.myproduct.core.common.logging.LoggingServlet.logAndProcess(LoggingServlet.java:35)
	at com.me.myproduct.core.common.logging.LoggingServlet.doGet(LoggingServlet.java:48)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at com.me.myproduct.core.filters.SecurityFilter.doFilter(SecurityFilter.java:99)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
	at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
	at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
	at java.lang.Thread.run(Thread.java:744)


 Comments   
Comment by jjsnyder83 [ 24/Mar/15 ]

Please provide a reproducible test case.





[GLASSFISH-21007] HTTP Upgrade handler init called twice when access log is turned on Created: 17/Mar/14  Updated: 27/Mar/15

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

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

Glassfish 4.0.1b4 Promoted, Windows 7 x64, JDK 1.7.0_51


Issue Links:
Blocks
blocks TYRUS-306 java.lang.IllegalStateException: Alre... Open
Dependency
blocks TYRUS-306 java.lang.IllegalStateException: Alre... Open
Tags: javaee_ri_fix, payara

 Description   

When HTTP access logging is turned on, the init method of HttpUpgradeHandler implementations is called twice at upgrade-time. I'd previously filed TYRUS-306 for this, the necessary information, test components to reproduce are in that ticket. In the Tyrus case, the effect is that two websockets are created for one request which creates management difficulty and potential leaks.



 Comments   
Comment by smillidge-c2b2 [ 12/Jan/15 ]

A suggested fix for this is here
https://github.com/payara/Payara/commit/4b0951d503e416813cc4fba82edd2d60e8a77a53





[GLASSFISH-21050] Problem with classloader and casting using osgi gf-client-module to access remote EJB (RMI) from GF4. Created: 23/Apr/14  Updated: 23/Apr/14

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

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

Server:centos 6.4, 64, openjdk 7
Client:centos 6.4, 64, openjdk 7


Tags: ejb31, glassfish4, javaee, osgi, osgi-javaee

 Description   

I have server-client architecture. Server and client different machines in one local network. Both server and client are on osgi framework. For server it's hybrid EJB. There are three osgi bundles:for server,for client and shared. The copy of shared is both on server and on clients and contains LanguageDirBeanRemote and LanguageDirEntity. To get my bean I use the following code on osgi-client:

ClassLoader thatLoader = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
try {
Properties jndiProps = new Properties();
jndiProps.put("java.naming.factory.initial", "com.sun.enterprise.naming.impl.SerialInitContextFactory");
jndiProps.put("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
jndiProps.put("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
jndiProps.setProperty("org.omg.CORBA.ORBInitialHost", "x.x.x.x");
jndiProps.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
InitialContext ctx = new InitialContext(jndiProps);
LanguageDirBeanRemote bean=(LanguageDirBeanRemote)ctx.lookup("java:global/...");
ArrayList<LanguageDirEntity> elements=bean.readDirectory();
System.out.println("HERE I GET THE ERROR:"+elements.get(0).getContent());
} finally {
Thread.currentThread().setContextClassLoader(thatLoader);
}

Here is the log:
java.lang.ClassCastException: com.test.cmn.shd.base.dir.language.LanguageDirEntity cannot be cast to com.test.cmn.shd.base.dir.language.LanguageDirEntity at com.test.cmn.dt.base.Activator.start(Activator.java:83) at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645) at org.apache.felix.framework.Felix.activateBundle(Felix.java:1977) at org.apache.felix.framework.Felix.startBundle(Felix.java:1895) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:931) at com.test.cmn.dt.loader.LoaderModel.startCoreModule(LoaderModel.java:149) at com.test.cmn.dt.loader.LoaderModel.access$100(LoaderModel.java:39) at com.test.cmn.dt.loader.LoaderModel$InstallAndStartModuleWorker.doInBackground(LoaderModel.java:79) at com.test.cmn.dt.loader.LoaderModel$InstallAndStartModuleWorker.doInBackground(LoaderModel.java:73) at javax.swing.SwingWorker$1.call(SwingWorker.java:296) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at javax.swing.SwingWorker.run(SwingWorker.java:335) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)

The reason that I think it's the bug is that the following code works without any problems:
LanguageDirEntity[] elements=bean.readDirectoryAsArray();
We see, that using simple array, without ArrayList we get no errors. But when I try to use ArrayList or ArrayList<LanguageDirEntity> I get ClassCastException. I think the problem is somewhere in RMI when it loads classes.
This prblem I also described on stackoverflow. http://stackoverflow.com/questions/23174582/arraylist-classloader-issue-in-osgi-client-javaeeejb-server






[GLASSFISH-21058] Websocket create new live threads and never kill it Created: 02/May/14  Updated: 04/Jun/14

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

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

Ubuntu 12.04 LTS 64 bit server
RAM: 10GB
CPU: 8 cores


Tags: 4_0_1-approved, websocket

 Description   

I tested 1000 concurrent websocket requests and Glassfish created 1000 new live threads and so on.

I used VisualVM to check and saw new threads always increase.

If I test with 30000 concurrent websocket request, server got trouble and notice:
"Exception in thread "main" java.lang.OutOfMemoryError: unable to create new native thread."

I updated Tyrus 1.5 to Glassfish 4 but not success because of EJB revoking.

When I use Glassfish 4.0.1 b3 with Tyrus 1.5, everything ok, no new live thread apprear but sometimes, I got exception like that:

2014-05-03T00:49:04.690+0700|SEVERE: java.io.IOException: Broken pipe
at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:51)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:487)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.flushByteBuffer(TCPNIOTransport.java:1251)
at org.glassfish.grizzly.nio.transport.TCPNIOAsyncQueueWriter.write0(TCPNIOAsyncQueueWriter.java:107)
at org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter.write(AbstractNIOAsyncQueueWriter.java:273)
at org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter.write(AbstractNIOAsyncQueueWriter.java:180)
at org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter.write(AbstractNIOAsyncQueueWriter.java:70)
at org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleWrite(TCPNIOTransportFilter.java:128)
at org.glassfish.grizzly.filterchain.TransportFilter.handleWrite(TransportFilter.java:191)
at org.glassfish.grizzly.filterchain.ExecutorResolver$8.execute(ExecutorResolver.java:111)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.filterchain.FilterChainContext.write(FilterChainContext.java:853)
at org.glassfish.grizzly.filterchain.FilterChainContext.write(FilterChainContext.java:822)
at org.glassfish.grizzly.http.io.OutputBuffer.flushBuffer(OutputBuffer.java:1011)
at org.glassfish.grizzly.http.io.OutputBuffer.flushBinaryBuffers(OutputBuffer.java:996)
at org.glassfish.grizzly.http.io.OutputBuffer.flushAllBuffers(OutputBuffer.java:967)
at org.glassfish.grizzly.http.io.OutputBuffer.flush(OutputBuffer.java:732)
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:291)
at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:275)
at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:175)
at org.glassfish.tyrus.servlet.TyrusServletWriter._write(TyrusServletWriter.java:165)
at org.glassfish.tyrus.servlet.TyrusServletWriter.write(TyrusServletWriter.java:144)
at org.glassfish.tyrus.core.ProtocolHandler.write(ProtocolHandler.java:278)
at org.glassfish.tyrus.core.ProtocolHandler.send(ProtocolHandler.java:179)
at org.glassfish.tyrus.core.ProtocolHandler.send(ProtocolHandler.java:174)
at org.glassfish.tyrus.core.ProtocolHandler.send(ProtocolHandler.java:206)
at org.glassfish.tyrus.core.TyrusWebSocket.sendText(TyrusWebSocket.java:283)
at org.glassfish.tyrus.core.TyrusRemoteEndpoint$Basic.sendText(TyrusRemoteEndpoint.java:94)
at com.gbsofts.gbpriceboard.service.web.BoardDataService.onMessage(BoardDataService.java:119)
at sun.reflect.GeneratedMethodAccessor225.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4696)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:630)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:582)
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:55)
at sun.reflect.GeneratedMethodAccessor106.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:582)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
at sun.reflect.GeneratedMethodAccessor95.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4668)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4656)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy398.onMessage(Unknown Source)
at com.gbsofts.gbpriceboard.service.web._EJB31_GeneratedBoardDataServiceIntf__Bean_.onMessage(Unknown Source)
at sun.reflect.GeneratedMethodAccessor225.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.glassfish.tyrus.core.AnnotatedEndpoint.callMethod(AnnotatedEndpoint.java:438)
at org.glassfish.tyrus.core.AnnotatedEndpoint.access$100(AnnotatedEndpoint.java:86)
at org.glassfish.tyrus.core.AnnotatedEndpoint$WholeHandler$1.onMessage(AnnotatedEndpoint.java:533)
at org.glassfish.tyrus.core.TyrusSession.notifyMessageHandlers(TyrusSession.java:430)
at org.glassfish.tyrus.core.TyrusEndpointWrapper.onMessage(TyrusEndpointWrapper.java:652)
at org.glassfish.tyrus.core.TyrusWebSocket.onMessage(TyrusWebSocket.java:194)
at org.glassfish.tyrus.core.frame.TextFrame.respond(TextFrame.java:134)
at org.glassfish.tyrus.core.ProtocolHandler.process(ProtocolHandler.java:568)
at org.glassfish.tyrus.core.TyrusWebSocketEngine$TyrusReadHandler.handle(TyrusWebSocketEngine.java:260)
at org.glassfish.tyrus.servlet.TyrusHttpUpgradeHandler.onDataAvailable(TyrusHttpUpgradeHandler.java:164)
at org.apache.catalina.connector.InputBuffer$ReadHandlerImpl.processDataAvailable(InputBuffer.java:488)
at org.apache.catalina.connector.InputBuffer$ReadHandlerImpl.onDataAvailable(InputBuffer.java:453)
at org.glassfish.grizzly.http.io.InputBuffer.append(InputBuffer.java:855)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:220)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:837)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadI
2014-05-03T00:49:04.690+0700|SEVERE: OStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:744)






[GLASSFISH-21076] GF4 ignores the new org.glassfish.ejb.persistent.timer.TimerState class provided in the JPA persistence.xml configuration Created: 28/May/14  Updated: 18/Sep/14

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

Type: Bug Priority: Critical
Reporter: cistox Assignee: Srini
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OSs: Windows 7 Enterprise or Windows Server 2008 R2 Standard
Database: Microsoft SQL Server Version: 10.50.4266


Tags: 4_0_1-approved, EJB, JPA, Timer, TimerState

 Description   

During the deployment of an EAR that make use of the EJB Timer GF4 seems to be aware of the new class org.glassfish.ejb.persistent.timer.TimerState which is configured as part of the persistence.xml JPA configuration (see ejb-timer-service-app), but while loading the timer application the following exception is raised "Internal Exception: java.lang.ClassNotFoundException: com.sun.ejb.containers.TimerState$Blob" which clearly evidences that GF4 is still searching the old TimerState class used until GF 3.1.2.2

Following is the relevant log for your review:

[2014-05-28T09:51:15.801+0200] [glassfish 4.0] [CONFIG] [] [org.eclipse.persistence.session.file:/C:/server/production/glassfish4/glassfish/nodes/localhost-domain1/instance1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App.metadata] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263475801] [levelValue: 700] [[
The access type for the persistent class [class org.glassfish.ejb.persistent.timer.TimerState] is set to [FIELD].]]

[2014-05-28T09:51:15.832+0200] [glassfish 4.0] [INFO] [ejb.portable_jndi_names] [javax.enterprise.system.container.ejb.com.sun.ejb.containers] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263475832] [levelValue: 800] [[
EJB5181:Portable JNDI names for EJB TimerBean: [java:global/ejb-timer-service-app/TimerBean, java:global/ejb-timer-service-app/TimerBean!org.glassfish.ejb.persistent.timer.TimerLocal]]]

[2014-05-28T09:51:15.957+0200] [glassfish 4.0] [INFO] [AS-WEB-GLUE-00172] [javax.enterprise.web] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263475957] [levelValue: 800] [[
Loading application [ejb-timer-service-app] at [/ejb-timer-service-app]]]

[2014-05-28T09:51:15.972+0200] [glassfish 4.0] [INFO] [] [javax.enterprise.system.container.ejb.org.glassfish.ejb.persistent.timer] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263475972] [levelValue: 800] [[
ejb.timer_service_started]]

[2014-05-28T09:51:15.972+0200] [glassfish 4.0] [INFO] [] [javax.enterprise.system.container.ejb.org.glassfish.ejb.persistent.timer] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263475972] [levelValue: 800] [[
==> Restoring Timers ... ]]

[2014-05-28T09:51:16.004+0200] [glassfish 4.0] [INFO] [] [org.eclipse.persistence.session.file:/C:/server/production/glassfish4/glassfish/nodes/localhost-domain1/instance1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476004] [levelValue: 800] [[
EclipseLink, version: Eclipse Persistence Services - 2.5.0.v20130507-3faac2b]]

[2014-05-28T09:51:16.035+0200] [glassfish 4.0] [FINE] [] [org.eclipse.persistence.session.file:/C:/server/production/glassfish4/glassfish/nodes/localhost-domain1/instance1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App.connection] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476035] [levelValue: 500] [[
Detected database platform: org.eclipse.persistence.platform.database.SQLServerPlatform]]

[2014-05-28T09:51:16.050+0200] [glassfish 4.0] [CONFIG] [] [org.eclipse.persistence.session.file:/C:/server/production/glassfish4/glassfish/nodes/localhost-domain1/instance1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App.connection] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476050] [levelValue: 700] [[
connecting(DatabaseLogin(
platform=>DatabasePlatform
user name=> ""
connector=>JNDIConnector datasource name=>null
))]]

[2014-05-28T09:51:16.050+0200] [glassfish 4.0] [CONFIG] [] [org.eclipse.persistence.session.file:/C:/server/production/glassfish4/glassfish/nodes/localhost-domain1/instance1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App.connection] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476050] [levelValue: 700] [[
Connected: jdbc:sqlserver://10.5.6.136:1433;xopenStates=false;sendTimeAsDatetime=true;trustServerCertificate=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;loginTimeout=15;lockTimeout=-1;lastUpdateCount=true;encrypt=false;disableStatementPooling=true;databaseName=CSIPortal;applicationName=Microsoft SQL Server JDBC Driver;
User: CSIPortal
Database: Microsoft SQL Server Version: 10.50.4266
Driver: Microsoft SQL Server JDBC Driver 3.0 Version: 3.0.1301.101]]

[2014-05-28T09:51:16.050+0200] [glassfish 4.0] [CONFIG] [] [org.eclipse.persistence.session.file:/C:/server/production/glassfish4/glassfish/nodes/localhost-domain1/instance1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App.connection] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476050] [levelValue: 700] [[
connecting(DatabaseLogin(
platform=>SQLServerPlatform
user name=> ""
connector=>JNDIConnector datasource name=>null
))]]

[2014-05-28T09:51:16.144+0200] [glassfish 4.0] [CONFIG] [] [org.eclipse.persistence.session.file:/C:/server/production/glassfish4/glassfish/nodes/localhost-domain1/instance1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App.connection] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476144] [levelValue: 700] [[
Connected: jdbc:sqlserver://10.5.6.136:1433;xopenStates=false;sendTimeAsDatetime=true;trustServerCertificate=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;loginTimeout=15;lockTimeout=-1;lastUpdateCount=true;encrypt=false;disableStatementPooling=true;databaseName=CSIPortal;applicationName=Microsoft SQL Server JDBC Driver;
User: CSIPortal
Database: Microsoft SQL Server Version: 10.50.4266
Driver: Microsoft SQL Server JDBC Driver 3.0 Version: 3.0.1301.101]]

[2014-05-28T09:51:16.238+0200] [glassfish 4.0] [INFO] [] [org.eclipse.persistence.session.file:/C:/server/production/glassfish4/glassfish/nodes/localhost-domain1/instance1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App.connection] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476238] [levelValue: 800] [[
file:/C:/server/production/glassfish4/glassfish/nodes/localhost-domain1/instance1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App login successful]]

[2014-05-28T09:51:16.269+0200] [glassfish 4.0] [FINE] [] [org.eclipse.persistence.session.file:/C:/server/production/glassfish4/glassfish/nodes/localhost-domain1/instance1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App.sql] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476269] [levelValue: 500] [[
SELECT "TIMERID", "APPLICATIONID", "BLOB", "CONTAINERID", "CREATIONTIMERAW", "INITIALEXPIRATIONRAW", "INTERVALDURATION", "LASTEXPIRATIONRAW", "OWNERID", "PKHASHCODE", "SCHEDULE", "STATE" FROM "EJB_TIMER_TBL" WHERE (("OWNERID" = ?) AND ("STATE" = ?))
bind => [instance1, 0]]]

[2014-05-28T09:51:16.284+0200] [glassfish 4.0] [WARNING] [] [org.eclipse.persistence.session.file:/C:/server/production/glassfish4/glassfish/nodes/localhost-domain1/instance1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476284] [levelValue: 900] [[

Local Exception Stack:
Exception [EclipseLink-66] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: Could not deserialize object from byte array.
Internal Exception: Exception [EclipseLink-3007] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.ConversionException
Exception Description: The object [com.sun.ejb.containers.TimerState$Blob], of class [class java.lang.String], could not be converted to [class java.lang.Class]. Ensure that the class [class java.lang.Class] is on the CLASSPATH. You may need to use alternate API passing in the appropriate class loader as required, or setting it on the default ConversionManager
Internal Exception: java.lang.ClassNotFoundException: com.sun.ejb.containers.TimerState$Blob
Mapping: org.eclipse.persistence.mappings.DirectToFieldMapping[blob-->EJB__TIMER__TBL.BLOB]
Descriptor: RelationalDescriptor(org.glassfish.ejb.persistent.timer.TimerState --> [DatabaseTable(EJB__TIMER__TBL)])
at org.eclipse.persistence.exceptions.DescriptorException.notDeserializable(DescriptorException.java:1230)
at org.eclipse.persistence.mappings.converters.SerializedObjectConverter.convertDataValueToObjectValue(SerializedObjectConverter.java:75)
at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.getObjectValue(AbstractDirectMapping.java:614)
at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.valueFromRow(AbstractDirectMapping.java:1215)
at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.buildCloneFromRow(AbstractDirectMapping.java:203)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildAttributesIntoWorkingCopyClone(ObjectBuilder.java:1811)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildWorkingCopyCloneFromRow(ObjectBuilder.java:1958)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObjectInUnitOfWork(ObjectBuilder.java:726)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:629)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:587)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:571)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:782)
at org.eclipse.persistence.queries.ReadAllQuery.registerResultInUnitOfWork(ReadAllQuery.java:848)
at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:490)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1155)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1114)
at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:402)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1202)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2894)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1797)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1779)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1744)
at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:258)
at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:468)
at org.glassfish.ejb.persistent.timer.TimerBean.findTimersByOwnerAndState(TimerBean.java:212)
at org.glassfish.ejb.persistent.timer.TimerBean.findActiveTimersOwnedByThisServer(TimerBean.java:523)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4695)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:630)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:582)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4667)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4655)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy264.findActiveTimersOwnedByThisServer(Unknown Source)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.restoreEJBTimers(PersistentEJBTimerService.java:369)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.resetEJBTimers(PersistentEJBTimerService.java:1400)
at com.sun.ejb.containers.EJBTimerService.initEJBTimerService(EJBTimerService.java:236)
at com.sun.ejb.containers.EJBTimerService.getEJBTimerService(EJBTimerService.java:205)
at com.sun.ejb.containers.EJBTimerService.getEJBTimerService(EJBTimerService.java:187)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:758)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:143)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:137)
at com.sun.ejb.containers.StatelessContainerFactory.createContainer(StatelessContainerFactory.java:61)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:493)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.InstanceDeployCommand.execute(InstanceDeployCommand.java:213)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:396)
at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandMultInMultOut(CommandResource.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:125)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:91)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:346)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:341)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:101)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:224)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:198)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:946)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:331)
at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:165)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:181)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
at java.lang.Thread.run(Thread.java:744)
Caused by: Exception [EclipseLink-3007] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.ConversionException
Exception Description: The object [com.sun.ejb.containers.TimerState$Blob], of class [class java.lang.String], could not be converted to [class java.lang.Class]. Ensure that the class [class java.lang.Class] is on the CLASSPATH. You may need to use alternate API passing in the appropriate class loader as required, or setting it on the default ConversionManager
Internal Exception: java.lang.ClassNotFoundException: com.sun.ejb.containers.TimerState$Blob
at org.eclipse.persistence.exceptions.ConversionException.couldNotBeConvertedToClass(ConversionException.java:95)
at org.eclipse.persistence.internal.helper.ConversionManager.convertObjectToClass(ConversionManager.java:446)
at org.eclipse.persistence.internal.helper.ConversionManager.convertClassNameToClass(ConversionManager.java:799)
at org.eclipse.persistence.internal.helper.CustomObjectInputStream.resolveClass(CustomObjectInputStream.java:42)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at org.eclipse.persistence.mappings.converters.SerializedObjectConverter.convertDataValueToObjectValue(SerializedObjectConverter.java:73)
... 133 more
Caused by: java.lang.ClassNotFoundException: com.sun.ejb.containers.TimerState$Blob
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1761)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1611)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at org.eclipse.persistence.internal.helper.ConversionManager.convertObjectToClass(ConversionManager.java:443)
... 141 more
]]

[2014-05-28T09:51:16.893+0200] [glassfish 4.0] [WARNING] [ejb.system_exception] [javax.enterprise.system.container.ejb.com.sun.ejb.containers] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476893] [levelValue: 900] [[
EJB5184:A system exception occurred during an invocation on EJB TimerBean, method: public java.util.Set org.glassfish.ejb.persistent.timer.TimerBean.findActiveTimersOwnedByThisServer()]]

[2014-05-28T09:51:16.893+0200] [glassfish 4.0] [WARNING] [] [javax.enterprise.system.container.ejb.com.sun.ejb.containers] [tid: _ThreadID=37 _ThreadName=admin-listener(4)] [timeMillis: 1401263476893] [levelValue: 900] [[

javax.ejb.EJBException
at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:748)
at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:698)
at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:503)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4475)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2009)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1979)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy264.findActiveTimersOwnedByThisServer(Unknown Source)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.restoreEJBTimers(PersistentEJBTimerService.java:369)
at org.glassfish.ejb.persistent.timer.PersistentEJBTimerService.resetEJBTimers(PersistentEJBTimerService.java:1400)
at com.sun.ejb.containers.EJBTimerService.initEJBTimerService(EJBTimerService.java:236)
at com.sun.ejb.containers.EJBTimerService.getEJBTimerService(EJBTimerService.java:205)
at com.sun.ejb.containers.EJBTimerService.getEJBTimerService(EJBTimerService.java:187)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:758)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:143)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:137)
at com.sun.ejb.containers.StatelessContainerFactory.createContainer(StatelessContainerFactory.java:61)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:493)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.InstanceDeployCommand.execute(InstanceDeployCommand.java:213)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:396)
at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandMultInMultOut(CommandResource.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:125)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:91)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:346)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:341)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:101)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:224)