Last update: 4/7/2011
The error log is[11:59:10 AM] Deploying Application... <22 ???? 2011 11:59:20 pµ EEST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1308733152059' for task '0'. Error is: 'java.lang.ClassNotFoundException: javax.faces.context. FacesContextFactory' java.lang.ClassNotFoundException: javax.faces.context.FacesContextFactory at weblogic.utils.classloaders.GenericClassLoader.findLocalClass (GenericClassLoader.java:297) at weblogic.utils.classloaders.GenericClassLoader.findClass (GenericClassLoader.java:270) at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass (ChangeAwareClassLoader.java:64) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) Truncated. see log file for complete stacktrace Caused By: java.lang.ClassNotFoundException: javax.faces.context. FacesContextFactory at weblogic.utils.classloaders.GenericClassLoader.findLocalClass (GenericClassLoader.java:297) at weblogic.utils.classloaders.GenericClassLoader.findClass (GenericClassLoader.java:270) at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass (ChangeAwareClassLoader.java:64) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) Truncated. see log file for complete stacktrace >
Solution:
In the Model project JDeveloper has created files related to ViewController (Web Content/WEB_INF folder with faces-config.xml, trinidad-config.xml and web.xml). If you use a SubVersioning System, it is easy to check because they ll newly created and not added to SVN.
Remove this files/folders.
Maybe you might need to remove the contents of drs folder, too.
That is the folder that JDeveloper delpoys the application in order to run it in the embedded WLS.
It is located under %JDEV_SYSTEM_ROOT%/\o.j2ee
eg
C:\Documents and Settings\user\Application Data\JDeveloper\system11.1.1.4.37.59.23\o.j2ee\drs
Good approach this is too frequent an error now days. just to add java.lang.ClassNotFoundException comes because ClassLoader fails to load the class requested at runtime.This is mostly an environmental issue which depends upon whether request class is present in Classpath or not.to solve this error best approach is to first find the jar file in which problematic class exists and then examine your classpath.also don't confuse this with NoClassDefFoundError which is entirely different , for details see here NoClassDefFoundError vs ClassNotFoundException in Java
ReplyDeleteExactly!
ReplyDeleteIn the case of JDeveloper, while deveoping the wizard "thinks" that the Model project, that your BC are, is a ViewController project and adds the appropriate files. While running the application, server tries to launch the application from the Model project but as you correctly stated, it fails as it does not have the appropriate classes/jars in the classpath.
this has been helpful to me !! thank you so much
ReplyDelete