Davidorz (2) [Avatar] Offline
#1
I use jdk6 and glassfish enterprise server v3. When followed the instructions on page656 to build code examples, ant reported error as follows:
D:codeexamplesglassfish>ant
Buildfile: build.xml

init:
[echo] -----> Initializing project properties

DropDerbyDataSource:
[exec] Deprecated syntax, instead use:
[exec] asadmin --port 4848 --host localhost --user admin delete-jdbc-resour
ce [options] ...
[exec]
[exec] Command delete-jdbc-resource executed successfully.
[exec] Deprecated syntax, instead use:
[exec] asadmin --port 4848 --host localhost --user admin delete-jdbc-resour
ce [options] ...
[exec]
[exec] Command delete-jdbc-resource executed successfully.

CreateDataSourceDerby:
[exec] Deprecated syntax, instead use:
[exec] asadmin --port 4848 --host localhost --user admin create-jdbc-resour
ce [options] ...
[exec]
[exec] Command create-jdbc-resource executed successfully.
[exec] Deprecated syntax, instead use:
[exec] asadmin --port 4848 --host localhost --user admin create-jdbc-resour
ce [options] ...
[exec]
[exec] Command create-jdbc-resource executed successfully.

DropJMSResource:
[exec] Deprecated syntax, instead use:
[exec] asadmin --port 4848 --host localhost --user admin delete-jms-resourc
e [options] ...
[exec] com.sun.enterprise.admin.cli.CommandException: remote failure: Unabl
e to Delete Admin Object.
[exec] Command delete-jms-resource failed.
[exec] An administered object named jms/QueueConnectionFactory does not exi
st.
[exec]
[exec]

BUILD FAILED
D:codeexamplesglassfishuild.xml:155: exec returned: 1

Total time: 4 seconds

Can u tell me what goes wrong?
reza_rahman (456) [Avatar] Offline
#2
Re: can't build the code examples with instructions in book
David,

Keep in mind, the code examples were developed for GlassFish v1. Although Debu developed the GlassFish code and so can give you a more definitive answer, what I found from looking into the GlassFish code is that our ANT deployment code is now seriously out-of-date. Given our current workloads, I'm not sure we will have time to update all the first edition code examples now. I think it is more likely we will do this as part of the next edition work (which we are struggling to find time for).

Thanks,
Reza
garrick.welsh (1) [Avatar] Offline
#3
Re: can't build the code examples with instructions in book
I had the same issue.

Simple workaround was to set failonerror="false" for each of the execs in the dropjmsresource target, in the root build.xml.

It will fail when the jms resource doesn't exist, so it will fail on the initial run. It should pass on subsequent runs.