I recently discovered this amazing tool Forge. Thanks to everybody involved in making it.I downloaded the latest version 3.7.2 and added the forge executable to my path.
All works very well apart from when I:
Want to setup JSF to use version 2.2, pressing tab after entering faces-setup yields no options at all. I would have hoped that it had an option like --version which could be set to 2.2 or 2.0 depending on the current code base requirement.
When I run scaffold-setup --provider Faces I get the following message:
[edsnext]$ scaffold-setup --provider Faces
***ERROR*** Could not install CDI.
***SUCCESS*** Scaffold was setup successfully.
Running cdi-setup gives exactly the same error.
What do I need to do to remedy this please?
EDIT: Below is the output from addon-list ran inside forge
Currently installed addons:
org.jboss.forge.addon:addon-manager,3.7.2.Final
org.jboss.forge.addon:addon-manager-spi,3.7.2.Final
org.jboss.forge.addon:addons,3.7.2.Final
org.jboss.forge.addon:angularjs,2.1.7.Final
org.jboss.forge.addon:bean-validation,3.7.2.Final
org.jboss.forge.addon:configuration,3.7.2.Final
org.jboss.forge.addon:convert,3.7.2.Final
org.jboss.forge.addon:core,3.7.2.Final
org.jboss.forge.addon:database-tools,3.7.2.Final
org.jboss.forge.addon:dependencies,3.7.2.Final
org.jboss.forge.addon:dev-tools-java,3.7.2.Final
org.jboss.forge.addon:environment,3.7.2.Final
org.jboss.forge.addon:facets,3.7.2.Final
org.jboss.forge.addon:git,3.7.2.Final
org.jboss.forge.addon:javaee,3.7.2.Final
org.jboss.forge.addon:javaee-spi,3.7.2.Final
org.jboss.forge.addon:maven,3.7.2.Final
org.jboss.forge.addon:parser-java,3.7.2.Final
org.jboss.forge.addon:parser-json,3.7.2.Final
org.jboss.forge.addon:parser-xml,3.7.2.Final
org.jboss.forge.addon:parser-yaml,3.7.2.Final
org.jboss.forge.addon:projects,3.7.2.Final
org.jboss.forge.addon:projects-generic,3.7.2.Final
org.jboss.forge.addon:resources,3.7.2.Final
org.jboss.forge.addon:rest-client,3.7.2.Final
org.jboss.forge.addon:scaffold,3.7.2.Final
org.jboss.forge.addon:scaffold-faces,3.7.2.Final
org.jboss.forge.addon:scaffold-spi,3.7.2.Final
org.jboss.forge.addon:script,3.7.2.Final
org.jboss.forge.addon:shell,3.7.2.Final
org.jboss.forge.addon:shell-spi,3.7.2.Final
org.jboss.forge.addon:slf4j,1.7.13
org.jboss.forge.addon:templates,3.7.2.Final
org.jboss.forge.addon:templates-spi,3.7.2.Final
org.jboss.forge.addon:testing,3.7.2.Final
org.jboss.forge.addon:text,3.7.2.Final
org.jboss.forge.addon:ui,3.7.2.Final
org.jboss.forge.addon:ui-spi,3.7.2.Final
org.jboss.forge.furnace.container:cdi,2.26.2.Final
org.jboss.forge.furnace.container:simple,2.26.2.Final
org.primefaces.forge:primefaces-forge-addon,1.0.0-SNAPSHOT
EDIT 2: POM file added.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.megchemsa</groupId>
<artifactId>edsnext</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>${project.artifactId}</name>
<description>EDSNext</description>
<url>http://jsf-spec.java.net/</url>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<spec.snapshot.version>2.2</spec.snapshot.version>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-core -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.2.10.Final</version>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.primefaces/primefaces -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.primefaces.themes/all-themes -->
<dependency>
<groupId>org.primefaces.themes</groupId>
<artifactId>all-themes</artifactId>
<version>1.0.10</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.sun.faces/jsf-api -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.2.14</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.sun.faces/jsf-impl -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.2.14</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax/javaee-api -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.enterprise/cdi-api -->
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.7</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.el/javax.el-api -->
<dependency>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
<version>3.0.1-b04</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.servlet.jsp.jstl/jstl-api -->
<dependency>
<groupId>javax.servlet.jsp.jstl</groupId>
<artifactId>jstl-api</artifactId>
<version>1.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.omnifaces/omnifaces -->
<dependency>
<groupId>org.omnifaces</groupId>
<artifactId>omnifaces</artifactId>
<version>2.6.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jboss.weld/weld-api -->
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-api</artifactId>
<version>3.0.Final</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jboss.weld/weld-core-impl -->
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core-impl</artifactId>
<version>3.0.0.Final</version>
</dependency>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.42</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>java.net-maven2-SNAPSHOT-repository</id>
<name>Java.net SNAPSHOT-Repository for Maven</name>
<url>https://maven.java.net/content/repositories/snapshots/</url>
<layout>default</layout>
</repository>
<repository>
<id>java.net-maven2-repository</id>
<name>Java.net Repository for Maven</name>
<url>https://maven.java.net/content/repositories/releases/</url>
<layout>default</layout>
</repository>
</repositories>
</project>
Here is the last portion of the log file:
22:23:49,032 WARNING [org.jboss.forge.addon.facets.FacetFactoryImpl] (AeshProcess: 1) Could not install Facet of type [class org.jboss.forge.addon.facets.AbstractFacet_$$_javassist_504eb0fa-7ec8-42a0-a843-69b4bf92ecc0], due to exception: : java.lang.NullPointerException
at org.jboss.forge.addon.javaee.cdi.CDIFacetImpl_1_1.isInstalled(CDIFacetImpl_1_1.java:78)
at sun.reflect.GeneratedMethodAccessor84.invoke(Unknown Source) [:1.8.0_141]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_141]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_141]
at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:87) [furnace-proxy-2.26.2.Final.jar:2.26.2.Final]
at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:42) [furnace-api-2.26.2.Final.jar:2.26.2.Final]
at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:103) [furnace-proxy-2.26.2.Final.jar:2.26.2.Final]
at org.jboss.forge.addon.facets.AbstractFacet_$$_javassist_504eb0fa-7ec8-42a0-a843-69b4bf92ecc0.isInstalled(AbstractFacet_$$_javassist_504eb0fa-7ec8-42a0-a843-69b4bf92ecc0.java)
at org.jboss.forge.addon.facets.AbstractFaceted.install(AbstractFaceted.java:88) [facets-api-3.7.2.Final.jar:3.7.2.Final]
at org.jboss.forge.addon.facets.FacetFactoryImpl.install(FacetFactoryImpl.java:218) [facets-impl-3.7.2.Final.jar:3.7.2.Final]
at org.jboss.forge.addon.facets.FacetFactoryImpl.install(FacetFactoryImpl.java:145) [facets-impl-3.7.2.Final.jar:3.7.2.Final]
at org.jboss.forge.addon.facets.FacetFactoryImpl.install(FacetFactoryImpl.java:134) [facets-impl-3.7.2.Final.jar:3.7.2.Final]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_141]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_141]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_141]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_141]
at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:87) [furnace-proxy-2.26.2.Final.jar:2.26.2.Final]
at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:42) [furnace-api-2.26.2.Final.jar:2.26.2.Final]
at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:103) [furnace-proxy-2.26.2.Final.jar:2.26.2.Final]
at org.jboss.forge.addon.facets.FacetFactoryImpl_$$_javassist_10c1990e-8260-440c-a497-def4fea52b20.install(FacetFactoryImpl_$$_javassist_10c1990e-8260-440c-a497-def4fea52b20.java) [facets-impl-3.7.2.Final.jar:3.7.2.Final]
at org.jboss.forge.addon.javaee.cdi.ui.CDISetupCommandImpl.execute(CDISetupCommandImpl.java:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_141]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_141]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_141]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_141]
at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:87) [furnace-proxy-2.26.2.Final.jar:2.26.2.Final]
at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:42) [furnace-api-2.26.2.Final.jar:2.26.2.Final]
at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:103) [furnace-proxy-2.26.2.Final.jar:2.26.2.Final]
at org.jboss.forge.addon.javaee.cdi.ui.CDISetupCommandImpl_$$_javassist_b78a036f-215f-4b81-ba53-6f3412fc1a6d.execute(CDISetupCommandImpl_$$_javassist_b78a036f-215f-4b81-ba53-6f3412fc1a6d.java)
at org.jboss.forge.addon.ui.impl.controller.SingleCommandControllerImpl.execute(SingleCommandControllerImpl.java:94)
at org.jboss.forge.addon.shell.aesh.CommandAdapter.execute(CommandAdapter.java:97)
at org.jboss.forge.addon.shell.aesh.ForgeCommandContainer.executeCommand(ForgeCommandContainer.java:88)
at org.jboss.aesh.console.AeshConsoleImpl$AeshConsoleCallbackImpl.execute(AeshConsoleImpl.java:311)
at org.jboss.aesh.console.AeshProcess.run(AeshProcess.java:53)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_141]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_141]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_141]
22:23:49,035 SEVERE [org.jboss.forge.addon.shell.aesh.CommandAdapter] (AeshProcess: 1) Could not install CDI.
Well, I set up a bare project via project-new using your group/artifact ids
then copied in your pom.xml. After running cdi-setup successfully, I've got a new version of the pom.
4 new dependencies are added:
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.interceptor</groupId>
<artifactId>jboss-interceptors-api_1.1_spec</artifactId>
<scope>provided</scope>
</dependency>
And a dependencyManagement section as well:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>3.0.3.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</dependencyManagement>
Full, new pom.xml, post cdi-setup:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.megchemsa</groupId>
<artifactId>edsnext</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>${project.artifactId}</name>
<description>EDSNext</description>
<url>http://jsf-spec.java.net/</url>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<spec.snapshot.version>2.2</spec.snapshot.version>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-core -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.2.10.Final</version>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.primefaces/primefaces -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.primefaces.themes/all-themes -->
<dependency>
<groupId>org.primefaces.themes</groupId>
<artifactId>all-themes</artifactId>
<version>1.0.10</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.sun.faces/jsf-api -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.2.14</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.sun.faces/jsf-impl -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.2.14</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax/javaee-api -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.enterprise/cdi-api -->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.7</version>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
<version>3.0.1-b04</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.el/javax.el-api -->
<dependency>
<groupId>javax.servlet.jsp.jstl</groupId>
<artifactId>jstl-api</artifactId>
<version>1.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.servlet.jsp.jstl/jstl-api -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
<dependency>
<groupId>org.omnifaces</groupId>
<artifactId>omnifaces</artifactId>
<version>2.6.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.omnifaces/omnifaces -->
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-api</artifactId>
<version>3.0.Final</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jboss.weld/weld-api -->
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core-impl</artifactId>
<version>3.0.0.Final</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jboss.weld/weld-core-impl -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.42</version>
</dependency>
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.interceptor</groupId>
<artifactId>jboss-interceptors-api_1.1_spec</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>java.net-maven2-SNAPSHOT-repository</id>
<name>Java.net SNAPSHOT-Repository for Maven</name>
<url>https://maven.java.net/content/repositories/snapshots/</url>
<layout>default</layout>
</repository>
<repository>
<id>java.net-maven2-repository</id>
<name>Java.net Repository for Maven</name>
<url>https://maven.java.net/content/repositories/releases/</url>
<layout>default</layout>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>3.0.3.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
I suppose I'm unlikely to reproduce the issue as it would seem to be related to a previous operation forge has performed on your project. My bare project simply has the advantage of starting from scratch (and without code at that).
As mentioned in the comments above, we both have the same addons installed. I did a second run through project setup with my network interface down to ensure that cdi-setup wasn't reaching out over the network to fetch something that was blocked from your location - that said, it may have done so previously and cached it in my maven repository.
Hopefully this gets your across the hump or at least a little closer to figuring out the source of the problem. I haven't been able to dig up any similar issues to yours.
EDIT #1:
Well, org.jboss.forge.addon.javaee.cdi.CDIFacetImpl_1_1 hasn't changed since 2016, so I assume this code it to blame:
#Override
public boolean isInstalled()
{
boolean installed = super.isInstalled();
if (installed)
{
try
{
XMLResource xmlResource = (XMLResource) getConfigFile();
line 78-> installed = "1.1".equals(xmlResource.getXmlSource().getAttribute("version"));
}
catch (FileNotFoundException e)
{
installed = false;
}
}
return installed;
}
I don't know which config file is being fed down here, but it seems like your installation must be damaged somehow, or your Maven repository has a corrupt file. I haven't been able to remove any addons, so I can't suggest you try to reinstall the javaee plugin.
Maybe try to download the distribution again, unzip it in another directory and try running forge from there? I would also rename your ~/.forge to ~/.forge.bak. Also rm -r ~/.m2/repository/* for completeness.
Beyond that I'm out of ideas. Your next step would be to head over to the Forge Issues site, register, and repost there.
Related
I'm dispairing with this error and hope you can help me. I'm trying to deploy a JSF Project to a Glassfish Server and receive this ERROR:
Error occurred during deployment: Exception while loading the app :
java.lang.IllegalStateException: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: java.lang.RuntimeException:
java.lang.NoSuchFieldError: fFeatures. Please see server.log for more
details.
Important to say, is that when I deploy the application on client-side (Windows) on the same Glassfish Version (4.1.1), it works properly and without any errors. But if I try to deploy it on the Glassfish (on Linux) I receive the error. To contain errors I also tried to deploy it on my Mac. >> Same Error.
I also have red possible solutions like this: "https://github.com/robolectric/robolectric/issues/1026"
It didn't help :(
Do you have any idea?
Thanks a lot.
Here is my POM.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.primefaces</groupId>
<artifactId>myWebApp</artifactId>
<version>1.0.7</version>
<packaging>war</packaging>
<name>myWebApp</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.0</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.faces</artifactId>
<version>2.2.8</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-ldap</artifactId>
<version>4.2.2.RELEASE</version>
<type>jar</type>
</dependency>
<!--
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.16</version>
<type>jar</type>
</dependency>
-->
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-shared</artifactId>
<version>7.6.8</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>2.1.1</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.18</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.0.3.RELEASE</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>xom</groupId>
<artifactId>xom</artifactId>
<version>1.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
<type>jar</type>
</dependency>
<!-- https://mvnrepository.com/artifact/com.cloudbees.thirdparty/vijava -->
<dependency>
<groupId>com.cloudbees.thirdparty</groupId>
<artifactId>vijava</artifactId>
<version>5.1</version>
</dependency>
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>2.1.7</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<type>jar</type>
</dependency>
<!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc -->
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>6.1.6.jre8-preview</version>
</dependency>
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.39</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mortbay.jetty/jetty -->
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<version>7.0.0.pre5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-security -->
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-security</artifactId>
<version>9.4.3.v20170317</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mortbay.jetty/jetty-util -->
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-util</artifactId>
<version>7.0.0.pre5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.16</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-scratchpad -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-scratchpad</artifactId>
<version>3.16</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.16</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml-schemas -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>3.16</version>
</dependency>
<!-- https://mvnrepository.com/artifact/fr.opensagres.xdocreport/org.apache.poi.xwpf.converter.pdf -->
<dependency>
<groupId>fr.opensagres.xdocreport</groupId>
<artifactId>org.apache.poi.xwpf.converter.pdf</artifactId>
<version>1.0.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.codehaus.mojo/exec-maven-plugin -->
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.ibm.icu/icu4j -->
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
<version>59.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.vmware/vijava -->
<dependency>
<groupId>com.vmware</groupId>
<artifactId>vijava</artifactId>
<version>5.1</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>prime-repo</id>
<name>PrimeFaces Maven Repository</name>
<url>http://repository.primefaces.org</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.9.v20130131</version>
<configuration>
<webAppConfig>
<contextPath>/ultima</contextPath>
</webAppConfig>
<scanIntervalSeconds>5</scanIntervalSeconds>
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>8095</port>
</connector>
</connectors>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<webResources>
<resource>
<directory>${build.sourceDirectory}</directory>
<targetPath>sources</targetPath>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>distribute</id>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>build-layout</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/assemble/layout.xml</descriptor>
</descriptors>
<finalName>${project.name}-layout-${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
<execution>
<id>build-theme</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/assemble/theme.xml</descriptor>
</descriptors>
<finalName>${project.name}-theme-${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
I thought that it would be easy to replace JSF bean by CDI bean. But it's being a slow start. Very slow.
I'm using Tomcat 8.5 and JSF 2.2, and I'm trying to use CDI. I tried different configurations, with different results but nothing works, so, I follow the orientation in http://balusc.omnifaces.org/2013/10/how-to-install-cdi-in-tomcat.html and that's what I got.
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Workflow]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:911)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:890)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
My configurations are:
\META-INF\Context.xml
<!-- language: lang-html -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<Context reloadable="true">
<Resources cachingAllowed="true" cacheMaxSize="20000" />
<Resource
name="jdbc/FlowDB"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="30"
maxWait="10000"
username="xxxx"
password="xxxxxxxxxxx"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/flow?autoReconnect=true" />
<Resource
name="mail/Session"
auth="Container"
type="javax.mail.Session"
mail.smtp.host="localhost"
mail.smtp.port="25"
mail.smtp.auth="true"
mail.smtp.user="xxxxx#localhost"
mail.smtp.password="123456" />
<!-- Binding BeanManager to JNDI -->
<Resource
name="BeanManager"
auth="Container"
type="javax.enterprise.inject.spi.BeanManager"
factory="org.jboss.weld.resources.ManagerObjectFactory"/>
<!-- -->
</Context>
\WEB-INF\beans.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
bean-discovery-mode="annotated"
>
</beans>
Pom.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.faces</artifactId>
<version>2.2.10</version>
</dependency>
<!-- Hibernate -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.3.4.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>3.3.0.Final</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-validator -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<!-- <version>4.3.2.Final</version> -->
<version>5.2.4.Final</version>
</dependency>
<!-- MySQL -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.30</version>
<scope>provided</scope>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${spring.security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${spring.security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- SPRING DATA JPA - https://mvnrepository.com/artifact/org.springframework.data/spring-data-jpa -->
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>1.10.2.RELEASE</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.enterprise/cdi-api 'INFO: CDI #ViewScoped bean functionality unavailable' http://weld.cdi-spec.org/
-->
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet</artifactId>
<version>2.3.5.Final</version>
</dependency>
<!-- Primefaces -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>5.3</version>
</dependency>
<!-- Primefaces Theme -->
<!-- https://mvnrepository.com/artifact/org.primefaces.extensions/all-themes -->
<dependency>
<groupId>org.primefaces.themes</groupId>
<!-- <artifactId>all-themes</artifactId> -->
<artifactId>bootstrap</artifactId>
<version>1.0.8</version>
</dependency>
<!-- Email -->
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-email</artifactId>
<version>1.3.3</version>
</dependency>
<!-- JUnit ยป 4.12 -->
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<!-- slf4j-log4j -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.6.2</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.6.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.webjars/font-awesome -->
<dependency>
<groupId>org.webjars</groupId>
<artifactId>font-awesome</artifactId>
<version>4.6.3</version>
</dependency>
</dependencies>
I suspect that something may be wrong in my pom.xml, or with Tomcat 8.5, or with something else. But there is not much left...
Thank in advance.
SOLUTION
Seems that a library was missing, Java Annotation Indexer or Jandex, which I already tried before, but not at the right way obviously. Not the right set of libraries and/or not the right scope.
after apply this configurations
plus the dependency below
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jandex</artifactId>
<version>1.2.4.Final</version>
</dependency>
Seems to start working fine.
So, the relevant section of my POM.XML was:
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>1.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet</artifactId>
<version>2.3.5.Final</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jandex</artifactId>
<version>1.2.4.Final</version>
</dependency>
I'm trying to follow the Getting started with Arquillian example here: http://arquillian.org/guides/getting_started/
I'am using eclipse Luna. My pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.arquillian.example</groupId>
<artifactId>arquillian-tutorial</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>arquillian-tutorial</name>
<url>http://arquillian.org/guides/getting_started/</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>1.0.0.Final</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>1.0.0.Final</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-weld-ee-embedded-1.1</artifactId>
<version>1.0.0.CR9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core</artifactId>
<version>2.3.5.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.6.4</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
When executing the test, I end up with the following error:
org.jboss.weld.exceptions.IllegalStateException: WELD-000144: CDI API version mismatch. CDI 1.0 API detected on classpath. Weld requires version 1.1 or better.
at org.jboss.weld.bootstrap.WeldStartup.checkApiVersion(WeldStartup.java:242)
at org.jboss.weld.bootstrap.WeldStartup.startContainer(WeldStartup.java:175)
at org.jboss.weld.bootstrap.WeldBootstrap.startContainer(WeldBootstrap.java:69)
at org.jboss.weld.bootstrap.WeldBootstrap.startContainer(WeldBootstrap.java:64)
How can I fix this - preferably by using older version of Weld package as I am not able to change my development environment setup.
Adding the following dependency into pom.xml resolved the problem:
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>1.2</version>
</dependency>
It has been corrected in the guide already, you have to change
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>1.0.0.Final</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
to
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-7.0</artifactId>
<version>1.0.3.Final</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
I am developing a JSF (2.2) application and using Icefaces 4.0.
During development with the myEclipse IDE I have been using the integrated Tomcat 7 server to test my application. However, when the application is ready for production purposes, the intended application server is JBoss 8 Wildfly (8.0).
When trying to deploy my maven generated war file onto the local JBoss server, I receive lots of deployment errors. My main question is...
Are #ManagedBean and #ManagedProperty compatible with use on the JBoss server, or do I have to use #named and #inject annotations?
Many of the errors are of this kind:
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001414: Bean name is ambiguous. Name javax.enterprise.context.conversation resolves to beans:
- Managed Bean [class org.jboss.weld.conversation.ConversationImpl] with qualifiers [#Named #Default #Any],
- Managed Bean [class org.jboss.weld.conversation.ConversationImpl] with qualifiers [#Named #Default #Any]
I am new to using JBoss and JSF, so any advice will be helpful.
Full stack trace is too large for stack overflow post maximum amount of characters so the link to the text file is here:
https://drive.google.com/file/d/0BxOe4O5HlWJScktaQmJGYUtldFU/view?usp=sharing
The jars in my WEB-INF/lib relating to "welds" are as follows:
webservices-api-osgi-2.0.1.jar
weld-api-1.0-SP1.jar
weld-core-1.0.1-SP3.jar
weld-osgi-bundle-1.0.1-SP3.jar
weld-spi-1.0-SP1.jar
EDIT
POM.xml as follows
<?xml version="1.0"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>oag.com.reference</groupId>
<artifactId>web</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>ReferenceDataWeb </name>
<packaging>war</packaging>
<description>Reference data web project.</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webappDirectory>src/main/webapp</webappDirectory>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>bean-validator</artifactId>
<version>3.0-JBoss-4.0.2</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.annotation</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.ejb</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.enterprise.deploy</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.jms</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.management.j2ee</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.resource</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.security.auth.message</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.security.jacc</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.servlet</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.servlet.jsp</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.servlet.jsp.jstl</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.transaction</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api-osgi</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>jstl-impl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.3</version>
</dependency>
<dependency>
<groupId>org.icefaces</groupId>
<artifactId>icefaces</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.icefaces</groupId>
<artifactId>icefaces-ace</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.icepush</groupId>
<artifactId>icepush</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.icefaces</groupId>
<artifactId>icefaces-compat</artifactId>
<version>3.3.0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.oag.reference</groupId>
<artifactId>business</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.7</version>
</dependency>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>webservices-api-osgi</artifactId>
<version>2.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-osgi-bundle</artifactId>
<version>1.0.1-SP3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.2.7</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.2.7</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
Thanks
I've updated glassfish 3.1.2.2 to Mojarra 2.2.8-03 by copying the new javax.faces.jar and javax.el.jar to the $GLASSFISH_HOME/glassfish/modules directory. After redeploying my application, I've found that the function of:concat is no longer being resolved - when I try to render JSF pages with this code I get the following error. I was wondering where I've gone wrong, I imagine I've forgotten up grade a library or our project pom.xml. This is on a dev machine, using netbeans to deploy.
Exception thrown
javax.faces.view.facelets.FaceletException: Function 'of:concat' not found
at com.sun.faces.facelets.tag.AbstractTagLibrary$UserComponentHandlerFactory.createHandler(AbstractTagLibrary.java:344)
at com.sun.faces.facelets.tag.AbstractTagLibrary.createTagHandler(AbstractTagLibrary.java:723)
at com.sun.faces.facelets.tag.CompositeTagLibrary.createTagHandler(CompositeTagLibrary.java:194)
at com.sun.faces.facelets.compiler.TagUnit.createFaceletHandler(TagUnit.java:121)
at com.sun.faces.facelets.compiler.TextUnit.createFaceletHandler(TextUnit.java:117)
at com.sun.faces.facelets.compiler.CompilationUnit.getNextFaceletHandler(CompilationUnit.java:115)
at com.sun.faces.facelets.compiler.TagUnit.getNextHandler(TagUnit.java:125)
at javax.faces.view.facelets.TagHandler.<init>(TagHandler.java:116)
at com.sun.faces.facelets.tag.TagHandlerImpl.<init>(TagHandlerImpl.java:58)
at com.sun.faces.facelets.tag.composite.ImplementationHandler.<init>(ImplementationHandler.java:76)
at sun.reflect.GeneratedConstructorAccessor186.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
...
Here's the project pom.xml.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<snip package info />
<properties>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<netbeans.hint.deploy.server>gfv3ee6</netbeans.hint.deploy.server>
</properties>
<dependencies>
<dependency>
<groupId>com.smartbear</groupId>
<artifactId>swagger4j</artifactId>
<version>1.0-beta4</version>
</dependency>
<dependency>
<groupId>com.wordnik</groupId>
<artifactId>swagger-jaxrs_2.10</artifactId>
<version>1.3.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>1.0-b06</version>
</dependency>
<dependency>
<groupId>org.omnifaces</groupId>
<artifactId>omnifaces</artifactId>
<version>1.8.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2.5</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.0.13</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.12</version>
</dependency>
<dependency>
<groupId>org.glassfish.extras</groupId>
<artifactId>glassfish-embedded-all</artifactId>
<version>3.2-b06</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.main.extras</groupId>
<artifactId>glassfish-embedded-all</artifactId>
<version>3.1.2.2</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>oro</groupId>
<artifactId>oro</artifactId>
<version>2.0.8</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.2-1002-jdbc4</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>14.0.1</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>4.0</version>
</dependency>
<dependency>
<groupId>org.primefaces.themes</groupId>
<artifactId>bootstrap</artifactId>
<version>1.0.10</version>
</dependency>
<dependency>
<groupId>dnsjava</groupId>
<artifactId>dnsjava</artifactId>
<version>2.1.6</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs>
</compilerArguments>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${endorsed.dir}</outputDirectory>
<silent>true</silent>
<artifactItems>
<artifactItem>
<groupId>javax</groupId>
<artifactId>javaee-endorsed-api</artifactId>
<version>6.0</version>
<type>jar</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
It turns out that this was caused by a piece of invalid JSF that used to compile and work, but doesn't compile under the newer version of Mojarra.
Old Code
<h:outputLink value="/alink" target="_blank">
#{msg[of:concat(of:concat('prefix-', cc.attrs.rType), '-postfix')]}
</h:outputLink>
New Code
<h:outputLink value="/alink" target="_blank">
<h:outputText value="#{msg[ca:concat('prefix-', cc.attrs.rType, '-postfix')]}" />
</h:outputLink>