[jBPM] - OSGi: Caused by: java.lang.ClassNotFoundException: org.drools.persistence.jpa.KnowledgeStoreServiceImpl
by Mariusz Cwikla
Mariusz Cwikla [https://community.jboss.org/people/mariuszcwikla] created the discussion
"OSGi: Caused by: java.lang.ClassNotFoundException: org.drools.persistence.jpa.KnowledgeStoreServiceImpl"
To view the discussion, visit: https://community.jboss.org/message/780506#780506
--------------------------------------------------------------
Hello,
I'm trying to run JBPM 5.4 inside an OSGi container. I've encountered a problem when using JPAKnowledgeService.newStatefulKnowledgeSession.
I get …
[View More]following error:
java.lang.RuntimeException: Provider org.drools.persistence.jpa.KnowledgeStoreServiceImpl could not be set.
at org.drools.persistence.jpa.JPAKnowledgeService.loadProvider(JPAKnowledgeService.java:155)
at org.drools.persistence.jpa.JPAKnowledgeService.getJPAKnowledgeServiceProvider(JPAKnowledgeService.java:143)
at org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:122)
....
Caused by: java.lang.ClassNotFoundException: org.drools.persistence.jpa.KnowledgeStoreServiceImpl
I found out that JPAKnowledgeService uses reflection to instantiate KnowledgeStoreServiceImpl class. Both classes are in org.drools.persistence.jpa package, but one is knowledge-api-5.5.0.Final.jar and second is in drools-persistence-jpa-5.5.0.Final.jar.
I'm not an OSGi expert, but I think that both classes should be in one .jar file (currently it's "split packages" problem).
Currently I have a workaround to use KnowledgetStoreServiceImpl directly and not use JPAKnowledgeService.
Or is there another workaround?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/780506#780506]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
[View Less]
11 years, 8 months
[jBPM] - jbpm 5.4 with Spring and Hibernate not working in Web Sphere App server 7
by Rajesh P
Rajesh P [https://community.jboss.org/people/javalearner] created the discussion
"jbpm 5.4 with Spring and Hibernate not working in Web Sphere App server 7"
To view the discussion, visit: https://community.jboss.org/message/830674#830674
--------------------------------------------------------------
Hi All,
I am running into problem when deploying the jBPM 5.4 integrated with Spring3.1 and Hibernate 3.4 application in WebSphere.
Same configuration is working fine in Tomcat 7.1. When I am …
[View More]taking as EAR and deploy it in the Web Sphere I am getting exception as
TransactionSy E org.springframework.transaction.support.TransactionSynchronizationUtils invokeAfterCompletion TransactionSynchronization.afterCompletion threw exception
java.lang.AbstractMethodError: org/drools/persistence/PersistenceContextManager.clearPersistenceContext()V
at org.drools.persistence.SingleSessionCommandService$SynchronizationImpl.afterCompletion(SingleSessionCommandService.java:448)
at org.drools.container.spring.beans.persistence.SpringTransactionSynchronizationAdapter.afterCompletion(SpringTransactionSynchronizationAdapter.java:37)
at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCompletion(TransactionSynchronizationUtils.java:168)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.invokeAfterCompletion(AbstractPlatformTransactionManager.java:993)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCompletion(AbstractPlatformTransactionManager.java:968)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:799)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
at org.drools.container.spring.beans.persistence.DroolsSpringTransactionManager.commit(DroolsSpringTransactionManager.java:65)
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:376)
at org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.registerWorkItemHandler(CommandBasedStatefulKnowledgeSession.java:164)
at com.honeywell.hses.workflow.util.SelfRegisteringLocalHTHandler.<init>(SelfRegisteringLocalHTHandler.java:40)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:45)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
at java.lang.reflect.Constructor.newInstance(Constructor.java:515)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:110)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:280)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1035)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:939)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:609)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1588)
at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:350)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:292)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:99)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:167)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:722)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:607)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:376)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:668)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1162)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1313)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:611)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:938)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:740)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2092)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:437)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:122)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:380)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$300(CompositionUnitMgrImpl.java:105)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:928)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:349)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)
Kindly suggest me
Please find the attached configuration files.
please let me know if you need any other information.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/830674#830674]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
[View Less]
11 years, 8 months
[Beginner's Corner] - Problem with StringConverter in JAX-RS
by Gerald Stockinger
Gerald Stockinger [https://community.jboss.org/people/gstvie] created the discussion
"Problem with StringConverter in JAX-RS"
To view the discussion, visit: https://community.jboss.org/message/830562#830562
--------------------------------------------------------------
Hello,
I recently started working with JBoss again and I am struggling a bit.
At the moment, I am trying to build a JAX-RS service that is returns a simple data structure.
One of the fields however has to be passed to a …
[View More]StringConverter.
The REST - service returns the json - data, however the String conversion is never executed.
My environment ist jboss-eap-6.1. and I am using the jboss-javaee6-multi project structure. I attached the complete source to this post.
I would be really, really thankful, if someone could help me with this problem :-)
My domain - model consists of two classes: MyObjectContainer and MyObject. MyObject should use a StringConverter, when it is marshalled to JSON - this is the following code:
@Provider
public class MyConverter implements StringConverter<MyObject>{
@Override
public MyObject fromString(String arg0) {
MyObject my = new MyObject();
my.setLastName((arg0.split(", "))[0]);
my.setFirstName((arg0.split(", "))[1]);
return my;
}
@Override
public String toString(MyObject arg0) {
return arg0.getLastName() + ", " + arg0.getFirstName();
}
}
My Service looks like this and just returns some dummy information for testing:
@Path("/context")
public class ContextResource {
private final static String MEDIA_TYPE = "application/vnd.mtp.context.v1+json";
@GET
@Produces(MEDIA_TYPE)
public MyObjectContainer getContext() {
MyObjectContainer mycont = new MyObjectContainer();
MyObject my = new MyObject();
mycont.setId(1L);
my.setLastName("Doe");
my.setFirstName("John");
mycont.setMy(my);
return mycont;
}
}
But somehow I always get this Json String:
{"my":{"firstName":"John","lastName":"Doe"},"id":1,"uri":"/mycontainer/1"}
instead of
{"my": "Doe, John","id":1,"uri":"/mycontainer/1"}
the two domain objects look like this:
@JsonSerialize(include = Inclusion.NON_EMPTY)
public class MyObjectContainer implements Serializable{
public static final String URIPATTERN ="/mycontainer/{id}";
private MyObject my;
public MyObject getMy() {
return my;
}
...
}
public class MyObject {
private String firstName;
private String lastName;
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
}
I tried quite a few things with web.xml (i.e. resteasy.scan, resteasy.providers,...), however I think it should be enough to include an empty web.xml and use a JaxRsActivactor class instead (as in the ticketmonster-tutorial).
To be complete - the relevant part of my pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>jboss-javaee6-multi</artifactId>
<groupId>org.jboss.tools.example</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>jboss-javaee6-multi-web</artifactId>
<packaging>war</packaging>
<name>jboss-javaee6-multi: WAR Module</name>
<url>http://jboss.org/jbossas</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<distribution>repo</distribution>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
</license>
</licenses>
<dependencies>
<!-- Dependency on the EJB module so we can use it's services if needed -->
<dependency>
<groupId>org.jboss.tools.example</groupId>
<artifactId>jboss-javaee6-multi-ejb</artifactId>
<type>ejb</type>
<scope>provided</scope>
</dependency>
<!-- Import the JAX-RS API, we use provided scope as the API is included in JBoss AS 7 -->
<dependency>
<groupId>org.jboss.spec.javax.ws.rs</groupId>
<artifactId>jboss-jaxrs-api_1.1_spec</artifactId>
<scope>provided</scope>
</dependency>
<!-- Import the CDI API, we use provided scope as the API is included in JBoss AS 7 -->
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Import the JSF API, we use provided scope as the API is included in JBoss AS 7 -->
<dependency>
<groupId>org.jboss.spec.javax.faces</groupId>
<artifactId>jboss-jsf-api_2.1_spec</artifactId>
<scope>provided</scope>
</dependency>
<!-- Import the JPA API, we use provided scope as the API is included in JBoss AS 7 -->
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- JSR-303 (Bean Validation) Implementation -->
<!-- Provides portable constraints such as @Email -->
<!-- Hibernate Validator is shipped in JBoss AS 7 -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>2.3.7.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson-provider</artifactId>
<version>2.3.6.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-cdi</artifactId>
<version>2.3.7.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
<version>1.9.9</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.9</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.9.9</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>${version.war.plugin}</version>
<configuration>
<!-- Java EE 6 doesn't require web.xml, Maven needs to catch up! -->
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
</project>
If somebody could point me in the right direction, I would be forever thankful ;-).
BR,
Gerald
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/830562#830562]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
[View Less]
11 years, 8 months
[JBoss Messaging] - JBoss Messaging - XA Recovery errors
by joe_boy12
joe_boy12 [https://community.jboss.org/people/joe_boy12] created the discussion
"JBoss Messaging - XA Recovery errors"
To view the discussion, visit: https://community.jboss.org/message/830127#830127
--------------------------------------------------------------
Hello there
we have 4 nodes cluster with JBoss SOA 5.2 on production, lately we started seeing following errors on 2 nodes
+2013-07-25 04:56:05,529 WARN [org.jboss.messaging.core.impl.tx.TransactionRepository] (Thread-20) …
[View More]Failed to replay transaction (XID: MessagingXid (1589486249 bq:97.48.55.48.99.98.98.58.56.48.51.52.58.53.49.52.50.48.51.52.52.58.50.56.49.100.54.102.54 formatID:131075 gtxid:49.45.97.48.55.48.99.98.98.58.56.48.51.52.58.53.49.52.50.48.51.52.52.58.50.56.49.100.54.101.102, LocalID: 3410309207520201539) during recovery.+
1. +java.lang.IllegalStateException: Cannot find binding for channel id 51099+
+ at org.jboss.messaging.core.impl.tx.TransactionRepository.handleReferences(TransactionRepository.java:318)+
+ at org.jboss.messaging.core.impl.tx.Transaction.loadState(Transaction.java:405)+
+ at org.jboss.messaging.core.impl.tx.TransactionRepository.recoverPreparedTransactions(TransactionRepository.java:149)+
+ at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.getPreparedTransactions(ServerConnectionEndpoint.java:567+
when this happens - nothing happens on those nodes - meaning all other threads stop and sometimes we experience timeouts on http gateway or request response services. I believe we have
JBoss Messaging 1.4.8.SP5 on the server.
My Qs is - what are the immediate steps we can take to stop these errors on servers. would cleaning data and tmp directory stop these errors and apply any JBoss Messaging patches later?
Thanks
Joe
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/830127#830127]
Start a new discussion in JBoss Messaging at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
[View Less]
11 years, 8 months