I'm using Netbeans 8.1 with Apache 1.7.1. I've been working on the project for more than a year now, on and off. It's been working perfectly more or less. The majority of project libs are inside server lib folder.
All of a sudden it is decided to remove rich faces libs from the server on Production and include them inside of the project - not my idea, but here we are. So I remove the libs from server on my machine, include them in project libraries, and the aforementioned error appears just like that:
...\build-impl.xml:1066: The module has not been deployed.
See the server log for details.
But the server log is clean and without errors.
I tried restarting server, Netbeans, pc and whatnot, but to no avail. I decided to take a step back: remove libs from project, copy them back to sever. But the problem remains.
I've tried solutions from at least three topics here: disabling network, cleaning Netbeans cache, ending Java task and others, but the problem still remains. Is there anything else that can be done?
Related
My team is working on a Java application that runs on Jboss WildFly, using Maven to resolve dependencies and Primefaces.
We're using Eclipse to build, deploy and run the server. Eclipse does most of the work, building the WAR file, deploying it to server and running it.
Now we need to create an script that performs all those steps because it has to run on remote server.
.
The steps would be something like this...
1 Run Maven:
$M2_HOME/bin/mvn clean install
2 Build project to a war file
3 Deploy war file into the WildFly deployment folder
$WILDFLY_HOME/bin/jboss-cli.sh --connect --command="deploy --force [PATH_TO_WAR]"
4 Start server
$WILDFLY_HOME/bin/standalone.sh
.
I can perform every step but once the server is running it don't seem to be any changes in the application. I think this is because the WAR file has to be built optimizing it for JBoss. Eclipse has a way to do this when exporting the project. I need to know how to do that from command.
EDIT:
The real problem is that Jboss is not updating the published project when i run it from bash script. I thought it was because i had to build it on a specific way. I was wrong. The build is fine, just running Maven the deploy is done. The thing is that even if i rebuild project and redeploy it, server doesn't seem to notice at all.
I've tried deleting tmp, lib and data folders from standalone folder, and nothing happens. I also deleted standalone/deployed sub files and folders and got the same result.
The only way i achieve the result i'm expecting is getting into Eclipse, go to Servers tab, right click on JBoss Wildfly and click on 'Clean...'. This options seems to clean cache, rebuild and re publish the application in a right way that i don't know. I didn't find any answers on google.
eclipse server clean option
Give a look on Eclipse war export: optimize for a specific server runtime.
Quoting from #Konstantin Komissarchik's answer :
Eclipse itself doesn't do anything with that option. What happens is
dependent on a particular server adapter. Many of the adapters don't
do anything with this option either, but they might in the future.
If a server adapter does support export optimization, it has the
option of displaying custom options beneath that pop-up list of
runtimes, so that's a good cue to use to see if something will
actually happen.
So taking in consideration that in your provided image there is no custom options below Wildfly 9 selection, I am pretty sure that this option does not perform any optimization at your exported war so you can totally omit it in your new build-deploy process.
How can i build the war file from command, knowing it will have to run on Wildfly?
We are also deploying applications for a long time on several versions of Widlfy with the same approach as you are planning to, without the optimization thing. I can ensure you that we have not faced any performance issue.
I just updated to MyEclipse 2016, and I am having some issues getting my code to debug.
I wrote some changes in a java file and am trying to debug them on my websphere application server, but I noticed the debugger wasn't following the code at all. After a little investigation it turns out that I'm on V5 of the code, but the debugger is running V4 of the code.
I've tried going into the menu at
Run -> Debug Configurations... -> (Select My Server) -> Source
and changing the sources listed in here to just the workspace projects, but the debugger still goes through the old version of the code.
I'm at a loss and don't know what to do to get the debugger to pick up the right code. Does anybody have any suggestions I could try to get my debugger to pick up the new version of my code?
Edit: Forgot to include, Project --> Build Automatically is checked in the menus, and I have tried manually cleaning this a few times myself as well.
From your last comment, this means that the V4 code is actually executing on the server. The debugger is not executing anything; it is the server that is executing the code. So you have the wrong version deployed, somehow. Try a clean on the server, to remove any deployments and then re-deploy your project.
Given what everybody had said I checked into the deployment to the server. Looks like I had a WAR deployed to my server, when there is actually an EAR I can deploy to the server which includes the WAR I had deployed. Apparently doing just the WAR broke things, but deploying the EAR seemed to fix it all. Thank you all for the input though, definitely helped me get to the root of the issue!
I downloaded Eclipse Luna and Tomcat 8.0.24 some months ago but I started using it. I've been creating a web app without Maven. I downloaded manually Jersey 2.23, Jersey media moxy 2.23, java-son 1.0 , jdbc mysql 5.x and sql2o 1.5.4. I'm starting to learn Angular and I successfully created one page without any issue.
I remember have added my jars manually in the Build Path of my project and I was forced to add them in the Deployment Assemblies also. Fine.
Since 2 weeks I didn't shutdown my laptop, just in sleep mode. But yesterday I did shutdown. Since then I suffered to make it work again. I use postman chrome to test my restful services and I received after the shutting down the 404 error.
I realized that I started to see the exception in the console:
java.lang.ClassNotFoundException: org.glassfish.jersey.servlet.ServletContainer
I deleted my folders of tomcat and eclipse to start again from scratch desperately. However, I got the same issue. The last thing that I remember I was playing with, were these modified options.
Double click in server from servers tab
Change from Use workspace metadata to Use Tomcat installation
Properties in Server
Switch Location from metadata to localhost.server
It was thanks to these questions that I solved my issue:
org.glassfish.jersey.servlet.ServletContainer ClassNotFoundException
java.lang.ClassNotFoundException: org.glassfish.jersey.servlet.ServletContainer
Now, after "reinstalling" eclipse and tomcat, when I add the jars in the library tab, they are now added in deployment assemblies automatically. (Surprised)
According to the previous attached questions, I added all the jars in WEB-INF/lib from my workspace as also in the tomcat/wtpwebapps/myproject/WEB-INF/lib. If I don't do this, I won't be able to make it work. Postman finally gives me the desired output.
Nevertheless, I realized when I copy the jars manually through windows explorer, the console in Eclipse displays the tomcat restarting again. BUT I still see the exception: java.lang.ClassNotFoundException: org.glassfish.jersey.servlet.ServletContainer. At least I can run my project in the browser or in postman without any issue. Very strange.
I want to add a new User Library in Windows > Preferences > Java > Build Path > User Libraries, but my list is EMPTY!!! So...
Finally, my questions:
What's going on with Eclipse?
Why am I not able to see my user libraries previously added?
Why do I still see the exception of glassfish.jersey in the console if I added the jars in the web-inf folder which makes it work apparently.
Why do I need to add the jars in web-inf, if when I see all the jars included in the Tomcat library all my jars are there because I forgot to mention that I added a folder called External in lib of my Tomcat folder.
For all these changes, I restarted Eclipse
Instead of adding jars manually, use maven and let the maven manage dependency of jars.
ClassNotFoundException occurs when you don't have a jar in the classpath. Maybe the package you are deploying on the server is not bundled correctly. Make sure you have jar bundled in your package or present in the classpath.
Another reason could be you have duplicate class files in two jars and the class your programme picking is not suitable.
I'm currently working on a GWT project in my company. Although DevMode works perfectly fine in eclipse, I still want to use Intellij Ultimate Edition for development.
But after all setups were done (Facet, Run/Debug configuration) I'm getting this weird processing window saying "Deleting Obsolete Files..." when I run the program and after that all my pre-deployed resource files in the war directory were gone (recursively...).
BTW, I use a script to deploy all my stuff. And the only argument I set for DevMode is:
-war /absolute/path/before/war/folder/war
Does anyone know the reason why Intellij is deleting my files?
After sending a request to Intellij support team, they gave me the following answer:
Adding the following two lines to the IDEA_HOME/bin/idea.properties file:
idea.gwt.clear.unit.cache.before.run=false
idea.gwt.clean.files.created.by.dev.mode=false
Which makes sense, because the only thing I need is to prevent Intellij from deleting my local cached files. Problem solved.
I switched to IntelliJ from Eclipse and never had a problem with GWT debugging in IntelliJ. It is most likely deployment-related.
First, I use Tomcat on the client side just like I'd use it in production. No built-in Jetty. Specify -noserver in Dev Mode Parameters. And make sure to start you server (in Debug mode since you are likely to debug it as well).
Other than that you may be doing custom build/deployment which is causing it. I do everything by the book. IntelliJ is Maven-centric, so it needs to be a textbook Web App module. Unlike Eclipse you don't need to specify where you war directory is. It is "webapp" per Maven convention. I suggest recreating the module from scratch.
if someone could help that would be amazing.
This project is being started in the NetBeans IDE EE version that comes with GlassFish Server. I've used Lucene to make a searchable twitter index of ~5G and am getting the NoClassDefFoundError only when called from the server giving a 500 Page Error.
The problem really confuses me, NetBeans is able to compile and run the code. When I call my functions from the same project in the IDE I'm able to use it perfectly. When I compile to a WebProject and launch it seems like GlassFish isn't able to find the files but I've made sure it has all the jars in the WAR file in the proper directories.
I've tried this both manually adding all the library files and by using Maven. Neither have worked, I've even added classpaths to the files elsewhere and added the files to glassfishes /lib folder.
Here is my setup.
http://imgbin.org/images/22748.PNG
I guess the problem is that you are mixing two different versions of lucene together (3.4 and 4.0).
I don't know why this works on your local Glassfish instance but you should update your dependencies so that they all have the same version.