Hallo zusammen,
ich möchte vom Tomcat zum Jboss 7.1 wechseln und habe ein Probelm mit meiner DB-Connection, die ich über eine Datasource herstellen möchte. Nun erkennt JBoss meine Datasource bzw. findet sie einfach nicht.
Denn Jboss starte ich über eclipse und in der Console steht nun folgendes:
Diese Meldung hier:
sagt mir, dass da etwas im argen liegt. Leider weiß ich nicht wieso...
Ich habe das Problem gegoggelt und habe dann folgendes gefunden:
My Wiki: JBoss AS 7.1.0.Final "Thunder" released - Java EE 6 Full Profile certified!
Bin dann auch genau so vorgegangen, wie es im Link steht. Funktioniert nur leider so nicht bei mir.
Das ist die module.xml (liegt in $JBOSS_HOME/modules/com/mysql/main):
[XML]
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns=”urn:jboss:module:1.1″ name=”com.mysql“>
<resources>
<resource-root path=”mysql-connector-java-5.1.20-bin.jar”/>
</resources>
<dependencies>
<module name=”javax.api”/>
<module name=”javax.transaction.api”/>
<module name=”javax.servlet.api” optional=”true”/>
</dependencies>
</module>
[/XML]
Im selben Verzeichnis liegt auch die mysql-connector-java-5.1.20-bin.jar.
Der Ausschnitt aus der standalone.xml:
[XML]
<subsystem xmlns="urn:jboss:domain:datasources:1.0">
<datasources>
<datasource jta="true" jndi-name="java:/ds-db" pool-name="db-pool" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:mysql://localhost:3306/db</connection-url>
<driver>mysql</driver>
<security>
<user-name>xy</user-name>
<password>yx</password>
</security>
<statement>
<prepared-statement-cache-size>100</prepared-statement-cache-size>
<share-prepared-statements>true</share-prepared-statements>
</statement>
</datasource>
<drivers>
<driver name="mysql" module="com.mysql">
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>
[/XML]
Hatte jemand schon einmal dasselbe Problem? Wäre nett wenn mir jemand weiterhelfen könnte.
Vorab schon einmal vielen Dank.
Viele Grüße
edfred
ich möchte vom Tomcat zum Jboss 7.1 wechseln und habe ein Probelm mit meiner DB-Connection, die ich über eine Datasource herstellen möchte. Nun erkennt JBoss meine Datasource bzw. findet sie einfach nicht.
Denn Jboss starte ich über eclipse und in der Console steht nun folgendes:
Code:
12:01:02,289 Information [org.jboss.modules] JBoss Modules version 1.1.1.GA
12:01:02,483 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
12:01:02,537 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
12:01:03,273 INFO [org.xnio] XNIO Version 3.0.3.GA
12:01:03,273 INFO [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
12:01:03,282 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
12:01:03,284 WARN [org.xnio.nio] The currently defined selector provider class (sun.nio.ch.PollSelectorProvider) is not supported for use with XNIO
12:01:03,291 INFO [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
12:01:03,307 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
12:01:03,316 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem
12:01:03,318 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
12:01:03,323 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
12:01:03,327 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
12:01:03,330 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
12:01:03,335 INFO [org.jboss.as.security] (MSC service thread 1-5) JBAS013100: Current PicketBox version=4.0.7.Final
12:01:03,367 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
12:01:03,389 INFO [org.jboss.as.connector] (MSC service thread 1-13) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
12:01:03,410 INFO [org.jboss.as.naming] (MSC service thread 1-2) JBAS011802: Starting Naming Service
12:01:03,420 INFO [org.jboss.as.mail.extension] (MSC service thread 1-4) JBAS015400: Bound mail session [java:jboss/mail/Default]
12:01:03,472 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-6) JBoss Web Services - Stack CXF Server 4.0.2.GA
12:01:03,603 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-1) Starting Coyote HTTP/1.1 on http-localhost-127.0.0.1-8080
12:01:03,948 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-7) JBAS015012: Started FileSystemDeploymentService for directory /Applications/jboss-as-7.1.1.Final/standalone/deployments
12:01:03,954 INFO [org.jboss.as.remoting] (MSC service thread 1-14) JBAS017100: Listening on /127.0.0.1:9999
12:01:03,954 INFO [org.jboss.as.remoting] (MSC service thread 1-6) JBAS017100: Listening on localhost/127.0.0.1:4447
12:01:03,954 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found Zeitfenster.war in deployment directory. To trigger deployment create a file called Zeitfenster.war.dodeploy
12:01:04,227 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.jdbc-driver.mysql (missing) dependents: [service jboss.data-source.java:/ds-db]
12:01:04,232 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
12:01:04,233 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 2203ms - Started 130 of 207 services (2 services failed or missing dependencies, 74 services are passive or on-demand)
12:01:04,242 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Starting deployment of "app.war"
12:01:04,524 Information [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Mojarra 2.1.7-jbossorg-1 (20120227-1401) für Kontext '/app' wird initialisiert.
12:01:05,398 INFO [org.hibernate.validator.util.Version] (MSC service thread 1-5) Hibernate Validator 4.2.0.Final
12:01:05,564 INFO [org.jboss.web] (MSC service thread 1-5) JBAS018210: Registering web context: /app
12:01:05,619 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "app.war"
Diese Meldung hier:
Code:
JBAS014775: New missing/unsatisfied dependencies:
service jboss.jdbc-driver.mysql (missing) dependents: [service jboss.data-source.java:/ds-db]
sagt mir, dass da etwas im argen liegt. Leider weiß ich nicht wieso...
Ich habe das Problem gegoggelt und habe dann folgendes gefunden:
My Wiki: JBoss AS 7.1.0.Final "Thunder" released - Java EE 6 Full Profile certified!
Bin dann auch genau so vorgegangen, wie es im Link steht. Funktioniert nur leider so nicht bei mir.
Das ist die module.xml (liegt in $JBOSS_HOME/modules/com/mysql/main):
[XML]
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns=”urn:jboss:module:1.1″ name=”com.mysql“>
<resources>
<resource-root path=”mysql-connector-java-5.1.20-bin.jar”/>
</resources>
<dependencies>
<module name=”javax.api”/>
<module name=”javax.transaction.api”/>
<module name=”javax.servlet.api” optional=”true”/>
</dependencies>
</module>
[/XML]
Im selben Verzeichnis liegt auch die mysql-connector-java-5.1.20-bin.jar.
Der Ausschnitt aus der standalone.xml:
[XML]
<subsystem xmlns="urn:jboss:domain:datasources:1.0">
<datasources>
<datasource jta="true" jndi-name="java:/ds-db" pool-name="db-pool" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:mysql://localhost:3306/db</connection-url>
<driver>mysql</driver>
<security>
<user-name>xy</user-name>
<password>yx</password>
</security>
<statement>
<prepared-statement-cache-size>100</prepared-statement-cache-size>
<share-prepared-statements>true</share-prepared-statements>
</statement>
</datasource>
<drivers>
<driver name="mysql" module="com.mysql">
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>
[/XML]
Hatte jemand schon einmal dasselbe Problem? Wäre nett wenn mir jemand weiterhelfen könnte.
Vorab schon einmal vielen Dank.
Viele Grüße
edfred