I was using javax.naming.directory.SearchControls and had failed to import
javax.naming.directory in my manifest.mf, but had imported other
javax.naming packages (javax.naming ,javax.naming.event ,javax.naming.ldap
,javax.naming.spi), and no error was given at start or run time.

Adding the import for javax.naming.directory in manifest.mf fixed it, but
why no error?  In what circumstances will an error not occur at start time
and why would the code just silently fail at run time when trying to
instantiate the class?  I stepped thru the Eclipse debugger as well as added
logging statements and it was exhibiting bizarre behavior by not throwing
exceptions and apparently skipping lines of code and returning to the
calling method.

btw, I have two projects that have the same codebase except one is using a
pre-written manifest.mf and the other is using maven-bundle-plugin but in
the instructions --> Import-Package section I explicitly list the packages
that need to be imported (as opposed to using '*' and letting
maven-bundle-plugin/bnd resolve and import the dependencies).  In both
cases, the behavior was fixed when I added 'javax.naming.directory' to the
Import-Packages section.



--
View this message in context: 
http://karaf.922171.n3.nabble.com/disturbing-behavior-while-debugging-bundle-WAR-in-karaf-3-0-0-tp4032332.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to