You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Onno Scheffers <on...@piraya.nl> on 2009/05/26 18:39:02 UTC

Does T5.1.0.5 depend on Java6?

I'm still on Java 5 and trying to upgrade Tapestry from 5.0.18 to 5.1.0.5.

On startup I see the error-message: java.lang.NoClassDefFoundError:
javax/xml/stream/XMLResolver
The XMLResolver was only added to Java 1.6 according to its docs (
http://java.sun.com/javase/6/docs/api/javax/xml/stream/XMLResolver.html).

I didn't read anything in the upgrade notes or release notes about this, so
I was wondering if I missed something?

Full stacktrace:
2009-05-26 18:14:27.280::WARN:  failed app
java.lang.RuntimeException: Error invoking service binder method
org.apache.tapestry5.internal.services.InternalModule.bind(ServiceBinder)
(at InternalModule.java:65): javax/xml/stream/XMLResolver
    at
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.bind(DefaultModuleDefImpl.java:495)
    at
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.<init>(DefaultModuleDefImpl.java:119)
    at
org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:124)
    at
org.apache.tapestry5.internal.TapestryAppInitializer.addModules(TapestryAppInitializer.java:128)
    at
org.apache.tapestry5.internal.TapestryAppInitializer.<init>(TapestryAppInitializer.java:90)
    at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:74)
    at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
    at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589)
    at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
    at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
    at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510)
    at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
    at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
    at
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
    at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
    at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.jetty.Server.doStart(Server.java:222)
    at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:977)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.mortbay.start.Main.invokeMain(Main.java:194)
    at org.mortbay.start.Main.start(Main.java:509)
    at org.mortbay.start.Main.main(Main.java:119)
Caused by: java.lang.NoClassDefFoundError: javax/xml/stream/XMLResolver
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
    at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at
org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366)
    at
org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
    at
org.apache.tapestry5.internal.services.InternalModule.bind(InternalModule.java:66)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.bind(DefaultModuleDefImpl.java:466)
    ... 29 more
java.lang.RuntimeException: Error invoking service binder method
org.apache.tapestry5.internal.services.InternalModule.bind(ServiceBinder)
(at InternalModule.java:65): javax/xml/stream/XMLResolver
    at
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.bind(DefaultModuleDefImpl.java:495)
    at
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.<init>(DefaultModuleDefImpl.java:119)
    at
org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:124)
    at
org.apache.tapestry5.internal.TapestryAppInitializer.addModules(TapestryAppInitializer.java:128)
    at
org.apache.tapestry5.internal.TapestryAppInitializer.<init>(TapestryAppInitializer.java:90)
    at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:74)
    at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
    at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589)
    at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
    at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
    at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510)
    at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
    at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
    at
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
    at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
    at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.jetty.Server.doStart(Server.java:222)
    at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:977)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.mortbay.start.Main.invokeMain(Main.java:194)
    at org.mortbay.start.Main.start(Main.java:509)
    at org.mortbay.start.Main.main(Main.java:119)
Caused by: java.lang.NoClassDefFoundError: javax/xml/stream/XMLResolver
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
    at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at
org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366)
    at
org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
    at
org.apache.tapestry5.internal.services.InternalModule.bind(InternalModule.java:66)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.bind(DefaultModuleDefImpl.java:466)
    ... 29 more

Re: Does T5.1.0.5 depend on Java6?

Posted by Howard Lewis Ship <hl...@gmail.com>.
The Tapestry CI server uses JDK 1.5 so we know pretty quickly if
Tapestry stops being JDK 1.5 compatible.

On Tue, May 26, 2009 at 11:33 AM, Onno Scheffers <on...@piraya.nl> wrote:
>>
>> While StAX is indeed part of JDK6, its more likely that you're simply
>> missing the stax-api and woodstox jars on your classpath. Woodstox is an
>> implementation
>> of StAX for JDKs <6.
>>
>> With maven they are correctly added to the classpath as transitive
>> dependencies. :)
>
>
>
> Hi Holger, thanks. That did the trick.
>
> I already had those libraries on my project. I just forgot to include the
> stax-api-1.0.1.jar and stax2-api-3.0.1.jar when updating the dependencies in
> IntelliJ IDEA, so during deployment those jar-files didn't get copied over
> to the exploded folder.
>
> I'm not familiar with StaX myself and Googling for the missing class pointed
> me to the JDK docs first.
>
> The dependencies are listed here:
> http://tapestry.apache.org/tapestry5.1/tapestry-core/dependencies.html
> So even though that list was generated by Maven I can still happily keep
> ignoring it for my own projects :o)
>
>
> regards,
>
> Onno
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

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


Re: Does T5.1.0.5 depend on Java6?

Posted by Onno Scheffers <on...@piraya.nl>.
>
> While StAX is indeed part of JDK6, its more likely that you're simply
> missing the stax-api and woodstox jars on your classpath. Woodstox is an
> implementation
> of StAX for JDKs <6.
>
> With maven they are correctly added to the classpath as transitive
> dependencies. :)



Hi Holger, thanks. That did the trick.

I already had those libraries on my project. I just forgot to include the
stax-api-1.0.1.jar and stax2-api-3.0.1.jar when updating the dependencies in
IntelliJ IDEA, so during deployment those jar-files didn't get copied over
to the exploded folder.

I'm not familiar with StaX myself and Googling for the missing class pointed
me to the JDK docs first.

The dependencies are listed here:
http://tapestry.apache.org/tapestry5.1/tapestry-core/dependencies.html
So even though that list was generated by Maven I can still happily keep
ignoring it for my own projects :o)


regards,

Onno

Re: Does T5.1.0.5 depend on Java6?

Posted by Holger Hoffstaette <ho...@wizards.de>.
On Tue, 26 May 2009 18:39:02 +0200, Onno Scheffers wrote:

> I'm still on Java 5 and trying to upgrade Tapestry from 5.0.18 to 5.1.0.5.
> 
> On startup I see the error-message: java.lang.NoClassDefFoundError:
> javax/xml/stream/XMLResolver
> The XMLResolver was only added to Java 1.6 according to its docs (
> http://java.sun.com/javase/6/docs/api/javax/xml/stream/XMLResolver.html).
> 
> I didn't read anything in the upgrade notes or release notes about this,
> so I was wondering if I missed something?

While StAX is indeed part of JDK6, its more likely that you're simply
missing the stax-api and woodstox jars on your classpath. Woodstox is an implementation
of StAX for JDKs <6.

With maven they are correctly added to the classpath as transitive
dependencies. :)

Holger



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