Struts2 j4 e Spring

3 respostas
A

Estou com um erro ao integrar o spring com o struts, so em colocar o .jar para integrar o spring com o struts ja é o suficiente para dar o erro, com ou sem a constant name do struts.xml.

CODIGO STRUTS.XML

ERRO:

14:52:07,807  INFO XmlConfigurationProvider:140 - Parsing configuration file [struts-plugin.xml]

StandardContext[/strutsBlank]Exception starting filter struts2

Unable to load bean: type:com.opensymphony.xwork2.ObjectFactory class:org.apache.struts2.spring.StrutsSpringObjectFactory - bean - jar:file:/C:/projetos/struts2-blank-2.0.9/WebContent/WEB-INF/lib/struts2-spring-plugin-2.0.9.jar!/struts-plugin.xml:8:132

at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:208)

at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)

at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)

at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)

3 Respostas

dlt

caramba velho
estou com o mesmo problema pra integrar junit + spring + struts2…
achei seu post no google e só achei um outro falando do mesmo assunto aqui no forum que não me atendeu…
:frowning:

se alguém souber desses probs comuns na hora de integrar esses frameworks estenda a mão :slight_smile:

C

Olá pessoal,

estou com o mesmo problema. Vocês resolveram? Se sim postem a solução, por favor.

Grata.

danielso2007

Olá,

Eu revolvi um problema parecido usando a nova versão do struts2 (2.1.8.1). Adicionei os jars: xwork-core-2.1.6.jar, struts2-core-2.1.8.1.jar e struts2-spring-plugin-2.1.8.1.jar.
Utilizei também esta constant.

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

Sou novo em Struts2, sou mais JSF, mas espero ter ajudado.

Abraços!

Criado 18 de outubro de 2007
Ultima resposta 6 de jan. de 2010
Respostas 3
Participantes 4