java - Adding Primefaces references in Maven Project? -
java - Adding Primefaces references in Maven Project? -
i have been finding difficulties in adding primefaces references web application project. have added required references required in order run primefaces in project. dont know reference still pending. request please guide.
below pom.xml contents
<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> <artifactid>myprojectweb</artifactid> <packaging>war</packaging> <name>myproject web project</name> <parent> <groupid>com.myproject</groupid> <artifactid>myproject</artifactid> <version>0.0.1-snapshot</version> <relativepath>../myproject</relativepath> </parent> <repositories> <repository> <id>prime-repo</id> <name>prime repo</name> <url>http://repository.primefaces.org</url> </repository> </repositories> <dependencies> <dependency> <groupid>asm</groupid> <artifactid>asm-commons</artifactid> <version>3.3</version> </dependency> <dependency> <groupid>com.sun</groupid> <artifactid>tools</artifactid> <version>1.6.0</version> <scope>system</scope> <systempath>c:\program files\java\jdk1.6.0_34\lib\tools.jar</systempath> </dependency> <dependency> <groupid>antlr</groupid> <artifactid>antlr</artifactid> <version>2.7.2</version> </dependency> <dependency> <groupid>junit</groupid> <artifactid>junit</artifactid> <version>4.11</version> </dependency> <dependency> <groupid>org.primefaces</groupid> <artifactid>primefaces</artifactid> <version>5.0</version> </dependency> <dependency> <groupid>org.easymock</groupid> <artifactid>easymock</artifactid> <version>2.4</version> <scope>test</scope> </dependency> <dependency> <groupid>log4j</groupid> <artifactid>log4j</artifactid> <version>1.2.17</version> </dependency> <dependency> <groupid>org.testng</groupid> <artifactid>testng</artifactid> <version>6.8.8</version> </dependency> <dependency> <groupid>org.mockito</groupid> <artifactid>mockito-all</artifactid> <version>1.9.5</version> </dependency> <dependency> <groupid>org.apache.struts</groupid> <artifactid>struts2-core</artifactid> <version>2.3.16.3</version> </dependency> <dependency> <groupid>org.apache.tiles</groupid> <artifactid>tiles-core</artifactid> <version>2.0.6</version> </dependency> <dependency> <groupid>opensymphony</groupid> <artifactid>xwork</artifactid> <version>2.0.3</version> </dependency> <dependency> <groupid>org.apache.struts.xwork</groupid> <artifactid>xwork-core</artifactid> <version>2.3.16.3</version> </dependency> <dependency> <groupid>org.apache.struts</groupid> <artifactid>struts2-convention-plugin</artifactid> <version>2.3.16.3</version> </dependency> <dependency> <groupid>org.apache.struts</groupid> <artifactid>struts-taglib</artifactid> <version>1.3.10</version> </dependency> <dependency> <groupid>org.json</groupid> <artifactid>json</artifactid> <version>20140107</version> </dependency> <dependency> <groupid>org.jboss.arquillian</groupid> <artifactid>arquillian-bom</artifactid> <version>1.1.4.final</version> <type>pom</type> </dependency> <dependency> <groupid>org.jboss.arquillian.protocol</groupid> <artifactid>arquillian-protocol-servlet</artifactid> <version>1.1.4.final</version> </dependency> <dependency> <groupid>org.jboss.arquillian.junit</groupid> <artifactid>arquillian-junit-container</artifactid> <version>1.1.4.final</version> </dependency> <dependency> <groupid>org.jboss.arquillian.container</groupid> <artifactid>arquillian-wlp-managed-8.5</artifactid> <version>1.0.0.beta1</version> </dependency> <dependency> <groupid>com.sun.faces</groupid> <artifactid>jsf-api</artifactid> <version>2.1</version> </dependency> <dependency> <groupid>com.sun.faces</groupid> <artifactid>jsf-impl</artifactid> <version>2.1.3</version> </dependency> <dependency> <groupid>javax.servlet</groupid> <artifactid>jstl</artifactid> <version>1.0.2</version> </dependency> <dependency> <groupid>javax.servlet</groupid> <artifactid>servlet-api</artifactid> <version>2.5</version> </dependency> <dependency> <groupid>javax.servlet.jsp</groupid> <artifactid>jsp-api</artifactid> <version>2.1</version> </dependency> <dependency> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-eclipse-plugin</artifactid> <version>2.9</version> <scope>compile</scope> </dependency> <dependency> <groupid>javax</groupid> <artifactid>javaee-api</artifactid> <version>6.0</version> <scope>provided</scope> </dependency> <dependency> <groupid>com.myproject</groupid> <artifactid>myprojectcommon</artifactid> <version>${project.version}</version> </dependency> <dependency> <groupid>com.myproject</groupid> <artifactid>myprojectejb</artifactid> <version>${project.version}</version> <type>ejb</type> </dependency> </dependencies> <build> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-compiler-plugin</artifactid> <version>${compiler-plugin-version}</version> <configuration> <source>1.6</source> <target>1.6</target> <!-- <compilerarguments> <endorseddirs>${endorsed.dir}</endorseddirs> </compilerarguments> --> </configuration> </plugin> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-war-plugin</artifactid> <version>${war-plugin-version}</version> <configuration> <failonmissingwebxml>false</failonmissingwebxml> <packagingexcludes>web-inf/lib/*.jar</packagingexcludes> <archive> <manifest> <addclasspath>true</addclasspath> <classpathprefix>lib/</classpathprefix> </manifest> </archive> <webresources> <resource> <filtering>true</filtering> <directory>src/main/webapp</directory> <includes> <include>**/web.xml</include> </includes> </resource> </webresources> </configuration> </plugin> </plugins> </build> <properties> <compiler-plugin-version>2.5.1</compiler-plugin-version> <war-plugin-version>2.4</war-plugin-version> </properties> </project>t>
and find below error when run application:
[27/10/14 15:02:51:841 ist] 00000131 webapp e com.ibm.ws.webcontainer.webapp.webapp logservleterror srve0293e: [servlet error]-[faces servlet]: java.lang.noclassdeffounderror: org.primefaces.event.nodeselectevent @ java.lang.class.getdeclaredmethodsimpl(native method) @ java.lang.class.getdeclaredmethods(class.java:748) @ java.beans.standardbeaninfo.introspectmethods(standardbeaninfo.java:665) @ java.beans.standardbeaninfo.introspectmethods(standardbeaninfo.java:652) @ java.beans.standardbeaninfo.<init>(standardbeaninfo.java:153) @ java.beans.introspector.getbeaninfoimpl(introspector.java:272) @ java.beans.introspector.getbeaninfoimplandinit(introspector.java:389) @ java.beans.introspector.getbeaninfo(introspector.java:171) @ javax.el.beanelresolver$beanproperties.<init>(beanelresolver.java:218) @ javax.el.beanelresolver.property(beanelresolver.java:315) @ javax.el.beanelresolver.getvalue(beanelresolver.java:89) @ javax.el.compositeelresolver.getvalue(compositeelresolver.java:55) @ org.apache.myfaces.el.unified.resolver.facescompositeelresolver.getvalue(facescompositeelresolver.java:142) @ org.apache.el.parser.astvalue.getvalue(astvalue.java:174) @ org.apache.el.valueexpressionimpl.getvalue(valueexpressionimpl.java:283) @ org.apache.myfaces.view.facelets.el.eltext$eltextvariable.tostring(eltext.java:202) @ org.apache.myfaces.view.facelets.compiler.attributeinstruction.write(attributeinstruction.java:51) @ org.apache.myfaces.view.facelets.compiler.uiinstructions.encodebegin(uiinstructions.java:46) @ org.apache.myfaces.view.facelets.compiler.uileaf.encodeall(uileaf.java:214) @ javax.faces.component.uicomponent.encodeall(uicomponent.java:622) @ javax.faces.component.uicomponent.encodeall(uicomponent.java:622) @ javax.faces.component.uicomponent.encodeall(uicomponent.java:622) @ javax.faces.component.uicomponent.encodeall(uicomponent.java:622) @ org.apache.myfaces.view.facelets.faceletviewdeclarationlanguage.renderview(faceletviewdeclarationlanguage.java:1320) @ org.apache.myfaces.application.viewhandlerimpl.renderview(viewhandlerimpl.java:263) @ org.apache.myfaces.lifecycle.renderresponseexecutor.execute(renderresponseexecutor.java:85) @ org.apache.myfaces.lifecycle.lifecycleimpl.render(lifecycleimpl.java:240) @ javax.faces.webapp.facesservlet.service(facesservlet.java:191) @ com.ibm.ws.webcontainer.servlet.servletwrapper.service(servletwrapper.java:1227) @ com.ibm.ws.webcontainer.servlet.servletwrapper.handlerequest(servletwrapper.java:776) @ com.ibm.ws.webcontainer.servlet.servletwrapper.handlerequest(servletwrapper.java:458) @ com.ibm.ws.webcontainer.servlet.servletwrapperimpl.handlerequest(servletwrapperimpl.java:178) @ com.ibm.ws.webcontainer.filter.webappfiltermanager.invokefilters(webappfiltermanager.java:1032) @ com.ibm.ws.webcontainer.servlet.cacheservletwrapper.handlerequest(cacheservletwrapper.java:87) @ com.ibm.ws.webcontainer.webcontainer.handlerequest(webcontainer.java:909) @ com.ibm.ws.webcontainer.wswebcontainer.handlerequest(wswebcontainer.java:1662) @ com.ibm.ws.webcontainer.channel.wcchannellink.ready(wcchannellink.java:200) @ com.ibm.ws.http.channel.inbound.impl.httpinboundlink.handlediscrimination(httpinboundlink.java:459) @ com.ibm.ws.http.channel.inbound.impl.httpinboundlink.handlenewrequest(httpinboundlink.java:526) @ com.ibm.ws.http.channel.inbound.impl.httpinboundlink.processrequest(httpinboundlink.java:312) @ com.ibm.ws.http.channel.inbound.impl.httpiclreadcallback.complete(httpiclreadcallback.java:88) @ com.ibm.ws.tcp.channel.impl.aioreadcompletionlistener.futurecompleted(aioreadcompletionlistener.java:175) @ com.ibm.io.async.abstractasyncfuture.invokecallback(abstractasyncfuture.java:217) @ com.ibm.io.async.asyncchannelfuture.firecompletionactions(asyncchannelfuture.java:161) @ com.ibm.io.async.asyncfuture.completed(asyncfuture.java:138) @ com.ibm.io.async.resulthandler.complete(resulthandler.java:204) @ com.ibm.io.async.resulthandler.runeventprocessingloop(resulthandler.java:775) @ com.ibm.io.async.resulthandler$2.run(resulthandler.java:905) @ com.ibm.ws.util.threadpool$worker.run(threadpool.java:1862) caused by: java.lang.classnotfoundexception: org.primefaces.event.nodeselectevent @ java.net.urlclassloader.findclass(urlclassloader.java:434) @ com.ibm.ws.bootstrap.extclassloader.findclass(extclassloader.java:204) @ java.lang.classloader.loadclasshelper(classloader.java:688) @ java.lang.classloader.loadclass(classloader.java:667) @ com.ibm.ws.bootstrap.extclassloader.loadclass(extclassloader.java:119) @ java.lang.classloader.loadclass(classloader.java:650) @ com.ibm.ws.classloader.protectionclassloader.loadclass(protectionclassloader.java:62) @ com.ibm.ws.classloader.protectionclassloader.loadclass(protectionclassloader.java:58) @ com.ibm.ws.classloader.compoundclassloader.loadclass(compoundclassloader.java:584) @ java.lang.classloader.loadclass(classloader.java:650) @ com.ibm.ws.classloader.compoundclassloader.loadclass(compoundclassloader.java:584) @ java.lang.classloader.loadclass(classloader.java:650)
any guidance appreciated.
as stack trace shows, org.primefaces.event.nodeselectevent
class doesn't exist in runtime class path , if take @ pom.xml (as mentioned @gimby in comments), explicitly asked maven not include library folder in final packaged war file:
<packagingexcludes>web-inf/lib/*.jar</packagingexcludes>
i think removing above configuration 'maven-war-plugin' resolve issue (or @ to the lowest degree allow go next error ;)
java maven jsf jsf-2 primefaces
Comments
Post a Comment