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

#3028 Add shaded javassist package to osgi.export #3031

Merged
merged 1 commit into from
Dec 5, 2023
Merged

#3028 Add shaded javassist package to osgi.export #3031

merged 1 commit into from
Dec 5, 2023

Conversation

mpiggott
Copy link
Contributor

@mpiggott mpiggott commented Dec 5, 2023

#3028 NoClassDefFoundExceptions on Java 11 with OSGi

On Java 11 using Karaf with Felix when enhancing classes users need access to:

  • org.apache.ibatis.executor.loader.WriteReplaceInterface
  • org.apache.ibatis.javassist.util.proxy.ProxyObject

In the current build the bnd-maven-plugin is executed before shading thus the Javassist classes don't exist and aren't exported. In my local build bnd passed with this addition and I was able to use the SNAPSHOT bundle in my application successfully

@hazendaz hazendaz self-assigned this Dec 5, 2023
@hazendaz
Copy link
Member

hazendaz commented Dec 5, 2023

@mpiggott Would it be better if we got the order of plugins running correctly? Doing so is relatively easy. We would need a dummy place holder for the plugin in the build pom commented as to why we redefined it (assuming its not defined now) and for that to be listed after shade. My gut tells me the order issue is due to our parent and how maven resolves things. I'm fine either way just wondered if that would be more direct fix.

@coveralls
Copy link

Coverage Status

coverage: 86.597% (-0.009%) from 86.606%
when pulling 7bbf191 on mpiggott:master
into 5eefb8c on mybatis:master.

@mpiggott
Copy link
Contributor Author

mpiggott commented Dec 5, 2023

@hazendaz both plugins appear to be bound by default to the package phase. I don't recall how maven chooses the order so I tried locally ensuring the defined order in the pom was shade -> bnd but the result was the same. There is a PREPARE_PACKAGE phase also but I'm not sure whether that ends up conflicting with other plugins.

@hazendaz
Copy link
Member

hazendaz commented Dec 5, 2023

Hi @mpiggott thanks, glad that you tried that at least. I would have expected it to change but it does get messy with a parent pom, plugin management, etc. Will go ahead and take this change. We are working on a few other things with our build process in general so not sure on ETA on release as we had just done one but will discuss with team and let you know.

@hazendaz hazendaz merged commit 7d38ce2 into mybatis:master Dec 5, 2023
13 of 14 checks passed
@hazendaz
Copy link
Member

hazendaz commented Dec 5, 2023

I am surprised ognl doesn't have same issue here since we shade that too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants