[JBoss Web Services] - Problem with Async calls when using "Spring based in-container Bus creation"
by Daniel Cote
Daniel Cote [https://community.jboss.org/people/daniel.cote.qc.ca] created the discussion
"Problem with Async calls when using "Spring based in-container Bus creation""
To view the discussion, visit: https://community.jboss.org/message/822617#822617
--------------------------------------------------------------
Hi,
This post is in continuation with previous one (see https://community.jboss.org/message/802369#802369#802369 https://community.jboss.org/message/802369#802369).
In this context, an in-container JAX-WS client, leveraging a Spring-base configuration (cxf.xml), issue an outgoing call to a WebService using in an Asynchronous mode, leveraging the
WS-Addressing headers <a:Action/>, <a:MessageID/>, <a:ReplyTo/>… The client issue a 'One-way (invokeOneWay methods)'.
The receiver of the call, also hosted in a JBOSS container, get the call, conduct the business logic and answer back.
If the 'ReplyTo/Address' specifies an http endpoint, the interaction succeed.
If the 'ReplyTo/Address' specifies an HTTPS endpoint, the interaction failed because it seems that, when constructing the response (an outgoing call on a new Http connection),
the cxf runtime DOES NOT detect the 'cxf.xml' configuration parameter file that is deployed with the application, as in a standard 'client's' interaction.
The HTTPS call failed because the 'http:tlsClientParameters' were not taken into account...
Conceptually speaking, it seems to me reasonable to assume that an outgoing 'callback' response should be behaving exactly as a standard client call, hence using the cxf.xml resource.
Here a couple of lines of the trace, showing the main steps:
*1) initial client's call (invokeOneWay)*
We can see (in bold) that the runtime correctly detect the cxf.xml and setup the conduit accordingly
2013-06-11 11:24:22,738 FINE (EJB default - 35) org.apache.cxf.transport.http.HTTPConduit.setTlsClientParameters Conduit '{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12.http-conduit' has been (re) configured for TLS keyManagers nulltrustManagers nullsecureRandom null
2013-06-11 11:24:22,738 FINE (EJB default - 35) org.apache.cxf.configuration.jsse.TLSParameterJaxBUtils.getKeystoreType KEY_STORE_TYPE_SET
2013-06-11 11:24:22,748 FINE (EJB default - 35) org.apache.cxf.configuration.jsse.TLSParameterJaxBUtils.getKeystoreProvider KEY_STORE_PROVIDER_NOT_SET
2013-06-11 11:24:22,748 FINE (EJB default - 35) org.apache.cxf.configuration.jsse.TLSParameterJaxBUtils.getKeystoreType KEY_STORE_TYPE_SET
2013-06-11 11:24:22,748 FINE (EJB default - 35) org.apache.cxf.configuration.jsse.TLSParameterJaxBUtils.getKeystoreProvider KEY_STORE_PROVIDER_NOT_SET
*2013-06-11 11:24:22,748 FINE (EJB default - 35) org.apache.cxf.transport.http.HTTPConduit.setTlsClientParameters Conduit '{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12.http-conduit' has been (re) configured for TLS keyManagers [sun.security.ssl.SunX509KeyManagerImpl@3677ef1]trustManagers [sun.security.ssl.X509TrustManagerImpl@7fbf01f5]secureRandom null*
*2013-06-11 11:24:22,748 FINE (EJB default - 35) org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean Successfully performed injection.*
2013-06-11 11:24:22,748 FINE (EJB default - 35) org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean Could not find a definition for bean with id {urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12.http-conduit - no injection will be performed.
2013-06-11 11:24:22,748 FINE (EJB default - 35) org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean Could not find a definition for bean with id https://localhost:8443/XDSRegistryWS/DocumentRegistry_Service - no injection will be performed.
2013-06-11 11:24:22,748 FINE (EJB default - 35) org.apache.cxf.transport.http.HTTPConduit.logConfig No Trust Decider configured for Conduit '{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12.http-conduit'
2013-06-11 11:24:22,758 FINE (EJB default - 35) org.apache.cxf.transport.http.HTTPConduit.logConfig No Auth Supplier configured for Conduit '{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12.http-conduit'
2013-06-11 11:24:22,758 FINE (EJB default - 35) org.apache.cxf.transport.http.HTTPConduit.logConfig Conduit '{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12.http-conduit' has been configured for TLS keyManagers *[sun.security.ssl.SunX509KeyManagerImpl@3677ef1]trustManagers [sun.security.ssl.X509TrustManagerImpl@7fbf01f5]secureRandom nullDisable Common Name (CN) Check: true*
*2) responding WebService (Async call mode, because of the presence of WS-Attributes
*
We see that no ' *org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean' step occured, hence the '*TLS keyManagers nulltrustManagers nullsecureRandom nullDisable Common Name (CN) Check: false'
2013-06-11 11:24:23,358 FINE (default-workqueue-2) org.apache.cxf.transport.http.HTTPConduit.setTlsClientParameters Conduit '{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12.http-conduit' has been (re) configured for TLS keyManagers nulltrustManagers nullsecureRandom null
2013-06-11 11:24:23,358 FINE (default-workqueue-2) org.apache.cxf.transport.http.HTTPConduit.logConfig No Trust Decider configured for Conduit '{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12.http-conduit'
2013-06-11 11:24:23,358 FINE (default-workqueue-2) org.apache.cxf.transport.http.HTTPConduit.logConfig No Auth Supplier configured for Conduit '{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12.http-conduit'
*2013-06-11 11:24:23,358 FINE (default-workqueue-2) org.apache.cxf.transport.http.HTTPConduit.logConfig Conduit '{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12.http-conduit' has been configured for TLS keyManagers nulltrustManagers nullsecureRandom nullDisable Common Name (CN) Check: false*
2013-06-11 11:24:23,358 FINE (default-workqueue-2) org.apache.cxf.transport.http.HTTPConduit.setMessageObserver registering incoming observer: org.apache.cxf.ws.addressing.impl.InternalContextUtils$2$1@359f34de
2013-06-11 11:24:23,358 FINE (default-workqueue-2) org.apache.cxf.interceptor.OutgoingChainInterceptor.getChain Interceptors contributed by bus: [org.apache.cxf.ws.policy.PolicyOutInterceptor@2db8eb3e]
2013-06-11 11:24:23,368 FINE (default-workqueue-2) org.apache.cxf.interceptor.OutgoingChainInterceptor.getChain Interceptors contributed by service: []
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/822617#822617]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 6 months
[jBPM] - Can't find persistence unit org.jbpm.domain in jbpm-console.war while setting up jBPM 6.0 Beta2 to use MySQL
by Samuele Mezzasalma
Samuele Mezzasalma [https://community.jboss.org/people/samuele_m] created the discussion
"Can't find persistence unit org.jbpm.domain in jbpm-console.war while setting up jBPM 6.0 Beta2 to use MySQL"
To view the discussion, visit: https://community.jboss.org/message/822477#822477
--------------------------------------------------------------
Hi everybody.
I'm a complete newbie for what concern business processes and jBPM so I ask for help.
I installed jBPM 6.0 Beta2 full installer but it's almost two weeks that I'm trying to set up jBPM 6.0 Beta2 to use MySQL and I haven't come up with anything.
I followed this 5.4 guide https://community.jboss.org/docs/DOC-48374#Set_up_MySQL Set up jBPM 5.4 Final Installer to use MySQL - or how to run section 3.7 of the User Guide but it didn't seem to work for me.
I closely followed these four steps:
h5. 1)Set up MySQL
mysql> CREATE SCHEMA IF NOT EXISTS jbpm5;
mysql> CREATE USER 'jbmp5'@'localhost' IDENTIFIED BY 'jbpm5';
mysql> GRANT ALL PRIVILEGES ON jbpm5.* TO 'jbpm5'@'localhost';
mysql> CREATE SCHEMA IF NOT EXISTS task;
mysql> CREATE USER 'task'@'localhost' IDENTIFIED BY 'task';
mysql> GRANT ALL PRIVILEGES ON task.* TO 'task'@'localhost;
h5. 2)Set up jBPM
h5.
h6. build.properties
h6. # data base related properties
db.driver.jar=${install.home}/db/driver/${db.driver.jar.name}
db.driver.module.dir=${jboss.home}/modules/${db.driver.module.prefix}/main/
# default is H2
# db.name=h2
# db.driver.jar.name=${db.name}.jar
# db.driver.download.url=http://repo1.maven.org/maven2/com/h2database/h2/${...
#other options are mysql
db.name=mysql
db.driver.module.prefix=com/mysql
db.driver.jar.name=${db.name}-connector-java.jar
db.driver.download.url=https://repository.jboss.org/nexus/service/local/r....
h6. build.xml
<!-- Start Demo (DB) -->
<target name="start.demo.db" depends="start.jboss, start.eclipse" />
<!-- Start Demo (DB, No Eclipse) -->
<target name="start.demo.db.noeclipse" depends="start.jboss" />
<!-- Stop Demo (DB)-->
<target name="stop.demo.db" depends="stop.jboss" />
h6. db/jbpm-persistence-JPA2.xml
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
h6. db/task-persistence-JPA2.xml
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
h6. standalone.xml
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
<connection-url>jdbc:mysql://localhost:3306/task</connection-url>
<driver>mysql</driver>
<security>
<user-name>task</user-name>
<password>task</password>
</security>
</datasource>
<datasource jta="true" jndi-name="java:jboss/datasources/jbpmDS" pool-name="H2DS" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:mysql://localhost:3306/jbpm6</connection-url>
<driver>mysql</driver>
<pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>4</max-pool-size>
<prefill>false</prefill>
<use-strict-min>false</use-strict-min>
<flush-strategy>FailingConnectionOnly</flush-strategy>
</pool>
<security>
<user-name>jbpm6</user-name>
<password>jbpm6</password>
</security>
<validation>
<check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
</datasource>
<datasource jta="true" jndi-name="java:jboss/datasources/BamAppDS" pool-name="BamAppDS" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:mysql://localhost:3306/jbpm6</connection-url>
<driver>mysql</driver>
<pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>4</max-pool-size>
<prefill>false</prefill>
<use-strict-min>false</use-strict-min>
<flush-strategy>FailingConnectionOnly</flush-strategy>
</pool>
<security>
<user-name>jbpm6</user-name>
<password>jbpm6</password>
</security>
<validation>
<check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
</datasource>
<drivers>
<driver name="mysql" module="com.mysql">
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
</driver>
</drivers>
h6. task-service/resources/META-INF/persistence.xml
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
<property name="hibernate.connection.driver_class" value="org.jdbc.Driver"/>
<property name="hibernate.connection.url" value="jdbc:mysql:://localhost:3306/task" />
<property name="hibernate.connection.username" value="task"/>
<property name="hibernate.connection.password" value="task"/>
<property name="hibernate.connection.autocommit" value="false" />
<property name="hibernate.max_fetch_depth" value="3"/>
<property name="hibernate.hbm2ddl.auto" value="create" />
<property name="hibernate.show_sql" value="false" />
h6. lib/jbpm-console-6.0.0.Beta2.war/WEB-INF/classes/META-INF/persistence.xml
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLialect" />
<property name="hibernate.max_fetch_depth" value="3" />
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.show_sql" value="false" />
<!-- BZ 841786: AS7/EAP 6/Hib 4 uses new (sequence) generators which seem to cause problems -->
<property name="hibernate.id.new_generator_mappings" value="false" />
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform" />
</properties>
h5. 3)Install jBPM
ant install.demo.noeclipse
h5. 4)Run the demo
ant start.demo.db.noeclipse
I attach to this post all modified files, server.log and jbpm-console.war log.
h6. jbpm-console.war.failed
{"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"jbpm-console.war\".WeldService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jbpm-console.war\".WeldService: org.jboss.weld.exceptions.DeploymentException: Exception List with 1 exceptions:
Exception 0 :
java.lang.IllegalArgumentException: JBAS016069: Error injecting persistence unit into CDI managed bean. Can't find a persistence unit named org.jbpm.domain in deployment jbpm-console.war
at org.jboss.as.weld.services.bootstrap.WeldJpaInjectionServices.getScopedPUName(WeldJpaInjectionServices.java:96)
at org.jboss.as.weld.services.bootstrap.WeldJpaInjectionServices.resolvePersistenceUnit(WeldJpaInjectionServices.java:78)
at org.jboss.weld.util.Beans.injectEEFields(Beans.java:631)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1$1.proceed(ManagedBean.java:160)
at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1.work(ManagedBean.java:157)
at org.jboss.weld.bean.ManagedBean$FixInjectionPoint.run(ManagedBean.java:131)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.inject(ManagedBean.java:153)
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:290)
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:107)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:616)
at org.jboss.weld.bean.AbstractReceiverBean.getReceiver(AbstractReceiverBean.java:73)
at org.jboss.weld.bean.ProducerMethod$1.produce(ProducerMethod.java:131)
at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:299)
at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:61)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:616)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:681)
at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:118)
at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:703)
at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:712)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1$1.proceed(ManagedBean.java:161)
at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1.work(ManagedBean.java:157)
at org.jboss.weld.bean.ManagedBean$FixInjectionPoint.run(ManagedBean.java:131)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.inject(ManagedBean.java:153)
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:290)
at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:61)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:616)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:681)
at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:118)
at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:703)
at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:712)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1$1.proceed(ManagedBean.java:161)
at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1.work(ManagedBean.java:157)
at org.jboss.weld.bean.ManagedBean$FixInjectionPoint.run(ManagedBean.java:131)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.inject(ManagedBean.java:153)
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:290)
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:107)
at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:90)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79)
at org.jbpm.services.task.impl.TaskDeadlinesServiceImpl$Proxy$_$$_WeldClientProxy.toString(TaskDeadlinesServiceImpl$Proxy$_$$_WeldClientProxy.java)
at org.kie.commons.services.cdi.StartupBeanExtension.runPostConstruct(StartupBeanExtension.java:81)
at org.kie.commons.services.cdi.StartupBeanExtension.afterDeploymentValidation(StartupBeanExtension.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:264)
at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:260)
at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)
at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51)
at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:154)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:241)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:229)
at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:207)
at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:75)
at org.jboss.weld.bootstrap.events.AbstractDeploymentContainerEvent.fire(AbstractDeploymentContainerEvent.java:46)
at org.jboss.weld.bootstrap.events.AfterDeploymentValidationImpl.fire(AfterDeploymentValidationImpl.java:31)
at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:369)
at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83)
at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
"},"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.web.deployment.default-host./jbpm-console.realmjboss.security.security-domain.jbpm-console-ngMissing[jboss.web.deployment.default-host./jbpm-console.realmjboss.security.security-domain.jbpm-console-ng]"]}}}
Anyone has any thought on this?
Any help will be appreciated.
Regards
Samuele Mezzasalma
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/822477#822477]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 6 months
[Datasource Configuration] - New-connection-sql Jboss
by Thiago Nascimento
Thiago Nascimento [https://community.jboss.org/people/tnas] created the discussion
"New-connection-sql Jboss"
To view the discussion, visit: https://community.jboss.org/message/818284#818284
--------------------------------------------------------------
Hi,
I'm trying to use the <new-connection-sql> tag in the Datasource to Oracle. I want to execute this query:
SET ROLE RL_USER_SELECT IDENTIFIED BY RL_USER_SELECT, RL_ACCESS_CONSULT IDENTIFIED BY RL_ACCESS_CONSULT;
before to return the connection to the user.
The problem is that Jbos doesn't execute this query! My datasource is:
<datasources>
<local-tx-datasource>
<jndi-name>MyAppDs</jndi-name>
<connection-url>jdbc:oracle:thin:@dbtest.org:1521:dadm</connection-url>
<user-name>usr</user-name>
<password>pass</password>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<min-pool-size>5</min-pool-size>
<max-pool-size>15</max-pool-size>
<idle-timeout-minutes>5</idle-timeout-minutes>
<track-statements/>
<prepared-statement-cache-size>100</prepared-statement-cache-size>
<new-connection-sql>
SET ROLE RL_USER_SELECT IDENTIFIED BY RL_USER_SELECT, RL_ACCESS_CONSULT IDENTIFIED BY RL_ACCESS_CONSULT;
</new-connection-sql>
</local-tx-datasource>
</datasources>
What am I doing wrong?
Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/818284#818284]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 6 months