Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » General (non-technical) » Test » Eclipse plug-in: Invalid Activator
Eclipse plug-in: Invalid Activator [message #9263] Thu, 27 September 2007 14:34 Go to next message
Eclipse UserFriend
Originally posted by: slider161.hotmail.com

I am writing an Ant script to run a JUnit test suite within an Eclipse
plug-in and generate a JUnit report outside of Eclipse. I am referring to
this tutorial http://dev.eclipse.org/viewcvs/index.cg ... ision=1.4. I
have written a test.xml file for my plug-in
which uses the org.eclipse.test library.xml file run the suite and
generate a report.

I am getting an error "org.osgi.framework.BundleException: The activator
com.propylon.core.tests.Activator for bundle com.propylon.core.Test is
invalid"

I have checked that all the require plug-ins are loaded in eclipse.
The Activator class autmatically generated when i created the plug-in,
yet it seems ok.
the manifest file seem to be correct.

Are there any other common causes for this error, and what are they?

Below is my Activator class.

Code:


package com.propylon.core.tests;

import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {

// The plug-in ID
public static final String PLUGIN_ID = "com.propylon.core.tests";

// The shared instance
private static Activator plugin;

/**
* The constructor
*/
public Activator() {
}

/*
* (non-Javadoc)
* @see
org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framew ork.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}

/*
* (non-Javadoc)
* @see
org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framewo rk.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}

/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}

}



Below is the Manifest file

Code:


Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: TestsPlug-in
Bundle-SymbolicName: com.propylon.core.Test;singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: com.propylon.core.tests.Activator
Bundle-Vendor: PROPYLON
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
com.propylon.core.repository,
org.eclipse.core.resources,
org.tmatesoft.svnkit,
org.eclipse.ui.navigator,
org.junit
Eclipse-LazyStart: true
Bundle-ClassPath: junit.plugin.jar,
.
Export-Package: com,
com.propylon,
com.propylon.core,
com.propylon.core.tests,
com.propylon.core.tests.testcase,
com.propylon.core.tests.testsuite,
org.eclipse.tptp.test.tools.junit.plugin.internal;x-internal :=true,
org.eclipse.tptp.test.tools.junit.plugin.internal.harness;x- internal:=true,
org.eclipse.tptp.test.tools.junit.plugin.internal.launch;x-i nternal:=true,
org.eclipse.tptp.test.tools.junit.plugin.internal.modelsync; x-internal:=true,
org.eclipse.tptp.test.tools.junit.plugin.internal.resources; x-internal:=true,
org.eclipse.tptp.test.tools.junit.plugin.internal.util;x-int ernal:=true,
org.eclipse.tptp.test.tools.junit.plugin.util

Are there any obvious flawes with my code that my be causing the problem?

thank you for your time.

slider

P.S. I am new to this newsgroup, and apologise if this post is in the
wrong forum.
Re: Eclipse plug-in: Invalid Activator [message #9286 is a reply to message #9263] Thu, 27 September 2007 15:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Slider,

No one answers questions here. This newsgroup is just for testing
whether you can properly post to an Eclipse newsgroup. You should post
to the platform newsgroup. Does it make sense that you have a UI
Plugin? If Ant is running without a UI that probably won't work.


slider161 wrote:
> I am writing an Ant script to run a JUnit test suite within an Eclipse
> plug-in and generate a JUnit report outside of Eclipse. I am referring
> to this tutorial http://dev.eclipse.org/viewcvs/index.cg ...
> ision=1.4. I have written a test.xml file for my plug-in
> which uses the org.eclipse.test library.xml file run the suite and
> generate a report.
>
> I am getting an error "org.osgi.framework.BundleException: The
> activator com.propylon.core.tests.Activator for bundle
> com.propylon.core.Test is invalid"
> I have checked that all the require plug-ins are loaded in eclipse.
> The Activator class autmatically generated when i created the plug-in,
> yet it seems ok.
> the manifest file seem to be correct.
>
> Are there any other common causes for this error, and what are they?
> Below is my Activator class.
>
> Code:
>
>
> package com.propylon.core.tests;
>
> import org.eclipse.ui.plugin.AbstractUIPlugin;
> import org.osgi.framework.BundleContext;
>
> /**
> * The activator class controls the plug-in life cycle
> */
> public class Activator extends AbstractUIPlugin {
>
> // The plug-in ID
> public static final String PLUGIN_ID = "com.propylon.core.tests";
>
> // The shared instance
> private static Activator plugin;
> /**
> * The constructor
> */
> public Activator() {
> }
>
> /*
> * (non-Javadoc)
> * @see
> org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framew ork.BundleContext)
>
> */
> public void start(BundleContext context) throws Exception {
> super.start(context);
> plugin = this;
> }
>
> /*
> * (non-Javadoc)
> * @see
> org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framewo rk.BundleContext)
>
> */
> public void stop(BundleContext context) throws Exception {
> plugin = null;
> super.stop(context);
> }
>
> /**
> * Returns the shared instance
> *
> * @return the shared instance
> */
> public static Activator getDefault() {
> return plugin;
> }
>
> }
>
>
>
> Below is the Manifest file
>
> Code:
>
>
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: TestsPlug-in
> Bundle-SymbolicName: com.propylon.core.Test;singleton:=true
> Bundle-Version: 1.0.0
> Bundle-Activator: com.propylon.core.tests.Activator
> Bundle-Vendor: PROPYLON
> Require-Bundle: org.eclipse.ui,
> org.eclipse.core.runtime,
> com.propylon.core.repository,
> org.eclipse.core.resources,
> org.tmatesoft.svnkit,
> org.eclipse.ui.navigator,
> org.junit
> Eclipse-LazyStart: true
> Bundle-ClassPath: junit.plugin.jar,
> .
> Export-Package: com,
> com.propylon,
> com.propylon.core,
> com.propylon.core.tests,
> com.propylon.core.tests.testcase,
> com.propylon.core.tests.testsuite,
> org.eclipse.tptp.test.tools.junit.plugin.internal;x-internal :=true,
> org.eclipse.tptp.test.tools.junit.plugin.internal.harness;x- internal:=true,
>
> org.eclipse.tptp.test.tools.junit.plugin.internal.launch;x-i nternal:=true,
>
> org.eclipse.tptp.test.tools.junit.plugin.internal.modelsync; x-internal:=true,
>
> org.eclipse.tptp.test.tools.junit.plugin.internal.resources; x-internal:=true,
>
> org.eclipse.tptp.test.tools.junit.plugin.internal.util;x-int ernal:=true,
> org.eclipse.tptp.test.tools.junit.plugin.util
>
> Are there any obvious flawes with my code that my be causing the problem?
>
> thank you for your time.
>
> slider
>
> P.S. I am new to this newsgroup, and apologise if this post is in the
> wrong forum.
>
Re: Eclipse plug-in: Invalid Activator [message #9308 is a reply to message #9286] Thu, 27 September 2007 15:47 Go to previous message
Eclipse UserFriend
Originally posted by: slider161.hotmail.com

Thanks Ed Merks I have posted in the forum you suggested and referenced
my original question.

Slider
Re: Eclipse plug-in: Invalid Activator [message #561417 is a reply to message #9263] Thu, 27 September 2007 15:19 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Slider,

No one answers questions here. This newsgroup is just for testing
whether you can properly post to an Eclipse newsgroup. You should post
to the platform newsgroup. Does it make sense that you have a UI
Plugin? If Ant is running without a UI that probably won't work.


slider161 wrote:
> I am writing an Ant script to run a JUnit test suite within an Eclipse
> plug-in and generate a JUnit report outside of Eclipse. I am referring
> to this tutorial http://dev.eclipse.org/viewcvs/index.cg ...
> ision=1.4. I have written a test.xml file for my plug-in
> which uses the org.eclipse.test library.xml file run the suite and
> generate a report.
>
> I am getting an error "org.osgi.framework.BundleException: The
> activator com.propylon.core.tests.Activator for bundle
> com.propylon.core.Test is invalid"
> I have checked that all the require plug-ins are loaded in eclipse.
> The Activator class autmatically generated when i created the plug-in,
> yet it seems ok.
> the manifest file seem to be correct.
>
> Are there any other common causes for this error, and what are they?
> Below is my Activator class.
>
> Code:
>
>
> package com.propylon.core.tests;
>
> import org.eclipse.ui.plugin.AbstractUIPlugin;
> import org.osgi.framework.BundleContext;
>
> /**
> * The activator class controls the plug-in life cycle
> */
> public class Activator extends AbstractUIPlugin {
>
> // The plug-in ID
> public static final String PLUGIN_ID = "com.propylon.core.tests";
>
> // The shared instance
> private static Activator plugin;
> /**
> * The constructor
> */
> public Activator() {
> }
>
> /*
> * (non-Javadoc)
> * @see
> org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framew ork.BundleContext)
>
> */
> public void start(BundleContext context) throws Exception {
> super.start(context);
> plugin = this;
> }
>
> /*
> * (non-Javadoc)
> * @see
> org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framewo rk.BundleContext)
>
> */
> public void stop(BundleContext context) throws Exception {
> plugin = null;
> super.stop(context);
> }
>
> /**
> * Returns the shared instance
> *
> * @return the shared instance
> */
> public static Activator getDefault() {
> return plugin;
> }
>
> }
>
>
>
> Below is the Manifest file
>
> Code:
>
>
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: TestsPlug-in
> Bundle-SymbolicName: com.propylon.core.Test;singleton:=true
> Bundle-Version: 1.0.0
> Bundle-Activator: com.propylon.core.tests.Activator
> Bundle-Vendor: PROPYLON
> Require-Bundle: org.eclipse.ui,
> org.eclipse.core.runtime,
> com.propylon.core.repository,
> org.eclipse.core.resources,
> org.tmatesoft.svnkit,
> org.eclipse.ui.navigator,
> org.junit
> Eclipse-LazyStart: true
> Bundle-ClassPath: junit.plugin.jar,
> .
> Export-Package: com,
> com.propylon,
> com.propylon.core,
> com.propylon.core.tests,
> com.propylon.core.tests.testcase,
> com.propylon.core.tests.testsuite,
> org.eclipse.tptp.test.tools.junit.plugin.internal;x-internal :=true,
> org.eclipse.tptp.test.tools.junit.plugin.internal.harness;x- internal:=true,
>
> org.eclipse.tptp.test.tools.junit.plugin.internal.launch;x-i nternal:=true,
>
> org.eclipse.tptp.test.tools.junit.plugin.internal.modelsync; x-internal:=true,
>
> org.eclipse.tptp.test.tools.junit.plugin.internal.resources; x-internal:=true,
>
> org.eclipse.tptp.test.tools.junit.plugin.internal.util;x-int ernal:=true,
> org.eclipse.tptp.test.tools.junit.plugin.util
>
> Are there any obvious flawes with my code that my be causing the problem?
>
> thank you for your time.
>
> slider
>
> P.S. I am new to this newsgroup, and apologise if this post is in the
> wrong forum.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Eclipse plug-in: Invalid Activator [message #561437 is a reply to message #9286] Thu, 27 September 2007 15:47 Go to previous message
Eclipse UserFriend
Originally posted by: slider161.hotmail.com

Thanks Ed Merks I have posted in the forum you suggested and referenced
my original question.

Slider
Previous Topic:Eclipse plug-in: Invalid Activator
Next Topic:A test
Goto Forum:
  


Current Time: Fri Apr 19 10:18:17 GMT 2024

Powered by FUDForum. Page generated in 0.02349 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top