2012-04-16 28 views
3

Grailsの新機能です。私はgrailsバージョン2.0.3をインストールしました。私は私のアプリを実行するたびに同じエラーが発生します。私はこれの背後に理由を見つけることができません。私は以下の完全なstacktraceを与えています:grailsアプリケーションを実行中にエラーが発生しました

| Packaging Grails application..... 
[Fatal Error] plugin-list-grailsCentral.xml:14058:53: XML document structures must start and end within the same entity. 

| Running Grails application 
| Error 2012-04-16 13:58:58,923 [pool-6-thread-1] ERROR context.GrailsContextLoader - Error executing bootstraps: Error creating bean with name 'transactionManagerPostProcessor': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'hibernateProperties' while setting bean property 'hibernateProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: NO)) 
Message: Error creating bean with name 'transactionManagerPostProcessor': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'hibernateProperties' while setting bean property 'hibernateProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: NO)) 
    Line | Method 
->> 303 | innerRun in java.util.concurrent.FutureTask$Sync 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
| 138 | run  in java.util.concurrent.FutureTask 
| 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker 
| 908 | run  in  '' 
^ 680 | run . . in java.lang.Thread 
Caused by BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'hibernateProperties' while setting bean property 'hibernateProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: NO)) 
->> 303 | innerRun in java.util.concurrent.FutureTask$Sync 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
| 138 | run  in java.util.concurrent.FutureTask 
| 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker 
| 908 | run  in  '' 
^ 680 | run . . in java.lang.Thread 
Caused by BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'hibernateProperties' while setting bean property 'hibernateProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: NO)) 
->> 303 | innerRun in java.util.concurrent.FutureTask$Sync 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
| 138 | run  in java.util.concurrent.FutureTask 
| 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker 
| 908 | run  in  '' 
^ 680 | run . . in java.lang.Thread 
Caused by BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: NO)) 
->> 303 | innerRun in java.util.concurrent.FutureTask$Sync 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
| 138 | run  in java.util.concurrent.FutureTask 
| 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker 
| 908 | run  in  '' 
^ 680 | run . . in java.lang.Thread 
Caused by BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: NO)) 
->> 303 | innerRun in java.util.concurrent.FutureTask$Sync 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
| 138 | run  in java.util.concurrent.FutureTask 
| 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker 
| 908 | run  in  '' 
^ 680 | run . . in java.lang.Thread 
Caused by MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: NO)) 
->> 303 | innerRun in java.util.concurrent.FutureTask$Sync 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
| 138 | run  in java.util.concurrent.FutureTask 
| 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker 
| 908 | run  in  '' 
^ 680 | run . . in java.lang.Thread 
Caused by SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: NO)) 
->> 1549 | createPoolableConnectionFactory in org.apache.commons.dbcp.BasicDataSource 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
| 1388 | createDataSource in  '' 
| 1044 | getConnection in  '' 
| 303 | innerRun in java.util.concurrent.FutureTask$Sync 
| 138 | run . . in java.util.concurrent.FutureTask 
| 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker 
| 908 | run . . in  '' 
^ 680 | run  in java.lang.Thread 
Caused by SQLException: Access denied for user 'root'@'localhost' (using password: NO) 
->> 946 | createSQLException in com.mysql.jdbc.SQLError 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
| 2985 | checkErrorPacket in com.mysql.jdbc.MysqlIO 
| 885 | checkErrorPacket in  '' 
| 3421 | secureAuth411 in  '' 
| 1247 | doHandshake in  '' 
| 2775 | createNewIO in com.mysql.jdbc.Connection 
| 1555 | <init> . in  '' 
| 285 | connect in com.mysql.jdbc.NonRegisteringDriver 
| 38 | createConnection in org.apache.commons.dbcp.DriverConnectionFactory 
| 582 | makeObject in org.apache.commons.dbcp.PoolableConnectionFactory 
| 1556 | validateConnectionFactory in org.apache.commons.dbcp.BasicDataSource 
| 1545 | createPoolableConnectionFactory in  '' 
| 1388 | createDataSource in  '' 
| 1044 | getConnection in  '' 
| 303 | innerRun in java.util.concurrent.FutureTask$Sync 
| 138 | run  in java.util.concurrent.FutureTask 
| 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker 
| 908 | run  in  '' 
^ 680 | run . . in java.lang.Thread 

これを引き起こしていることを親切に助けてください。前もって感謝します。

+0

あなたDataSource.groovyをチェックして、あなたがそこに正しい設定を持っていることを確認してください。春のエラーの場合は、根本的な原因を見つけるために、最後に目を向けるのが一般的です。 – krock

+0

このエラーがなぜ発生するのか教えてください: "[致命的なエラー] plugin-list-grailsCentral.xml:14058:53:XML文書構造が同じエンティティ内で開始し終了する必要があります。 – Nuraiz

+0

春の症状が適切に起きていない可能性があります。 – krock

答えて

5

Stacktraceには、Access denied for user 'root'@'localhost'と記載されています。

localhostにMySQLインスタンスが実行されていることを確認してください(パスワードが指定されていないため、stacktraceには何も指定していないので、ユーザrootはパスワードなし)。データソースの設定について

> mysql -u root --password='' -D %YOU DATABASE NAME% 

より:あなたは呼び出すことによって、それを確認することができますhttp://grails.org/doc/latest/guide/conf.html#dataSource

+0

はい。これはデータソースエラーのように見えます。パスワードがなく、ユーザー名rootでMySQLを実行していることを確認してください。そうでない場合は、DataSource.groovyの設定を適切な値に変更します。 –

+0

MySQLサーバが動作しています。私もlocalhostをテストしました、それも実行されています。 – Nuraiz

+0

このエラーの原因を教えてください: "[致命的なエラー] plugin-list-grailsCentral.xml:14058:53:XML文書構造は同じエンティティ内で開始し、終了する必要があります。 – Nuraiz

関連する問題