[jBPM Users] - Re: Problem moving from 4.1 to 4.2 using Spring configuratio
by suganda
Hi saraswati.santanu,
I have tried to using JBPM 4.2 With Spring configuration. However, I have weird exception when enable current="true"
<hibernate-session current="true"/>
if i am using
<hibernate-session />
<hibernate-session current="true"/>
or
<hibernate-session />
I can successfully insert record, or reading from database. However if I set current="true" I will get exception
| <?xml version="1.0" encoding="UTF-8"?>
|
| <jbpm-configuration xmlns="http://jbpm.org/xsd/cfg">
|
| <process-engine-context>
|
| <repository-service />
| <repository-cache />
| <execution-service />
| <history-service />
| <management-service />
| <task-service />
| <identity-service />
| <!--<transaction />-->
|
| <!--<command-service>
| <retry-interceptor />
| <environment-interceptor />
| <spring-transaction-interceptor current="true"/>
| </command-service>-->
|
| <command-service name="txRequiredCommandService">
| <retry-interceptor />
| <environment-interceptor transactionManager="dxf.hbTxManager"/>
| <spring-transaction-interceptor />
| </command-service>
|
| <!--<command-service name="newTxRequiredCommandService">
| <retry-interceptor />
| <environment-interceptor policy="requiresNew" />
| <spring-transaction-interceptor />
| </command-service>-->
|
| <deployer-manager>
| <jpdl-deployer />
| </deployer-manager>
|
| <object class="org.jbpm.pvm.internal.id.DatabaseDbidGenerator">
| <field name="commandService"><ref object="txRequiredCommandService" /></field>
| <!--<field name="commandService"><ref object="newTxRequiredCommandService" /></field>-->
| </object>
|
| <object class="org.jbpm.pvm.internal.id.DatabaseIdComposer" init="eager" />
|
| <script-manager default-expression-language="juel"
| default-script-language="juel"
| read-contexts="execution, environment,
| process-engine, spring"
| write-context="">
| <script-language name="juel" factory="org.jbpm.pvm.internal.script.JuelScriptEngineFactory" />
| </script-manager>
|
| <authentication />
|
| <job-executor auto-start="false" />
|
| <id-generator />
| <types resource="jbpm.variable.types.xml" />
|
| <business-calendar>
| <monday hours="9:00-12:00 and 12:30-17:00"/>
| <tuesday hours="9:00-12:00 and 12:30-17:00"/>
| <wednesday hours="9:00-12:00 and 12:30-17:00"/>
| <thursday hours="9:00-12:00 and 12:30-17:00"/>
| <friday hours="9:00-12:00 and 12:30-17:00"/>
| <holiday period="01/07/2008 - 31/08/2008"/>
| </business-calendar>
|
| </process-engine-context>
|
| <transaction-context>
| <repository-session />
| <db-session />
| <pvm-db-session />
| <job-db-session />
| <task-db-session />
| <message-session />
| <timer-session />
| <history-session />
| <!--<transaction />-->
| <hibernate-session />
| <hibernate-session current="true"/>
| <identity-session />
| </transaction-context>
| </jbpm-configuration>
|
Exception Stack Trace
| org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine' defined in URL [file:/C:/Suganda/jbpm-4.2/workspace/dxf-comp/bin/com/gda/dxf/comp/resources/spring/spring-service-jbpm.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.jbpm.api.ProcessEngine org.jbpm.pvm.internal.cfg.SpringConfiguration.buildProcessEngine()] threw exception; nested exception is org.jbpm.api.JbpmException: no jBPM DB schema: no JBPM4_EXECUTION table. Run the create.jbpm.schema target first in the install tool.
| Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'initialFillService' defined in URL [file:/C:/Suganda/jbpm-4.2/workspace/dxf-comp/bin/com/gda/dxf/comp/resources/spring/spring-service.xml]: Cannot resolve reference to bean '_initialFillService' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_initialFillService' defined in URL [file:/C:/Suganda/jbpm-4.2/workspace/dxf-comp/bin/com/gda/dxf/comp/resources/spring/spring-service-jbpm.xml]: Cannot resolve reference to bean 'repositoryService' while setting bean property 'repositoryService'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'processEngine': Requested bean is currently in creation: Is there an unresolvable circular reference?
| Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'deployService' defined in URL [file:/C:/Suganda/jbpm-4.2/workspace/dxf-comp/bin/com/gda/dxf/comp/resources/spring/spring-service.xml]: Cannot resolve reference to bean '_deployService' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_deployService' defined in URL [file:/C:/Suganda/jbpm-4.2/workspace/dxf-comp/bin/com/gda/dxf/comp/resources/spring/spring-service-jbpm.xml]: Cannot resolve reference to bean 'repositoryService' while setting bean property 'repositoryService'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'processEngine': Requested bean is currently in creation: Is there an unresolvable circular reference?
| at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:551)
| at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:964)
| at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:868)
| at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:479)
| at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
| at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:289)
| at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
| at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:286)
| at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:188)
| at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:558)
| at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:852)
| at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:422)
| at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
| at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
|
Please Help me as I already check many forums but they always recommended using current="true"
I also dont use current="true" in <spring-transaction-interceptor /> in which I will get exception if i enable true of it. However the documentation stated we should enable both of them to true. I am confuse whether JBPM Documentation is wrong or I have wrong setting that cause me that exception.
Thanks in advance,
Best Regards,
Suganda
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268445#4268445
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268445
14 years, 9 months
[EJB 3.0 Users] - NotBound ERRoR
by amira88
Hi EveryBody,
after running the client i have this error and i can't find a solution:I'm running the client in another java project which contain the jindi.properties and log4j.properties.
My HotelTestBean.java and HotelTestBeanLocal.java and HotelTestBeanRemote.java are in another ejb project
this is the errrors:
03:59:12,480 DEBUG TimedSocketFactory:87 - createSocket, hostAddr: localhost/127.0.0.1, port: 1099, localAddr: null, localPort: 0, timeout: 0
javax.naming.NameNotFoundException: HotelTestBean not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
at org.jnp.server.NamingServer.lookup(NamingServer.java:396)
at sun.reflect.GeneratedMethodAccessor251.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:722)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:682)
at javax.naming.InitialContext.lookup(Unknown Source)
at FirstEJB3TutorialClient.main(FirstEJB3TutorialClient.java:22)
Exception in thread "main" java.lang.RuntimeException: javax.naming.NameNotFoundException: HotelTestBean not bound
at FirstEJB3TutorialClient.main(FirstEJB3TutorialClient.java:34)
Caused by: javax.naming.NameNotFoundException: HotelTestBean not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
at org.jnp.server.NamingServer.lookup(NamingServer.java:396)
at sun.reflect.GeneratedMethodAccessor251.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:722)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:682)
at javax.naming.InitialContext.lookup(Unknown Source)
at FirstEJB3TutorialClient.main(FirstEJB3TutorialClient.java:22)
this my FirstEJB3TutorialClient:
mport java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public static void main(String[] args) {
Context context;
try{
context = new InitialContext();
HotelTestBeanRemote beanRemote = (HotelTestBeanRemote) context.lookup(HotelTestBean.RemoteJNDIName);
beanRemote.test(); }
catch (NamingException e){
e.printStackTrace();
throw new RuntimeException(e);} }}
I'm a biginner and i don't know what to do help please.
Regards.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268439#4268439
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268439
14 years, 9 months
[Security] - Server-side authentication with Kerberos/ActiveDirectory usi
by laluz
Dear all,
I was trying to find a solution in the web, found some sites but not really getting thru how following scenario should be implemented:
1. Using a fat client, the client shall authenticate via JBoss Server (using AS 5.1)
2. The server shall perform the authentication request from fat client using kerberos against Active Directory.
3. After successful authentication the server shall read roles from AD via group membership as well and add them to the subject.
Thing is, Performing the Kerberos auth on the client-side was simple, but I don't understand how it should be implemented like the client showing up a login dialog, securely transmitting auth data (maybe ticket) to server and server doing the auth work.
Could anyone give me an advice, since I'm kind of new to this issue?
Best regards,
Sebastian
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268438#4268438
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268438
14 years, 9 months
[JBoss Cache Users] - Re: How to manage an exception that occurs in the commit or
by galder.zamarreno@jboss.com
If you look at existing CacheLoader implementations such as JDBCCacheLoader, you'll see that we call cf.commit(tx);.
cf.commit(tx) does not do anything in a managed environment, such as the JBoss Application server since it's the JBoss JCA layer that will make sure that anything that the datasource, or database, participates of the transaction correctly. We do the puts in the prepare() call which is called from beforeCompletion(). The datasource will then interact with the database and the underlying JDBC connection and do the corresponding transactional work.
I think you're prepare/commit/rollback phases should be the same as the ones in JDBCCacheLoader or more precisely, parent AdjListJDBCCacheLoader.
In an unmanaged connection or standalone mode, since the NonManagedConnectionFactory has direct access to the underlying java.sql.Connection, we do the commit there. I agree that errors arising here in an unmanaged environment could be an issue but we can't do anything about it because JBossCache is not a proper XA resource.
One recommendation however would be that if you're using a JDBC-like cache loader, you should retrieve the connection from the ConnectionFactory we provide and let it do its job of interacting with the java.sql.Connection accordingly depending on whether it's in a managed environment or not.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268436#4268436
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268436
14 years, 9 months