glassfish
glassfish copied to clipboard
Exception while deploying the app [__admingui]]]
Environment Details
-
GlassFish Version (and build number):
Eclipse GlassFish 7.0.0 (build master-b-g3463ea0 2022-02-05T16:50:42+0000)Where 3463ea0 is current master. -
JDK version:
openjdk version "11.0.14" 2022-01-18 -
OS: Linux
-
Database: none
Problem Description
GlassFish Server Administration Console (http://localhost:4848) cannot be loaded.
Seems to be easily reproducible with https://ci.eclipse.org/glassfish/view/GlassFish/job/glassfish_build-and-test-using-jenkinsfile/job/master/611/artifact/bundles/glassfish.zip
server.log contains:
[2022-02-06T13:23:50.861+0100] [glassfish 7.0] [SEVERE] [NCLS-CORE-00026] [jakarta.enterprise.system.core] [tid: _ThreadID=125 _ThreadName=Thread-28] [timeMillis: 1644150230861] [levelValue: 1000] [[
Exception during lifecycle processing
MultiException stack 1 of 2
com.sun.enterprise.module.ResolveError: Failed to start OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-common-full-plugin [238]], State = [NEW]
at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:193)
at org.jvnet.hk2.osgiadapter.OsgiPopulatorPostProcessor$1.loadClass(OsgiPopulatorPostProcessor.java:54)
at org.jvnet.hk2.internal.ServiceLocatorImpl.loadClass(ServiceLocatorImpl.java:2254)
at org.jvnet.hk2.internal.ServiceLocatorImpl.reifyDescriptor(ServiceLocatorImpl.java:433)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2067)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:67)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getAllServices(ServiceLocatorImpl.java:852)
at com.sun.enterprise.v3.server.ClassLoaderHierarchyImpl.createApplicationParentCL(ClassLoaderHierarchyImpl.java:179)
at org.glassfish.deployment.common.DeploymentContextImpl.createClassLoader(DeploymentContextImpl.java:222)
at org.glassfish.deployment.common.DeploymentContextImpl.createDeploymentClassLoader(DeploymentContextImpl.java:205)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:345)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:382)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:188)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:77)
Caused by: org.osgi.framework.BundleException: Unable to resolve org.glassfish.main.admingui.console-common-full-plugin [238](R 238.0): missing requirement [org.glassfish.main.admingui.console-common-full-plugin [238](R 238.0)] osgi.wiring.package; (&(osgi.wiring.package=com.sun.jsftemplating.layout.descriptors.handler)(version>=3.0.0)(!(version>=4.0.0))) [caused by: Unable to resolve org.glassfish.jsftemplating [93](R 93.0): missing requirement [org.glassfish.jsftemplating [93](R 93.0)] osgi.wiring.package; (&(osgi.wiring.package=jakarta.el)(version>=4.0.0)(!(version>=5.0.0)))] Unresolved requirements: [[org.glassfish.main.admingui.console-common-full-plugin [238](R 238.0)] osgi.wiring.package; (&(osgi.wiring.package=com.sun.jsftemplating.layout.descriptors.handler)(version>=3.0.0)(!(version>=4.0.0)))]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4398)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2308)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:1006)
at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.startBundle(OSGiModuleImpl.java:224)
at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:185)
... 14 more
MultiException stack 2 of 2
java.lang.IllegalStateException: Could not load descriptor SystemDescriptor(
implementation=org.glassfish.full.admingui.JMailConsolePlugin
contracts={org.glassfish.full.admingui.JMailConsolePlugin,org.glassfish.api.admingui.ConsoleProvider}
scope=jakarta.inject.Singleton
qualifiers={}
descriptorType=CLASS
descriptorVisibility=NORMAL
metadata=Bundle-SymbolicName={org.glassfish.main.admingui.console-common-full-plugin},Bundle-Version={7.0.0.SNAPSHOT}
rank=0
loader=OsgiPopulatorPostProcessor.HK2Loader(OSGiModuleImpl:: Bundle = [org.glassfish.main.admingui.console-common-full-plugin [238]], State = [NEW],1511516330)
proxiable=null
proxyForSameScope=null
analysisName=null
id=79
locatorId=0
identityHashCode=1777825289
reified=false)
at org.jvnet.hk2.internal.ServiceLocatorImpl.loadClass(ServiceLocatorImpl.java:2263)
at org.jvnet.hk2.internal.ServiceLocatorImpl.reifyDescriptor(ServiceLocatorImpl.java:433)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2067)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:67)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getAllServices(ServiceLocatorImpl.java:852)
at com.sun.enterprise.v3.server.ClassLoaderHierarchyImpl.createApplicationParentCL(ClassLoaderHierarchyImpl.java:179)
at org.glassfish.deployment.common.DeploymentContextImpl.createClassLoader(DeploymentContextImpl.java:222)
at org.glassfish.deployment.common.DeploymentContextImpl.createDeploymentClassLoader(DeploymentContextImpl.java:205)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:345)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:382)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:188)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:77)
]]
[2022-02-06T13:23:50.889+0100] [glassfish 7.0] [SEVERE] [NCLS-CORE-00041] [jakarta.enterprise.system.core] [tid: _ThreadID=125 _ThreadName=Thread-28] [timeMillis: 1644150230889] [levelValue: 1000] [[
Application deployment failed: Exception while deploying the app [__admingui]]]
Steps to reproduce
wget -nc https://ci.eclipse.org/glassfish/view/GlassFish/job/glassfish_build-and-test-using-jenkinsfile/job/master/611/artifact/bundles/glassfish.zip
unzip glassfish.zip
cd glassfish7/glassfish
./bin/asadmin start-domain
curl http://localhost:4848 & tail -f domains/domain1/logs/server.log # interrupt once done
./bin/asadmin stop-domain
Impact of Issue
Admin GUI is not usable.
This is indeed the case. The Admin GUI, being based on JSF Template/Woodstock is not compatible with Faces 4.0.
We likely have to deliver GlassFish 7 without the admin console. I tried to find sponsors, but either people don't understand the issue, or when they do they say to just deliver indeed with the admin console.
The Admin GUI, being based on JSF Template/Woodstock is not compatible with Faces 4.0.
@arjantijms Do you have any clues as to what kind of JSF specification changes are affecting it?
Do you have any clues as to what kind of JSF specification changes are affecting it?
It's mainly the removal of a lot of deprecated features I guess.
The issue is also reproducible with glassfish7 M3 release.
The issue is also reproducible with glassfish7 M3 release.
That's correct indeed.
Now the access to the admin console is successful, but it keeps loading...
in the server log, I get the following error:
[2022-03-27T19:34:00.423+0900] [glassfish 7.0] [SEVERE] [NCLS-CORE-00026] [jakarta.enter
prise.system.core] [tid: _ThreadID=116 _ThreadName=Thread-25] [timeMillis: 1648377240423
] [levelValue: 1000] [[
Exception during lifecycle processing
com.sun.enterprise.module.ResolveError: Not able to locate a unique module by name org.glassfish.jakarta.el
at com.sun.enterprise.v3.server.ClassLoaderHierarchyImpl.createApplicationParentCL(ClassLoaderHierarchyImpl.java:149)
at org.glassfish.deployment.common.DeploymentContextImpl.createClassLoader(DeploymentContextImpl.java:222)
at org.glassfish.deployment.common.DeploymentContextImpl.createDeploymentClassLoader(DeploymentContextImpl.java:205)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:345)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:382)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:188)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:
77)
]]
it seems necessary to update the following manifest to the latest state https://github.com/eclipse-ee4j/glassfish/blob/2e3d8d54c03f3711455fd9691a35a86ed7b79b04/appserver/admingui/war/pom.xml#L133-L136
Can we perform all operations of Admin Console (https://localhost:4848) either using GlassFish REST Interface (http://localhost:4848/management/domain) or commandline (via asadmin command) ?
Can we perform all operations of Admin Console (https://localhost:4848/) either using GlassFish REST Interface (http://localhost:4848/management/domain) or commandline (via asadmin command) ?
AFAIK, asadmin command basically covers all operations. The GlassFish REST Interface is also enabled, but the interface specification is not public now, so it is currently difficult to use it outside of getting the server's parameter settings...
I am trying to migrate woodstock and jsftemplating to JFS4 but having difficulty with JSP de-support (such as UIComponentELTag, FACES-1546) and migration local EL API to Jakarta EL API (FACES-1548). Now I am looking for migration tips.
@hs536 that's a very brave attempt!
Current Status
- Build each project with EE10 APIs: Done
- Deploy __admingui without error: Done
- Resolve osgi error: Done
- View login page: Error
Steps to reproduce
- Build woodstock
git clone -b glassfish#23782 --single-branch https://github.com/hs536/glassfish-woodstock
cd glassfish-woodstock
mvn clean install
- Build jsftemplate
git clone -b glassfish#23782 --single-branch https://github.com/hs536/glassfish-jsftemplating
cd glassfish-jsftemplating
mvn clean install
-
~~Build jsonp~~
-
Build glassfish
git clone -b glassfish#23782 --single-branch https://github.com/hs536/glassfish
cd glassfish
mvn clean install -Pfast
- setup glassfish
unzip appserver/distributions/glassfish/target/glassfish.zip
cd glassfish7/glassfish/
asadmin start-domain
asadmin change-admin-password
asadmin enable-secure-admin
asadmin restart-domain
Then, accessing the management console, the following error is output to server.log. It appears that this is still missing changes related to the migration of ManagedBean to CDI beans for admingui.
[2022-04-17T17:45:04.210+0900] [glassfish 7.0] [SEVERE] [] [jakarta.enterprise.resource.webcontainer.faces.config] [tid: _ThreadID=117 _ThreadName=Thread-25] [timeMillis: 1650185104210] [levelValue: 1000] [[
Critical error during deployment:
java.lang.IllegalStateException: CDI is not available
at com.sun.faces.util.Util.getCdiBeanManager(Util.java:1493)
at com.sun.faces.el.ELUtils.addCDIELResolver(ELUtils.java:192)
at com.sun.faces.el.ELUtils.buildFacesResolver(ELUtils.java:164)
at com.sun.faces.application.ApplicationAssociate.initializeELResolverChains(ApplicationAssociate.java:416)
at com.sun.faces.application.applicationimpl.ExpressionLanguage.performOneTimeELInitialization(ExpressionLanguage.java:144)
at com.sun.faces.application.applicationimpl.ExpressionLanguage.getELResolver(ExpressionLanguage.java:89)
at com.sun.faces.application.ApplicationImpl.getELResolver(ApplicationImpl.java:200)
at com.sun.faces.el.ELContextImpl.<init>(ELContextImpl.java:60)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:202)
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:5051)
at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:563)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5627)
at com.sun.enterprise.web.WebModule.start(WebModule.java:511)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:877)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:860)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:644)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2021)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1667)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:82)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:98)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:267)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:328)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:480)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:382)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:188)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:77)
]]
Amazing work!
java.lang.IllegalStateException: CDI is not available
Could this perhaps be related to CDI now needing a beans.xml with scanning set to all? A lot of tests in GF were tripping on exactly this issue too.
Hi, I tried to continue and I got a bit further -- now it fails loading the tree :-) It is work in progress, some commits add debugging outputs.
Code
https://github.com/aubi/glassfish-jsftemplating/commits/upgrade-to-faces-4 (pageSession should return the map, not an element from it) https://github.com/aubi/patched-src-glassfish-woodstock/commits/FISH-6085-upgrade-to-faces-4 (removed logging of base as one of its value is recursive -> StackOverflow) https://github.com/aubi/Payara/tree/FISH-6347-fix-admin-gui (solves the CDI, must be loaded manually as admin gui is not a normal app, beans.xml doesn't help)
Results
login.jsf
This code is perfomed properly:
setPageSessionAttribute(key="byPassLogin" value="false");
if ("$pageSession{loginUser}") {
setPageSessionAttribute(key="byPassLogin" value="true");
}
pageSession.byPassLogin is set to true
But later
if (#{byPassLogin}) {
it is not recognized and ends in if() {
I tried also
if (#{pageSession.byPassLogin}) {
This is obviously executed by Expressly, which knows nothing about pageSession.
I think, that the execution in the second part must go through admin gui evaluation, not Expressly.
Nevertheless, it is possible to enter "admin" without password and get logged in, which then fails during initialization of the left Tree, complaining about pageSession.
I think I found a solution to this problem. But I need more time to test it. Its based on @hs536 and @aubi work
The current state of the branches is:
- it passes Login
- shows majority of admingui (GET requests, parsing parameters from url)
Current problem:
- restore view doesn't work, POST requests depend on it, the jsftemplating is based on JSP evaluation and behaviour, which no more exists in Mojarra. I'm trying to ping JDBC connection pool, it crashes in beforeCreate event -- it shouldn't be called at all).
Remainder, branches: https://github.com/aubi/glassfish-jsftemplating/commits/upgrade-to-faces-4 https://github.com/aubi/patched-src-glassfish-woodstock/commits/FISH-6085-upgrade-to-faces-4 https://github.com/aubi/Payara/tree/FISH-6347-fix-admin-gui
@aubi In your branches, did you include the changes @hs536 ?
Maybe it's an idea to make WIP branches in the Woodstock and JsfTemplate projects and merge all we have to that. That way we have a common base to work from.
Yeah, then we could work together as a team, even with some temporal snapshot dependencies ;)
@arjantijms Yes, I started from the most stable of his branches, glassfish#23782 :-)

By Woodstock project you mean https://github.com/eclipse-ee4j/glassfish-woodstock, right? Payara uses patched project. Yes, I can move my changes there.
The Administration console of M8 build still does not work. (JDK 11, Mac OS)
[2022-09-28T19:29:43.155900+02:00] [GlassFish 7.0] [SEVERE] [NCLS-CORE-00026] [jakarta.enterprise.system.core] [tid: _ThreadID=135 _ThreadName=Thread-23] [levelValue: 1000] [[
Exception during lifecycle processing
com.sun.enterprise.module.ResolveError: Not able to locate a unique module by name org.glassfish.jakarta.el
at com.sun.enterprise.v3.server.ClassLoaderHierarchyImpl.createApplicationParentCL(ClassLoaderHierarchyImpl.java:149)
at org.glassfish.deployment.common.DeploymentContextImpl.createClassLoader(DeploymentContextImpl.java:229)
at org.glassfish.deployment.common.DeploymentContextImpl.createDeploymentClassLoader(DeploymentContextImpl.java:213)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:401)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:382)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:188)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:77)
]]
[2022-09-28T19:29:43.158515+02:00] [GlassFish 7.0] [SEVERE] [NCLS-CORE-00041] [jakarta.enterprise.system.core] [tid: _ThreadID=135 _ThreadName=Thread-23] [levelValue: 1000] [[
Application deployment failed: Exception while deploying the app [__admingui]]]
The Administration console of M8 build still does not work. (JDK 11, Mac OS)
That's why is this issue still open ;)
@arjantijms @dmatej @aubi
Maybe it's an idea to make WIP branches in the Woodstock and JsfTemplate projects and merge all we have to that. That way we have a common base to work from.
+1
Woodstock and JsfTemplate projects have not had any changes since the next version was prepared, so we can merge them into master branch, I think. GlassFish admingui module also needs to be fixed, but it will need a WIP branch.
@aubi I creates to "faces4" branches in the jsftemplate and Woodstock projects. Can you push your changes to there?
See
- https://github.com/eclipse-ee4j/glassfish-jsftemplating/tree/faces4
- https://github.com/eclipse-ee4j/glassfish-woodstock/tree/faces4
@arjantijms I need one or two weeks for complete my experiments and do some code cleanup, then I can submit my draft
So, first part, jsftemplating, is done.
https://github.com/avpinchuk/glassfish-jsftemplating/commits/ccx-faces4
Part 2 of 3, woodstock
https://github.com/avpinchuk/glassfish-woodstock/commits/ccx-faces4
Last part, GlassFish
https://github.com/avpinchuk/glassfish/commits/ccx-fix-admingui
Yesterday I have created a WIP branch admingui7.
I tried out the admingui7 branch and it seems that the Admin Console works, at least with the basic scenarios I tried (deploy an app, modify HTTP and Logger config, add password to admin, log in with a password). I fixed a few issues that I discovered with separate PRs into the admingui7 branch.
A lot of thanks to you, @avpinchuk, you deserve a mention and thanks in the release notes once GF 7 is released!
Thanks a lot to everyone involved, amazing work! I'l close this as fixed now.