-
Notifications
You must be signed in to change notification settings - Fork 12.9k
mybatis-3.4.0.jar on IBM's Websphere Application Server 8.5.5.9 #706
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
Comments
Can you please add some more information about the error? For example the error shown in the log during startup? Looks the same error that the one reported here: You will find a workaround there: "Well you are right the issue was around javassist pkg in the mybatis jar file. I just got around the issue by adding the the following entries in META-INFMANIFEST.MF now the app starts up fine with no issues. Manifest-Version: 1.0 Anyway we should need to find the root cause for this. I will open an issue in the shade tracker. |
@moonfruit can you open a ticket to IBM so they can bring more information about why is this happening? |
https://groups.google.com/forum/#!topic/mybatis-user/ZhI4cPe7cq8 |
Sorry, I cannot open a ticket to IBM. |
The exception in this SO question looks very similar. Please try the following command on the mybatis-3.4.0.jar causing the problem. $ javap -classpath PATH_TO/mybatis-3.4.0.jar -v org.apache.ibatis.javassist.ByteArrayClassPath | grep major major version 50 means it's compiled with 1.6 and 52 means 1.8. |
And one more thing. What is your Gradle version? |
@harawata As I say, this one below is the one that I met. And I do not use Gradle... |
So, did you try the javap command and it returned major version 50? |
I use Maven to download the jar from central repository, and DO NOT use Gradle. |
OK...thanks for the answer. :-) By the way, the report on the forum was using Java 8, so it's not exactly the same. |
In another ticket, a user informed me that Javassist 3.20.0-GA is incorrectly built with '-parameters' compiler option. For testing, I have attached a custom version of mybatis 3.4.0 (you must change the extension to .jar after download). FYI, here is how I built it:
|
Good research Iwao!! Looks like using 3.18 instead of 3.20 may fix the problem: @moonfruit please we need a confirmation. update: Looks like current Javassist trunk has already fixed the problem: |
Hi Eduardo, If the fix is verified and we release 3.4.1 soon, I think it's OK to use the custom build of Javassist 3.20.0-GA considering that the difference is just a compiler option and the fix is already committed. Anyway, first thing first, I'll ask the reporter on the forum if he could test the fix. |
Hi, @emacarron and @harawata, I test mybatis 3.4.0 built with javassist 3.18 and mybatis 3.4.0 built with no '-parameters' javassist 3.20, and they both have no problems when I deploy my war with them separately on WAS 8.5.5.9. Thanks for all your work! But I also have to remind you that this issue only happened with relocation javassist. At the very beginning, I test a mybatis 3.4.0 with no javassist built in and a independent javassist 3.20 jar on WAS 8.5.5.9, and it can also work. |
Thanks for checking @moonfruit @harawata agreed. Now we know this is the root cause I am OK with realeasing 3.4.1. There are 7 closed issues (with this one) so it is a good pack. Thank you both for your help! |
Thank you very much for testing!
The stacktrace shows that the RuntimeException is thrown at the following code in ASM. public void visitParameter(String name, int access) {
if (api < Opcodes.ASM5) {
throw new RuntimeException();
}
// ...
} WebSphere evidently uses 👍 for 3.4.1 =D |
Just FYI, this issue is planned to be fixed in WAS 8.5.5.11. |
MyBatis version
3.4.0
Mybatis 3.4.0 use shade to integrate javassist and ognl with relocation.
But when deploy war which has mybatis-3.4.0.jar to IBM's Websphere Application Server 8.5.5.9 (Java 7), the war cannot start because of the relocation of javassist.
Then I create a mybatis-3.4.0.jar without javassist and a independent javassist jar put it to my war. And deploy it to IBM's Websphere Application Server, everything is right.
The text was updated successfully, but these errors were encountered: