Deploying gives me this error

UI Components for JSF
Post Reply
asha_a_v
Posts: 3
Joined: 11 Feb 2009, 23:41

11 Feb 2009, 23:48

I am trying to use primefaces for chart display.

I used the following jars in my lib folder

optimus-0.7.0.jar
primefaces-ui-0.8.0.jar
facestrace.1.1.0.jar
jsf-facelets.jar
jsf-impl.jar
jsf-api.jar

while I deploy I m getting following error.
I m using jdk1.5 and Tomcat6.0

Please help

SEVERE: Error configuring application listener of class org.primefaces.optimus.listener.ContextListener
java.lang.NoClassDefFoundError: com/google/inject/Module

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

12 Feb 2009, 00:44

Optimus 0.7.0 has a mandatory dependency to google guice. This dependency is changed to be optional in new version:0.7.1-SNAPSHOT.

Adding google guice to your project should fix the problem.

asha_a_v
Posts: 3
Joined: 11 Feb 2009, 23:41

12 Feb 2009, 01:20

to use primefaces chart ,is it ok to use only primefaces-ui.jar?My aim to use primeface charts with richfaces.
In one blog I saw you are able to do it successfully right. Can you please provide me the sample you done, So that I can go through the steps you followed to successfully integrate primefaces.I need the lib list you included in the path please.

I added the following jars

guice-1.0.jar
guice-servlet-1.0.jar
guice-spring.jar
guice-struts2.jar


now I m getting following Error and my app doesn't deploy.
SEVERE: Exception sending context initialized event to listener instance of class org.primefaces.optimus.listener.ContextListener
java.lang.NoClassDefFoundError: javax/persistence/EntityManager
at org.primefaces.optimus.persistence.JPAModule.configure(JPAModule.java:35)

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

12 Feb 2009, 11:16

Yes, primefaces modules do not depend on each other, if you just want to use charts, just add primefaces-ui and remove optimus, facestrace. Also remove any optimus related config params from your web.xml. You can remove all guice related jars from your app.

There're a lot of documentation explaining how to use primefaces-ui.

Getting Started
http://primefaces.prime.com.tr/en/gettingStarted.html

Ref Guide
http://primefaces.prime.com.tr/en/documentation.html

Wiki
http://code.google.com/p/primefaces/wiki/Charts

asha_a_v
Posts: 3
Joined: 11 Feb 2009, 23:41

12 Feb 2009, 20:05

thanks cagatay,

I was looking at those examples from cvs. I am successful in deploying the app using primefaces-ui.jar alone.
Like static charts works well. But my application needs live data display.
For that when I looked the example it seems to be improting optimus. So I cannot escape from it if I want to display live data.:)

So I need help to deploy my app with optimus jars also.

I think if I can get a image of wanted jars in the path and web.xml; that should solve the problem right?

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

12 Feb 2009, 21:12

Actually don't consider example app as a reference, since it's an example demo, it contains all the primefaces jars to demonstrate the features, so it has the optimus jar although ui module does not use it

So for ui components, you only need, primefaces-ui.jar. Charts can display live data and listen user events. See the following examples.

Live Data Example

Interactive Charts

arthurzanona
Posts: 5
Joined: 28 Jan 2010, 09:29

28 Jan 2010, 09:38

hi

i have this same problem.
i lost more than 4 hours and not found the solution.
someone knows how to solve this problem?

05:25:58,654 INFO [TomcatDeployer] deploy, ctxPath=/blank-project, warUrl=.../tmp/deploy/tmp7531040769058227920blank-project-exp.war/
05:25:58,810 ERROR [STDERR] 15 [main] INFO org.primefaces.optimus.listener.ContextListener - Initializing Optimus Context
05:25:59,091 ERROR [[/blank-project]] Exception sending context initialized event to listener instance of class org.primefaces.optimus.listener.ContextListener
java.lang.NullPointerException
at org.primefaces.optimus.config.DefaultAnnotationScanner.scanWebInfClasses(DefaultAnnotationScanner.java:106)
at org.primefaces.optimus.config.DefaultAnnotationScanner.scan(DefaultAnnotationScanner.java:41)
at org.primefaces.optimus.config.OptimusBeanContext.initialize(OptimusBeanContext.java:42)

My libs
guice-1.0.jar
optimus-0.9.0-20090909.005018-1.jar
primefaces-1.0.0.RC.jar
richfaces-api-3.2.2.GA.jar
richfaces-impl-3.2.2.GA.jar
richfaces-ui-3.2.2.GA.jar
Jboss 4.2.2 GA


Using Eclipse 3.5 + JBoss Tools

web.xml

Code: Select all


<?xml version="1.0"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
	<display-name>sample</display-name>

	<context-param>
		<param-name>org.richfaces.SKIN</param-name>
		<param-value>blueSky</param-value>
	</context-param>
	<context-param>
		<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
		<param-value>server</param-value>
	</context-param>
	<context-param>
		<param-name>org.richfaces.CONTROL_SKINNING</param-name>
		<param-value>enable</param-value>
	</context-param>
	<context-param>
		<param-name>com.prime.facestrace.DISABLE_TRACE</param-name>
		<param-value>true</param-value>
	</context-param>


	<listener>
		<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
	</listener>
	<!-- Faces Servlet -->
	<servlet>
		<servlet-name>Faces Servlet</servlet-name>
		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet>
		<servlet-name>Resource Servlet</servlet-name>
		<servlet-class>org.primefaces.resource.ResourceServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>


	<!-- Faces Servlet Mapping -->
	<servlet-mapping>
		<servlet-name>Faces Servlet</servlet-name>
		<url-pattern>*.jsf</url-pattern>
	</servlet-mapping>
	<login-config>
		<auth-method>BASIC</auth-method>
	</login-config>


	<filter>
		<display-name>RichFaces Filter</display-name>
		<filter-name>richfaces</filter-name>
		<filter-class>org.ajax4jsf.Filter</filter-class>
	</filter>
	<filter>
		<display-name>Ajax4jsf Filter</display-name>
		<filter-name>ajax4jsf</filter-name>
		<filter-class>org.ajax4jsf.Filter</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>richfaces</filter-name>
		<servlet-name>Faces Servlet</servlet-name>
		<dispatcher>REQUEST</dispatcher>
		<dispatcher>FORWARD</dispatcher>
		<dispatcher>INCLUDE</dispatcher>
	</filter-mapping>
	<filter-mapping>
		<filter-name>ajax4jsf</filter-name>
		<servlet-name>Faces Servlet</servlet-name>
		<dispatcher>FORWARD</dispatcher>
		<dispatcher>REQUEST</dispatcher>
		<dispatcher>INCLUDE</dispatcher>
	</filter-mapping>
</web-app>
 



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

28 Jan 2010, 13:15

Please read forum posting guidelines before posting;

http://primefaces.prime.com.tr/forum/vi ... f=3&t=1194

Number 6.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 42 guests