-
1. Re: Running the template
tim_perdue Oct 7, 2002 10:16 AM (in response to msimanga)This is how my jboss.home property is set in the .ant.properties file
jboss.home=C:/java/jboss-3.0.3
There's a ton of problems with the docs, and I cannot get the template to build either, for a different reason.
The best thing you can do, if you can make any progress on this, is to document what you are doing and contribute back, for instance writing a "how-to" or posting answers in forums. -
2. Re: Running the template
dan1 Oct 7, 2002 10:26 AM (in response to msimanga)In the folder where you unpacked the template,
change the properties file .ant.properties to ant.properties.
In the build.xml, change line 13 to:
In line 14, ensure that you have the same:
In ant.properties, check if the jboss.home and xdoclet.home are pointing to the proper folder.
That's pretty much it here.
Run ANT and it should build.
I am using Ant 1.5.1.
Dan -
3. Re: Running the template
tim_perdue Oct 7, 2002 12:20 PM (in response to msimanga)> Run ANT and it should build.
It doesn't build, unfortunately.
I'm using ant 1.5.1 and the template project downloaded friday. Do you have any idea why I'm getting this error when running ant?
[ejbdoclet] javadoc: In doclet class xdoclet.DocletTask$DocletMain, method star
t has thrown an exception java.lang.reflect.InvocationTargetException
[ejbdoclet] java.lang.NoClassDefFoundError: org/apache/tools/ant/types/Enumerate
dAttribute
[ejbdoclet] at java.lang.Class.getField0(Native Method)
[ejbdoclet] at java.lang.Class.getDeclaredField(Class.java:1113)
[ejbdoclet] at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:300)
[ejbdoclet] at java.security.AccessController.doPrivileged(Native Method)
[ejbdoclet] at java.io.ObjectStreamClass.init(ObjectStreamClass.java:293)
[ejbdoclet] at java.io.ObjectStreamClass.lookupInternal(ObjectStreamClass.ja
va:112)
[ejbdoclet] at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:59)
[ejbdoclet] at java.io.ObjectStreamClass.lookupInternal(ObjectStreamClass.ja
va:88)
[ejbdoclet] at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:59)
[ejbdoclet] at java.io.ObjectStreamClass.lookupInternal(ObjectStreamClass.ja
va:88)
[ejbdoclet] at java.io.ObjectStreamClass.setClass(ObjectStreamClass.java:566
)
[ejbdoclet] at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStr
eam.java:936)
[ejbdoclet] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:3
66)
[ejbdoclet] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:2
36)
[ejbdoclet] at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:
1186)
[ejbdoclet] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:3
86)
[ejbdoclet] at java.io.ObjectInputStream.inputArray(ObjectInputStream.java:1
142)
[ejbdoclet] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:3
74)
[ejbdoclet] at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.
java:2262)
[ejbdoclet] at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream
.java:519)
[ejbdoclet] at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:
1411)
[ejbdoclet] 1 error
[ejbdoclet] 19 warnings
[ejbdoclet] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:3
86)
[ejbdoclet] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:2
36)
[ejbdoclet] at xdoclet.DocletTask$DocletMain.loadContext(DocletTask.java:603
)
[ejbdoclet] at xdoclet.DocletTask$DocletMain.start(DocletTask.java:529)
[ejbdoclet] at java.lang.reflect.Method.invoke(Native Method)
[ejbdoclet] at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java
:193)
[ejbdoclet] at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:
95)
[ejbdoclet] at com.sun.tools.javadoc.Main.main(Main.java:233)
BUILD FAILED
file:C:/java/jb-test/build.xml:147: Javadoc returned 1 -
4. Re: Running the template
tim_perdue Oct 7, 2002 7:53 PM (in response to msimanga)The "Template" project does successfully build on Linux (Debian), but I never could get it to build on windows, because of the above error messages.
Same exact version of ant, jboss, and template were used, in fact copied the zip files from my windows machine. The only difference was using a slightly older JDK (blackdown.org) on the linux box. -
5. Re: Running the template
dan1 Oct 7, 2002 10:34 PM (in response to msimanga)Can I ask you if you have set the XDoclet folder in the ant.properties file, in the template folder?
Something like :
xdoclet.home=C:/j2ee/xdoclet
Dan -
6. Re: Running the template
schaefera Oct 8, 2002 12:27 AM (in response to msimanga)I suggest that you use at least ant 1.4.1 for JDK 1.4.
Otherwise could you tell me the OS, JDK, ant, XDoclet version.
Thanx - Andy -
7. Re: Running the template
tim_perdue Oct 8, 2002 10:20 AM (in response to msimanga)> I suggest that you use at least ant 1.4.1 for JDK
> 1.4.
I tried both ant 1.4.1 and 1.5.1, both produced the exact same error on windows build of "Template".
The JDK on my windows machine is Sun's "Version 1.3.0_02" and the same version by Blackdown on Linux. XDoclet is 1.1.2.
Linux CLASSPATH:
.:/usr/local/java/lib:/usr/local/ant/lib/
Windows CLASSPATH:
.;C:\jdk\lib\;C:\ant\lib\
Windows ant.properties:
xdoclet.home=C:/java/xdoclet
Linux ant.properties:
xdoclet.home=/usr/local/xdoclet
Tim -
8. Re: Running the template
schaefera Oct 9, 2002 1:23 AM (in response to msimanga)Hi
I ran the Template on Linux and Windows (DOS and Cygwin) and did not encounter your problems.
It seems that there is a problem with XDoclet and/or Ant.
Please can try to empty your CLASSPATH environment variable before starting the build. Maybe this helps.
Andy -
9. Re: Running the template
msimanga Oct 9, 2002 7:50 AM (in response to msimanga)I am running Windows 2000 and I have tried all the suggested solutions with no avail. Does anyone have any other examples I could run on my machine. I am still new to J2EE and would like an example or two to run as I learn to use JBoss
-
10. Re: Running the template
dan1 Oct 9, 2002 10:23 AM (in response to msimanga)I tried it out on a Win 2K machine and, if Ant, the JAVA_HOME and Doclet are properly configured, you should not have any poblem.
Try to get the beta workbook from Bill and Sacha, from:
http://www.oreilly.com/catalog/entjbeans3/workbooks/index.html.
See also the forum for this workbook.
Those samples ar running, too.
Dan -
11. Re: Running the template
dotskills Oct 9, 2002 3:42 PM (in response to msimanga)I followed the instructions with installing Jboss. No
matter what I do I keep getting the same error. I would even even go as far as putting xdocle
t.ejb.EjbDocletTask in my class path
James
Microsoft(R) Windows NT(TM)
(C) Copyright 1985-1996 Microsoft Corp.
C:\>cd C:\JBoss.3.0TemplateAndExamples\template
C:\JBoss.3.0TemplateAndExamples\template>ant
Buildfile: build.xml
check-environment:
check-jboss:
wrong-jboss:
check-xdoclet:
wrong-xdoclet:
init:
[echo] build.compiler = ${build.compiler}
[echo] user.home = C:\WINNT\Profiles\jjefferson
[echo] java.home = c:\jdk1.3.1_01\jre
[echo] ant.home = C:\jakarta-ant-1.5.1
[echo] jboss.home = C:/jboss-3.0.3
[echo] xdoclet.home = C:/xdoclet-bin-1.2.0
[echo] java.class.path =
c:\jdk1.3.1_01\lib\tools.jar;C:\jakarta-ant-1.5.1\l
ib\xml-apis.jar;C:\jakarta-ant-1.5.1\lib\xercesImpl.jar;C:\jakarta-ant-1.5.1\lib\
optional.jar;C:\jakarta-ant-1.5.1\lib\ant.jar;.;C:\VisualCafe\Java\Lib;C:\VisualC
afe\Java\Lib\SYMCLASS.ZIP;C:\VisualCafe\Java\Lib\CLASSES.ZIP;C:\VisualCafe\Java\L
ib\COLLECTIONS.ZIP;C:\VisualCafe\Java\Lib\ICEBROWSERBEAN.JAR;C:\VisualCafe\Java\L
ib\JSDK.JAR;C:\VisualCafe\Java\Lib\SYMTOOLS.JAR;C:\VisualCafe\JFC\SWINGALL.JAR;C:
\VisualCafe\Bin\Components\SFC.JAR;C:\VisualCafe\Bin\Components\SYMBEANS.JAR;C:\V
isualCafe\Java\Lib\DBAW.ZIP;C:\VisualCafe\Bin\Components\DBAW_AWT.JAR;C:\VisualCa
fe\Bin\Components\Databind.JAR;C:\VisualCafe\Java\Lib\Olite35.jar;C:\JAVA_PROJECT
S;C:\soap-2_2\lib\soap.jar;C:\javamail-1.2\mail.jar;C:\jaf-1.0.1\activation.jar
xdoclet-generate:
BUILD FAILED
file:C:/JBoss.3.0TemplateAndExamples/template/build.xml:135:
taskdef class xdocle
t.ejb.EjbDocletTask cannot be found
Total time: 2 seconds
C:\JBoss.3.0TemplateAndExamples\template>
##################
##########here is my .ant.properties file
########
# ATTENTION: this is an example file how to overwrite settings in this project
# Please rename it to ".ant.properties" and adjust the settings to your needs
# Set the path to the runtime JBoss directory containing the JBoss application server
# ATTENTION: the one containing directories like "bin", "client", "server" etc.
jboss.home=C:/jboss-3.0.3
# Set the configuration name that must have a corresponding directory under
# <jboss.home>/server
jboss.configuration=default
# Set the path to the root directory of the XDoclet distribution (see
# http://www.sf.net/projects/xdoclet)
xdoclet.home=C:/xdoclet-bin-1.2.0
# Set this to "true" when you want to force the rebuild of the XDoclet generated
# files (see XDoclet's attribute "force")
xdoclet.force=false
# Set the EJB version you want to use (1.1 or 2.0, see XDoclet's attribute "ejbspec")
ejb.version=2.0
# Set the JBoss version you want to use (2.4, 3.0 etc., see XDoclet's attribute "version")
jboss.version=3.0
# Set the DB type mapping (Hypersonic SQL, PostgreSQL etc., see XDoclet's attribute "typemapping")
type.mapping=Hypersonic SQL
# Set the DataSource name your are going to use (java:/DefaultDS etc., see XDoclet's attribute "datasource")
datasource.name=java:/DefaultDS
# Uncomment this and adjust the path to point directly to JAR file containing the servlet classes
# Attention: By uncommenting this line you start the creation of a WAR file
#servlet-lib.path=C:/jboss-all/build/output/jboss-3.1.0alpha/lib/javax.servlet.jar -
12. Re: Running the template
tsg650 Oct 9, 2002 5:12 PM (in response to msimanga)I hate to say, I also can't seem to successfully build the template example. Not being very familiar with ant or xdoclet, I'm not sure what to make of the error message I get after the build fails. Any direction would be appreciated. I've included my output below:
Buildfile: build.xml
check-environment:
check-jboss:
wrong-jboss:
check-xdoclet:
wrong-xdoclet:
init:
[echo] build.compiler = ${build.compiler}
[echo] user.home = C:\Documents and Settings\greert
[echo] java.home = C:\apps\jdk1.3.1\jre
[echo] ant.home = C:\apps\apache\ant-1.5.1
[echo] jboss.home = C:/apps/jboss-3.0.3
[echo] xdoclet.home = C:/apps/sourceforge/xdoclet-1.2.0
[echo] java.class.path = C:\apps\jdk1.3.1\lib\tools.jar;C:\apps\apache\ant-1.5.1\lib\xml-apis.jar;C:\apps\apache\ant-1.5.1\lib\xercesImpl.jar;C:\apps\apache\ant-1.5.1\lib\optional.jar;C:\apps\apa
che\ant-1.5.1\lib\ant.jar;
xdoclet-generate:
BUILD FAILED
file:C:/apps/jboss-template-example/template/build.xml:152: Can't create a jboss element under ejbdoclet. Make sure the jar file containing the corresponding subtask class is on the classpath specified in the that defined ejbdoclet. -
13. Re: Running the template
msimanga Oct 9, 2002 5:34 PM (in response to msimanga)Hi
Ngiyabonga (Zulu for thank you) for pointing out the workbook. I have read a few pages and already I am excited at the prospect of learning more about JBoss.
The template finally worked, how I made it work I am not quite sure. I basically removed all jboss, ant and xdoclet istallations and started afresh. The only difference I could pick uo was that now I only have one version of each of jboss, ant and xdoclet installed. Where as before I had all the previous versions also installed.
I couldn't figure out the computer science in all that but maybe it will help someone out one day.
Ngiyabonga one more time
Mpume