[GLASSFISH-18191] SDK6u4: Unable to access AdminConsole on clean install with no password using JDK1.7.0_02. Works with JDK1.6.0_30 Created: 13/Jan/12  Updated: 26/Mar/13  Resolved: 26/Mar/13

Status: Resolved
Project: glassfish
Component/s: rest-interface
Affects Version/s: 3.1.1_b12
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: Alex Pineda Assignee: Jason Lee
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 with 64bit OS. SDK6u4 (GF3.1.1 build12, JDK1.7.0_02 x64bit). Firefox browser 3.6..25. Default install (default ports and no admin password).


Attachments: Text File server.log     File server.log_2012-01-12T17-58-11     File server.log_2012-01-13T08-57-21    
Tags: 3_1_2-exclude

 Description   

The following scenario works with JDK1.6.0_30. Reported a similar symptom in GF3.1.2 as issue http://java.net/jira/browse/GLASSFISH-18148. This issue was closed as duplicate of http://java.net/jira/browse/GLASSFISH-18133 which defined the problem as being JDK related in how it determines the targetMethod.

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

[#|2012-01-13T08:57:21.753-0800|SEVERE|glassfish3.1.1|org.glassfish.admin.rest.g
enerator.ASMClassWriter|_ThreadID=94;_ThreadName=Thread-2;|The log message is nu
ll.java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.glassfish.admin.rest.generator.ASMClassWriter.defineClass(ASMClas
sWriter.java:471)
at org.glassfish.admin.rest.generator.ASMClassWriter.done(ASMClassWriter
.java:294)
at org.glassfish.admin.rest.generator.ResourcesGeneratorBase.generateCom
mandResourceClass(ResourcesGeneratorBase.java:357)
at org.glassfish.admin.rest.generator.ResourcesGeneratorBase.generateCom
mandResources(ResourcesGeneratorBase.java:301)
at org.glassfish.admin.rest.generator.ResourcesGeneratorBase.generateSin
gle(ResourcesGeneratorBase.java:100)
at org.glassfish.admin.rest.LazyJerseyInit.generateASM(LazyJerseyInit.ja
va:311)
at org.glassfish.admin.rest.LazyJerseyInit.getResourcesConfigForManageme
nt(LazyJerseyInit.java:255)
at org.glassfish.admin.rest.adapter.RestManagementAdapter.getResourcesCo
nfig(RestManagementAdapter.java:62)
at org.glassfish.admin.rest.adapter.RestAdapter.exposeContext(RestAdapte
r.java:455)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java
:177)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java
:168)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java
:117)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(Container
Mapper.java:238)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:8
28)
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(DefaultProtocolFil
ter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultPro
tocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.jav
a:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.jav
a:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java
:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextT
ask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.
java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadP
ool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool
.java:513)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.glassfish.admin.rest.generator.ASMClassWriter.defineClass(ASMClas
sWriter.java:452)
... 26 more
Caused by: java.lang.LinkageError: loader (instance of org/apache/felix/framewo
rk/ModuleImpl$ModuleClassLoaderJava5): attempted duplicate class definition for
name: "org/glassfish/admin/rest/resources/generatedASM/Domain_gmsAnnounceAfterS
topClusterCommandResource"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
... 30 more

#]

[#|2012-01-13T08:57:21.753-0800|SEVERE|glassfish3.1.1|javax.enterprise.system.st
d.com.sun.enterprise.server.logging|_ThreadID=94;_ThreadName=Thread-2;|java.lang
.RuntimeException: java.lang.reflect.InvocationTargetException
at org.glassfish.admin.rest.generator.ASMClassWriter.defineClass(ASMClas
sWriter.java:471)
at org.glassfish.admin.rest.generator.ASMClassWriter.done(ASMClassWriter
.java:294)
at org.glassfish.admin.rest.generator.ResourcesGeneratorBase.generateCom
mandResourceClass(ResourcesGeneratorBase.java:357)
at org.glassfish.admin.rest.generator.ResourcesGeneratorBase.generateCom
mandResources(ResourcesGeneratorBase.java:301)
at org.glassfish.admin.rest.generator.ResourcesGeneratorBase.generateSin
gle(ResourcesGeneratorBase.java:100)
at org.glassfish.admin.rest.LazyJerseyInit.generateASM(LazyJerseyInit.ja
va:311)
at org.glassfish.admin.rest.LazyJerseyInit.getResourcesConfigForManageme
nt(LazyJerseyInit.java:255)
at org.glassfish.admin.rest.adapter.RestManagementAdapter.getResourcesCo
nfig(RestManagementAdapter.java:62)
at org.glassfish.admin.rest.adapter.RestAdapter.exposeContext(RestAdapte
r.java:455)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java
:177)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java
:168)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java
:117)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(Container
Mapper.java:238)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:8
28)
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(DefaultProtocolFil
ter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultPro
tocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.jav
a:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.jav
a:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java
:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextT
ask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.
java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadP
ool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool
.java:513)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.glassfish.admin.rest.generator.ASMClassWriter.defineClass(ASMClas
sWriter.java:452)
... 26 more
Caused by: java.lang.LinkageError: loader (instance of org/apache/felix/framewo
rk/ModuleImpl$ModuleClassLoaderJava5): attempted duplicate class definition for
name: "org/glassfish/admin/rest/resources/generatedASM/Domain_gmsAnnounceAfterS
topClusterCommandResource"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
... 30 more

#]

Attached is the server log which has the details.



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

Changing the category to rest-interface because based on the exception, this looks like it might be in the rest area.

Comment by Tom Mueller [ 13/Jan/12 ]

Note that we have already seen one issue with JDK 1.7.0_02 where this JDK release revealed a problem in GlassFish with code that was looping through the methods of a class. The observed behavior was that from run-to-run, the order of the methods that was returned from Class.getMethods changed. So the problem would show up some times but not other times.

See GLASSFISH-18133.

Comment by scatari [ 13/Jan/12 ]

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

Comment by Jason Lee [ 14/Jan/12 ]

I've been testing this continuously against a local 3.1.2 build (stop then start the server, make a REST request) for at least a couple of hours now and haven't seen this yet. My test system is Linux (Linux Mint) under VirtualBox, with 1.7.0_2:

java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)

The reporter lists 3.1.1 as the problem platform. Has this bug been seen on 3.1.2 since GLASSFISH-18133 was fixed? If so, under what OS(es)?

Comment by Alex Pineda [ 14/Jan/12 ]

As mentioned, not clear if this issue is related to GLASSFISH-18133 (or the bug that I originally filed, GLASSFISH-18148, which was closed as a duplicate of 18133), but in 3.1.2, the problem is no longer seen with build 17. I verified it. The problem is reproducible on GF3.1.2 build 16, but not build 17.

One more point, the problem reported is being seen in GF3.1.1 and with JDK1.7.0_02. This is the SDK6u3 distribution that we're trying to release in the coming week. This problem was not seen with GF 3.1.1 with JDK1.7.0 or JDK1.6.0_30.

Lastly, I don't see this problem on Linux, Unix or Mac systems. Only with Windows (Windows 2008 and Windows 7). I can make the system available to debug the issue. Please contact me directly.

Comment by Alex Pineda [ 14/Jan/12 ]

One more thing. I just reproduced the problem on a Windows 2008 system and I believe the first SEVERE message is similar what was seen in issue 18131. The server log shows the following:

[#|2012-01-14T10:59:43.967-0800|SEVERE|glassfish3.1.1|org.glassfish.admin.rest.resources.GeneratorResource|_ThreadID=91;_ThreadName=Thread-2;|The log message is null.
java.lang.RuntimeException: Cannot find annotation org.glassfish.config.support. Create with value _register-instance on method public abstract com.sun.enterprise.config.serverbeans.Server com.sun.enterprise.config.serverbeans.Servers.getServer(java.lang.String)
at org.glassfish.config.support.GenericCrudCommand.getAnnotation(Generic
CrudCommand.java:196)
at org.glassfish.config.support.GenericCreateCommand.postConstruct(Gener
icCreateCommand.java:90)
at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.
java:131)
at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreato
r.java:91)
at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.jav
a:82)
at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingIn
habitant.java:139)
at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantIm
pl.java:76)
at org.jvnet.hk2.component.Habitat.getComponent(Habitat.java:796)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.getModel(CommandRunnerI
mpl.java:150)
at org.glassfish.admin.rest.generator.ResourcesGeneratorBase.commandIsPr
esent(ResourcesGeneratorBase.java:315)
at org.glassfish.admin.rest.generator.ResourcesGeneratorBase.generateCom
mandResources(ResourcesGeneratorBase.java:296)
at org.glassfish.admin.rest.generator.ResourcesGeneratorBase.generateSin
gle(ResourcesGeneratorBase.java:100)
at org.glassfish.admin.rest.LazyJerseyInit.generateASM(LazyJerseyInit.ja
va:311)
at org.glassfish.admin.rest.LazyJerseyInit.getResourcesConfigForManageme
nt(LazyJerseyInit.java:255)
at org.glassfish.admin.rest.adapter.RestManagementAdapter.getResourcesCo
nfig(RestManagementAdapter.java:62)
at org.glassfish.admin.rest.adapter.RestAdapter.exposeContext(RestAdapte
r.java:455)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java
:177)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java
:168)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java
:117)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(Container
Mapper.java:238)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:8
28)
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(DefaultProtocolFil
ter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultPro
tocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.jav
a:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.jav
a:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java
:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextT
ask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.
java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadP
ool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool
.java:513)
at java.lang.Thread.run(Thread.java:722)

#]

Will attach the server.log which I hope will help.

Comment by Alex Pineda [ 14/Jan/12 ]

Attaching server log from the Windows 2008 system. I can make the system available for debug. Please contact me directly.

Comment by Jason Lee [ 17/Jan/12 ]

Since this issue is no longer seen in 3.1.2, it seems that back-porting the fix for GLASSFISH-18133, which fixed this issue in 3.1.2, may be the appropriate step here. The question, then, is who does that work, the GlassFish team (which would mean Tom, I would guess, as the assignee for 18133) or Sustaining?

Comment by Jason Lee [ 26/Mar/13 ]

Is this issue still a problem? Can this JIRA be closed?

Comment by Alex Pineda [ 26/Mar/13 ]

Please go ahead and close this JIRA issue. I reported it over a year ago and I have not seen this issue in recent SDK6 or SDK7 builds. If I do, I will re-open the bug. Close it for now.

Comment by Jason Lee [ 26/Mar/13 ]

Sounds good. Thanks.

Generated at Thu Sep 29 09:02:08 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.