-
45. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
latha Sep 10, 2015 12:29 PM (in response to mayerw01)My db is placed in server...i will give those details...
but i have one question...if i placed this ear into another server then we need to run these commands on server also...right?
please correct me....if i am wrong...
Let me check with correct details and i will come back to you the results/ output...
Thanks for support
-
46. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
latha Sep 10, 2015 10:48 PM (in response to latha)i have modified the db details in command lines....please check the below out put
1) [standalone@localhost:9999 /] /subsystem=datasources/jdbc-driver=oracle:remove
{
"outcome" => "failed",
"failure-description" => "JBAS014807: Management resource '[
(\"subsystem\" => \"datasources\"),
(\"jdbc-driver\" => \"oracle\")
]' not found",
"rolled-back" => true
}
2) [standalone@localhost:9999 /] /subsystem=datasources/jdbc-driver=oracle:add(driver-name=oracle,driver-module-name=com.oracle,driver-class-name=oracle.jdbc.OracleDriver,driver-xa-datasource-class-name=oracle.jdbc.xa.client.OracleXADataSource)
{"outcome" => "success"}
3) a) [standalone@localhost:9999 /] /subsystem=datasources/data-source=TestOracle:add(driver-name=oracle,user-name=mydbusername,password=****,connection-url=jdbc:oracle:thin:@Server:1521:DBNAME,jndi-name=java:jboss/datasources/TestOracle)
{
"outcome" => "failed",
"failure-description" => "JBAS014803: Duplicate resource [
(\"subsystem\" => \"datasources\"),
(\"data-source\" => \"TestOracle\")
]",
"rolled-back" => true
}
3rd one given duplicate resource...
b) [standalone@localhost:9999 /] /subsystem=datasources/data-source=TestOracle:enable
{
"outcome" => "failed",
"failure-description" => "JBAS014749: Operation handler failed: Service jboss.data-source-config.TestOracle is already registered",
"rolled-back" => true
}
c) [standalone@localhost:9999 /] /subsystem=datasources/data-source=TestOracle:test-connection-in-pool
{
"outcome" => "failed",
"failure-description" => "JBAS010440: failed to invoke operation: JBAS010447: Connection is not valid",
"rolled-back" => true
}
Thanks once again...
-
47. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
mayerw01 Sep 11, 2015 5:42 AM (in response to latha)Step 3) a): You should remove the data source before executing the add command again. So you need to execute this command first.
/subsystem=datasources/data-source=TestOracle:remove
Regarding your question: JBoss needs to know the connection details if you want the AS to handle the DB requests for you (which is usually the case when using EARs)
-
48. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
latha Sep 11, 2015 6:10 AM (in response to mayerw01)1) [standalone@localhost:9999 /] /subsystem=datasources/jdbc-driver=oracle:add(driver-name=oracle,driver-module-name=com.oracle,driver-class-name=oracle.jdbc.OracleDriver,driver-xa-datasource-class-name=oracle.jdbc.xa.client.OracleXADataSource)
{"outcome" => "success"}
2) [standalone@localhost:9999 /] /subsystem=datasources/data-source=TestOracle:add(driver-name=oracle,user-name=Chamberapp,password=srisys,connection-url=jdbc:oracle:thin:@182.72.242.149:1521:VEDIC11G,jndi-name=java:jboss/datasources/TestOracle)
{"outcome" => "success"}
3) [standalone@localhost:9999 /] /subsystem=datasources/data-source=TestOracle:enable
{"outcome" => "success"}
4) [standalone@localhost:9999 /] /subsystem=datasources/data-source=TestOracle:test-connection-in-pool
{
"outcome" => "failed",
"failure-description" => "JBAS010440: failed to invoke operation: JBAS010447: Connection is not valid",
"rolled-back" => true
}
4th command gave failed notice....
while running these commands....if we look into server console...it seems below exceptions...
06:07:35,047 WARN [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (management-handler-thread - 5) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: Could not create connection
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:277) [ironjacamar-jdbc-1.0.9.Final.jar:1.0.9.Final]
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:235) [ironjacamar-jdbc-1.0.9.Final.jar:1.0.9.Final]
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:761) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:343) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:397) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.internalTestConnection(AbstractPool.java:627) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]
at org.jboss.jca.core.connectionmanager.pool.strategy.OnePool.testConnection(OnePool.java:88) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]
at org.jboss.as.connector.pool.PoolOperations$TestConnectionInPool.invokeCommandOn(PoolOperations.java:121) [jboss-as-connector-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.connector.pool.PoolOperations$1.execute(PoolOperations.java:60) [jboss-as-connector-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.connector.pool.PoolOperations.execute(PoolOperations.java:74) [jboss-as-connector-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.ModelControllerImpl$DefaultPrepareStepHandler.execute(ModelControllerImpl.java:466) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:121) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:139) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:108) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.protocol.mgmt.AbstractMessageHandler$2$1.doExecute(AbstractMessageHandler.java:287)
at org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:487)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_55]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_55]
at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.0.0.GA.jar:2.0.0.GA]
Caused by: java.sql.SQLException: The Network Adapter could not establish the connection
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:480)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:413)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:508)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:203)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:249) [ironjacamar-jdbc-1.0.9.Final.jar:1.0.9.Final]
... 29 more
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:328)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:421)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:630)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:206)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:966)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:292)
... 34 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method) [rt.jar:1.7.0_55]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) [rt.jar:1.7.0_55]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) [rt.jar:1.7.0_55]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) [rt.jar:1.7.0_55]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) [rt.jar:1.7.0_55]
at java.net.Socket.connect(Socket.java:579) [rt.jar:1.7.0_55]
at java.net.Socket.connect(Socket.java:528) [rt.jar:1.7.0_55]
at java.net.Socket.<init>(Socket.java:425) [rt.jar:1.7.0_55]
at java.net.Socket.<init>(Socket.java:208) [rt.jar:1.7.0_55]
at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:127)
at oracle.net.nt.ConnOption.connect(ConnOption.java:126)
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:306)
... 39 more
-
49. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
mayerw01 Sep 11, 2015 6:50 AM (in response to latha)There is an issue with connecting to Oracle. You should check:
- Is the Database available: tnsping VEDIC11G
- Is the listener started and listening on VEDIC11G: lsnrctl status
- Are you able to login to the database: sqlplus Chamberapp/srisys@VEDIC11G
-
50. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
latha Sep 11, 2015 11:34 PM (in response to mayerw01)yes details are correct...why because same db details i have used while generate EAR against jboss previous version 5.1.0.GA...
-
51. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
mayerw01 Sep 12, 2015 4:53 AM (in response to latha)Unfortunately there is then nothing more I can do here. I'd suggest that you discuss this connection issue with your Oracle DBA
-
52. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
latha Sep 12, 2015 5:23 AM (in response to mayerw01)ok..thanks..i will check with Oracle DBA