[CONTROLLER-1045] Bundle update in karaf leads to frozen class exception of registered listener class Created: 25/Nov/14  Updated: 25/Jul/23  Resolved: 12/May/15

Status: Resolved
Project: controller
Component/s: mdsal
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Mario Willems Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: Text File bug.txt    
External issue ID: 2434

 Description   

Robert Varga asked me to fill for this. Refer: https://lists.opendaylight.org/pipermail/controller-dev/2014-November/007428.html

I get a frozen class RuntimeExeception (full exeption attached) if i
do a bundle update in karaf. The problem only occurs if i had
registered a notificationListener in my application.

Steps to Reproduce (code attached):
1.) In Activator register a Listener

  • Registration this.myLoggingEventListenerRegistration = notificationService.registerNotificationListener(new MyLoggingEventListener());
  • MyLoggingEventListener implements SalFlowListener
    2.) mvn clean install on project while bundle:watch * in karaf shell to update the bundle

Actual Results:

The first time i start my bundle in helium karaf-shell everything works
as aspected. I get the flowAdded notification, even if i stop karaf via
logout, delete the data folder and restart karaf, my bundle works for
the first time.

But if i change something in myapp (add log message) and do a mvn clean
install while bundle:watch in karaf, i get a java.lang.RuntimeException:
java.lang.RuntimeException:
org.opendaylight.openflowplugin.mytest.MyLoggingEventListener$$Broker$ListenerInvoker:
frozen class (cannot edit).

I used the ofplugin distribution for this test
(https://git.opendaylight.org/gerrit/p/openflowplugin.git, did checkout
stable/helium and a mvn clean install) but i also get the same error
when i use the karaf distribution from integration repo and deploy my
bundle via the deploy folder.

Expected Results:
For testing it would be nice if i do not have to resart my karaf distribution if i use notifications.

Build Date & Hardware
Fresh git clone of repos, Build 2014-11-25 on Ubuntu 14.04.1 LTS



 Comments   
Comment by Mario Willems [ 25/Nov/14 ]

Attachment bug.txt has been added with description: Exception, activator and listener class

Comment by Robert Varga [ 25/Nov/14 ]

Preliminary target, will be updated once we find the root cause.

Comment by Tony Tkacik [ 12/May/15 ]

Offending code was removed and replaced with java.lang.invoke implementation instead, which does not relly on class names but class identities.

https://git.opendaylight.org/gerrit/#/c/18820/

Generated at Wed Feb 07 19:54:32 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.