Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thin utility for SpringBoot 3 feature install causes NoClassDef #26357

Closed
cbridgha opened this issue Sep 21, 2023 · 2 comments
Closed

Thin utility for SpringBoot 3 feature install causes NoClassDef #26357

cbridgha opened this issue Sep 21, 2023 · 2 comments
Labels
release bug This bug is present in a released version of Open Liberty release:230010

Comments

@cbridgha
Copy link
Member

Describe the bug
When SpringBoot 3 feature is installed from a smaller package like kernel.. Its possible a jar used by the thin utility (ws-springbootutil.jar) won't be present, and will result in a NoClassDef exception thrown.

java.lang.NoClassDefFoundError: com/ibm/ws/app/manager/springboot/util/SpringBootThinUtil
	at com.ibm.ws.springboot.utility.tasks.ThinAppTask.performThinTask(ThinAppTask.java:151)
	at com.ibm.ws.springboot.utility.tasks.ThinAppTask.handleTask(ThinAppTask.java:137)
	at com.ibm.ws.springboot.utility.SpringBootUtility.runProgram(SpringBootUtility.java:127)
	at com.ibm.ws.springboot.utility.SpringBootUtility.main(SpringBootUtility.java:157)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at com.ibm.ws.kernel.boot.cmdline.UtilityMain.internal_main(UtilityMain.java:175)
	at com.ibm.ws.kernel.boot.cmdline.UtilityMain.main(UtilityMain.java:55)
	at com.ibm.ws.kernel.boot.cmdline.Main.main(Main.java:54)
Caused by: java.lang.ClassNotFoundException: com.ibm.ws.app.manager.springboot.util.SpringBootThinUtil
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
	at com.ibm.ws.kernel.boot.cmdline.PackageDelegateClassLoader.loadClass(PackageDelegateClassLoader.java:57)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
	... 11 more

Steps to Reproduce
start with a smaller open liberty zip like openliberty-kernel-23.0.0.9.zip. Add the "springBoot-3.0" feature via the featureUtility command

Expected behavior
springbootutil.jar should run as expected with no issues

Diagnostic information:

  • OpenLiberty Version: [23.0.0.9]
  • Affected feature(s) [springBoot-3.0]
@cbridgha cbridgha added the release bug This bug is present in a released version of Open Liberty label Sep 21, 2023
@cbridgha
Copy link
Member Author

Issue caused by: dependent jar listed in the utility MANIFEST.MF is missing because the jar name changes depending on which version of the feature installed, it is either compiled for JavaEE or JakartaEE api's.

@cbridgha
Copy link
Member Author

Fixes #PH57263

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release bug This bug is present in a released version of Open Liberty release:230010
Projects
None yet
Development

No branches or pull requests

1 participant