EJB with glassfish 4.1 on a tutorial example : unable to deploy

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

EJB with glassfish 4.1 on a tutorial example : unable to deploy

dr_astico
Hello,

i have a problem following a tutorial, from the book "Mastering Netbeans".
I'm new to EJB tecnology and to the use of application servers.

the application is a very simple Enterprise application with two modules:
one EjB sub-project (named GreeterEJB)
one client application sub-project (named Greeter)
one class library (named GreeterEJBRemote)

it just prints "Hello James" to the console, calling a single remote method defined in the WelcomeBean class (into GreeterEJB project), from the client application. I don't think there are problems with the code of the application since syntax is ok and all names are correctly resolved.

the problem occurs when i try to build and debug the client application.
It seems that the application is builded and esecuted locally (without using the jar) on the "classes" folder and then the same folder (with its absolute path) is passed to glassfish to be deployed, but the deploy operation needs a jar file.

"the archive classes type was not recognized"

here is the console output when a try to run the client application:

Code:

ant -f /Users/james/NetBeansProjects/Greeter -Dnb.internal.action.name=run -Ddirectory.deployment.supported=true -DforceRedeploy=false -Dnb.wait.for.caches=true run
init:
GreeterEJBRemote.init:
Deleting: /Users/james/NetBeansProjects/GreeterEJBRemote/build/built-jar.properties
GreeterEJBRemote.deps-jar:
Updating property file: /Users/james/NetBeansProjects/GreeterEJBRemote/build/built-jar.properties
GreeterEJBRemote.compile:
GreeterEJBRemote.jar:
deps-jar:
compile:
library-inclusion-in-archive:
dist-directory-deploy:
pre-run-deploy:
In-place deployment at /Users/james/NetBeansProjects/Greeter/build/classes
GlassFish Server 4.1.1, deploy, null, false
/Users/james/NetBeansProjects/Greeter/nbproject/build-impl.xml:934: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 0 seconds)





this is the glassfish log produced by the run application tentative:

Code:

Grave:   Archive type of /Users/james/NetBeansProjects/Greeter/build/classes was not recognized




this is the build console output for the Eterprise application:

Code:

ant -f /Users/james/NetBeansProjects/GreeterEnterprise -Ddirectory.deployment.supported=true -DforceRedeploy=true -Dbrowser.context=/Users/james/NetBeansProjects/GreeterEnterprise run-deploy
pre-init:
init-private:
init-userdir:
init-user:
init-project:
do-init:
post-init:
init-check:
init:
deps-jar:
deps-j2ee-archive:
Greeter.init:
GreeterEJBRemote.init:
Deleting: /Users/james/NetBeansProjects/GreeterEJBRemote/build/built-jar.properties
GreeterEJBRemote.deps-jar:
Updating property file: /Users/james/NetBeansProjects/GreeterEJBRemote/build/built-jar.properties
GreeterEJBRemote.compile:
GreeterEJBRemote.jar:
Greeter.deps-jar:
Greeter.compile:
Greeter.library-inclusion-in-manifest:
Greeter.dist-ear:
GreeterEJB.init:
GreeterEJBRemote.init:
Deleting: /Users/james/NetBeansProjects/GreeterEJBRemote/build/built-jar.properties
GreeterEJBRemote.deps-jar:
Updating property file: /Users/james/NetBeansProjects/GreeterEJBRemote/build/built-jar.properties
GreeterEJBRemote.compile:
GreeterEJBRemote.jar:
GreeterEJB.deps-jar:
GreeterEJB.compile:
GreeterEJB.library-inclusion-in-manifest:
GreeterEJB.dist-ear:
pre-pre-compile:
pre-compile:
do-compile:
post-compile:
compile:
pre-dist:
post-dist:
dist-directory-deploy:
pre-run-deploy:
Undeploying ...
Initial deploying GreeterEnterprise to /Users/james/NetBeansProjects/GreeterEnterprise/dist/gfdeploy/GreeterEnterprise
Completed initial distribution of GreeterEnterprise
post-run-deploy:
run-deploy:
BUILD SUCCESSFUL (total time: 2 seconds)






I think i have to change something in the deploy options of the client application project, but i don't know how.
the jar file needed to goal the deploy is inside the "dist" folder of the project

tryin to google i got no useful informations.

any help would be appreciated

thanks in advance

Marco