10 Replies Latest reply on Jan 6, 2006 7:28 AM by Gavin King

    Integrating ADF EA19 and beta2 CVS version

    nusa Novice

      Hi,

      I'm trying to integrate ADF Faces EA19, Seam beta2 CVS version, and MyFaces 1.1.1
      using this guidelines ( http://www.oracle.com/technology/products/jdev/101/howtos/myfaces/index.html ).

      To do that, I hack the issues example that come from Seam beta2 by keeping ONLY the java sources code.
      This will create the same ejb3 file as if we build it originally.
      For the war file, I just picked up the index.html, login.jsp, and home.jsp.

      In order to build it, I have to modify the following files:
      1. faces config :

      <faces-config>
      
       <application>
       <!-- Oracle ADF Faces -->
       <default-render-kit-id>oracle.adf.core</default-render-kit-id>
      
       <locale-config>
       <default-locale>en_GB</default-locale>
       <supported-locale>fr</supported-locale>
       </locale-config>
       </application>
      
       <!-- Standard persistence lifecycle models for the Seam application -->
       <lifecycle>
       <phase-listener>org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener</phase-listener>
       </lifecycle>
      
       <navigation-rule>
       <navigation-case>
       <from-outcome>home</from-outcome>
       <to-view-id>/home.jsp</to-view-id>
       </navigation-case>
       </navigation-rule>
      
      </faces-config>
      


      2. web.xml :
      <web-app id="SimpleADF">
      
       <display-name>SimpleADF</display-name>
      
       <context-param>
       <param-name>javax.faces.CONFIG_FILES</param-name>
       <param-value>/WEB-INF/simpleadf-config.xml</param-value>
       </context-param>
      
       <context-param>
       <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
       <param-value>client</param-value>
       </context-param>
      
       <context-param>
       <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
       <param-value>true</param-value>
       </context-param>
      
       <!-- Needed to ensure safe tx cleanup when using Seam-managed sessions/persistence contexts -->
       <filter>
       <filter-name>Seam Exception Filter</filter-name>
       <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>
       </filter>
      
       <!-- Oracle ADF Faces Filter -->
       <filter>
       <filter-name>ADF Faces</filter-name>
       <filter-class>oracle.adf.view.faces.webapp.AdfFacesFilter</filter-class>
       </filter>
      
       <filter-mapping>
       <filter-name>Seam Exception Filter</filter-name>
       <servlet-name>Faces Servlet</servlet-name>
       </filter-mapping>
      
       <filter-mapping>
       <filter-name>ADF Faces</filter-name>
       <servlet-name>Faces Servlet</servlet-name>
       </filter-mapping>
      
       <!-- Seam listener -->
       <listener>
       <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
       </listener>
      
       <!-- MyFaces listener -->
       <listener>
       <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
       </listener>
      
       <!-- Oracle ADF resource loader servlet -->
       <servlet>
       <servlet-name>ADF Resources</servlet-name>
       <servlet-class>oracle.adf.view.faces.webapp.ResourceServlet</servlet-class>
       </servlet>
      
       <!-- Faces Servlet Mapping -->
       <servlet>
       <servlet-name>Faces Servlet</servlet-name>
       <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
       </servlet>
      
       <!-- Faces Servlet Mapping -->
       <servlet-mapping>
       <servlet-name>ADF Resources</servlet-name>
       <url-pattern>/adf/*</url-pattern>
       </servlet-mapping>
      
       <servlet-mapping>
       <servlet-name>Faces Servlet</servlet-name>
       <url-pattern>*.jsf</url-pattern>
       </servlet-mapping>
      
      </web-app>
      

      3. login.jsp modified to use the ADF syntax :
      <?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
      
      <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:af="http://xmlns.oracle.com/adf/faces">
      
      <jsp:directive.page contentType="text/html;charset=utf-8" />
      
      <f:view>
      
       <f:loadBundle basename="messages" var="msg"/>
      
       <af:document title="#{msg.BrowserTitle}">
       <af:form>
       <af:panelPage title="#{msg.LoginTitle}">
      
       <f:facet name="messages">
       <af:messages />
       </f:facet>
      
       <af:panelForm rows="4">
       <af:inputText label="#{msg.Login}" value="#{login.instance.username}" />
       <af:inputText label="#{msg.Password}" value="#{login.instance.password}" secret="true" />
      
       <af:panelLabelAndMessage>
       <af:panelGroup layout="vertical">
       <af:objectSpacer height="10" />
       <af:panelGroup layout="horizontal">
       <af:commandButton text="#{msg.LoginButton}" action="#{login.login}" />
       </af:panelGroup>
       </af:panelGroup>
       </af:panelLabelAndMessage>
       </af:panelForm>
      
       </af:panelPage>
       </af:form>
       </af:document>
      </f:view>
      
      </jsp:root>
      

      4. home.jsp modified as well :
      <?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
      
      <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:af="http://xmlns.oracle.com/adf/faces" >
      
      <jsp:directive.page contentType="text/html;charset=utf-8" />
      
      <f:view>
      
       <f:loadBundle basename="messages" var="msg"/>
      
       <af:document title="#{msg.BrowserTitle}">
       <af:form>
       <af:panelPage title="#{msg.LoginTitle}">
      
       <f:facet name="messages">
       <af:messages />
       </f:facet>
      
       </af:panelPage>
       </af:form>
       </af:document>
      </f:view>
      
      </jsp:root>
      


      Then I modify accordingly the messages.properties, persistence.xml, import.sql, etc.
      As you can see in login.jsp, I keep using the same java sources as the original ( issues example ).
      When I deploy the ear file, the entity bean are loaded correctly :
      ...
      14:09:11,879 INFO [org.hibernate.ejb.Ejb3Configuration] found EJB3 Entity bean: org.jboss.seam.example.issues.Comment
      14:09:11,879 INFO [org.hibernate.ejb.Ejb3Configuration] found EJB3 Entity bean: org.jboss.seam.example.issues.Issue
      14:09:11,889 INFO [org.hibernate.ejb.Ejb3Configuration] found EJB3 Entity bean: org.jboss.seam.example.issues.Project
      14:09:11,899 INFO [org.hibernate.ejb.Ejb3Configuration] found EJB3 Entity bean: org.jboss.seam.example.issues.User
      ...
      

      the import.sql file is executed properly :
      ...
      14:09:13,712 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] Executing import script: /import.sql
      14:09:13,712 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport] insert into user values ('gavin', 'Gavin King', 'foobar')
      14:09:13,712 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport] insert into user values ('emmanuel', 'Emmanuel Bernard', 'secret')
      ...
      

      the messages is loaded correctly :
      ...
      14:09:14,523 DEBUG [org.jboss.seam.Component] instantiating Seam component: resourceBundle
      14:09:14,543 INFO [org.jboss.seam.core.ResourceBundle] loaded resource bundle: messages
      14:09:14,553 TRACE [org.jboss.seam.Component] class=class java.util.PropertyResourceBundle; keys=java.util.ResourceBundleEnumeration@e5376a; locale=;
      ...
      


      But when I point to http://localhost:8080/SimpleADF/login.jsf, I got these strange error :
      ...
      14:19:03,519 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: msg
      14:19:03,519 ERROR [org.jboss.seam.servlet.SeamExceptionFilter] uncaught exception handled by Seam
      javax.servlet.ServletException: Cannot get value for expression '#{msg.BrowserTitle}'
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:356)
       at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:325)
       at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:190)
       at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:44)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      14:19:03,519 DEBUG [org.jboss.seam.contexts.Lifecycle] After request, destroying contexts
      14:19:03,519 DEBUG [org.jboss.seam.contexts.Lifecycle] <<< End web request
      14:19:03,519 DEBUG [org.jboss.seam.util.NamingHelper] JNDI InitialContext properties:{}
      14:19:03,519 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/SimpleADF].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
      javax.faces.el.EvaluationException: Cannot get value for expression '#{msg.BrowserTitle}'
       at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:397)
       at oracle.adf.view.faces.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:55)
       at oracle.adf.view.faces.bean.util.ValueMap.get(ValueMap.java:54)
       at oracle.adf.view.faces.bean.util.ValueMap$EntryImpl.getValue(ValueMap.java:175)
       at org.apache.myfaces.util.DebugUtils.printComponent(DebugUtils.java:187)
       at org.apache.myfaces.util.DebugUtils.printComponent(DebugUtils.java:313)
       at org.apache.myfaces.util.DebugUtils.printView(DebugUtils.java:147)
       at org.apache.myfaces.util.DebugUtils.traceView(DebugUtils.java:139)
       at org.apache.myfaces.util.DebugUtils.traceView(DebugUtils.java:119)
       at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:363)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:356)
       at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:325)
       at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:190)
       at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:44)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.IllegalStateException: No active application scope
       at org.jboss.seam.core.Init.instance(Init.java:84)
       at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1061)
       at org.jboss.seam.Component.getInstance(Component.java:1034)
       at org.jboss.seam.Component.getInstance(Component.java:1020)
       at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:43)
       at org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVariable(ValueBindingImpl.java:569)
       at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
       at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:140)
       at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:378)
       ... 38 more
      14:19:13,995 DEBUG [org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager] Attempting to passivate; id=5c4om2l-qqny64-ei34tnw7-1-ei35c5fq-c
      14:19:13,995 DEBUG [org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager] Saving session state to: C:\Java\Software\jboss-4.0.3\server\default\tmp\sessions\org.jboss.seam.example.issues.LoginBean-ei34zj0o-9\5c4om2l-qqny64-ei34tnw7-1-ei35c5fq-c.ser
      14:19:14,015 INFO [STDOUT] Exception in thread "Timer-3"
      14:19:14,015 INFO [STDOUT] javax.ejb.EJBException: Could not passivate; failed to save state; CausedByException is:
       org.jboss.seam.example.issues.LoginBean
      14:19:14,015 INFO [STDOUT] at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:333)
      14:19:14,015 INFO [STDOUT] at org.jboss.ejb3.cache.simple.SimpleStatefulCache.passivate(SimpleStatefulCache.java:143)
      14:19:14,015 INFO [STDOUT] at org.jboss.ejb3.cache.simple.SimpleStatefulCache$SessionTimeoutTask.run(SimpleStatefulCache.java:92)
      14:19:14,015 INFO [STDOUT] at java.util.TimerThread.mainLoop(Timer.java:512)
      14:19:14,015 INFO [STDOUT] at java.util.TimerThread.run(Timer.java:462)
      14:19:14,015 INFO [STDOUT] java.io.NotSerializableException: org.jboss.seam.example.issues.LoginBean
      14:19:14,015 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
      14:19:14,015 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
      14:19:14,025 INFO [STDOUT] at org.jboss.aop.metadata.SimpleMetaData.writeExternal(SimpleMetaData.java:211)
      14:19:14,025 INFO [STDOUT] at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
      14:19:14,025 INFO [STDOUT] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
      14:19:14,025 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
      14:19:14,025 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
      14:19:14,025 INFO [STDOUT] at java.rmi.MarshalledObject.<init>(MarshalledObject.java:92)
      14:19:14,025 INFO [STDOUT] at org.jboss.ejb3.stateful.StatefulBeanContext.writeExternal(StatefulBeanContext.java:153)
      14:19:14,025 INFO [STDOUT] at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
      14:19:14,025 INFO [STDOUT] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
      14:19:14,025 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
      14:19:14,025 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
      14:19:14,025 INFO [STDOUT] at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:324)
      14:19:14,025 INFO [STDOUT] at org.jboss.ejb3.cache.simple.SimpleStatefulCache.passivate(SimpleStatefulCache.java:143)
      14:19:14,025 INFO [STDOUT] at org.jboss.ejb3.cache.simple.SimpleStatefulCache$SessionTimeoutTask.run(SimpleStatefulCache.java:92)
      14:19:14,025 INFO [STDOUT] at java.util.TimerThread.mainLoop(Timer.java:512)
      14:19:14,025 INFO [STDOUT] at java.util.TimerThread.run(Timer.java:462)
      14:25:59,328 DEBUG [javax.faces.webapp.FacesServlet] service begin
      ...
      


      Strange because the messages are displayed correctly and I still can navigate from login page to home page.
      Just FYI, I'm using hibernate 3.1, Hibernate Annotation 3.1beta7, and Hibernate EntityManager 3.1beta5.
      Do you have any comment/suggestion ? Do you want to give it a try ?

      Thanks.

        • 1. Re: Integrating ADF EA19 and beta2 CVS version
          Deniss Parhomenko Newbie

          Hi,

          I have a different configuration files, but the same environment (Oracle EA19, My faces, Seam b2)

          and receive the same exception :

          java.lang.IllegalStateException: No active application scope
           org.jboss.seam.core.Init.instance(Init.java:84)
           org.jboss.seam.Component.getInstanceFromFactory(Component.java:1061)
           org.jboss.seam.Component.getInstance(Component.java:1034)
           org.jboss.seam.Component.getInstance(Component.java:1020)
           org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:43)
           com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:130)
           com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:41)
           com.sun.el.parser.AstEqual.getValue(AstEqual.java:20)
           com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:183)
           com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
           com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
           oracle.adf.view.faces.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:55)
           oracle.adf.view.faces.bean.util.ValueMap.get(ValueMap.java:54)
           oracle.adf.view.faces.bean.util.ValueMap$EntryImpl.getValue(ValueMap.java:175)
           org.apache.myfaces.util.DebugUtils.printComponent(DebugUtils.java:187)
           org.apache.myfaces.util.DebugUtils.printComponent(DebugUtils.java:313)
           org.apache.myfaces.util.DebugUtils.printComponent(DebugUtils.java:313)
           org.apache.myfaces.util.DebugUtils.printComponent(DebugUtils.java:313)
           org.apache.myfaces.util.DebugUtils.printView(DebugUtils.java:147)
           org.apache.myfaces.util.DebugUtils.traceView(DebugUtils.java:139)
           org.apache.myfaces.util.DebugUtils.traceView(DebugUtils.java:119)
           org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:363)
           javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
           oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:356)
           oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:325)
           oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:190)
           oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
           org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
           org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:44)


          In Seam b1 evrything work fine

          • 2. Re: Integrating ADF EA19 and beta2 CVS version
            Gavin King Master

             

            javax.faces.el.EvaluationException: Cannot get value for expression '#{msg.BrowserTitle}'
            at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:397)
            at oracle.adf.view.faces.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:55)
            at oracle.adf.view.faces.bean.util.ValueMap.get(ValueMap.java:54)
            at oracle.adf.view.faces.bean.util.ValueMap$EntryImpl.getValue(ValueMap.java:175)
            at org.apache.myfaces.util.DebugUtils.printComponent(DebugUtils.java:187)
            at org.apache.myfaces.util.DebugUtils.printComponent(DebugUtils.java:313)
            at org.apache.myfaces.util.DebugUtils.printView(DebugUtils.java:147)
            at org.apache.myfaces.util.DebugUtils.traceView(DebugUtils.java:139)
            at org.apache.myfaces.util.DebugUtils.traceView(DebugUtils.java:119)
            at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:363)


            This does not appear to be anything to do with Seam. Some problem with resource bundle on MyFaces/ADF.


            • 3. Re: Integrating ADF EA19 and beta2 CVS version
              Gavin King Master

               

              14:19:14,015 INFO [STDOUT] Exception in thread "Timer-3"
              14:19:14,015 INFO [STDOUT] javax.ejb.EJBException: Could not passivate; failed to save state; Cause
              dByException is:
              org.jboss.seam.example.issues.LoginBean
              14:19:14,015 INFO [STDOUT] at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager
              .passivateSession(StatefulSessionFilePersistenceManager.java:333)
              14:19:14,015 INFO [STDOUT] at org.jboss.ejb3.cache.simple.SimpleStatefulCache.passivate(SimpleS
              tatefulCache.java:143)
              14:19:14,015 INFO [STDOUT] at org.jboss.ejb3.cache.simple.SimpleStatefulCache$SessionTimeoutTas
              k.run(SimpleStatefulCache.java:92)
              14:19:14,015 INFO [STDOUT] at java.util.TimerThread.mainLoop(Timer.java:512)
              14:19:14,015 INFO [STDOUT] at java.util.TimerThread.run(Timer.java:462)
              14:19:14,015 INFO [STDOUT] java.io.NotSerializableException: org.jboss.seam.example.issues.LoginBean



              This is a known bug in JBoss EJB3 that will be fixed in the next release.

              Workaround: make your SFSB serializable.

              • 4. Re: Integrating ADF EA19 and beta2 CVS version
                Gavin King Master

                 

                "deniss.parhomenko" wrote:
                Hi,

                I have a different configuration files, but the same environment (Oracle EA19, My faces, Seam b2)

                and receive the same exception :
                java.lang.IllegalStateException: No active application scope
                 org.jboss.seam.core.Init.instance(Init.java:84)
                 org.jboss.seam.Component.getInstanceFromFactory(Component.java:1061)
                 org.jboss.seam.Component.getInstance(Component.java:1034)
                 org.jboss.seam.Component.getInstance(Component.java:1020)
                 org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:43)
                 com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:130)
                 com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:41)
                 com.sun.el.parser.AstEqual.getValue(AstEqual.java:20)
                 com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:183)
                 com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
                 com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
                 oracle.adf.view.faces.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:55)
                 oracle.adf.view.faces.bean.util.ValueMap.get(ValueMap.java:54)
                 oracle.adf.view.faces.bean.util.ValueMap$EntryImpl.getValue(ValueMap.java:175)
                 org.apache.myfaces.util.DebugUtils.printComponent(DebugUtils.java:187)
                 org.apache.myfaces.util.DebugUtils.printComponent(DebugUtils.java:313)
                 org.apache.myfaces.util.DebugUtils.printComponent(DebugUtils.java:313)
                 org.apache.myfaces.util.DebugUtils.printComponent(DebugUtils.java:313)
                 org.apache.myfaces.util.DebugUtils.printView(DebugUtils.java:147)
                 org.apache.myfaces.util.DebugUtils.traceView(DebugUtils.java:139)
                 org.apache.myfaces.util.DebugUtils.traceView(DebugUtils.java:119)
                 org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:363)
                 javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
                 oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:356)
                 oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:325)
                 oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:190)
                 oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
                 org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
                 org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:44)


                In Seam b1 evrything work fine


                I don't know quite what this exception is, but it is not in any way related to the previous posters problems.

                Basically what is happening is that the Seam variable resolver is getting called outside a scope where it is initialized. Are you sure you have the StartupListener correctly installed and bootstrapping Seam?




                • 5. Re: Integrating ADF EA19 and beta2 CVS version
                  nusa Novice

                   

                  "deniss.parhomenko" wrote:

                  I have a different configuration files, but the same environment (Oracle EA19, My faces, Seam b2)

                  Hi Deniss,

                  Mind to share to us how do you configure your files ?
                  Do you declare the tld in your web.xml ?
                  In the above example, I just have adf*.jar under my WEB-INF/lib/.

                  Thanks.

                  • 6. Re: Integrating ADF EA19 and beta2 CVS version
                    Deniss Parhomenko Newbie

                    My Confiruratin files

                    web.xml

                    <?xml version="1.0" encoding="UTF-8"?>
                    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
                     <!-- Seam -->
                     <context-param>
                     <param-name>javax.faces.CONFIG_FILES
                     </param-name>
                     <param-value>/WEB-INF/faces-config.xml,/WEB-INF/faces-config-seam.xml,/WEB-INF/faces-config-adf.xml</param-value>
                     </context-param>
                    
                     <listener>
                     <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
                     </listener>
                    
                     <context-param>
                     <param-name>oracle.adf.view.faces.ALTERNATE_VIEW_HANDLER</param-name>
                     <param-value>com.sun.facelets.FaceletViewHandler</param-value>
                     </context-param>
                    
                     <context-param>
                     <param-name>facelets.LIBRARIES</param-name>
                     <param-value>/WEB-INF/tomahawk.taglib.xml</param-value>
                     </context-param>
                    
                     <!-- 120 second conversation timeout -->
                     <context-param>
                     <param-name>org.jboss.seam.core.manager.conversationTimeout</param-name>
                     <param-value>120000</param-value>
                     </context-param>
                    
                     <!-- This is not working right now because of a bug in Hibernate -->
                     <!-- context-param>
                     <param-name>org.jboss.seam.core.init.clientSideConversations</param-name>
                     <param-value>true</param-value>
                     </context-param-->
                    
                     <!-- Defines a Seam-managed Hibernate session -->
                     <context-param>
                     <param-name>org.jboss.seam.core.init.managedSessions</param-name>
                     <param-value>database</param-value>
                     </context-param>
                     <!-- Bootstrap Datasource/Hibernate outside Java EE -->
                     <context-param>
                     <param-name>org.jboss.seam.core.init.componentClasses</param-name>
                     <param-value>org.jboss.seam.core.Microcontainer</param-value>
                     </context-param>
                    
                     <!--filter>
                     <filter-name>UTF8Filter</filter-name>
                     <filter-class>UTF8Filter</filter-class>
                     </filter-->
                    
                     <filter>
                     <filter-name>extensionsFilter</filter-name>
                     <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
                     <init-param>
                     <param-name>uploadMaxFileSize</param-name>
                     <param-value>100m</param-value>
                     </init-param>
                     <init-param>
                     <param-name>uploadThresholdSize</param-name>
                     <param-value>100k</param-value>
                     </init-param>
                    <!-- <init-param>
                     <param-name>uploadRepositoryPath</param-name>
                     <param-value>/temp</param-value>
                     <description>Set the path where the intermediary files will be stored.
                     </description>
                     </init-param>-->
                     </filter>
                    
                     <filter>
                     <filter-name>adfFaces</filter-name>
                     <filter-class>oracle.adf.view.faces.webapp.AdfFacesFilter</filter-class>
                     </filter>
                    
                    
                     <!-- Needed to ensure safe tx cleanup when using Seam-managed sessions/persistence contexts -->
                     <filter>
                     <filter-name>Seam Exception Filter</filter-name>
                     <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>
                     </filter>
                    
                     <!--filter-mapping>
                     <filter-name>UTF8Filter</filter-name>
                     <url-pattern>*.jsf</url-pattern>
                     </filter-mapping>
                     <filter-mapping>
                     <filter-name>UTF8Filter</filter-name>
                     <url-pattern>/faces/*</url-pattern>
                     </filter-mapping-->
                    
                    
                     <filter-mapping>
                     <filter-name>Seam Exception Filter</filter-name>
                     <url-pattern>*.jsf</url-pattern>
                     </filter-mapping>
                    
                     <filter-mapping>
                     <filter-name>adfFaces</filter-name>
                     <!-- This assumes that the FacesServlet has been registered -->
                     <!-- under the name "faces" -->
                     <servlet-name>Faces Servlet</servlet-name>
                     </filter-mapping>
                    
                     <filter-mapping>
                     <filter-name>extensionsFilter</filter-name>
                     <url-pattern>*.jsf</url-pattern>
                     </filter-mapping>
                     <filter-mapping>
                     <filter-name>extensionsFilter</filter-name>
                     <url-pattern>/faces/*</url-pattern>
                     </filter-mapping>
                    
                    
                     <!-- MyFaces -->
                     <listener>
                     <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
                     </listener>
                    
                    
                     <context-param>
                     <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
                     <param-value>true</param-value>
                     </context-param>
                    
                     <context-param>
                     <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
                     <param-value>true</param-value>
                     </context-param>
                    
                     <context-param>
                     <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
                     <param-value>true</param-value>
                     </context-param>
                    
                     <context-param>
                     <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                     <param-value>server</param-value>
                     </context-param>
                    
                     <context-param>
                     <param-name>facelets.DEVELOPMENT</param-name>
                     <param-value>true</param-value>
                     </context-param>
                    
                     <context-param>
                     <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                     <param-value>.jsp</param-value>
                     </context-param>
                    
                     <servlet>
                     <servlet-name>resources</servlet-name>
                     <servlet-class>oracle.adf.view.faces.webapp.ResourceServlet</servlet-class>
                     </servlet>
                    
                    
                    
                     <servlet>
                     <servlet-name>Faces Servlet</servlet-name>
                     <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                     <load-on-startup>1</load-on-startup>
                     </servlet>
                    
                     <servlet-mapping>
                     <servlet-name>resources</servlet-name>
                     <url-pattern>/adf/*</url-pattern>
                     </servlet-mapping>
                    
                     <!-- Faces Servlet Mapping -->
                     <servlet-mapping>
                     <servlet-name>Faces Servlet</servlet-name>
                     <url-pattern>*.jsf</url-pattern>
                     </servlet-mapping>
                     <servlet-mapping>
                     <servlet-name>Faces Servlet</servlet-name>
                     <url-pattern>/faces/*</url-pattern>
                     </servlet-mapping>
                    
                    </web-app>
                    


                    /WEB-INF/faces-config.xml
                    <?xml version="1.0" encoding="UTF-8"?>
                    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
                     "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
                    <faces-config>
                    
                     <!-- my navigation rules - removed -->
                    
                     <lifecycle/>
                     <application>
                     <locale-config>
                     <default-locale>en_GB</default-locale>
                     </locale-config>
                     </application>
                     <factory/>
                    </faces-config>
                    


                    /WEB-INF/faces-config-seam.xml
                    <?xml version="1.0" encoding="UTF-8"?>
                    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
                     "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
                    <faces-config>
                     <!-- application>
                     <variable-resolver>
                     org.jboss.seam.jsf.SeamVariableResolver
                     </variable-resolver>
                     <locale-config />
                     </application-->
                     <lifecycle>
                     <phase-listener>org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener</phase-listener>
                     </lifecycle>
                    </faces-config>


                    /WEB-INF/faces-config-adf.xml
                    <?xml version="1.0" encoding="UTF-8"?>
                    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
                     "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
                    <faces-config>
                     <application>
                     <view-handler>oracle.adfinternal.view.faces.application.ViewHandlerImpl</view-handler>
                     <state-manager>oracle.adfinternal.view.faces.application.StateManagerImpl</state-manager>
                     <navigation-handler>oracle.adfinternal.view.faces.application.NavigationHandlerImpl</navigation-handler>
                     <variable-resolver>oracle.adfinternal.view.faces.el.AdfFacesVariableResolver</variable-resolver>
                     <default-render-kit-id>oracle.adf.core</default-render-kit-id>
                     </application>
                     <lifecycle>
                     <phase-listener>oracle.adfinternal.view.faces.context.AdfFacesPhaseListener</phase-listener>
                     </lifecycle>
                     <factory/>
                    </faces-config>
                    


                    index.jsp
                    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
                    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
                     xmlns:ui="http://java.sun.com/jsf/facelets"
                     xmlns:h="http://java.sun.com/jsf/html"
                     xmlns:f="http://java.sun.com/jsf/core"
                     xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
                     xmlns:af="http://xmlns.oracle.com/adf/faces" >
                     <jsp:directive.page contentType="text/html;charset=utf-8"/>
                     <html>
                     <f:loadBundle basename="resources.application" var="msg" />
                     <afh:head title="PPD">
                     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
                     </afh:head>
                     <afh:body>
                     <af:form id="mainFormId">
                    
                     <af:panelGroup layout="vertical" rendered="#{not(loggedIn == 'true' ) }">
                     <af:panelPage title="Login" rendered="#{not(loggedIn == 'true' ) }">
                     <af:panelForm>
                     <af:inputText label="Login" value="#{loginData.username}" required="true"/>
                     <af:inputText label="Password" value="#{loginData.password}" required="false" secret="true"/>
                    
                     </af:panelForm>
                     <f:facet name="actions">
                     <af:panelButtonBar>
                     <af:commandButton text="Login" action="#{login.login}"/>
                     </af:panelButtonBar>
                     </f:facet>
                     <f:facet name="messages">
                     <af:messages/>
                     </f:facet>
                     </af:panelPage>
                     </af:panelGroup>
                     </af:form>
                     </afh:body>
                     </html>
                    </jsp:root>
                    




                    • 7. Re: Integrating ADF EA19 and beta2 CVS version
                      nusa Novice

                       

                      "deniss.parhomenko" wrote:
                      My Confiruratin files
                      web.xml
                      ...


                      Thanks Deniss.

                      Looking at your web.xml, I don't see any diffrence with my web.xml, EXCEPT just the order. Does it matter ?

                      Then you split as well your faces config files. OK, I'm going to try that.

                      May I know where do you put your resource file and adf*.jar ? What do you have under your WEB-INF/lib ?

                      Thanks.


                      • 8. Re: Integrating ADF EA19 and beta2 CVS version
                        Deniss Parhomenko Newbie

                        Hi,

                        I successfully run my application

                        And the reason is ...

                        missed log4j.properties

                        I add to my classpath file

                        log4j.properties (I want only look at debug messages)

                        # Log4J properties file. It contains definitions of logging level
                        # for root category, for all tests and definition of one appender that
                        # may be used to store any level output
                        
                        # Normal unit tests logging configuration
                        log4j.rootCategory=INFO, console
                        
                        #
                        # Custom logging level for tests on a per-category basis
                        # DEBUG < INFO < WARN < ERROR < FATAL
                        log4j.logger.org.jboss.seam.contexts=DEBUG
                        
                        # A bit specific settings for console output
                        log4j.appender.console=org.apache.log4j.ConsoleAppender
                        log4j.appender.console.layout=org.apache.log4j.PatternLayout
                        log4j.appender.console.layout.ConversionPattern=%-5p [%t] %c{1} - %m%n
                        


                        and after that everything goes fine, I check it twice


                        Gavin any comment on this ?

                        • 9. Re: Integrating ADF EA19 and beta2 CVS version
                          Deniss Parhomenko Newbie

                          files in WEB-INF/lib

                          adf-facelets.jar
                          adf-faces-api-ea19.jar
                          adf-faces-impl-ea19.jar
                          adfshare-3218.jar
                          antlr-2.7.6rc1.jar
                          asm.jar
                          bsh-2.0b2.jar
                          cglib-2.1.1.jar
                          commons-beanutils.jar
                          commons-codec-1.2.jar
                          commons-collections.jar
                          commons-digester-1.6.jar
                          commons-fileupload.jar
                          commons-httpclient-3.0-rc4.jar
                          commons-lang-2.0.jar
                          commons-logging.jar
                          concurrent.jar
                          dom4j.jar
                          ejb3-persistence.jar
                          el-api.jar
                          el-ri.jar
                          hibernate-annotations.jar
                          hibernate-entitymanager.jar
                          hibernate3.jar
                          hsqldb.jar
                          itext-1.3.jar
                          jakarta-oro.jar
                          javax.servlet.jar
                          jboss-common.jar
                          jboss-common-jdbc-wrapper.jar
                          jboss-container.jar
                          jboss-dependency.jar
                          jboss-ejb3.jar
                          jboss-ejb3x.jar
                          jboss-j2ee.jar
                          jboss-j2se.jar
                          jboss-jca.jar
                          jboss-local-jdbc.jar
                          jboss-microcontainer.jar
                          jboss-seam.jar
                          jboss-security.jar
                          jboss-system.jar
                          jboss-transaction.jar
                          jbpm-3.1-alpha2.jar
                          jnpserver.jar
                          jsf-facelets.jar
                          log4j.jar
                          myfaces-api.jar
                          myfaces-impl.jar
                          namespace.jar
                          portlet-api-lib.jar
                          postgresql-8.0.309.jdbc3.jar
                          testng-2.5.3-jdk15.jar
                          tomahawk.jar
                          xercesImpl.jar
                          xml-apis.jar

                          resource file are located in WEB-INF\classes\resources

                          • 10. Re: Integrating ADF EA19 and beta2 CVS version
                            Gavin King Master

                             

                            Gavin any comment on this ?


                            Apparently we have a problem when myfaces debug logging is enabled.

                            Please enter this one in JIRA.

                            Thanks.