Differences between revisions 1 and 2
Revision 1 as of 2007-08-28 17:05:05
Size: 2798
Editor: DanielJue
Comment:
Revision 2 as of 2009-09-20 23:20:12
Size: 2798
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

This has happened to me twice, because I was not thinking clearly.

Hopefully you will find this page through a search on the lines of your stack trace, which might look like this:

[ERROR] RequestExceptionHandler - Processing of request failed with uncaught exception: java.lang.AssertionError <java.lang.AssertionError>java.lang.AssertionError
        at org.apache.tapestry.internal.services.ComponentClassResolverImpl.toLogicalName(ComponentClassResolverImpl.java:241)
        at org.apache.tapestry.internal.services.ComponentClassResolverImpl.fillNameToClassNameMap(ComponentClassResolverImpl.java:193)
        at org.apache.tapestry.internal.services.ComponentClassResolverImpl.rebuild(ComponentClassResolverImpl.java:173)
        at org.apache.tapestry.internal.services.ComponentClassResolverImpl.access$700(ComponentClassResolverImpl.java:34)
        at org.apache.tapestry.internal.services.ComponentClassResolverImpl$2.run(ComponentClassResolverImpl.java:153)
        at org.apache.tapestry.ioc.internal.util.ConcurrentBarrier$2.invoke(ConcurrentBarrier.java:178)
        at org.apache.tapestry.ioc.internal.util.ConcurrentBarrier$2.invoke(ConcurrentBarrier.java:176)
        at org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withWrite(ConcurrentBarrier.java:132)
        at org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withWrite(ConcurrentBarrier.java:184)
        at org.apache.tapestry.internal.services.ComponentClassResolverImpl.rebuild(ComponentClassResolverImpl.java:149)
        at org.apache.tapestry.internal.services.ComponentClassResolverImpl.locate(ComponentClassResolverImpl.java:353)
        at org.apache.tapestry.internal.services.ComponentClassResolverImpl.access$900(ComponentClassResolverImpl.java:34)
        at org.apache.tapestry.internal.services.ComponentClassResolverImpl$4.invoke(ComponentClassResolverImpl.java:300)
        at org.apache.tapestry.internal.services.ComponentClassResolverImpl$4.invoke(ComponentClassResolverImpl.java:298)
        

The interesting thing here is that you are getting a Status 500 error, which does not usually happen in Tapestry, at least once you are used to the nice error pages T5 provides.

The problem arises when you create a component, say "foo", and then stick that under a directory named "foo". The case sensitivity between the two does not matter.

Because tapestry does some friendly name changes to your components, it is unable to resolve the class name in this case.

If you had a component FooBar under a directory components/foo/, (so it is actually components/foo/FooBar) , Tapestry will want to resolve this as components/foo/Bar.

This happened to me because I have so many components, and I put them in lots of subdirectories.

Summary: Make sure your component name doesn't match the directory name it's in.

*Same applies for pages.

Tapestry5ComponentClassResolverError (last edited 2009-09-20 23:20:12 by localhost)