This conversation has been locked due to inactivity. Please create a new post.
This conversation has been locked due to inactivity. Please create a new post.
Hey Guys ,
I was trying to implement logging on replication events like, when my page is activated on author instance I would log the page name in logs . My Java code which is deployed as a bundle implements EventHandler and overrides handleEvent method . I initially tested it with skeleton code and I was able to log events . When I tried modifying the code to get handle to SlingRepository via @reference annotation I get the following error in logs :
java.lang.VerifyError: Expecting a stackmap frame at branch target 13 in method com.training.ReplicationLogger.unbindRepository(Lorg/apache/sling/jcr/api/SlingRepository;)V at offset 5 ,
Has any one faced such error before ? I'm creating and installing bundle from CRXDE (Tried several times by freshly installing the bundle , but received the same error)
Java code : @SuppressWarnings("deprecation") @Service(value = EventHandler.class) @Component(immediate = true) @Property(name = "event.topics", value = ReplicationAction.EVENT_TOPIC) public class ReplicationLogger implements EventHandler, JobProcessor { private static final Logger LOGGER = LoggerFactory .getLogger(ReplicationLogger.class); @Reference private SlingRepository repository; public void handleEvent(Event event) { LOGGER.debug("********handling event"); process(event); } public boolean process(Event event) { LOGGER.debug("********processing job"); return true; } Thanks in advance for your pointers . cheers
Solved! Go to Solution.
This is a JDK version compatibility issue - if you google your error "Java.lang.VerifyError: Expecting a stackmap frame at branch target", there are lots of results that explain the background and workarounds. The short answer is to build with JDK 6 or to use the JVM parameter "-XX:-UseSplitVerifier
"
This is a JDK version compatibility issue - if you google your error "Java.lang.VerifyError: Expecting a stackmap frame at branch target", there are lots of results that explain the background and workarounds. The short answer is to build with JDK 6 or to use the JVM parameter "-XX:-UseSplitVerifier
"
Hi ,
I added the Jvm parameter in CRXDE , but it still complained . However when i tried the same from Eclipse it worked . Thanks for the pointers .
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies