cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with the 'MailTaskTest'

tomi87
Champ in-the-making
Champ in-the-making
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 😃
5 REPLIES 5

frederikherema1
Star Contributor
Star Contributor
slf4j-simple-1.6.99
slf4j-api-1.7.2

Seems to be a mismatch between API and impl, that's causing the exception…

tomi87
Champ in-the-making
Champ in-the-making
Ok thank you now its working.
But I get everytime this kind of Info on the console:
Which settings should I changed that this messages don't appears again ?

log4j:WARN No appenders could be found for logger (org.springframework.core.env.StandardEnvironment).
log4j:WARN Please initialize the log4j system properly.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Nov 29, 2012 4:30:18 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 29, 2012 4:30:19 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 29, 2012 4:30:19 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 29, 2012 4:30:19 PM org.activiti.engine.impl.ProcessEngineImpl <init>
INFO: ProcessEngine default created
Nov 29, 2012 4:30:19 PM org.activiti.engine.impl.jobexecutor.JobExecutor start
INFO: Starting up the JobExecutor[org.activiti.engine.impl.jobexecutor.DefaultJobExecutor].
Nov 29, 2012 4:30:19 PM org.activiti.engine.impl.jobexecutor.AcquireJobsRunnable run
INFO: JobExecutor[org.activiti.engine.impl.jobexecutor.DefaultJobExecutor] starting to acquire jobs
Nov 29, 2012 4:30:19 PM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy
INFO: Processing resource BsbtestSimpleMail.bpmn20.xml
Nov 29, 2012 4:30:19 PM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes
INFO: XMLSchema currently not supported as typeLanguage
Nov 29, 2012 4:30:19 PM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes
INFO: XPath currently not supported as expressionLanguage
Nov 29, 2012 4:30:19 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.

jbarrez
Star Contributor
Star Contributor
add 'isExecutable='true'' to the <process> element.

tomi87
Champ in-the-making
Champ in-the-making
I did it, but there is no difference.
<process id="loanrequest" name="Evaluate loan request" isExecutable='true'>
There is still this:

log4j:WARN No appenders could be found for logger (org.springframework.core.env.StandardEnvironment).
log4j:WARN Please initialize the log4j system properly.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Dez 05, 2012 2:02:03 PM org.activiti.engine.impl.db.DbSqlSession executeSchemaResource
INFO: performing create on engine with resource org/activiti/db/create/activiti.h2.create.engine.sql
Dez 05, 2012 2:02:03 PM org.activiti.engine.impl.db.DbSqlSession executeSchemaResource
INFO: performing create on history with resource org/activiti/db/create/activiti.h2.create.history.sql
Dez 05, 2012 2:02:03 PM org.activiti.engine.impl.db.DbSqlSession executeSchemaResource
INFO: performing create on identity with resource org/activiti/db/create/activiti.h2.create.identity.sql
Dez 05, 2012 2:02:04 PM org.activiti.engine.impl.ProcessEngineImpl <init>
INFO: ProcessEngine default created
Dez 05, 2012 2:02:04 PM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy
INFO: Processing resource loanrequest_firstpart.bpmn20.xml
Dez 05, 2012 2:02:04 PM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes
INFO: XMLSchema currently not supported as typeLanguage
Dez 05, 2012 2:02:04 PM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes
INFO: XPath currently not supported as expressionLanguage

What can I do ?
Or did I write it in the wrong line?

jbarrez
Star Contributor
Star Contributor
The warning about the isExecutable is gone now.

log4j:WARN No appenders could be found for logger (org.springframework.core.env.StandardEnvironment).
log4j:WARN Please initialize the log4j system properly.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

These are related to your logging config which isn't ok. But nothing to really worry about.

Dez 05, 2012 2:02:03 PM org.activiti.engine.impl.db.DbSqlSession executeSchemaResource
INFO: performing create on engine with resource org/activiti/db/create/activiti.h2.create.engine.sql
Dez 05, 2012 2:02:03 PM org.activiti.engine.impl.db.DbSqlSession executeSchemaResource
INFO: performing create on history with resource org/activiti/db/create/activiti.h2.create.history.sql
Dez 05, 2012 2:02:03 PM org.activiti.engine.impl.db.DbSqlSession executeSchemaResource
INFO: performing create on identity with resource org/activiti/db/create/activiti.h2.create.identity.sql
Dez 05, 2012 2:02:04 PM org.activiti.engine.impl.ProcessEngineImpl <init>
INFO: ProcessEngine default created
Dez 05, 2012 2:02:04 PM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy
INFO: Processing resource loanrequest_firstpart.bpmn20.xml

This is regular Activiti logging.

Dez 05, 2012 2:02:04 PM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes
INFO: XMLSchema currently not supported as typeLanguage
Dez 05, 2012 2:02:04 PM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes
INFO: XPath currently not supported as expressionLanguage

This is also expected … but I agree that the logging level might be set down a notch. People don't really care about this one.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.