ClassCastException in ServiceTango open source for OSGi and similiar to JES
I tried to excute bundle Club of JES tutorial in ServiceTango for a while.
But I couldn't.
I wrote the code for Club bundle exactly same with JES tutorial(p17).
And I had command start bundle Club in ServiceTango.
As u know ServiceTango couldn't excute Club.
I can't understand why this problem exist.
Is there any problem casting below code?
Don't support 'Using Another Service' in ServiceTango?
Finally, Is there any site for ServiceTango in activity.
I know servicetango in sorceforge. But, there don't have any activity.
Thanks...
Jeongpyo
>>See below
This is error output
-
Error starting bundle '11'
org.servicetango.core.STException: ; nested exception is:
org.servicetango.core.STException: ; nested exception is:
org.servicetango.core.STException: Failed to start bundle 'file:D:\HOMENET\WORK\osgi\mywork\bundle\club2.jar'; nested exception is:
java.lang.ClassCastException
org.servicetango.core.STException: ; nested exception is:
org.servicetango.core.STException: Failed to start bundle 'file:D:\HOMENET\WORK\osgi\mywork\bundle\club2.jar'; nested exception is:
java.lang.ClassCastException
org.servicetango.core.STException: Failed to start bundle 'file:D:\HOMENET\WORK\osgi\mywork\bundle\club2.jar'; nested exception is:
java.lang.ClassCastException
java.lang.ClassCastException
java.lang.Throwable()
java.lang.Exception()
java.lang.RuntimeException()
java.lang.ClassCastException()
void club2.Activator.start(org.osgi.framework.BundleContext)
void club2.Activator.start(org.osgi.framework.BundleContext)
void org.servicetango.core.BundleManager.startBundle(long)
void org.servicetango.startup.ServiceTango$6.run(java.lang.String [])
void org.servicetango.startup.ServiceTango.run()
void org.servicetango.startup.ServiceTango.main(java.lang.String [])
-
Follow code create exception.
public void start(org.osgi.framework.BundleContext ctxt) throws BundleException {
try{
ServiceReference[] ref = ctxt.getServiceReferences("greeting2.service.GreetingService", "(description=casual)");
GreetingService greetingSvc = (GreetingService) ctxt.getService(ref[0]);//this crete exception
greetingSvc.greet("Bill", "Gates", "Chairman");
}
This is manifest for club
Bundle-Activator: club.ClubActivator
Import-Package: greeting2.service

