Le 20/01/15 15:20, Emmanuel Lécharny a écrit :
> As I said, it's working well. I'm able to run the app, debugging it.
> It's way simpler than it was before !
>
> For those of you running on a Mac, though, you may experiment some
> difficulties starting a LDAP server from Studio, getting such an error :
>
> Unable to start server 'ApacheDS 2.0.0'
> java.lang.NullPointerException
>     at
> org.apache.directory.studio.ldapservers.apacheds.v200.ApacheDS200LdapServerAdapter.launchApacheDS(ApacheDS200LdapServerAdapter.java:210)
>     at
> org.apache.directory.studio.ldapservers.apacheds.v200.ApacheDS200LdapServerAdapter.start(ApacheDS200LdapServerAdapter.java:179)
>     at
> org.apache.directory.studio.ldapservers.jobs.StartLdapServerRunnable.run(StartLdapServerRunnable.java:108)
>     at
> org.apache.directory.studio.common.core.jobs.StudioJob.run(StudioJob.java:83)
>     at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
>
> java.lang.NullPointerException
>
> The NPE is due to some unitialised JVM :
>
>     public static ILaunch launchApacheDS( LdapServer server )
>         throws Exception
>     {
>         // Getting the default VM installation
>         IVMInstall vmInstall = JavaRuntime.getDefaultVMInstall();
>
>         // Creating a new editable launch configuration
>         ILaunchConfigurationType type =
> DebugPlugin.getDefault().getLaunchManager()
>             .getLaunchConfigurationType(
> IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION );
>         ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(
> null, server.getId() );
>
>         // Setting the JRE container path attribute
>         workingCopy.setAttribute(
> IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, vmInstall  
> <---- vmInstall is null here.
>             .getInstallLocation().toString() );
>
>
> JavaRuntime.getDefaultVMInstall() returns null, unless you add the
> *org.eclipse.jdt.launching.macosx plugin* in the RCP application, as
> explained on http://www.eclipse.org/forums/index.php/t/157013/.
>
> I must admit it's a bit cryptic, I was expecting this plugin to be
> associated with the JDT plugin itself.
>
> Otherwise, all is running.
>
> Stefan, this is a great job you did !
>
>
> Emmanuel
>


Actually, I had to modify the org.apache.directory.studio.product file
this way :


### Eclipse Workspace Patch 1.0
#P org.apache.directory.studio.product
Index: org.apache.directory.studio.product
===================================================================
--- org.apache.directory.studio.product    (revision 1653213)
+++ org.apache.directory.studio.product    (working copy)
@@ -40,8 +40,10 @@
    <intro introId="studio.intro"/>
 
    <vm>
+      <macos
include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7</macos>
    </vm>
 
+
    <plugins>
    </plugins>
 
@@ -67,6 +69,7 @@
       <feature id="org.eclipse.equinox.p2.user.ui"/>
       <feature id="org.eclipse.equinox.p2.extras.feature"/>
       <feature id="org.eclipse.ecf.filetransfer.ssl.feature"/>
+      <feature id="org.eclipse.jdt" version="3.10.0.v20140925-0400"/>
    </features>
 
    <configurations>


I think the missing brick is simply the org.eclipse.jdt plugin.
Modifying the org.apache.directory.studio.product file with :


### Eclipse Workspace Patch 1.0
#P org.apache.directory.studio.product
Index: org.apache.directory.studio.product
===================================================================
--- org.apache.directory.studio.product    (revision 1653213)
+++ org.apache.directory.studio.product    (working copy)
@@ -42,6 +42,7 @@
    <vm>
    </vm>
 
+
    <plugins>
    </plugins>
 
@@ -67,6 +68,7 @@
       <feature id="org.eclipse.equinox.p2.user.ui"/>
       <feature id="org.eclipse.equinox.p2.extras.feature"/>
       <feature id="org.eclipse.ecf.filetransfer.ssl.feature"/>
+      <feature id="org.eclipse.jdt"/>
    </features>
 
    <configurations>


just does the trick.

Is this working on other platform too ? (ie, windows, linux).

Reply via email to