[seasar-dotnet:1710] Re: [dbflute JDBCエラー]
thomas
[E-MAIL ADDRESS DELETED]
2010年 6月 9日 (水) 15:24:27 JST
Hi,
I have run the jdbc.bat and generate.bat file.These two files runs without
any errors.
i wnat to genrate procedure parameter bean,so i changed the
isGenerateProcedureParameterBean = true
isGenerateProcedureCustomizeEntity = true
in outsideSqlDefinitionMap.dfprop file.
And i run the sql2entity.bat file.
I got the following exception
2010-06-09 15:19:11,752 [main] INFO
(DfDBFluteTaskUtil#getBuildProperties():81) - ...Using contextProperties:
build.properties
2010-06-09 15:19:11,752 [main] INFO
(DfDBFluteTaskUtil#getBuildProperties():124) - [Build-Properties]: size=1
2010-06-09 15:19:11,752 [main] INFO
(DfDBFluteTaskUtil#getBuildProperties():126) - torque.project = dfclient
2010-06-09 15:19:11,752 [main] INFO
(DfDBFluteTaskUtil#getBuildProperties():128) -
2010-06-09 15:19:11,830 [main] INFO (DfSimpleDataSourceCreator#create():73)
- ...Creating data source:
2010-06-09 15:19:11,830 [main] INFO (DfSimpleDataSourceCreator#create():74)
- driver = com.microsoft.sqlserver.jdbc.SQLServerDriver
2010-06-09 15:19:11,830 [main] INFO (DfSimpleDataSourceCreator#create():75)
- url = jdbc:sqlserver://UPIDS01;DatabaseName=PMSDB
2010-06-09 15:19:11,830 [main] INFO (DfSimpleDataSourceCreator#create():76)
- user = sa
2010-06-09 15:19:12,564 [main] INFO
(DfSql2EntityTask#setupControlTemplate():183) -
2010-06-09 15:19:12,564 [main] INFO
(DfSql2EntityTask#setupControlTemplate():184) - * * * * * * * * * *
2010-06-09 15:19:12,580 [main] INFO
(DfSql2EntityTask#setupControlTemplate():185) - * Process CSharp *
2010-06-09 15:19:12,580 [main] INFO
(DfSql2EntityTask#setupControlTemplate():186) - * * * * * * * * * *
2010-06-09 15:19:12,580 [main] INFO
(DfSql2EntityTask#setupControlTemplate():188) - ...Using CSharp control:
om/ControlSql2EntityCSharp.vm
2010-06-09 15:19:12,596 [main] INFO (DTDResolver#resolveEntity():124) -
Resolver: used database.dtd from
'org.apache.torque.engine.database.transform' package
2010-06-09 15:19:13,299 [main] INFO (DfSqlFileFireMan#execute():80) -
{Fired SQL}: success=0 failure=0 (in 0 files)
2010-06-09 15:19:13,299 [main] INFO
(DfSql2EntityTask#doSetupProcedure():639) -
2010-06-09 15:19:13,299 [main] INFO
(DfSql2EntityTask#doSetupProcedure():640) - ...Setting up procedures for
generating parameter-beans
2010-06-09 15:19:14,205 [main] ERROR (DfDBFluteTaskUtil#logException():180)
- Look! Read the message below.
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Failed to execute DBFlute Task 'Sql2Entity'.
[Exception]
java.lang.NumberFormatException
* * * * * * * * * */
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at
com.microsoft.sqlserver.jdbc.IntColumnFilter.apply(SQLServerDatabaseMetaData.java:2016)
at com.microsoft.sqlserver.jdbc.Column.getValue(Column.java:114)
at
com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:1820)
at
com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:1805)
at
com.microsoft.sqlserver.jdbc.SQLServerResultSet.getString(SQLServerResultSet.java:2123)
at
org.seasar.dbflute.logic.jdbc.handler.DfProcedureHandler.setupProcedureColumnMetaInfo(DfProcedureHandler.java:456)
at
org.seasar.dbflute.logic.jdbc.handler.DfProcedureHandler.getPlainProcedureList(DfProcedureHandler.java:335)
at
org.seasar.dbflute.logic.jdbc.handler.DfProcedureHandler.getAvailableProcedureMap(DfProcedureHandler.java:97)
at
org.seasar.dbflute.logic.jdbc.handler.DfProcedureHandler.getAvailableProcedureList(DfProcedureHandler.java:77)
at
org.seasar.dbflute.task.DfSql2EntityTask.getAvailableProcedureList(DfSql2EntityTask.java:723)
at
org.seasar.dbflute.task.DfSql2EntityTask.doSetupProcedure(DfSql2EntityTask.java:641)
at
org.seasar.dbflute.task.DfSql2EntityTask.setupProcedure(DfSql2EntityTask.java:618)
at
org.seasar.dbflute.task.DfSql2EntityTask.doExecute(DfSql2EntityTask.java:134)
at
org.seasar.dbflute.task.bs.DfAbstractTexenTask.execute(DfAbstractTexenTask.java:114)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
2010-06-09 15:19:14,252 [main] INFO
(DfSimpleDataSourceCreator#destroy():116) - ...closeReally()
2010-06-09 15:19:14,283 [main] INFO
(DfAbstractTexenTask#showFinalMessage():215) -
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
[Task End]: 00m02s499ms *Abort
DBFLUTE_CLIENT: {dfclient}
database = mssql
language = csharp
container = seasar
package = sample.jp.dbflute
DBFLUTE_ENVIRONMENT_TYPE: {df:default}
driver = com.microsoft.sqlserver.jdbc.SQLServerDriver
url = jdbc:sqlserver://UPIDS01;DatabaseName=PMSDB
schema = {pmsdb.dbo as main}
user = sa
props = {}
additionalSchema =
dataLoadingType = ut
refreshProject =
_/_/_/_/_/_/_/_/_/_/ {Sql2Entity}
How can i solve this problem
Thanks and Regards,
John
2010/6/8 thomas <[E-MAIL ADDRESS DELETED]>
> Hi,
>
> Thanks for your reply.After your reply now i am able to call dbflute from
> my application.
>
> Regards,
> Thomas.
>
>
> On Tue, Jun 8, 2010 at 11:29 AM, kubo <[E-MAIL ADDRESS DELETED]> wrote:
>
>> Hello,
>>
>> > when i call this function it throws FilenotFoundException
>> >
>> > ファイルまたはアセンブリ 'Castle.DynamicProxy, Version=1.1.5.0, Culture=neutral,
>> > PublicKeyToken=f362209d9bee91d8'、またはその依存関係の 1
>> > つが読み込めませんでした。指定されたファイルが見つかりません.
>>
>> Does it include the Castle.DynamicProxy.dll as reference libraries?
>> For example, dfnet-basic-example refers these libraries:
>>
>> Castle.DynamicProxy.dll
>> CoreLab.MySql.dll
>> log4net.dll
>> MbUnit.Framework.dll
>> MySql.Data.dll
>> Seasar.dll
>> Seasar.Dao.dll
>> Seasar.Dxo.dll
>> Seasar.DynamicProxy.dll
>> Seasar.Quill.dll
>> Seasar.Unit.dll
>>
>> You don't need CoreLab.MySql.dll, MySql.Data.dll
>> because you use SQLServer. And also if you don't
>> use MbUnit, MbUnit.Framework.dll is not required.
>> Other dll files are required to use "Quill + DBFlute.NET".
>>
>> 2010/6/8 thomas <[E-MAIL ADDRESS DELETED]>:
>> > Hi,
>> >
>> > Thanks for your immediate reply.
>> >
>> > I have gone through the samples.I am trying to call these functions from
>> > windows application.
>> > Am using SQLServer Database.
>> >
>> >
>> > my App.config file
>> >
>> > <quill>
>> > <dataSources>
>> > <dataSource name="ExampleDB">
>> > <provider>SqlServer</provider>
>> > <connectionString>"server=AGTNB15;user id=sa; password=angels;
>> > database=pmsdb-client;"</connectionString>
>> > <class>Seasar.Extension.Tx.Impl.TxDataSource</class>
>> > </dataSource>
>> > </dataSources>
>> > <!--<assemblys>
>> >
>> > <assembly>Oracle.DataAccess, version=10.2.0.100, Culture=neutral,
>> >
>> > PublicKeyToken=89b483f429c47342</assembly>
>> > </assemblys>
>> >
>> > -->
>> > </quill>
>> >
>> > In that documents it is mentioned that the assembly is needed only if i
>> use
>> > other than Sqlserver.
>> >
>> >
>> > QuillInjector.GetInstance.Inject(Me)
>> >
>> > when i call this function it throws FilenotFoundException
>> >
>> > ファイルまたはアセンブリ 'Castle.DynamicProxy, Version=1.1.5.0, Culture=neutral,
>> > PublicKeyToken=f362209d9bee91d8'、またはその依存関係の 1
>> > つが読み込めませんでした。指定されたファイルが見つかりません.
>> >
>> > This is the Exception i got.
>> >
>> > Any other settings i missed here?
>> >
>> > Thanks in Advance.
>> > Thomas.
>> >
>> >
>> >
>> >
>> > 2010/6/7 kubo <[E-MAIL ADDRESS DELETED]>
>> >>
>> >> Hello,
>> >>
>> >> At first, DB settings are in App.config
>> >>
>> >> // App.config example of dfnet-basic-example
>> >>
>> >>
>> https://www.seasar.org/svn/sandbox/dbflute.net/trunk/dfnet-basic-example/source/DfExampleTest/App.config
>> >>
>> >> <quill>
>> >> <dataSources>
>> >> <dataSource name="xxx">
>> >> <provider>xxx</provider>
>> >> <connectionString>"xxx"</connectionString>
>> >> <class>Seasar.Extension.Tx.Impl.TxDataSource</class>
>> >> </dataSource>
>> >> </dataSources>
>> >> <assemblys>
>> >> <assembly>xxx</assembly>
>> >> </assemblys>
>> >> </quill>
>> >>
>> >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> -
>> >> -
>> >> And there is an example of "ASP.NET + DBFlute.NET".
>> >> Please refer to the example, and you can get
>> >> a way to call those classes.
>> >> (Even if you don't use ASP.NET, it is so beneficial)
>> >>
>> >> // dfnet-asp.net-example
>> >>
>> https://www.seasar.org/svn/sandbox/dbflute.net/trunk/dfnet-asp.net-example
>> >>
>> >> // MemberList.aspx.cs (uses QuillInjector at the constructor)
>> >>
>> >>
>> https://www.seasar.org/svn/sandbox/dbflute.net/trunk/dfnet-asp.net-example/source/DfExampleWeb/View/Member/MemberList.aspx.cs
>> >>
>> >> // MemberFacade.cs (called by asp.net class and uses Behavior)
>> >>
>> >>
>> https://www.seasar.org/svn/sandbox/dbflute.net/trunk/dfnet-asp.net-example/source/DfExampleBiz/Facade/Member/MemberFacade.cs
>> >>
>> >> Call-path is as follows:
>> >> MemberList.aspx
>> >> --> MemberFacade.cs
>> >> --> MemberBhv.cs
>> >>
>> >> DBFlute.NET uses Quill.
>> >> It's simple DI container without setting files.
>> >> (similar to Google Guice in Java)
>> >> http://s2container.net.seasar.org/ja/quill.html
>> >>
>> >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> -
>> >> -
>> >> MemberFacade and MemberBhv are DI component (of Quill).
>> >> If a class has an [Implementation] attribute, it means DI conponent.
>> >>
>> >> [Implementation]
>> >> public class MemberFacade ...
>> >>
>> >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> -
>> >> -
>> >> And MemberFacade.Update() method has a [Transaction] attribute.
>> >> It means the method is in transaction scope.
>> >> Only a DI component can use the [Transaction] attribute.
>> >> (And then the method must be virtual)
>> >>
>> >> [Transaction]
>> >> public virtual void Update(MemberDto dto)
>> >>
>> >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> -
>> >> -
>> >> MemberList is not (cannot be) DI component
>> >> so MemberList needs to inject myself by QuillInjector
>> >> at the constructor for calling DI component classes.
>> >>
>> >> protected MemberFacade facade; // injected by Inject(this);
>> >> public MemberList() {
>> >> QuillInjector.GetInstance().Inject(this);
>> >> }
>> >> protected void Page_Load(object sender, EventArgs e) {
>> >> ... = facade.GetMemberList();
>> >> }
>> >>
>> >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> -
>> >> -
>> >>
>> >> Thanks
>> >> jflute
>> >>
>> >> 2010/6/7 thomas <[E-MAIL ADDRESS DELETED]>:
>> >> > Hi,
>> >> >
>> >> > Now am able to create C# classes using dbflute with SQLServer.
>> >> > Now i want to use these classes in my application.
>> >> >
>> >> > What are the setting files i have to write for calling these classes.
>> >> > (like jdbc.dicon in java)
>> >> >
>> >> > Thanks in advance.
>> >> > Thomas
>> >> >
>> >> >
>> >> > 2010/6/5 kubo <[E-MAIL ADDRESS DELETED]>
>> >> >>
>> >> >> Hello thomas
>> >> >>
>> >> >> Please retry by dbflute-0.8.9.17-01-SNAPSHOT.zip.
>> >> >> You can get more detail messages of SQLException.
>> >> >>
>> >> >> Download it from this page:
>> >> >> http://dbflute.net.sandbox.seasar.org/ja/environment/newest.html
>> >> >>
>> >> >> Thanks
>> >> >> jflute
>> >> >> _______________________________________________
>> >> >> seasar-dotnet mailing list
>> >> >> [E-MAIL ADDRESS DELETED]
>> >> >> https://ml.seasar.org/mailman/listinfo/seasar-dotnet
>> >> >
>> >> >
>> >> > _______________________________________________
>> >> > seasar-dotnet mailing list
>> >> > [E-MAIL ADDRESS DELETED]
>> >> > https://ml.seasar.org/mailman/listinfo/seasar-dotnet
>> >> >
>> >> >
>> >> _______________________________________________
>> >> seasar-dotnet mailing list
>> >> [E-MAIL ADDRESS DELETED]
>> >> https://ml.seasar.org/mailman/listinfo/seasar-dotnet
>> >
>> >
>> > _______________________________________________
>> > seasar-dotnet mailing list
>> > [E-MAIL ADDRESS DELETED]
>> > https://ml.seasar.org/mailman/listinfo/seasar-dotnet
>> >
>> >
>> _______________________________________________
>> seasar-dotnet mailing list
>> [E-MAIL ADDRESS DELETED]
>> https://ml.seasar.org/mailman/listinfo/seasar-dotnet
>>
>
>
-------------- next part --------------
HTMLの添付ファイルを保管しました...
URL: <http://ml.seasar.org/archives/seasar-dotnet/attachments/20100609/a800b3d6/attachment.html>
seasar-dotnet メーリングリストの案内