dev@glassfish.java.net

Re: osgi question

From: Justin Lee <justin.d.lee_at_oracle.com>
Date: Tue, 18 May 2010 13:03:25 -0400

Yeah, DummyProtocolFinder implements ProtocolFinder. When I print out
the CLs i see the bundle numbers for each bundle. I'll try printing out
the classloader for the classes in DummyProtocolFinder.getInterfaces().

On 5/18/10 10:47 AM, Richard S. Hall wrote:
> Does DummyProtocolFinder extend/implement ProtocolFinder directly or
> is it indirectly?
>
> Check the class loader of ProtocolFinder.
>
> -> richard
>
> On 5/18/10 10:39, Justin Lee wrote:
>> I'm attempting to create an osgi bundle in a devtest and running into
>> an issue. The bundle I create seems OK as far as the basics are
>> concerned. I can deploy it and I don't get complaints from felix but
>> I'm getting a ClassCastException at runtime:
>>
>> java.lang.ClassCastException:
>> org.glassfish.devtests.web.portunif.DummyProtocolFinder cannot be
>> cast to com.sun.grizzly.portunif.ProtocolFinder
>> at
>> com.sun.grizzly.config.GrizzlyEmbeddedHttp.configureProtocol(GrizzlyEmbeddedHttp.java:306)
>>
>> at
>> com.sun.grizzly.config.GrizzlyEmbeddedHttp.configure(GrizzlyEmbeddedHttp.java:237)
>>
>> at
>> com.sun.grizzly.config.GrizzlyServiceListener.initializeListener(GrizzlyServiceListener.java:101)
>>
>> at
>> com.sun.grizzly.config.GrizzlyServiceListener.configure(GrizzlyServiceListener.java:86)
>>
>>
>>
>> The actual line of code is:
>>
>> ProtocolFinder protocolFinder = (ProtocolFinder)
>> newInstance(finderClassname);
>>
>> My MANIFEST.MF looks like:
>>
>> Manifest-Version: 1.0
>> Ant-Version: Apache Ant 1.7.1
>> Created-By: 14.3-b01-101 (Apple Inc.)
>> Export-Package: org.glassfish.devtests.web.portunif
>> Bundle-Name: port-unification-devtest
>> Bundle-Version: 1.0
>> Bundle-ManifestVersion: 2
>> Import-Package: com.sun.grizzly,com.sun.grizzly.portunif,com.sun.grizz
>> ly.config,com.sun.grizzly.config.dom,com.sun.grizzly.filter,com.sun.g
>> rizzly.http
>> Bundle-SymbolicName: org.glassfish.devtests.web.portunif
>> Bundle-DocURL: http://www.oracle.com
>>
>>
>> I'm not sure what I'm missing. Can someone steer me in the right
>> direction?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>