[EJB3] - unable to determine messagingType interface for MDB
by Anish Nath
Anish Nath [http://community.jboss.org/people/anishnath] created the discussion
"unable to determine messagingType interface for MDB"
To view the discussion, visit: http://community.jboss.org/message/594361#594361
--------------------------------------------------------------
Hi i'm using Jboss As6, and EJB3 MDB,
My Message DrivenBean looks like
public final class OverrideMDB extends DefaultMDB
implements MessageListener, HasBeenInstrumented
{
public void onMessage(Message message)
{
}
//
}
abstract class DefaultMDB
implements HasBeenInstrumented
{
protected final void onMessageReceive(Message message)
{
//BUSINESS METHOD
}
}
Getting the error like this and deployment getting failed
*Caused by: org.jboss.deployers.spi.DeploymentException: Error creating ejb container OverrideMDB: Unable to choose messagingType interface for MDB OverrideMDB from [interface net.sourceforge.cobertura.coveragedata.HasBeenInstrumented, interface javax.jms.MessageListener]*
* at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:773) [:1.7.17]*
* at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:710) [:1.7.17]*
* at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:692) [:1.7.17]*
* at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:655) [:1.7.17]*
* at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:544) [:1.7.17]*
* at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:177) [:6.0.0.Final]*
* ... 49 more*
*http://opensourceframework.blogspot.com/ ANish
*
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/594361#594361]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years
[JBoss Messaging] - How to Know the No of Messages In Queue/Topic
by Vinay Bommarati
Vinay Bommarati [http://community.jboss.org/people/vinayknr41] created the discussion
"How to Know the No of Messages In Queue/Topic"
To view the discussion, visit: http://community.jboss.org/message/594275#594275
--------------------------------------------------------------
Hello All
When I have created Topic / Queue through Jboss Admin Console or Through xml files , those are created and i cn view those Status & Number of messages procesing by them through Admin Console .
But If write jboss.xml for creating destinations ( *<create-destination> to true & Placing In Ear/Jar) ,* i can not view those topic/queue status in Admin Console even though they are created successfully .
*So ,pls help is there any way to view the number of messages received by queue/Topics that is created through jboss.xml*
*And One more problem iam facing is , some times the topic status is coming down in AdminConsole .......& If i click the node of that topic , its giving me a big list of exception in console.........So , In what Situations the status of Topi/Queue will be down even though they are created Successfully*
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/594275#594275]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years
[JBoss Microcontainer] - jboss-scanning.xml ignored for JBoss AS 6?
by Elias Ross
Elias Ross [http://community.jboss.org/people/genman] created the discussion
"jboss-scanning.xml ignored for JBoss AS 6?"
To view the discussion, visit: http://community.jboss.org/message/594328#594328
--------------------------------------------------------------
If you build the .war file from ( https://issues.jboss.org/browse/JBAS-8786 https://issues.jboss.org/browse/JBAS-8786 ) and add the jboss-scanning.xml as described here: http://community.jboss.org/message/594327#594327 http://community.jboss.org/message/594327, I still see this in the logs:
2011-03-20 10:52:02,738 TRACE [org.jboss.scanning.annotations.plugins.GenericAnnotationVisitor] (HDScanner)
Scanning class org.apache.commons.lang.time.FastDateFormat$NumberRule for annotations
2011-03-20 10:52:02,739 TRACE [org.jboss.classloading.spi.vfs.policy.VFSClassLoaderPolicy] (HDScanner)
getProtectionDomain:className=org.apache.commons.lang.time.DateUtils path=org/apache/commons/lang/time/DateUtils.class codeSourceURL=vfs:/Users/elias/jboss-6.0.0.Final/server/default/deploy/jarbomb.war/WEB-INF/lib/commons-lang-2.4.jar/
2011-03-20 10:52:02,739 TRACE [org.jboss.scanning.annotations.plugins.GenericAnnotationVisitor] (HDScanner)
Scanning class org.apache.commons.lang.time.DateUtils for annotations
2011-03-20 10:52:02,741 TRACE [org.jboss.classloading.spi.vfs.policy.VFSClassLoaderPolicy] (HDScanner)
getProtectionDomain:className=org.apache.commons.lang.time.FastDateFormat$TimeZoneNumberRule path=org/apache/commons/lang/time/FastDateFormat$TimeZoneNumberRule.class codeSourceURL=vfs:/Users/elias/jboss-6.0.0.Final/server/default/deploy/jarbomb.war/WEB-INF/lib/commons-lang-2.4.jar/
Etc.
The .war file contains:
eroero:jarbomb elias$ jar tf target/jarbomb.war | grep xml
META-INF/jboss-scanning.xml
WEB-INF/beans.xml
WEB-INF/faces-config.xml
WEB-INF/pretty-config.xml
WEB-INF/web.xml
META-INF/maven/de.chkal.jarbomb/jarbomb/pom.xml
And the jboss-scanning.xml looks like:
eroero:jarbomb elias$ cat ./src/main/webapp/META-INF/jboss-scanning.xml
<scanning xmlns="urn:jboss:scanning:1.0">
<!-- Purpose: Disable scanning for annotations in contained deployment. -->
</scanning>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/594328#594328]
Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years
[jBPM] - jboss as 5 jbpm 5.1 persistence
by Michał Warecki
Michał Warecki [http://community.jboss.org/people/michal.warecki] created the discussion
"jboss as 5 jbpm 5.1 persistence"
To view the discussion, visit: http://community.jboss.org/message/594238#594238
--------------------------------------------------------------
Hi,
I have problem creating stateful knowledge session using jpa, jboss as 5.1 and jbpm 5.1. I'm trying to create session in statefull EJB.
While creating session thread just suspends and after 3-4 minutes in console I've got xa transaction timeout's.
Am I missing something while creating Environment ? Should I set conteiner transaction manager into Environment ?
Maybe jbpm 5.1 doesn't work with XA datasources ? Help me please. There is a code :
datasources:
<datasources>
<xa-datasource>
<jndi-name>jdbc/dbDS</jndi-name>
<use-java-context>true</use-java-context>
<isSameRM-override-value>false</isSameRM-override-value>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
<xa-datasource-property name="URL">${ds.connection.url}</xa-datasource-property>
<xa-datasource-property name="User">${ds.user.name}</xa-datasource-property>
<xa-datasource-property name="Password">${ds.password}</xa-datasource-property>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<no-tx-separate-pools/>
</xa-datasource>
<xa-datasource>
<jndi-name>jdbc/processInstanceDS</jndi-name>
<use-java-context>true</use-java-context>
<isSameRM-override-value>false</isSameRM-override-value>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
<xa-datasource-property name="URL">${ds.connection.url}</xa-datasource-property>
<xa-datasource-property name="User">${ds.user.name}</xa-datasource-property>
<xa-datasource-property name="Password">${ds.password}</xa-datasource-property>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<no-tx-separate-pools/>
</xa-datasource>
<xa-datasource>
<jndi-name>jdbc/taskDS</jndi-name>
<use-java-context>true</use-java-context>
<isSameRM-override-value>false</isSameRM-override-value>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
<xa-datasource-property name="URL">${ds.connection.url}</xa-datasource-property>
<xa-datasource-property name="User">${ds.user.name}</xa-datasource-property>
<xa-datasource-property name="Password">${ds.password}</xa-datasource-property>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<no-tx-separate-pools/>
</xa-datasource>
</datasources>
persistence.xml:
<persistence-unit name="${pu.name}" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>${pu.jta.data.source}</jta-data-source>
<!-- <non-jta-data-source>${pu.jta.data.source}Unmanaged</non-jta-data-source> -->
<properties>
<property name="hibernate.dialect" value="${pu.hibernate.dialect}" />
<property name="hibernate.hbm2ddl.auto" value="${pu.hibernate.hbm2ddl.auto}" />
<property name="hibernate.default_batch_fetch_size" value="${pu.hibernate.default_batch_fetch_size}" />
<property name="hibernate.show_sql" value="${pu.hibernate.show_sql}" />
<property name="hibernate.format_sql" value="true" />
<!-- Encoding -->
<property name="hibernate.connection.useUnicode" value="true" />
<property name="hibernate.connection.characterEncoding"
value="UTF-8" />
<!-- These are the default for JBoss EJB3, but not for HEM: -->
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider" />
<property name="hibernate.transaction.manager_lookup_class"
value="${pu.hibernate.transaction.manager_lookup_class}" />
<!-- Binds the EntityManagerFactory to JNDI where Seam can look it up.
This is only relevant when the container automatically loads the persistence
unit, as is the case in JBoss AS 5. -->
<property name="jboss.entity.manager.factory.jndi.name"
value="${pu.jboss.entity.manager.factory.jndi.name}" />
</properties>
<!-- If the persistence.xml file is not under the same root directory or
jar than your domain model then use the <jar-file> element to point to the
jar containing your domain model. <jar-file>../../vehicles.jar</jar-file> -->
</persistence-unit>
<persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jdbc/processInstanceDS</jta-data-source>
<class>org.drools.persistence.info.SessionInfo</class>
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.jbpm.persistence.processinstance.ProcessInstanceEventInfo</class>
<class>org.drools.persistence.info.WorkItemInfo</class>
<properties>
<property name="hibernate.dialect" value="${pu.hibernate.dialect}" />
<property name="hibernate.hbm2ddl.auto" value="${pu.hibernate.hbm2ddl.auto}" />
<property name="hibernate.default_batch_fetch_size" value="${pu.hibernate.default_batch_fetch_size}" />
<property name="hibernate.show_sql" value="${pu.hibernate.show_sql}" />
<property name="hibernate.format_sql" value="true" />
<!-- Encoding -->
<property name="hibernate.connection.useUnicode" value="true" />
<property name="hibernate.connection.characterEncoding"
value="UTF-8" />
<!-- These are the default for JBoss EJB3, but not for HEM: -->
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider" />
<property name="hibernate.transaction.manager_lookup_class"
value="${pu.hibernate.transaction.manager_lookup_class}" />
</properties>
</persistence-unit>
<persistence-unit name="org.drools.task" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jdbc/taskDS</jta-data-source>
<mapping-file>META-INF/taskOrm.xml</mapping-file>
<class>org.jbpm.task.Attachment</class>
<class>org.jbpm.task.Content</class>
<class>org.jbpm.task.BooleanExpression</class>
<class>org.jbpm.task.Comment</class>
<class>org.jbpm.task.Deadline</class>
<class>org.jbpm.task.Comment</class>
<class>org.jbpm.task.Deadline</class>
<class>org.jbpm.task.Delegation</class>
<class>org.jbpm.task.Escalation</class>
<class>org.jbpm.task.Group</class>
<class>org.jbpm.task.I18NText</class>
<class>org.jbpm.task.Notification</class>
<class>org.jbpm.task.EmailNotification</class>
<class>org.jbpm.task.EmailNotificationHeader</class>
<class>org.jbpm.task.PeopleAssignments</class>
<class>org.jbpm.task.Reassignment</class>
<class>org.jbpm.task.Status</class>
<class>org.jbpm.task.Task</class>
<class>org.jbpm.task.TaskData</class>
<class>org.jbpm.task.SubTasksStrategy</class>
<class>org.jbpm.task.OnParentAbortAllSubTasksEndStrategy</class>
<class>org.jbpm.task.OnAllSubTasksEndParentEndStrategy</class>
<class>org.jbpm.task.User</class>
<properties>
<property name="hibernate.dialect" value="${pu.hibernate.dialect}" />
<property name="hibernate.hbm2ddl.auto" value="${pu.hibernate.hbm2ddl.auto}" />
<property name="hibernate.default_batch_fetch_size" value="${pu.hibernate.default_batch_fetch_size}" />
<property name="hibernate.show_sql" value="${pu.hibernate.show_sql}" />
<property name="hibernate.format_sql" value="true" />
<!-- Encoding -->
<property name="hibernate.connection.useUnicode" value="true" />
<property name="hibernate.connection.characterEncoding"
value="UTF-8" />
<!-- These are the default for JBoss EJB3, but not for HEM: -->
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider" />
<property name="hibernate.transaction.manager_lookup_class"
value="${pu.hibernate.transaction.manager_lookup_class}" />
</properties>
</persistence-unit>
Bean:
@Stateful
@Name("register")
public class RegistationBean implements Registration {
@Out(scope = ScopeType.CONVERSATION)
private User registerUser;
@In(value="userRepository", create=true)
private UserRepository userRepository;
@Logger
private Log log;
private KnowledgeBase knowledgeBase;
private Environment environment;
@PersistenceUnit(unitName = "org.jbpm.persistence.jpa")
private EntityManagerFactory emf;
@Factory(value = "registerUser")
public void createRegisterUser() {
registerUser = new User();
}
public String register() {
sendRegistrationEmail();
userRepository.persist(registerUser);
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource("process/registration.bpmn"), ResourceType.BPMN2);
knowledgeBase = kbuilder.newKnowledgeBase();
environment = KnowledgeBaseFactory.newEnvironment();
environment.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
//AT THIS LINE THREAD HANGS AND SUSPENDS.
StatefulKnowledgeSession ksession = JPAKnowledgeService.newStatefulKnowledgeSession(knowledgeBase, null, environment );
log.info("#{registerUser.username} has been registered.");
return "registred";
}
}
I'm trying to run this very simple code for over one week and I'm frystated at this moment :-)
Anyone know how to solve my problem ?
Maybe someone has some example how to configure jbpm 5.1 persistence using CMT ?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/594238#594238]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years
[jBPM] - session closed
by Sascha Janz
Sascha Janz [http://community.jboss.org/people/AJanz] created the discussion
"session closed"
To view the discussion, visit: http://community.jboss.org/message/594254#594254
--------------------------------------------------------------
i am using seam 2.2 with jbpm.
when executing several jbpm command like signal or saveprocessinstance i got an exception "session closed"
if i execute them via command service bean from jbpm-enterprise.ear everything is ok. where is the difference?
here are my configurations.
jbpm
<jbpm-configuration>
<jbpm-context>
<service name="persistence" factory="org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory" />
<service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
<service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
<service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
<service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
<service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
</jbpm-context>
</jbpm-configuration>
hibernate
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
" http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- hibernate dialect -->
<property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
<property name="hibernate.dialect">org.hibernate.dialect.OracleDialect</property>
<!-- DataSource properties (begin)
property name="hibernate.connection.datasource">java:comp/env/jdbc/JbpmDataSource</property
DataSource properties (end)
DataSource properties (begin) === -->
<property name="hibernate.connection.datasource">java:/JbpmDS</property>
<!-- ==== DataSource properties (end)
JTA transaction properties (begin) -->
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
<property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
<property name="jta.UserTransaction">java:comp/UserTransaction</property>
<!-- JTA transaction properties (end)
..
an my commmand bean
import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;
import javax.ejb.Remove;
import javax.ejb.Stateful;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import org.apache.log4j.Logger;
import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.Name;
import org.jbpm.JbpmConfiguration;
import org.jbpm.JbpmContext;
import org.jbpm.command.Command;
import de.lorenz.soaworkflow.core.performanceprofile.Profiler;
@Name("CommandService")
@Stateful
@AutoCreate
public class CommandServiceBean implements CommandService{
private static final Logger log = Logger.getLogger(CommandServiceBean.class
.getName());
static JbpmConfiguration cfg = JbpmConfiguration
.parseResource("resources/jbpm.cfg.xml");
// AJ 22.1.2010
// default ist jetzt ohne CommandServiceBean
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
public Object executeCommand(Command cmd) {
Object returnValue = null;
log.debug("Begin execute command ");
long start = 0;
if (Profiler.isProfiling())
start = Profiler.startProfile("CommandBean:executeCommand");
JbpmContext jbpmContext = null;
Connection con = null;
try {
// AJ 11.2.2010 muss jedesmal neu erzeugt werden!!!
// da n Threads hierauf zugreifen!
jbpmContext = cfg.createJbpmContext();
// con = ConnectionManager.getInstance().getConnection();
// jbpmContext.setConnection(con);
if (jbpmContext == null)
throw new Exception("Error now jbpm context!");
returnValue = cmd.execute(jbpmContext);
} catch (Exception e) {
log.error("Error executeCommand", e);
} finally {
if (jbpmContext != null) {
jbpmContext.close();
jbpmContext = null;
try {
if (con != null) {
con.close();
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
log.debug("End execute command ");
if (Profiler.isProfiling())
Profiler.endProfile("CommandBean:executeCommand", start);
return returnValue;
}
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
public Object executeCommands(List<Command> cmdlist) {
Object returnValue = null;
log.debug("Begin executeCommands ");
long start = 0;
if (Profiler.isProfiling())
start = Profiler.startProfile("CommandBean:executeCommands");
JbpmContext jbpmContext = null;
Connection con = null;
try {
// AJ 11.2.2010 muss jedesmal neu erzeugt werden!!!
// da n Threads hierauf zugreifen!
jbpmContext = cfg.createJbpmContext();
// con = ConnectionManager.getInstance().getConnection();
// jbpmContext.setConnection(con);
if (jbpmContext == null)
throw new Exception("Error now jbpm context!");
for ( Command cmd : cmdlist ) {
System.out.println("execute " + cmd.getClass().getName());
returnValue = cmd.execute(jbpmContext);
}
} catch (Exception e) {
log.error("Error CommandBean:executeCommands", e);
} finally {
if (jbpmContext != null) {
jbpmContext.close();
jbpmContext = null;
try {
if (con != null) {
con.close();
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
log.debug("End CommandBean:executeCommands");
if (Profiler.isProfiling())
Profiler.endProfile("CommandBean:executeCommands", start);
return returnValue;
}
@Remove
public void remove () {
System.out.println("remove command service ");
}
}
stacktrace
SignalCommand
17:39:58,804 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TwoPhaseC
ordinator_2] TwoPhaseCoordinator.beforeCompletion - failed for com.arjuna.ats.i
ternal.jta.resources.arjunacore.SynchronizationImple@1ee32dd
org.hibernate.SessionException: Session is closed!
at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSession
mpl.java:49)
at org.hibernate.impl.SessionImpl.getNamedQuery(SessionImpl.java:1258)
at org.jbpm.db.JobSession$DeleteJobsSynchronization.beforeCompletion(Jo
Session.java:190)
at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImpl
.beforeCompletion(SynchronizationImple.java:114)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompleti
n(TwoPhaseCoordinator.java:247)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCo
rdinator.java:86)
at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.
ommitAndDisassociate(TransactionImple.java:1389)
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.c
mmit(BaseTransaction.java:135)
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTr
nsactionManagerDelegate.java:87)
at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/594254#594254]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years