Reputation: 4994
This has been asked many times before, but not quite the same as this. Everything seems to be present and in the right place. I'm using Java8, Eclipse, Maven, Struts2 w/ Convention Plugin, Spring, Tiles and annotations. The context-root is iquality, FYI.
The jar files I'm using:
The only error in the log I see is:
Here is a standard Action class that I have.
package com.icumed.ifactory.qa.web.actions;
public class ElementsAction extends ActionSupport
{
@Action(value = "/elements-page", results =
{
@Result(name = "success", type = "tiles", location = "elements")
})
public String execute()
{
return SUCCESS;
}
@Action(value = "/element", results =
{
@Result(name = "success", type = "tiles", location = "element")
})
public String getElement() throws ApplicationException
{
return super.get();
}
@Action(value = "/elements", results =
{
@Result(name = "success", type = "json", params =
{
"root",
ROOT_ELEMENT_TAG,
"excludeNullProperties",
"false",
})
})
public String search() throws ApplicationException
{
return super.search();
}
}
Here's my complete struts.xml
:
<struts>
<constant name="struts.custom.i18n.resources" value="iquality_messages" />
<constant name="struts.ui.theme" value="xhtml" />
<constant name="struts.multipart.enabled" value="true" />
<constant name="struts.json.dateformat" value="EEE, dd MMM yyyy HH:mm:ss zzz" />
<constant name="struts.objectFactory" value="spring" />
<constant name="struts.convention.action.includeJars" value=".*?/ifactory.*?jar(!/)?" />
<constant name="struts.convention.exclude.parentClassLoader" value="true" />
<constant name="struts.convention.action.fileProtocols" value="jar,file,zip,vfs,vfsfile,vfszip" />
<constant name="struts.convention.default.parent.package" value="convention-json-tiles" />
<package name="convention-json-tiles" namespace="/" extends="struts-default">
<result-types>
<result-type name="json" class="org.apache.struts2.json.JSONResult" />
<result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" />
</result-types>
<default-interceptor-ref name="defaultStack" />
<global-results>
<result name="Exception">/WEB-INF/content/application_exception.jsp</result>
</global-results>
<global-exception-mappings>
<exception-mapping exception="java.lang.Exception" result="Exception" />
</global-exception-mappings>
</package>
</struts>
What am I missing or what do I have wrong?
Upvotes: 0
Views: 563
Reputation: 4994
It was a WebLogic issue. I'm using WebLogic 12.1.3 and had to add the following to weblogic.xml
<wls:container-descriptor>
<wls:prefer-application-packages>
<wls:package-name>org.objectweb.asm.*</wls:package-name>
<wls:package-name>org.springframework.web.servlet.*</wls:package-name>
<wls:package-name>org.springframework.web.*</wls:package-name>
<wls:package-name>org.hibernate.validator.*</wls:package-name>
<wls:package-name>javax.validation.*</wls:package-name>
<wls:package-name>javax.validation.spi.*</wls:package-name>
<wls:package-name>javassist.util.proxy..*</wls:package-name>
</wls:prefer-application-packages>
<wls:show-archived-real-path-enabled>true</wls:show-archived-real-path-enabled>
</wls:container-descriptor>
Upvotes: 0