You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Emmanuel Lécharny <el...@gmail.com> on 2015/01/10 15:55:18 UTC

[Tycho] Mysteries...

Hi !

so I was able to build everything and started to fix some code. Now, I'm
trying something a bit more evolved : using some new constants I have
just declared in LDAP API 1.0.0-M29-SNAPSHOT. It does not compile :/

[ERROR] Failed to execute goal
org.eclipse.tycho:tycho-compiler-plugin:0.22.0:compile (default-compile)
on project org.apache.directory.studio.apacheds.configuration.v2:
Compilation failure: Compilation failure:
[ERROR]
/Users/elecharny/apacheds/stycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java:[33]
[ERROR] import org.apache.directory.api.ldap.model.constants.LdapConstants;
[ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] The import
org.apache.directory.api.ldap.model.constants.LdapConstants cannot be
resolved
[ERROR]
/Users/elecharny/apacheds/stycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java:[291]
[ERROR] configSearchParameter.setFilter( LdapConstants.OBJECT_CLASS_STAR
); //$NON-NLS-1$
[ERROR] ^^^^^^^^^^^^^
[ERROR] LdapConstants cannot be resolved to a variable


I have tried may things, the last one being dooming my maven repo,
building the LDAP API, mvn deploy it, re-run the build.sh script, to no
avail.

FTR, the repo jar for ldap-api-model contains the class (here is the jar
-xvf of the api-ldap-model-1.0.0-M29-SNAPSHOT.jar ):
localhost:t elecharny$ ll org/apache/directory/api/ldap/model/constants/
total 184
-rw-r--r--   1 elecharny  staff    639 Jan 10 13:54
SupportedSaslMechanisms.class
-rw-r--r--   1 elecharny  staff  42058 Jan 10 13:54 SchemaConstants.class
-rw-r--r--   1 elecharny  staff   1528 Jan 10 13:54
SaslSecurityStrength.class
-rw-r--r--   1 elecharny  staff   1453 Jan 10 13:54 SaslQoP.class
-rw-r--r--   1 elecharny  staff   4463 Jan 10 13:54
PasswordPolicySchemaConstants.class
-rw-r--r--   1 elecharny  staff   6234 Jan 10 13:54
MetaSchemaConstants.class
-rw-r--r--   1 elecharny  staff   2187 Jan 10 13:54 Loggers.class
-rw-r--r--   1 elecharny  staff   3751 Jan 10 13:54
LdapSecurityConstants.class
-rw-r--r--   1 elecharny  staff    450 Jan 10 13:54
LdapConstants.class          <<----- It's there !

FTR, this class manifest correctly export the constants package :

Export-Package: org.apache.directory.api.ldap.model.constants;version="1
 .0.0.M29-SNAPSHOT"...

There is also another jar ,
api-ldap-model-1.0.0-M29-20150110.141255-5.jar, which also contains the
very same thing.

The
eclipse-target-platform/target/repository/plugins/org.apache.directory.api.ldap.model_1.0.0.M29-SNAPSHOT.jar
also contains the LdapConstants class.

At this point, I have no idea what can be wrong...


Any help would be appreciated.



Re: [Tycho] Mysteries...

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 17/01/15 20:45, Stefan Seelmann a écrit :
> On 01/17/2015 08:34 PM, Emmanuel Lécharny wrote:
>> So basically, last week-end, I was able to reset my env with the correct dependencies, and all was ok.
>>
>> But at some point, I had to refer to the latest snapshor for ApacheDS, and I tried to doom the .metadata/plugins/org.eclipse.pde.core/.bundle_pool/plugins/org.apache.directory.... and now, I have many errors when reloading the full project.
>>
>> Is there any way I can get this fixed ? Should I totally doom yje .metadata directory ?
> Do you have problems with the Tycho cmd line build or with your Eclipse
> environment? I guess the latter.
The later.
>
> In such cases I deleted my whole workspace and had to apply all the
> settings. I didn't find out a less invasive method yet. Maybe try to
> delete only .metadata/plugins/org.eclipse.pde.core, hopefully only the
> PDE (plugin development env) is resettet then.
I just created a new worskpace too. That works, it's just quite painful,
and I was looking for a lighter solution. Never mind...

Thanks !


Re: [Tycho] Mysteries...

Posted by Stefan Seelmann <ma...@stefan-seelmann.de>.
On 01/17/2015 08:34 PM, Emmanuel Lécharny wrote:
> So basically, last week-end, I was able to reset my env with the correct dependencies, and all was ok.
> 
> But at some point, I had to refer to the latest snapshor for ApacheDS, and I tried to doom the .metadata/plugins/org.eclipse.pde.core/.bundle_pool/plugins/org.apache.directory.... and now, I have many errors when reloading the full project.
> 
> Is there any way I can get this fixed ? Should I totally doom yje .metadata directory ?

Do you have problems with the Tycho cmd line build or with your Eclipse
environment? I guess the latter.

In such cases I deleted my whole workspace and had to apply all the
settings. I didn't find out a less invasive method yet. Maybe try to
delete only .metadata/plugins/org.eclipse.pde.core, hopefully only the
PDE (plugin development env) is resettet then.

Kind Regards,
Stefan


Re: [Tycho] Mysteries...

Posted by Emmanuel Lécharny <el...@gmail.com>.
So basically, last week-end, I was able to reset my env with the correct dependencies, and all was ok.

But at some point, I had to refer to the latest snapshor for ApacheDS, and I tried to doom the .metadata/plugins/org.eclipse.pde.core/.bundle_pool/plugins/org.apache.directory.... and now, I have many errors when reloading the full project.

Is there any way I can get this fixed ? Should I totally doom yje .metadata directory ?

Thanks !



Re: [Tycho] Mysteries...

Posted by Emmanuel Lecharny <el...@apache.org>.
I' ll try that. Before doing a sudo rm -rf / in the last resort :-)

Le samedi 10 janvier 2015, Stefan Seelmann <ma...@stefan-seelmann.de> a
écrit :

> Hi Emmanuel,
>
> you know, OSGi and Snapshots are no good friends...
>
> Both Tycho and Eclipse cache artifacts in various places, based on the
> artifact name, so if version "1.0.0.M29-SNAPSHOT" is used once it is
> never updated.
>
> Did you doom the whole local maven repo? Because Tycho caches them to
> ~/.m2/repository/p2, so make sure to delete that too.
>
> Additionally Eclipse caches them in
> <workspace>/.metadata/.plugins/org.eclipse.pde.core/.bundle_pool. But
> this location should not be relevant for Tycho, but I'm not 100% sure.
>
> Last not least, I use the brute force method to find and delete all of
> them: sudo find / -name "org.apache.directory.api.ldap.model*"
>
> HTH,
> Stefan
>
>
> repository/p2/osgi/bundle/org.apache.directory.api.ldap.model
>
>
> On 01/10/2015 03:55 PM, Emmanuel Lécharny wrote:
> > Hi !
> >
> > so I was able to build everything and started to fix some code. Now, I'm
> > trying something a bit more evolved : using some new constants I have
> > just declared in LDAP API 1.0.0-M29-SNAPSHOT. It does not compile :/
> >
> > [ERROR] Failed to execute goal
> > org.eclipse.tycho:tycho-compiler-plugin:0.22.0:compile (default-compile)
> > on project org.apache.directory.studio.apacheds.configuration.v2:
> > Compilation failure: Compilation failure:
> > [ERROR]
> >
> /Users/elecharny/apacheds/stycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java:[33]
> > [ERROR] import
> org.apache.directory.api.ldap.model.constants.LdapConstants;
> > [ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > [ERROR] The import
> > org.apache.directory.api.ldap.model.constants.LdapConstants cannot be
> > resolved
> > [ERROR]
> >
> /Users/elecharny/apacheds/stycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java:[291]
> > [ERROR] configSearchParameter.setFilter( LdapConstants.OBJECT_CLASS_STAR
> > ); //$NON-NLS-1$
> > [ERROR] ^^^^^^^^^^^^^
> > [ERROR] LdapConstants cannot be resolved to a variable
> >
> >
> > I have tried may things, the last one being dooming my maven repo,
> > building the LDAP API, mvn deploy it, re-run the build.sh script, to no
> > avail.
> >
> > FTR, the repo jar for ldap-api-model contains the class (here is the jar
> > -xvf of the api-ldap-model-1.0.0-M29-SNAPSHOT.jar ):
> > localhost:t elecharny$ ll org/apache/directory/api/ldap/model/constants/
> > total 184
> > -rw-r--r--   1 elecharny  staff    639 Jan 10 13:54
> > SupportedSaslMechanisms.class
> > -rw-r--r--   1 elecharny  staff  42058 Jan 10 13:54 SchemaConstants.class
> > -rw-r--r--   1 elecharny  staff   1528 Jan 10 13:54
> > SaslSecurityStrength.class
> > -rw-r--r--   1 elecharny  staff   1453 Jan 10 13:54 SaslQoP.class
> > -rw-r--r--   1 elecharny  staff   4463 Jan 10 13:54
> > PasswordPolicySchemaConstants.class
> > -rw-r--r--   1 elecharny  staff   6234 Jan 10 13:54
> > MetaSchemaConstants.class
> > -rw-r--r--   1 elecharny  staff   2187 Jan 10 13:54 Loggers.class
> > -rw-r--r--   1 elecharny  staff   3751 Jan 10 13:54
> > LdapSecurityConstants.class
> > -rw-r--r--   1 elecharny  staff    450 Jan 10 13:54
> > LdapConstants.class          <<----- It's there !
> >
> > FTR, this class manifest correctly export the constants package :
> >
> > Export-Package: org.apache.directory.api.ldap.model.constants;version="1
> >  .0.0.M29-SNAPSHOT"...
> >
> > There is also another jar ,
> > api-ldap-model-1.0.0-M29-20150110.141255-5.jar, which also contains the
> > very same thing.
> >
> > The
> >
> eclipse-target-platform/target/repository/plugins/org.apache.directory.api.ldap.model_1.0.0.M29-SNAPSHOT.jar
> > also contains the LdapConstants class.
> >
> > At this point, I have no idea what can be wrong...
> >
> >
> > Any help would be appreciated.
> >
> >
>
>

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Re: [Tycho] Mysteries...

Posted by Stefan Seelmann <ma...@stefan-seelmann.de>.
Hi Emmanuel,

you know, OSGi and Snapshots are no good friends...

Both Tycho and Eclipse cache artifacts in various places, based on the
artifact name, so if version "1.0.0.M29-SNAPSHOT" is used once it is
never updated.

Did you doom the whole local maven repo? Because Tycho caches them to
~/.m2/repository/p2, so make sure to delete that too.

Additionally Eclipse caches them in
<workspace>/.metadata/.plugins/org.eclipse.pde.core/.bundle_pool. But
this location should not be relevant for Tycho, but I'm not 100% sure.

Last not least, I use the brute force method to find and delete all of
them: sudo find / -name "org.apache.directory.api.ldap.model*"

HTH,
Stefan


repository/p2/osgi/bundle/org.apache.directory.api.ldap.model


On 01/10/2015 03:55 PM, Emmanuel Lécharny wrote:
> Hi !
> 
> so I was able to build everything and started to fix some code. Now, I'm
> trying something a bit more evolved : using some new constants I have
> just declared in LDAP API 1.0.0-M29-SNAPSHOT. It does not compile :/
> 
> [ERROR] Failed to execute goal
> org.eclipse.tycho:tycho-compiler-plugin:0.22.0:compile (default-compile)
> on project org.apache.directory.studio.apacheds.configuration.v2:
> Compilation failure: Compilation failure:
> [ERROR]
> /Users/elecharny/apacheds/stycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java:[33]
> [ERROR] import org.apache.directory.api.ldap.model.constants.LdapConstants;
> [ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> [ERROR] The import
> org.apache.directory.api.ldap.model.constants.LdapConstants cannot be
> resolved
> [ERROR]
> /Users/elecharny/apacheds/stycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java:[291]
> [ERROR] configSearchParameter.setFilter( LdapConstants.OBJECT_CLASS_STAR
> ); //$NON-NLS-1$
> [ERROR] ^^^^^^^^^^^^^
> [ERROR] LdapConstants cannot be resolved to a variable
> 
> 
> I have tried may things, the last one being dooming my maven repo,
> building the LDAP API, mvn deploy it, re-run the build.sh script, to no
> avail.
> 
> FTR, the repo jar for ldap-api-model contains the class (here is the jar
> -xvf of the api-ldap-model-1.0.0-M29-SNAPSHOT.jar ):
> localhost:t elecharny$ ll org/apache/directory/api/ldap/model/constants/
> total 184
> -rw-r--r--   1 elecharny  staff    639 Jan 10 13:54
> SupportedSaslMechanisms.class
> -rw-r--r--   1 elecharny  staff  42058 Jan 10 13:54 SchemaConstants.class
> -rw-r--r--   1 elecharny  staff   1528 Jan 10 13:54
> SaslSecurityStrength.class
> -rw-r--r--   1 elecharny  staff   1453 Jan 10 13:54 SaslQoP.class
> -rw-r--r--   1 elecharny  staff   4463 Jan 10 13:54
> PasswordPolicySchemaConstants.class
> -rw-r--r--   1 elecharny  staff   6234 Jan 10 13:54
> MetaSchemaConstants.class
> -rw-r--r--   1 elecharny  staff   2187 Jan 10 13:54 Loggers.class
> -rw-r--r--   1 elecharny  staff   3751 Jan 10 13:54
> LdapSecurityConstants.class
> -rw-r--r--   1 elecharny  staff    450 Jan 10 13:54
> LdapConstants.class          <<----- It's there !
> 
> FTR, this class manifest correctly export the constants package :
> 
> Export-Package: org.apache.directory.api.ldap.model.constants;version="1
>  .0.0.M29-SNAPSHOT"...
> 
> There is also another jar ,
> api-ldap-model-1.0.0-M29-20150110.141255-5.jar, which also contains the
> very same thing.
> 
> The
> eclipse-target-platform/target/repository/plugins/org.apache.directory.api.ldap.model_1.0.0.M29-SNAPSHOT.jar
> also contains the LdapConstants class.
> 
> At this point, I have no idea what can be wrong...
> 
> 
> Any help would be appreciated.
> 
> 


Re: [Tycho] Mysteries...

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 10/01/15 15:55, Emmanuel Lécharny a écrit :
> Hi !
>
> so I was able to build everything and started to fix some code. Now, I'm
> trying something a bit more evolved : using some new constants I have
> just declared in LDAP API 1.0.0-M29-SNAPSHOT. It does not compile :/
>
> [ERROR] Failed to execute goal
> org.eclipse.tycho:tycho-compiler-plugin:0.22.0:compile (default-compile)
> on project org.apache.directory.studio.apacheds.configuration.v2:
> Compilation failure: Compilation failure:
> [ERROR]
> /Users/elecharny/apacheds/stycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java:[33]
> [ERROR] import org.apache.directory.api.ldap.model.constants.LdapConstants;
> [ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> [ERROR] The import
> org.apache.directory.api.ldap.model.constants.LdapConstants cannot be
> resolved
> [ERROR]
> /Users/elecharny/apacheds/stycho/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java:[291]
> [ERROR] configSearchParameter.setFilter( LdapConstants.OBJECT_CLASS_STAR
> ); //$NON-NLS-1$
> [ERROR] ^^^^^^^^^^^^^
> [ERROR] LdapConstants cannot be resolved to a variable
>
>
> I have tried may things, the last one being dooming my maven repo,
> building the LDAP API, mvn deploy it, re-run the build.sh script, to no
> avail.
>
> FTR, the repo jar for ldap-api-model contains the class (here is the jar
> -xvf of the api-ldap-model-1.0.0-M29-SNAPSHOT.jar ):
> localhost:t elecharny$ ll org/apache/directory/api/ldap/model/constants/
> total 184
> -rw-r--r--   1 elecharny  staff    639 Jan 10 13:54
> SupportedSaslMechanisms.class
> -rw-r--r--   1 elecharny  staff  42058 Jan 10 13:54 SchemaConstants.class
> -rw-r--r--   1 elecharny  staff   1528 Jan 10 13:54
> SaslSecurityStrength.class
> -rw-r--r--   1 elecharny  staff   1453 Jan 10 13:54 SaslQoP.class
> -rw-r--r--   1 elecharny  staff   4463 Jan 10 13:54
> PasswordPolicySchemaConstants.class
> -rw-r--r--   1 elecharny  staff   6234 Jan 10 13:54
> MetaSchemaConstants.class
> -rw-r--r--   1 elecharny  staff   2187 Jan 10 13:54 Loggers.class
> -rw-r--r--   1 elecharny  staff   3751 Jan 10 13:54
> LdapSecurityConstants.class
> -rw-r--r--   1 elecharny  staff    450 Jan 10 13:54
> LdapConstants.class          <<----- It's there !
>
> FTR, this class manifest correctly export the constants package :
>
> Export-Package: org.apache.directory.api.ldap.model.constants;version="1
>  .0.0.M29-SNAPSHOT"...
>
> There is also another jar ,
> api-ldap-model-1.0.0-M29-20150110.141255-5.jar, which also contains the
> very same thing.
>
> The
> eclipse-target-platform/target/repository/plugins/org.apache.directory.api.ldap.model_1.0.0.M29-SNAPSHOT.jar
> also contains the LdapConstants class.
>
> At this point, I have no idea what can be wrong...
>
>
> Any help would be appreciated.
>
>
Also FTR, I have modified the
plugins/apacheds.configuration.v2/pom-first.xml to have :

            <Import-Package>org.apache.directory.server.core.api,
 org.apache.directory.server.config,
 org.apache.directory.server.config.beans,
 org.apache.directory.server.constants,
 org.apache.directory.server.core.api.entry,
 org.apache.directory.server.core.api.filtering,
 org.apache.directory.server.core.api.interceptor.context,
 org.apache.directory.server.core.api.partition,
 org.apache.directory.api.ldap.model.constants,   <<-- Added
...