Not able to use my oracle database even after configuring db.properties file.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2016 06:51 AM
db=oracle
jdbc.driver=oracle.jdbc.driver.OracleDriver
jdbc.url=jdbc

jdbc.username=myusername
jdbc.password=mypassword
and I am trying to run the bookOrder example from chapter1 of "Activiti in Action". On running this example i am getting following errors:
18 Feb 2016 16:33:29,423 [main] ERROR org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl:846 - Exception while initializing Database connection
org.h2.jdbc.JdbcSQLException: Connection is broken: "java.net.ConnectException: Connection refused: connect: localhost" [90067-176]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
at org.h2.message.DbException.get(DbException.java:167)
at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:434)
at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:311)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:107)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:91)
at org.h2.Driver.connect(Driver.java:74)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:201)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:196)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.getConnection(UnpooledDataSource.java:93)
at org.apache.ibatis.datasource.pooled.PooledDataSource.popConnection(PooledDataSource.java:385)
at org.apache.ibatis.datasource.pooled.PooledDataSource.getConnection(PooledDataSource.java:89)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initDatabaseType(ProcessEngineConfigurationImpl.java:835)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initDataSource(ProcessEngineConfigurationImpl.java:786)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:602)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:590)
at BookOrderTest.startBookOrder(BookOrderTest.java:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.h2.util.NetUtils.createSocket(NetUtils.java:123)
at org.h2.util.NetUtils.createSocket(NetUtils.java:103)
at org.h2.engine.SessionRemote.initTransfer(SessionRemote.java:100)
at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:430)
… 39 more
- Labels:
-
Archive

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2016 07:02 AM
Is the oracle service up and running when you tried to execute this ?
If its up, please check the connection url again.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2016 07:09 AM
yes, oracle service is up.and my jdbcUrl is jdbc

i wrote wrong url in above post by mistake.
but still facing the issue.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2016 08:49 PM
Can you do a quick check if everythings fine by writing a piece of java code to connect to database. If that gets connected then we should look at whats wrong here. Else you know where to look for.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2016 10:36 PM
I am trying to run the application given in following link
http://www.codeproject.com/Tips/699392/Step-by-Step-your-First-journey-with-Activiti?fid=1849867&sel...
I am seeing in the error that still this application is trying to connect to h2 localhost even after changing db.properties and activiti.cfg.xml.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2016 12:20 AM
<catalina_home>\webapps\activiti-explorer\WEB-INF\classes\db.properties.
Also I believe you have changed it in activiti.cfg.xml. Am I correct ? If so ideally it has to connect to which ever you have defined.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2016 01:47 AM
My activiti.cfg.xml is as given below.
and I have put it in the class path of my activiti project and (in webapps\activiti-explorer\WEB-INF\classes and in webapps\activiti-explorer\WEB-INF\lib folder. (As I have read to put it in such locations in this forum itself)).
Is there any need to put it in other locations?
And i also want to mention that activiti-explorer is working fine with my oracle database,I am able to create task and users as well.But through creating activiti project in eclipse is not going to work with the same database.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2016 03:53 AM
<java>
public static void main(String args[]){
ProcessEngine processEngineInstance = ProcessEngineConfiguration
.createStandaloneProcessEngineConfiguration()
.setJdbcDriver("oracle.jdbc.driver.OracleDriver")
.setJdbcUrl("jdbc

.setJdbcPassword("MY_user")
.setJdbcUsername("MY_pass")
.buildProcessEngine();
List<Task> tasks = processEngineInstance.getTaskService().createTaskQuery().taskAssignee("Kermit").list();
}
</java>
The above code gets all the tasks assigned to user Kermit from your database.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2016 04:28 AM
But if you find the solution to my exact problem(Using Activiti Project with BPMN20.xml files),then please let me know.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2016 03:56 AM
