This discussion is archived
1 2 3 Previous Next 39 Replies Latest reply: Sep 12, 2012 9:02 AM by 961719 RSS

Unable to load JSF2.0 jars on Weblogic Server 10.3.2 start up.

760284 Newbie
Currently Being Moderated
Hi,
I am trying out JSF2.0 extension jars like RichFaces4, primeFaces2.0 in Weblogic11g( 10.3.2) and am running in to jar loading issues. On server start up, weblogic fails to load any of the JSF2.0 extension jars( Primefaces2.0, RichFaces4) etc.
Has anybody else got JSF2.0 working in Weblogic11g ? If "yes", did you face a similar jar loading Issue?
I am seeing the following exception on server startup:
Mar 9, 2010 9:13:28 AM com.sun.faces.config.AnnotationScanner
processClasspath
SEVERE: Unable to process annotations for url,
zip:C:/ORACLE/middleware/user_projects/domains/wls11_admin/servers/AdminServer/tmp/_WL_user/poc/jje3vo/war/WEB-INF/lib/primefaces-2.0.0.jar!/META-INF/faces-config.xml.
Reason: java.io.FileNotFoundException:
zip:C:/ORACLE/middleware/user_projects/domains/wls11_admin/servers/AdminServer/tmp/_WL_user/poc/jje3vo/war/WEB-INF/lib/primefaces-2.0.0.jar

Mar 9, 2010 9:13:28 AM com.sun.faces.config.AnnotationScanner
processClasspath
SEVERE:
java.io.FileNotFoundException:
zip:C:/ORACLE/middleware/user_projects/domains/wls11_admin/servers/AdminServer/tmp/_WL_user/poc/jje3vo/war/WEB-INF/lib/primefaces-2.0.0.jar


at weblogic.utils.zip.ZipURLConnection.connect(Handler.java:78)
at
weblogic.utils.zip.ZipURLConnection.getInputStream(Handler.java:53)
at
sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:195)
at
sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:50)
at
sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:78)
at
sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:104)


at
sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:71)


at
com.sun.faces.config.AnnotationScanner.processClasspath(AnnotationScanner.java:290)


at
com.sun.faces.config.AnnotationScanner.getAnnotatedClasses(AnnotationScanner.java:215)


at
com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:765)


at
com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:736)


at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:329)
at
com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:223)


at
weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)


at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)


at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at
weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)


at
weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1801)


at
weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3045)


at
weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1397)


at
weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)
at
weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)


at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)


at
weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)


at
weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)


at
weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)


at
weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)


at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)


at
weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)


at
weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)


at
weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)


at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)


at
weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)


at
weblogic.application.internal.EarDeployment.activate(EarDeployment.java:54)


at
weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)


at
weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)


at
weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)


at
weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)


at
weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)


at
weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:196)


at
weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)


at
weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)


at
weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)


at
weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)


at
weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)


at
weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)


at
weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
  • 1. Re: Unable to load JSF2.0 jars on Weblogic Server 10.3.2 start up.
    sandeep_singh Pro
    Currently Being Moderated
    Do you have these jars like RichFaces4, primeFaces2.0 in the Weblogic classpath or not?
  • 2. Re: Unable to load JSF2.0 jars on Weblogic Server 10.3.2 start up.
    739896 Guru
    Currently Being Moderated
    Whenever we try to read something(like XML or Properties files) from inside a JAR file like following:

    primefaces-2.0.0.jar!/META-INF/faces-config.xml. which is happening in your case:
    **********************
    SEVERE: Unable to process annotations for url,
    zip:C:/ORACLE/middleware/user_projects/domains/wls11_admin/servers/AdminServer/tmp/_WL_user/poc/jje3vo/war/WEB-INF/lib/primefaces-2.0.0.jar!/META-INF/faces-config.xml.
    Reason: java.io.FileNotFoundException:
    **********************

    We usually fall into this kind of issue...FileNotFound ..I am not sure whether it is wrong implementation of Framework or fault of WebLogic....But i strongly think that it's a Wrong implementation of FRAMEWORK.

    Please refer to : http://jaysensharma.wordpress.com/2009/12/28/_wls_cls_gen-jar-issue/

    What i think is...most of the frameworks do'not implement their code more flexible...and that causes issues in some containers. The above link is not only demonstrates an issue with "_wl_client_gen.jar" rather we can use any Jar file to see this issue...with the option one (Wrong Implementation) code mentioned in above link.
  • 3. Re: Unable to load JSF2.0 jars on Weblogic Server 10.3.2 start up.
    760284 Newbie
    Currently Being Moderated
    RichFaces4, primeFaces2.0 I cannot put in the Global Weblogic Classpath as the weblogic Server is shared by many applications. So I had put these jars under the application specific "WEB-INF/lib" and had clearly told weblogic via its container-descriptor tag IN "WEBLOGIC.XML" as follows:
    <wls:container-descriptor>
         <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
    </wls:container-descriptor>
    I believe this is a Bug within Sun's JSF2.0 Implementation. JSF2.0 fails to read "faces-config.xml" when present within a jar file cleanly.
  • 4. Re: Unable to load JSF2.0 jars on Weblogic Server 10.3.2 start up.
    760284 Newbie
    Currently Being Moderated
    Hi Jay,
    I read your article " http://jaysensharma.wordpress.com/2009/12/28/_wls_cls_gen-jar-issue/". The loading of the jar "primefaces-2.0.0.jar" fails in code coming from JSF2.0 ( Sun's Mojarra Implementation). This is not code that I can change, without bringing down the entire source code of Sun's JSF2.0 and debugging class by class.
    There are other jars within the same "WEB-INF/LIB" containing xmls and property files inside a jar and weblogic11 reads those cleanly. It is ONLY when a jar containing "faces-config.xml" ver 2.0 is introduced inside a jar, the JSF2.0 Implementation bombs out.
    I guess I am the first brave soldier who is venturing in to this Combination of Technologies: "Weblogic11g( Inbuilt Support for JSF1.2 Only) + JSF2.0 + JSF2.0 Extension libraries like RichFaces4.0, PrimeFaces2.0.0"
  • 5. Re: Unable to load JSF2.0 jars on Weblogic Server 10.3.2 start up.
    164415 Oracle ACE
    Currently Being Moderated
    I did a test using primefaces-2.0.0 with JSF 2.0 and observed the same issue:

    java.io.FileNotFoundException: zip:D:/wls1033-0224/user_projects/domains/test/servers/AdminServer/tmp/_WL_user/MedRec-Lite.ear/4m6xxh/war/WEB-INF/lib/primefaces-2.0.0.jar
    at weblogic.utils.zip.ZipURLConnection.connect(Handler.java:78)
    at weblogic.utils.zip.ZipURLConnection.getInputStream(Handler.java:53)
    at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:195)
    at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:50)
    at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:80)
    at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:104)
    at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:71)
    at com.sun.faces.config.AnnotationScanner.processClasspath(AnnotationScanner.java:290)
    at com.sun.faces.config.AnnotationScanner.getAnnotatedClasses(AnnotationScanner.java:215)
    at com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:765)
    at com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:736)

    I think Jay makes a valid point about the frameworks loading resources -- but I do see a WLS class on the stack which is ultimately throwing the exception. It looks to me that it is unable to read the META-INF/faces-config.xml from a WEB-INF/lib code source when the code source has a zip: URI.

    I'll have an engineer take a look at it and see if narrow down what the cause is.

    -steve-
  • 6. Re: Unable to load JSF2.0 jars on Weblogic Server 10.3.2 start up.
    760284 Newbie
    Currently Being Moderated
    Hi Steve,
    Thanks a lot. Finally, somebody is seeing my pain.
    My best logical guess after trying so many things is this. Primefaces-2.0.0 is a proper "jar" file and so is many jars under my WEB-INF\lib and weblogic has no issues with reading those jars. If I replace "Primefaces-2.0.0.jar" with "Primefaces-1.0.0.jar" weblogic is able to read the META-INF/faces-config.xml correctly!.
    Reading Annotated classes from a jar file, is I think, new to JSF2.0 , and this weblogic problem is going to be seen if I replace my JSF extension library with ANY JSF2.0 extension library in the industry today( Primefaces2.0.0.jar, RichFaces4.0.jar, MyFaces2.0.jar). The problem isn't about the jars themselves. May be Weblogic blows up trying to parse or validate "faces-config.xml" namespace entries like "JSF2.0" and the Zip error shown in the stackTrace just hides the real underlying cause of the error.
    Sudha
  • 7. Re: Unable to load JSF2.0 jars on Weblogic Server 10.3.2 start up.
    164415 Oracle ACE
    Currently Being Moderated
    My test was admittedly very simple, but I found that the despite this exception, the primefaces components I used still worked as expected.

    Did you experience any outages with respect to the use of primefaces?
    If I replace "Primefaces-2.0.0.jar" with "Primefaces-1.0.0.jar" weblogic is able to read the META-INF/faces-config.xml correctly!.
    Can you confirm that to be true -- that the simple file name change to rename primefaces to version 1.0 removes the error you see?

    -steve-
  • 8. Re: Unable to load JSF2.0 jars on Weblogic Server 10.3.2 start up.
    760284 Newbie
    Currently Being Moderated
    Hi Steve,
    I too found that despite this exception, the PrimeFaces tags worked. I didn't try all of them yet but about 3-4 tags. The fact that weblogic had trouble reading the jar raises in my mind the possibility that not ALL primefaces2.0 tags may work. I shudder to think of the scenario that my Team goes full blown development using "Primefaces2.0" jar hoping all is well and then find in Production slowly 6 months down the road one or more tags are NOT working and so we have to rollback to Primefaces1.0( JSF1.2). If we can get rid of that exception, the Comfort factor will be huge and I can pitch for JSF2.0 and also promise management that Weblogic in its next major release will have full support for JSF2.0 and until then, we can force weblogic to load "jsf2.0" Mojarra Implementation and "PrimeFaces2.0" by loading them from WEB-INF\Lib and specifying container descriptor "Preferred Web-INF Classes" to be true.
    I did not rename the ACTUAL "Primefaces2.0.jar" to be "Primefaces1.0.jar". I looked in both "PrimeFaces2.0.jar" and "PrimeFaces1.0.jar". Both of them were actual jars, both contained META-INF and "faces-config.xml". The faces-config.xml in PrimeFaces1.0 is "JSF1.2" based and extension implementation is JSF1.2 based whereas the "PrimeFaces2.0" faces-config.xml in PrimeFaces1.0 is "JSF1.2" based and extension implementation is JSF1.2 based . And I know that Weblogic11g has "in-built" support for JSF1.2 and so I tried replacing "PrimeFaces2.0" jar with "PrimeFaces1.2" jar and It worked. No weblogic exceptions on server start up.
  • 9. Re: Unable to load JSF2.0 jars on Weblogic Server 10.3.2 start up.
    760284 Newbie
    Currently Being Moderated
    Typo in my Previous Reply. Sorry. See the changes in BOLD font.
    Hi Steve,
    I too found that despite this exception, the PrimeFaces tags worked. I didn't try all of them yet but about 3-4 tags. The fact that weblogic had trouble reading the jar raises in my mind the possibility that not ALL primefaces2.0 tags may work. I shudder to think of the scenario that my Team goes full blown development using "Primefaces2.0" jar hoping all is well and then find in Production slowly 6 months down the road one or more tags are NOT working and so we have to rollback to Primefaces1.0( JSF1.2). If we can get rid of that exception, the Comfort factor will be huge and I can pitch for JSF2.0 and also promise management that Weblogic in its next major release will have full support for JSF2.0 and until then, we can force weblogic to load "jsf2.0" Mojarra Implementation and "PrimeFaces2.0" by loading them from WEB-INF\Lib and specifying container descriptor "Preferred Web-INF Classes" to be true.
    I did not rename the ACTUAL "Primefaces2.0.jar" to be "Primefaces1.0.jar". I looked in both "PrimeFaces2.0.jar" and "PrimeFaces1.0.jar". Both of them were actual jars, both contained META-INF and "faces-config.xml". The faces-config.xml in PrimeFaces1.0 is "JSF1.2" based and extension implementation is JSF1.2 based whereas the *"PrimeFaces2.0" faces-config.xml in PrimeFaces1.0 is "JSF2.0" based and extension implementation is JSF2.0 based* . And I know that Weblogic11g has "in-built" support for JSF1.2 and so I tried replacing "PrimeFaces2.0" jar with "PrimeFaces1.2" jar and It worked. No weblogic exceptions on server start up.
  • 10. Re: Unable to load JSF2.0 jars on Weblogic Server 10.3.2 start up.
    164415 Oracle ACE
    Currently Being Moderated
    All good points, thanks!

    I tested primefaces-2.0.0.jar with the WLS 10.3.3 and the JSF-2.0 implementation we're providing (which is Mojarra 2.0) and saw the error message occur.

    We're including JSF 2.0 support in the next release of WLS (10.3.3) so you won't need to include it as a web provided library. With the jsf-2.0.war file we distribute for you to use a shared-library, we also include the WLS depedency injection bridge class so DI works with ManagedBeans as expected.

    As I said earlier, I'll chase this one down with engineering and see what their take on this is.

    Thanks for your helpful information.

    -steve-
  • 11. Re: Unable to load JSF2.0 jars on Weblogic Server 10.3.2 start up.
    164415 Oracle ACE
    Currently Being Moderated
    I have an update on this.

    We have filed a bug (9542527) for this specific issue and will look to include the fix in a future patchset. It's too late to include this in the next patchset (patchset 2).

    Once WLS 10.3.3 is released (as patchset 2) if you need this resolved before the next patchset, then you could open a service request with Oracle Support, explain your situation, and ask for a fix for bug number 9542527.

    -steve-
  • 13. Re: Unable to load JSF2.0 jars on Weblogic Server 10.3.2 start up.
    760284 Newbie
    Currently Being Moderated
    Hi Steve,
    Thanks a lot for the support and understanding. I am thrilled to see this.
    I am sure this will go a long way for my company Northern Trust to embrace the latest versions of weblogic and also help me make a case for strong commitment for JSF2.0.
    Sudha
  • 14. Re: Unable to load JSF2.0 jars on Weblogic Server 10.3.2 start up.
    164415 Oracle ACE
    Currently Being Moderated
    No worries Sudha and Jay -- glad to be of some help here.

    I'm actually quite excited that we're now also providing JSF 2.0 in WLS 10.3.3, which will be available via patchset 2 when it ships.

    cheers
    -steve-
1 2 3 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points