AnsweredAssumed Answered

Problem with the 'MailTaskTest'

Question asked by tomi87 on Nov 23, 2012
Latest reply on Dec 5, 2012 by jbarrez
Version: Indigo Service Release 2
Build id: 20120216-1857
Activiti Version 5.10
JDK version is jdk1.7.0_06.

imported .jars for wiser:
slf4j-simple-1.6.99
slf4j-api-1.7.2
subethasmtp-3.1.4

Hello I have a problem with the
"Listing 5.10 Testing a process definition with an email service task"

After I start the Junit Test in the class MailTaskTest It doesn't work.
at first I get this:
Nov 23, 2012 5:49:23 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [activiti.cfg-mem-mail.xml]
Nov 23, 2012 5:49:25 PM org.activiti.engine.impl.db.DbSqlSession executeSchemaResource
INFO: performing create on engine with resource org/activiti/db/create/activiti.h2.create.engine.sql
Nov 23, 2012 5:49:25 PM org.activiti.engine.impl.db.DbSqlSession executeSchemaResource
INFO: performing create on history with resource org/activiti/db/create/activiti.h2.create.history.sql
Nov 23, 2012 5:49:25 PM org.activiti.engine.impl.db.DbSqlSession executeSchemaResource
INFO: performing create on identity with resource org/activiti/db/create/activiti.h2.create.identity.sql
Nov 23, 2012 5:49:25 PM org.activiti.engine.impl.ProcessEngineImpl <init>
INFO: ProcessEngine default created
Nov 23, 2012 5:49:25 PM org.activiti.engine.impl.jobexecutor.JobExecutor start
INFO: Starting up the JobExecutor[org.activiti.engine.impl.jobexecutor.DefaultJobExecutor].
Nov 23, 2012 5:49:25 PM org.activiti.engine.impl.jobexecutor.AcquireJobsRunnable run
INFO: JobExecutor[org.activiti.engine.impl.jobexecutor.DefaultJobExecutor] starting to acquire jobs
Nov 23, 2012 5:49:25 PM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy
INFO: Processing resource BsbtestSimpleMail.bpmn20.xml
Nov 23, 2012 5:49:25 PM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes
INFO: XMLSchema currently not supported as typeLanguage
Nov 23, 2012 5:49:25 PM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes
INFO: XPath currently not supported as expressionLanguage
Nov 23, 2012 5:49:25 PM org.activiti.engine.impl.bpmn.parser.BpmnParse parseProcessDefinitions
INFO: Process with id='simpleEmailProcess' hasn't the attribute isExecutable set. Please maintain it, so you are compatible to future activiti versions.

How xan I fix this?
And an other problem is, after I start the JUnit Test, in the "progess" tab There is still the message: "Launching: Start virtual machine…" and
JUnit says:
java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.format(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/String;
   at org.slf4j.impl.SimpleLogger.formatAndLog(SimpleLogger.java:222)
   at org.slf4j.impl.SimpleLogger.info(SimpleLogger.java:258)
   at org.subethamail.smtp.server.SMTPServer.start(SMTPServer.java:238)
   at org.subethamail.wiser.Wiser.start(Wiser.java:90)
   at BsbMailTaskTest.sendMailLocalTest(BsbMailTaskTest.java:29)
   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.rules.TestWatchman$1.evaluate(TestWatchman.java:48)
   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: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)

My activiti.cfg-mem-mail.xml is the same like in the source code.

I tried to execute the JUnit test for this Test class in the bpmn-examples and this code is working perfect.

Thank you for help =)

Outcomes