和楼主遇到同样的问题,还没有解决,出错如下:16:48:43,001 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem 16:48:43,002 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem. 16:48:43,010 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem 16:48:43,010 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem 16:48:43,015 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension 16:48:43,016 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem 16:48:43,019 INFO [org.jboss.as.security] (MSC service thread 1-9) JBAS013100: Current PicketBox version=4.0.7.Final 16:48:43,072 INFO [org.jboss.as.connector] (MSC service thread 1-13) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final) 16:48:43,109 INFO [org.jboss.as.naming] (MSC service thread 1-8) JBAS011802: Starting Naming Service 16:48:43,120 INFO [org.jboss.as.mail.extension] (MSC service thread 1-5) JBAS015400: Bound mail session [java:jboss/mail/Default] 16:48:43,216 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-14) JBoss Web Services - Stack CXF Server 4.0.2.GA 16:48:43,225 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3) 16:48:43,359 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-14) Starting Coyote HTTP/1.1 on http--0.0.0.0-8080 16:48:43,652 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-16) JBAS015012: Started FileSystemDeploymentService for directory /usr/local/jboss/standalone/deployments 16:48:43,661 INFO [org.jboss.as.remoting] (MSC service thread 1-3) JBAS017100: Listening on /0.0.0.0:4447 16:48:43,661 INFO [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening on /0.0.0.0:9999 16:48:43,705 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-13) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS] 16:48:43,938 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report JBAS014775: New missing/unsatisfied dependencies: service jboss.jdbc-driver.com_mysql (missing) dependents: [service jboss.data-source.java:/MySqlDS] 16:48:43,944 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://0.0.0.0:9990 16:48:43,945 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 1960ms - Started 134 of 212 services (2 services failed or missing dependencies, 74 services are passive or on-demand)
不知道还有没有别的建议?
非常感谢你的回答!期待更多的指点!!
附mysql:
standalone.xml中在drivers中加入:
<driver name="mysql" module="com.mysql"/>
在modules文件夹中创建com->mysql->main
把驱动复制进去后配置module.xml:
<?xml version="1.0" encoding="UTF-8"?><module xmlns="urn:jboss:module:1.0" name="com.mysql"> <resources>
<resource-root path="mysql-connector-java-5.1.22-bin.jar"/>
<!-- Insert resources here -->
</resources>
<dependencies>
<module name="javax.api"/>
</dependencies>
</module>
在项目下配置数据源:
project-ds.xml
为项目名-ds.xml放在与你的war同目录下
<?xml version="1.0" encoding="UTF-8"?>
<datasources xmlns="http://www.jboss.org/ironjacamar/schema">
<datasource jndi-name="java:/batchoutDatasource" enabled="true"
use-java-context="true" pool-name="batchoutDatasource_pool">
<connection-url>jdbc:mysql://localhost:3307/database</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<driver>mysql</driver>
<security>
<user-name>aaa</user-name>
<password>****</password>
</security>
</datasource>
</datasources>
<driver-class>oracle.jdbc.OracleDriver</driver-class>
添加之后oracle的driver如下:
<driver name="oracle" module="com.oracle">
<driver-class>oracle.jdbc.OracleDriver</driver-class>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
</driver>再启动JBoss AS7/EAP6.1看看应该就解决了。
参考:http://k1280000.iteye.com/blog/1638713, 解决办法在其中important部分。
16:48:43,002 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
16:48:43,010 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
16:48:43,010 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
16:48:43,015 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
16:48:43,016 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
16:48:43,019 INFO [org.jboss.as.security] (MSC service thread 1-9) JBAS013100: Current PicketBox version=4.0.7.Final
16:48:43,072 INFO [org.jboss.as.connector] (MSC service thread 1-13) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
16:48:43,109 INFO [org.jboss.as.naming] (MSC service thread 1-8) JBAS011802: Starting Naming Service
16:48:43,120 INFO [org.jboss.as.mail.extension] (MSC service thread 1-5) JBAS015400: Bound mail session [java:jboss/mail/Default]
16:48:43,216 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-14) JBoss Web Services - Stack CXF Server 4.0.2.GA
16:48:43,225 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
16:48:43,359 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-14) Starting Coyote HTTP/1.1 on http--0.0.0.0-8080
16:48:43,652 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-16) JBAS015012: Started FileSystemDeploymentService for directory /usr/local/jboss/standalone/deployments
16:48:43,661 INFO [org.jboss.as.remoting] (MSC service thread 1-3) JBAS017100: Listening on /0.0.0.0:4447
16:48:43,661 INFO [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening on /0.0.0.0:9999
16:48:43,705 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-13) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
16:48:43,938 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.jdbc-driver.com_mysql (missing) dependents: [service jboss.data-source.java:/MySqlDS] 16:48:43,944 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://0.0.0.0:9990
16:48:43,945 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 1960ms - Started 134 of 212 services (2 services failed or missing dependencies, 74 services are passive or on-demand)