Cannot load servlet class: org.primefaces.resource.ResourceS

UI Components for JSF
Post Reply
shekhar.kotekar
Posts: 4
Joined: 28 Aug 2011, 08:39

28 Aug 2011, 17:31

Hi,

I am trying to build simple web app using primefaces 3.0.M2 version. I am using Mojarra JSF 2, Eclipse and Jboss 6 to deploy the application.

Whenever I try to deploy my application, JBoss log gives me following error :

Code: Select all

20:56:24,661 INFO  [TomcatDeployment] deploy, ctxPath=/admin-console
20:56:24,870 ERROR [MyfacesConfig] Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.
20:56:25,348 WARN  [LocaleUtils] Locale name in faces-config.xml null or empty, setting locale to default locale : en_IN
20:56:27,545 WARN  [ASHelper] Cannot load servlet class: org.primefaces.resource.ResourceServlet
java.lang.ClassNotFoundException: org.primefaces.resource.ResourceServlet from BaseClassLoader@74cbe891{VFSClassLoaderPolicy@7711c37e{name=vfszip:/C:/Shekhar/JEE_Softwares/jboss/server/default/deploy/HelloJSF.war/ domain=ClassLoaderDomain@515063db{name=vfszip:/C:/Shekhar/JEE_Softwares/jboss/server/default/deploy/HelloJSF.war/ parentPolicy=AFTER_BUT_JAVA_BEFORE parent=ClassLoaderDomain@4ec1a0eb{DefaultDomain}} roots=[MemoryContextHandler@792314436[path= context=vfsmemory://1de712r-dycdgc-grw68f5e-1-grw691pb-2c real=vfsmemory://1de712r-dycdgc-grw68f5e-1-grw691pb-2c], ZipEntryHandler@2030114452[path=HelloJSF.war/WEB-INF/classes context=file:/C:/Shekhar/JEE_Softwares/jboss/server/default/deploy/ real=file:/C:/Shekhar/JEE_Softwares/jboss/server/default/deploy/HelloJSF.war/WEB-INF/classes], DelegatingHandler@913411228[path=HelloJSF.war/WEB-INF/lib/jsf-api.jar context=file:/C:/Shekhar/JEE_Softwares/jboss/server/default/deploy/ real=file:/C:/Shekhar/JEE_Softwares/jboss/server/default/deploy/HelloJSF.war/WEB-INF/lib/jsf-api.jar], DelegatingHandler@1489400240[path=HelloJSF.war/WEB-INF/lib/jsf-impl.jar context=file:/C:/Shekhar/JEE_Softwares/jboss/server/default/deploy/ real=file:/C:/Shekhar/JEE_Softwares/jboss/server/default/deploy/HelloJSF.war/WEB-INF/lib/jsf-impl.jar], DelegatingHandler@1280444248[path=HelloJSF.war/WEB-INF/lib/jstl-api-1.2.jar context=file:/C:/Shekhar/JEE_Softwares/jboss/server/default/deploy/ real=file:/C:/Shekhar/JEE_Softwares/jboss/server/default/deploy/HelloJSF.war/WEB-INF/lib/jstl-api-1.2.jar], DelegatingHandler@492849549[path=HelloJSF.war/WEB-INF/lib/jstl-impl-1.2.jar context=file:/C:/Shekhar/JEE_Softwares/jboss/server/default/deploy/ real=file:/C:/Shekhar/JEE_Softwares/jboss/server/default/deploy/HelloJSF.war/WEB-INF/lib/jstl-impl-1.2.jar], DelegatingHandler@477943564[path=HelloJSF.war/WEB-INF/lib/primefaces-3.0.M2.jar context=file:/C:/Shekhar/JEE_Softwares/jboss/server/default/deploy/ real=file:/C:/Shekhar/JEE_Softwares/jboss/server/default/deploy/HelloJSF.war/WEB-INF/lib/primefaces-3.0.M2.jar]]  delegates=null exported=[META-INF.resources.primefaces.idlemonitor, META-INF.resources.primefaces.rating, org.primefaces.component.password, META-INF.resources.primefaces.lightbox, org.primefaces.component.idlemonitor, META-INF.resources.primefaces.imagecropper, org.primefaces.component.tooltip, META-INF.resources.primefaces.resizable, org.primefaces.mobile.component.panelgrid, org.primefaces.event.data, org.primefaces.component.dock, com.sun.faces.application.annotation, META-INF.resources.primefaces.accordion, com.sun.faces.facelets.compiler, META-INF.resources.primefaces.galleria, META-INF.resources.primefaces.yui.paginator.assets, META-INF.resources.primefaces.toolbar, org.primefaces.component.selectmanymenu, META-INF.resources.primefaces.themes.sam.images, org.primefaces.application, org.primefaces.component.picklist, org.primefaces.model, com.sun.faces.el, META-INF.resources.primefaces.mousewheel, org.primefaces.component.graphicimage, org.apache.taglibs.standard.tag.rt.core, com.sun.faces.xhtml, org.primefaces.component.rowtoggler, META-INF.resources.primefaces.forms, META-INF.resources.primefaces.treetable.images, org.apache.taglibs.standard.tag.common.sql, org.primefaces.component.gmap, META-INF.resources.primefaces.dialog, com.sun.faces.config, META-INF.resources.primefaces.panel, org.apache.taglibs.standard.tag.common.fmt, META-INF.resources.primefaces.calendar, org.apache.taglibs.standard.lang.support, META-INF.resources.primefaces.progressbar, org.primefaces.model.filter, com.sun.faces.component.visit, META-INF.resources.primefaces.notificationbar, javax.faces.bean, com.sun.faces.ext.validator, org.primefaces.component.selectonelistbox, org.primefaces.component.datalist, javax.faces.component.behavior, META-INF.resources.primefaces.picklist, javax.faces.lifecycle, META-INF.resources.primefaces.gmap, META-INF.resources.primefaces.ring, org.primefaces.mobile.component.togglepanel, org.primefaces.component.growl, META-INF.resources.primefaces.treeview, org.primefaces.component.celleditor, com.sun.faces.metadata.taglib, org.primefaces.mobile.component.navbar, org.primefaces.component.colorpicker, org.primefaces.component.tagcloud, org.primefaces.component.filedownload, org.primefaces.component.spacer, org.primefaces.component.hotkey, META-INF.resources.primefaces.stack.assets, javax.faces.webapp, javax.faces.component.visit, javax.faces.convert, org.primefaces.mobile.component.commandbutton, org.apache.taglibs.standard.lang.jstl.parser, org.primefaces.event.map, org.primefaces.component.imageswitch, com.sun.faces.config.configprovider, com.sun.faces.facelets.tag.jstl.fn, org.primefaces.component.chart.pie, org.primefaces.component.inputtext, org.apache.taglibs.standard.resources, org.primefaces.component.captcha, org.apache.taglibs.standard.tag.el.sql, META-INF.resources.primefaces.colorpicker, META-INF.resources.primefaces.poll, META-INF.resources.primefaces.easing, org.primefaces.component.roweditor, META-INF.resources.primefaces.autocomplete, META-INF.resources.primefaces.growl.assets, META-INF.services, com.sun.faces.ext.render, org.primefaces.component.selectonemenu, org.primefaces.component.imagecompare, META-INF.resources.primefaces.datatable, org.primefaces.mobile.component.content, META-INF.resources.primefaces.password, META-INF.resources.primefaces.mobile.images, META-INF.resources.primefaces.ajaxstatus, org.primefaces.component.menu, org.primefaces.component.tabview, META-INF.resources.primefaces.jquery.ui, org.apache.taglibs.standard.functions, com.sun.faces.facelets.tag.ui, META-INF.resources.primefaces.scrollpanel, org.primefaces.mobile.component.view, META-INF.resources.primefaces.keyboard, javax.faces, META-INF.resources.primefaces.dashboard, META-INF.resources.primefaces.menu, org.primefaces.component.autocomplete, javax.faces.component, META-INF.resources.primefaces.dnd, org.primefaces.model.chart, javax.faces.el, org.primefaces.component.wizard, META-INF.resources.primefaces.lightbox.images, org.primefaces.webapp.filter, com.shekhar.jsf, META-INF.resources.primefaces.treetable, com.sun.faces.application, org.apache.taglibs.standard.tag.rt.xml, META-INF.resources.primefaces.fileupload, com.sun.faces.scripting.groovy, org.primefaces.component.inplace, META-INF.resources.primefaces.paginator, org.primefaces.mobile.component.slider, META-INF.resources.primefaces.button, org.primefaces.webapp, org.primefaces.component.spinner, org.primefaces.component.editor, org.primefaces.component.confirmdialog, javax.faces.component.html, META-INF.maven.org.primefaces.primefaces, org.primefaces.component.columns, com.sun.faces.taglib, org.primefaces.mobile.component.footer, org.primefaces.component.dialog, com.sun.faces.context, org.primefaces.component.ajaxstatus, org.apache.taglibs.standard.tag.el.fmt, com.sun.faces.component.validator, META-INF.resources.primefaces.tagcloud, META-INF.resources.primefaces.messages, org.primefaces.component.separator, com.sun.faces.application.view, META-INF.resources.primefaces.hotkey, META-INF.resources.primefaces.slider, org.primefaces.component.remotecommand, org.primefaces.component.button, META-INF.resources.primefaces.treeview.images, org.primefaces.component.messages, org.primefaces.json, org.primefaces.component.progressbar, com.sun.faces.renderkit, javax.faces.model, META-INF.resources.primefaces.mobile, org.primefaces.component.datatable, org.primefaces.component.watermark, org.apache.taglibs.standard.tag.el.xml, META-INF, org.primefaces.component.notificationbar, org.primefaces.component.focus, com.sun.faces.component, org.primefaces.component.dashboard, META-INF.maven.javax.servlet.jsp.jstl.jstl-api, META-INF.resources.primefaces.stack, com.sun.faces.facelets.el, org.primefaces.mobile.component.uiswitch, META-INF.maven.org.glassfish.web.jstl-impl, META-INF.resources.primefaces.growl, com.sun.faces.facelets.tag, org.primefaces.component.chart.bar, org.primefaces.component.scrollpanel, org.primefaces.component.ring, com.sun.faces.mgbean, org.apache.taglibs.standard, org.primefaces.component.stack, org.primefaces.component.inputmask, org.primefaces.component.effect, META-INF.resources.primefaces.log, META-INF.resources.primefaces.push, com.sun.faces, javax.faces.validator, javax.faces.application, META-INF.resources.primefaces.schedule, org.primefaces.component.keyboard, org.primefaces.mobile.component.listview, META-INF.resources.primefaces.printer, org.primefaces.component.layout, org.primefaces.component.media.player, org.apache.taglibs.standard.tag.common.core, org.primefaces.component.toolbar, META-INF.resources.primefaces.core, com.sun.faces.facelets, org.primefaces.component.media, com.sun.faces.lifecycle, META-INF.resources.primefaces.breadcrumb, META-INF.resources.primefaces.jquery, org.apache.taglibs.standard.tag.rt.sql, com.sun.faces.taglib.jsf_core, org.primefaces.mobile.component.buttongroup, org.primefaces.component.fileupload, org.primefaces.component.selectoneradio, org.primefaces.component.imagecropper, org.primefaces.component.contextmenu, META-INF.resources.primefaces.datalist, org.apache.taglibs.standard.tag.el.core, org.apache.taglibs.standard.lang.jstl.test, META-INF.resources.primefaces.fieldset, org.primefaces.comet, org.primefaces.component.slider, META-INF.resources.primefaces.editor, org.primefaces.component.calendar, META-INF.resources.primefaces.tabslider, org.apache.taglibs.standard.lang.jstl.test.beans, org.primefaces.component.treetable, META-INF.resources.javax.faces, META-INF.resources.primefaces.inplace, org.primefaces.component.log, com.sun.faces.facelets.tag.composite, META-INF.resources.primefaces.terminal, META-INF.resources.primefaces.yui.paginator, org.primefaces.component.printer, com.sun.faces.vendor, org.primefaces.component.message, META-INF.resources.primefaces.editor.images, org.primefaces.component.accordionpanel, org.primefaces.component.rating, org.primefaces.component.collector, org.primefaces.component.lightbox, com.sun.faces.taglib.html_basic, org.primefaces.model.tagcloud, org.primefaces.component.behavior.ajax, com.sun.faces.spi, com.sun.faces.ext.component, org.primefaces.mobile.component.header, META-INF.resources.primefaces.charts, META-INF.resources.primefaces.sheet, javax.faces.render, META-INF.resources.primefaces.layout, org.apache.taglibs.standard.tei, org.primefaces.component.datagrid, com.sun.faces.facelets.tag.jstl.core, META-INF.resources.primefaces.spinner, META-INF.resources.primefaces, javax.faces.event, org.primefaces.component.selectmanycheckbox, META-INF.resources.primefaces.imagecompare, org.primefaces.component.schedule, com.sun.faces.facelets.tag.jsf, com.sun.faces.renderkit.html_basic, META-INF.resources.primefaces.wizard, com.sun.faces.resources, com.sun.faces.context.flash, org.primefaces.component.api, org.apache.taglibs.standard.extra.spath, org.primefaces, org.primefaces.component.themeswitcher, org.apache.taglibs.standard.tlv, META-INF.resources.primefaces.themeswitcher, META-INF.resources.primefaces.themes.sam, com.sun.faces.facelets.component, com.sun.faces.io, org.primefaces.component.commandbutton, org.primefaces.component.chart.line, org.primefaces.component.breadcrumb, org.primefaces.component.carousel, org.primefaces.component.outputpanel, org.primefaces.component.column, META-INF.resources.primefaces.yui.utilities, org.primefaces.mobile.component.page, org.apache.taglibs.standard.tag.rt.fmt, META-INF.resources.primefaces.yui.paginator.assets.skins.sam, org.primefaces.component.terminal, META-INF.resources.primefaces.imageswitch, META-INF.resources.primefaces.dock, org.primefaces.event, org.apache.taglibs.standard.lang.jstl, org.primefaces.component.columngroup, org.primefaces.renderkit, org.primefaces.component.poll, META-INF.resources.primefaces.spacer, com.sun.faces.facelets.tag.jsf.html, com.sun.faces.facelets.impl, com.sun.faces.facelets.tag.jsf.core, org.primefaces.mobile.component.button, org.primefaces.component.fieldset, META-INF.resources.primefaces.carousel, META-INF.resources.primefaces.colorpicker.images, org.primefaces.component.resizable, com.sun.faces.component.behavior, org.primefaces.mobile.util, org.primefaces.context, org.primefaces.component.dnd, org.primefaces.component.row, javax.faces.view, org.primefaces.component.galleria, com.sun.faces.config.processor, org.primefaces.component.tree, com.sun.faces.ext.taglib, com.sun.faces.application.resource, org.primefaces.component.menubar, org.primefaces.component.rowexpansion, javax.faces.context, META-INF.resources.primefaces.contextmenu, META-INF.resources.primefaces.inputmask, org.primefaces.component.selectbooleancheckbox, META-INF.resources.primefaces.datagrid, org.primefaces.component.resources, org.primefaces.component.menuitem, org.primefaces.component.export, org.primefaces.component.chart, com.sun.faces.scripting, META-INF.resources.primefaces.tooltip, META-INF.resources.primefaces.tree, org.primefaces.component.submenu, org.primefaces.facelets, org.primefaces.mobile.component.field, org.primefaces.component.push, org.apache.taglibs.standard.tag.common.xml, META-INF.resources.primefaces.watermark, org.primefaces.component.panel, org.primefaces.model.map, com.sun.faces.facelets.util, javax.faces.view.facelets, org.primefaces.component.commandlink, com.sun.faces.util, org.primefaces.component.menubutton, META-INF.resources.primefaces.dock.assets, org.primefaces.component.divider, org.primefaces.component.inputtextarea, META-INF.resources.primefaces.tabview, org.primefaces.util, META-INF.resources.primefaces.wijmo, META-INF.resources.primefaces.confirmdialog] <IMPORT-ALL>NON_EMPTY}}
	at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:452)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
	at org.jboss.webservices.integration.util.ASHelper.getEndpointClass(ASHelper.java:295)
	at org.jboss.webservices.integration.util.ASHelper.getWebServiceServlets(ASHelper.java:398)
	at org.jboss.webservices.integration.util.ASHelper.getJaxwsServlets(ASHelper.java:194)
	at org.jboss.webservices.integration.deployers.WSTypeDeployer.isJaxwsJseDeployment(WSTypeDeployer.java:153)
	at org.jboss.webservices.integration.deployers.WSTypeDeployer.internalDeploy(WSTypeDeployer.java:68)
	at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1448)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1166)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1107)
	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)
	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:823)
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
	at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:783)
	at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:699)
	at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
	at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
	at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
	at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403)
	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)
	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:775)
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
	at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)
	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:258)
	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:97)
	at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:860)
	at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:441)
	at java.lang.Thread.run(Thread.java:619)
20:56:27,808 INFO  [TomcatDeployment] deploy, ctxPath=/HelloJSF
20:56:28,041 INFO  [StandardContext] The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.
20:56:28,172 INFO  [config] Initializing Mojarra 2.0.1 (FCS b02) for context '/HelloJSF'
20:56:33,146 SEVERE [application] JSF1029: The specified InjectionProvider implementation 'org.jboss.web.jsf.integration.injection.JBossInjectionProvider' does not implement the InjectionProvider interface. 
20:56:33,147 INFO  [application] JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with these annotations will have said annotations processed.
20:56:33,937 INFO  [Version] Hibernate Validator 4.0.2.GA
20:56:34,151 INFO  [DefaultTraversableResolver] Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
20:56:39,200 INFO  [PostConstructApplicationEventListener] Running on PrimeFaces 3.0.M2
20:56:39,281 INFO  [TomcatDeployment] deploy, ctxPath=/
20:56:39,476 INFO  [TomcatDeployment] deploy, ctxPath=/jmx-console
20:56:39,633 INFO  [ProfileServiceBootstrap] Loading profile: ProfileKey@52a00770[domain=default, server=default, name=default]
20:56:39,647 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
20:56:39,723 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
20:56:39,735 INFO  [AbstractServer] JBossAS [6.0.0.M1 (build: SVNTag=JBoss_6_0_0_M1 date=200912040958)] Started in 1m:3s:377ms
Any idea why this error is coming? Where is the

Code: Select all

org.primefaces.resource.ResourceServlet
class?

User avatar
jim@jimtough.com
Posts: 142
Joined: 03 Jun 2011, 18:06
Location: Canada

28 Aug 2011, 23:23

I would fix this problem first:
20:56:24,870 ERROR [MyfacesConfig] Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.
PF 3.0,
Mojarra 2.1.4,
Tomcat 7.0.14,
Eclipse Indigo,
IE 7, Chrome

Image
http://stackoverflow.com/users/346112/jim-tough

Would rather be a Decepticon...

cagatay.civici
Prime
Posts: 17987
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

29 Aug 2011, 08:19

You are using a wrong doc to setup PrimeFaces.

Reference user's guide or http://www.primefaces.org/gettingStarted.html

Also as Jim said, you have two jsf implementations in your classpath.

Make sure to have a running JSF app and core JSF knowledge before adding PrimeFaces to your stack.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: david158 and 18 guests