[JBoss Messaging] - Re: Messaging bridge question
by Khurram Majeed
Khurram Majeed [http://community.jboss.org/people/kmajeed] created the discussion
"Re: Messaging bridge question"
To view the discussion, visit: http://community.jboss.org/message/577497#577497
--------------------------------------------------------------
Guys,
Were you able to resolve this issue? I am also getting the same exception which Chip got? Can you guys please help me in this?
JBoss.xml
======================================================
stat.deployment.cluster.jnp.url = jnp://node2_ip_address:1100/
<message-driven>
<ejb-name>OutBoundMDB</ejb-name>
<destination-jndi-name>${stat.deployment.cluster.jnp.url:}topic/OutboundIntegrationTopic</destination-jndi-name>
<resource-ref>
<res-ref-name>jms/ConnectionFactory</res-ref-name>
<jndi-name>${stat.deployment.cluster.jnp.url:}ConnectionFactory</jndi-name>
</resource-ref>
</message-driven>
======================================================
jms-ds.xml
======================================================
<mbean code="org.jboss.jms.jndi.JMSProviderLoader"
name="jboss.messaging:service=JMSProviderLoader,name=JMSProvider">
<attribute name="ProviderName">DefaultJMSProvider</attribute>
<attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
<attribute name="FactoryRef">/XAConnectionFactory</attribute>
<attribute name="QueueFactoryRef">/XAConnectionFactory</attribute>
<attribute name="TopicFactoryRef">/XAConnectionFactory</attribute>
<attribute name="Properties">
jnp.partitionName=StatPartition
</attribute>
</mbean>
<!-- JMS XA Resource adapter, use this to get transacted JMS in beans -->
<tx-connection-factory>
<jndi-name>JmsXA</jndi-name>
<xa-transaction/>
<rar-name>jms-ra.rar</rar-name>
<connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
<config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
<config-property name="JmsProviderAdapterJNDI" type="java.lang.String">/DefaultJMSProvider</config-property>
<max-pool-size>20</max-pool-size>
<security-domain-and-application>JmsXARealm</security-domain-and-application>
<depends>jboss.messaging:service=ServerPeer</depends>
</tx-connection-factory>
======================================================
I have deployed the application on 2 nodes, first nodes starts smoothly but this exception comes up when 2nd node is started. I have checked that node has joined the cluster
======================================================
[GroupMember] New Members : 2 ([192.168.128.215:55200, 192.168.128.131:55200])
[GroupMember] All Members : 2 ([192.168.128.215:55200, 192.168.128.131:55200])
======================================================
Can you please help me in this regard?
Khurram
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/577497#577497]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 6 months
[JBoss Messaging] - JMS - Cluster Issue
by Khurram Majeed
Khurram Majeed [http://community.jboss.org/people/kmajeed] created the discussion
"JMS - Cluster Issue"
To view the discussion, visit: http://community.jboss.org/message/577490#577490
--------------------------------------------------------------
I have setup a JBoss 5.0 Cluster with JMS Topic deployed in deploy-hasingleton, my first instance starts successfully but when second node starts i am getting this exception, one thing weird i have noticed is that sometimes second node starts smoothly, i dont get this exception - i had to retry 4-5 times to start the server. Can anyone help me in this?
Stacktrace:
javax.jms.InvalidDestinationException: No such destination: JBossTopic[MyMessage] has it been deployed?
at org.jboss.jms.server.endpoint.ServerSessionEndpoint.createConsumerDelegateInternal(ServerSessionEndpoint.java:1838)
at org.jboss.jms.server.endpoint.ServerSessionEndpoint.createConsumerDelegate(ServerSessionEndpoint.java:252)
at org.jboss.jms.server.endpoint.advised.SessionAdvised.org$jboss$jms$server$endpoint$advised$SessionAdvised$createConsumerDelegate$aop(SessionAdvised.java:94)
at
Khurram
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/577490#577490]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 6 months
[jBPM] - Re: jBPM 4.x on Glassfish
by Yogita Bartake
Yogita Bartake [http://community.jboss.org/people/YogitaBartake] created the discussion
"Re: jBPM 4.x on Glassfish"
To view the discussion, visit: http://community.jboss.org/message/572448#572448
--------------------------------------------------------------
We are facing the below error on Glassfish V2 with JBPM 4.1.
java.lang.IllegalStateException: Operation not allowed.
at com.sun.enterprise.distributedtx.UserTransactionImpl.checkUserTransactionMethodAccess(UserTransactionImpl.java:135)
at com.sun.enterprise.distributedtx.UserTransactionImpl.getStatus(UserTransactionImpl.java:262)
at org.jbpm.pvm.internal.tx.jta.JtaTransaction.getUserTransactionStatus(JtaTransaction.java:144)
at org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor.execute(JtaRetryInterceptor.java:43)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:46)
at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.java:66)
Hibernate configuration is as below.
<property name="hibernate.search.worker.execution">async</property>
<property name="hibernate.search.worker.buffer_queue.max">5</property>
<property name="hibernate.search.worker.thread_pool.size">5</property>
<property name="hibernate.transaction.flush_before_completion">true</property>
<property name="hibernate.transaction.auto_close_session">true</property>
<property name="jta.UserTransaction">java:comp/UserTransaction</property>
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
<property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.SunONETransactionManagerLookup</property>
<property name="hibernate.connection.provider_class">org.hibernate.connection.DatasourceConnectionProvider</property>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@10.141.152.34:1521:XA</property>
<property name="hibernate.connection.username">****</property>
<property name="hibernate.connection.password">****</property>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.format_sql">true</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<property name="current_session_context_class">thread</property>
<mapping resource="jbpm.repository.hbm.xml" />
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
<mapping resource="jbpm.identity.hbm.xml" />
We have tried adding jta.UserTransaction property in the jbpm.hibernate.cfg.xml file without any luck. Please let us know if there is any solution to this.
Thanks
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/572448#572448]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 6 months
[jBPM] - jBPM does not loads classes added in .bar file
by Shambhu Kumar Sinha
Shambhu Kumar Sinha [http://community.jboss.org/people/shambhu.sinha] created the discussion
"jBPM does not loads classes added in .bar file"
To view the discussion, visit: http://community.jboss.org/message/575618#575618
--------------------------------------------------------------
Hello,
I am configuring EJB call in jpdl as following
<java
ejb-jndi-name="company/project/module/UserAdmin"
method="getUserAdmin"
var="adminID">
<arg>
<object expr="#{ID}" />
</arg>
<transition to="PerfomSomeAction" />
</java>
And adding this process definition and client classes of EJB using ant build as following
<target depends="jbpm.libs.path">
<mkdir dir="${jbpm.home}/bardep/target" />
<jar destfile="${jbpm.home}/bardep/target/approval.bar">
<fileset dir="${jbpm.home}/bardep/target/classes">
</fileset>
</jar>
</target>
I am putting my all classes and process.jpdl.xml file inside classes directory as following
com/company/project/module/client/interfaces/UserAdminBeanRemote
process.jpdl.xml
This approval.bar is deploying correctly and also I am able to retrieve deployed classes using repositoryService.getResourceNames(deploymentDbid).
But these classes are not available in classpath by jBPM at runtime when call for ejb process is executed this is getting error as
Caused by: javax.naming.NamingException: Lookup failed for 'company/project/module/UserAdmin' in SerialContext [Root exception is javax.naming.NamingException: ejb ref resolution error for remote business interface com.company.project.module.client.interfaces.UserAdminBeanRemote [Root exception is java.lang.ClassNotFoundException: com.company.project.module.client.interfaces.UserAdminBeanRemote]
If I put jar of these classes in jBPM classpath then ejb is calling correctly.
Please help me if I need to do here anything so that all classes added in approval.bar deployment should load for ejb client and call should execute correctly.
Thanks in advance,
Shambhu
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/575618#575618]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 6 months
[JBoss Web Services] - WS-Security, < wsse:Security> Missing in client request
by Ravi Choudhari
Ravi Choudhari [http://community.jboss.org/people/ravichoudhari] created the discussion
"WS-Security, <wsse:Security> Missing in client request"
To view the discussion, visit: http://community.jboss.org/message/577450#577450
--------------------------------------------------------------
Hi,
I am trying to implement a secure webservice using WS-Security in
http://www.coderanch.com/forums/f-63/JBoss JBoss 5.1 following the steps in
http://www.developer.com/java/other/article.php/3802631/Securing-Web-Serv... http://www.developer.com/java/other/article.php/38...on-Server-with-WS-Se...,
On the server Side I have:
Service:
1. @WebService()
2. @MTOM
3. @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
4. @BindingType(value = javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING)
5. @HandlerChain(file = "META-INF/handlers/userlogin-services-handlers-server.xml")
6. @Stateless
7. @Clustered(loadBalancePolicy = "FirstAvailable", partition = "ClusterA")
8. @EndpointConfig(configName = "Standard WSSecurity Endpoint",
9. configFile = "META-INF/standard-jaxws-endpoint-config.xml")
10. @WebContext(authMethod = "BASIC", secureWSDLAccess = true)
11. @RolesAllowed("member")
12. public class UsersLoginServices {
13. @WebMethod(operationName = "userLogin")
14. public boolean userLogin(@WebParam(name = "userName") String userName,
15. @WebParam(name = "password") String password) {
16.
17. return usersLoginServices.userLogin(userName, password);
18. }
19. }
@WebService() @MTOM @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) @BindingType(value = javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING) @HandlerChain(file = "META-INF/handlers/userlogin-services-handlers-server.xml") @Stateless @Clustered(loadBalancePolicy = "FirstAvailable", partition = "ClusterA") @EndpointConfig(configName = "Standard WSSecurity Endpoint", configFile = "META-INF/standard-jaxws-endpoint-config.xml") @WebContext(authMethod = "BASIC", secureWSDLAccess = true) @RolesAllowed("member") public class UsersLoginServices { @WebMethod(operationName = "userLogin") public boolean userLogin(@WebParam(name = "userName") String userName, @WebParam(name = "password") String password) { return usersLoginServices.userLogin(userName, password); } }
standard-jaxws-endpoint-config.xml
1. <?xml version="1.0" encoding="UTF-8"?>
2.
3. <jaxws-config xmlns="urn:jboss:jaxws-config:2.0"
4. xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance" xmlns:javaee=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee"
5. xsi:schemaLocation="urn:jboss:jaxws-config:2.0 schema/jaxws-config_2_0.xsd">
6.
7. <endpoint-config>
8. <config-name>Standard WSSecurity Endpoint</config-name>
9. <post-handler-chains>
10. <javaee:handler-chain>
11. <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
12. <javaee:handler>
13. <javaee:handler-name>WSSecurity Handler</javaee:handler-name>
14. <javaee:handler-class>org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer</javaee:handler-class>
15. </javaee:handler>
16. </javaee:handler-chain>
17. </post-handler-chains>
18. </endpoint-config>
19.
20. </jaxws-config>
<?xml version="1.0" encoding="UTF-8"?> <jaxws-config xmlns="urn:jboss:jaxws-config:2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="urn:jboss:jaxws-config:2.0 schema/jaxws-config_2_0.xsd"> <endpoint-config> <config-name>Standard WSSecurity Endpoint</config-name> <post-handler-chains> <javaee:handler-chain> <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings> <javaee:handler> <javaee:handler-name>WSSecurity Handler</javaee:handler-name> <javaee:handler-class>org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer</javaee:handler-class> </javaee:handler> </javaee:handler-chain> </post-handler-chains> </endpoint-config> </jaxws-config>
jboss-wsse-server.xml
1. <?xml version="1.0" encoding="UTF-8"?>
2. <jboss-ws-security xmlns=" http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/config"
3. xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
4. xsi:schemaLocation=" http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
5.
6. <key-store-file>META-INF/server.keystore</key-store-file>
7. <key-store-password>mypassword</key-store-password>
8. <key-store-type>jks</key-store-type>
9.
10. <trust-store-file>META-INF/server.truststore</trust-store-file>
11. <trust-store-password>mypassword</trust-store-password>
12. <trust-store-type>jks</trust-store-type>
13.
14. <key-passwords>
15. <key-password alias="server" password="mypassword" />
16. </key-passwords>
17.
18. <config>
19. <timestamp ttl="300"/>
20. <sign type="x509v3" alias="serverkeys" includeTimestamp="true"></sign>
21. <encrypt type="x509v3" alias="clientkeys" algorithm="aes-256"
22. keyWrapAlgorithm="rsa_oaep" tokenReference="keyIdentifier"></encrypt>
23. <requires>
24. <!--<signature></signature>-->
25. <encryption></encryption>
26. </requires>
27. </config>
28. </jboss-ws-security>
<?xml version="1.0" encoding="UTF-8"?> <jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd"> <key-store-file>META-INF/server.keystore</key-store-file> <key-store-password>mypassword</key-store-password> <key-store-type>jks</key-store-type> <trust-store-file>META-INF/server.truststore</trust-store-file> <trust-store-password>mypassword</trust-store-password> <trust-store-type>jks</trust-store-type> <key-passwords> <key-password alias="server" password="mypassword" /> </key-passwords> <config> <timestamp ttl="300"/> <sign type="x509v3" alias="serverkeys" includeTimestamp="true"></sign> <encrypt type="x509v3" alias="clientkeys" algorithm="aes-256" keyWrapAlgorithm="rsa_oaep" tokenReference="keyIdentifier"></encrypt> <requires> <!--<signature></signature>--> <encryption></encryption> </requires> </config> </jboss-ws-security>
I have copied jboss-wsse-server.xml, standard-jaxws-endpoint-config.xml, server.keystore, server.truststore to META-INF directory of the server project.
And on the client side I have:
standard-jaxws-client-config.xml
1. <?xml version="1.0" encoding="UTF-8"?>
2.
3. <jaxws-config xmlns="urn:jboss:jaxws-config:2.0"
4. xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance" xmlns:javaee=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee"
5. xsi:schemaLocation="urn:jboss:jaxws-config:2.0 schema/jaxws-config_2_0.xsd">
6.
7. <client-config>
8. <config-name>Standard WSSecurity Client</config-name>
9. <post-handler-chains>
10. <javaee:handler-chain>
11. <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
12. <javaee:handler>
13. <javaee:handler-name>WSSecurityHandlerOutbound</javaee:handler-name>
14. <javaee:handler-class>org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient</javaee:handler-class>
15. </javaee:handler>
16. </javaee:handler-chain>
17. </post-handler-chains>
18. </client-config>
19.
20. </jaxws-config>
<?xml version="1.0" encoding="UTF-8"?> <jaxws-config xmlns="urn:jboss:jaxws-config:2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="urn:jboss:jaxws-config:2.0 schema/jaxws-config_2_0.xsd"> <client-config> <config-name>Standard WSSecurity Client</config-name> <post-handler-chains> <javaee:handler-chain> <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings> <javaee:handler> <javaee:handler-name>WSSecurityHandlerOutbound</javaee:handler-name> <javaee:handler-class>org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient</javaee:handler-class> </javaee:handler> </javaee:handler-chain> </post-handler-chains> </client-config> </jaxws-config>
jboss-wsse-client.xml
1. <?xml version="1.0" encoding="UTF-8"?>
2. <jboss-ws-security xmlns=" http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/config"
3. xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
4. xsi:schemaLocation=" http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
5.
6. <key-store-file>META-INF/client.keystore</key-store-file>
7. <key-store-password>mypassword</key-store-password>
8. <key-store-type>jks</key-store-type>
9.
10. <trust-store-file>META-INF/client.truststore</trust-store-file>
11. <trust-store-password>mypassword</trust-store-password>
12. <trust-store-type>jks</trust-store-type>
13.
14. <key-passwords>
15. <key-password alias="clientkyes" password="mypassword" />
16. </key-passwords>
17.
18. <config>
19. <sign type="x509v3" alias="clientkyes" includeTimestamp="true"></sign>
20. <encrypt type="x509v3" alias="serverkeys" algorithm="aes-256"
21. keyWrapAlgorithm="rsa_oaep" tokenReference="keyIdentifier"></encrypt>
22. <requires>
23. <!-- <signature></signature> -->
24. <encryption></encryption>
25. </requires>
26. </config>
27. </jboss-ws-security>
<?xml version="1.0" encoding="UTF-8"?> <jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd"> <key-store-file>META-INF/client.keystore</key-store-file> <key-store-password>mypassword</key-store-password> <key-store-type>jks</key-store-type> <trust-store-file>META-INF/client.truststore</trust-store-file> <trust-store-password>mypassword</trust-store-password> <trust-store-type>jks</trust-store-type> <key-passwords> <key-password alias="clientkyes" password="mypassword" /> </key-passwords> <config> <sign type="x509v3" alias="clientkyes" includeTimestamp="true"></sign> <encrypt type="x509v3" alias="serverkeys" algorithm="aes-256" keyWrapAlgorithm="rsa_oaep" tokenReference="keyIdentifier"></encrypt> <requires> <!-- <signature></signature> --> <encryption></encryption> </requires> </config> </jboss-ws-security>
Client Application:
1. @EndpointConfig(configName = "Standard WSSecurity Client")
2. public static void main(String[] args) throws MalformedURLException {
3.
4. public static void main(String[] args) throws MalformedURLException {
5. UsersLoginServicesService service = new UsersLoginServicesService();
6. UsersLoginServices port = service.getUsersLoginServicesPort();
7.
8. BindingProvider bindingProvider = (BindingProvider) port;
9. Map<String, Object> requestContext = bindingProvider
10. .getRequestContext();
11.
12. requestContext.put(BindingProvider.USERNAME_PROPERTY, "username");
13. requestContext.put(BindingProvider.PASSWORD_PROPERTY, "password");
14.
15. try {
16. boolean result = port.userLogin("username", "password");
17. // System.out.println(result);
18. if (result) {
19. System.out.println("Logged in");
20. } else {
21. System.out.println("Not logged in");
22. }
23. } catch (Exception ex) {
24. System.out.println(ex.getMessage());
25. }
26. }
27. }
@EndpointConfig(configName = "Standard WSSecurity Client") public static void main(String[] args) throws MalformedURLException { public static void main(String[] args) throws MalformedURLException { UsersLoginServicesService service = new UsersLoginServicesService(); UsersLoginServices port = service.getUsersLoginServicesPort(); BindingProvider bindingProvider = (BindingProvider) port; Map<String, Object> requestContext = bindingProvider .getRequestContext(); requestContext.put(BindingProvider.USERNAME_PROPERTY, "username"); requestContext.put(BindingProvider.PASSWORD_PROPERTY, "password"); try { boolean result = port.userLogin("username", "password"); // System.out.println(result); if (result) { System.out.println("Logged in"); } else { System.out.println("Not logged in"); } } catch (Exception ex) { System.out.println(ex.getMessage()); } } }
I have copied standard-jaxws-client-config.xml, jboss-wsse-client.xml and client.keystore, client.truststore to META-INF directory of the client.
But, When there is request from the client, I am getting the following Execption.
Exception in thread "main"
http://download.oracle.com/javase/6/docs/api/javax/xml/ws/soap/SOAPFaultE... javax.xml.ws.soap.SOAPFaultException: This service requires <wsse:Security>, which is missing.
I have checked the request SOAP message & response messages, The client is not adding any <wsse:Security>, which is expected by the server.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/577450#577450]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 6 months