Oh I see! thanks  !!

My BreadCrumbs class needs to be an ASO which is needed by the navigation component, it also requires ComponentResources. I was injecting them (using @Inject and @ApplicationState)

So instead I should use InjectService("ComponentResources") in the BreadCrumbsImpl constructor and then Navigation should implement BreadCrumbs. But I'm not sure how to create the service as an ASO in AppModule, perhaps:

@Inject
private ComponentResources resources_;

  public void contributeApplicationStateManager(
MappedConfiguration<Class, ApplicationStateContribution> configuration) { ApplicationStateCreator<BreadCrumbs> creator = new ApplicationStateCreator<BreadCrumbs>() {
           public BreadCrumbs create() {
               return new BreadCrumbs(resources_);
           }
       };

configuration.add(BreadCrumbs.class, new ApplicationStateContribution(
               "session", creator));
   }

Thanks again,
Peter

Howard Lewis Ship wrote:
Please check out:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/reload.html

Basically, you shouldn't mix component classes with services classes. When
you do so, you need to define an interface for your components to implement.

On 10/10/07, Peter Stavrinides <[EMAIL PROTECTED]> wrote:
Hi All

I use Tapestry 5, Java 6 with the maven plugin in eclipse 3.3. I am
building a user specific navigation component, and I am getting this
strange error:

java.lang.LinkageError
loader constraint violation: when resolving method
"com.web.services.BreadCrumbs.getRootLink()Lcom/web/components/IrmLink;"
the class loader (instance of

org/apache/tapestry/internal/services/ComponentInstantiatorSourceImpl$PackageAwareLoader)
of the current class, com/web/components/Navigation, and the class
loader (instance of org/mortbay/jetty/webapp/WebAppClassLoader) for
resolved class, com/web/services/BreadCrumbs, have different Class
objects for the type com/web/components/IrmLink used in the signature

I have tried to clean the project several times thinking this is an
issue with cached resources on the classpath, but have had no luck, so I
am starting to wonder if this could relate to Java 6 and the maven plugin.

Has anyone seen this before?

thanks for your help.

Peter




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to