NoClassDefFoundError if class is accessed second time [message #1449036] |
Mon, 20 October 2014 16:42  |
Eclipse User |
|
|
|
Hi all,
I've converted the JavaMoney sources (JSR 354) into two plugins
(javamoney-api and javamoney-ri). Now, if I access a class which is
inside javamoney-ri this class is found (but raises an other error
because something else isn't found). But if I want to access this same
class for a second time, I get a NoClassDefFoundError. Don't know why.
The bundles are active.
Here are the MANIFESTs:
for javamoney-ri:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: jsr354-ri
Bundle-SymbolicName: jsr354-ri;singleton:=true
Bundle-Version: 1.0.0.qualifier
Export-Package: org.javamoney.moneta,
org.javamoney.moneta.convert,
org.javamoney.moneta.format,
org.javamoney.moneta.function,
org.javamoney.moneta.spi
Require-Bundle: jsr354-api;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
and for javamoney-api:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: jsr354-api
Bundle-SymbolicName: jsr354-api;singleton:=true
Bundle-Version: 1.0.0.qualifier
Export-Package: javax.money,
javax.money.convert,
javax.money.format,
javax.money.spi
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Would be glad if anyone could explain this phenomena...
Greets,
Ralf.
|
|
|
Re: NoClassDefFoundError if class is accessed second time [message #1449338 is a reply to message #1449036] |
Tue, 21 October 2014 03:47  |
Eclipse User |
|
|
|
Ok, I found my mistake. The bundle classes were not accessible (although I've thought it) and therefore they couldn't be fount. Additionally, the current JavaMoney classes are not useable in an OSGi environment, since they use some service mechanism which are different in OSGi. I'll try to fix it.
Ralf.
|
|
|
Powered by
FUDForum. Page generated in 0.04371 seconds