[Beginner's Corner] - Exception deploying MDB !
by Gurvinderpal Narula
Gurvinderpal Narula [http://community.jboss.org/people/groovenarula] created the discussion
"Exception deploying MDB !"
To view the discussion, visit: http://community.jboss.org/message/572553#572553
--------------------------------------------------------------
Hi,
I'm trying to deploy an EJB Jar that has just the following compiled classes for an MDB on JBOSS 5.1.0 :
com/
com/company/
com/company/services
com/company/services/Mail.class
com/company/services/ForwardResponse.class
I get the following error when I deploy the MDB:
13:30:53,603 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/opt/jboss/server/node1/deploy/ServiceResponse.jar/ state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Error deploying ServiceResponse.jar: failed to initialize bean container
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196)
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:99)
.
.
.
.
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: failed to initialize bean container
at org.jboss.ejb3.EJBContainer.<init>(EJBContainer.java:257)
at org.jboss.ejb3.mdb.MessagingContainer.<init>(MessagingContainer.java:87)
at org.jboss.ejb3.mdb.MDB.<init>(MDB.java:63)
at org.jboss.ejb3.Ejb3AnnotationHandler.getMDB(Ejb3AnnotationHandler.java:339)
.
.
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:182)
... 33 more
Caused by: java.lang.IllegalStateException: Null beannMetaData
at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.setupMetaDataLists(BeanInterceptorMetaDataBridge.java:315)
at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.initialise(BeanInterceptorMetaDataBridge.java:235)
at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.<init>(BeanInterceptorMetaDataBridge.java:138)
at org.jboss.ejb3.interceptors.metadata.AdditiveBeanInterceptorMetaDataBridge.<init>(AdditiveBeanInterceptorMetaDataBridge.java:48)
at org.jboss.ejb3.aop.BeanContainer.initialize(BeanContainer.java:195)
at org.jboss.ejb3.EJBContainer.<init>(EJBContainer.java:253)
... 43 more
Caused by: java.lang.NullPointerException
at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.setupMetaDataLists(BeanInterceptorMetaDataBridge.java:268)
... 48 more
Can someone please help me with how to trace down what I'm doing wrong ?
Thanks
Groove
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/572553#572553]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 1 month
[JNDI and Naming] - Service Override in JNDI
by Thomas Goettlich
Thomas Goettlich [http://community.jboss.org/people/ThomasGo] created the discussion
"Service Override in JNDI"
To view the discussion, visit: http://community.jboss.org/message/572722#572722
--------------------------------------------------------------
Hi,
before I ask my question, here's a short description of what we try to do:
We are building a platform for our projects that consists of multiple components.
Each component contains entities, data access objects and business services.
If we use those components in a project and need to extend the entities, we inherit from the base entity and the dao but not from the service.
The daos are abstract generic services, i.e. they provide generic implementations but are not annotated with @Stateless.
The services are neither generic nor abstract and thus might be extended but the logic must not be overridden.
A short example to illustrate my description:
The user component contains the following classes:
@Entity
UserEntity{ /*code here*/ }
abstract class UserDAOBean
{
doCrudStuff(Entity user) { ... }
}
@Stateless
@Local (IUserService.class)
class UserServiceBean
{
doBusinessLogic(UserEntity user) { ... }
}
The project needs to extend UserEntity and thus we have the following:
@Entity
ProjectUserEntity extends UserEntity { /*additional attributes*/ }
@Stateless
ProjectUserDAOBean extends UserDAOBean
{
@Override
doCrudStuff(ProjectUserEntity user) { /*some extended or changed code here */ }
}
This works so far.
The problem are the business services.
When I want to extend UserServiceBean, that's no problem. I then just add a ProjectUserServiceBean and call that where needed.
However, when I need to override a method - e.g. doBusinessLogic - I need other services to use the overriding service instead of the base one.
I can't change the calling services and thus have to rely on JNDI to return the correct service.
The problem is, that the JBoss 4.2.3 implemantion (that's what we're using) returns any service that implements the IUserService interface (and declares it as its local interface).
So I need UserServiceBean not to be returned by JNDI or not be registered in JNDI at all.
Finally the question: Is that possible? If so, how?
Thanks in advance.
Thomas
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/572722#572722]
Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 1 month
[jBPM] - Class Cast Exception with SendMuleEvent
by Shynihan Muhammed
Shynihan Muhammed [http://community.jboss.org/people/shynihan] created the discussion
"Class Cast Exception with SendMuleEvent"
To view the discussion, visit: http://community.jboss.org/message/572720#572720
--------------------------------------------------------------
Hello,
ClassCastException is throwing with SendMuleEvent Action after firing a timer event with jBPM 3.2.
ERROR 2010-11-24 16:11:47,239 [JbpmJobExector:127.0.0.1:1] org.jbpm.graph.def.GraphElement: action threw exception: org.jbpm.msg.db.DbMessageService cannot be cast to org.mule.transport.bpm.jbpm.MuleMessageService
java.lang.ClassCastException: org.jbpm.msg.db.DbMessageService cannot be cast to org.mule.transport.bpm.jbpm.MuleMessageService
ERROR 2010-11-24 16:11:47,239 [JbpmJobExector:127.0.0.1:1] org.jbpm.graph.def.GraphElement: action threw exception: org.jbpm.msg.db.DbMessageService cannot be cast to org.mule.transport.bpm.jbpm.MuleMessageService
java.lang.ClassCastException: org.jbpm.msg.db.DbMessageService cannot be cast to org.mule.transport.bpm.jbpm.MuleMessageService
How to resolve this?
Any helps appreciated...
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/572720#572720]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 1 month
[JNDI and Naming] - Which HA-JMS ConnectionFactory?
by Gerald Turner
Gerald Turner [http://community.jboss.org/people/gturner] created the discussion
"Which HA-JMS ConnectionFactory?"
To view the discussion, visit: http://community.jboss.org/message/572560#572560
--------------------------------------------------------------
How should I code transacted HA-JMS sender and receiver non-EJB clients deployed within a cluster of JBoss containers?
The question is tricky because: we're using JBoss 4.2.3 in "all" configuration, but would like to upgrade to 5.1 without code changes; the clients are SAR deployments of custom MBeans; no EJB/MDB whatsoever.
Various informal documentation I've been able to scrape from the web suggests looking up the ConnectionFactory from local (non-HA) JNDI with name "java:/JmsXA" and looking up the Queue from HA-JNDI.
JmsXA is not working because evidently (and as it's name suggests) it is an XAConnectionFactory, and the code:
QueueSession session =
connection.createQueueSession(true, Session.SESSION_TRANSACTED);
…is not actually honoring the transcted/mode arguments (javadoc: "usage undefined"¹). This becomes a problem when the receiver code issues session.commit() or session.rollback() which raise the exception "TransactionInProgressException: Should not be call from a XASession".
I've searched for examples of using XASession from a non-EJB client and haven't come up with anything. I suppose I could try experimenting with session.getXAResource², but first problem faced would be how to allocate Xid objects, and then I imagine there will be failures because the underlying DataSource isn't XA (MySQL Cluster/NDB storage engine doesn't support XA).
Avoiding the XA mess and trying ConnectionFactory lookup with JNDI name "java:/ConnectionFactory" isn't working either: this object only exists on the master nodes local JNDI, it's not exported to HA-JNDI. I suppose I'll have to do remote JNDI connection to the master node? That sounds awful since I'll also need to detect and reconnect on master node failover.
Does JBoss 5.1 / JBoss Messaging "fix" any of this? I could change targets but I'm having massive interoperability problems between 4.2 and 5.1 in other applications (several clusters with total of 300+ JBoss application servers, "fork-lift" upgrade of our applications isn't
pretty).
Any advice would be much appreciated!
¹ http://download.oracle.com/javaee/5/api/javax/jms/XAConnection.html#creat... http://download.oracle.com/javaee/5/api/javax/jms/XAConnection.html#creat...
² http://download.oracle.com/javaee/5/api/javax/jms/XASession.html#getXARes... http://download.oracle.com/javaee/5/api/javax/jms/XASession.html#getXARes...
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/572560#572560]
Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 1 month
[jBPM] - could not insert: [org.jbpm.pvm.internal.lob.Lob] during deployment
by Bo Xie
Bo Xie [http://community.jboss.org/people/mrboxie] created the discussion
"could not insert: [org.jbpm.pvm.internal.lob.Lob] during deployment"
To view the discussion, visit: http://community.jboss.org/message/572606#572606
--------------------------------------------------------------
Hi,
I am new to jbpm and run into the following strange issue. I used jpbm-4.4 with oracle. When I tried to deploy the following process.jpdl.xml, I got an exception as below.
org.hibernate.exception.GenericJDBCException: could not insert: [org.jbpm.pvm.internal.lob.Lob]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2295)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2688)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64)
at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1141)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.jbpm.pvm.internal.query.AbstractQuery.execute(AbstractQuery.java:93)
at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.execute(ProcessDefinitionQueryImpl.java:67)
at org.jbpm.pvm.internal.query.AbstractQuery.untypedList(AbstractQuery.java:67)
at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.list(ProcessDefinitionQueryImpl.java:157)
at org.jbpm.pvm.internal.repository.ProcessDeployer.checkKey(ProcessDeployer.java:133)
at org.jbpm.pvm.internal.repository.ProcessDeployer.deploy(ProcessDeployer.java:92)
at org.jbpm.pvm.internal.repository.DeployerManager.deploy(DeployerManager.java:46)
at org.jbpm.pvm.internal.repository.RepositorySessionImpl.deploy(RepositorySessionImpl.java:62)
at org.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:47)
at org.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:33)
at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:50)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:56)
at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
at org.jbpm.pvm.internal.repository.DeploymentImpl.deploy(DeploymentImpl.java:90)
at org.jbpm.examples.state.choice.StateChoiceTest.setUp(StateChoiceTest.java:63)
at junit.framework.TestCase.runBare(TestCase.java:128)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
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)
Caused by: java.sql.SQLException: operation not allowed: streams type cannot be used in batching
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.driver.OraclePreparedStatement.addBatch(OraclePreparedStatement.java:3775)
at org.hibernate.jdbc.BatchingBatcher.addToBatch(BatchingBatcher.java:53)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2275)
... 39 more
The process.jpdl.xml is as following, it is edited using eclipse plugin.
<?xml version="1.0" encoding="UTF-8"?>
<process name="StateChoice" xmlns=" http://jbpm.org/4.4/jpdl http://jbpm.org/4.4/jpdl"
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance" >
<on event="start">
<event-listener class="org.jbpm.examples.eventlistener.LogListener">
<field name="msg"><string value="Start on process definition"/></field>
</event-listener>
</on>
<on event="end">
<event-listener class="org.jbpm.examples.eventlistener.LogListener">
<field name="msg"><string value="End on process definition"/></field>
</event-listener>
</on>
<start g="16,60,48,48">
<on event="start">
<event-listener class="org.jbpm.examples.eventlistener.LogListener">
<field name="msg"><string value="Start on: Start"/></field>
</event-listener>
</on>
<transition to="wait for response"/>
</start>
<state g="96,58,109,52" name="wait for response">
<on event="start">
<event-listener class="org.jbpm.examples.eventlistener.LogListener">
<field name="msg"><string value="Start on: wait for response"/></field>
</event-listener>
</on>
<transition g="148,34:3,-15" name="accept" to="submit document"/>
<transition g="151,133:3,2" name="reject" to="try again"/>
</state>
<state g="238,8,114,52" name="submit document">
<!-- on event="start">
<event-listener class="org.jbpm.examples.eventlistener.LogListener">
<field name="msg"><string value="Start on: submit document"/></field>
</event-listener>
</on-->
<transition g="-42,-18" name="success" to="Actual Submit"/>
</state>
<state g="285,122,114,52" name="try again">
<transition g="240,88:-20,-1" name="retry" to="wait for response"/>
<transition g="-42,-18" name="failed" to="show why"/>
</state>
<end g="627,100,48,48" name="end1"/>
<task assignee="#{user}" g="483,37,92,52" name="Actual Submit">
<reminder duedate="2 minutes" repeat="1 minute"/>
<transition g="-42,-18" name="summited" to="end1"/>
</task>
<custom name="show why" g="471,173,92,52" class="org.jbpm.examples.state.choice.ShowWhy">
<transition name="give up" to="end1" g="-42,-18"/>
</custom>
</process>
One thing really confused me is if I remove the commented <on> element inside <state> element "submit document", the deployment works fine. Can anyone point out what is the issue here?
The code to deploy the process is:
deploymentId = repositoryService.createDeployment()
.addResourceFromClasspath("org/jbpm/examples/state/choice/process.jpdl.xml")
.deploy();
Thank you for your time.
-Bo
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/572606#572606]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 1 month
[jBPM] - mail inside timer in jbpm4.4
by parvathy j a
parvathy j a [http://community.jboss.org/people/parvathy] created the discussion
"mail inside timer in jbpm4.4"
To view the discussion, visit: http://community.jboss.org/message/572634#572634
--------------------------------------------------------------
Hi,
I have a process in which i have a timer on start of a particular node and i have a mail node inside the timer..so when the timer expires i want to send a mail..the timer is being called correctly..but when the timer expires the mail is not send and the event listener is also not being called...could anyone please help me with this scenario..
My jpdl file is
process name="MyTaskNotification" xmlns=" http://jbpm.org/4.4/jpdl http://jbpm.org/4.4/jpdl"
<start g="20,20,48,48">
<transition name="to_review" to="review">
</transition>
</start>
<task name="review" assignee="#{order.owner}">
<on event="start">
<timer duedate="1 minutes">
<mail template="myTemplate"/>
<event-listener class="com.sis.crm.sca.launch.task.LogChecking">
<field name="msg"><string value="inside timer of task node start event"/></field>
</event-listener>
</timer>
</on>
<transition name="to_secondTask" to="secondTask">
</transition></task>
<task name="secondTask"
assignee="paru"
g="96,16,127,52">
<notification template="rectify-template"/>
<transition to="wait"/>
</task>
<state name="wait" g="255,16,88,52"/>
</process>
Thanking you
Parvathy
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/572634#572634]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 1 month
[EJB3] - Re: SLSB pool size is always one in jboss 6.0 CR1 using ejb 3.1
by jaikiran pai
jaikiran pai [http://community.jboss.org/people/jaikiran] created the discussion
"Re: SLSB pool size is always one in jboss 6.0 CR1 using ejb 3.1"
To view the discussion, visit: http://community.jboss.org/message/572625#572625
--------------------------------------------------------------
> aravind kopparthi wrote:
>
>
> can you tell me when timeout method gets called by the container in this case process method in singletonBean calls a method on SLSBean's process method. at this time slsbeans instance gets activated by the container and give's that instance to this method call , during this process when a timout gets triggered doesn't it get a reference to another slsb instance to process?
Like I have been saying previously, the second instance of SLSB will only be created if the first instance is in use. So one the 1st timeout on the Singleton bean, you invoke on a SLSB. This results in the creation of the 1st instance of SLSB. *If* the next timeout invocation happens on the singleton bean before the 1st invocation on that SLSB has completed, *only then* will a new instance be created for the SLSB.
As you saw from your logs, the 2nd timeout invocation on the singleton is *not* happening before the 1st invocation finishes. This is due to the fact that you have (by default) configured your singleton bean to be Lock.WRITE type. Change the lock attribute to Lock.READ on that method. That will allow the 2nd timeout on the Singleton to happen while the first invocation on the SLSB is in progress (assuming the SLSB.process is a long running job compared to the timeout interval).
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/572625#572625]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 1 month