Class bytes found but defineClass()failed for error when deploying EAR

拟墨画扇 提交于 2019-12-01 02:52:26

This is here, because this was a hard thing to find on the internet.

I figured it out, the project was getting compiled with JDK 1.7 and the Weblogic server has 1.6 installed.

I recompiled the project with JDK 1.6 and it is working now!

Problem:

Compiling code with JDK 1.7 Running code with Weblogic server with JDK 1.6

Solution 1: Compile code with JDK 1.6

Solution 2: Run weblogic server with JDK 1.7

Update (Middleware)\user_projects\domains(DomainName)\bin\setDomainEnv.cmd (Windows)

Update (Middleware)\user_projects\domains(DomainName)\bin\setDomainEnv.sh (*nix)

set SUN_JAVA_HOME= JDK 1.7 path (e.g C:\Program Files\Java\jdk1.7.0_79)

set JAVA_HOME= JDK 1.7 path (e.g C:\Program Files\Java\jdk1.7.0_79)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!