Question

I am using Glassfish-4.0, Netbeans-8. I started trying out a sample enterprise application. I have tried this same tutorial a couple of times trying to get where and when exactly the problem got infused in the application. To my surprise, it is from the onset. Once I create a new application by doing this in Netbeans:

Project => J2EE => Enterprise Application => Entered the project name => selects glassfish and JDK-7 and clicked finished. I tried running this application as is and it throws this error in the build-impl.xml file on this line (this is in the ContactProject-ejb project):

934 <nbdeploy debugmode="false" forceRedeploy="${forceRedeploy}"/>

While a similar error throws up in the ContactProject file

<target name="-run-deploy-am" unless="no.deps">
        <!-- Task to deploy to the Access Manager runtime. -->
        <ant antfile="${project.ContactApp-ejb}/build.xml" inheritall="false" target="-run-deploy-am"/>
        <ant antfile="${project.ContactApp-war}/build.xml" inheritall="false" target="-run-deploy-am"/>
    </target>
    <target depends="-init-cos,dist-directory-deploy,pre-run-deploy,-pre-nbmodule-run-deploy,-run-deploy-nb,-init-deploy-ant,-deploy-ant,-run-deploy-am,-post-nbmodule-run-deploy,post-run-deploy" name="run-deploy"/>
    <target if="netbeans.home" name="-run-deploy-nb">
        <nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
    </target>
    <target name="-init-deploy-ant" unless="netbeans.home">
        <property name="deploy.ant.archive" value="${dist.jar}"/>
        <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
        <property name="deploy.ant.enabled" value="true"/>
    </target>
    <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
    <target if="netbeans.home" name="-run-undeploy-nb">
        <fail message="Undeploy is not supported from within the IDE"/>
    </target>
    <target depends="dist" name="verify">
        <nbverify file="${dist.jar}"/>
    </target>

What exactly could be the problem with this? This is the error when I try running the ejb file. I have searched the log of Glassfish, it's blank, so no indication if whatsoever is going on.

pre-run-deploy:
In-place deployment at C:\Users\Ken4ward\Documents\NetBeansProjects\ContactApp\ContactApp-ejb\build\classes
GlassFish Server 4, deploy, null, false
C:\Users\Ken4ward\Documents\NetBeansProjects\ContactApp\ContactApp-ejb\nbproject\build-impl.xml:935: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 1 minute 10 seconds)
Était-ce utile?

La solution

You are not even providing the error message...

It looks like the problem is that you didn't build the submodules (i.e. the EJB and the WAR project) and therefore Maven can't find the artifacts in your local repository.

To fix this either build the parent Maven project (the parent of the EAR projecT) or right-click on your EAR project and click "Build with Dependencies".

If this doesn't fix the problem, update the question with the real error message (Hint: The message containing the line number in the build-impl.xml is not the real error message).

Autres conseils

In my case problem was with no connection from glassfish to mysql db.

I based my connection on that tutorial.

https://netbeans.org/kb/docs/javaee/ecommerce/setup.html

I had the same problem bugging me for a whole weekend. I found out that the problem was the name of my project directory had a "&" special character in it. I renamed the directory - removed the "&" and that solved my problem. I hope this saves someone a lot of time.

I had the same things you showed up, but Drew is right that's not the error, in my case was the my connection could not be established because in the beginning I had no password to access my connection, but then I placed a password and I forgot to place it on the config as well. I did it in configuration files, double clicking the one named glassfish-resources.xml, seek the property with the name Password and the password goes there (value="It should be empty for you"). Hi

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top