|
Home > Archive > Apache Directory Project > September 2005 > trying to generate schema classes...
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
trying to generate schema classes...
|
|
| Thom Park 2005-09-29, 8:45 pm |
| Dear All,
I do believe I'm on a roll today - now I'm in OpenSourceHell with schema
generation...
When I unleash maven on my schema file I get the following stack trace:
[echo] Generated schema producer classes for samba.schema
ASTIdentifier : java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImp
l.invoke(UberspectImpl.java:304)
at
org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:56)
at
org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java
:106)
<remainder of trace omitted to protect the reader's sanity>
The parser is blowing when it tries to process my schema file. I believe
I've set up the dependencies correctly in the project.properties file
but from the stack trace
it's unclear to me what line in my schema file is the culprit in this
failure.
Can anyone advise what I should be looking at in the trace to tell me
what part of the schema file is wrong please?
-Thom
| |
| Emmanuel Lecharny 2005-09-29, 8:45 pm |
| On Thu, 2005-09-29 at 15:49 -0700, Thom Park wrote:
> Dear All,
>
>
>
> I do believe I’m on a roll today – now I’m in OpenSourceHell with
> schema generation…
Sorry about it...
> When I unleash maven on my schema file I get the following stack
> trace:
Is it something possible that you post as an attachment the schema you
are trying to parse?
And could you also post the specific command you type, and some
information about your environment :
- JVM
- system
- Maven version
- directory form which you are launching your command
It could help more that a stack trace, actually ;)
| |
| Thom Park 2005-09-29, 8:45 pm |
| Indeed...
Regrettably, I'm feeling a bit mauled by ApacheDS recently - maven is
not kind to the novice.
Unfortunately, I'm not allowed to post the schema directly to the 'net -
one's employer takes a dim view of such - which, I guess, doesn't really
help anyone help me.
However, here's some of the answers you requested.
Maven: 1.0.2
JVM: 1.5.0_04
Running command from top level of project (maven mutliproject:install),
Tried it both a the 'trunk' level and at the tags\apacheds-0.9.2 level -
both fail.
I guess by your questions, there's no way of relating the 'generator'
line # to the schema line #?
Thanks,
Thom
-----Original Message-----
From: Emmanuel Lecharny [mailto:elecharny-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org]=20
Sent: Thursday, September 29, 2005 3:58 PM
To: Apache Directory Developers List
Subject: Re: trying to generate schema classes...
On Thu, 2005-09-29 at 15:49 -0700, Thom Park wrote:
> Dear All,
>=20
> =20
>=20
> I do believe I'm on a roll today - now I'm in OpenSourceHell with
> schema generation...
Sorry about it...
> When I unleash maven on my schema file I get the following stack
> trace:
Is it something possible that you post as an attachment the schema you
are trying to parse?
And could you also post the specific command you type, and some
information about your environment :
- JVM
- system
- Maven version
- directory form which you are launching your command
It could help more that a stack trace, actually ;)
| |
| Emmanuel Lecharny 2005-09-29, 8:45 pm |
| On Thu, 2005-09-29 at 16:06 -0700, Thom Park wrote:
> Indeed...
>
> Regrettably, I'm feeling a bit mauled by ApacheDS recently - maven is
> not kind to the novice.
eh eh eh ;) Just check Hani Suleiman Bile Blog ...
>
> Unfortunately, I'm not allowed to post the schema directly to the 'net -
> one's employer takes a dim view of such - which, I guess, doesn't really
> help anyone help me.
>
> However, here's some of the answers you requested.
>
> Maven: 1.0.2
> JVM: 1.5.0_04
>
> Running command from top level of project (maven mutliproject:install),
> Tried it both a the 'trunk' level and at the tags\apacheds-0.9.2 level -
> both fail.
I've just tested :
$ cd apacheds/tags/release-0.9.2/core
$ maven
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
Java : /usr/java/jdk1.5.0_05/bin/java :
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0.2
.... (many lines of garbage)
BUILD SUCCESSFUL
Total time: 1 minutes 23 seconds
Finished at: Fri Sep 30 01:14:53 CEST 2005
$
(I'm on Linux, but is should not make any difference, except on M$
accounting system ;)
So it seems to work for me.
What about your env ?
Here is mine :
MAVEN_HOME=/home/java/maven-1.0.2
JAVA_HOME=/usr/java/jdk1.5.0_05
PATH=/usr/java/jdk1.5.0_05:/usr/java/jdk1.5.0_05/bin:/home/java/maven-1.0.2/bin:
>
> I guess by your questions, there's no way of relating the 'generator'
> line # to the schema line #?
>
> Thanks,
>
> Thom
>
>
>
>
> -----Original Message-----
> From: Emmanuel Lecharny [mailto:elecharny-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org]
> Sent: Thursday, September 29, 2005 3:58 PM
> To: Apache Directory Developers List
> Subject: Re: trying to generate schema classes...
>
> On Thu, 2005-09-29 at 15:49 -0700, Thom Park wrote:
>
> Sorry about it...
>
>
> Is it something possible that you post as an attachment the schema you
> are trying to parse?
>
> And could you also post the specific command you type, and some
> information about your environment :
> - JVM
> - system
> - Maven version
> - directory form which you are launching your command
>
> It could help more that a stack trace, actually ;)
>
>
> ---------------------------------------------------------------------------------------
> Wanadoo vous informe que cet e-mail a ete controle par l'anti-virus mail.
> Aucun virus connu a ce jour par nos services n'a ete detecte.
>
>
>
| |
| Enrique Rodriguez 2005-09-29, 8:45 pm |
| Emmanuel Lecharny wrote:
> On Thu, 2005-09-29 at 16:06 -0700, Thom Park wrote:
....[vbcol=seagreen]
I just removed a parenthesis from a schema and rebuilt and I got a
stacktrace that made the error pretty obvious. I have attached my error
below. My best guess is you have a problem somewhere else. One other
guess is that with multiproject installs you should multiproject:clean.
Alex pointed this out to me not 1 week ago. A plain 'clean' will just
clean the top-level.
HTH:
My maven command is:
bash-2.05b# maven -Dmaven.test.skip=true multiproject:clean
multiproject:install
....
build:start:
multiproject:install-callback:
[echo] Running jar:install for ApacheDS Core
java:prepare-filesystem:
[mkdir] Created dir:
/root/workspace/org.apache.directory.apacheds/core/target/classes
java:compile:
directory:schema:
directory:init:
directory:prepare-filesystem:
[mkdir] Created dir:
/root/workspace/org.apache.directory.apacheds/core/target/schema
ASTIdentifier : java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
....
Caused by: Failed to generate apachedns schema classes in package
org.apache.ldap.server.schema.bootstrap
at
org.apache.ldap.server.tools.schema.DirectorySchemaToolTask.execute(DirectorySchemaToolTask.java:105)
... 96 more
Caused by: java.text.ParseException: Parser failure on:
schema input stream ==> java.io.FileInputStream@5ce40
Antlr exception trace:
line 147:39: unexpected token: $
at
org.apache.ldap.server.tools.schema.antlrOpenLdapSchemaParser.objectClass(antlrOpenLdapSchemaParser.java:616)
at
org.apache.ldap.server.tools.schema.antlrOpenLdapSchemaParser.parseSchema(antlrOpenLdapSchemaParser.java:135)
| |
| Thom Park 2005-09-29, 8:45 pm |
| OK...
As is most of the cases - pilot error - wheels were up when the plane
touched down.
I missed a few single-quotes on the attribute definitions.
I also discovered, buried under various stack traces, there was enough
information to tell me where to look (yaay!).
Now I'll go back and fix what else I may have got wrong!
Thanks for the help and patience.
-T
-----Original Message-----
From: Emmanuel Lecharny [mailto:elecharny-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org]=20
Sent: Thursday, September 29, 2005 4:21 PM
To: Apache Directory Developers List
Subject: RE: trying to generate schema classes...
On Thu, 2005-09-29 at 16:06 -0700, Thom Park wrote:
> Indeed...
>=20
> Regrettably, I'm feeling a bit mauled by ApacheDS recently - maven is
> not kind to the novice.
eh eh eh ;) Just check Hani Suleiman Bile Blog ...
>=20
> Unfortunately, I'm not allowed to post the schema directly to the 'net
-
> one's employer takes a dim view of such - which, I guess, doesn't
really
> help anyone help me.
>=20
> However, here's some of the answers you requested.
>=20
> Maven: 1.0.2
> JVM: 1.5.0_04
>=20
> Running command from top level of project (maven
mutliproject:install),
> Tried it both a the 'trunk' level and at the tags\apacheds-0.9.2 level
-
> both fail.
I've just tested :
$ cd apacheds/tags/release-0.9.2/core
$ maven=20
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
Java : /usr/java/jdk1.5.0_05/bin/java :
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0.2
.... (many lines of garbage)
BUILD SUCCESSFUL
Total time: 1 minutes 23 seconds
Finished at: Fri Sep 30 01:14:53 CEST 2005
$
(I'm on Linux, but is should not make any difference, except on M$
accounting system ;)
So it seems to work for me.
What about your env ?
Here is mine :
MAVEN_HOME=3D/home/java/maven-1.0.2
JAVA_HOME=3D/usr/java/jdk1.5.0_05
PATH=3D/usr/java/jdk1.5.0_05:/usr/java/jdk1.5.0_05/bin:/home/java/maven-1=
..
0.2/bin:
>=20
> I guess by your questions, there's no way of relating the 'generator'
> line # to the schema line #?
>=20
> Thanks,
>=20
> Thom
>=20
>=20
>=20
>=20
> -----Original Message-----
> From: Emmanuel Lecharny [mailto:elecharny-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org]=20
> Sent: Thursday, September 29, 2005 3:58 PM
> To: Apache Directory Developers List
> Subject: Re: trying to generate schema classes...
>=20
> On Thu, 2005-09-29 at 15:49 -0700, Thom Park wrote:
>=20
> Sorry about it...
>=20
>=20
> Is it something possible that you post as an attachment the schema you
> are trying to parse?
>=20
> And could you also post the specific command you type, and some
> information about your environment :
> - JVM
> - system
> - Maven version
> - directory form which you are launching your command
>=20
> It could help more that a stack trace, actually ;)
>=20
>=20
>
------------------------------------------------------------------------
---------------
> Wanadoo vous informe que cet e-mail a ete controle par l'anti-virus
mail.=20
> Aucun virus connu a ce jour par nos services n'a ete detecte.
>=20
>=20
>=20
| |
| Emmanuel Lecharny 2005-09-29, 8:45 pm |
| On Thu, 2005-09-29 at 16:38 -0700, Thom Park wrote:
> OK...
>
> As is most of the cases - pilot error - wheels were up when the plane
> touched down.
The ground is always hostile ...
>
> I missed a few single-quotes on the attribute definitions.
>
> I also discovered, buried under various stack traces, there was enough
> information to tell me where to look (yaay!).
>
> Now I'll go back and fix what else I may have got wrong!
>
> Thanks for the help and patience.
np, you are welcome !
|
|
|
|
|