我用的是玻璃鱼-4.0,Netbeans-8。我开始尝试一个示例企业应用程序。我已经尝试过几次这个教程,试图在应用程序中准确地了解问题的位置和时间。令我惊讶的是,这是从一开始。一旦我在Netbeans中创建了一个新的应用程序:
项目=> J2EE =>企业应用程序=>输入项目名称=>,选择glassfish和JDK-7并单击finished。我试着按原样运行这个应用程序,它会在该行的build-impl.xml文件中抛出这个错误(这是在ContactProject项目中):
934 <nbdeploy debugmode="false" forceRedeploy="${forceRedeploy}"/>在ContactProject文件中抛出类似的错误时
<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>这到底有什么问题?这是我尝试运行ejb文件时的错误。我已经搜过那原木的玻璃鱼,它是空白的,所以没有任何迹象表明是否发生了任何事情。
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)发布于 2014-05-14 10:51:11
你甚至没有提供错误信息..。
看起来问题是,您没有构建子模块(即EJB和WAR项目),因此Maven无法在本地存储库中找到工件。
要解决这个问题,可以构建父Maven项目( EAR project的父项目),或者右键单击您的EAR项目并单击"Build with Dependencies“。
如果这不能解决问题,就用真正的错误消息更新问题(提示:包含build-impl.xml中的行号的消息不是真正的错误消息)。
发布于 2014-11-07 13:09:30
在我的例子中,问题是没有从glassfish到mysql的连接。
我的联系是以那个教程为基础的。
发布于 2016-01-10 18:16:29
整整一个周末我都遇到了同样的问题。我发现问题是我的项目目录的名称中有一个"&“特殊字符。我重新命名了目录-删除了"&“,这解决了我的问题。我希望这能节省很多时间。
https://stackoverflow.com/questions/23651788
复制相似问题