[Seasar-user:17790] [Teedaーdjunit Error in dxo]について

thomas [E-MAIL ADDRESS DELETED]
2009年 6月 19日 (金) 14:35:16 JST


Hi,

I need to test my coding in djunit.

I am using djunit_0.8.4 & junit-3.8.2


When i run junit there is no problem,The same coding when i run in djunit
there is same error in dxo.

@ConversionRule("'lastupdated':@[E-MAIL ADDRESS DELETED](),"
+
               "'basiccontractexcecutiondate':@[E-MAIL ADDRESS DELETED](basiccontractexcecutiondate),"
+

"'registereddate':registereddate==null?@[E-MAIL ADDRESS DELETED]
():registereddate")
    public void convert(AbstractCustomermasterPage src,Customermaster dest);

this is my dxo coding.

public Class doCreatecustomermaster() {

Customermaster customer = new Customermaster();

        customermasterDxo.convert(this, customer);

            customermasterBhv.insert(customer);

            return CustomermasterConfirmPage.class;
}
this is my main function

public void testdoCreatecustomermaster() throws Exception{

        customermasterCreatePage.customercode="test";

        customermasterCreatePage.customername="test";

        customermasterCreatePage.basiccontractexcecutiondate ="2009/01/11";

        Class a = customermasterCreatePage.doCreatecustomermaster();
}

This is my test class coding.


java.lang.reflect.InvocationTargetException
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at
jp.co.dgic.testing.common.DJUnitClassLoader.getModifiedClass(DJUnitClassLoader.java:109)
    at
jp.co.dgic.testing.common.DJUnitClassLoader.findClass(DJUnitClassLoader.java:59)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at
jp.co.dgic.testing.common.DJUnitClassLoader.loadClass(DJUnitClassLoader.java:48)
    at
jp.co.dgic.testing.common.DJUnitEclipseClassLoader.loadClass(DJUnitEclipseClassLoader.java:59)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.beans.Introspector.instantiate(Unknown Source)
    at java.beans.Introspector.findExplicitBeanInfo(Unknown Source)
    at java.beans.Introspector.<init>(Unknown Source)
    at java.beans.Introspector.getBeanInfo(Unknown Source)
    at ognl.OgnlRuntime.getPropertyDescriptors(OgnlRuntime.java:1570)
    at ognl.OgnlRuntime.getPropertyDescriptor(OgnlRuntime.java:1591)
    at ognl.OgnlRuntime.getGetMethod(OgnlRuntime.java:1348)
    at ognl.OgnlRuntime.getMethodValue(OgnlRuntime.java:1004)
    at
ognl.ObjectPropertyAccessor.getPossibleProperty(ObjectPropertyAccessor.java:53)
    at
ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:121)
    at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1758)
    at ognl.ASTProperty.getValueBody(ASTProperty.java:92)
    at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:171)
    at ognl.SimpleNode.getValue(SimpleNode.java:211)
    at ognl.ASTStaticMethod.getValueBody(ASTStaticMethod.java:63)
    at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:171)
    at ognl.SimpleNode.getValue(SimpleNode.java:211)
    at ognl.ASTMap.getValueBody(ASTMap.java:90)
    at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:171)
    at ognl.SimpleNode.getValue(SimpleNode.java:211)
    at ognl.Ognl.getValue(Ognl.java:333)
    at ognl.Ognl.getValue(Ognl.java:413)
    at ognl.Ognl.getValue(Ognl.java:395)
    at org.seasar.framework.util.OgnlUtil.getValue(OgnlUtil.java:100)
    at org.seasar.framework.util.OgnlUtil.getValue(OgnlUtil.java:65)
    at org.seasar.framework.util.OgnlUtil.getValue(OgnlUtil.java:50)
    at
org.seasar.extension.dxo.util.OgnlExpression.evaluate(OgnlExpression.java:53)
    at
org.seasar.extension.dxo.converter.impl.ConversionContextImpl.<init>(ConversionContextImpl.java:178)
    at
org.seasar.extension.dxo.command.impl.AbstractDxoCommand.createContext(AbstractDxoCommand.java:126)
    at
org.seasar.extension.dxo.command.impl.BeanToBeanDxoCommand.convertScalar(BeanToBeanDxoCommand.java:70)
    at
org.seasar.extension.dxo.command.impl.AbstractDxoCommand$ScalarConversionHelper.convert(AbstractDxoCommand.java:223)
    at
org.seasar.extension.dxo.command.impl.AbstractDxoCommand.execute(AbstractDxoCommand.java:78)
    at
org.seasar.extension.dxo.DxoInterceptor.invoke(DxoInterceptor.java:57)
    at
projectmgnt.dxo.CustomermasterDxo$$EnhancedByS2AOP$$1979eb$$MethodInvocation$$convert0.proceed(MethodInvocationClassGenerator.java)
    at
org.seasar.framework.aop.interceptors.TraceInterceptor.invoke(TraceInterceptor.java:56)
    at
projectmgnt.dxo.CustomermasterDxo$$EnhancedByS2AOP$$1979eb$$MethodInvocation$$convert0.proceed(MethodInvocationClassGenerator.java)
    at
projectmgnt.dxo.CustomermasterDxo$$EnhancedByS2AOP$$1979eb.convert(CustomermasterDxo$$EnhancedByS2AOP$$1979eb.java)
    at
projectmgnt.web.customermaster.CustomermasterCreatePage.doCreatecustomermaster(CustomermasterCreatePage.java:49)
    at
projectmgnt.web.customermaster.CustomermasterCreatePage$$EnhancedByS2AOP$$72d398.$$doCreatecustomermaster$$invokeSuperMethod$$(CustomermasterCreatePage$$EnhancedByS2AOP$$72d398.java)
    at
projectmgnt.web.customermaster.CustomermasterCreatePage$$EnhancedByS2AOP$$72d398$$MethodInvocation$$doCreatecustomermaster0.proceed(MethodInvocationClassGenerator.java)
    at
org.seasar.extension.tx.DefaultTransactionCallback.execute(DefaultTransactionCallback.java:58)
    at
org.seasar.extension.tx.adapter.JTATransactionManagerAdapter.required(JTATransactionManagerAdapter.java:65)
    at
org.seasar.extension.tx.RequiredInterceptor.invoke(RequiredInterceptor.java:41)
    at
projectmgnt.web.customermaster.CustomermasterCreatePage$$EnhancedByS2AOP$$72d398$$MethodInvocation$$doCreatecustomermaster0.proceed(MethodInvocationClassGenerator.java)
    at
org.seasar.framework.aop.interceptors.ThrowsInterceptor.invoke(ThrowsInterceptor.java:79)
    at
projectmgnt.web.customermaster.CustomermasterCreatePage$$EnhancedByS2AOP$$72d398$$MethodInvocation$$doCreatecustomermaster0.proceed(MethodInvocationClassGenerator.java)
    at
org.seasar.framework.aop.interceptors.TraceInterceptor.invoke(TraceInterceptor.java:56)
    at
projectmgnt.web.customermaster.CustomermasterCreatePage$$EnhancedByS2AOP$$72d398$$MethodInvocation$$doCreatecustomermaster0.proceed(MethodInvocationClassGenerator.java)
    at
projectmgnt.web.customermaster.CustomermasterCreatePage$$EnhancedByS2AOP$$72d398.doCreatecustomermaster(CustomermasterCreatePage$$EnhancedByS2AOP$$72d398.java)
    at
projectmgnt.web.customermaster.CustomermasterCreateTest.testdoCreatecustomermaster(CustomermasterCreateTest.java:27)
    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:164)
    at
org.seasar.framework.unit.S2FrameworkTestCase.doRunTest(S2FrameworkTestCase.java:519)
    at
org.seasar.framework.unit.S2FrameworkTestCase.runBare(S2FrameworkTestCase.java:308)
    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:120)
    at junit.framework.TestSuite.runTest(TestSuite.java:230)
    at junit.framework.TestSuite.run(TestSuite.java:225)
    at junit.framework.TestSuite.runTest(TestSuite.java:230)
    at junit.framework.TestSuite.run(TestSuite.java:225)
    at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
    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)
    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
jp.co.dgic.eclipse.jdt.internal.junit.runner.DJUnitRunner.main(DJUnitRunner.java:49)
Caused by: java.io.IOException: Class not found
    at org.objectweb.asm.ClassReader.a(Unknown Source)
    at org.objectweb.asm.ClassReader.<init>(Unknown Source)
    at org.objectweb.asm.ClassReader.<init>(Unknown Source)
    at
jp.co.dgic.testing.common.asm.AsmClassReader.<init>(AsmClassReader.java:52)
    at
jp.co.dgic.testing.common.asm3x.AsmClassReader3x.<init>(AsmClassReader3x.java:14)
    at
jp.co.dgic.testing.common.asm.AsmClassReader.createAsmClassReader(AsmClassReader.java:24)
    at
jp.co.dgic.testing.common.AsmClassModifier.getModifiedClass(AsmClassModifier.java:49)
    ... 86 more
java.lang.reflect.InvocationTargetException
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at
jp.co.dgic.testing.common.DJUnitClassLoader.getModifiedClass(DJUnitClassLoader.java:109)
    at
jp.co.dgic.testing.common.DJUnitClassLoader.findClass(DJUnitClassLoader.java:59)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at
jp.co.dgic.testing.common.DJUnitClassLoader.loadClass(DJUnitClassLoader.java:48)
    at
jp.co.dgic.testing.common.DJUnitEclipseClassLoader.loadClass(DJUnitEclipseClassLoader.java:59)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.beans.Introspector.instantiate(Unknown Source)
    at java.beans.Introspector.findExplicitBeanInfo(Unknown Source)
    at java.beans.Introspector.<init>(Unknown Source)
    at java.beans.Introspector.getBeanInfo(Unknown Source)
    at ognl.OgnlRuntime.getPropertyDescriptors(OgnlRuntime.java:1570)
    at ognl.OgnlRuntime.getPropertyDescriptor(OgnlRuntime.java:1591)
    at ognl.OgnlRuntime.getGetMethod(OgnlRuntime.java:1348)
    at ognl.OgnlRuntime.getMethodValue(OgnlRuntime.java:1004)
    at
ognl.ObjectPropertyAccessor.getPossibleProperty(ObjectPropertyAccessor.java:53)
    at
ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:121)
    at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1758)
    at ognl.ASTProperty.getValueBody(ASTProperty.java:92)
    at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:171)
    at ognl.SimpleNode.getValue(SimpleNode.java:211)
    at ognl.ASTStaticMethod.getValueBody(ASTStaticMethod.java:63)
    at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:171)
    at ognl.SimpleNode.getValue(SimpleNode.java:211)
    at ognl.ASTMap.getValueBody(ASTMap.java:90)
    at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:171)
    at ognl.SimpleNode.getValue(SimpleNode.java:211)
    at ognl.Ognl.getValue(Ognl.java:333)
    at ognl.Ognl.getValue(Ognl.java:413)
    at ognl.Ognl.getValue(Ognl.java:395)
    at org.seasar.framework.util.OgnlUtil.getValue(OgnlUtil.java:100)
    at org.seasar.framework.util.OgnlUtil.getValue(OgnlUtil.java:65)
    at org.seasar.framework.util.OgnlUtil.getValue(OgnlUtil.java:50)
    at
org.seasar.extension.dxo.util.OgnlExpression.evaluate(OgnlExpression.java:53)
    at
org.seasar.extension.dxo.converter.impl.ConversionContextImpl.<init>(ConversionContextImpl.java:178)
    at
org.seasar.extension.dxo.command.impl.AbstractDxoCommand.createContext(AbstractDxoCommand.java:126)
    at
org.seasar.extension.dxo.command.impl.BeanToBeanDxoCommand.convertScalar(BeanToBeanDxoCommand.java:70)
    at
org.seasar.extension.dxo.command.impl.AbstractDxoCommand$ScalarConversionHelper.convert(AbstractDxoCommand.java:223)
    at
org.seasar.extension.dxo.command.impl.AbstractDxoCommand.execute(AbstractDxoCommand.java:78)
    at
org.seasar.extension.dxo.DxoInterceptor.invoke(DxoInterceptor.java:57)
    at
projectmgnt.dxo.CustomermasterDxo$$EnhancedByS2AOP$$1979eb$$MethodInvocation$$convert0.proceed(MethodInvocationClassGenerator.java)
    at
org.seasar.framework.aop.interceptors.TraceInterceptor.invoke(TraceInterceptor.java:56)
    at
projectmgnt.dxo.CustomermasterDxo$$EnhancedByS2AOP$$1979eb$$MethodInvocation$$convert0.proceed(MethodInvocationClassGenerator.java)
    at
projectmgnt.dxo.CustomermasterDxo$$EnhancedByS2AOP$$1979eb.convert(CustomermasterDxo$$EnhancedByS2AOP$$1979eb.java)
    at
projectmgnt.web.customermaster.CustomermasterCreatePage.doCreatecustomermaster(CustomermasterCreatePage.java:49)
    at
projectmgnt.web.customermaster.CustomermasterCreatePage$$EnhancedByS2AOP$$72d398.$$doCreatecustomermaster$$invokeSuperMethod$$(CustomermasterCreatePage$$EnhancedByS2AOP$$72d398.java)
    at
projectmgnt.web.customermaster.CustomermasterCreatePage$$EnhancedByS2AOP$$72d398$$MethodInvocation$$doCreatecustomermaster0.proceed(MethodInvocationClassGenerator.java)
    at
org.seasar.extension.tx.DefaultTransactionCallback.execute(DefaultTransactionCallback.java:58)
    at
org.seasar.extension.tx.adapter.JTATransactionManagerAdapter.required(JTATransactionManagerAdapter.java:65)
    at
org.seasar.extension.tx.RequiredInterceptor.invoke(RequiredInterceptor.java:41)
    at
projectmgnt.web.customermaster.CustomermasterCreatePage$$EnhancedByS2AOP$$72d398$$MethodInvocation$$doCreatecustomermaster0.proceed(MethodInvocationClassGenerator.java)
    at
org.seasar.framework.aop.interceptors.ThrowsInterceptor.invoke(ThrowsInterceptor.java:79)
    at
projectmgnt.web.customermaster.CustomermasterCreatePage$$EnhancedByS2AOP$$72d398$$MethodInvocation$$doCreatecustomermaster0.proceed(MethodInvocationClassGenerator.java)
    at
org.seasar.framework.aop.interceptors.TraceInterceptor.invoke(TraceInterceptor.java:56)
    at
projectmgnt.web.customermaster.CustomermasterCreatePage$$EnhancedByS2AOP$$72d398$$MethodInvocation$$doCreatecustomermaster0.proceed(MethodInvocationClassGenerator.java)
    at
projectmgnt.web.customermaster.CustomermasterCreatePage$$EnhancedByS2AOP$$72d398.doCreatecustomermaster(CustomermasterCreatePage$$EnhancedByS2AOP$$72d398.java)
    at
projectmgnt.web.customermaster.CustomermasterCreateTest.testdoCreatecustomermaster(CustomermasterCreateTest.java:27)
    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:164)
    at
org.seasar.framework.unit.S2FrameworkTestCase.doRunTest(S2FrameworkTestCase.java:519)
    at
org.seasar.framework.unit.S2FrameworkTestCase.runBare(S2FrameworkTestCase.java:308)
    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:120)
    at junit.framework.TestSuite.runTest(TestSuite.java:230)
    at junit.framework.TestSuite.run(TestSuite.java:225)
    at junit.framework.TestSuite.runTest(TestSuite.java:230)
    at junit.framework.TestSuite.run(TestSuite.java:225)
    at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
    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)
    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
jp.co.dgic.eclipse.jdt.internal.junit.runner.DJUnitRunner.main(DJUnitRunner.java:49)
Caused by: java.io.IOException: Class not found
    at org.objectweb.asm.ClassReader.a(Unknown Source)
    at org.objectweb.asm.ClassReader.<init>(Unknown Source)
    at org.objectweb.asm.ClassReader.<init>(Unknown Source)
    at
jp.co.dgic.testing.common.asm.AsmClassReader.<init>(AsmClassReader.java:52)
    at
jp.co.dgic.testing.common.asm3x.AsmClassReader3x.<init>(AsmClassReader3x.java:14)
    at
jp.co.dgic.testing.common.asm.AsmClassReader.createAsmClassReader(AsmClassReader.java:24)
    at
jp.co.dgic.testing.common.AsmClassModifier.getModifiedClass(AsmClassModifier.java:49)
    ... 86 more

I got these errors..

How can i solve these problem


if i change my conversion rule like this there is no problem


@ConversionRule("'lastupdated':@[E-MAIL ADDRESS DELETED](),"
+
               "'*basiccontractexcecutiondate':@projectmgnt.util.CalcUtil
@convertDate('2008/11/11'')*," +

    public void convert(AbstractCustomermasterPage src,Customermaster dest);

thanks in advance,
トマス
-------------- next part --------------
HTMLの添付ファイルを保管しました...
URL: <http://ml.seasar.org/archives/seasar-user/attachments/20090619/b3b663a7/attachment.html>


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