[Seasar-user:13978] Re: [Dbflute]Dao was interrupted by NullPointerException

kubo [E-MAIL ADDRESS DELETED]
2008年 4月 28日 (月) 16:22:43 JST


久保です。

志村さん、こんにちは

PagerStatementFactoryクラスにて発生しているようです。
jdbc.diconのPagerStatementFactory定義部分を
BasicStatementFactoryに変えて試して頂けませんでしょうか?

DBFluteは、S2Pagerを利用しないため、
PagerStatementFactoryを利用しなくても問題ありません。

2008/4/26 Masanobu Shimura <[E-MAIL ADDRESS DELETED]>:
> 久保さま
>
> お世話になります。 志村です。
>
> 環境は、S2 2.4.25、S2DAO 1.0.48 Dbflute 0.6.8で jdbc.diconは、s2daoのものをいれて、mssqlで
>  使用 しています。
>
> Selectは上手くいくのですが、updateをしようとすると、「MenuDao was interrupted by
> NullPointerException」と
>  なってしまいます。どこか設定が足りないのだとおもいますが。
>
> よろしくお願いいたします。
> DEBUG 2008-04-26 22:39:02,891 [main] S2Containerを作成します。path=app.dicon
> DEBUG 2008-04-26 22:39:02,929 [main] 環境変数#Envにファイル(env.txt)から値(ct)が設定されました
>  DEBUG 2008-04-26 22:39:02,980 [main] S2Containerを作成します。path=dbflute.dicon
> DEBUG 2008-04-26 22:39:02,993 [main] S2Containerを作成します。path=j2ee.dicon
> DEBUG 2008-04-26 22:39:03,012 [main] S2Containerを作成します。path=jta.dicon
>  DEBUG 2008-04-26 22:39:03,213 [main] S2Containerを作成しました。path=jta.dicon
> DEBUG 2008-04-26 22:39:03,213 [main] S2Containerを作成します。path=jdbc.dicon
> DEBUG 2008-04-26 22:39:03,345 [main] S2Containerを作成しました。path=jdbc.dicon
>  DEBUG 2008-04-26 22:39:03,360 [main] S2Containerを作成しました。path=j2ee.dicon
> DEBUG 2008-04-26 22:39:03,677 [main] S2Containerを作成しました。path=dbflute.dicon
> DEBUG 2008-04-26 22:39:03,677 [main] S2Containerを作成します。path=convention.dicon
>  DEBUG 2008-04-26 22:39:03,708 [main]
> S2Containerを作成しました。path=convention.dicon
> DEBUG 2008-04-26 22:39:03,709 [main] S2Containerを作成します。path=dao.dicon
> DEBUG 2008-04-26 22:39:03,752 [main] S2Containerを作成しました。path=dao.dicon
>  DEBUG 2008-04-26 22:39:03,752 [main] S2Containerを作成します。path=aop.dicon
> DEBUG 2008-04-26 22:39:03,803 [main] S2Containerを作成しました。path=aop.dicon
> DEBUG 2008-04-26 22:39:03,805 [main] S2Containerを作成しました。path=app.dicon
>  INFO  2008-04-26 22:39:03,862 [main] /* * * * * * * * * * * * * * * * * * *
> * * * * * * * * * {DBFlute}
> INFO  2008-04-26 22:39:03,863 [main] {Injection Information}
>   [XADataSource]:
>     driver = net.sourceforge.jtds.jdbc.Driver
>      url    = jdbc:jtds:sqlserver://localhost/micstest;instance=SQLEXPRESS
>     user   = sa
>   [StatementFactory]:
>     Injected statementFactory is ConfigurableStatementFactory. But DBFlute
> uses original statementFactory.
>      If the injected statementFactory is ConfigurableStatementFactory, the
> config is inherited to the original statementFactory.
>   [ResultSetFactory]:
>     Injected resultSetFactory is PagerResultSetFactoryWrapper. But DBFlute
> uses original resultSetFactory.
>  DEBUG 2008-04-26 22:39:03,890 [main] {Initialize against the ClassLoader
> Headache}
>   ...Loading class of
> com.shimura.dbflutetest.dblute.allcommon.cbean.SimplePagingBean by class
> sun.misc.Launcher$AppClassLoader
>   ...Loading class of ...and so on
>  INFO  2008-04-26 22:39:03,896 [main] ...Initializing database product name
> as default: SqlServer
> INFO  2008-04-26 22:39:03,909 [main] ...Closing the registration of sqlLog.
> INFO  2008-04-26 22:39:03,909 [main] {SqlLog Information}
>    [SqlLogRegistry]
>     SqlLogRegistry(org.seasar.extension.jdbc) is close! It's default for
> DBFlute.
>     If you want to use this, set SqlLogRegistry to SqlLogRegistryLocator at
> yourself.
> INFO  2008-04-26 22:39:03,911 [main] ...Locking the config of dbflute!
>  INFO  2008-04-26 22:39:03,911 [main] * * * * */
> INFO  2008-04-26 22:39:04,433 [main] Running on [ENV]ct, [DEPLOY MODE]Normal
> Mode
> DEBUG 2008-04-26 22:39:04,528 [main]
> /=========================================================================
>  DEBUG 2008-04-26 22:39:04,528 [main]
> MenuDao.selectList()
> DEBUG 2008-04-26 22:39:04,528 [main]
> ===================/
>  DEBUG 2008-04-26 22:39:04,534 [main] MenuBhv.selectList() --> ...
> DEBUG 2008-04-26 22:39:04,535 [main] ...Creating daoMetaData.
> DEBUG 2008-04-26 22:39:04,729 [main] 物理的なコネクションを取得しました
> DEBUG 2008-04-26 22:39:04,729 [main] 論理的なコネクションを取得しました。tx=null
>  DEBUG 2008-04-26 22:39:04,743 [main] 論理的なコネクションを閉じました。tx=null
> DEBUG 2008-04-26 22:39:04,745 [main] 論理的なコネクションを取得しました。tx=null
> DEBUG 2008-04-26 22:39:04,838 [main] 論理的なコネクションを閉じました。tx=null
> DEBUG 2008-04-26 22:39:04,840 [main] ...Initializing sqlCommand.
>  DEBUG 2008-04-26 22:39:04,874 [main] SqlCommand Initialization Cost:
> [00m00s338ms]
> DEBUG 2008-04-26 22:39:04,941 [main] 論理的なコネクションを取得しました。tx=null
> DEBUG 2008-04-26 22:39:04,948 [main] select dflocal.id as id,
> dflocal.menugroup as menugroup, dflocal.menucontents as menucontents from
> menu dflocal where dflocal.menugroup = 'P'
>  DEBUG 2008-04-26 22:39:04,985 [main] 論理的なコネクションを閉じました。tx=null
> DEBUG 2008-04-26 22:39:04,986 [main] ===========/ [00m00s451ms - Selected
> list: 1 first={1,P,<TEST>}]
> DEBUG 2008-04-26 22:39:04,986 [main]
>  DEBUG 2008-04-26 22:39:04,987 [main]
> /=================================================================================
> DEBUG 2008-04-26 22:39:04,987 [main]
> MenuDao.updateModifiedOnly()
>  DEBUG 2008-04-26 22:39:04,988 [main]
> ===========================/
> DEBUG 2008-04-26 22:39:04,988 [main] MenuBhv.delegateUpdate() --> ...
> DEBUG 2008-04-26 22:39:04,988 [main] ...Initializing sqlCommand.
>  DEBUG 2008-04-26 22:39:04,992 [main] SqlCommand Initialization Cost:
> [00m00s004ms]
> DEBUG 2008-04-26 22:39:05,004 [main] 論理的なコネクションを取得しました。tx=null
> DEBUG 2008-04-26 22:39:05,005 [main] UPDATE menu SET menucontents =
> 'TEST222' WHERE id = 1
>  DEBUG 2008-04-26 22:39:05,006 [main] 論理的なコネクションを閉じました。tx=null
> DEBUG 2008-04-26 22:39:05,006 [main] MenuDao was interrupted by
> NullPointerException
> [Interrupted Target]
>    dao    = MenuDao
>   method = public abstract int
> com.shimura.dbflutetest.dblute.bsdao.BsMenuDao.updateModifiedOnly(com.shimura.dbflutetest.dblute.exentity.Menu)
>   args   = {1,P,TEST222}
> Exception in thread "main" java.lang.NullPointerException
>      at
> org.seasar.dao.pager.PagerStatementFactory.createPreparedStatement(PagerStatementFactory.java:42)
>     at
> org.seasar.extension.jdbc.impl.ConfigurableStatementFactory.createPreparedStatement(ConfigurableStatementFactory.java:67)
>      at
> com.shimura.dbflutetest.dblute.allcommon.s2dao.internal.sqlhandler.InternalBasicHandler.prepareStatement(InternalBasicHandler.java:162)
>     at
> com.shimura.dbflutetest.dblute.allcommon.s2dao.internal.sqlhandler.InternalAbstractAutoHandler.execute(InternalAbstractAutoHandler.java:78)
>      at
> com.shimura.dbflutetest.dblute.allcommon.s2dao.internal.sqlhandler.InternalAbstractAutoHandler.execute(InternalAbstractAutoHandler.java:64)
>     at
> com.shimura.dbflutetest.dblute.allcommon.s2dao.internal.sqlcommand.InternalUpdateModifiedOnlyCommand.execute(InternalUpdateModifiedOnlyCommand.java:59)
>      at
> com.shimura.dbflutetest.dblute.allcommon.s2dao.S2DaoInterceptor.dispatchInvoking(S2DaoInterceptor.java:129)
>     at
> com.shimura.dbflutetest.dblute.allcommon.s2dao.S2DaoInterceptor.invoke(S2DaoInterceptor.java:64)
>      at
> com.shimura.dbflutetest.dblute.exdao.MenuDao$$EnhancedByS2AOP$$1f11507$$MethodInvocation$$updateModifiedOnly8.proceed(MethodInvocationClassGenerator.java)
>     at
> com.shimura.dbflutetest.dblute.exdao.MenuDao$$EnhancedByS2AOP$$1f11507.updateModifiedOnly(MenuDao$$EnhancedByS2AOP$$1f11507.java)
>      at
> com.shimura.dbflutetest.dblute.bsbhv.BsMenuBhv.delegateUpdate(BsMenuBhv.java:355)
>     at
> com.shimura.dbflutetest.dblute.bsbhv.BsMenuBhv$4.callbackDelegateUpdate(BsMenuBhv.java:227)
>     at
> com.shimura.dbflutetest.dblute.bsbhv.BsMenuBhv$4.callbackDelegateUpdate(BsMenuBhv.java:1)
>      at
> com.shimura.dbflutetest.dblute.allcommon.bhv.AbstractBehaviorWritable.helpUpdateInternally(AbstractBehaviorWritable.java:131)
>     at
> com.shimura.dbflutetest.dblute.bsbhv.BsMenuBhv.update(BsMenuBhv.java:226)
>     at com.shimura.dbflutetest.Test.main(Test.java:22)
>
>
> _______________________________________________
>  Seasar-user mailing list
>  [E-MAIL ADDRESS DELETED]
>  https://ml.seasar.org/mailman/listinfo/seasar-user
>
>


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