• Post Reply Bookmark Topic Watch Topic
  • New Topic

Integration problem struts 2.0.11.2 - spring 2.5.5  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I faced an error integrating struts 2.0.11.2 with spring 2.5.5. The error said :

Cannot locate the chosen ObjectFactory implementation: spring - [unknown location]
at org.apache.struts2.config.BeanSelectionProvider.alias(BeanSelectionProvider.java:224)
at org.apache.struts2.config.BeanSelectionProvider.alias(BeanSelectionProvider.java:195)
at org.apache.struts2.config.BeanSelectionProvider.register(BeanSelectionProvider.java:153)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)

I put a dependency to spring 2.5.5 in my pom xml and remove 'struts2-spring-plugin' because by default it use spring 2.0.5 version.
FYI, my application wil integrate hibernate-spring-struts with maven as system builder.

Anyone can help?

 
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But you still need the Spring plugin.
 
Helmi Aisyi
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I put the struts-spring-plugin back :

<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<version>2.0.11.2</version>
</dependency>

and I got another error :
java.lang.NoSuchMethodError: org.springframework.util.ReflectionUtils.makeAccessible(Ljava/lang/reflect/Constructor;)V
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:99)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:78)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:249)

I guess I got the same issue with this :
https://issues.apache.org/struts/browse/WW-2788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46339#action_46339

Is this a bug?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's a bug in the sense that you're trying to use a new version of Spring with an old version of Struts 2.
 
When I was younger I felt like a man trapped inside a woman’s body. Then I was born. My twin is a tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!