Bug 572808

Summary: org.aspectj.util.LangUtil has reference outside java.base
Product: [Tools] AspectJ Reporter: Tuomas Kiviaho <tuomas.kiviaho>
Component: RuntimeAssignee: aspectj inbox <aspectj-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: Alexander
Version: 1.9.5   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:

Description Tuomas Kiviaho CLA 2021-04-13 10:06:46 EDT
I bumped into...

Caused by: java.lang.NoClassDefFoundError: java/sql/SQLException
        at org.aspectj.bridge.MessageUtil$KindSelector.<init>(MessageUtil.java:559)
        at org.aspectj.bridge.MessageUtil$KindSelector.<init>(MessageUtil.java:553)
        at org.aspectj.bridge.MessageUtil$KindSelector.<init>(MessageUtil.java:549)
        at org.aspectj.bridge.MessageUtil.<clinit>(MessageUtil.java:528)
        at org.aspectj.weaver.tools.WeavingAdaptor.info(WeavingAdaptor.java:620)
        at org.aspectj.weaver.tools.WeavingAdaptor.createMessageHandler(WeavingAdaptor.java:242)

...because the org.aspectj.util.LangUtil has a dependency to java.sql module.

Could this reference be retrofitted so that one could use the runtime just with java.base.
Comment 1 Alexander Kriegisch CLA 2021-06-08 06:45:55 EDT
I have never seen this before, so would you please do the following:

1. Create a minimal example in order to reproduce the error. See https://stackoverflow.com/help/mcve for what I mean. We need code (full, not just snippets), ideally a Maven build configuration or other instructions about how you build your sample project, version information about JDK and AspectJ version, description about how you use weaving and what else might be important to know in order to reproduce the issue.

2. Because you basically have to recreate the question anyway, because here there is not enough detail and Bugzilla is deprecated in favour of GitHub, simply create a new issue on https://github.com/eclipse/org.aspectj/issues. You may link to this issue here for reference, so we can close it and collaborate with you in a more confortable environment in order to resolve this issue, if it is indeed an AspectJ problem.