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

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

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.
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.
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
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.

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.

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:
As you can see, the message was pretty clear and easy to fix :-)

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.

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

Close Netbeans.
Delete all libraries in the folder "yourprojectfolder"\build\web\WEB-INF\lib
Open Netbeans.
Clean and Build project.
Deploy project.

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

if you still getting this error try this.
Go to Netbeans services
Remove Apache Tomcat.
Add Apache Tomcat again.
Build Project.
Deploy Project

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

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.

Related

Run JSP from netbeans project in Tomcat Server

Hi I already develop my application using Netbeans IDE.
Now I want to run my application in Tomcat server for actual use. I already copy my project to tomcat/webapps.
But when I tried to run my application:
http://localhost:8081/myAppFolder/
it gives me an error message :The requested resource (/Opportunities-Registration/) is not available.
I should change the url to make it work:
http://localhost:8081/Opportunities-Registration/web/index.jsp
How can I open my application using http://localhost:8081/myAppFolder/ insteand of http://localhost:8081/Opportunities-Registration/web/index.jsp ?
Update:
All my servlet is also become 404 not found
Thank you
SOLVED
Solution:
1. copy .war file which is contained in dist folder of your netbeans project
2. Place your .war file to tomcat/webapps
3. Start your tomcat
4. You are good to go

Enable Tomcat localhost/Catalina Log in IntelliJ IDEA

I'm attempting to run a Java/Spring/Hibernate/ application using IntelliJ 13 and its built in Tomcat deployment plugin. When debugging a buddy of mine has the following logs.
I was wondering how to enable the logs that are in red, currently in my IDEA. I have tried the following solution.
Heading over to the Run/Debug Configurations Tomcat server and clicking on the log tab and enabling the logs
I appreciate any help or tips in advance. Thanks guys
If I am understanding your question correctly, you are not sure what to set in the "Log File Location" field of the "Edit Log File Aliases" dialog.
When you create a Tomcat Run/Debug configuration, IntelliJ IDEA creates a TOMCAT_BASE directory as {intellij_system_directory}\tomcat\{run_configuration_name}_{project_name}. (TOMCAT_HOME identifies where the binary files are and TOMCAT_BASE defines where an instance of tomcat is. Sometimes they are the same. In this case, they are not.) The {intellij_system_directory} directory is usually in ~/.IntelliJIdea13/system where ~ is your home directory (C:\Users\{username} on windows). See the document Directories used by the IDE to store settings, caches, plugins and logs. You can also go to Help > Show Log File which will pen the directory {intellij_system_directory}\logs. Just go up one directory and then into tomcat.
Just set the path to the appropriate logs directory. You can use ant file patterns to deal with dates. For example, for my Tomcat Run\Debug configuration named "My Web App" in "My Project", to view the catalina.log file, I would set the path to C:\Users\Mark\.IntelliJIdea13\system\tomcat\My_Web_App_My_Project\logs\catalina.*.log. The * wild characters the date stamp in the log name and IDEA will always open the latest/newest one.
Also take a look at this post -- https://devnet.jetbrains.com/message/5529312#5529315 -- of mine for information on a minor bug with naming of the tomcat base directories.

How to run jsp pages in eclipse using tomcat server?

![I want to run java program in a web browser. I installed tomcat and eclipse. but i am getting an error "Starting tomcatv7.0 server at local host". How to solve this error? Please help me. I have attached the error page:
First check whether your TOMCAT_HOME\bin contains bootstrap.jar.
Second, go to your project build path and remove reference of bootstrap.jar and then try to run the application.
Regards,
Bipul Sinha
it seems that u need to put bootstrap.jar in your tomcat's bin folder.
upd
try to delete tomcat's configured server from eclipse and add newone
upd
goto Run -> Debug/Run Configuration -> Classpath tab and check your bootstrap.jar path is correct

Tomcat server could not start

I am developing a dynamic web application on JBoss developer, but I am getting an error message:
Could not load the Tomcat server configuration at
\Servers\Tomcat v6.0 Server at localhost-config. The Servers project
is closed.
Even when I try to start the server on the servers tab, it doesn't start.
Any suggestions?
Sounds to me as if you're doing this inside Eclipse with WTP?
If so then you need to make sure that the Eclipse project called Servers which is created and maintained by WTP is open.
Open the Navigator view
Locate the Servers project
right-mouse click
Open Project
You have been closed server project in eclipse which will come by default after adding tomcat into eclipse. So try to open server project and start Tomcat it will Work..
Steps:
Go to project explorer.
Double click on server project.
You installed Tomcat v6 within eclipse using the “Add server” wizard and the “download and install” button.
You tried to start Tomcat and got the following error:
****“Could not load the Tomcat server configuration at /Servers/Tomcat v6.0 Server at localhost-config. The configuration may be corrupt or incomplete”****
How to solve:
1) . Close Eclipse
2) . Copy all files from TOMCAT_6_HOME/conf to WORKSPACE_FOLDER/Servers/Tomcat v6.0 Server at localhost-config
3) . Start Eclipse
4) . Expand the Servers project, click on the Tomcat 6 project and hit F5
5) . Start Tomcat from Eclipse
6) . Enjoy!!!
Just after many trying I got the solution for this problem. The problem is when your server is created using your IDE(Eclipse, JBoss or any) that time the server is not getting the configuration file. To resolve this problem you need to copy all the configuration files from the tomcat conf directory to your IDE server directory. If I will step out the solution than I can list the steps as-
Locate your Tomcat installation directory
Find the conf directory, sometime you will get it into skel directory
Copy all the files from conf and now change the directory to your IDE workspace
In Server directory paste all the files in your Tomcat configuration directory.
If you are using a Linux-based Eclipse:
Check user and group ownership and permissions to your server directory and subdirectories inside Eclipse. It MUST allow read-write config files by the current Eclipse user. Test it copying config files directly to it and, after that, accessing it through Eclipse text/xml editor.
It's usefull too to check the same for tomcat directory, because Eclipse may be bloked if its owner doesn't have permissions to access that files.
the solution to this problem is :
cd /usr/local/tomcat//conf
chmod 777 *
and it's done
I got the same issue. This is because it's missing "Servers" folder that contains Tomcat in Project Explorer. I already downloaded and configured my Tomcat, but after I created another new java web project, Server stopped working.
To solve this problem right click on "Tomcat v6.0 Server at localhost
[Strated,Synchronized]"
at bottom of your Eclipse.
click "General"
click "Switch Location"
click "Apply"
enter image description here
This usually happens when the "Close unrelated projects" button is clicked. A simple and straightforward solution to this issue:
Go to the bottom of the Project Explorer tab and there will be a project named "Servers". If it's closed, the icon will have a different color than the projects that are open.
Double-click on "Servers". Now the project will be open and this issue will get resolved.

How to make the application context run as root in Spring 3 MVC and eclipse

I’m trying to develop a Spring 3 MVC application using the Springsource Tool Suite/Eclipse IDE.
My current application context in STS/Eclipse is /localhost:8080/realtyguide/
What I want is to access the application as root using just /localhost:8080/
I tried in eclipse.. Project > Properties > Web Project Settings > entered “/” for Context Root . But this just returned a “404 error - requested resource (/) is not available” after executing the app. And it also broke the app. So I just put context root back to 'realtyguide'.
I deployed the app to my webhost on a Tomcat server. I edited the server.xml’s and elements and so I was able to bring up the index page with the url www.mydomain.com.
However, the links to the other pages are broken. It is also not picking up the static resources for the index page like css and jquery files.
I believe this is caused by my app’s application context of /localhost:8080/realtyguide/ in eclipse (in my development pc). The rest of the pages returned by my controller has a url of /localhost:8080/realtyguide/page_name
How do I change my app’s application context to run as root in eclipse, as in simply /localhost:8080/. So that my pages would be called as simply /localhost:8080/page_name
Is the solution a setting I should make in my web or Spring configuration files or in eclipse?
I’ve tried googling this but have not found a clear, definitve answer. I am very new to this and a detailed answer from you will be of great help.
Thanks to the other answers provided. However, it doesn't address my main objective - to run the app as root inside eclipse.
This is how I was able to do it. I changed Tomcat's conyext path in eclipse.
Do the following:
Right click on the server name from the Server Console > Open
Click on the Modules tab
Click on a module then click the Edit button
Edit the entry for Path to the desired context path then click
OK
You need to make your web-app the "default" application, ROOT. There are step-by-step instructions on the Tomcat Wiki, at http://wiki.apache.org/tomcat/HowTo#How_do_I_make_my_web_application_be_the_Tomcat_default_application.3F.
One way is to name the war simply ROOT.war (uppercase).
This works only if you deploy not from eclipse
If you have done your links/urls with <c:url> or <spring:url> then it should work without problems.
Simply change server.xml in Tomcat Server.
Package Explorer > Servers
expend path Tomcat vX.X Server
open server.xml
go to Server > Service > Engine
find your Context and change path to value "/"
restart the server!

Categories

Resources