users@glassfish.java.net

Netbeans-Glassfish-Hudson-ant fail

From: <glassfish_at_javadesktop.org>
Date: Tue, 03 Feb 2009 11:12:38 PST

Hello all, probably a noob question :-)
I have a Java EE project, with an EJB module, a web tier and a client app. All created using NetBeans 6.5 wizards. The application itself is deployed to a Glassfish v2ur2 which runs on a dev server (different machine than mine). The project itself compiles and runs OK. All machines involved run Windows XP - and we cannot change that.
When I open a cmd window in the root directory of my project and type "ant", the project builds OK.
Now, here's the problem:
I've installed hudson on the dev server. Hudson checks out the project OK (svn) and then tries to invoke ant on the project directory.
It fails with:
-- ant error --
...
The Java EE server classpath is not correctly set up. Your active server type is J2EE.
Either open the project in the IDE and assign the server or setup the server classpath manually.
For example like this:
   ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file)
or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used)
-- /ant error --

I try to be nice and add the parameter, pointing to the lib directory of the Glassfish instance. But the I get this:

-- ant error 2 --
-do-compile:
    [javac] Compiling 13 source files to D:\hudson-home\jobs\eBill\workspace\eBill\eBill-ejb\build\jar
    [javac] D:\hudson-home\jobs\eBill\workspace\eBill\eBill-ejb\src\java\il\co\beeriprint\ebill\request\CustomerControllerBean.java:11: package javax.ejb does not exist
    [javac] import javax.ejb.Stateless;
    [javac] ^
    [javac] D:\hudson-home\jobs\eBill\workspace\eBill\eBill-ejb\src\java\il\co\beeriprint\ebill\request\CustomerControllerRemote.java:10: package javax.ejb does not exist
    [javac] import javax.ejb.Remote;
    [javac] ^
    [javac] D:\hudson-home\jobs\eBill\workspace\eBill\eBill-ejb\src\java\il\co\beeriprint\ebill\request\CustomerControllerRemote.java:16: cannot find symbol
    [javac] symbol: class Remote
    [javac] @Remote
    [javac] ^
    [javac] D:\hudson-home\jobs\eBill\workspace\eBill\eBill-ejb\src\java\il\co\beeriprint\ebill\request\CustomerControllerBean.java:17: cannot find symbol
    [javac] symbol: class Stateless
    [javac] @Stateless
    [javac] ^
    [javac] Note: D:\hudson-home\jobs\eBill\workspace\eBill\eBill-ejb\src\java\il\co\beeriprint\ebill\client\leumicard\dataimport\LeumicardEndpointKey.java uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 4 errors


-- /ant error --

Any ideas?
[Message sent by forum member 'mich_barsinai' (mich_barsinai)]

http://forums.java.net/jive/thread.jspa?messageID=329919