[Seasar-user:4249] [S2Axis] Calendarを含んだDtoを送るとエラーになる

[E-MAIL ADDRESS DELETED] [E-MAIL ADDRESS DELETED]
2006年 8月 3日 (木) 13:29:04 JST


関です。

S2Axisでjava.util.Calendarを含んだDTOを渡そうとしたところ
エラーが発生してしまいます。

検証のため、以下のサンプルを作成したのですが
S2Axis越しにCalendarオブジェクトは
getはとれるのですが、setすることができません。

「XML <-> Axis における Java データマッピング」
http://ws.apache.org/axis/ja/java/user-guide.html#XMLJavaDataMappingInAxis
によるとAxisでは自動マッピングされるとの認識ですが
何か解決方法があればアドバイスをいただければと思います。

よろしくお願いします。

■使用しているソース
http://s2axis.seasar.org/ja/
S2Axis2Examples 0.2.0

### インターフェース ##########################################
public interface TransferCalendar {

    public Calendar getCalendar();

    public void setCalendar(Calendar cal);

}

### サーバー側の実装 ##########################################
public class TransferCalendarImpl implements TransferCalendar {

	public Calendar getCalendar() {
		Calendar cal = Calendar.getInstance();
		return cal;
	}

	public void setCalendar(Calendar cal) {
		Calendar calcal = cal;
		System.out.println(calcal);
	}

### クライアント側のテスト ##########################################
public class TransferCalendarTest extends S2TestCase {

    public void testGetTransferCalendar() {

    	TransferCalendar service = (TransferCalendar) getComponent(TransferCalendar.class);

    	Calendar result = service.getCalendar();

        System.out.println(result);

    }

    public void testSetTransferCalendar() {

    	TransferCalendar service = (TransferCalendar) getComponent(TransferCalendar.class);

    	Calendar cal = Calendar.getInstance();

    	service.setCalendar(cal);

        System.out.println(cal);

    }
}

### service.setCalendar(cal) 時のエラー内容 ##########################################
java.lang.reflect.UndeclaredThrowableException
	at org.seasar.remoting.axis2.examples.ex01.TransferCalendar$$EnhancedByS2AOP$$800aa1.setCalendar(TransferCalendar$$EnhancedByS2AOP$$800aa1.java)
	at org.seasar.remoting.axis2.examples.ex01.TransferCalendarTest.testSetTransferCalendar(TransferCalendarTest.java:38)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at junit.framework.TestCase.runTest(TestCase.java:154)
	at org.seasar.framework.unit.S2FrameworkTestCase.doRunTest(S2FrameworkTestCase.java:212)
	at org.seasar.extension.unit.S2TestCase.doRunTest(S2TestCase.java:89)
	at org.seasar.framework.unit.S2FrameworkTestCase.runBare(S2FrameworkTestCase.java:139)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.apache.axis2.AxisFault: null; nested exception is:
	java.lang.NullPointerException
	at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:287)
	at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:457)
	at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:399)
	at org.seasar.remoting.axis2.connector.AxisInOutConnector.execute(AxisInOutConnector.java:42)
	at org.seasar.remoting.axis2.connector.AbstractAxisConnector.invoke(AbstractAxisConnector.java:107)
	at org.seasar.remoting.common.connector.impl.TargetSpecificURLBasedConnector.invoke(TargetSpecificURLBasedConnector.java:105)
	at org.seasar.remoting.common.interceptor.RemotingInterceptor.invoke(RemotingInterceptor.java:84)
	at org.seasar.remoting.axis2.examples.ex01.TransferCalendar$$EnhancedByS2AOP$$800aa1$$MethodInvocation$$setCalendar1.proceed(MethodInvocationClassGenerator.java)
	... 22 more
Caused by: java.lang.Exception: org.apache.axis2.AxisFault: null; nested exception is:
	java.lang.NullPointerException; nested exception is:
	org.apache.axis2.AxisFault: null; nested exception is:
	java.lang.NullPointerException
	at org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver.invokeBusinessLogic(RPCInOnlyMessageReceiver.java:78)
	at org.apache.axis2.receivers.AbstractInMessageReceiver.receive(AbstractInMessageReceiver.java:34)
	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454)
	at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)
	at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.seasar.framework.container.filter.S2ContainerFilter.doFilter(S2ContainerFilter.java:60)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.axis2.AxisFault: null; nested exception is:
	java.lang.NullPointerException
	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:318)
	at org.seasar.remoting.axis2.receivers.S2RPCInOnlyMessageReceiver.makeNewServiceObject(S2RPCInOnlyMessageReceiver.java:49)
	at org.apache.axis2.receivers.AbstractMessageReceiver.getTheImplementationObject(AbstractMessageReceiver.java:90)
	at org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver.invokeBusinessLogic(RPCInOnlyMessageReceiver.java:39)
	... 23 more
Caused by: java.lang.NullPointerException
	at org.seasar.remoting.axis2.receivers.S2RPCInOnlyMessageReceiver.makeNewServiceObject(S2RPCInOnlyMessageReceiver.java:46)
	... 25 more

	at org.apache.axis2.AxisFault.<init>(AxisFault.java:159)
	... 30 more

#### トレースココマデ ####





Seasar-user メーリングリストの案内