[Seasar-user:15689] s2jdbc-gen + Oracle について

neko akira [E-MAIL ADDRESS DELETED]
2008年 9月 8日 (月) 15:01:47 JST


こんにちはあきらです。

s2jdbc-genを使ってみようと思い以下の手順を行いました
WindowsXP+Oracle10g無料版

1、新規プロジェクトを作成
 Teeda+S2JDBC

s2jdbc-gen-build.xml がなかったのでとりあえずプロジェクトを捨てる。。。

2、新規プロジェクトを作成2
 SAStruts + S2JDBCで作成

3、ojdbc14.jar のコピー
 src\main\webapp\WEB-INF\libに設置

4、jdbc.dicon の編集
 H2をコメントアウト、Oracleの設定追加

	<component name="xaDataSource"
		class="org.seasar.extension.dbcp.impl.XADataSourceImpl">
		<property name="driverClassName">
			"oracle.jdbc.driver.OracleDriver"
		</property>
		<property name="URL">
			"jdbc:oracle:thin:@localhost:1521:xe"
		</property>
		<property name="user">"user"</property>
		<property name="password">"pass"</property>
	</component>

5、antで gen-entity を実行
 エラー
 RDBMS(Oracle)に対しS2JDBC-Gen用のデータベースの方言(org.seasar.extension.jdbc.gen.internal.dialect.H2GenDialect)を使用します。

どうやら、dialectがH2でわたっているようです。。。

セミナーでみさせていただき、ドキュメントはまだ見ていない状況ですので
ドキュメントはこれから読みますがまずは現象報告まで!

============================================================================================

Buildfile: ***\s2jdbc-gen-build.xml
gen-entity:
[gen-entity] DEBUG 2008-09-08 14:43:46,503 [main]
コマンド(org.seasar.extension.jdbc.gen.internal.command.GenerateEntityCommand)を実行します。
[gen-entity] DEBUG 2008-09-08 14:43:46,503 [main]
コマンドのプロパティ(entityPackageName)には値(entity)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,503 [main]
コマンドのプロパティ(entityTemplateFileName)には値(java/entity.ftl)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,503 [main]
コマンドのプロパティ(javaFileDestDir)には値(***\src\main\java)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,503 [main]
コマンドのプロパティ(javaFileEncoding)には値(UTF-8)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,503 [main]
コマンドのプロパティ(overwrite)には値(false)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,503 [main]
コマンドのプロパティ(rootPackageName)には値(***)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,503 [main]
コマンドのプロパティ(schemaName)には値(null)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,503 [main]
コマンドのプロパティ(templateFileEncoding)には値(UTF-8)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,503 [main]
コマンドのプロパティ(templateFilePrimaryDir)には値(null)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,503 [main]
コマンドのプロパティ(tableNamePattern)には値(.*)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,503 [main]
コマンドのプロパティ(ignoreTableNamePattern)には値((SCHEMA_INFO|.*\$.*))が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,519 [main]
コマンドのプロパティ(versionColumnNamePattern)には値(VERSION([_]?NO)?)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,519 [main]
コマンドのプロパティ(pluralFormFile)には値(null)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,519 [main]
コマンドのプロパティ(showCatalogName)には値(false)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,519 [main]
コマンドのプロパティ(showSchemaName)には値(false)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,519 [main]
コマンドのプロパティ(showTableName)には値(false)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,519 [main]
コマンドのプロパティ(showColumnName)には値(false)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,519 [main]
コマンドのプロパティ(showColumnDefinition)には値(false)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,519 [main]
コマンドのプロパティ(showJoinColumn)には値(false)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,519 [main]
コマンドのプロパティ(genDialectClassName)には値(null)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,519 [main]
コマンドのプロパティ(configPath)には値(s2jdbc.dicon)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,519 [main]
コマンドのプロパティ(env)には値(ut)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,519 [main]
コマンドのプロパティ(jdbcManagerName)には値(jdbcManager)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,519 [main]
コマンドのプロパティ(factoryClassName)には値(org.seasar.extension.jdbc.gen.internal.factory.FactoryImpl)が設定されています。
[gen-entity] DEBUG 2008-09-08 14:43:46,550 [main]
環境変数#Envにファイル(env.txt)から値(ct)が設定されました
[gen-entity] DEBUG 2008-09-08 14:43:46,878 [main]
S2Containerを作成します。path=warmdeploy.dicon
[gen-entity] DEBUG 2008-09-08 14:43:46,894 [main]
S2Containerを作成します。path=convention.dicon
[gen-entity] DEBUG 2008-09-08 14:43:47,066 [main]
S2Containerを作成しました。path=convention.dicon
[gen-entity] DEBUG 2008-09-08 14:43:47,066 [main]
S2Containerを作成します。path=customizer.dicon
[gen-entity] DEBUG 2008-09-08 14:43:47,066 [main]
S2Containerを作成します。path=default-customizer.dicon
[gen-entity] DEBUG 2008-09-08 14:43:47,081 [main]
S2Containerを作成します。path=std-customizer.dicon
[gen-entity] DEBUG 2008-09-08 14:43:47,097 [main]
S2Containerを作成します。path=std-customizer-tiger.dicon
[gen-entity] DEBUG 2008-09-08 14:43:47,144 [main]
S2Containerを作成しました。path=std-customizer-tiger.dicon
[gen-entity] DEBUG 2008-09-08 14:43:47,222 [main]
S2Containerを作成しました。path=std-customizer.dicon
[gen-entity] DEBUG 2008-09-08 14:43:47,238 [main]
S2Containerを作成しました。path=default-customizer.dicon
[gen-entity] DEBUG 2008-09-08 14:43:47,269 [main]
S2Containerを作成しました。path=customizer.dicon
[gen-entity] DEBUG 2008-09-08 14:43:47,269 [main]
S2Containerを作成します。path=creator.dicon
[gen-entity] DEBUG 2008-09-08 14:43:47,347 [main]
S2Containerを作成しました。path=creator.dicon
[gen-entity] DEBUG 2008-09-08 14:43:47,363 [main]
S2Containerを作成しました。path=warmdeploy.dicon
[gen-entity] DEBUG 2008-09-08 14:43:47,441 [main]
S2Containerを作成します。path=s2jdbc.dicon
[gen-entity] DEBUG 2008-09-08 14:43:47,456 [main]
S2Containerを作成します。path=jdbc.dicon
[gen-entity] DEBUG 2008-09-08 14:43:47,503 [main]
S2Containerを作成します。path=jta.dicon
[gen-entity] DEBUG 2008-09-08 14:43:47,550 [main]
S2Containerを作成しました。path=jta.dicon
[gen-entity] DEBUG 2008-09-08 14:43:47,613 [main]
S2Containerを作成しました。path=jdbc.dicon
[gen-entity] DEBUG 2008-09-08 14:43:47,613 [main]
S2Containerを作成します。path=s2jdbc-internal.dicon
[gen-entity] DEBUG 2008-09-08 14:43:47,628 [main]
S2Containerを作成します。path=convention.dicon
[gen-entity] DEBUG 2008-09-08 14:43:47,644 [main]
S2Containerを作成しました。path=convention.dicon
[gen-entity] DEBUG 2008-09-08 14:43:47,660 [main]
S2Containerを作成しました。path=s2jdbc-internal.dicon
[gen-entity] DEBUG 2008-09-08 14:43:47,800 [main]
S2Containerを作成しました。path=s2jdbc.dicon
[gen-entity] INFO  2008-09-08 14:43:48,081 [main] Running on [ENV]ut,
[DEPLOY MODE]Warm Deploy
[gen-entity] DEBUG 2008-09-08 14:43:48,628 [main] 物理的なコネクションを取得しました
[gen-entity] DEBUG 2008-09-08 14:43:48,800 [main] 論理的なコネクションを取得しました。tx=null
[gen-entity] DEBUG 2008-09-08 14:43:48,816 [main] 論理的なコネクションを閉じました。tx=null
[gen-entity] DEBUG 2008-09-08 14:43:48,816 [main]
RDBMS(Oracle)に対しS2JDBC-Gen用のデータベースの方言(org.seasar.extension.jdbc.gen.internal.dialect.H2GenDialect)を使用します。
[gen-entity] DEBUG 2008-09-08 14:43:48,816 [main] 論理的なコネクションを取得しました。tx=null
[gen-entity] DEBUG 2008-09-08 14:43:49,738 [main] 論理的なコネクションを閉じました。tx=null
[gen-entity] DEBUG 2008-09-08 14:43:49,738 [main] 物理的なコネクションを閉じました
[gen-entity] Java Result: 1

BUILD FAILED
***\s2jdbc-gen-build.xml:29: Exception in thread "main"
org.seasar.extension.jdbc.gen.exception.CommandFailedRuntimeException:
[ES2JDBCGen0005]コマンド(org.seasar.extension.jdbc.gen.internal.command.GenerateEntityCommand)の実行に失敗しました。理由はorg.seasar.framework.exception.SQLRuntimeException:
[ESSR0072]SQLで例外(SQL=[], Message=[ORA-01031: insufficient privileges
], ErrorCode=1031, SQLState=42000)が発生しました
	at org.seasar.extension.jdbc.gen.internal.command.AbstractCommand.execute(AbstractCommand.java:159)
	at org.seasar.extension.jdbc.gen.internal.command.CommandAdapter.main(CommandAdapter.java:46)
Caused by: org.seasar.framework.exception.SQLRuntimeException:
[ESSR0072]SQLで例外(SQL=[], Message=[ORA-01031: insufficient privileges
], ErrorCode=1031, SQLState=42000)が発生しました
	at org.seasar.extension.jdbc.gen.internal.meta.DbTableMetaReaderImpl.getDbUniqueKeyMetaList(DbTableMetaReaderImpl.java:409)
	at org.seasar.extension.jdbc.gen.internal.meta.DbTableMetaReaderImpl.doDbUniqueKeyMeta(DbTableMetaReaderImpl.java:138)
	at org.seasar.extension.jdbc.gen.internal.meta.DbTableMetaReaderImpl.read(DbTableMetaReaderImpl.java:116)
	at org.seasar.extension.jdbc.gen.internal.desc.EntitySetDescFactoryImpl.getEntitySetDesc(EntitySetDescFactoryImpl.java:103)
	at org.seasar.extension.jdbc.gen.internal.command.GenerateEntityCommand.doExecute(GenerateEntityCommand.java:538)
	at org.seasar.extension.jdbc.gen.internal.command.AbstractCommand.execute(AbstractCommand.java:157)
	... 1 more
Caused by: java.sql.SQLException: ORA-01031: insufficient privileges

	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
	at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
	at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:112)
	at oracle.jdbc.driver.T4CStatement.execute_for_rows(T4CStatement.java:474)
	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1028)
	at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1451)
	at oracle.jdbc.OracleDatabaseMetaData.getIndexInfo(OracleDatabaseMetaData.java:3271)
	at org.seasar.extension.jdbc.gen.internal.meta.DbTableMetaReaderImpl.getDbUniqueKeyMetaList(DbTableMetaReaderImpl.java:388)
	... 6 more

Total time: 5 seconds


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