[JBoss Messaging] New message: "Problem with the bridge reconnecting to remote topic."
by Andrian Belinschi
User development,
A new message was posted in the thread "Problem with the bridge reconnecting to remote topic.":
http://community.jboss.org/message/521809#521809
Author : Andrian Belinschi
Profile : http://community.jboss.org/people/abelinschi
Message:
--------------------------------------------------------------
Hello all,
I need some helpin understanding what is going on with the message bridge connectedbetween a local queue and a remote topic. The bridge is configured touse durable subscriptions and to absorb messages from the remote topicand send them to the local queue. If the remote JBoss node is 'down'then the bridge suppose to retry to establish a connection. Everything is working as expected. Whathappens is that, sometimes, when the remote JBoss instance is down fora long time then the bridge connects to the local JBoss instanceinstead and creates the subscription on the local topic which iswrong (it should only connect to the specified IP address).
Any idea why that happens?
Here is my configuration:
Both nodes are running JBoss 5.1.0 GA with JBoss messaging 1.4.6 and JBoss remoting 2.5.2.SP1
Iam running two clusters 'Cluster1' and 'Cluster2'. Each cluster isconfiguring for using 'tcp'. Jboss messaging is using Oracle forpersistence, it is configured to use 'tcp' for both JBM control andJBM data channels, the post office is clustered.
A clustered topic 'DataTopic' deployed to both 'Cluster1' and 'Cluster2'.
A clsutered queue 'DataQueue' deployed to both Cluster1 and Cluster2
Each cluster is running 6 JBoss instances. All of the nodes cluster correctly.
The Bridge is deployed on Cluster1 as a singleton andshould absorb messages from 'DataTopic' on Cluster2 and send them tothe local 'DataQueue' on Cluster1.
*Here are some of environment variables passed to each JBoss instances*:
-Djboss.messaging.ServerPeerID=${SERVER_PEER_ID}"
-Djboss.partition.name=cfssys -Djboss.messaging.groupname=cluster1
-Djboss.service.binding.set=${PORTS_VAR}"
-Djboss.default.jgroups.stack=tcp
-Djgroups.tcpping.initial_hosts=10.1.22.110[7600],10.1.22.111[7600],10.1.22.112[7600],10.1.22.113[7600],10.1.22.114[7600],10.1.22.115[7600]"
*Here is the bridge file deployed to ' appserver/server/all/deploy-hasingleton/' location:*
<?xml version="1.0" encoding="UTF-8"?>
<mbean code="org.jboss.jms.server.bridge.BridgeService" name="jboss.messaging:service=Bridge,name=SyncInBridge" xmbean-dd="xmdesc/Bridge-xmbean.xml">
<depends optional-attribute-name="SourceProviderLoader">jboss.messaging:service=JMSProviderLoader,name=RemoteCluster2</depends>
<depends optional-attribute-name="TargetProviderLoader">jboss.messaging:service=JMSProviderLoader,name=JMSProvider</depends>
<attribute name="SourceDestinationLookup">/topic/DataTopic</attribute>
<attribute name="TargetDestinationLookup">/queue/DataQueue</attribute>
<attribute name="SourceUsername">user</attribute>
<attribute name="SourcePassword">pass</attribute>
<attribute name="QualityOfServiceMode">2</attribute>
<attribute name="MaxBatchSize">10</attribute>
<attribute name="MaxBatchTime">5000</attribute>
<attribute name="SubName">SubCluster2</attribute>
<attribute name="ClientID">222</attribute>
<attribute name="FailureRetryInterval">60000</attribute>
<attribute name="MaxRetries">-1</attribute>
<attribute name="AddMessageIDInHeader">false</attribute>
</mbean>
*Here are my JMS provider definitions (jms-ds.xml):*
<!-- 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">java:/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>
<!-- Remote JMS Provider -->
<mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="jboss.messaging:service=JMSProviderLoader,name=RemoteCluster2">
<attribute name="ProviderName">RemoteCluster2</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">
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=jnp://10.2.22.68:1199
</attribute>
</mbean>
The *'remoting-bisocket-service.xml'* has not been changed and it is the same as the one shipped with JBoss 5.10. GA
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/521809#521809
16 years, 3 months
[EJB 3.0] New message: "Problem deploying EJB 3.0 jar to JBoss 5.0.1 GA"
by Viktor Halitsyn
User development,
A new message was posted in the thread "Problem deploying EJB 3.0 jar to JBoss 5.0.1 GA":
http://community.jboss.org/message/521795#521795
Author : Viktor Halitsyn
Profile : http://community.jboss.org/people/vhalitsyn
Message:
--------------------------------------------------------------
I have a simple EJB 3.0 jar I want to deploy to JBoss.
I am using next persistance.xml configuration file
<persistence>
<persistence-unit name="MyCompanyEntityManager">
<jta-data-source>java:/MyCompanyDS</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
</properties>
</persistence-unit>
</persistence>
which is intended to use next JNDI database
<datasources>
<local-tx-datasource>
<jndi-name>MyCompanyDS</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/testdb</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
<password>root</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
To use the entity managet I use the next code snippet
protected EntityManager _em;
@PersistenceContext(unitName = Constants.ENTITY_MANAGER_NAME)
void setEm(EntityManager em) {
_log.info(getServiceCassName() + ": Entity Manager acquired");
_em = em;
}
where
public static final String ENTITY_MANAGER_NAME = "MyCompanyEntityManager";
When I deploy the jar to Jboss I get the following exception:
18:10:30,278 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/C:/Projects/Java/Test/TestWebApp/testproject-maven-j2ee/model-ejb/target/model-ejb.jar/ state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Error deploying model-ejb.jar: Container jboss.j2ee:jar=model-ejb.jar,name=TestTableServiceImpl,service=EJB3 failed to resolve persistence unit MyCompanyEntityManager
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:201)
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:103)
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:830)
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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
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.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:270)
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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
at org.jboss.jmx.connector.invoker.SerializableInterceptor.invoke(SerializableInterceptor.java:74)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:180)
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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:855)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:422)
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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalArgumentException: Container jboss.j2ee:jar=model-ejb.jar,name=TestTableServiceImpl,service=EJB3 failed to resolve persistence unit MyCompanyEntityManager
at org.jboss.injection.PersistenceUnitHandler.addPUDependency(PersistenceUnitHandler.java:135)
at org.jboss.injection.PersistenceContextHandler.loadXml(PersistenceContextHandler.java:76)
at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:588)
at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:415)
at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:523)
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:194)
... 70 more
Caused by: java.lang.IllegalArgumentException: Can't find a persistence unit named 'MyCompanyEntityManager' in AbstractVFSDeploymentContext@10940133{vfszip:/C:/Projects/Java/Test/TestWebApp/testproject-maven-j2ee/model-ejb/target/model-ejb.jar/}
at org.jboss.jpa.resolvers.BasePersistenceUnitDependencyResolver.resolvePersistenceUnitSupplier(BasePersistenceUnitDependencyResolver.java:107)
at org.jboss.ejb3.Ejb3Deployment.resolvePersistenceUnitSupplier(Ejb3Deployment.java:720)
at org.jboss.ejb3.EJBContainer.resolvePersistenceUnitSupplier(EJBContainer.java:1428)
at org.jboss.injection.PersistenceUnitHandler.addPUDependency(PersistenceUnitHandler.java:130)
... 75 more
18:10:30,278 WARN [MainDeployer] Failed to deploy: file:/C:/Projects/Java/Test/TestWebApp/testproject-maven-j2ee/model-ejb/target/model-ejb.jar
org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
*** DEPLOYMENTS IN ERROR: Name -> Error
Everything seams to be configured OK, please help.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/521795#521795
16 years, 3 months
[jBPM] New message: "Re: jbpm 4: Can't complete task in HSQLDB and DERBY"
by Jan Scherf
User development,
A new message was posted in the thread "jbpm 4: Can't complete task in HSQLDB and DERBY":
http://community.jboss.org/message/521787#521787
Author : Jan Scherf
Profile : http://community.jboss.org/people/JanScherf
Message:
--------------------------------------------------------------
The reason of this problem can be found in org.jbpm.pvm.internal.id.DatabaseIdComposer.createId(...) which is called in org.jbpm.pvm.internal.model.ExecutionImpl.save() to initialize ExecutionImpl.dbid. Property dbid is mapped to database table JBPM4_EXECUTION (see: jbpm.execution.hbm.xml). As you can see in sql-files in ${jbpm.home}/src/db/create, the database-field-datatype of property DBID_ is a kind og integer. But DatabaseIdComposer.createId(...) produces String ...
Workaround (worked fine for me):
Use integer-values as "key" in you processdefinition.
e.g. use <process description="myDescription" key="123" name="myProcess" version="0" xmlns="http://jbpm.org/4.3/jpdl">
instead of <process description="myDescription" key="anyString" name="myProcess" version="0" xmlns="http://jbpm.org/4.3/jpdl">
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/521787#521787
16 years, 3 months