We are running t5 on jboss 5.1 without problems, with the following fix.

Appmodule

  /**
   * Needed by Jboss 5 classloader for the application to work
   *
   * @param configuration
   */
  public void contributeAlias(Configuration<AliasContribution>
configuration) {
    configuration.add(AliasContribution.create(ClasspathURLConverter.class,
new Jboss5ClasspathURLConverter()));
  }


Implementation:

/**
 * This service override is needed for T5 to work with Jboss 5.
 *
 * http://www.nabble.com/JBoss5-and-T5-configuration--td21041727.html
 *
 * @author Inge
 *
 */
public class Jboss5ClasspathURLConverter implements ClasspathURLConverter {

  public URL convert(URL url) {

    if (url.getProtocol().equals("vfszip")) {
      try {
        String urlStr = "jar:file:" + url.getPath().replaceAll(".jar/",
".jar!/");
        url = new URL(urlStr);
      }
      catch (MalformedURLException e) {
        throw new IllegalStateException("Should not get here. url = " +
url);
      }
    }

    return url;
  }

}


On Tue, Mar 16, 2010 at 12:36 PM, jaques robert
<mondes_englou...@yahoo.fr>wrote:

> Hello,
>
> I'm trying to run Tapestry 5.1 with JBoss 5.1. However, I'm still having
> this error :
> <<
> 09:58:56,329 ERROR [RequestExceptionHandler] Processing of request failed
> with uncaught exception: Unable to resolve 'pagelink' to a component class
> name.  Available component types: (none).
> org.apache.tapestry5.ioc.internal.util.TapestryException: Unable to resolve
> 'pagelink' to a component class name.  Available component types: (none).
> [at classpath:com/pouet/repository/wizard/tapestry/pages/Index.tml, line 15]
>        at
> org.apache.tapestry5.internal.pageload.PageLoaderImpl.startComponent(PageLoaderImpl.java:742)
>        at
> org.apache.tapestry5.internal.pageload.PageLoaderImpl.component(PageLoaderImpl.java:614)
> >>
>
>
> I've looked in the mail archive of Tapestry-Users and saw :
>
> <<
>
> ok, I found solution for JBoss 5.1.0.
> It's enough to use the same url
> converter that Geoff pointed out and add "-Djboss.vfs.forceCopy=false"
> to JBoss JAVA_OPTS. At least, it solved the problem for me :)
> enjoy,
> m.
> >>
>
> So I've added the -Djboss.vfs.forceCopy=false argument, however it doesn't
> solve anything...
>
> I saw this case opened https://issues.apache.org/jira/browse/TAP5-576,
> however the status is "Won't fix" :(
>
> I've read also that providing another implementation of
> ClasspathURLConverter could resolve it : "
> http://www.mail-archive.com/users@tapestry.apache.org/msg31403.html";
>
> However, how can I plug this classpathurlconverter to my existing project ?
>
> Does somebody
> already managed to resolve this problem ?
>
> Regards,
> mondes_engloutis.
>
>
>

Reply via email to