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