[jBPM] - How to use seam 2.2 with jbpm 4.4?
by Nilesh Chauhan
Nilesh Chauhan [http://community.jboss.org/people/nilesh.chauhan] created the discussion
"How to use seam 2.2 with jbpm 4.4?"
To view the discussion, visit: http://community.jboss.org/message/557534#557534
--------------------------------------------------------------
I want migrate my old application with seam 2.2 and jbpm4.4. Current version is seam 2.0.1 and jbpm3.I am using http://www.lunatech-research.com/archives/2010/03/09/jbpm4-and-seam-worki... http://www.lunatech-research.com/archives/2010/03/09/jbpm4-and-seam-worki... approach to migrate my application. While configuring my application with given option, i am getting following exeption.
org.jboss.seam.InstantiationException: Could not instantiate Seam component: *org.jboss.seam.bpm.jbpm <- newly created seam Component*
at org.jboss.seam.Component.newInstance(Component.java:2144)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:296)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:116)
at org.jboss.seam.init.Initialization.init(Initialization.java:740)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.RuntimeException: exception invoking: init
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:154)
at org.jboss.seam.Component.callComponentMethod(Component.java:2249)
at org.jboss.seam.Component.callCreateMethod(Component.java:2172)
at org.jboss.seam.Component.newInstance(Component.java:2132)
... 30 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
... 33 more
Caused by: java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.hibernate.engine.UnsavedValueFactory.instantiate(UnsavedValueFactory.java:22)
at org.hibernate.engine.UnsavedValueFactory.getUnsavedIdentifierValue(UnsavedValueFactory.java:44)
at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:44)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:124)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)
at org.jbpm.pvm.internal.wire.descriptor.HibernateSessionFactoryDescriptor.construct(HibernateSessionFactoryDescriptor.java:62)
at org.jbpm.pvm.internal.wire.WireContext.construct(WireContext.java:487)
at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:466)
at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:455)
at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:429)
at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:339)
at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:704)
at org.jbpm.pvm.internal.env.BasicEnvironment.get(BasicEnvironment.java:154)
at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:711)
at org.jbpm.pvm.internal.env.BasicEnvironment.get(BasicEnvironment.java:132)
at org.jbpm.pvm.internal.env.BasicEnvironment.get(BasicEnvironment.java:123)
at org.jbpm.pvm.internal.wire.descriptor.HibernateSessionDescriptor.construct(HibernateSessionDescriptor.java:63)
at org.jbpm.pvm.internal.wire.WireContext.construct(WireContext.java:487)
at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:466)
at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:455)
at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:429)
at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:339)
at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:704)
at org.jbpm.pvm.internal.env.BasicEnvironment.get(BasicEnvironment.java:132)
at org.jbpm.pvm.internal.env.BasicEnvironment.get(BasicEnvironment.java:123)
at org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:207)
at org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:196)
at org.jbpm.pvm.internal.cmd.CheckDbCmd.execute(CheckDbCmd.java:44)
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.processengine.ProcessEngineImpl.checkDb(ProcessEngineImpl.java:152)
at org.jbpm.pvm.internal.processengine.ProcessEngineImpl.<init>(ProcessEngineImpl.java:105)
at org.jbpm.pvm.internal.cfg.ConfigurationImpl.instantiateProcessEngine(ConfigurationImpl.java:100)
at org.jbpm.pvm.internal.cfg.ConfigurationImpl.buildProcessEngine(ConfigurationImpl.java:92)
at exienta.bpm.jbpm.Jbpm.init(Jbpm.java:42)
... 39 more
Caused by: org.jbpm.JbpmException: couldn't parse jbpm configuration from resource 'jbpm.cfg.xml'
at org.jbpm.JbpmConfiguration.getInstance(JbpmConfiguration.java:285)
at org.jbpm.JbpmConfiguration.getInstance(JbpmConfiguration.java:257)
at org.jbpm.JbpmConfiguration$Configs.getObjectFactory(JbpmConfiguration.java:418)
at org.jbpm.JbpmConfiguration$Configs.getObject(JbpmConfiguration.java:430)
at org.jbpm.JbpmConfiguration$Configs.getString(JbpmConfiguration.java:434)
at org.jbpm.calendar.BusinessCalendar.getBusinessCalendarProperties(BusinessCalendar.java:49)
at org.jbpm.calendar.BusinessCalendar.<init>(BusinessCalendar.java:56)
at org.jbpm.job.Timer.<clinit>(Timer.java:21)
... 86 more
Caused by: org.jbpm.JbpmException: no ObjectInfo class specified for element 'import'
at org.jbpm.configuration.ObjectFactoryParser.parse(ObjectFactoryParser.java:139)
at org.jbpm.configuration.ObjectFactoryParser.parseElements(ObjectFactoryParser.java:117)
at org.jbpm.configuration.ObjectFactoryParser.parseElementsStream(ObjectFactoryParser.java:110)
at org.jbpm.JbpmConfiguration.parseObjectFactory(JbpmConfiguration.java:317)
at org.jbpm.JbpmConfiguration.getInstance(JbpmConfiguration.java:281)
My jbpm.cfg.xml looks like below:
<jbpm-configuration>
<import resource="jbpm.default.cfg.xml"/>
<import resource="jbpm.tx.hibernate.cfg.xml"/>
<import resource="jbpm.jpdl.cfg.xml"/>
<import resource="jbpm.bpmn.cfg.xml" />
</jbpm-configuration>
I am trying to resolve the issues but still unable to get the root cause of this exception. I guess internally Jbpm.class is getting called of seam's jbpm.jpdl jar is the problem.
Any idea about this error or a way to migrate jbpm4 with seam 2.2 is highly appriciated.
Thanks in advance
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/557534#557534]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
[Datasource Configuration] - Deployment issues with Postgres + Jboss Configuration
by Mini K
Mini K [http://community.jboss.org/people/minikjboss] created the discussion
"Deployment issues with Postgres + Jboss Configuration"
To view the discussion, visit: http://community.jboss.org/message/557516#557516
--------------------------------------------------------------
Hello everyone,
This might be repeated question, but I spend almost more than a day to find the right answer over this forum and after removing, changing, editing almost everything, I decided to ask you again!
*Postgres : 8.4*
*Jboss: 5.1 GA*
*Following are the steps I did to configure Postgres into Jboss:*
*1) Added postgres-ds.xml into the JBOSS\default\server\deploy folder*
The code looks like this:
<datasources>
<local-tx-datasource>
<jndi-name>DefaultDS</jndi-name>
<connection-url>jdbc:postgresql://localhost:5432/testdatabase</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>postgres</user-name>
<password>admin</password>
<new-connection-sql>select 1</new-connection-sql>
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<metadata>
<type-mapping>PostgreSQL 8.0</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
*2) Added the postgresql-persistence-service.xml file from JBOSS\docs\examples\jms to JBOSS\server\default\deploy\messaging folder. Did no changes in this file.*
*3) Remove JBOSS\default\server\deploy\ hsqldb-ds.xml and JBOSS\server\default\deploy\messaging \ hsqldb-persistence-service.xml*
*4) Edited JBOSS\server\default\conf \ login-config.xml file by removing*
<application-policy name="HsqlDbRealm">
<authentication>
<login-module code="org.jboss.resource.security.ConfiguredIdentityLoginModule"
flag="required">
<module-option name="principal">sa</module-option>
<module-option name="userName">sa</module-option>
<module-option name="password"></module-option>
<module-option name="managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
</login-module>
</authentication>
</application-policy>
*5) Edited JBOSS\server\default\conf \ standardjbosscmp-jdbc.xml file by adding this line*
<datasource-mapping>PostgreSQL 8.0</datasource-mapping>
*6) Lastly, the most important is added the postgres driver at JBOSS\server\default\lib\ postgresql-8.4-701.jdbc4.jar*
*The datasource name is : DefaultDS*
*After doing the above steps I get the following exception:*
======================================================================
ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory" is missing the following dependencies:
Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.messaging.connectionfactory:service=ClusteredConnectionFactory" is missing the following dependencies:
Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.messaging.connectionfactory:service=ConnectionFactory" is missing the following dependencies:
Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.messaging.destination:name=DLQ,service=Queue" is missing the following dependencies:
Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.messaging.destination:name=ExpiryQueue,service=Queue" is missing the following dependencies:
Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.messaging:service=PostOffice" is missing the following dependencies:
Dependency "jboss.jgroups:service=ChannelFactory" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jgroups:service=ChannelFactory' **")
DEPLOYMENTS IN ERROR:
Deployment "jboss.jgroups:service=ChannelFactory" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jgroups:service=ChannelFactory' **
======================================================================
I have attached the detailed error log in this discussion as well.
I did read in some random discussions that I can remove the ejb3-timer file, which I tried but still I was getting more deployment errors. I think I am just missing the last step, but still dont know what it is.
Can someone please help me out with this? And also provide a clear answer so that it can help others as well.
Thanks in advance,
Mini
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/557516#557516]
Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
Re: [jboss-user] [JBoss Web Services CXF] - How to share session between web service calls?
by Anand Jayaraman
Anand Jayaraman [http://community.jboss.org/people/anand201301] replied to the discussion
"How to share session between web service calls?"
To view the discussion, visit: http://community.jboss.org/message/557502#557502
--------------------------------------------------------------
Hi,
I tried the above approach. It didn't work for me. I can clearly see two different JSESSIONIDs between the request/response. However when i use the HttpConduit approach the JSESSIONIDs are exactuly the same between the two request/responses.I am pasting the code i am trying out below:
String target =
"http://localhost:9090/CXFDemo";
IHelloService service =
*new IHelloService();IHello stub = service.getIHelloPort();
BindingProvider bp = (BindingProvider)stub;
bp.getRequestContext().put(BindingProvider.
+ENDPOINT_ADDRESS_PROPERTY, target);bp.getRequestContext().put(BindingProvider.
+SESSION_MAINTAIN_PROPERTY, *true);
Map<String, List<String>> headers= CastUtils.+cast+((Map)bp.getRequestContext().get(
"javax.xml.ws.http.request.headers"));
// This turns out to be null.
*if (headers == *null) {headers =
*new HashMap<String, List<String>>();bp.getRequestContext().put(
"javax.xml.ws.http.request.headers", headers);}
List<String> cookies = Arrays.+asList+(
*new String[] {"a=a","b=b"});headers.put(
"Cookie", cookies); String str = stub.hello(
"hello world!!");
//Creating a second service instance IHelloService service1 =
*new IHelloService();IHello stub1 = service1.getIHelloPort();
BindingProvider provider1 = (BindingProvider)stub1;
provider1.getRequestContext().put(BindingProvider.
+ENDPOINT_ADDRESS_PROPERTY, target);provider1.getRequestContext().put(BindingProvider.
+SESSION_MAINTAIN_PROPERTY, *true);
Map<String, List<String>> headers1= CastUtils.+cast+((Map)provider1.getRequestContext().get(
"javax.xml.ws.http.request.headers"));
*if (headers1 == *null) {headers1 =
*new HashMap<String, List<String>>();
// Putting back the headers from the first request.provider1.getRequestContext().put(
"javax.xml.ws.http.request.headers", headers);}
String greeting = stub1.hello(
"Bonjour");
Please let me know if i need to correct something?
Regards,
Anand
*++******++****
*
**
*+
+
*
*
*
**
*+
+
*
*++******++****
*
**
*+
+
*
*
*
**
*+
+
*
*++******++****
*
**
*+
+
*
*
*
**
*+
+
*
**++******++****
*
**
*+
+
*
*
*
**
*+
+
*
***++******++***
**
*+
+
*
*
*
**
*+
+
*
*++******++*
*+
+
*
*
*
**
*+
+
*
*+*++******++*
*+
+
*
*
*
**
*+
+
*
+*++******+
+
*
*
*
**
*+
+
*
**++******
*
*
*
**
*+
+
*
*++*****
*
*
**
*+
+
*
*++*****
*
*
**
*+
+
*
*++*****
*
*
**
*+
+
*
**++*****
*
*
**
*+
+
*
*++****
*
**
*+
+
*
**++****
*
**
*+
+
*
***++***
**
*+
+
*
*++*
*+
+
*
*++*
*+
+
*
*+*++*
*+
+
*
+*+
+
*
**
*
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/557502#557502]
Start a new discussion in JBoss Web Services CXF at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
[jBPM] - JBoss Eap 4.3 and special characters problem
by Rickard Engström
Rickard Engström [http://community.jboss.org/people/riffla] created the discussion
"JBoss Eap 4.3 and special characters problem"
To view the discussion, visit: http://community.jboss.org/message/557495#557495
--------------------------------------------------------------
Hi all
I have a problem which I believe is related to a recent migration from Tomcat to JBoss.
Below is a code snippet from the application which always worked with Tomcat but now, after the migration to JBoss 4.3 the condition fails
...
if (stateCode.toUpperCase().equals("PÅGÅENDE_EJ_KONTAKT")) return CaseStateCache.getInstance().getById(CaseState.STATE_INPROG_NOT_CONTACTED);
...
log.warn("Unknown state found in database:" + stateCode);
return CaseStateCache.getInstance().getById(CaseState.STATE_UNKNOWN);
...
After having read the log, which states "...WARN [CaseDAO] Unknown state found in database:PÅGÅENDE_EJ_KONTAKT", I'm quite sure that this is JBoss related (encoding hell, sort of... or?)
/R
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/557495#557495]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months