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?
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)
来源:https://stackoverflow.com/questions/23771470/class-bytes-found-but-defineclassfailed-for-error-when-deploying-ear