JDeveloper (6) [Avatar] Offline
#1
I have installed Activiti 5.14 and Tomcat 6.
I put the activiti-explorer.war into the webapps dir.
I ran mvn eclipse:eclipse on the bpnm-examples dir
Imported the existing project into eclipse.

Started TomCat.

Cannot reach anything at http://localhost:8080/activiti-explorer
Things work fine if I go to http://127.0.0.1/activiti-explorer

Played with the ActivitiExplorer, things seem to work, no problems, things show up on the TomCat console, etc.

HOWEVER, when I run the first Unit test in the book, I get the following ..........

Also, if I just create a simple class with a main method and run

ProcessEngine processEngine = ProcessEngineConfiguration.createStandaloneInMemProcessEngineConfiguration().buildProcessEngine();

I get very similar to below - no connection..........

Can you give me a pointer about what the problem might be ?
----------------------------------------------------------------------------------------------------------

org.activiti.engine.ActivitiException: Error while building ibatis SqlSessionFactory: Error creating document instance. Cause: java.net.ConnectException: Connection timed out: connect
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initSqlSessionFactory(ProcessEngineConfigurationImpl.java:649)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:386)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:362)
at org.bpmnwithactiviti.chapter1.SimpleProcessTest.startBookOrder(SimpleProcessTest.java:17)
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:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:3smilie
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: org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: java.net.ConnectException: Connection timed out: connect
at org.apache.ibatis.parsing.XPathParser.createDocument(XPathParser.java:136)
at org.apache.ibatis.parsing.XPathParser.<init>(XPathParser.java:32)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.<init>(XMLConfigBuilder.java:45)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initSqlSessionFactory(ProcessEngineConfigurationImpl.java:640)
... 25 more
Caused by: java.net.ConnectException: Connection timed out: 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 java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.apache.ibatis.parsing.XPathParser.createDocument(XPathParser.java:134)
... 28 more
tijs.rademakers (494) [Avatar] Offline
#2
Re: Connection issue ? Very Beginning
Which operating system are you running on? If your operating system doesn't work with localhost then 127.0.0.1 is indeed the alternative.
Are you sure you mean the method createStandaloneInMemProcessEngineConfiguration and not createStandaloneProcessEngineConfiguration? Because the one you are referring to is using an in-memory H2 database, which should work. But the latter one is using a standalone H2 database. So for that one you first need to install H2 separately. I also explained this in this blog post:

http://bpmn20inaction.blogspot.nl/2013/02/activiti-in-action-updates-part-1.html

Best regards,

Tijs
JDeveloper (6) [Avatar] Offline
#3
Re: Connection issue ? Very Beginning
I am on Windows7. I have tried both those methods.

I think something is wrong with the setup...... when I run mvn eclipse:eclipse in the dir with the pom file, a lot of the dependencies are downloaded. Then I import the existing project into my workspace. However, when I run the unit test, I always get a series of NoClassDefFound exceptions.......the first one is java.lang.NoClassDefFoundError: org/apache/ibatis/transaction/TransactionFactory and then there is another for JODA time, another for Common Objects etc etc . Shouldn't maven have downloaded all the jars needed ?
JDeveloper (6) [Avatar] Offline
#4
RESOLVED --&gt; Re: Connection issue ? Very Beginning
The problem was that
I was receiving the NoClassDefFoundErrors ,
so going out to fetch the files that I need .......
I got the wrong jar for myBatis.

The one you Need is mybatis-3.2.3.jar

But why am I having to fetch this, and also these other jars anyways ?
tijs.rademakers (494) [Avatar] Offline
#5
Re: RESOLVED --&gt; Re: Connection issue ? Very Beginning
That's indeed strange. I'll look into it.

Best regards,

Tijs