Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Compiling J2EE tutorial examples

1 view
Skip to first unread message

Nick de Graeve

unread,
Mar 24, 2003, 3:45:26 AM3/24/03
to
Hi

First: I tried this question in comp.lang.java.help but I got no answer so
I'll take my chance here hopefully with more success.

Then the problem itself:

I wanna try to compile the examples that came with the tutorial but I
don't succeed.

Here are the error messages:

[root:/usr/local/j2eetutorial/examples]$ ant all
Buildfile: build.xml

init:

BUILD FAILED

/usr/local/j2eetutorial/examples/build.xml:19: /usr/local/j2eetutorial/examples/
build.xml:19: java.lang.StringIndexOutOfBoundsException: String index out of ran
ge: -1
--- Nested Exception ---
/usr/local/j2eetutorial/examples/build.xml:19: java.lang.StringIndexOutOfBoundsE
xception: String index out of range: -1
--- Nested Exception ---
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1480)
at org.apache.tools.ant.taskdefs.Property.loadEnvironment(Property.java:
248)
at org.apache.tools.ant.taskdefs.Property.execute(Property.java:172)
at org.apache.tools.ant.Target.execute(Target.java:153)
at org.apache.tools.ant.Project.runTarget(Project.java:898)
at org.apache.tools.ant.Project.executeTarget(Project.java:536)
at org.apache.tools.ant.Project.executeTargets(Project.java:510)
at org.apache.tools.ant.Main.runBuild(Main.java:421)
at org.apache.tools.ant.Main.main(Main.java:149)

Total time: 1 second
[root:/usr/local/j2eetutorial/examples]$

I set the environment according the instructions in the tutorial:

J2EE_HOME=/usr/local/j2sdkee1.3.1
JAVA_HOME=/usr/local/j2sdk1.4.1_01
ANT=/usr/local/jakarta-ant-1.3
PATH=$PATH:$J2EE_HOME/bin:$JAVA_HOME/bin:$ANT/bin
export J2EE_HOME JAVA_HOME ANT PATH

but I suspect the problem lies within 'build.xml'. These are lines 19
through 24:

<property environment="myenv" />
<property name="j2eepath" value="${myenv.J2EE_HOME}/lib/j2ee.jar" />
<property name="webpath" value="${webejb}" />
<property name="connector-lib" value="${myenv.J2EE_HOME}/lib/connector" />
<property name="cloud-lib" value="${myenv.J2EE_HOME}/lib/cloudscape" />
<property name="system-lib" value="${myenv.J2EE_HOME}/lib/system" />

Line 19 mentions "myenv" but I never set anything like that. Maybe I
should edit this line?

Any ideas?

Thanks

Nick.

0 new messages