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

十年热恋 提交于 2019-11-30 22:36:27

问题


I am trying to deploy and old code base with EJB 1.1 stuff to Weblogic 10.3.6 and keep getting this strange error Class bytes found but defineClass()failed for.

The classes are there and being found what is causing this?


回答1:


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!




回答2:


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)



来源:https://stackoverflow.com/questions/23771470/class-bytes-found-but-defineclassfailed-for-error-when-deploying-ear

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