payara 5.2020.7 + org.osgi.framework.BundleException: Unable to resolve

708 views
Skip to first unread message

madalin cosma

unread,
Mar 3, 2021, 5:53:07 AM3/3/21
to Payara Forum
Hi,

I have a strange issue that follows the cycle
a. install payara on windows
b. start it and it works as expected both for default domain1, but also for a newly configured domain that i use
c. after sometimes/somedays and several start/stops I get a strange error (will list it below) and from now it will not start for either domains
d. this heppens each and every time, i tried even to detele the folder and start from scratch; what works so far is using another payara version

It happened for 2020.5 then 2020.6 and now 2020.7. I suspect is something related to some osgi cache and osgi-payara versions, but unable to locate or fix the problem.

Payara running on Wins 10 + WSL 2 + openjdk1.8.0_222

My option now is to use payara 5.2021.1, but I would rather fix the actual problem since I don't know much it will take until it breaks again.

./asadmin start-domain

Console output:
Waiting for domain1 to start ......................................................................Error starting domain
domain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:

Launching Payara Server on Felix platform
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime@5798244d in service registry.
Completed shutdown of GlassFish runtime
We are in non-embedded mode, so fish.payara.server.internal.core.glassfish [113] has nothing to do.
Mar 03, 2021 12:19:12 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner createBundleProvisioner
INFO: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.
Exception in thread "main" java.lang.reflect.InvocationTargetException
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:498)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:109)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
Caused by: A MultiException has 2 exceptions. They are:
1. com.sun.enterprise.module.ResolveError: Failed to start OSGiModuleImpl:: Bundle = [fish.payara.server.internal.batch.
glassfish-batch-connector [102]], State = [NEW]
2. java.lang.IllegalStateException: Could not load descriptor SystemDescriptor(
implementation=org.glassfish.batch.spi.impl.BatchRuntimeConfigurationInjector
name=batch-runtime-configuration
contracts={org.glassfish.batch.spi.impl.BatchRuntimeConfigurationInjector,org.jvnet.hk2.config.ConfigInjector}
scope=javax.inject.Singleton
qualifiers={org.jvnet.hk2.config.InjectionTarget}
descriptorType=CLASS
descriptorVisibility=NORMAL
metadata=@table-suffix={optional,default\:,datatype\:java.lang.String,leaf},@data-source-lookup-name={optional,d
atatype\:java.lang.String,leaf},@table-prefix={optional,default\:,datatype\:java.lang.String,leaf},@schema-name={optiona
l,default\:APP,datatype\:java.lang.String,leaf},@executor-service-lookup-name={optional,default\:concurrent/__defaultMan
agedExecutorService,datatype\:java.lang.String,leaf},target={org.glassfish.batch.spi.impl.BatchRuntimeConfiguration},Bun
dle-SymbolicName={fish.payara.server.internal.batch.glassfish-batch-connector},Bundle-Version={5.2020.7}
rank=0
loader=OsgiPopulatorPostProcessor.HK2Loader(OSGiModuleImpl:: Bundle = [fish.payara.server.internal.batch.glassfi
sh-batch-connector [102]], State = [NEW],386478079)
proxiable=null
proxyForSameScope=null
analysisName=null
id=26
locatorId=0
identityHashCode=555864569
reified=false)

at org.jvnet.hk2.internal.ServiceLocatorImpl.loadClass(ServiceLocatorImpl.java:2247)
at org.jvnet.hk2.internal.ServiceLocatorImpl.reifyDescriptor(ServiceLocatorImpl.java:438)
at org.jvnet.hk2.internal.ServiceLocatorImpl.reifyDescriptor(ServiceLocatorImpl.java:457)
at org.jvnet.hk2.config.DomDocument$InjectionTargetFilter.matches(DomDocument.java:184)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getDescriptors(ServiceLocatorImpl.java:347)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getDescriptors(ServiceLocatorImpl.java:389)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getBestDescriptor(ServiceLocatorImpl.java:397)
at org.jvnet.hk2.config.DomDocument.buildModel(DomDocument.java:135)
at org.jvnet.hk2.config.ConfigModel.parseValue(ConfigModel.java:959)
at org.jvnet.hk2.config.ConfigModel.<init>(ConfigModel.java:875)
at org.jvnet.hk2.config.DomDocument.buildModel(DomDocument.java:114)
at org.jvnet.hk2.config.DomDocument.getModelByElementName(DomDocument.java:162)
at org.jvnet.hk2.config.ConfigParser.handleElement(ConfigParser.java:165)
at org.jvnet.hk2.config.ConfigParser.parse(ConfigParser.java:101)
at org.jvnet.hk2.config.ConfigParser.parse(ConfigParser.java:95)
at org.glassfish.config.support.DomainXml.parseDomainXml(DomainXml.java:271)
at org.glassfish.config.support.DomainXml.run(DomainXml.java:121)
at org.jvnet.hk2.config.ConfigurationPopulator.populateConfig(ConfigurationPopulator.java:58)
at org.glassfish.hk2.bootstrap.HK2Populator.populateConfig(HK2Populator.java:83)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.populateConfig(AbstractModulesRegistryImpl.
java:190)
at com.sun.enterprise.module.bootstrap.Main.createServiceLocator(Main.java:249)
at org.jvnet.hk2.osgiadapter.HK2Main.createServiceLocator(HK2Main.java:95)
at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime.newGlassFish(EmbeddedOSGiGlassFishRu
ntime.java:95)
at com.sun.enterprise.glassfish.bootstrap.GlassFishRuntimeDecorator.newGlassFish(GlassFishRuntimeDecorator.java:
68)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntime.newGlassFish(OSGiGlassFishRuntime.java:91)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:125)
... 6 more
Caused by: com.sun.enterprise.module.ResolveError: Failed to start OSGiModuleImpl:: Bundle = [fish.payara.server.interna
l.batch.glassfish-batch-connector [102]], 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:2239)
... 31 more
Caused by: org.osgi.framework.BundleException: Unable to resolve fish.payara.server.internal.batch.glassfish-batch-conne
ctor [102](R 102.0): missing requirement [fish.payara.server.internal.batch.glassfish-batch-connector [102](R 102.0)] os
gi.wiring.package; (osgi.wiring.package=com.ibm.jbatch.spi) [caused by: Unable to resolve fish.payara.server.internal.ba
tch.payara-jbatch [315](R 315.0): missing requirement [fish.payara.server.internal.batch.payara-jbatch [315](R 315.0)] o
sgi.wiring.package; (osgi.wiring.package=org.glassfish.weld) [caused by: Unable to resolve fish.payara.server.internal.w
eb.weld-integration [376](R 376.0): missing requirement [fish.payara.server.internal.web.weld-integration [376](R 376.0)
] osgi.wiring.package; (&(osgi.wiring.package=org.glassfish.web.deployment.descriptor)(version>=5.2020.0)(!(version>=6.0
.0))) [caused by: Unable to resolve fish.payara.server.internal.web.glue [364](R 364.0): missing requirement [fish.payar
a.server.internal.web.glue [364](R 364.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.catalina)(version>=5.2
020.0)(!(version>=6.0.0))) [caused by: Unable to resolve fish.payara.server.internal.web.core [362](R 362.0): missing re
quirement [fish.payara.server.internal.web.core [362](R 362.0)] osgi.wiring.package; (&(osgi.wiring.package=org.glassfis
h.web.loader)(version>=5.2020.0)(!(version>=6.0.0)))]]]] Unresolved requirements: [[fish.payara.server.internal.batch.gl
assfish-batch-connector [102](R 102.0)] osgi.wiring.package; (osgi.wiring.package=com.ibm.jbatch.spi)]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4368)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2281)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)
at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.startBundle(OSGiModuleImpl.java:227)
at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:185)
... 33 more

Command start-domain failed.

David Sharpe

unread,
Mar 3, 2021, 11:37:35 AM3/3/21
to madalin cosma, Payara Forum
When you say "Wins 10 + WSL 2 + openjdk1.8.0_222" do you mean that you're starting Payara from inside WSL/Ubuntu or whatever? I don't have much experience with WSL, so I'm not sure what this means. I wonder if that configuration would cause issues though. I've heard WSL is great, but I would stick to using the Windows batch scripts to run Payara on Windows...

--
You received this message because you are subscribed to the Google Groups "Payara Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to payara-forum...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/payara-forum/ea3ed141-2069-4635-a33c-d0b3223eebcan%40googlegroups.com.

madalin cosma

unread,
Mar 3, 2021, 4:03:08 PM3/3/21
to Payara Forum
Hi,

same thing happened actually from Windows. I actually got same thing with payara 5.2020.5 running with jdk1.8.0_271 directly in Win10. It worked at the beginning and at some pointed it stopped and I got the very same error.
I just don't understand if this is a osgi/felix problem or just a "fish.payara.server.internal.batch.glassfi
sh-batch-connector".

When it's working I can run it either Windows 10 directly or via WSL2. I tend to use it via WSL2 for some specific reasons. And when it's not working, it's not working from either way.


./asadmin.bat start-domain
Waiting for domain1 to start .............................Error starting domain domain1.

The server exited prematurely with exit code 1.
Before it died, it produced the following output:

Launching Payara Server on Felix platform
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime@404afd33 in service registry.

Completed shutdown of GlassFish runtime
We are in non-embedded mode, so fish.payara.server.internal.core.glassfish [113] has nothing to do.
Mar 03, 2021 11:02:41 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner createBundleProvisioner
sh-batch-connector [102]], State = [NEW],1785111044)

proxiable=null
proxyForSameScope=null
analysisName=null
id=26
locatorId=0
identityHashCode=1482748887

madalin cosma

unread,
Mar 5, 2021, 7:19:03 AM3/5/21
to Payara Forum

Anybody?

I am kind of stuck here :-(

Christoph John

unread,
Mar 5, 2021, 7:33:39 AM3/5/21
to Payara Forum
This looks like a bug I've opened some time ago. At least part of the stack trace looks similar. The problem did not occur for me when using OpenJDK11.

Cheers,
Chris.

madalin cosma

unread,
Mar 5, 2021, 9:28:57 AM3/5/21
to Payara Forum
OK!
It must be something else since I get each and every single time once it happens. As I have said before, the server works ok several times before the problem appears and after that I wasn't able to start it correctly not even once.
So it's working for a while until it's not working anymore on JDK 8. It's not a on and eff startup problem. And the server does not need to have something deployed to still happen.

Christoph John

unread,
Mar 5, 2021, 9:42:12 AM3/5/21
to Payara Forum

So you did try with OpenJDK11?

Chris.

madalin cosma

unread,
Mar 9, 2021, 5:16:21 AM3/9/21
to Payara Forum
Hi! 
I have been away for a few days. I have tried it now with jdk15 and a fresh installed/unzipped jdk11. Same result straight out of Win10 cmd line.
A nightmare!

jdk11 logs
====
Launching Payara Server on Felix platform
mar. 09, 2021 12:14:41 P.M. com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner createBundleProvisioner
INFO: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime@710895c8 in service registry.
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:109)
        at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
Caused by: A MultiException has 2 exceptions.  They are:
1. com.sun.enterprise.module.ResolveError: Failed to start OSGiModuleImpl:: Bundle = [fish.payara.server.internal.batch.glassfish-batch-connector [102]], State = [NEW]
2. java.lang.IllegalStateException: Could not load descriptor SystemDescriptor(
        implementation=org.glassfish.batch.spi.impl.BatchRuntimeConfigurationInjector
        name=batch-runtime-configuration
        contracts={org.glassfish.batch.spi.impl.BatchRuntimeConfigurationInjector,org.jvnet.hk2.config.ConfigInjector}
        scope=javax.inject.Singleton
        qualifiers={org.jvnet.hk2.config.InjectionTarget}
        descriptorType=CLASS
        descriptorVisibility=NORMAL
        metadata=@table-suffix={optional,default\:,datatype\:java.lang.String,leaf},@data-source-lookup-name={optional,datatype\:java.lang.String,leaf},@table-prefix={optional,default\:,datatype\:java.lang.String,leaf},@schema-name={optional,default\:APP,datatype\:java.lang.String,leaf},@executor-service-lookup-name={optional,default\:concurrent/__defaultManagedExecutorService,datatype\:java.lang.String,leaf},target={org.glassfish.batch.spi.impl.BatchRuntimeConfiguration},Bundle-SymbolicName={fish.payara.server.internal.batch.glassfish-batch-connector},Bundle-Version={5.2020.7}
        rank=0
        loader=OsgiPopulatorPostProcessor.HK2Loader(OSGiModuleImpl:: Bundle = [fish.payara.server.internal.batch.glassfish-batch-connector [102]], State = [NEW],1835841364)
        proxiable=null
        proxyForSameScope=null
        analysisName=null
        id=26
        locatorId=0
        identityHashCode=1803361784
        reified=false)

        at org.jvnet.hk2.internal.ServiceLocatorImpl.loadClass(ServiceLocatorImpl.java:2247)
        at org.jvnet.hk2.internal.ServiceLocatorImpl.reifyDescriptor(ServiceLocatorImpl.java:438)
        at org.jvnet.hk2.internal.ServiceLocatorImpl.reifyDescriptor(ServiceLocatorImpl.java:457)
        at org.jvnet.hk2.config.DomDocument$InjectionTargetFilter.matches(DomDocument.java:184)
        at org.jvnet.hk2.internal.ServiceLocatorImpl.getDescriptors(ServiceLocatorImpl.java:347)
        at org.jvnet.hk2.internal.ServiceLocatorImpl.getDescriptors(ServiceLocatorImpl.java:389)
        at org.jvnet.hk2.internal.ServiceLocatorImpl.getBestDescriptor(ServiceLocatorImpl.java:397)
        at org.jvnet.hk2.config.DomDocument.buildModel(DomDocument.java:135)
        at org.jvnet.hk2.config.ConfigModel.parseValue(ConfigModel.java:959)
        at org.jvnet.hk2.config.ConfigModel.<init>(ConfigModel.java:875)
        at org.jvnet.hk2.config.DomDocument.buildModel(DomDocument.java:114)
        at org.jvnet.hk2.config.DomDocument.getModelByElementName(DomDocument.java:162)
        at org.jvnet.hk2.config.ConfigParser.handleElement(ConfigParser.java:165)
        at org.jvnet.hk2.config.ConfigParser.parse(ConfigParser.java:101)
        at org.jvnet.hk2.config.ConfigParser.parse(ConfigParser.java:95)
        at org.glassfish.config.support.DomainXml.parseDomainXml(DomainXml.java:271)
        at org.glassfish.config.support.DomainXml.run(DomainXml.java:121)
        at org.jvnet.hk2.config.ConfigurationPopulator.populateConfig(ConfigurationPopulator.java:58)
        at org.glassfish.hk2.bootstrap.HK2Populator.populateConfig(HK2Populator.java:83)
        at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.populateConfig(AbstractModulesRegistryImpl.java:190)
        at com.sun.enterprise.module.bootstrap.Main.createServiceLocator(Main.java:249)
        at org.jvnet.hk2.osgiadapter.HK2Main.createServiceLocator(HK2Main.java:95)
        at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime.newGlassFish(EmbeddedOSGiGlassFishRuntime.java:95)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishRuntimeDecorator.newGlassFish(GlassFishRuntimeDecorator.java:68)
        at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntime.newGlassFish(OSGiGlassFishRuntime.java:91)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:125)
        ... 6 more
Caused by: com.sun.enterprise.module.ResolveError: Failed to start OSGiModuleImpl:: Bundle = [fish.payara.server.internal.batch.glassfish-batch-connector [102]], 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:2239)
        ... 31 more
Caused by: org.osgi.framework.BundleException: Unable to resolve fish.payara.server.internal.batch.glassfish-batch-connector [102](R 102.0): missing requirement [fish.payara.server.internal.batch.glassfish-batch-connector [102](R 102.0)] osgi.wiring.package; (osgi.wiring.package=com.ibm.jbatch.spi) [caused by: Unable to resolve fish.payara.server.internal.batch.payara-jbatch [315](R 315.0): missing requirement [fish.payara.server.internal.batch.payara-jbatch [315](R 315.0)] osgi.wiring.package; (osgi.wiring.package=org.glassfish.weld) [caused by: Unable to resolve fish.payara.server.internal.web.weld-integration [376](R 376.0): missing requirement [fish.payara.server.internal.web.weld-integration [376](R 376.0)] osgi.wiring.package; (&(osgi.wiring.package=org.glassfish.web.deployment.descriptor)(version>=5.2020.0)(!(version>=6.0.0))) [caused by: Unable to resolve fish.payara.server.internal.web.glue [364](R 364.0): missing requirement [fish.payara.server.internal.web.glue [364](R 364.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.catalina)(version>=5.2020.0)(!(version>=6.0.0))) [caused by: Unable to resolve fish.payara.server.internal.web.core [362](R 362.0): missing requirement [fish.payara.server.internal.web.core [362](R 362.0)] osgi.wiring.package; (&(osgi.wiring.package=org.glassfish.web.loader)(version>=5.2020.0)(!(version>=6.0.0)))]]]] Unresolved requirements: [[fish.payara.server.internal.batch.glassfish-batch-connector [102](R 102.0)] osgi.wiring.package; (osgi.wiring.package=com.ibm.jbatch.spi)]
        at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4368)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2281)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)
        at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.startBundle(OSGiModuleImpl.java:227)
        at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:185)
        ... 33 more
Completed shutdown of GlassFish runtime
We are in non-embedded mode, so fish.payara.server.internal.core.glassfish [113] has nothing to do.
Command start-domain failed.
The DAS was stopped.

Rudy De Busscher

unread,
Mar 11, 2021, 11:32:06 AM3/11/21
to Payara Forum
Be aware that Payara Server only runs on JDK 8 and JDK 11. So when you try with JDK 15 failures are expected. Also having both JDK 11 and JDK 15 needs correct settings of the environment so that nothing from the JDK 15 can be picked up (check Java home, path, and glassfish\config\asenv.bat file)

Rudy

madalin cosma

unread,
Mar 13, 2021, 4:36:30 PM3/13/21
to Payara Forum
Hi,
I have JDK 8, 11 and 15 and my initial report was on JDK8.
AS_JAVA was set accordingly!

Reply all
Reply to author
Forward
0 new messages