Bug #173
Error during compile-app
| Status: | Closed | Start: | 11/02/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | Sample | |||
| Target version: | - | |||
| Problem in version: |
Description
Hi,
I had the following error during my first attempt at ant lsc::compile-app
Failed to create task or type native2ascii. After some googling I found that this was part of ant-optional. So I installed that but now my error is the following:
[javac] /usr/lib/lsc-bob-openldap2ad/src/impl/java/org/lsc/objects/flat/fInetOrgPerson.java:96: getGivenName() in org.lsc.objects.flat.fInetOrgPerson cannot override getGivenName() in org.lsc.objects.flat.fUser; overridden method is final
[javac] public final String getGivenName() {
[javac] ^
And this about 100 times with different files. I have no idea what's wrong.
Setup info:
Ubuntu 8.04 OpenLDAP (Attempted ant lsc::compile-app here )
Windows 2k3 AD
Thanks,
Bob
History
Updated by Jonathan Clarke 6 months ago
- Category set to Sample
- Status changed from New to Feedback
bob roozekrans wrote:
Hi,
I had the following error during my first attempt at ant lsc::compile-app
Failed to create task or type native2ascii. After some googling I found that this was part of ant-optional. So I installed that but now my error is the following:
[javac] /usr/lib/lsc-bob-openldap2ad/src/impl/java/org/lsc/objects/flat/fInetOrgPerson.java:96: getGivenName() in org.lsc.objects.flat.fInetOrgPerson cannot override getGivenName() in org.lsc.objects.flat.fUser; overridden method is final [javac] public final String getGivenName() { [javac] ^
And this about 100 times with different files. I have no idea what's wrong.
Hi Bob,
This is a weird error message. It seems to indicate that during the generation phase (with the graphical wizard), an object of type "inetOrgPerson" was generated as an extension of "user" - which does not make any sense, since "user" (from Active Directory) is an extension of "inetOrgPerson".
I recall that you had difficulties running the generation, and I suspect that this error is a result of that. I suggest removing all content under src/impl/java, and starting generation over again (using the graphical wizard). That should solve this issue.
As a side note, I would like to point out that this behavior is no longer possible with the next version of LSC, 1.2. Of course, this version has not reached stable status yet, but depending on what your timescale for deployment is, you might want to consider evaluating it. If you do, we'll be happy to help you out if need be. You can see the documentation or download it.
Also, please address support requests to the lsc-users mailing list.
Thanks, and I hope you get this sorted soon :-)
Updated by bob roozekrans 6 months ago
- File logtest2.log added
Hi,
I have deleted the content and tried again but there is no change to the error.
Thanks and I signed up for the mailing list,
Bob
Updated by Rémy-Christophe Schermesser 6 months ago
Hi Bob,
Can you give us the version of Java you are using ? I think that may be your problem.
Do you have a Java 5+ installed ?
Updated by bob roozekrans 6 months ago
Hi,
Yes I have : export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.17/ as my java directory.
Greetings,
Bob
Updated by Jonathan Clarke 6 months ago
bob roozekrans wrote:
I have deleted the content and tried again but there is no change to the error.
Could you tell us some more about your LDAP schema, in both AD and OpenLDAP? What objectClasses do you give the wizard, and, in OpenLDAP, how are they defined? In particular, do you have a "user" objectClass anywhere in OpenLDAP?
Thanks,
Jonathan
Updated by bob roozekrans 6 months ago
Hi,
I have a really simple setup at the moment since this is just a test environment of course.
Both are totally default except for these minor changes.
In AD: 1 user, computer and domain added through graphical AD Users and Computers.
In OpenLDAP: 1 user, computer and domian added through phpLDAPadmin.
I give the default objectClass because I thought that would be changed later on. I have looked for a ¨user¨ objectClass but havent found one.
I hope this helps,
Bob
Updated by Jonathan Clarke 6 months ago
bob roozekrans wrote:
Hi,
I have a really simple setup at the moment since this is just a test environment of course.
Both are totally default except for these minor changes. In AD: 1 user, computer and domain added through graphical AD Users and Computers. In OpenLDAP: 1 user, computer and domian added through phpLDAPadmin.
I give the default objectClass because I thought that would be changed later on. I have looked for a ¨user¨ objectClass but havent found one.
This is a good setup to test, we have used it many times. Can you send us the antinstall.log file? Thanks.
Updated by bob roozekrans 6 months ago
- File ant.install.log added
Hi,
Thats good to know.
Here is the antinstall.log.
Thanks,
Bob
Updated by Jonathan Clarke 6 months ago
OK, I see what is happening now. During generation, LSC generates a Java file for each objectClass you specify (inetOrgPerson, in your case) and any superior objectClasses (SUP in schema definition).
For inetOrgPerson, the LDAP standard [1] defines these as being organizationalPerson and person, but it seems that Microsoft chose to change the standard and uses user as a superior objectClass for inetOrgPerson [2].
Unfortunately, this causes LSC to break, since there are two different conflicting definitions of the same class. Really, this is not a bug in LSC, but poor standards-compliance in Active Directory.
However, you can workaround this problem quite easily, by:
- Removing all content under src/impl/java
- Running the generator again, but specifying these parameters:
- For the target/destination directory, objectClass of user
- For the source directory, objectClass of inetOrgPerson
- This should work fine, now.
Please let us know how you get on.
[1] See RFC 2798: http://tools.ietf.org/html/rfc2798#section-3
[2] See http://msdn.microsoft.com/en-us/library/ms682282(VS.85).aspx
Updated by Jonathan Clarke 6 months ago
I have added a section in the documentation to point this out: http://lsc-project.org/wiki/documentation/1.1/howtos/activedirectory#non-standard_objectclasses.
Thanks for pointing this out, Bob.
Updated by Jonathan Clarke 5 months ago
- Status changed from Feedback to Closed
bob roozekrans wrote:
Thanks Jonathan it works!
Great. Thanks for the detailed info. Closing this issue now.