2017-01-06 33 views
0

jbossでアプリケーションを実行しようとすると、スタックトレースが発生しています。アプリケーションの開始時にデータベース接続が必要です。hibernate、spring integrationと私データベースはmysqlです。私のデータベースの詳細が正しい。私が紛失しているものは何ですか?あなたのGatewayAquirerConfigでJBoss上でspringアプリケーションをデプロイする際にエラーが発生しました

2017-01-06 12:12:23,933 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 70) MSC000001: 
    Failed to start service jboss.undertow.deployment.default-server.default-host./ZealWay: 
    org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./ZealWay: 
    java.lang.RuntimeException: org.springframework.beans.factory.UnsatisfiedDependencyException: 
    Error creating bean with name 'webController': Unsatisfied dependency expressed through field 'transactionManagerService': 
    Error creating bean with name 'transactionManagerServiceImpl': Unsatisfied dependency expressed through field 'gatewayFacade': 
    Error creating bean with name 'gatewayFacade': Unsatisfied dependency expressed through field 'gatewayRouter': 
    Error creating bean with name 'gatewayRouterImpl': Unsatisfied dependency expressed through field 'gatewayAquirers': 
    Error creating bean with name 'gatewayAquirers' defined in class path resource [com/iz/zw/configuration/GatewayAquirerConfig.class]: 
    Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: 
    Failed to instantiate [java.util.HashMap]: Factory method 'gatewayAquirers' threw exception; 
    nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; 
    nested exception is org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection; 

データソース構成コード

@Bean 
    public DataSource dataSource() throws IllegalStateException, PropertyVetoException { 
     ComboPooledDataSource dataSource = new ComboPooledDataSource(); 
     dataSource.setDriverClass(environment.getRequiredProperty("jdbc.driverClassName")); 
     dataSource.setJdbcUrl(environment.getRequiredProperty("jdbc.url")); 
     dataSource.setUser(environment.getRequiredProperty("jdbc.username")); 
     dataSource.setPassword(environment.getRequiredProperty("jdbc.password")); 
     dataSource.setInitialPoolSize(Integer.parseInt(environment.getProperty("jdbc.initial.pool.size"))); 
     dataSource.setMinPoolSize(Integer.parseInt(environment.getProperty("jdbc.min.pool.size"))); 
     dataSource.setMaxPoolSize(Integer.parseInt(environment.getProperty("jdbc.max.pool.size"))); 
     return dataSource; 
    } 
+0

'JDBC接続を取得できません。 ':DB接続に問題があります。たぶんJNDIで正しく公開されていないかもしれません... –

答えて

0

あなたは豆gatewayAquirersを定義していません。おそらく持っている:

@Autowired 
GatewayAquirers gatewayAquirers; 

どこかが、GatewayAquirersは@Componentまたは@Serviceを持っていないか、またはパッケージのスキャンで拾われていません。

+0

しかし、Tomcatにデプロイするときにはうまくいきます! – Shailesh

+0

JBossでデータベース接続が正しいですか?どのようにデータベースに接続しますか?あなたのデータソースの設定。 –

+0

が私のデータソース設定を追加しました – Shailesh

関連する問題