0 Replies Latest reply on Jul 3, 2014 5:30 PM by Jeremy Friesen

    Problems deploying myfaces JSF 2.2.4 webapp in jbossas7

    Jeremy Friesen Newbie

      I say "problems" because I've spent a week trying to get this working and had all sorts of error messages along the way.  Let's start with the environment and technology version details.


      I'm using intellij, maven, jbossas7.1.3, primefaces 4.0 and myfaces implemenation of jsf 2.2.4.
      The webapp deployed and worked fine until I started working on the latest feature attempt, the use of a Crystal Reports Viewer.


      Here are the relevant dependencies



      Of course, one of the things I've found in reading many threads on this forum is that you can't by default use a jsf impl or version other than what is provided by jboss...and indeed earlier error messages I saw had mentioned the default impl 2.1.11-jbossorg-3 and api 2.1_spec-2.0.4.Final.

      So to fix this, let's see part of the web.xml, where I had added


      <web-app xmlns="http://java.sun.com/xml/ns/javaee"

      I realize that I may be using some techniques to fix things based on threads from over a year ago...please let me know if using this context param is out of date.
      For example, I've seen references to org.jboss.jbossfaces.JSF_CONFIG_NAME.


      Here is the latest stacktrace when trying to deploy:

      14:11:13,882 INFO  [org.apache.myfaces.util.ExternalSpecifications] (MSC service thread 1-1) MyFaces CDI support enabled
      14:11:13,886 INFO  [org.apache.myfaces.spi.impl.DefaultInjectionProviderFactory] (MSC service thread 1-1) Using InjectionProvider org.apache
      14:11:13,911 SEVERE [org.apache.myfaces.webapp.AbstractFacesInitializer] (MSC service thread 1-1) An error occured while initializing MyFace
      s: Class org.jboss.as.weld.webtier.jsf.WeldApplicationFactory is no javax.faces.application.ApplicationFactory: java.lang.IllegalArgumentExc
      eption: Class org.jboss.as.weld.webtier.jsf.WeldApplicationFactory is no javax.faces.application.ApplicationFactory
              at javax.faces.FactoryFinder.newFactoryInstance(FactoryFinder.java:512) [myfaces-api-2.2.4.jar:2.2.4]
      14:11:13,959 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/Schedules]] (MSC service thread 1-1) StandardWrapper
      .Throwable: java.lang.NullPointerException
              at org.apache.myfaces.application.ApplicationImpl.getRuntimeConfig(ApplicationImpl.java:259) [myfaces-impl-2.2.4.jar:2.2.4]

      Am I crazy to try to use myfaces here?


      Should I just switch to deploying the web part of my application in a tomcat environment rather than as part of an ear deployed to jboss to run within jbossweb?




      CALLING Stan Silvert! ;-)