You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by xfile80303 <le...@grokers.net> on 2009/03/31 18:23:17 UTC

Re: [T5.1] Running on Glassfish?



Hello all,

I've been developing locally on Tomcat, but will have to ultimately deploy onto Glassfish .

My app works as expected while on Tomcat, but once deployed to Glassfish I get an exception:

java.lang.RuntimeException: Exception constructing service 'TemplateParser': Error invoking constructor org.apache.tapestry5.internal.services.TemplateParserImpl(Map, boolean) (at TemplateParserImpl.java:50) via org.apache.tapestry5.internal.services.InternalModule.bind(ServiceBinder) (at InternalModule.java:59) (for service 'TemplateParser'): com.sun.xml.stream.ZephyrParserFactory cannot be cast to org.codehaus.stax2.XMLInputFactory2

Which would seem to indicate some XML library conflict.

Any thoughts on resolution?

Thanks,

Levi


For anyone else who may care, we've come up with a solution:

Here are the complete steps to run a Tapestry app on Glassfish v2.1 using JDK 6 in 64 bit mode

1) install Glassfish v2.1 and JDK 6
2) modify config/asenv.conf to use JDK 6 like this:
  - AS_JAVA="/opt/jdk1.6.0_13"

3) start Glassfish domain1
4) copy woodstox-core-asl*.jar and stax2-api*.jar from Tapestry application to domains/domain1/lib/ext/  dir (if using Glassfish default domain1).
5) go to Glassfish admin page using browser and modify:
  - in Application Server/JVM Settings/JVM Options add: "-d64"
  - in Configuration/System Properties add:

Instance Variable Name                            Default Value
----------------------------------------------------------------------------------------
javax.xml.stream.XMLEventFactory        com.ctc.wstx.stax.WstxEventFactory
javax.xml.stream.XMLInputFactory        com.ctc.wstx.stax.WstxInputFactory
javax.xml.stream.XMLOutputFactory     com.ctc.wstx.stax.WstxOutputFactory

6) restart Glassfish

-- 
View this message in context: http://n2.nabble.com/-T5.1--Running-on-Glassfish--tp2362542p2563985.html
Sent from the Tapestry Users mailing list archive at Nabble.com.


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