./run.sh -c all -Djboss.service.binding.set=ports-default -Djboss.messaging.ServerPeerID=1
./run.sh -c all2 -Djboss.service.binding.set=ports-02 -Djboss.messaging.ServerPeerID=2
./run.sh -c all -g DefaultPartition2 -b localhost -Djboss.service.binding.set=ports-02
./run.sh -c all -g DefaultPartition2 -b localhost -Djboss.service.binding.set=ports-01
./run.sh -c all -g DefaultPartition2 -b 127.0.0.1 "-Djboss.service.binding.set=ports-01 bind_addr=127.0.0.1"
-------------------------------------------------------------------------------------
You might run into an AOP error:
ERROR [Instrumentor] [warn] AOP Instrumentor failed to transform org.richfaces.ui.component.HighlightImpl
java.lang.RuntimeException: javassist.NotFoundException: com.uwyn.jhighlight.renderer.Renderer
at org.jboss.aop.pointcut.FieldMatcher.visit(FieldMatcher.java:113)
at org.jboss.aop.pointcut.ast.ASTField.jjtAccept(ASTField.java:44)
at org.jboss.aop.pointcut.FieldMatcher.visit(FieldMatcher.java:157)
at org.jboss.aop.pointcut.ast.ASTFieldExecution.jjtAccept(ASTFieldExecution.java:37)
at org.jboss.aop.pointcut.MatcherHelper.visit(MatcherHelper.java:89)
at org.jboss.aop.pointcut.MatcherHelper.matches(MatcherHelper.java:83)
at org.jboss.aop.pointcut.PointcutExpression.matchesGet(PointcutExpression.java:212)
at org.jboss.aop.instrument.JoinpointClassifier$1.matches(JoinpointClassifier.java:90)
at org.jboss.aop.instrument.JoinpointSimpleClassifier.classifyJoinpoint(JoinpointSimpleClassifier.java:63)
at org.jboss.aop.instrument.JoinpointClassifier.classifyFieldGet(JoinpointClassifier.java:227)
at org.jboss.aop.instrument.FieldAccessTransformer.buildFieldWrappers(FieldAccessTransformer.java:91)
at org.jboss.aop.instrument.Instrumentor.transform(Instrumentor.java:778)
at org.jboss.aop.instrument.GeneratedAdvisorInstrumentor.transform(GeneratedAdvisorInstrumentor.java:117)
at org.jboss.aop.SuperClassesFirstWeavingStrategy.instrumentClass(SuperClassesFirstWeavingStrategy.java:202)
at org.jboss.aop.SuperClassesFirstWeavingStrategy.translate(SuperClassesFirstWeavingStrategy.java:69)
at org.jboss.aop.AspectManager.translate(AspectManager.java:1077)
at org.jboss.aop.AspectManager.transform(AspectManager.java:1021)
at org.jboss.aop.standalone.AOPTransformer.aspectTransform(AOPTransformer.java:87)
at org.jboss.aop.standalone.AOPTransformer.transform(AOPTransformer.java:75)
Solution:
Modfiy /jboss-eap-5.1/jboss-as/server/all/conf/bootstrap/aop.xml:
You already changed the value from false to true (otherwise the error wouldn't have appeared)
Now you just have to add exclusion rules (otherwise those classes will try to be aspectized, but they do not have AOP support)
See also:
https://bmdsc.homeip.net/wiki/index.php/Java:JBoss
-----------------------------------------------------------
When setting up AOP, JGroups is enabled and will try to send out UDP messages:
ERROR [UDP] failed sending message to null (76 bytes)
java.lang.Exception: dest=/230.0.0.4:45688 (79 bytes)
at org.jgroups.protocols.UDP._send(UDP.java:361)
at org.jgroups.protocols.UDP.sendToAllMembers(UDP.java:302)
at org.jgroups.protocols.TP.doSend(TP.java:1478)
at org.jgroups.protocols.TP.send(TP.java:1468)
at org.jgroups.protocols.TP.down(TP.java:1186)
at org.jgroups.protocols.TP$ProtocolAdapter.down(TP.java:2308)
at org.jgroups.protocols.PING.sendMcastDiscoveryRequest(PING.java:278)
at org.jgroups.protocols.PING.sendGetMembersRequest(PING.java:259)
at org.jgroups.protocols.Discovery$PingSenderTask$1.run(Discovery.java:407)
at org.jgroups.util.TimeScheduler$RobustRunnable.run(TimeScheduler.java:196)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)
Caused by: java.io.IOException: Invalid argument
at java.net.PlainDatagramSocketImpl.send(Native Method)
at java.net.DatagramSocket.send(DatagramSocket.java:629)
at org.jgroups.protocols.UDP._send(UDP.java:352)
... 17 more
or
ERROR [MPING] failed sending discovery request
Solution:
https://jira.jboss.org/browse/JGRP-1161
https://jira.jboss.org/jira/browse/JGRP-777
https://jira.jboss.org/browse/JGRP-825
http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4701650
You will have to start multiple instances with the following option
jboss-eap-5.1/jboss-as/server/all/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
./run.sh -c all -Djboss.service.binding.set=ports-01 -Djboss.messaging.ServerPeerID=1
./run.sh -c all -Djboss.service.binding.set=ports-02 -Djboss.messaging.ServerPeerID=2
See also:
JGroups ports and addresses: http://community.jboss.org/wiki/SystemProps
--------------------------------------------------------------------------------------
Starting 2 jboss instances on same machine
Problem:
ERROR [AbstractKernelController] Error installing to Start: name=jboss:database=localDB,service=Hypersonic state=Create mode=Manual requiredState=Installed
java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@79409313[file =/home/rbrackma/middleware/jboss-eap-5.1/jboss-as/server/all/data/hypersonic/localDB.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: checkHeartbeat(): lock file [/home/rbrackma/middleware/jboss-eap-5.1/jboss-as/server/all/data/hypersonic/localDB.lck] is presumably locked by another process.
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.jdbcConnection.
at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
at org.hsqldb.jdbcDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:620)