3

I just installed netbeans and I have problems deploying a new Java Web App. I simply create the project without editing anything, this is what project has by default (using apache):

index.html

<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
    <title>TODO supply a title</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
    <div>TODO write content</div>
</body>
</html>

The errors:

init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
In-place deployment at C:\Users\2kGamer\Dropbox\Projects\Java\NetBeans\DAW 2\WebApplication1\build\web
Deployment is in progress...
deploy?config=file%3A%2FC%3A%2FUsers%2F2kGamer%2FAppData%2FLocal%2FTemp%2Fcontext4402830100786872488.xml&path=/WebApplication1
 http://localhost:8084/manager/text/deploy?config=file%3A%2FC%3A%2FUsers%2F2kGamer%2FAppData%2FLocal%2FTemp%2Fcontext4402830100786872488.xml&path=/WebApplication1
C:\Users\2kGamer\Dropbox\Projects\Java\NetBeans\DAW 2\WebApplication1\nbproject\build-impl.xml:1045: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 51 seconds)



build-impl.xml:1045 
<target if="netbeans.home" name="-run-deploy-nb">
    <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
</target>
Alpha2k
  • 2,212
  • 7
  • 38
  • 65
  • Not entirely sure what your question is? Why the module hasn't deployed? – Bono Feb 27 '15 at 12:21
  • @Bono pff not sure, was something related to the ports windows would block, after reboot I was able to open the ports when netbeans would ask for it. – Alpha2k Feb 27 '15 at 12:35
  • Ah I see you've already posted an answer. Don't forget to accept it when you can! – Bono Feb 27 '15 at 12:36

9 Answers9

28

I've had the same issue every now and then. This is how i solve the issue, it works like a charm for me!

  1. Go to 'Task Manager'
  2. Choose 'Processes' tab
  3. Click on 'Java(TM) Platform SE Binary'
  4. Click on 'End Process' button
  5. Go to your NetBeans project
  6. Clean & Build the project
justrandom
  • 403
  • 4
  • 12
  • Worked on Netbeans 11.1 too ! – celsowm Aug 09 '19 at 01:46
  • 1
    I'd just like to point out in Windows 10 it's possible you need to expand the NetBeans IDE process by clicking the grey ">" symbol. Then the Java process will show as a child to that. – bupereira Sep 06 '20 at 00:18
2

In my case I had to run Netbeans as administrator, that solved the problem for me. I'm using Apache Netbeans IDE 11.0

ricardo130
  • 155
  • 2
  • 4
0

UPDATE: this was solved by rebooting but there was another error when running app. This time tomcat woudnt start. To solve this (bugs with latest apache and netbeans versions) follow: Error starting Tomcat from NetBeans - '127.0.0.1*' is not recognized as an internal or external command

Community
  • 1
  • 1
Alpha2k
  • 2,212
  • 7
  • 38
  • 65
0

In my case I had installed a new version of netbeans and upgraded from java 7 to 8. The new netbeans had a different version of glassfish, so I opened the properties of my project and pointed it to the right glassfish version and set the jdk to version 8.

Fred
  • 332
  • 4
  • 5
0

I had the same error here but with glassfish server. Maybe it can help. I needed to configure the glassfish-web.xml file with the content inside the <resources> from glassfish-resources.xml. As I got another error I could find this annotation in the server log:

Caused by: java.lang.RuntimeException: Error in parsing WEB-INF/glassfish-web.xml for archive [file:/C:/Users/Win/Documents/NetBeansProjects/svad/build/web/]: The xml element should be [glassfish-web-app] rather than [resources]

All I did then was to change the <resources> tag and apply <glassfish-web-app> in the glassfish-web.xml file.

0

Sometimes this happens because some library that you put in your code there isn't added, verify all libraries that you are using.

To add a new library in netbean:

  • Rigth click in libraries folder.
  • Click in add library.
  • Select the library that you need in Available Libraries, or import it from Global Libraries (clicking in Import button).
  • Finally click in Add library to be sure that your library is added.
jomitame
  • 301
  • 3
  • 4
0

Try to change Tomcat version, in my case tomcat "8.0.41" and "8.5.8" didn't work. But "8.5.37" worked fine.

Seymur Asadov
  • 612
  • 5
  • 19
0

the solution to this problem differs because each time you deploy the application will give you the same sentence or the problem is different, so you should see the tomcat server log for the exact problem.

-1

Maybe because you may need to create Db Resource and Pool manually on the Glassfish server like this,

In Netbeans -> Projects, Open Server Resources -> glassfish-resources.xml We have to create JDBC Resource and JDBC Connection Pool Manually on Glassfish. I am using my values here, don't use them, see your .xml !

Value of jndi-name is your JDBC Resource and Value of pool-name is your JDBC Connection Pool.

Open Browser for Glassfish Admin, https://localhost:4848/

Go to, JDBC Connection Pool -> New: 1) Pool Name: mysql_customersdb_rootPool 2) Resource Type: javax.sql.ConnectionPoolDataSource 3) Database Driver Vendor: MySql

Press Next,

URL: jdbc:mysql://localhost:3306/customersdb?zeroDateTimeBehavior=convertToNull Url: jdbc:mysql://localhost:3306/customersdb?zeroDateTimeBehavior=convertToNull User: root Password: root

JDBC Resources -> New

JNDI Name: CustomersDS Pool Name: mysql_customersdb_rootPool

Press Ok.

Right Click your Project and Press Run :)