11

I have been working on a Java web application and i am using SmartGwt on Netbeans 7.3 and out of a sudden I encountered this problem. I tried cleaning the build-impl.xml then 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?

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

xrcwrn
  • 5,339
  • 17
  • 68
  • 129
Kromer
  • 125
  • 1
  • 2
  • 9

10 Answers10

10

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, NetBeans fails to create a context.xml file.

  1. In your project under Web Pages, create a folder called META-INF.

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

New->Other->Other->File Folder

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

  1. Create a file called context.xml in the META-INF folder.

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

New->Other->XML->XML Document

Name it context (NetBeans adds the .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"/> 
    

Replace app-name with the name of your application.

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

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

xrcwrn
  • 5,339
  • 17
  • 68
  • 129
Zero-dev
  • 340
  • 6
  • 17
  • i have same problem but with the glassfish can i use this solution? – Antwan Dec 25 '13 at 16:25
  • 1
    Yes. @Tony. You can use it. If you want to switch from Tomcat to Glassfish server,Right click to your project name in project explorer. Go to properties-> categories-> select run option. And change the server. – Yash Jan 30 '14 at 16:13
  • This answer is still relevant! – Burrito Oct 19 '17 at 22:43
6

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.

Shamsuddin Altamash
  • 163
  • 1
  • 3
  • 11
3

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.

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

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

Lucio
  • 4,753
  • 3
  • 48
  • 77
2
  • 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.
Saif
  • 6,804
  • 8
  • 40
  • 61
1

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

prashanth-g
  • 1,183
  • 2
  • 13
  • 28
0
  • Close Netbeans.
  • Delete all libraries in the folder "yourprojectfolder"\build\web\WEB-INF\lib
  • Open Netbeans.
  • Clean and Build project.
  • Deploy project.
0

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.0 folder and click on properties.
3) go to Security Tab.
4) Select the User and click on Edit... button
5) Grant all the permission to the user and click on apply and ok.
Refresh the system and now try. I hope it will work

Mukesh Chauhan
  • 791
  • 8
  • 9
0

if you still getting this error try this.

  1. Go to Netbeans services
  2. Remove Apache Tomcat.
  3. Add Apache Tomcat again.
  4. Build Project.
  5. Deploy Project

enter image description here

0

in my case , it said that the 8080 port is in use , so I change the server port of Tomcat to 8081 and it works

-1

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.

Subramani
  • 47
  • 5