Tag cloud

JBoss (16) Fedora (5) Linux (4) Red Hat (4) JON (3) command line (3) 4.3 (2) JEE (2) JVM (2) Java (2) KVM (2) Oracle (2) Portal (2) Weblogic (2) installation (2) vs (2) /boot partition (1) Add-ons (1) Apache (1) Bundles (1) Business model (1) Byteman (1) CLASSPATH (1) EAP (1) EPP (1) Eclipse (1) Failover (1) Gnome (1) JAVA_OPTS (1) JBDS (1) JBoss Tools (1) JBossON (1) JConsole (1) JDK (1) JMS (1) JVM options (1) KDE (1) MBean (1) Network (1) Open Source (1) RHQ (1) Red Hat subscription (1) Thunderbird (1) Troubleshooting (1) Virtulization (1) WS (1) Webservices (1) Wireshark (1) classloading (1) clustering (1) comparison (1) debug (1) deployment (1) disable SELinux (1) disksize (1) error (1) fun (1) jboss.org (1) log (1) log4j (1) lvm (1) messaging (1) multiple WARs (1) patent FOSS (1) performance tuning (1) provisionning (1) scripting (1) services (1) switch (1) troll (1) upgrade (1) video (1) war (1) webapp (1) yum (1)

15 November 2010

Using POJOCache with AOP - Troubleshooting

Staring:

./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)
true
Now you just have to add exclusion rules (otherwise those classes will try to be aspectized, but they do not have AOP support)
org.jboss.,org.richfaces.ui.,com.uwyn.jhighlight.

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.(Unknown Source)
at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
at org.hsqldb.jdbcDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:620)

No comments:

Post a Comment