Sunday, January 29, 2012

WebLogic Error: java.lang.ClassNotFoundException: oracle.security.jps.wls.listeners.JpsApplicationLifecycleListener

If I try to deploy an EJB service application on WebLogic 10.3, I get following error message.
java.lang.ClassNotFoundException: oracle.security.jps.wls.listeners.JpsApplicationLifecycleListener
Reason: JDeveloper deployment wizard assumes any EJB application will have jsp pages so it adds JSP listeners declaration. But if we do not use jsp then we don't need the ADF faces libraries integrated.
Here is the solution of this problem.
Modify following xml file inside the EAR archive using archive manager.
/META-INF/weblogic-application.xml
Remove following declarations from the xml.
<listener>
    <listener-class>oracle.security.jps.wls.listeners.JpsApplicationLifecycleListener</listener-class>
</listener>
<listener>
    <listener-class>oracle.security.jps.wls.listeners.JpsAppVersionLifecycleListener</listener-class>
</listener>

3 comments:

سام said...

Dear Monzurl
Thanks for the very good information you post in this Blogger, I am facing the same problem on Jdevloper 11.1.2.1.0 ,searching the xml files for this class could not return any result , so if you have information about this version it will be very kind to help me
Sami

afarag said...

I faced the same problem and i solved it by editing EAR Deployment profile, then focus on application descriptor then filters and unselect all items in under META-INF Folder.

Ron HD said...

Your reason for the error is wrong: Jps has nothing to do with JSP. It is part of Weblogic's OPSS (Oracle Platform Security Services).

When using the Credential Store Framework (and possibly for other parts of OPSS), JDeveloper generates this erroneous ... entry in the deployed EAR file's META-INF/weblogic-application.xml.

But your solution works. Thanks for that.

Note that you may not even have a weblogic-application.xml in your source (I didn't). JDev creates it behind the scenes.