I've just been working in that, too. The problem is that JBoss 5's URLs for jars are not yet recognised by Tapestry. Tapestry has an empty ClasspathURLConverter service which can be overridden in situations like this.

So, create a new implementation of ClasspathURLConverter...


package jumpstart.web.services;

import org.apache.tapestry5.ioc.services.ClasspathURLConverter;

import java.net.MalformedURLException;
import java.net.URL;

/**
* This is intended to override Tapestry's ClasspathURLConverter service. It recognizes JBoss 5's vfszip protocol, which * Tapestry does not understand, by replacing it with the traditional jar protocol, which Tapestry does understand.
 */
public class MyClasspathURLConverterImpl 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;
        }
}


...and override the existing ClasspathURLConverter service:


        @SuppressWarnings("unchecked")
public void contributeAlias(Configuration<AliasContribution> configuration) { configuration .add(AliasContribution.create(ClasspathURLConverter.class, new MyClasspathURLConverterImpl()));
        }


That's all it takes.

There are 2 other tricks to watch out for:
- Hibernate exceptions are a bit different in a couple of situations. The JumpStart business tests find these. - I haven't yet figured out how to get the deployment scanner in conf/ bootstrap/profile.xml to work. If anyone knows then please do tell!

Cheers,
Geoff

On 17/12/2008, at 8:01 AM, jeffk99 wrote:


Trying to migrate our Tapestry5 webapp from JBoss 4.2.1 to JBoss 5.0.0
Had some errors deploying the app, so I decided to try a simple T5 app.
Created the new app with using the Quickstart Archetype.
The simple application deploys without error.
However, when I try to access a page with a browser I get 404 error.
When I submit the request, the logs show INFO entry for TimingFilter:
INFO  [STDOUT] [INFO] AppModule.TimingFilter Request time: 0 ms

This same simple app war works properly on JBoss 4.2.1

I added an onActivate() method to the the Index.java page with some logging
but the logging is not produced.

Does anybody have experience running T5 apps on JBoss 5.0.0?

Any suggestions / advice is appreciated.


Thank you,

Jeff
--
View this message in context: 
http://www.nabble.com/JBoss5-and-T5-configuration--tp21041727p21041727.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


Reply via email to