TomEE 7.0.5 - properly exclude JSF 2.2 jar and include JSF 2.3 jar
up vote
0
down vote
favorite
How do I prevent Tomee from providing the jsf 2.2 jar and insure use of the jsf 2.3 jar?
Is this a maven configuration issue or a missing dependency issue or other?
Tomcat server log at startup includes the warning:
WARNING: You are using the library: myfaces-impl in different versions; first (and probably used) version is: 2.2.12 loaded from: file:/path/to/Apache/TomEE/apache-tomee-plus-7.0.5/lib/myfaces-api-2.2.12.jar, but also found the following versions: 2.3.2 loaded from: file:/path/to/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp3/wtpwebapps/ProjectName/WEB-INF/lib/myfaces-api-2.3.2.jar
Then further in the server log the proper constructor can't be found for TomcatAnnotationLifecycleProvider
SEVERE: org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider
java.lang.InstantiationException: org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider
at java.lang.Class.newInstance(Class.java:427)
at org.apache.myfaces.shared.util.ClassUtils.newInstance(ClassUtils.java:426)
at org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory.createClass(DefaultLifecycleProviderFactory.java:256)
at org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory.resolveLifecycleProviderFromService(DefaultLifecycleProviderFactory.java:203)
at org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory.getLifecycleProvider(DefaultLifecycleProviderFactory.java:86)
at org.apache.myfaces.config.FacesConfigurator.configureManagedBeanDestroyer(FacesConfigurator.java:1522)
at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:618)
at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:465)
at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:70)
at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:189)
at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:103)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4790)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodException: org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider.<init>()
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.newInstance(Class.java:412)
... 19 more
pom.xml is as follows:
<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">
<dependencies>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-impl</artifactId>
<version>2.3.2</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<version>2.3.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>
I have added a faces-config.xml. This is the complete file content:
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
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/web-facesconfig_2_3.xsd"
version="2.3">
<!-- Config here. -->
</faces-config>
maven jsf tomee-7
add a comment |
up vote
0
down vote
favorite
How do I prevent Tomee from providing the jsf 2.2 jar and insure use of the jsf 2.3 jar?
Is this a maven configuration issue or a missing dependency issue or other?
Tomcat server log at startup includes the warning:
WARNING: You are using the library: myfaces-impl in different versions; first (and probably used) version is: 2.2.12 loaded from: file:/path/to/Apache/TomEE/apache-tomee-plus-7.0.5/lib/myfaces-api-2.2.12.jar, but also found the following versions: 2.3.2 loaded from: file:/path/to/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp3/wtpwebapps/ProjectName/WEB-INF/lib/myfaces-api-2.3.2.jar
Then further in the server log the proper constructor can't be found for TomcatAnnotationLifecycleProvider
SEVERE: org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider
java.lang.InstantiationException: org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider
at java.lang.Class.newInstance(Class.java:427)
at org.apache.myfaces.shared.util.ClassUtils.newInstance(ClassUtils.java:426)
at org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory.createClass(DefaultLifecycleProviderFactory.java:256)
at org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory.resolveLifecycleProviderFromService(DefaultLifecycleProviderFactory.java:203)
at org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory.getLifecycleProvider(DefaultLifecycleProviderFactory.java:86)
at org.apache.myfaces.config.FacesConfigurator.configureManagedBeanDestroyer(FacesConfigurator.java:1522)
at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:618)
at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:465)
at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:70)
at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:189)
at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:103)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4790)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodException: org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider.<init>()
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.newInstance(Class.java:412)
... 19 more
pom.xml is as follows:
<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">
<dependencies>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-impl</artifactId>
<version>2.3.2</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<version>2.3.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>
I have added a faces-config.xml. This is the complete file content:
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
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/web-facesconfig_2_3.xsd"
version="2.3">
<!-- Config here. -->
</faces-config>
maven jsf tomee-7
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
How do I prevent Tomee from providing the jsf 2.2 jar and insure use of the jsf 2.3 jar?
Is this a maven configuration issue or a missing dependency issue or other?
Tomcat server log at startup includes the warning:
WARNING: You are using the library: myfaces-impl in different versions; first (and probably used) version is: 2.2.12 loaded from: file:/path/to/Apache/TomEE/apache-tomee-plus-7.0.5/lib/myfaces-api-2.2.12.jar, but also found the following versions: 2.3.2 loaded from: file:/path/to/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp3/wtpwebapps/ProjectName/WEB-INF/lib/myfaces-api-2.3.2.jar
Then further in the server log the proper constructor can't be found for TomcatAnnotationLifecycleProvider
SEVERE: org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider
java.lang.InstantiationException: org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider
at java.lang.Class.newInstance(Class.java:427)
at org.apache.myfaces.shared.util.ClassUtils.newInstance(ClassUtils.java:426)
at org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory.createClass(DefaultLifecycleProviderFactory.java:256)
at org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory.resolveLifecycleProviderFromService(DefaultLifecycleProviderFactory.java:203)
at org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory.getLifecycleProvider(DefaultLifecycleProviderFactory.java:86)
at org.apache.myfaces.config.FacesConfigurator.configureManagedBeanDestroyer(FacesConfigurator.java:1522)
at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:618)
at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:465)
at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:70)
at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:189)
at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:103)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4790)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodException: org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider.<init>()
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.newInstance(Class.java:412)
... 19 more
pom.xml is as follows:
<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">
<dependencies>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-impl</artifactId>
<version>2.3.2</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<version>2.3.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>
I have added a faces-config.xml. This is the complete file content:
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
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/web-facesconfig_2_3.xsd"
version="2.3">
<!-- Config here. -->
</faces-config>
maven jsf tomee-7
How do I prevent Tomee from providing the jsf 2.2 jar and insure use of the jsf 2.3 jar?
Is this a maven configuration issue or a missing dependency issue or other?
Tomcat server log at startup includes the warning:
WARNING: You are using the library: myfaces-impl in different versions; first (and probably used) version is: 2.2.12 loaded from: file:/path/to/Apache/TomEE/apache-tomee-plus-7.0.5/lib/myfaces-api-2.2.12.jar, but also found the following versions: 2.3.2 loaded from: file:/path/to/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp3/wtpwebapps/ProjectName/WEB-INF/lib/myfaces-api-2.3.2.jar
Then further in the server log the proper constructor can't be found for TomcatAnnotationLifecycleProvider
SEVERE: org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider
java.lang.InstantiationException: org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider
at java.lang.Class.newInstance(Class.java:427)
at org.apache.myfaces.shared.util.ClassUtils.newInstance(ClassUtils.java:426)
at org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory.createClass(DefaultLifecycleProviderFactory.java:256)
at org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory.resolveLifecycleProviderFromService(DefaultLifecycleProviderFactory.java:203)
at org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory.getLifecycleProvider(DefaultLifecycleProviderFactory.java:86)
at org.apache.myfaces.config.FacesConfigurator.configureManagedBeanDestroyer(FacesConfigurator.java:1522)
at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:618)
at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:465)
at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:70)
at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:189)
at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:103)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4790)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodException: org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider.<init>()
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.newInstance(Class.java:412)
... 19 more
pom.xml is as follows:
<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">
<dependencies>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-impl</artifactId>
<version>2.3.2</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<version>2.3.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>
I have added a faces-config.xml. This is the complete file content:
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
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/web-facesconfig_2_3.xsd"
version="2.3">
<!-- Config here. -->
</faces-config>
maven jsf tomee-7
maven jsf tomee-7
edited Nov 19 at 18:04
BalusC
835k29431003184
835k29431003184
asked Nov 19 at 18:00
Ted Spradley
2,97221520
2,97221520
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
This just won't work as the TomEE integration just targets the MyFaces 2.2 packages and SPI. We did some refactoring on the MyFaces codebase during 2.3 development. I don't think you can get it running for 100%.
You can however just upgrade to TomEE 8.0.0.M1, which already has MyFaces 2.3 integrated.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
This just won't work as the TomEE integration just targets the MyFaces 2.2 packages and SPI. We did some refactoring on the MyFaces codebase during 2.3 development. I don't think you can get it running for 100%.
You can however just upgrade to TomEE 8.0.0.M1, which already has MyFaces 2.3 integrated.
add a comment |
up vote
1
down vote
accepted
This just won't work as the TomEE integration just targets the MyFaces 2.2 packages and SPI. We did some refactoring on the MyFaces codebase during 2.3 development. I don't think you can get it running for 100%.
You can however just upgrade to TomEE 8.0.0.M1, which already has MyFaces 2.3 integrated.
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
This just won't work as the TomEE integration just targets the MyFaces 2.2 packages and SPI. We did some refactoring on the MyFaces codebase during 2.3 development. I don't think you can get it running for 100%.
You can however just upgrade to TomEE 8.0.0.M1, which already has MyFaces 2.3 integrated.
This just won't work as the TomEE integration just targets the MyFaces 2.2 packages and SPI. We did some refactoring on the MyFaces codebase during 2.3 development. I don't think you can get it running for 100%.
You can however just upgrade to TomEE 8.0.0.M1, which already has MyFaces 2.3 integrated.
answered Nov 19 at 21:58
tandraschko
44835
44835
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53380268%2ftomee-7-0-5-properly-exclude-jsf-2-2-jar-and-include-jsf-2-3-jar%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown