Strutsアクションオブジェクトからxmlファイルを生成したいと思います。そこで私はstruts2-jaxb-pluginというプラグインを使用しようとしました。実際に私はこれを初めて習得しており、JAXBプラグインをstruts2で使用する方法の例を示しています。 Click here私が何を試したかの例を見てください。struts2-jaxb-pluginに関する問題
サーバーの起動時に、次の例外が発生します。
INFO - Could not locate any XML to UnMarshall an object from. Attempted using the parameter jaxbXML
23 Jan, 2012 1:12:26 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.NoSuchMethodError: com.opensymphony.xwork2.ActionContext.get(Ljava/lang/Object;)Ljava/lang/Object;
at org.apache.struts2.result.jaxb.JAXBResultType.isGzipOkay(JAXBResultType.java:213)
at org.apache.struts2.result.jaxb.JAXBResultType.prepareForResponse(JAXBResultType.java:113)
at org.apache.struts2.result.jaxb.JAXBResultType.doExecute(JAXBResultType.java:58)
at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:362)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:266)
...
私は私のプロジェクトでは、以下のjarファイルを使用しています:
xworkのコア-2.1.6.jar、 Struts2のコア-2.2.1.jarを
JAXB-プラグインジャー:struts2-jaxb-plugin.jar
感謝あらかじめ友人に!
これは、指定されたメソッドがクラスパスに欠落していることを意味します。struts2に関連するこれらの3つのjarファイルのみがありますか? –
いいえUmesh私はstruts2に関連するすべての瓶を持っています。 – Vinoth