Closed glassfishrobot closed 4 years ago
@glassfishrobot Commented simonfojtu said: Created an attachment (id=4058) screenshot with localized generic error message
@glassfishrobot Commented anilam said: Normally, if you create an object that has already exists, you get some error message saying 'Key' is not unique. That isn't perfect either, but that should be what to expect.
However, virtual server seems to be handled differently. There is no exception thrown by the backend, and whats worst, after i did this couple times, say, trying to create a virtual server with the name "server", I saw many written out to domain.xml, like this:
And the web container can't even startup when i restart the server, giving this error:
[#|2009-12-07T10:15:22.258-0800|SEVERE|glassfishv3.0|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=23;_ThreadName=Thread-23;|Cannot start container web java.lang.IllegalArgumentException: addChild: Child name 'server' is not unique at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:922)
Given the severeness of the consequence of this issue, (any duplicate vs name, not just "server", will cause the web container failed to startup), I mark this as P2 so it can be looked at asap and decide if this should be release noted.
CLI is able to give the correct error msg: com.sun.enterprise.admin.cli.CommandException: remote failure: Virtual Server named server already exists.
I am not sure if i should transfer to configuration or amx, please reassign if needed.
I changed the summary to reflect this better also.
@glassfishrobot Commented kumara said: The issue is about error handling and therefore is not a show stopper for GlassFish v3 release.
@glassfishrobot Commented anilam said: Just to clarify when i say 'no exception thrown by backend'. There is an exception logged, but somehow got lost and amx.createChild() doesn't throw the exception.
[#|2009-12-07T10:51:30.053-0800|SEVERE|glassfishv3.0|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=31;_ThreadName=pool-17-thread-1;|Exception while processing config bean changes : java.lang.IllegalArgumentException: addChild: Child name 'server' is not unique at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:922) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:912) at org.apache.catalina.core.StandardEngine.addChild(StandardEngine.java:359) at com.sun.enterprise.web.WebContainer.createHost(WebContainer.java:1180) at com.sun.enterprise.web.reconfig.WebConfigListener$1.changed(WebConfigListener.java:122) at org.jvnet.hk2.config.ConfigSupport.sortAndDispatch(ConfigSupport.java:271) at com.sun.enterprise.web.reconfig.WebConfigListener.changed(WebConfigListener.java:113) at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:365) at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:355) at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:248) at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:246) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:637)
| #] |
@glassfishrobot Commented anilam said: Created an attachment (id=4060) server.log when creating dup. VS in GUI
@glassfishrobot Commented ne110415 said: I see two exceptions. One from Config backend. And another one – InstanceAlreadyExistsException from AMX (AMX tries to create an MBean with same name and it fails). (See the trace below)
So are you saying GUI does not get the AMX exception?
----- TRACE FOR AMX EXCEPTION-----
javax.management.InstanceAlreadyExistsException: "amx:pp=/domain/configs/config[server-config]/http-service,type=virtual-server,name=server" com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453) com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484) com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963) com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917) com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312) com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482) org.glassfish.admin.amx.impl.config.AMXConfigLoader.createAndRegister(AMXConfigLoader.java:665) org.glassfish.admin.amx.impl.config.AMXConfigLoader._registerConfigBeanAsMBean(AMXConfigLoader.java:637) org.glassfish.admin.amx.impl.config.AMXConfigLoader.registerConfigBeanAsMBean(AMXConfigLoader.java:605) org.glassfish.admin.amx.impl.config.AMXConfigLoader.access$100(AMXConfigLoader.java:80) org.glassfish.admin.amx.impl.config.AMXConfigLoader$AMXConfigLoaderThread.registerOne(AMXConfigLoader.java:513) org.glassfish.admin.amx.impl.config.AMXConfigLoader$AMXConfigLoaderThread.doRun(AMXConfigLoader.java:583) org.glassfish.admin.amx.impl.config.AMXConfigLoader$AMXConfigLoaderThread.run(AMXConfigLoader.java:533)
| #] |
----TRACE FOR CONFIG EXCEPTION----
[#|2009-12-07T11:01:37.038-0800|SEVERE|glassfishv3.0|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=29;_ThreadName=pool-16-thread-1;|Exception while processing config bean changes : java.lang.IllegalArgumentException: addChild: Child name 'server' is not unique at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:922) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:912) at org.apache.catalina.core.StandardEngine.addChild(StandardEngine.java:359) at com.sun.enterprise.web.WebContainer.createHost(WebContainer.java:1180) at com.sun.enterprise.web.reconfig.WebConfigListener$1.changed(WebConfigListener.java:122) at org.jvnet.hk2.config.ConfigSupport.sortAndDispatch(ConfigSupport.java:271) at com.sun.enterprise.web.reconfig.WebConfigListener.changed(WebConfigListener.java:113) at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:365) at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:355) at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:248) at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:246) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:637)
| #] |
[#|2009-12-07T11:01:37.038-0800|SEVERE|glassfishv3.0|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=29;_ThreadName=pool-16-thread-1;|Exception while processing config bean changes : java.lang.IllegalArgumentException: addChild: Child name 'server' is not unique at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:922) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:912) at org.apache.catalina.core.StandardEngine.addChild(StandardEngine.java:359) at com.sun.enterprise.web.WebContainer.createHost(WebContainer.java:1180) at com.sun.enterprise.web.reconfig.WebConfigListener$1.changed(WebConfigListener.java:122) at org.jvnet.hk2.config.ConfigSupport.sortAndDispatch(ConfigSupport.java:271) at com.sun.enterprise.web.reconfig.WebConfigListener.changed(WebConfigListener.java:113) at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:365) at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:355) at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:248) at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:246) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:637)
| #] |
[#|2009-12-07T11:01:37.038-0800|SEVERE|glassfishv3.0|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=29;_ThreadName=pool-16-thread-1;|Exception while processing config bean changes : java.lang.IllegalArgumentException: addChild: Child name 'server' is not unique at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:922) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:912) at org.apache.catalina.core.StandardEngine.addChild(StandardEngine.java:359) at com.sun.enterprise.web.WebContainer.createHost(WebContainer.java:1180) at com.sun.enterprise.web.reconfig.WebConfigListener$1.changed(WebConfigListener.java:122) at org.jvnet.hk2.config.ConfigSupport.sortAndDispatch(ConfigSupport.java:271) at com.sun.enterprise.web.reconfig.WebConfigListener.changed(WebConfigListener.java:113) at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:365) at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:355) at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:248) at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:246) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:637)
| #] |
[#|2009-12-07T11:01:37.038-0800|SEVERE|glassfishv3.0|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=29;_ThreadName=Thread-1;|Exception while processing config bean changes : java.lang.IllegalArgumentException: addChild: Child name 'server' is not unique at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:922) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:912) at org.apache.catalina.core.StandardEngine.addChild(StandardEngine.java:359) at com.sun.enterprise.web.WebContainer.createHost(WebContainer.java:1180) at com.sun.enterprise.web.reconfig.WebConfigListener$1.changed(WebConfigListener.java:122) at org.jvnet.hk2.config.ConfigSupport.sortAndDispatch(ConfigSupport.java:271) at com.sun.enterprise.web.reconfig.WebConfigListener.changed(WebConfigListener.java:113) at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:365) at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:355) at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:248) at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:246) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:637)
| #] |
@glassfishrobot Commented anilam said: exactly. AMXConfigProxy child = amx.createChild(childType, attrs); doesn't give me any exception, child is returned as null which isn't what normally happen, and GUI doesn't expect that and throws NPE.
But why is this entry get created in domain.xml ?
@glassfishrobot Commented llc said: There is a longstanding bug in HK2 that allows creation of more than one element having the same key value. So this bug is probably a duplicate.
AMX passes things through. HK2 will create the conflicting element, but then of course AMX cannot register an MBean for it because of a name conflict.
I'd have to look at the code to see why 'null' comes back. It's a tricky asynchronous process so that might have something to do with it.
@glassfishrobot Commented llc said: This issue might be related, probably good to look at it in context.
@glassfishrobot Commented ne110415 said: 9150 is a camel case conversion issue. I doubt it can be related to this.
We have two issues to handle: 1. null coming out of addChild() instead of the right exception that AMX throws. (11c is looking into this) 2. An element seems to get added to domain.xml inspite of a config exception.(I am looking into this)
@glassfishrobot Commented llc said: DEFINITELY a problem here.
I've added two tests to QuickLook (via AMX): one for
[testng] java.lang.AssertionError [testng] at amxtest.AMXConfigProxyTests.duplicateVirtualServerTest(AMXConfigProxyTests.java:609) [testng] ... Removed 22 stack frames [testng] FAILED: duplicatePropertyTest [testng] java.lang.AssertionError: More than one property with the same name can be created! [testng] at amxtest.AMXConfigProxyTests.duplicatePropertyTest(AMXConfigProxyTests.java:568) [testng] ... Removed 22 stack frames
@glassfishrobot Commented llc said: To clarify: while the tests I added in the AMX test suite, the culprit is HK2, which allows the conflicting elements to be created.
@glassfishrobot Commented llc said: fixed spelling error in summary
@glassfishrobot Commented grisdal said: Does this issue need to be documented in the GF v3 release notes? If so, what needs to be said about it (concise description and workaround).
@glassfishrobot Commented ai109478 said: -> Tom
@glassfishrobot Commented tmueller said: In 3.1, an attempt to create a duplicate virtual server via asadmin fails with a proper error message:
$ glassfishv3/bin/asadmin create-virtual-server --hosts localhost server remote failure: Virtual Server named server already exists.
Command create-virtual-server failed.
So the problem with this issue is really with how AMX returns the error. The configuration infrastructure is working properly. Changing the category to AMX.
Since the consle is using rest rather than AMX for 3.1, lowering the priority of is issue.
@glassfishrobot Commented @prsad said: Excluding these issues from v3.1
@glassfishrobot Commented tmueller said: Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.
@glassfishrobot Commented File: gfv3_b74a_es_12.png Attached By: simonfojtu
@glassfishrobot Commented File: server.log Attached By: anilam
@glassfishrobot Commented This issue was imported from java.net JIRA GLASSFISH-11272
@glassfishrobot Commented Reported by simonfojtu
This issue has been marked as inactive and old and will be closed in 7 days if there is no further activity. If you want the issue to remain open please add a comment
Providing an already existing name causes error, but user doesn't know what's wrong (just "An error has occurred")
How to reproduce:
Environment
Operating System: other Platform: PC
Affected Versions
[V3]