1 2 3 4 Previous Next 59 Replies Latest reply on Mar 7, 2014 3:00 AM by morellik Go to original post
      • 30. Re: Richfaces4 + glassfish 3 performance
        morellik

        Arun Gupta wrote:

         

        OK, try removing the following line:

         

        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>


        create your JDBC resource in WildFly, and then deploy the application.

         

        What version of NetBeans are you using ? It should not be generating an implementation-specific persistence.xml for a standard Java EE application.

         

        I'm reading about WildFly, seems to be interesting. Do you suggest me to migrate my Glassfish applications to it?

         

        In the meantime I'm trying to port my application from Glassfish to WildFly to check the different performance following your documentation. But I receive an error when I try to configure the Realm part. My groups is an Enumerate entity and I've two tables: participant and users_groups (where I've email (the FK to participant) and groupname fields). The user have to enter his email and password to enter in the application.

        I create a file like that:

         

        ./subsystem=security/security-domain=app:add(cache-type="default")
          cd ./subsystem=security/security-domain=app
             ./authentication=classic:add(
               login-modules=[{
                 code="Database",
                 flag="required",
                 module-options={
                   dsJndiName="java:/jdbc/idpbynmr",
                   principalsQuery="select password from participant where email=?",
                   rolesQuery="select groupname, 'Roles'
                               from users_groups ug inner join participant a on ug.email = a.email
                               where a.email = ?", hashAlgorithm="SHA-256",
                   hashEncoding="BASE64",
                   unauthenticatedIdentity="guest"
                 }
               }, {
                 code="RoleMapping",
                 flag="required",
                 module-options={
                   rolesProperties="file:${jboss.server.config.dir}/app.properties",
                   replaceRole="false"
                 }
               }
             ])

         

        But when I try to execute: ./jboss_cli.sh --connect --file=myfile

         

        I receive the following output:

         

        {"outcome" => "success"}
        {
            "outcome" => "success",
            "response-headers" => {
                "operation-requires-reload" => true,
                "process-state" => "reload-required"
            }
        }
        'login-modules=[{' is not a valid operation name.

        • 31. Re: Richfaces4 + glassfish 3 performance
          arungupta

          You just helped discover two bugs:

           

          https://netbeans.org/bugzilla/show_bug.cgi?id=241732

          https://netbeans.org/bugzilla/show_bug.cgi?id=241733

           

          Please add yourself to the bug reports to follow them along.

          • 32. Re: Richfaces4 + glassfish 3 performance
            arungupta

            Enrico,

             

            +1 for migrating your app from GlassFish to WildFly!

             

            GlassFish is the Reference Implementation and meant for reference only. WildFly is where all the latest innovation is happening. I'd encourage you to move your application from GlassFish to WildFly. The following article should help you on this migration:

             

            Migrating a Java EE App from GlassFish to WildFly · WildFly

             

            I'll ask somebody to help you with this error message.

            • 33. Re: Richfaces4 + glassfish 3 performance
              morellik

              Arun Gupta wrote:

               

              Enrico,

               

              +1 for migrating your app from GlassFish to WildFly!

               

              GlassFish is the Reference Implementation and meant for reference only. WildFly is where all the latest innovation is happening. I'd encourage you to move your application from GlassFish to WildFly. The following article should help you on this migration:

               

              Migrating a Java EE App from GlassFish to WildFly · WildFly

               

              I'll ask somebody to help you with this error message.

               

              Thanks, I'm very excite to try WildFly but following the guide you post I receive the error and I cannot go to the next step. I posted also to the forum of WildFly.

              • 34. Re: Richfaces4 + glassfish 3 performance
                morellik

                morellik wrote:

                 

                Arun Gupta wrote:

                 

                Enrico,

                 

                +1 for migrating your app from GlassFish to WildFly!

                 

                GlassFish is the Reference Implementation and meant for reference only. WildFly is where all the latest innovation is happening. I'd encourage you to move your application from GlassFish to WildFly. The following article should help you on this migration:

                 

                Migrating a Java EE App from GlassFish to WildFly · WildFly

                 

                I'll ask somebody to help you with this error message.

                 

                Thanks, I'm very excite to try WildFly but following the guide you post I receive the error and I cannot go to the next step. I posted also to the forum of WildFly.

                 

                Solved the problem giving all command by hand using jboss-cli.sh. I go to next steps.

                • 35. Re: Richfaces4 + glassfish 3 performance
                  arungupta

                  So is your app now running on WildFly ?

                  • 36. Re: Richfaces4 + glassfish 3 performance
                    morellik

                    Arun Gupta wrote:

                     

                    So is your app now running on WildFly ?

                     

                    For the moment I'm unable to deploy the application using NetBeans 7.4 because hasn't support for WildFly. So I'm installing NetBeans 8.0 that seems to  have a plugin for WildFly.

                    • 37. Re: Richfaces4 + glassfish 3 performance
                      morellik

                      Installing NetBeans 8.0 I'm able to use WildFly, but my application doesn't work because I use ExternalContext and now a lot of method doesn't exists.

                      E.g.

                      FacesContext fc = FacesContext.getCurrentInstance();

                      ExternalContext ec = fc.getExternalContext();

                       

                      ec.invalidateSession();

                      ec.responseReset();
                      ec.setResponseContentType(ec.getMimeType(filePath + filename));
                      ec.setResponseContentLength((int) (long) fsize);
                      ec.setResponseHeader("Content-Disposition", "attachment; filename=\"" + filename + "\"");

                       

                              try {
                                  OutputStream output = ec.getResponseOutputStream();

                       

                      I try to search in Google but I don't know if the problem is related to Java 7 (the application was developed in Java 6), JSF 2.2 or WildFly.

                      Do you have suggestion?

                      • 38. Re: Richfaces4 + glassfish 3 performance
                        arungupta

                        Seems like those are valid methods on ExternalContext:

                         

                        http://docs.oracle.com/javaee/7/api/javax/faces/context/ExternalContext.html

                         

                        Can you check your import statements ?

                        • 39. Re: Richfaces4 + glassfish 3 performance
                          morellik

                          I import the following object:

                           

                          import javax.faces.context.ExternalContext;

                          import javax.faces.context.FacesContext;

                           

                          But the problem occurs only when I try to use Jboss or WildFly.

                          • 40. Re: Richfaces4 + glassfish 3 performance
                            arungupta

                            These are standard JSF classes. Is NetBeans not able to resolve them ?

                             

                            Have you tried building the project from CLI ?

                            • 41. Re: Richfaces4 + glassfish 3 performance
                              morellik

                              Arun Gupta wrote:

                               

                              These are standard JSF classes. Is NetBeans not able to resolve them ?

                               

                              Have you tried building the project from CLI ?

                               

                              Yes, NetBeans is not able to resolve them. Now I try to create a new project.

                              • 42. Re: Richfaces4 + glassfish 3 performance
                                morellik

                                I'm sad. Each time I try to do something there is some problem to stop my work. I created a new project to use Java 7 and WildFly under NetBeans 8.

                                When I run the application I obtain the following errors:

                                 

                                2014-02-20 10:54:30,962 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-8) Critical error during deployment: : java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class org.richfaces.resource.ResourceLibraryFactoryImpl
                                    at org.richfaces.resource.ResourceLibraryFactoryImpl.<init>(ResourceLibraryFactoryImpl.java:44) [richfaces-core-impl-4.3.4.Final.jar:4.3.4.Final]
                                    at org.richfaces.application.DefaultModule.configure(DefaultModule.java:42) [richfaces-core-impl-4.3.4.Final.jar:4.3.4.Final]
                                    at org.richfaces.application.ServicesFactoryImpl.init(ServicesFactoryImpl.java:27) [richfaces-core-impl-4.3.4.Final.jar:4.3.4.Final]
                                    at org.richfaces.application.InitializationListener.createFactory(InitializationListener.java:130) [richfaces-core-impl-4.3.4.Final.jar:4.3.4.Final]
                                    at org.richfaces.application.InitializationListener.onStart(InitializationListener.java:68) [richfaces-core-impl-4.3.4.Final.jar:4.3.4.Final]
                                    at org.richfaces.application.InitializationListener.processEvent(InitializationListener.java:152) [richfaces-core-impl-4.3.4.Final.jar:4.3.4.Final]
                                    at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108) [jboss-jsf-api_2.2_spec-2.2.4.jar:2.2.4]
                                    at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2187) [jsf-impl-2.2.4-jbossorg-1.jar:]
                                    at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2163) [jsf-impl-2.2.4-jbossorg-1.jar:]
                                    at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:303) [jsf-impl-2.2.4-jbossorg-1.jar:]
                                    at org.jboss.as.jsf.injection.weld.ForwardingApplication.publishEvent(ForwardingApplication.java:294) [wildfly-jsf-injection-8.0.0.CR1.jar:8.0.0.CR1]
                                    at com.sun.faces.config.ConfigManager.publishPostConfigEvent(ConfigManager.java:691) [jsf-impl-2.2.4-jbossorg-1.jar:]
                                    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:253) [jsf-impl-2.2.4-jbossorg-1.jar:]
                                    at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173) [undertow-servlet-1.0.0.Beta30.jar:1.0.0.Beta30]
                                    at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:182) [undertow-servlet-1.0.0.Beta30.jar:1.0.0.Beta30]
                                    at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:86)
                                    at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:71)
                                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
                                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
                                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
                                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
                                    at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]

                                 

                                2014-02-20 10:54:31,022 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./IDPbyNMRWF: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./IDPbyNMRWF: Failed to start service
                                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.0.CR1.jar:1.2.0.CR1]
                                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
                                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
                                    at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
                                Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class org.richfaces.resource.ResourceLibraryFactoryImpl
                                    at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:207)
                                    at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:86)
                                    at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:71)
                                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.0.CR1.jar:1.2.0.CR1]
                                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.0.CR1.jar:1.2.0.CR1]
                                    ... 3 more
                                Caused by: java.lang.RuntimeException: java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class org.richfaces.resource.ResourceLibraryFactoryImpl
                                    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:273)
                                    at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)
                                    at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:182)
                                    ... 7 more
                                Caused by: java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class org.richfaces.resource.ResourceLibraryFactoryImpl
                                    at org.richfaces.resource.ResourceLibraryFactoryImpl.<init>(ResourceLibraryFactoryImpl.java:44)
                                    at org.richfaces.application.DefaultModule.configure(DefaultModule.java:42)
                                    at org.richfaces.application.ServicesFactoryImpl.init(ServicesFactoryImpl.java:27)
                                    at org.richfaces.application.InitializationListener.createFactory(InitializationListener.java:130)
                                    at org.richfaces.application.InitializationListener.onStart(InitializationListener.java:68)
                                    at org.richfaces.application.InitializationListener.processEvent(InitializationListener.java:152)
                                    at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108)
                                    at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2187)
                                    at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2163)
                                    at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:303)
                                    at org.jboss.as.jsf.injection.weld.ForwardingApplication.publishEvent(ForwardingApplication.java:294)
                                    at com.sun.faces.config.ConfigManager.publishPostConfigEvent(ConfigManager.java:691)
                                    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:253)
                                    ... 9 more

                                 

                                2014-02-20 10:54:31,094 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 40) JBAS014613: Operation ("redeploy") failed - address: ([("deployment" => "IDPbyNMRWF.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-server.default-host./IDPbyNMRWF" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./IDPbyNMRWF: Failed to start service
                                    Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class org.richfaces.resource.ResourceLibraryFactoryImpl
                                    Caused by: java.lang.RuntimeException: java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class org.richfaces.resource.ResourceLibraryFactoryImpl
                                    Caused by: java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class org.richfaces.resource.ResourceLibraryFactoryImpl"}}
                                2014-02-20 10:54:31,126 ERROR [org.jboss.as.server] (management-handler-thread - 40) JBAS015860: Redeploy of deployment "IDPbyNMRWF.war" was rolled back with the following failure message:
                                {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-server.default-host./IDPbyNMRWF" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./IDPbyNMRWF: Failed to start service
                                    Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class org.richfaces.resource.ResourceLibraryFactoryImpl
                                    Caused by: java.lang.RuntimeException: java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class org.richfaces.resource.ResourceLibraryFactoryImpl
                                    Caused by: java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class org.richfaces.resource.ResourceLibraryFactoryImpl"}}
                                2014-02-20 10:54:31,154 INFO  [org.jboss.as.controller] (management-handler-thread - 40) JBAS014774: Service status report
                                JBAS014777:   Services which failed to start:      service jboss.undertow.deployment.default-server.default-host./IDPbyNMRWF: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./IDPbyNMRWF: Failed to start service
                                      service jboss.undertow.deployment.default-server.default-host./IDPbyNMRWF

                                • 43. Re: Richfaces4 + glassfish 3 performance
                                  arungupta

                                  Are you using the latest NetBeans nightly and WildFly plugin version 1.0.6 ?

                                   

                                  NetBeans 8 Beta will not work because the management port for WildFly changed since that release.

                                  • 44. Re: Richfaces4 + glassfish 3 performance
                                    morellik

                                    Arun Gupta wrote:

                                     

                                    Are you using the latest NetBeans nightly and WildFly plugin version 1.0.6 ?

                                     

                                    NetBeans 8 Beta will not work because the management port for WildFly changed since that release.

                                     

                                    I used NB 8 beta because the plugin doesn't work on previous version of NB.