[Seasar-user:9470] Re: S2TestCaseにてNullPointerExceptionが発生

SETO Azusa [E-MAIL ADDRESS DELETED]
2007年 7月 26日 (木) 14:32:34 JST


せとあずさです。

多分[Seasar-user:8620]と同じ原因だと思うので、2.4.14でfixしていると思います。

https://www.seasar.org/issues/browse/CONTAINER-47

On Thu, 26 Jul 2007 14:15:17 +0900
Junichi Kato <[E-MAIL ADDRESS DELETED]> wrote:

> 加藤です.
> 
> S2.4.13
> Teeda 1.0.8
> S2Dao 1.0.43
> の環境にて,
> 
> 以下のようなTestを書いて実行すると,NullPointerExceptionが発生します.
> NullPointerExceptionが発生しているのですが,対象のテストメソッド自体は実
> 行できています.
> 
> どうやら,
> <include path="teedaExtension.dicon"/>
> を読み込むとNullPointerExceptionになってしまうようです.
> 
> 不具合っぽいんですが,確認していただけたら幸いです.
> 
> public class AccountMasterDaoTest extends S2TestCase  {
> 
> 	private static final String PATH = "app.dicon";
> 	
> 	private AccountMasterDao accountMasterDao;
> 	
> 	@Override
> 	protected void setUp() throws Exception {
> 		super.setUp();
> 		this.include(PATH);
> 	}
> 
> 	public void testSelectAll() {
> 		AccountMaster[] result = accountMasterDao.selectAll();
> 		
> 		
> 	}
> 
> 	public void setAccountMasterDao(AccountMasterDao accountMasterDao) {
> 		this.accountMasterDao = accountMasterDao;
> 	}
> 
> }
> 
> java.lang.NullPointerException
> 	at org.seasar.framework.util.URLUtil.openConnection(URLUtil.java:76)
> 	at org.seasar.teeda.extension.config.taglib.impl.AbstractTaglibManager.openJarURLConnection(AbstractTaglibManager.java:88)
> 	at org.seasar.teeda.extension.config.taglib.impl.ServletContextTaglibManagerImpl.scanJar(ServletContextTaglibManagerImpl.java:61)
> 	at org.seasar.teeda.extension.config.taglib.impl.ServletContextTaglibManagerImpl.scanJars(ServletContextTaglibManagerImpl.java:52)
> 	at org.seasar.teeda.extension.config.taglib.impl.ServletContextTaglibManagerImpl.init(ServletContextTaglibManagerImpl.java:43)
> 	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 org.seasar.framework.util.MethodUtil.invoke(MethodUtil.java:49)
> 	at org.seasar.framework.container.assembler.AbstractMethodAssembler.invoke(AbstractMethodAssembler.java:85)
> 	at org.seasar.framework.container.assembler.DefaultInitMethodAssembler.assemble(DefaultInitMethodAssembler.java:47)
> 	at org.seasar.framework.container.deployer.SingletonComponentDeployer.assemble(SingletonComponentDeployer.java:69)
> 	at org.seasar.framework.container.deployer.SingletonComponentDeployer.deploy(SingletonComponentDeployer.java:48)
> 	at org.seasar.framework.container.deployer.SingletonComponentDeployer.init(SingletonComponentDeployer.java:76)
> 	at org.seasar.framework.container.impl.ComponentDefImpl.init(ComponentDefImpl.java:299)
> 	at org.seasar.framework.container.impl.S2ContainerImpl.init(S2ContainerImpl.java:499)
> 	at org.seasar.framework.container.impl.ThreadSafeS2ContainerImpl.init(ThreadSafeS2ContainerImpl.java:170)
> 	at org.seasar.framework.container.impl.S2ContainerImpl.init(S2ContainerImpl.java:496)
> 	at org.seasar.framework.container.impl.ThreadSafeS2ContainerImpl.init(ThreadSafeS2ContainerImpl.java:170)
> 	at org.seasar.framework.container.impl.S2ContainerImpl.init(S2ContainerImpl.java:496)
> 	at org.seasar.framework.unit.S2FrameworkTestCase.runBare(S2FrameworkTestCase.java:180)
> 	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 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)
> DEBUG 2007-07-26 13:58:45,582 [main] クラス(bookrental.dao.AccountMasterDao[accountMasterDao])のコンポーネント定義を登録します

-- 
せとあずさ
[E-MAIL ADDRESS DELETED]
http://www.fieldnotes.jp/d/



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