Java build-impl.xml:1031: 模块尚未部署

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16400810/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-16 06:42:46  来源:igfitidea点击:

build-impl.xml:1031: The module has not been deployed

javatomcatwebnetbeans-7

提问by Kromer

I have been working on a Java web application and i am using SmartGwton Netbeans 7.3and out of a sudden I encountered this problem. I tried cleaning the build-impl.xmlthen restarting the IDE and I should say I have fairly low knowledge on this. Can someone please tell me why it is giving an error and how I can fix that?

我一直在开发 Java Web 应用程序,我在Netbeans 7.3上使用SmartGwt,突然间我遇到了这个问题。我尝试清理然后重新启动 IDE,我应该说我对此知之甚少。有人可以告诉我为什么会出现错误以及如何解决吗?build-impl.xml

The error message says :

错误消息说:

nbproject/build-impl.xml:1031: The module has not been deployed. See the server log for details. 
BUILD FAILED (total time: 4 seconds)

Note: i am using Tomcat 7.0.34

注意:我使用的是Tomcat 7.0.34

采纳答案by Zero-dev

may its so late but the response useful for others so : Sometimes, when you don't specify a server or servlet container at the creation of the project, NetBeansfails to create a context.xmlfile.

可能这么晚了,但响应对其他人有用:有时,当您在创建项目时未指定服务器或 servlet 容器时,NetBeans无法创建context.xml文件。

  1. In your project under Web Pages, create a folder called META-INF.
  1. 在 Web Pages 下的项目中,创建一个名为META-INF.

Do this by right mouse button clicking on Web pages, and select:

通过在网页上单击鼠标右键来执行此操作,然后选择:

New->Other->Other->File Folder

New->Other->Other->File Folder

Name the folder META-INF. Case is important, even on Windows.

命名文件夹META-INF。大小写很重要,即使在 Windows 上也是如此。

  1. Create a file called context.xmlin the META-INFfolder.
  1. context.xmlMETA-INF文件夹中创建一个名为的文件。

Do this by right mouse button clicking on the new META-INFfolder, and select:

通过鼠标右键单击新META-INF文件夹来执行此操作,然后选择:

New->Other->XML->XMLDocument

New->Other->XML->XML文档

Name it context (NetBeans adds the .xml) Select Well-formed Document Press Finish

将其命名为上下文(NetBeans 添加了.xml) Select Well-formed Document Press Finish

  1. Edit the new document (context.xml), and add the following:

    <?xml version="1.0" encoding="UTF-8"?> 
    <Context antiJARLocking="true" path="/app-name"/> 
    
  1. 编辑新文档 ( context.xml),并添加以下内容:

    <?xml version="1.0" encoding="UTF-8"?> 
    <Context antiJARLocking="true" path="/app-name"/> 
    

Replace app-name with the name of your application.

将 app-name 替换为您的应用程序名称。

Now your in-place deployment should work. If not, make sure that the file can be read by everyone.

现在您的就地部署应该可以工作了。如果没有,请确保每个人都可以读取该文件。

The context.xmlfile is specific to Tomcat. For more information about that file, see the Tomcat documentation at tomcat.apache.org.

context.xml文件特定于 Tomcat。有关该文件的更多信息,请参阅 Tomcat 文档tomcat.apache.org

回答by Saif

  • Check if there any other instance of the server is running already
  • Check if the port that will be used by the server is free.
  • 检查是否有任何其他服务器实例正在运行
  • 检查服务器将使用的端口是否空闲。

回答by Lucio

Take a look at the server logs!

查看服务器日志!

I had been with this for hours. The awful Tomcat servlet is not very helpful neither but if you can see the stacktrace that should be enough.

我已经用了几个小时了。糟糕的 Tomcat servlet 也不是很有帮助,但如果您能看到堆栈跟踪就足够了。

For instance, I read the following error message there:

例如,我在那里阅读了以下错误消息:

Caused by: java.lang.IllegalArgumentException: The servlets named [DetailsServlet] and [AddToCart] are both mapped to the url-pattern [/carrito] which is not permitted

Caused by: java.lang.IllegalArgumentException: The servlets named [DetailsServlet] and [AddToCart] are both mapped to the url-pattern [/carrito] which is not permitted

As you can see, the message was pretty clear and easy to fix :-)

如您所见,该消息非常清晰且易于修复:-)

回答by prashanth-g

If you add jars in tomcat's lib folder you can see this error

如果你在 tomcat 的 lib 文件夹中添加 jars 你会看到这个错误

回答by Shamsuddin Altamash

Start your IDE with administrative privilege( Windows: right click and run as admin), so that it has read write access to tomact folder for deployment. It worked for me.

以管理权限启动您的 IDE(Windows:右键单击并以管理员身份运行),以便它具有对 tomact 文件夹的读写访问权限以进行部署。它对我有用。

回答by Subramani

Check whether you placed the within the .. or outside the ... If you placed it outside the server tag , and if you try to access the init-parameter then it will give error.

检查您是将 放在 .. 内还是放在 ... 外。如果您将它放在 server tag 之外,并且如果您尝试访问 init 参数,则会出错。

回答by Kenan G?kbak

  • Close Netbeans.
  • Delete all libraries in the folder "yourprojectfolder"\build\web\WEB-INF\lib
  • Open Netbeans.
  • Clean and Build project.
  • Deploy project.
  • 关闭 Netbeans。
  • 删除文件夹“yourprojectfolder”\build\web\WEB-INF\lib 中的所有库
  • 打开 Netbeans。
  • 清理和构建项目。
  • 部署项目。

回答by Mukesh Chauhan

One of the main reason for this error is due to permission not granted to all users. so remove this error, follow the following steps :
1) Go to the C:/Programme Files/Apache Software Foundation/Tomcat 7.0
2) Right click on the Tomcat 7.0folder and click on properties.
3) go to SecurityTab.
4) Select the User and click on Edit... button
5) Grant all the permission to the user and click on applyand ok.
Refresh the system and now try. I hope it will work

此错误的主要原因之一是由于未向所有用户授予权限。因此,删除此错误,请按照以下步骤操作:
1) 转到C:/Programme Files/Apache Software Foundation/Tomcat 7.0
2) 右键单击Tomcat 7.0文件夹,然后单击属性
3) 转到安全选项卡。
4) 选择用户并单击编辑...按钮
5) 授予用户所有权限,然后单击应用确定
刷新系统,现在尝试。我希望它会起作用