Reputation: 667
Till now i run war file in jboss-4.2.2.GA,windows7 in that i had
deployed myproject.war
and myproject- ds.xml
in server/default/deploye
then its working fine.
now i want migrate jboss-as-7.1.1.Final,windows7 in that i will deployee myproject.war.dodeploye and myproject-ds.xml file in standalone/deployments but its shows exception
13:55:29,304 ERROR
[org.jboss.as.server.deployment.scanner]
(DeploymentScanner-t hreads - 1) {"JBAS014653: Composite operation
failed and was rolled back. Steps that failed:" => {"Operation step-2"
=> {"JBAS014671: Failed services" => {"jbos s.deployment.unit.\"myproject-ds.xml\".PARSE" =>
"org.jboss.msc.service.StartEx ception in service
jboss.deployment.unit.\"myproject-ds.xml\".PARSE: Failed to process
phase PARSE of deployment \"myproject-ds.xml\""}}}}
Upvotes: 1
Views: 1652
Reputation: 46904
I recommend to use Maven JBoss AS plugin - maven-jboss-as-plugin
. You can also use the web console - it's at port 9990. http://localhost:9990
.
First you need to have a user to access the Management API. That's done using AS/bin/add-user.sh
Use mvn jboss-as:add-resource
to add a datasource. See this example.
Use mvn clean install jboss-as:deploy
to deploy your application.
Upvotes: 0
Reputation: 17940
JBoss AS 7 uses a totally different way for deploying and configuring things. Look here for more info.
Basically, all configuration is now made via one file: standalone.xml which is located under /standalone/configuration and you put your war/EAR files under /standalone/deployments.
Also if you have a reference to an external jar, you need to add it as a module.
Upvotes: 2
Reputation: 923
Glad it helped.
In order to add Oracle JDBC driver, you need to add Module in the JBoss.
What you need:
1.JBOSS_HOME/modules/oracle/jdbc/main/module.xml, with
<module xmlns="urn:jboss:module:1.0" name="oracle.jdbc">
<resources>
<resource-root path="ojdbc6.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
</dependencies>
</module>
2. JBOSS_HOME/modules/oracle/jdbc/main/ojdbc6.jar
Upvotes: 0
Reputation: 923
you need to create datasource in standalone.xml and create a global module
standalone.xml
<subsystem xmlns="urn:jboss:domain:datasources:1.1">
<datasources>
<datasource jndi-name="java:/jdbc/myCRMDatasource" pool-name="myCRMDatasource" enabled="true">
<connection-url>jdbc:hsqldb:hsql://localhost/xdb</connection-url>
<driver>hsqldb</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<pool>
<prefill>true</prefill>
</pool>
<security>
<user-name>SA</user-name>
</security>
</datasource>
<driver name="hsqldb" module="org.hsqldb">
<xa-datasource-class>org.hsqldb.jdbcDriver</xa-datasource-class>
</driver>
</datasources>
</subsystem>
and create in JBOSS_HOME/modules/org/hsqldb/main/module.xml
<module xmlns="urn:jboss:module:1.1" name="org.hsqldb">
<resources>
<resource-root path="hsqldb.jar"/>
</resources>
<dependencies>
<module name="javax.persistence.api"/>
<module name="javax.transaction.api"/>
<module name="javax.validation.api"/>
<module name="org.hibernate"/>
</dependencies>
</module>
and put the jar in JBOSS_HOME/modules/org/hsqldb/main/
Upvotes: 2