Sunday, June 20, 2010

JSF Deployment Error in Eclipse IDE

Hi

In JSF I got the error while deploying a JSF Application on tomcat server using eclipse's Run As -- > on a server

SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
java.lang.NoClassDefFoundError: javax/faces/component/html/HtmlColumn
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:859)
at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:910)
at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:379)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:306)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

Solution :

The solution for above kind of errors are tricky to find since we will be in a state that we provide jsf jars required to run but still the error props up.

The reason is, in eclise when we run as on a server, server while running the application makes use of the jars which we provide. There might be a case we are missing the libraries provided to the server run-time

please check that and it will be running normal

A Ram Prasad

Saturday, June 19, 2010

A Beginner's Help Point to JSF Application using Eclipse IDE

Hi All

I started making use of the JSF application components and libraries to develop a web 2.0 UI making use of the latest technologies like Hibernate, Spring

I would like to share my experiences while learning these technologies.

To Start with, We need the following environment and libraries to start a JSF project

Environment :
1) JDK 1.5 or higher is fine
2) Eclipse IDE Eclipse Galileo,better 3.3 or higher version
3) JSF jar files (jsf-api.jar,jsf-impl.jar)
4) Apache Tomcat 6.0.18
5) JSP (tm) Standard Tag Library 1.2 implementation (jstl.jar)

Steps

1) Make the Web Page Editor the default editor for JSP pages

The JSF Tools Project-contributed Web Page Editor (WPE) is NOT registered as the default editor for JSP files. You can make the WPE the default editor for JSP files by following these steps:
• Navigate to "Window" -> "Preferences..." -> "General" -> "Editors" -> "File Associations"
• In the "File types" section, select "*.jsp"
• In the "Associated editors" section, select "Web Page Editor"
• Select the "Default" button

2) Register JSF libraries (jsf-api.jar,jsf-impl.jar)

We will be creating a library containing the Sun JSF Libraries
Select Windows->Preferences->Web and XML->->JavaServer Faces Tools->Libraries. Click on the New.. button to add a new library. Create the JSF Libraries as shown in the following figures



3) In similar fashion register the jstl libraries (jstl.jar)

4) In Eclipse, Create a new dynamic web application and in the options that come on the screen you can select the configuration as JSF v1.2 project which creates some dafult files required for any JSF Application
The screenshot that shows while configuring a dynamic web application is given below:



In a step to select libraries, provide the jsf libraries which we already created in earlier steps. Click Finish

Now the JSF Project Template is ready and you can start writing JSF Applications

Let me know if anyone faces any problem while configuring

more updates to come

Thank You
A Ram Prasad

Saturday, June 12, 2010

vipassana meditation

Hi

I was not at all available last 2 weeks.

Decided to go and give a humble and honest effort towards meditation a technique which helps you to know yourself and relax yourself from all your material miseries

Gave myself a full 2 weeks course for a disciplined meditation. attended vipassana meditation , a wonderful technique to know thyself

It is completely a 10-day long residential course

It is a really a wonderful experience and recommend everyone to attend the course

The details are fully available at http://www.dhamma.org/en/schedules/schpaphulla.shtml

I will be updating more and more in coming days

A Ram Prasad