6 Replies Latest reply on Feb 7, 2012 12:46 PM by 915485

    Weblogic 10 and JSF1.2

    915485
      Hi,

      I found few threads in the forum on jsf with weblgoic 10 but they didn't solve my problem.

      I am deploying a web application which uses jsf1.2_01 (due to certain limitations with our environment , i have to use only this version) on weblogic 10 server. Getting below error while deploying the app on the server.

      INFO: Initializing Sun's JavaServer Faces implementation (1.2_01-b04-FCS) for context '/SVCWeb'
      Feb 6, 2012 1:46:29 AM com.sun.faces.spi.InjectionProviderFactory getProviderInstance
      SEVERE: JSF1030: The specified InjectionProvider implementation 'com.bea.faces.WeblogicInjectionProvider' cannot be loaded.
      Feb 6, 2012 1:46:29 AM com.sun.faces.spi.InjectionProviderFactory createInstance
      WARNING: JSF1033: Resource injection is DISABLED.
      Feb 6, 2012 1:46:34 AM com.sun.faces.config.ConfigureListener contextInitialized
      INFO: Completed initializing Sun's JavaServer Faces implementation (1.2_01-b04-FCS) for context '/SVCWeb'
      Feb 6, 2012 1:46:34 AM com.sun.faces.config.ConfigureListener contextInitialized
      INFO: Initializing Sun's JavaServer Faces implementation (1.2_01-b04-FCS) for context '/SVCWeb'
      Feb 6, 2012 1:46:34 AM com.sun.faces.config.ConfigureListener contextInitialized
      INFO: Completed initializing Sun's JavaServer Faces implementation (1.2_01-b04-FCS) for context '/SVCWeb'


      When I hit the the application url , getting the below error in the server logs:

      <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@3c49760 - appName: 'SVCWeb', name: 'SVCWeb.war', context-path: '/SVCWeb'] Root cause of ServletException.
      java.lang.IllegalStateException: Servlet response already use stream, Writer not possible
      at org.ajax4jsf.webapp.FilterServletResponseWrapper.getWriter(FilterServletResponseWrapper.java:207)
      at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:163)
      at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
      at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:133)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
      at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
      at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(Unknown Source)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)



      I dont want to use weblogic's implementation of jsf. How can I run my application with the jsf-impl jars which are deployed as part of my war .

      Pleae advice.

      Edited by: 912482 on Feb 6, 2012 12:30 AM
        • 1. Re: Weblogic 10 and JSF1.2
          René van Wijk
          Not sure about this but did you configure a viewhandler - org.ajax4jsf.application.AjaxViewHandler?

          An example of how to set-up such a view handler can be found here: http://middlewaremagic.com/weblogic/?p=7677
          • 2. Re: Weblogic 10 and JSF1.2
            915485
            Thanks Rene fro the prompt response.

            Is the view handler mandatory ? I could run my application with jsf1.2.9 version jar files without view handlers, but I am supposed to use only 1.2_01 version of jsf libraries.
            • 3. Re: Weblogic 10 and JSF1.2
              René van Wijk
              On some servers it is. Maybe it does not help in your case, but an example configuration looks as:
              <faces-config xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd" version="1.2">
                  <application>
                      <message-bundle>userinterface.resources.messagebundle</message-bundle>
                      <locale-config>
                          <supported-locale>en</supported-locale>
                          <supported-locale>nl</supported-locale>
                      </locale-config>
                      <view-handler>org.ajax4jsf.application.AjaxViewHandler</view-handler>
                  </application>
                   ...
              </faces-config>
              in the web.xml you have to configure the org.ajax4jsf.VIEW_HANDLERS property in you want to use facelets
              <context-param>
                      <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
                      <param-value>com.sun.facelets.FaceletViewHandler</param-value>
              </context-param>
              • 4. Re: Weblogic 10 and JSF1.2
                915485
                Tried. It didn't solve my problem.

                Still seeing this error:

                SEVERE: JSF1030: The specified InjectionProvider implementation 'com.bea.faces.WeblogicInjectionProvider' cannot be loaded.
                Feb 6, 2012 1:46:29 AM com.sun.faces.spi.InjectionProviderFactory createInstance
                WARNING: JSF1033: Resource injection is DISABLED.

                Edited by: 912482 on Feb 6, 2012 5:34 AM
                • 5. Re: Weblogic 10 and JSF1.2
                  Steve Button-Oracle
                  I can comment on the first problem you are seeing.

                  But rather than type it out, I'll just point you to something I'd written on the subject a while ago.

                  http://buttso.blogspot.com.au/2011/03/jsf-with-managed-beans-and-dependency.html

                  That should hopefully give you some background on the com.bea.faces.WeblogicInjectionProvider message.

                  -steve-
                  • 6. Re: Weblogic 10 and JSF1.2
                    915485
                    Hi Steve,

                    I saw your blog before I post this thread. However, I couldn't find the jar "wls.jsf.di.jar" in the jsf-1.2.war file inside my weblogic server (../wlserver_10.0\common\deployable-libraries). The war contains only the below jars.

                    jsf-api.jar
                    jsf-impl.jar
                    jstl-1.2.jar

                    and also, I have to build my application through an organizational specific build process which wont allow me to add any arbitrary jar files except those approved by the organization. That is the reason , I can not go with other jsf versions. It may look strange , but I left with only two approved versions of jsf (1.1 and 1.2_03).

                    If still there is a way to deploy me app on weblogic with one of these versions, Please let me know.

                    Edited by: 912482 on Feb 7, 2012 4:46 AM