permaculture playing cards
The moose likes JSF and the fly likes Cannot instantiate component with component-type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Cannot instantiate component with component-type" Watch "Cannot instantiate component with component-type" New topic

Cannot instantiate component with component-type

Kaustav Ganguly

Joined: Dec 14, 2009
Posts: 28

I have defined some custom page tag and trying to use it in my application. I am running my server in eclipse and the component class is present in a jar file. While I try to load the page I am getting the exception "SEVERE: JSF1068: Cannot instantiate component with component-type page". Seems that it is not able to load the page component class present inside the jar file.

Interestingly when I extract the component classes and put them directly under the Web Application project in eclipse it works fine.

Please let me know if there is any pointer to the issue.

My web.xml has the following entry


Tag defination is


And the tag component class is

The error stack trace is

SEVERE: JSF1068: Cannot instantiate component with component-type page
13:01:11,471 ERROR [XYZRenderingManager] render: handleException(RenderingException)
13:01:11,471 ERROR [XYZRenderingManager] Unhandled exception thrown during rendering
Tom Fulton
Ranch Hand

Joined: Mar 30, 2006
Posts: 96
Well, by your description, it's acting like a classpath problem. How have you added the .jar to your project?

If you can extract the class and place it in the project, and it works, that means there isn't anything structurally wrong with the configuration. So I'd suggest trying a couple of different ways of making the .jar visible to both your project and the server (remember, the fact that the project can see it doesn't necessarily make it possible for the server to see it).

Good luck, and let us know what you find.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

The fact that you're running Eclipse is tangental. To work properly, a webapp must be in WAR format, Eclipse or not, and that means that you must have a copy of the JAR in the WAR's WEB-INF/lib directory.

Eclipse normally doesn't automatically do that kind of stuff, which is why tools such as Ant and Maven are commonly used in webapp development. There are Eclipse plugins for both of these tools (Ant is built-in to the standard Java distro).

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Cannot instantiate component with component-type
It's not a secret anymore!