This works. In ClasspathURLConverter replace this, which worked in JBoss 5...
URLConnection connection = url.openConnection(); Object virtualFile = connection.getContent(); Object zipEntryHandler = invoke(virtualFile, "getHandler"); Object realUrl = invoke(zipEntryHandler, "getRealURL"); return (URL) realUrl; ...with this for JBoss 6... URLConnection connection = url.openConnection(); Object virtualFile = connection.getContent(); File physicalFile = (File) invoke(virtualFile, "getPhysicalFile"); URL physicalFileURL = physicalFile.toURI().toURL(); return physicalFileURL; Here's the full source... package jumpstart.web.services; import java.io.File; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.net.URL; import java.net.URLConnection; import org.apache.tapestry5.ioc.services.ClasspathURLConverter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class ClasspathURLConverterJBoss6 implements ClasspathURLConverter { private static Logger _logger = LoggerFactory.getLogger(ClasspathURLConverterJBoss6.class); public URL convert(URL url) { if (url != null && url.getProtocol().startsWith("vfs")) { // supports virtual filesystem used by JBoss 6.x try { URLConnection connection = url.openConnection(); Object virtualFile = connection.getContent(); File physicalFile = (File) invoke(virtualFile, "getPhysicalFile"); URL physicalFileURL = physicalFile.toURI().toURL(); return physicalFileURL; } catch (Exception e) { _logger.error(e.getCause().toString()); } } return url; } private Object invoke(Object target, String methodName) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { Class<?> type = target.getClass(); Method method; try { method = type.getMethod(methodName); } catch (NoSuchMethodException e) { method = type.getDeclaredMethod(methodName); method.setAccessible(true); } return method.invoke(target); } } Cheers, Geoff On 07/05/2011, at 5:28 PM, Geoff Callender wrote: > Oops - don't modify ClasspathURLConverter as I did below. > > The JBoss server log shows that Tapestry's services start but no > pages/components/mixins have been found, ie. there are no INFO messages from > ComponentClassResolver. > > The solution will be to get ClasspathURLConverter working again. > > > On 07/05/2011, at 3:44 PM, Geoff Callender wrote: > >> I'm also having trouble with JBoss 6. I'm trying to deploy jumpstart's ear. >> >> First, a fix to the ClasspathURLConverter for JBoss 6. Instead of this... >> >> if (url != null && url.getProtocol().startsWith("vfs")) { >> >> try this... >> >> if (url != null && url.getProtocol().startsWith("vfs") && >> !url.getPath().endsWith("/")) { >> >> Actually, it might not be needed at all, but I don't know for sure yet. >> >> The business layer runs fine and I can run remote tests to it just fine. >> >> The web layer appears to be deployed OK, and when I do requests to it I can >> confirm they are passing through my PageProtectionFilter, so Tapestry's >> running and my requests are reaching the servlet filters. >> >> So it appears that Tapestry's getting short-circuited. My guess is that it >> can't find the page class or template. >> >> >> On 06/05/2011, at 8:30 AM, Thiago H. de Paula Figueiredo wrote: >> >>> On Thu, 05 May 2011 18:34:18 -0300, Jabbar <aja...@gmail.com> wrote: >>> >>>> Hello Adam, >>>> >>>> We've always used JBoss, it's the company standard. I could perhaps use >>>> Glassfish or Jetty to host the application. The application works perfectly >>>> using the run jetty run eclipse plugin. >>> >>> What's the error message when you try to run the application in JBoss? >>> >>> -- >>> Thiago H. de Paula Figueiredo >>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, >>> and instructor >>> Owner, Ars Machina Tecnologia da Informação Ltda. >>> http://www.arsmachina.com.br >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >> >