You were right. It seems that EIK doesn't uninstall correctly. After installing EIK into a clean Eclipse, everything worked. Thanks for all of your help.
Tim On Tue, Feb 25, 2014 at 6:32 PM, Filippo Balicchia <[email protected]> wrote: > Hi Tim, > sorry but I was not updated for location of the repository. > In my console EIK continue to works and I used the same eclipse version. > Anyway, could you please repeat your test from a clean eclipse distribution > ? > EIK uninstall seems has some trouble > > If the problem is not solved could you please apply this diff and send the > console out ? > > --from here-- > diff --git > a/plugins/org.apache.karaf.eik.ui/src/main/java/org/apache/karaf/eik/ui/KarafLaunchConfigurationInitializer.java > b/plugins/org.apache.karaf.eik.ui/src/main/java/org/apache/karaf/eik/ui/KarafLaunchConfigurationInitializer.java > index f3c9b38..a68ba99 100644 > --- > a/plugins/org.apache.karaf.eik.ui/src/main/java/org/apache/karaf/eik/ui/KarafLaunchConfigurationInitializer.java > +++ > b/plugins/org.apache.karaf.eik.ui/src/main/java/org/apache/karaf/eik/ui/KarafLaunchConfigurationInitializer.java > @@ -21,6 +21,7 @@ package org.apache.karaf.eik.ui; > import java.io.File; > import java.util.ArrayList; > import java.util.List; > +import java.util.logging.Logger; > > import org.apache.karaf.eik.core.IKarafConstants; > import org.apache.karaf.eik.core.KarafCorePluginUtils; > @@ -35,7 +36,6 @@ import > org.apache.karaf.eik.ui.features.FeaturesBundlesStartLevels; > import org.apache.karaf.eik.ui.internal.WorkbenchServiceExtensions; > import org.apache.karaf.eik.ui.project.KarafProject; > import org.apache.karaf.eik.ui.workbench.KarafWorkbenchServiceFactory; > - > import org.eclipse.core.resources.IProject; > import org.eclipse.core.resources.IResource; > import org.eclipse.core.resources.IWorkspaceRoot; > @@ -58,11 +58,19 @@ import > org.eclipse.pde.internal.launching.launcher.LaunchConfigurationHelper; > import org.eclipse.pde.internal.ui.IPDEUIConstants; > import org.eclipse.pde.launching.IPDELauncherConstants; > import org.eclipse.pde.launching.OSGiLaunchConfigurationInitializer; > +import org.eclipse.ui.console.ConsolePlugin; > +import org.eclipse.ui.console.IConsole; > +import org.eclipse.ui.console.IConsoleManager; > +import org.eclipse.ui.console.MessageConsole; > +import org.eclipse.ui.console.MessageConsoleStream; > > @SuppressWarnings("restriction") > public class KarafLaunchConfigurationInitializer extends > OSGiLaunchConfigurationInitializer { > > public static final char VERSION_SEPARATOR = '*'; > + > + > + private Logger log = > Logger.getLogger(KarafLaunchConfigurationInitializer.class.getName()); > > /** > * Convenience method for initializing a Karaf launch configuration > @@ -217,9 +225,8 @@ public class KarafLaunchConfigurationInitializer > extends OSGiLaunchConfiguration > protected void loadKarafPlatform(final ILaunchConfigurationWorkingCopy > configuration) { > try { > this.karafPlatform = > KarafPlatformModelRegistry.findActivePlatformModel(); > - > if (karafPlatform == null) { > - throw new CoreException(new Status(IStatus.ERROR, > KarafUIPluginActivator.PLUGIN_ID, "Karaf target platform is not set !")); > + throw new CoreException(new Status(IStatus.ERROR, > KarafUIPluginActivator.PLUGIN_ID, "Karaf target platform is not set !")); > } > > this.karafPlatformFactory = > KarafPlatformModelRegistry.findPlatformModelFactory(karafPlatform.getRootDirectory()); > @@ -244,17 +251,44 @@ public class KarafLaunchConfigurationInitializer > extends OSGiLaunchConfiguration > > private IProject findProjectForActiveTargetPlatform() throws > CoreException { > ITargetPlatformService service = (ITargetPlatformService) > PDECore.getDefault().acquireService(ITargetPlatformService.class.getName()); > + > + MessageConsole myConsole = findConsole("DEBUG_KARAF_PLATFORM"); > + MessageConsoleStream out = myConsole.newMessageStream(); > + > + out.println("findProjectForActiveTargetPlatform"); > > ITargetHandle workspaceTargetHandle = > service.getWorkspaceTargetHandle(); > if (workspaceTargetHandle != null && > workspaceTargetHandle.exists()) { > String memento = workspaceTargetHandle.getMemento(); > - > + out.println("memento try to lookup : "+ memento ); > IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); > + > + out.println("Iproject in workspace :"); > + for(IProject item :root.getProjects()) > + { > + out.println("- " +item.getName()); > + } > + > return root.getProject(getProjectNameFromMemento(memento)); > } else { > + > + out.println("service.getWorkspaceTargetHandle() return null"); > return null; > } > } > + > + private MessageConsole findConsole(String name) { > + ConsolePlugin plugin = ConsolePlugin.getDefault(); > + IConsoleManager conMan = plugin.getConsoleManager(); > + IConsole[] existing = conMan.getConsoles(); > + for (int i = 0; i < existing.length; i++) > + if (name.equals(existing[i].getName())) > + return (MessageConsole) existing[i]; > + //no console found, so create a new one > + MessageConsole myConsole = new MessageConsole(name, null); > + conMan.addConsoles(new IConsole[]{myConsole}); > + return myConsole; > + } > > --to here-- > > > Thanks for help > > Regards > > --Filippo > > > > > 2014-02-25 22:17 GMT+01:00 Tim Moloney <[email protected]>: > >> Eclipse for RCP and RAP Developers >> Version: Kepler Service Release 1 >> Build id: 20130919-0819 >> >> >> On Tue, Feb 25, 2014 at 4:09 PM, Jean-Baptiste Onofré <[email protected]> >> wrote: >> > Hi Tim, >> > >> > I will update the documentation (I changed the repository location this >> > afternoon). >> > >> > What's your Eclipse version ? Kepler, Juno ? >> > >> > Regards >> > JB >> > >> > >> > On 02/25/2014 09:50 PM, Tim Moloney wrote: >> >> >> >> The last commit changed the location of the repository. The >> >> installation documentation should read >> >> <path_to_source>/repository/target/repository >> >> rather than >> >> >> >> >> <path_to_source>/features/org.apache.karaf.eik.repository/target/repository >> >> >> >> However, I still have the same problem when creating the launcher. In >> >> "Run Configurations", the "New" button does nothing and >> >> double-clicking on "OSGi Framework" displays a dialog that says >> >> "Target platform is not set from Karaf project !". >> >> >> >> >> >> On Tue, Feb 25, 2014 at 12:11 PM, Filippo Balicchia >> >> <[email protected]> wrote: >> >>> >> >>> Hi Tim, >> >>> >> >>> from manual directory run >> >>> mvn jetty:run and check >> >>> http://localhost:8080/user-guide/installation.html >> >>> >> >>> Regards >> >>> >> >>> --Filippo >> >>> >> >>> >> >>> >> >>> >> >>> 2014-02-25 17:40 GMT+01:00 Tim Moloney <[email protected]>: >> >>> >> >>>> Okay, I'm probably being dense, but I can't figure out how to make >> >>>> Eclipse see the latest EIK. >> >>>> >> >>>> This is what I did. >> >>>> bash> git clone https://git-wip-us.apache.org/repos/asf/karaf-eik.git >> >>>> apache-karaf-eik-master >> >>>> bash> cd apache-karaf-eik-master >> >>>> bash> mvn -Dmaven.test.skip=true clean install >> >>>> >> >>>> But now I can't find a directory that Eclipse will accept as a local >> >>>> repository. I tried >> >>>> - apache-karaf-eik-master/target >> >>>> - apache-karaf-eik-master/repository >> >>>> >> >>>> Thanks for any info to get me back on track. >> >>>> Tim >> >>>> >> >>>> >> >>>> On Mon, Feb 24, 2014 at 5:11 PM, Filippo Balicchia >> >>>> <[email protected]> >> >>>> wrote: >> >>>>> >> >>>>> H Tim, >> >>>>> >> >>>>> the steps that you followed are ok. >> >>>>> The problem that you see should already be resolved >> >>>>> at revision 0ce946af3589c59345397b8e4bb2c746a662dc29. >> >>>>> >> >>>>> Regards >> >>>>> >> >>>>> --Filippo >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> 2014-02-24 20:48 GMT+01:00 Tim Moloney <[email protected]>: >> >>>>> >> >>>>>> I can't create an OSGi framework launcher. >> >>>>>> >> >>>>>> I've followed the instructions at >> >>>>>> http://karaf.apache.org/manual/eik/latest/user-guide/index.html. >> When >> >>>>>> I select "Run > Run Configurations > OSGi Framework" then click on >> the >> >>>>>> "New" button, nothing happens. If i double-click on "OSGi >> Framework", >> >>>>>> I get a "Problem Occurred" dialog that says "Target platform is not >> >>>>>> set from Karaf project !" However, if I select "Window > >> Preferences >> >>>>>>> >> >>>>>>> Plug-in Development > Target Platform", I see that the target >> >>>>>> >> >>>>>> platform that I selected is set as active. >> >>>>>> >> >>>>>> I'm running: >> >>>>>> - Eclipse for RCP and RAP Developers Kepler Service Release 1 >> >>>>>> - Java 1.7.0_51 >> >>>>>> - Apache Karaf 3.0.0 >> >>>>>> - Apache EIK 3.0.0 20140220.183100 snapshot >> >>>>>> If you need more information, let me know. >> >>>>>> >> >>>>>> I'm new to EIK, so please tell me if I'm doing something wrong. >> >>>>>> >> >>>>>> Thanks, >> >>>>>> Tim >> >>>>>> >> >>>> >> > >> > -- >> > Jean-Baptiste Onofré >> > [email protected] >> > http://blog.nanthrax.net >> > Talend - http://www.talend.com >>
