You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by raucha <A....@verband.creditreform.de> on 2009/07/30 15:12:54 UTC

ClassCastException after upgrading to 5.1.0.5

After upgrading from 5.0.18 to 5.1.0.5 my application fails to start when
deployed on a weblogic server. I think this has to do with the usage of Stax
in the TemplateParser. I have tried to override the implementation in my
weblogic-application.xml with

 <application-param>
  <param-name>javax.xml.stream.XMLInputFactory</param-name>
  <param-value>com.ctc.wstx.stax.WstxInputFactory</param-value>
 </application-param>

but I still get the following exception:

Caused by: java.lang.ClassCastException:
weblogic.xml.stax.XMLStreamInputFactory
	at
org.apache.tapestry5.internal.services.TemplateParserImpl.(TemplateParserImpl.java:44)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
	at
org.apache.tapestry5.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:62)

Is there any way around this problem?
-- 
View this message in context: http://www.nabble.com/ClassCastException-after-upgrading-to-5.1.0.5-tp24738227p24738227.html
Sent from the Tapestry - User 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


Re: ClassCastException after upgrading to 5.1.0.5

Posted by Julio Quiroz <re...@gmail.com>.
I found it

http://apache.rediris.es/tapestry/

Cheers


Julio Quiroz wrote:
> 
> Hi there,
> 
> I've got the same problem and still can't fix it. So I want to try with
> tapestry 5.0.18 to avoid all this issue stuff, but I can get a clean
> version, I mean when I downloaded an read-error by winrar is rised.
> 
> Any of you guys have this version to share with me? I'd really appreciate
> it.
> My email is repcax@gmail.com
> 
> Thanks in advance.
> 
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/ClassCastException-after-upgrading-to-5.1.0.5-tp24738227p24832500.html
Sent from the Tapestry - User 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


Re: ClassCastException after upgrading to 5.1.0.5

Posted by Julio Quiroz <re...@gmail.com>.
Hi there,

I've got the same problem and still can't fix it. So I want to try with
tapestry 5.0.18 to avoid all this issue stuff, but I can get a clean
version, I mean when I downloaded an read-error by winrar is rised.

Any of you guys have this version to share with me? I'd really appreciate
it.
My email is repcax@gmail.com

Thanks in advance.





-- 
View this message in context: http://www.nabble.com/ClassCastException-after-upgrading-to-5.1.0.5-tp24738227p24832495.html
Sent from the Tapestry - User 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


Re: ClassCastException after upgrading to 5.1.0.5

Posted by raucha <A....@verband.creditreform.de>.
I found someone with a better knowledge of weblogic deployment then myself
and he got me around that problem.

1. add 
	<container-descriptor>
  		<prefer-web-inf-classes>true</prefer-web-inf-classes>
	</container-descriptor>
to the weblogic.xml of the war file.
2. wrap the war in an ear file
3. add a weblogic-application.xml file to the META-INF directory of the ear
which contains
 <application-param> 
  <param-name>javax.xml.stream.XMLInputFactory</param-name> 
  <param-value>com.ctc.wstx.stax.WstxInputFactory</param-value> 
 </application-param>
4. deploy the ear instead of the war.

Not pretty but the application seems to run with 5.1.0.5 now on all weblogic
10.x versions we could test and all other applications deployed to the
server are still working too.
This solution is weblogic specific but there might be similar ways for
Glasfish or Websphere.


raucha wrote:
> 
> I tried both suggestions without success. Adding the parameter to the JVM
> prevents weblogic from starting and changing the system property in the
> AppModule crashes all other applications deployed to the server because
> they don't have the jars in their classpath.
> It seems I am stuck with 5.0.18 as long as tapestry depends on a specific
> implementation of Stax.
> 
> 
> Mario Udina-2 wrote:
>> 
>> Hello!
>> 
>> I put the following lines in the AppModule sine no other solution would
>> work
>> for me on Weblogic 9.2:
>> System.setProperty("javax.xml.stream.XMLInputFactory",
>>                 "com.ctc.wstx.stax.WstxInputFactory");
>>         System.setProperty("javax.xml.stream.XMLOutputFactory",
>>                 "com.ctc.wstx.stax.WstxOutputFactory");
>>         System.setProperty("javax.xml.stream.XMLEventFactory",
>>                 "com.ctc.wstx.stax.evt.WstxEventFactory");
>> 
>> I am not sure if that is ok but it works.
>> 
>> regards,
>> mario
>> 
>> 
>> On Thu, Jul 30, 2009 at 3:34 PM, Kristian Marinkovic <
>> kristian.marinkovic@porsche.co.at> wrote:
>> 
>>> i had the same problem with websphere... i had to add following JVM
>>> parameter
>>> -Djavax.xml.stream.XMLInputFactory=com.ctc.wstx.stax.WstxInputFactory
>>>
>>> with another version i had to drop the stax2 jar into a shared folder
>>> because the
>>> classloader wouldn't respect my parameter
>>>
>>> g,
>>> kris
>>>
>>>
>>>
>>> raucha <A....@verband.creditreform.de>
>>> 30.07.2009 15:12
>>> Bitte antworten an
>>> "Tapestry users" <us...@tapestry.apache.org>
>>>
>>>
>>> An
>>> users@tapestry.apache.org
>>> Kopie
>>>
>>> Thema
>>> ClassCastException after upgrading to 5.1.0.5
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> After upgrading from 5.0.18 to 5.1.0.5 my application fails to start
>>> when
>>> deployed on a weblogic server. I think this has to do with the usage of
>>> Stax
>>> in the TemplateParser. I have tried to override the implementation in my
>>> weblogic-application.xml with
>>>
>>>  <application-param>
>>>  <param-name>javax.xml.stream.XMLInputFactory</param-name>
>>>  <param-value>com.ctc.wstx.stax.WstxInputFactory</param-value>
>>>  </application-param>
>>>
>>> but I still get the following exception:
>>>
>>> Caused by: java.lang.ClassCastException:
>>> weblogic.xml.stax.XMLStreamInputFactory
>>>                 at
>>>
>>> org.apache.tapestry5.internal.services.TemplateParserImpl.(TemplateParserImpl.java:44)
>>>                 at
>>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>>>                 at
>>>
>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>>>                 at
>>>
>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>>>                 at
>>> java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>>>                 at
>>>
>>> org.apache.tapestry5.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:62)
>>>
>>> Is there any way around this problem?
>>> --
>>> View this message in context:
>>>
>>> http://www.nabble.com/ClassCastException-after-upgrading-to-5.1.0.5-tp24738227p24738227.html
>>>
>>> Sent from the Tapestry - User 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
>>>
>>>
>>>
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/ClassCastException-after-upgrading-to-5.1.0.5-tp24738227p24820982.html
Sent from the Tapestry - User 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


Re: ClassCastException after upgrading to 5.1.0.5

Posted by raucha <A....@verband.creditreform.de>.
I tried both suggestions without success. Adding the parameter to the JVM
prevents weblogic from starting and changing the system property in the
AppModule crashes all other applications deployed to the server because they
don't have the jars in their classpath.
It seems I am stuck with 5.0.18 as long as tapestry depends on a specific
implementation of Stax.


Mario Udina-2 wrote:
> 
> Hello!
> 
> I put the following lines in the AppModule sine no other solution would
> work
> for me on Weblogic 9.2:
> System.setProperty("javax.xml.stream.XMLInputFactory",
>                 "com.ctc.wstx.stax.WstxInputFactory");
>         System.setProperty("javax.xml.stream.XMLOutputFactory",
>                 "com.ctc.wstx.stax.WstxOutputFactory");
>         System.setProperty("javax.xml.stream.XMLEventFactory",
>                 "com.ctc.wstx.stax.evt.WstxEventFactory");
> 
> I am not sure if that is ok but it works.
> 
> regards,
> mario
> 
> 
> On Thu, Jul 30, 2009 at 3:34 PM, Kristian Marinkovic <
> kristian.marinkovic@porsche.co.at> wrote:
> 
>> i had the same problem with websphere... i had to add following JVM
>> parameter
>> -Djavax.xml.stream.XMLInputFactory=com.ctc.wstx.stax.WstxInputFactory
>>
>> with another version i had to drop the stax2 jar into a shared folder
>> because the
>> classloader wouldn't respect my parameter
>>
>> g,
>> kris
>>
>>
>>
>> raucha <A....@verband.creditreform.de>
>> 30.07.2009 15:12
>> Bitte antworten an
>> "Tapestry users" <us...@tapestry.apache.org>
>>
>>
>> An
>> users@tapestry.apache.org
>> Kopie
>>
>> Thema
>> ClassCastException after upgrading to 5.1.0.5
>>
>>
>>
>>
>>
>>
>>
>>
>> After upgrading from 5.0.18 to 5.1.0.5 my application fails to start when
>> deployed on a weblogic server. I think this has to do with the usage of
>> Stax
>> in the TemplateParser. I have tried to override the implementation in my
>> weblogic-application.xml with
>>
>>  <application-param>
>>  <param-name>javax.xml.stream.XMLInputFactory</param-name>
>>  <param-value>com.ctc.wstx.stax.WstxInputFactory</param-value>
>>  </application-param>
>>
>> but I still get the following exception:
>>
>> Caused by: java.lang.ClassCastException:
>> weblogic.xml.stax.XMLStreamInputFactory
>>                 at
>>
>> org.apache.tapestry5.internal.services.TemplateParserImpl.(TemplateParserImpl.java:44)
>>                 at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>>                 at
>>
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>>                 at
>>
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>>                 at
>> java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>>                 at
>>
>> org.apache.tapestry5.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:62)
>>
>> Is there any way around this problem?
>> --
>> View this message in context:
>>
>> http://www.nabble.com/ClassCastException-after-upgrading-to-5.1.0.5-tp24738227p24738227.html
>>
>> Sent from the Tapestry - User 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
>>
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/ClassCastException-after-upgrading-to-5.1.0.5-tp24738227p24802606.html
Sent from the Tapestry - User 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


Re: ClassCastException after upgrading to 5.1.0.5

Posted by Mario Udina <m....@gmail.com>.
Hello!

I put the following lines in the AppModule sine no other solution would work
for me on Weblogic 9.2:
System.setProperty("javax.xml.stream.XMLInputFactory",
                "com.ctc.wstx.stax.WstxInputFactory");
        System.setProperty("javax.xml.stream.XMLOutputFactory",
                "com.ctc.wstx.stax.WstxOutputFactory");
        System.setProperty("javax.xml.stream.XMLEventFactory",
                "com.ctc.wstx.stax.evt.WstxEventFactory");

I am not sure if that is ok but it works.

regards,
mario


On Thu, Jul 30, 2009 at 3:34 PM, Kristian Marinkovic <
kristian.marinkovic@porsche.co.at> wrote:

> i had the same problem with websphere... i had to add following JVM
> parameter
> -Djavax.xml.stream.XMLInputFactory=com.ctc.wstx.stax.WstxInputFactory
>
> with another version i had to drop the stax2 jar into a shared folder
> because the
> classloader wouldn't respect my parameter
>
> g,
> kris
>
>
>
> raucha <A....@verband.creditreform.de>
> 30.07.2009 15:12
> Bitte antworten an
> "Tapestry users" <us...@tapestry.apache.org>
>
>
> An
> users@tapestry.apache.org
> Kopie
>
> Thema
> ClassCastException after upgrading to 5.1.0.5
>
>
>
>
>
>
>
>
> After upgrading from 5.0.18 to 5.1.0.5 my application fails to start when
> deployed on a weblogic server. I think this has to do with the usage of
> Stax
> in the TemplateParser. I have tried to override the implementation in my
> weblogic-application.xml with
>
>  <application-param>
>  <param-name>javax.xml.stream.XMLInputFactory</param-name>
>  <param-value>com.ctc.wstx.stax.WstxInputFactory</param-value>
>  </application-param>
>
> but I still get the following exception:
>
> Caused by: java.lang.ClassCastException:
> weblogic.xml.stax.XMLStreamInputFactory
>                 at
>
> org.apache.tapestry5.internal.services.TemplateParserImpl.(TemplateParserImpl.java:44)
>                 at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>                 at
>
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>                 at
>
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>                 at
> java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>                 at
>
> org.apache.tapestry5.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:62)
>
> Is there any way around this problem?
> --
> View this message in context:
>
> http://www.nabble.com/ClassCastException-after-upgrading-to-5.1.0.5-tp24738227p24738227.html
>
> Sent from the Tapestry - User 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
>
>
>

Re: ClassCastException after upgrading to 5.1.0.5

Posted by Kristian Marinkovic <kr...@porsche.co.at>.
i had the same problem with websphere... i had to add following JVM 
parameter 
-Djavax.xml.stream.XMLInputFactory=com.ctc.wstx.stax.WstxInputFactory 

with another version i had to drop the stax2 jar into a shared folder 
because the 
classloader wouldn't respect my parameter

g,
kris



raucha <A....@verband.creditreform.de> 
30.07.2009 15:12
Bitte antworten an
"Tapestry users" <us...@tapestry.apache.org>


An
users@tapestry.apache.org
Kopie

Thema
ClassCastException after upgrading to 5.1.0.5








After upgrading from 5.0.18 to 5.1.0.5 my application fails to start when
deployed on a weblogic server. I think this has to do with the usage of 
Stax
in the TemplateParser. I have tried to override the implementation in my
weblogic-application.xml with

 <application-param>
  <param-name>javax.xml.stream.XMLInputFactory</param-name>
  <param-value>com.ctc.wstx.stax.WstxInputFactory</param-value>
 </application-param>

but I still get the following exception:

Caused by: java.lang.ClassCastException:
weblogic.xml.stax.XMLStreamInputFactory
                 at
org.apache.tapestry5.internal.services.TemplateParserImpl.(TemplateParserImpl.java:44)
                 at 
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                 at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
                 at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                 at 
java.lang.reflect.Constructor.newInstance(Constructor.java:494)
                 at
org.apache.tapestry5.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:62)

Is there any way around this problem?
-- 
View this message in context: 
http://www.nabble.com/ClassCastException-after-upgrading-to-5.1.0.5-tp24738227p24738227.html

Sent from the Tapestry - User 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