You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by lahami mariam <la...@gmail.com> on 2012/09/01 23:30:09 UTC

Exception in the Activator class when starting a wire admin bundle

hello

I receive such exception when starting an OSGi bundle :

Caused by: java.lang.ClassCastException:
org.apache.felix.wireadmin.Activator cannot be cast to
org.osgi.framework.BundleActivator
        at
org.apache.felix.framework.Felix.createBundleActivator(Felix.java:381
4)

What is the meaning of this error?

Best regards,
Meriam Lahami

Re: Exception in the Activator class when starting a wire admin bundle

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Typically, this means you've included OSGi packages in your bundle rather than importing them.


lahami mariam <la...@gmail.com> wrote:

>hello
>
>I receive such exception when starting an OSGi bundle :
>
>Caused by: java.lang.ClassCastException:
>org.apache.felix.wireadmin.Activator cannot be cast to
>org.osgi.framework.BundleActivator
>        at
>org.apache.felix.framework.Felix.createBundleActivator(Felix.java:381
>4)
>
>What is the meaning of this error?
>
>Best regards,
>Meriam Lahami

-- 
Sent from phone, please excuse my brevity.

Re: Exception in the Activator class when starting a wire admin bundle

Posted by lahami mariam <la...@gmail.com>.
Thanks for your reply  but i did not understand you remark clearly.
This is the structure of my pom file :

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>bundle</packaging>
<groupId>org.apache.felix</groupId>
<name>Apache Felix Wire Admin</name>
<artifactId>org.apache.felix.wireadmin</artifactId>
<version>0.9.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<version>4.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
<version>4.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Name>WireAdmin</Bundle-Name>
<Bundle-Vendor>The Apache Software Foundation</Bundle-Vendor>
<Bundle-Description>Implementation of the WireAdmin
Service.</Bundle-Description>
<Bundle-Activator>org.apache.felix.wireadmin.Activator</Bundle-Activator>
<Bundle-SymbolicName>org.apache.felix.wireadmin</Bundle-SymbolicName>
<Private-Package>org.apache.felix.wireadmin.*</Private-Package>
<Export-Package>org.osgi.service.wireadmin</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>

Can you give me other clarifications about this problem.

2012/9/1 lahami mariam <la...@gmail.com>

> hello
>
> I receive such exception when starting an OSGi bundle :
>
> Caused by: java.lang.ClassCastException:
> org.apache.felix.wireadmin.Activator cannot be cast to
> org.osgi.framework.BundleActivator
>         at
> org.apache.felix.framework.Felix.createBundleActivator(Felix.java:381
> 4)
>
> What is the meaning of this error?
>
> Best regards,
> Meriam Lahami
>
>
>


-- 
Cordialement,
Meriam LAHAMI
Doctorante
Unité de recherche ReDCAD
Département d’Informatique et de Mathématiques Appliquées
Ecole Nationale d'Ingénieurs de Sfax,  Tunisie