[
https://issues.apache.org/jira/browse/KARAF-3787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jean-Baptiste Onofré resolved KARAF-3787.
-----------------------------------------
Resolution: Not A Problem
> Classes are not updated after bundle redeploy
> ---------------------------------------------
>
> Key: KARAF-3787
> URL: https://issues.apache.org/jira/browse/KARAF-3787
> Project: Karaf
> Issue Type: Bug
> Affects Versions: 4.0.0.M3
> Reporter: viasyn
> Attachments: karaf_class_unloading.png
>
>
> I have a simple bundle.
> I installed and started it and it works.
> When I rebuild it with some changes, then reinstall it:
> {code}
> uninstall com.demo.*
> install
> http://localhost:8081/nexus/content/repositories/obr-local/com/demo/discovery-dns_2.11/1.0-SNAPSHOT/discovery-dns_2.11-1.0-SNAPSHOT.jar
> {code}
> It reinstalls successfully, but when I'm checking for new behaviour I found
> the old one.
> Looks like classes was not reloaded.
> This problem is really bothers me, because I'm trying to implement logic
> dynamically reconfiguring server roles.
> Here is my bundle's manifest. Note that I modifying class in private-package
> (but for export-package problem remains)
> {code}
> Manifest-Version: 1.0
> Bnd-LastModified: 1434359055159
> Bundle-Activator: com.demo.cluster.discovery.dns.osgi.export.Activator
> Bundle-ManifestVersion: 2
> Bundle-Name: com.demo.discovery.dns
> Bundle-SymbolicName: com.demo.discovery.dns
> Bundle-Version: 1.0.0.SNAPSHOT
> Created-By: 1.8.0_45 (Oracle Corporation)
> Export-Package: com.demo.cluster.discovery.dns.osgi.export;uses:="c
> om.typesafe.scalalogging,org.osgi.framework,org.xbill.DNS,scala,scala.r
> eflect,scala.runtime";version="1.0.0.SNAPSHOT"
> Import-Package: scala;version="[2.11,2.12)",scala.collection;version="[2
> .11,2.12)",scala.collection.immutable;version="[2.11,2.12)",scala.colle
> ction.mutable;version="[2.11,2.12)",scala.reflect;version="[2.11,2.12)"
> ,scala.runtime;version="[2.11,2.12)",scala.util;version="[2.11,2.12)",c
> om.typesafe.scalalogging;version="[3.2,4)",io.netty.bootstrap;version="
> [5.0,6)",io.netty.buffer;version="[5.0,6)",io.netty.channel;version="[5
> .0,6)",io.netty.channel.nio;version="[5.0,6)",io.netty.channel.socket;v
> ersion="[5.0,6)",io.netty.channel.socket.nio;version="[5.0,6)",io.netty
> .handler.codec;version="[5.0,6)",io.netty.handler.logging;version="[5.0
> ,6)",io.netty.util.concurrent;version="[5.0,6)",org.osgi.framework;vers
> ion="[1.7,2)",org.slf4j;version="[1.7,2)",org.xbill.DNS;version="[2.1,3
> )"
> Private-Package: com.demo.cluster.discovery.dns
> Service-Component: OSGI-INF/com.demo.cluster.discovery.dns.osgi.exp
> ort.DProv.xml,OSGI-INF/com.demo.cluster.discovery.dns.osgi.export.
> DNSServerComponent.xml
> Tool: Bnd-2.1.0.20130426-122213
> {code}
> {code}
> karaf@root()> info
> Karaf
> Karaf version 4.0.0.M3
> Karaf home /home/viasyn/work/bin/apache-karaf-4.0.0.M3
> Karaf base /home/viasyn/work/bin/apache-karaf-4.0.0.M3
> OSGi Framework org.apache.felix.framework-5.0.0
> JVM
> Java Virtual Machine Java HotSpot(TM) 64-Bit Server VM version
> 25.45-b02
> Version 1.8.0_45
> Vendor Oracle Corporation
> Pid 29445
> Uptime 16 minutes
> Total compile time 10.621 seconds
> Threads
> Live threads 64
> Daemon threads 57
> Peak 65
> Total started 99
> Memory
> Current heap size 51,473 kbytes
> Maximum heap size 466,432 kbytes
> Committed heap size 248,320 kbytes
> Pending objects 0
> Garbage collector Name = 'PS Scavenge', Collections = 6, Time =
> 0.479 seconds
> Garbage collector Name = 'PS MarkSweep', Collections = 2, Time =
> 0.147 seconds
> Classes
> Current classes loaded 6,031
> Total classes loaded 6,031
> Total classes unloaded 0
> Operating system
> Name Linux version 4.0.4-gentoo-00
> Architecture amd64
> Processors 4
> {code}
> Related discussion in mailing list:
> http://karaf.922171.n3.nabble.com/ClassNotFoundException-after-bundle-redeploy-td4040920.html
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)