3 Replies Latest reply on Nov 19, 2012 8:07 PM by dvohra21

    Are Libraries Required?

    Stuart Fleming
      I am using Jdeveloper 11.1.2.2

      Using the application provided in the article by Frank Nimphius, Security For everyone, I extracted the LoginBean.java and the HomeManagedBean.java and the login section of the home.jsf.

      I added this to a new application containing just a view controller, which I packaged and will be able to use in multiple applications. (Thank you Frank).

      I created a template and placed the login section of code in this. Created new java files with the same names, and then placed the appropriate code in the files.

      The files did not compile. I opened the View Controller project properties and added the libraries:
      ADF Model Runtime
      Weblogic 10.3 Remote Client

      Now the java files compiled. I packaged the project into a jar (providing unique names for all files etc) named ssfTemplate.jar


      I Created a new application. Added the ssfTemplate.jar to the resource palette as a file system connection. Created a new application with jsf pages, taskflows and security and was able to login just fine.

      HOWEVER, Here is my question:

      In Frank Nimphius's Book Oracle Fusion Developer guide (I highly recommend it) On page 469 at the bottom in the gray area of it states:

      If an ADF Library JAR requires additional dependent JAR files to be around at runtime, these need to be added separately to the web project that consumes the ADF library JAR

      SO,  Do I need to add the ADF Model Runtime and Weblogic 10.3 Remote Client, since I needed to on the template when I created it????
      Thank you very much for any insight!!!

      Stuart
        • 1. Re: Are Libraries Required?
          dvohra21
          Are the ADF Model Runtime Weblogic 10.3 Remote Client libraries packaged with the ADF application deployed? If so, the libraries do get added to the web project.
          1 person found this helpful
          • 2. Re: Are Libraries Required?
            Stuart Fleming
            dvohra16,
            Thank you for your quick reply! I will look into that....I believe there may be a few things going on here -- because when I deploy to a stand-alone weblogic server that I have created for testing purposes, I get this error

            I also get this error if I move the application from one directory on my computer to another directory!_

            Even though the View Controller Library contains the ADF Library (which contains a reference to the jar!!!).
            If I open up the JSF, then the xml referencing the template is there, but there are errors concerning the reference. Very Interesting.

            I tried one more thing. I placed my application into subversion, closed it, then checked it out. Same problem!

            Hope there is an answer for this one. Kind of hijacked my own posting on this one.... so I decided to add another posting Issue with Packaged Jars added to project from resource Palette

            I also made a youtube video to show the error and some troubleshooting I had to perform. http://youtu.be/ERyLngq9hlI

            Error 500--Internal Server Error

            java.io.FileNotFoundException: /WEB-INF/ssfTemplate/SSFTemplate.jsf Not Found in ExternalContext as a Resource
                 at com.sun.faces.facelets.impl.DefaultFaceletFactory.resolveURL(DefaultFaceletFactory.java:224)
                 at com.sun.faces.facelets.impl.DefaultFacelet.getRelativePath(DefaultFacelet.java:276)
                 at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:344)
                 at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
                 at oracle.adfinternal.view.faces.facelets.rich.IncludeHandler.applyNextHandler(IncludeHandler.java:77)
                 at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
                 at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
                 at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
                 at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
                 at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
                 at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
                 at oracle.adfinternal.view.faces.facelets.rich.RichDocumentHandler.applyNextHandler(RichDocumentHandler.java:68)
                 at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
                 at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
                 at com.sun.faces.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:186)
                 at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
                 at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
                 at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:82)
                 at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:152)
                 at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:744)
                 at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.buildView(ViewDeclarationLanguageFactoryImpl.java:341)
                 at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:987)
                 at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:339)
                 at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:237)
                 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:509)
                 at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
                 at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
                 at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
                 at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
                 at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                 at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
                 at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                 at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
                 at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
                 at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
                 at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
                 at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
                 at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
                 at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
                 at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                 at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
                 at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                 at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
                 at java.security.AccessController.doPrivileged(Native Method)
                 at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
                 at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
                 at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
                 at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
                 at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
                 at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                 at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
                 at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                 at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
                 at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                 at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
                 at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
                 at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                 at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
                 at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
                 at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
                 at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
                 at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
                 at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

            Edited by: Stuart Fleming on Nov 18, 2012 10:18 AM
            • 3. Re: Are Libraries Required?
              dvohra21
              For Facelets templates refer
              http://www.oracle.com/technetwork/articles/java/facelets-454361.html