1 2 Previous Next 18 Replies Latest reply on Feb 11, 2012 4:08 PM by mihovil

    Call to ajax does not work with JBOSS CRb1

    mihovil

      I was really surprised that such common call was not working - this should be in almost every web GUI application but did not find any answer yet... checked every forum on this internet...

       

      Anyway, the code looks like this:

       

      <h:inputText value="#{bean.text}">

      <p:ajax update="out" />

      </h:inputText>

      <h:outputText id="out" value="#{bean.text}" />

       

      and we get no any error, just application stop working without warning - just like the session was gone... This works nicely with AS 6.0 Final. We use also Prime Faces... Tried with f:ajax, too - same

       

      Any ideas?

       

      Thanks!!

      Mihovil

       

      This is our deployment log:

       

      00:20:53,931 INFO  [org.jboss.modules] JBoss Modules version 1.1.0.CR6

      00:20:54,203 INFO  [org.jboss.msc] JBoss MSC version 1.0.1.GA

      00:20:54,256 INFO  [org.jboss.as] JBoss AS 7.1.0.CR1b "Flux Capacitor" starting

      00:20:55,078 INFO  [org.jboss.as] Creating http management service using  socket-binding (management-http)

      00:20:55,083 INFO  [org.xnio] XNIO Version 3.0.0.CR7

      00:20:55,094 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.0.CR7

      00:20:55,104 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.0.CR8

      00:20:55,129 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers

      00:20:55,139 INFO [org.jboss.as.clustering] (ServerService Thread Pool -- 30) JBAS010300: Activating Infinispan subsystem.

      00:20:55,156 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) Activating Security Subsystem

      00:20:55,170 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem

      00:20:55,193 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension

      00:20:55,196 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011910: Activating OSGi Subsystem

      00:20:55,242 INFO [org.jboss.as.connector] (MSC service thread 1-5) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.6.Final)

      00:20:55,244 INFO [org.jboss.as.security] (MSC service thread 1-5) Picketbox version=4.0.6.Beta2

      00:20:55,290 INFO  [org.jboss.as.naming] (MSC service thread 1-7) JBAS011802: Starting Naming Service

      00:20:55,294 INFO  [org.jboss.as.jaxr] (MSC service thread 1-2) Binding JAXR ConnectionFactory: java:jboss/jaxr/ConnectionFactory

      00:20:55,308 INFO [org.jboss.as.mail.extension] (MSC service thread 1-7) JBAS015400: Bound mail session [java:jboss/mail/Default]

      00:20:55,327 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 26) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)

      00:20:55,457 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-5) JBoss Web Services - Stack CXF Server 4.0.0.GA

      00:20:56,275 INFO  [org.jboss.as.remoting] (MSC service thread 1-2) Listening on /127.0.0.1:4447

      00:20:56,476 INFO [org.jboss.as.remoting] (MSC service thread 1-8) Listening on /127.0.0.1:9999

      00:20:56,484 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-5) JBAS015012: Started FileSystemDeploymentService for directory D:\jboss-as-7.1.0.CR1b\standalone\deployments

      00:20:56,565 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-8) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]

      00:20:56,667 INFO [org.apache.coyote.http11.Http11AprProtocol] (MSC service thread 1-3) Starting Coyote HTTP/1.1 on http--127.0.0.1-9090

      00:20:56,710 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report

      JBAS014775:    New missing/unsatisfied dependencies:

            service jboss.jdbc-driver.ojdbc6_jar (missing) dependents: [service jboss.data-source.java:/LarisDS]

       

      00:20:56,726 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) Starting deployment of "ojdbc6.jar"

      00:20:57,015 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) JBAS010403: Deploying JDBC-compliant driver class oracle.jdbc.OracleDriver (version 11.1)

      00:20:57,030 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010400: Bound data source [java:/LarisDS]

      00:20:57,045 INFO  [org.jboss.as] (MSC service thread 1-1) JBoss AS 7.1.0.CR1b "Flux Capacitor" started in 3275ms - Started 153 of 226 services (70 services are passive or on-demand)

      00:20:57,098 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "ojdbc6.jar"

      00:20:57,099 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report

      JBAS014776:    Newly corrected services:

            service jboss.jdbc-driver.ojdbc6_jar (no longer required)

       

      00:21:07,222 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found LarisEAR.ear in deployment directory. To trigger deployment create a file called LarisEAR.ear.dodeploy

      00:21:07,229 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) Starting deployment of "LarisEAR.ear"

      00:21:07,556 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) Starting deployment of "LarisUI.war"

      00:21:07,556 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) Starting deployment of "LarisEJB.jar"

      00:21:07,559 WARN [org.jboss.as.deployment] (MSC service thread 1-1) Class Path entry LarisEJBClient.jar in "/D:/jboss-as-7.1.0.CR1b/standalone/deployments/LarisEAR.ear/LarisEJB.jar" does not point to a valid jar for a Class-Path reference.

      00:21:08,361 WARN [org.jboss.as.deployment] (MSC service thread 1-5) Class Path entry iText-toolbox.jar in "/D:/jboss-as-7.1.0.CR1b/standalone/deployments/LarisEAR.ear/LarisUI.war/WEB-INF/lib/iText-2.1.5.jar" does not point to a valid jar for a Class-Path reference.

      00:21:08,361 WARN [org.jboss.as.deployment] (MSC service thread 1-5) Class Path entry iText-toolbox-2.1.5.jar in "/D:/jboss-as-7.1.0.CR1b/standalone/deployments/LarisEAR.ear/LarisUI.war/WEB-INF/lib/iText-2.1.5.jar" does not point to a valid jar for a Class-Path reference.

      00:21:08,362 WARN  [org.jboss.as.deployment] (MSC service thread 1-5) Class Path entry bcmail-jdk14-138.jar in "/D:/jboss-as-7.1.0.CR1b/standalone/deployments/LarisEAR.ear/LarisUI.war/WEB-INF/lib/iText-2.1.5.jar" does not point to a valid jar for a Class-Path reference.

      00:21:08,362 WARN [org.jboss.as.deployment] (MSC service thread 1-5) Class Path entry bcprov-jdk14-138.jar in "/D:/jboss-as-7.1.0.CR1b/standalone/deployments/LarisEAR.ear/LarisUI.war/WEB-INF/lib/iText-2.1.5.jar" does not point to a valid jar for a Class-Path reference.

      00:21:08,376 INFO  [org.jboss.jpa] (MSC service thread 1-8) JBAS011401: Read persistence.xml for LarisModel

      00:21:08,512 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-6) JNDI bindings for session bean named LarisServiceBean in deployment unit subdeployment "LarisEJB.jar" of deployment "LarisEAR.ear" are as follows:

       

      java:global/LarisEAR/LarisEJB/LarisServiceBean!com.wiset.laris.service.LarisServiceLocal

      java:app/LarisEJB/LarisServiceBean!com.wiset.laris.service.LarisServiceLocal

      java:module/LarisServiceBean!com.wiset.laris.service.LarisServiceLocal

      java:global/LarisEAR/LarisEJB/LarisServiceBean

      java:app/LarisEJB/LarisServiceBean

      java:module/LarisServiceBean

       

      00:21:08,773 INFO  [org.jboss.jpa] (MSC service thread 1-8) JBAS011402: Starting Persistence Unit Service 'LarisEAR.ear#LarisModel'

      00:21:09,144 INFO [org.hibernate.annotations.common.Version] (MSC service thread 1-8) HCANN000001: Hibernate Commons Annotations {4.0.1.Final}

      00:21:09,151 INFO [org.hibernate.Version] (MSC service thread 1-8) HHH000412: Hibernate Core {4.0.0.Final}

      00:21:09,155 INFO [org.hibernate.cfg.Environment] (MSC service thread 1-8) HHH000206: hibernate.properties not found

      00:21:09,157 INFO [org.hibernate.cfg.Environment] (MSC service thread 1-8) HHH000021: Bytecode provider name : javassist

      00:21:09,178 INFO [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-8) HHH000204: Processing PersistenceUnitInfo [

             name: LarisModel

             ...]

      00:21:09,260 INFO [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-6) Initializing Mojarra 2.1.5 (SNAPSHOT 20111202) for context '/LarisUI'

      00:21:09,684 INFO [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-8) HHH000130: Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider

      00:21:10,161 INFO [org.hibernate.dialect.Dialect] (MSC service thread 1-8) HHH000400: Using dialect: org.hibernate.dialect.OracleDialect

      00:21:10,164 WARN  [org.hibernate.dialect.Oracle9Dialect] (MSC service thread 1-8) HHH000063: The Oracle9Dialect dialect has been deprecated; use either Oracle9iDialect or Oracle10gDialect instead

      00:21:10,166 WARN [org.hibernate.dialect.OracleDialect] (MSC service thread 1-8) HHH000064: The OracleDialect dialect has been deprecated; use Oracle8iDialect instead

      00:21:10,177 INFO [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (MSC service thread 1-8) HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory

      00:21:10,180 INFO [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (MSC service thread 1-8) HHH000397: Using ASTQueryTranslatorFactory

      00:21:10,216 INFO [org.hibernate.validator.util.Version] (MSC service thread 1-6) Hibernate Validator 4.2.0.Final

      00:21:11,015 INFO [org.primefaces.webapp.PostConstructApplicationEventListener] (MSC service thread 1-6) Running on PrimeFaces 3.0

      00:21:11,049 INFO  [org.jboss.web] (MSC service thread 1-6) registering web context: /LarisUI

      00:21:14,148 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "LarisEAR.ear"

        • 1. Re: Call to ajax does not work with JBOSS CRb1
          ctomc

          Hi,

           

          can you provide a bit more context?

          What and which version of faces liberery do you use?

          how does you deployment structure looks like?

          what is in your lib directory(es)

           

          cheers,

          tomaz

          • 2. Re: Call to ajax does not work with JBOSS CRb1
            alesj

            can you provide a bit more context?

            There is absolutely nothing in the log?

            Perhaps enable debug or even trace level log for Prime Faces.

            • 3. Re: Call to ajax does not work with JBOSS CRb1
              mihovil

              Here you have a bit more info:

               

              What and which version of faces liberery do you use?


              Prime Faces 3.0


               

              how does you deployment structure looks like?


              EAR:
              ---lib
              -------larisModel.jar
              ---META_INF
              -------MANIFEST.MF (empty)
              ---larisEjb.jar
              ---larisUI.war


               

              what is in your lib directory(es)


              1. LarisEAR.ear\LarisUI.war\WEB-INF\lib\:


              primefaces-3.0.jar
              jasperreports-fonts-4.5.0.jar
              jasperreports-4.5.0.jar
              iText-2.1.5.ja
              commons-logging-1.1.jar
              commons-io-1.4.jar
              commons-fileupload-1.2.2.jar
              commons-digester-1.7.jar
              commons-collections-3.2.1.jar
              commons-beanutils-1.8.2.jar

              • 4. Re: Call to ajax does not work with JBOSS CRb1
                mihovil

                And there is nothing in log... Ales, can you tell me how to turn on these log levels?

                • 5. Re: Call to ajax does not work with JBOSS CRb1
                  alesj

                  can you tell me how to turn on these log levels?

                  https://docs.jboss.org/author/display/AS7/Logging+configuration

                  • 6. Re: Call to ajax does not work with JBOSS CRb1
                    nickarls

                    Try first with a minimal example using only f:ajax and no deps

                    • 7. Re: Call to ajax does not work with JBOSS CRb1
                      mihovil

                      We've tried toput f:ajax on the first - login form - and it stopped working. I do not think this is related to prime faces or similar. Have anyone seen any ajax call working with JBOSS 7.1? I think this is critical issue - and one of the basic ways to make web apps do not work (and worked before with AS 6.0).

                      Ales: after checking log when DEBUG or TRACE is added as suggested, nothing new is displayed - application just stop as soon as ajax call is present on the form.

                      • 8. Re: Call to ajax does not work with JBOSS CRb1
                        nickarls

                        I've run various ICEfaces and plain JSF ajax pages between 7.0.0.Beta2(?) and upstream master without problems.

                        • 9. Re: Call to ajax does not work with JBOSS CRb1
                          nickarls

                          Did a quick test that looks like

                           

                          <?xml version="1.0" encoding="UTF-8"?>

                          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

                          <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"

                                    xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core">

                          <h:head>

                          </h:head>

                          <h:body>

                                    <f:view>

                                              <h:form>

                                                        <h:inputText value="#{bean.data}">

                                                                  <f:ajax event="keyup"/>

                                                        </h:inputText>

                                              </h:form>

                                    </f:view>

                          </h:body>

                          </html>

                           

                          package jboss;

                           

                           

                          import javax.enterprise.inject.Model;

                           

                           

                          @Model

                          public class Bean

                          {

                                    private String data;

                           

                           

                                    public String getData()

                                    {

                                              return data;

                                    }

                           

                           

                                    public void setData(String data)

                                    {

                                              this.data = data;

                                              System.out.println(String.format("Set data %s", data));

                                    }

                          }

                           

                          and markers for web.xml, faces-config.xml and beans.xml

                           

                          Any output when you key in the field when you try at http://localhost/ajax-0.0.1-SNAPSHOT/faces/test.xhtml (or applicable URL)?

                          • 10. Re: Call to ajax does not work with JBOSS CRb1
                            mihovil

                            Dear Nicklas,

                            This works actually - so i assume my statement about critical ajax problem with AS7.1 is not correct...

                             

                            We investigated further the problem:

                            p:ajax, which is based on f:ajax works on login form. It does not work on forms inside the application. After login, we open the "home" form:

                             

                            <ui:composition xmlns="http://www.w3.org/1999/xhtml"

                            xmlns:h="http://java.sun.com/jsf/html"

                            xmlns:f="http://java.sun.com/jsf/core"

                            xmlns:ui="http://java.sun.com/jsf/facelets"

                            xmlns:p="http://primefaces.org/ui" template="template.xhtml">

                            <ui:define name="title">Main page</ui:define>

                            <ui:define name="content">

                              <ui:include src="#{navigationBean.activePage}" />

                            </ui:define>

                            </ui:composition>

                             

                            - this is complete home form and template uses layout component from prime faces and in it's central part (of the form):

                             

                            <p:layoutUnit position="center" scrollable="true">

                               <h:panelGroup id="content" layout="block">  

                                <p:messages id="msgs" showDetail="true" showSummary="false" layout="table"></p:messages>

                                <ui:insert name="content"></ui:insert>

                                <p:messages id="msgsBottom" showDetail="true" showSummary="false" layout="table"></p:messages>

                               </h:panelGroup>

                              </p:layoutUnit>

                             

                            - in "content" we put an active page selected from the menu. And on this page selected ajax does not work in AS7.1. In AS6.1 this form with ajax works.

                             

                            We even tried to put your form (simple example) instead of our selected page it does not work - if we put ajax out it works. So, obviously something with content is wrong...

                             

                            We'll try further to investigate - unfortunatelly we must because it is show-stopper for our app... Shortly, when ajax is inside form is just like it lost session... no log, no response...

                            • 11. Re: Call to ajax does not work with JBOSS CRb1
                              nickarls

                              The JSF version has changed between AS6 and AS7 so you would probably have to check with the PrimeFaces people as to what JSF is supported and what not, if there are any known issues with ajax and templates etc. and in general - start with something working and add one element at the time until it breaks.

                              1 of 1 people found this helpful
                              • 12. Re: Call to ajax does not work with JBOSS CRb1
                                ctomc

                                Hey,

                                 

                                what does your web.xml look like? is it web-app 3.0?

                                also can you try with PrimeFaces 3.1 as looking to their change log they have fixed quite few things that might couse this problem.

                                 

                                 

                                cheers,

                                tomaz

                                • 13. Re: Call to ajax does not work with JBOSS CRb1
                                  mihovil

                                  Hi,

                                  We came somewhere now: downgraded JSF to 2.07 and already works better (probably this combination with PrimeFaces is ok now)... will test again everything and keep you informed.

                                  I'll keep this as not-resolved yet - until tests are done.

                                  Thanks for all the help!

                                   

                                  p.s. PrimeFaces 3.1 does not help, web-app is 3.0, ... we put something like:

                                   

                                  1. <context-param> 
                                  2.   <param-name>org.jboss.jbossfaces.JSF_CONFIG_NAME</param-name> 
                                  3.   <param-value>Mojarra-2.0.7</param-value> 
                                  4. </context-param> 

                                   

                                  into web.xml and ajax calls does not stop forms from working any more....

                                  • 14. Re: Call to ajax does not work with JBOSS CRb1
                                    mihovil

                                    Hi,

                                    I think this is solved now:

                                     

                                    Problem: JBoss 7.1 changed JSF to version 2.13 - and application using Prime Faces 3.0/3.1 does not working any more

                                     

                                    Solution: in web.xml set appropriate JSF - to version 2.0

                                     

                                    However, we found two more problems when migrating from AS6.0 to AS7.1: with multiple $EJB context and connection pool to datasource, which is not returned to application after logout. I will open two new threads for these...

                                     

                                    thanks again and best regards, Mihovil

                                    1 2 Previous Next