You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by João Vieira da Luz <jo...@gmail.com> on 2007/02/27 18:42:07 UTC

Problems using spring plugin and struts 2.0.6

We've upgraded to struts 2.0.6 and we can't make spring-plugin work.

The spring factory isn't being called and we are getting
ClassNotFoundException for the beans that reference spring.

This is working with struts 2.0.1.

What changed?

Thanks a lot,

       João

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] Problems using spring plugin and struts 2.0.6

Posted by João Vieira da Luz <jo...@gmail.com>.
Ok, that's a solution. We were trying to avoid to do that...

Hope somebody could help us on this.

Thanks again,
João




On 2/27/07, cilquirm <aa...@gmail.com> wrote:
>
> I'm not sure type converters are instantiated via the ObjectFactory
> mechanism, but you can just as easily say :
>
> domain.security.PermissionType = presentation.converter.EnumTypeConverter
>
> You will probably need to refactor some code if your EnumTypeConverter
> expects to be in a Spring context.
>
>
>
> João Vieira da Luz wrote:
> >
> > Well we've made progresses. The problem is on registering converters
> > on XWorkConverter.
> >
> > We are trying to register converters using spring.
> >
> > On application-context.xml we have this,
> >
> > <bean id="enumTypeConverter"
> > class="presentation.converter.EnumTypeConverter" />
> >
> > and on xwork-conversion.properties,
> >
> > domain.security.PermissionType = enumTypeConverter
> >
> > Probably is a problem from our xwork configuration, but we can't
> > figure out what is wrong?
> >
> > How can I tell xwork that it must use a "SpringClassLoader"?
> >
> > Thanks again,
> > Joao
> >
> > PS: The stacktrace is pretty much what I've send you.
> >
> > On 2/27/07, cilquirm <aa...@gmail.com> wrote:
> >>
> >> Technically, this isn't necessary when you have the
> >> struts-spring-plugin.jar
> >> in your WEB-INF/lib
> >> since it's already specified by the struts-plugin.xml file
> >>
> >> I think, however, seeing a more complete stack trace for the CNFE would
> >> be
> >> helpful since I have 2.0.6 with the spring plugin just fine.
> >>
> >>
> >>
> >>
> >> Paul Saumets | Merge wrote:
> >> >
> >> > Perhaps obvious question but,
> >> >
> >> > Do you have
> >> >
> >> > <constant name="struts.objectFactory" value="spring" />
> >> >
> >> > set inside your struts.xml?
> >> >
> >> > -----Original Message-----
> >> > From: João Vieira da Luz [mailto:joao.luz@gmail.com]
> >> > Sent: Tuesday, February 27, 2007 12:42 PM
> >> > To: user@struts.apache.org
> >> > Subject: Problems using spring plugin and struts 2.0.6
> >> >
> >> > We've upgraded to struts 2.0.6 and we can't make spring-plugin work.
> >> >
> >> > The spring factory isn't being called and we are getting
> >> > ClassNotFoundException for the beans that reference spring.
> >> >
> >> > This is working with struts 2.0.1.
> >> >
> >> > What changed?
> >> >
> >> > Thanks a lot,
> >> >
> >> >        João
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> > For additional commands, e-mail: user-help@struts.apache.org
> >> >
> >> >
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> > For additional commands, e-mail: user-help@struts.apache.org
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Problems-using-spring-plugin-and-struts-2.0.6-tf3302939.html#a9188385
> >> Sent from the Struts - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Problems-using-spring-plugin-and-struts-2.0.6-tf3302939.html#a9190615
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] Problems using spring plugin and struts 2.0.6

Posted by cilquirm <aa...@gmail.com>.
I'm not sure type converters are instantiated via the ObjectFactory
mechanism, but you can just as easily say :

domain.security.PermissionType = presentation.converter.EnumTypeConverter

You will probably need to refactor some code if your EnumTypeConverter
expects to be in a Spring context.



João Vieira da Luz wrote:
> 
> Well we've made progresses. The problem is on registering converters
> on XWorkConverter.
> 
> We are trying to register converters using spring.
> 
> On application-context.xml we have this,
> 
> <bean id="enumTypeConverter"
> class="presentation.converter.EnumTypeConverter" />
> 
> and on xwork-conversion.properties,
> 
> domain.security.PermissionType = enumTypeConverter
> 
> Probably is a problem from our xwork configuration, but we can't
> figure out what is wrong?
> 
> How can I tell xwork that it must use a "SpringClassLoader"?
> 
> Thanks again,
> Joao
> 
> PS: The stacktrace is pretty much what I've send you.
> 
> On 2/27/07, cilquirm <aa...@gmail.com> wrote:
>>
>> Technically, this isn't necessary when you have the
>> struts-spring-plugin.jar
>> in your WEB-INF/lib
>> since it's already specified by the struts-plugin.xml file
>>
>> I think, however, seeing a more complete stack trace for the CNFE would
>> be
>> helpful since I have 2.0.6 with the spring plugin just fine.
>>
>>
>>
>>
>> Paul Saumets | Merge wrote:
>> >
>> > Perhaps obvious question but,
>> >
>> > Do you have
>> >
>> > <constant name="struts.objectFactory" value="spring" />
>> >
>> > set inside your struts.xml?
>> >
>> > -----Original Message-----
>> > From: João Vieira da Luz [mailto:joao.luz@gmail.com]
>> > Sent: Tuesday, February 27, 2007 12:42 PM
>> > To: user@struts.apache.org
>> > Subject: Problems using spring plugin and struts 2.0.6
>> >
>> > We've upgraded to struts 2.0.6 and we can't make spring-plugin work.
>> >
>> > The spring factory isn't being called and we are getting
>> > ClassNotFoundException for the beans that reference spring.
>> >
>> > This is working with struts 2.0.1.
>> >
>> > What changed?
>> >
>> > Thanks a lot,
>> >
>> >        João
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> > For additional commands, e-mail: user-help@struts.apache.org
>> >
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> > For additional commands, e-mail: user-help@struts.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Problems-using-spring-plugin-and-struts-2.0.6-tf3302939.html#a9188385
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problems-using-spring-plugin-and-struts-2.0.6-tf3302939.html#a9190615
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problems using spring plugin and struts 2.0.6

Posted by João Vieira da Luz <jo...@gmail.com>.
Well we've made progresses. The problem is on registering converters
on XWorkConverter.

We are trying to register converters using spring.

On application-context.xml we have this,

<bean id="enumTypeConverter" class="presentation.converter.EnumTypeConverter" />

and on xwork-conversion.properties,

domain.security.PermissionType = enumTypeConverter

Probably is a problem from our xwork configuration, but we can't
figure out what is wrong?

How can I tell xwork that it must use a "SpringClassLoader"?

Thanks again,
Joao

PS: The stacktrace is pretty much what I've send you.

On 2/27/07, cilquirm <aa...@gmail.com> wrote:
>
> Technically, this isn't necessary when you have the struts-spring-plugin.jar
> in your WEB-INF/lib
> since it's already specified by the struts-plugin.xml file
>
> I think, however, seeing a more complete stack trace for the CNFE would be
> helpful since I have 2.0.6 with the spring plugin just fine.
>
>
>
>
> Paul Saumets | Merge wrote:
> >
> > Perhaps obvious question but,
> >
> > Do you have
> >
> > <constant name="struts.objectFactory" value="spring" />
> >
> > set inside your struts.xml?
> >
> > -----Original Message-----
> > From: João Vieira da Luz [mailto:joao.luz@gmail.com]
> > Sent: Tuesday, February 27, 2007 12:42 PM
> > To: user@struts.apache.org
> > Subject: Problems using spring plugin and struts 2.0.6
> >
> > We've upgraded to struts 2.0.6 and we can't make spring-plugin work.
> >
> > The spring factory isn't being called and we are getting
> > ClassNotFoundException for the beans that reference spring.
> >
> > This is working with struts 2.0.1.
> >
> > What changed?
> >
> > Thanks a lot,
> >
> >        João
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Problems-using-spring-plugin-and-struts-2.0.6-tf3302939.html#a9188385
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Problems using spring plugin and struts 2.0.6

Posted by cilquirm <aa...@gmail.com>.
Technically, this isn't necessary when you have the struts-spring-plugin.jar
in your WEB-INF/lib
since it's already specified by the struts-plugin.xml file

I think, however, seeing a more complete stack trace for the CNFE would be
helpful since I have 2.0.6 with the spring plugin just fine.




Paul Saumets | Merge wrote:
> 
> Perhaps obvious question but,
> 
> Do you have
> 
> <constant name="struts.objectFactory" value="spring" />
> 
> set inside your struts.xml?
> 
> -----Original Message-----
> From: João Vieira da Luz [mailto:joao.luz@gmail.com]
> Sent: Tuesday, February 27, 2007 12:42 PM
> To: user@struts.apache.org
> Subject: Problems using spring plugin and struts 2.0.6
> 
> We've upgraded to struts 2.0.6 and we can't make spring-plugin work.
> 
> The spring factory isn't being called and we are getting
> ClassNotFoundException for the beans that reference spring.
> 
> This is working with struts 2.0.1.
> 
> What changed?
> 
> Thanks a lot,
> 
>        João
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problems-using-spring-plugin-and-struts-2.0.6-tf3302939.html#a9188385
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problems using spring plugin and struts 2.0.6

Posted by João Vieira da Luz <jo...@gmail.com>.
We use that property struts.properties:
struts.objectFactory = spring

This same configuration works well on struts 2.0.1.

A part of the stacktrace:
[2007-56-27 05:56:27] ERROR (XWorkConverter.java:645) Conversion
registration error
java.lang.ClassNotFoundException: enumTypeConverter
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
	at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:147)
	at com.opensymphony.xwork2.ObjectFactory.getClassInstance(ObjectFactory.java:98)
	at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:151)
	at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:141)
	at com.opensymphony.xwork2.util.XWorkConverter.createTypeConverter(XWorkConverter.java:621)
	at com.opensymphony.xwork2.util.XWorkConverter.loadConversionProperties(XWorkConverter.java:639)
	at com.opensymphony.xwork2.util.AnnotationXWorkConverter.<init>(AnnotationXWorkConverter.java:106)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

On 2/27/07, Paul Saumets | Merge <pa...@merge-solutions.com> wrote:
> Perhaps obvious question but,
>
> Do you have
>
> <constant name="struts.objectFactory" value="spring" />
>
> set inside your struts.xml?
>
> -----Original Message-----
> From: João Vieira da Luz [mailto:joao.luz@gmail.com]
> Sent: Tuesday, February 27, 2007 12:42 PM
> To: user@struts.apache.org
> Subject: Problems using spring plugin and struts 2.0.6
>
> We've upgraded to struts 2.0.6 and we can't make spring-plugin work.
>
> The spring factory isn't being called and we are getting
> ClassNotFoundException for the beans that reference spring.
>
> This is working with struts 2.0.1.
>
> What changed?
>
> Thanks a lot,
>
>        João
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Problems using spring plugin and struts 2.0.6

Posted by Paul Saumets | Merge <pa...@merge-solutions.com>.
Perhaps obvious question but,

Do you have

<constant name="struts.objectFactory" value="spring" />

set inside your struts.xml?

-----Original Message-----
From: João Vieira da Luz [mailto:joao.luz@gmail.com] 
Sent: Tuesday, February 27, 2007 12:42 PM
To: user@struts.apache.org
Subject: Problems using spring plugin and struts 2.0.6

We've upgraded to struts 2.0.6 and we can't make spring-plugin work.

The spring factory isn't being called and we are getting
ClassNotFoundException for the beans that reference spring.

This is working with struts 2.0.1.

What changed?

Thanks a lot,

       João

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org