Hi Steffen,
Thanks for your interest in camunda BPM.
I gather that you want to combine the process engine and the REST API in a single WAR file deployment and configure the services with Spring?
I added a quickstart which demonstrates how to deploy a webapplication, which
· bundles the camunda-engine JAR library
· starts and configures a process engine in a Spring Application context
· bundles the camunda-engine-REST library
· exposes the process engine API via REST
https://github.com/camunda/camunda-quickstarts/tree/master/deployment/embedded-spring-rest
Does this solve your problem?
Cheers,
Daniel Meyer
Hi Steffen,
can you see Rest-Easy deploying the rest endpoints in server log?
Maybe you could post the complete tomcat start log. Mine looks like this:
05.08.2013 14:05:58 org.apache.catalina.startup.Catalina initDirs
SCHWERWIEGEND: Cannot find specified temporary folder at C:\demo\apache-tomcat-7.0.39\temp
05.08.2013 14:05:58 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\Java\jdk1.6.0_39\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Programs\oracle\app\oracle\product\11.2.0\server\bin;;C:\Programs\apache-maven-3.0.4\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\ThinkPad\Bluetooth Software\;C:\Program Files\ThinkPad\Bluetooth Software\syswow64;C:\Program Files\Intel\In
05.08.2013 14:05:58 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
05.08.2013 14:05:58 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
05.08.2013 14:05:58 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 266 ms
05.08.2013 14:05:58 org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
05.08.2013 14:05:58 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.39
05.08.2013 14:05:58 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\demo\apache-tomcat-7.0.39\webapps\camunda-quickstart-embedded-spring-rest-7.0.0-SNAPSHOT.war
05.08.2013 14:05:59 org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization started
05.08.2013 14:05:59 org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing Root WebApplicationContext: startup date [Mon Aug 05 14:05:59 CEST 2013]; root of context hierarchy
05.08.2013 14:05:59 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
05.08.2013 14:06:00 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@91f005: defining beans [dataSource,transactionManager,processEngineConfiguration,processEngine,repositoryService,runtimeService,taskService,historyService,managementService,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.camunda.bpm.example.loanapproval.Starter#0,calculateInterestService,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; root of factory hierarchy
05.08.2013 14:06:00 org.camunda.bpm.engine.impl.db.DbSqlSession executeSchemaResource
INFO: performing create on engine with resource org/camunda/bpm/engine/db/create/activiti.h2.create.engine.sql
05.08.2013 14:06:00 org.camunda.bpm.engine.impl.db.DbSqlSession executeSchemaResource
INFO: performing create on history with resource org/camunda/bpm/engine/db/create/activiti.h2.create.history.sql
05.08.2013 14:06:00 org.camunda.bpm.engine.impl.db.DbSqlSession executeSchemaResource
INFO: performing create on identity with resource org/camunda/bpm/engine/db/create/activiti.h2.create.identity.sql
05.08.2013 14:06:00 org.camunda.bpm.engine.impl.db.DbSqlSession checkHistoryLevel
INFO: No historyLevel property found in database.
05.08.2013 14:06:00 org.camunda.bpm.engine.impl.db.DbSqlSession dbCreateHistoryLevel
INFO: Creating historyLevel property in database with value: audit
05.08.2013 14:06:00 org.camunda.bpm.engine.impl.ProcessEngineImpl <init>
INFO: ProcessEngine default created
05.08.2013 14:06:00 org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer deploy
INFO: Processing resource C:\demo\apache-tomcat-7.0.39\webapps\camunda-quickstart-embedded-spring-rest-7.0.0-SNAPSHOT\WEB-INF\classes\loanApproval.bpmn
Spring Bean invoked.
05.08.2013 14:06:01 org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization completed in 1356 ms
688 [localhost-startStop-1] INFO org.jboss.resteasy.spi.ResteasyDeployment - Deploying javax.ws.rs.core.Application: class org.camunda.bpm.example.loanapproval.rest.RestProcessEngineDeployment
692 [localhost-startStop-1] INFO org.jboss.resteasy.spi.ResteasyDeployment - Adding provider class org.camunda.bpm.engine.rest.exception.RestExceptionHandler from Application class org.camunda.bpm.example.loanapproval.rest.RestProcessEngineDeployment
693 [localhost-startStop-1] INFO org.jboss.resteasy.spi.ResteasyDeployment - Adding provider class org.codehaus.jackson.jaxrs.JsonParseExceptionMapper from Application class org.camunda.bpm.example.loanapproval.rest.RestProcessEngineDeployment
693 [localhost-startStop-1] INFO org.jboss.resteasy.spi.ResteasyDeployment - Adding provider class org.codehaus.jackson.jaxrs.JsonMappingExceptionMapper from Application class org.camunda.bpm.example.loanapproval.rest.RestProcessEngineDeployment
694 [localhost-startStop-1] INFO org.jboss.resteasy.spi.ResteasyDeployment - Adding class resource org.camunda.bpm.engine.rest.impl.ProcessEngineRestServiceImpl from Application class org.camunda.bpm.example.loanapproval.rest.RestProcessEngineDeployment
694 [localhost-startStop-1] INFO org.jboss.resteasy.spi.ResteasyDeployment - Adding provider class org.camunda.bpm.engine.rest.mapper.JacksonConfigurator from Application class org.camunda.bpm.example.loanapproval.rest.RestProcessEngineDeployment
694 [localhost-startStop-1] INFO org.jboss.resteasy.spi.ResteasyDeployment - Adding provider class org.codehaus.jackson.jaxrs.JacksonJsonProvider from Application class org.camunda.bpm.example.loanapproval.rest.RestProcessEngineDeployment
695 [localhost-startStop-1] INFO org.jboss.resteasy.spi.ResteasyDeployment - Adding provider class org.camunda.bpm.engine.rest.exception.ProcessEngineExceptionHandler from Application class org.camunda.bpm.example.loanapproval.rest.RestProcessEngineDeployment
05.08.2013 14:06:01 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\demo\apache-tomcat-7.0.39\webapps\docs
05.08.2013 14:06:01 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\demo\apache-tomcat-7.0.39\webapps\examples
05.08.2013 14:06:01 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\demo\apache-tomcat-7.0.39\webapps\host-manager
05.08.2013 14:06:01 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\demo\apache-tomcat-7.0.39\webapps\manager
05.08.2013 14:06:01 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\demo\apache-tomcat-7.0.39\webapps\ROOT
05.08.2013 14:06:01 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
05.08.2013 14:06:01 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
05.08.2013 14:06:01 org.apache.catalina.startup.Catalina start
INFO: Server startup in 2940 ms
Cheers,
Daniel
and put them into src/main/java. Hi Steffen,
Has the file to be named org.camunda.bpm.engine.rest.spi.ProcessEngineProvider or is it a file name ProcessEngineProvider in a packacge org.camunda.bpm.engine.rest.spi?
The file needs to be named org.camunda.bpm.engine.rest.spi.ProcessEngineProvider
See here:
Cheers,
Daniel Meyer