Re: [jboss-user] [EJB 3.0] - Problem running ejb3 tutorial examples
by jaikiran pai
jaikiran pai [http://community.jboss.org/people/jaikiran] replied to the discussion
"Problem running ejb3 tutorial examples"
To view the discussion, visit: http://community.jboss.org/message/556336#556336
--------------------------------------------------------------
> eivind hognestad wrote:
>
> Hi Jaikiran, I don't know if you discovered any possible solutions to my problem, but I tried to run the tutorials with ant, and THAT worked,
I thought I had discovered the issue but the output you posted earlier proves otherwise. Yes, running from Ant directly will get you going. Sorry, I thought you already knew that, so I didn't mention it earlier.
> eivind hognestad wrote:
>
> so it seems like there is something wrong with the maven way of running the examples (in my computer that is).
>
Yes, it's definitely Maven (plugin) which is causing the problem. And I do see where it's coming from, the missing part is why it's running into this issue. I would definitely like to get to the bottom of this and before I ask for some more output logs from your system, I would like to (locally) see how the Maven plugin is interacting with the classpath for loading the jars.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/556336#556336]
Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 8 months
[EJB 3.0 Development] - Exception while deployed EJB jar
by eshwar rao
eshwar rao [http://community.jboss.org/people/eshwaronline] created the discussion
"Exception while deployed EJB jar"
To view the discussion, visit: http://community.jboss.org/message/556332#556332
--------------------------------------------------------------
Can someone please help me resolve the issue mentioned below. am using JBOSS 5 and EJB3.0
Thanks in advance,
Eshwar
11:15:35,375 INFO [EJBContainer] STOPPED EJB: com.giantslogik.sfbs.ejb.impl.ACLBean ejbName: ACLBean
11:15:35,375 ERROR [AbstractKernelController] Error installing to Start: name=jboss.j2ee:jar=sfbs-basic.jar,name=ACLBean,service=EJB3 state=Create
java.lang.NullPointerException
at org.jboss.deployment.plugin.MappedDeploymentEndpointResolver.getEndpointInfo(MappedDeploymentEndpointResolver.java:65)
at org.jboss.ejb3.deployers.JBoss5DeploymentScope.getEjbContainer(JBoss5DeploymentScope.java:165)
at org.jboss.ejb3.deployers.JBoss5DeploymentScope.getEjbContainer(JBoss5DeploymentScope.java:233)
at org.jboss.ejb3.Ejb3Deployment.getEjbContainer(Ejb3Deployment.java:389)
at org.jboss.ejb3.Ejb3Deployment.getEjbJndiName(Ejb3Deployment.java:395)
at org.jboss.ejb3.EJBContainer.getEjbJndiName(EJBContainer.java:1526)
at org.jboss.injection.EjbEncInjector.inject(EjbEncInjector.java:72)
at org.jboss.ejb3.EJBContainer.lockedStart(EJBContainer.java:900)
at org.jboss.ejb3.session.SessionContainer.lockedStart(SessionContainer.java:200)
at org.jboss.ejb3.session.SessionSpecContainer.lockedStart(SessionSpecContainer.java:577)
at org.jboss.ejb3.stateless.StatelessContainer.lockedStart(StatelessContainer.java:192)
at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:884)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/556332#556332]
Start a new discussion in EJB 3.0 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 8 months
[jBPM] - Violation of UNIQUE KEY constraint with sub-process
by Ryan Bartlett
Ryan Bartlett [http://community.jboss.org/people/RyanLBart] created the discussion
"Violation of UNIQUE KEY constraint with sub-process"
To view the discussion, visit: http://community.jboss.org/message/556328#556328
--------------------------------------------------------------
I am getting the following Exception when using sub-processes (.jpdl.xml files are below). I have removed the subprocesses and everything works fine. When I add them back in, I get the ConstraintViolation.
My environment is using MSSQL Server and we have not modified any of the JBPM defaults for transactions, id generators, etc. Any clues? I have seen some other posts regarding this issue, but haven't seen a clear answer except for perhaps there is a bug in the id generator.
Thanks!
Starting execution:
ProcessInstance processInstance = executionService.startProcessInstanceByKey(message.getClass().getCanonicalName(), +parameters); String processInstanceId = processInstance.getId();IMessage response = (IMessage) executionService.getVariable(processInstanceId, S_MESSAGE_RESPONSE); executionService.endProcessInstance(processInstanceId, "end"); ++
+
Stack trace:
2010-08-06 18:15:49,686 ERROR bus.thread.pool-1-message.processing.thread-1 org.hibernate.util.JDBCExceptionReporter - Violation of UNIQUE KEY constra
int 'UQ__JBPM4_EXECUTION__67C95AEA'. Cannot insert duplicate key in object 'dbo.JBPM4_EXECUTION'.
2010-08-06 18:15:49,686 ERROR bus.thread.pool-1-message.processing.thread-1 org.hibernate.event.def.AbstractFlushingEventListener - Could not synchron
ize database state with session
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:114)
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109)
at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2252)
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.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
Main JPDL file:
<process name='com.e3.es.order.messages.createorder.defn.v2.CreateOrderRequestType'
key='com.e3.es.order.messages.createorder.defn.v2.CreateOrderRequestType'
id='create'>
<start>
<transition to='beginProcessing'/>
</start>
<java name='beginProcessing'
class='com.e3.es.order.service.jbpm.handler.RequestHandler'
method='getProcessingContext'
var='processingContext'>
<arg><object expr='#{serviceRequest}'/></arg>
<transition to='verify'/>
</java>
<sub-process name='verify' sub-process-key="supply.verify">
<parameter-in var="processingContext" subvar="processingContext" />
<transition to='holdPurchases'/>
</sub-process>
<java name='holdPurchases'
class='com.e3.es.order.service.jbpm.handler.general.AdaptorRequestHandler'
method='handle'>
<arg><string value='hold'/></arg>
<arg><object expr='#{processingContext}'/></arg>
<arg><string value='Role=RequestedProductDetail;ProcessingModel=Two-Phase'/></arg>
<transition to='wait'/>
</java>
<state name='wait'/>
<end name='end'></end>
</process>
Subprocess:
<process name='supply.verify' key='supply.verify'>
<start>
<transition to='supplyverify'/>
</start>
<java name='supplyverify'
class='com.e3.es.order.service.jbpm.handler.general.AdaptorRequestHandler'
method='handle'>
<arg><string value='verify'/></arg>
<arg><object expr='#{processingContext}'/></arg>
<arg><string value='Role=RequestedProductDetail,PaymentPlan'/></arg>
<transition to='end'/>
</java>
<end name='end'></end>
</process>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/556328#556328]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 8 months
Re: [jboss-user] [jBPM Development] - Some questions about the script execution code
by Michael Wohlfart
Michael Wohlfart [http://community.jboss.org/people/mwohlf] replied to the discussion
"Some questions about the script execution code"
To view the discussion, visit: http://community.jboss.org/message/556294#556294
--------------------------------------------------------------
Hi HuiSheng,
thanks a lot for your reply,
> [..]
> And I find both evaluateExpression() and evaluateScript() are using evaluate() internal. There is no different between them. So we just using evaluateExpression() to do all of work about eval script. Maybe sometimes it become much confused.
the problem I see here is that a script might get executed with the default expression language instead with the default script language, this part of the source is indeed very confusing can't we just remove the evaluateExpression() and evaluateScript() and in general use the evaluate() method and throw an exception if the execution language is not specified, this would be more in line with the rest of the code in my opinion.
> [...]
> 2.EnvironmentBinding had not finished yet. We just removed all of IllegalStateException in jBPM-4.4 in order to get more feeback from community. I think we could finish it in the next version, like achieve the put() method to store data into process variable.
I didn't think of this, but it would be a cool feature to have a groovy script write to process variables
> [...]
> 3.Did we have to achieve the readContext and writeContext. In which scenarios we should use them? If they are not neccessary, I want to deprecated them in the next version, so we could delete them in the future.
I also don't see an urgent need for them, the read contexts are hard coded now as far as I understand?
The write context would be where ever the variable is declared?
> [...]
> 4.How should we refactor TaskContext and ExecutionContext. A long times ago, Tom said he want to refacter the TaskContext and ExecutionContext, But he didn't make it more clearly. if we could make a good plan, we could finish this work by ourselves.
Could they be used to have access to task scoped and execution scoped variables, at least this would make sense to me :-/ right now the TaskContext just gives access to the task itself, so a script can do stuff like task.getVariable('varname')
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/556294#556294]
Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 8 months