MyEclipse 2016 Debugger Using Wrong Version of Code - java

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!

Related

IntelliJ restarts server when updating resources

I ran into this problem at work, where we have a Spring boot Application and deploy the war exploded via a WebSphere.
When I change some static files like the html or JS and try to hotswap the changes via the update resource option, IntelliJ stops the application and deploys it again.
Now I was able to reproduce this problem at home but I still have no idea why this is happening.
I set up a new project with maven and added this example: https://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples/spring-boot-sample-web-static
I downloaded the latest WebSphere and added the maven-war-plugin into my pom and finally deployed the whole thing.
When I change one line of code in the html and try to update the resources which usually should not be a problem the server stops and redeploys the application.
I am using the latest IntelliJ version 2017.2.3 and Maven 3.5.
Does anybody else have this issue or is it something I am missing in my set up?
So I got a response. The whole thing is a bug and will be fixed some time next week. Here is the issue they opened up: https://youtrack.jetbrains.com/issue/IDEA-178845

Netbeans IDE 8.1: The module has not been deployed

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?

Why Intellij deletes obsolete files when trying to run DevMode?

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.

How do I register a Tomcat 7.0.41 server on NetBeans 7.3?

I have just downloaded NetBeans 7.3 for JavaEE and installed it with Tomcat 7.0.41 Everything went fine and I can run NetBeans, start and stop Tomcat from within the IDE and add and remove servers at will.
However when I try and create a Java web Application project my server list is empty.
The message I get at the bottom of the wizard for creating projects is "No servers are registered in the IDE. To register a server, click the "Add..." button.
I have Googled and got nothing and looked at the NetBeans docs and got nothing, help me
I am running Netbeans 7.3, Java 1.7, Tomcat 7.0.41 and Windows xp-3.
This Problem is solved by just Restarted Netbeans Software
Thanks to all
I know the original problem was solved, but I had a very similar issue, and in my case simply restarting Netbeans did not help, so I wanted to help anyone with my issue. It sounds stupid, but I wanted to warn people that they need to be sure to download the right tomcat zip file.
Tomcat lists several zip files on their server, and I should have been using the Windows-64 zip file. Instead, I downloaded the first file, which just said "zip". I am not sure what configuration this was. It ran in windows 7, but created the same sort of mysterious pattern in Netbeans. In the Services tab, I could clearly see Apache Tomcat listed under Servers. If I started the service it worked fine. However, when I right clicked on my project and attempted to resolve missing server problem, it would not list tomcat in the list. The list is filtered to only show servers that are valid with the version of Java EE 6 or whatever you are using. In my case, apparently the original tomcat I downloaded was not valid.
You have to register the server inside Netbeans.
Simply a matter of going to the servers tab under tools & adding a new server & browsing to the installation location.
Follow the tutorial on the link below here (start at the time I have set):
Tutorial
Try this remove all server from the IDE and then double click the netbeans exe go to customize select the the tomcat server alone and then install
sample
Go to Tools -> Plugin -> Update Plugin.Worked for me, give it a try.

NetBeans - Java EE server classpath is not correctly set up - server home directory is missing error

I am getting an error when I try to build my project in NetBeans. I am using JBoss 5.1.0 server and have attached that to my project. The error is -
The following error occurred while executing this line:
.../myPath/build-impl.xml:176: The Java EE server classpath is not correctly set up - server home directory is missing.
Either open the project in the IDE and assign the server or setup the server classpath manually.
For example like this:
ant -Dj2ee.server.home=<app_server_installation_directory>
I am using Mac OS X Lion.
I was missing a library. When I right clicked the project and went to libraries, it showed me library missing. I added the library and did a clean and build and the error disappeared
Clean builds did not help me, either. I took a look at project.properties and found that j2ee.server.home was not set anywhere, although j2ee.platform.classpath depends on it.
I do have Weblogic Server set up under /home (on a Linux machine).
So, I closed the project and added a line to project.properties:
j2ee.server.home=/home/blister/wls/wlserver
(where wlserver = the server name)
And reopened the project. Presto, the app now builds. It still doesn't know where the app server is, but at least I can built my jar and can worry about deploying it later. (I tell it to build a war which deploys nicely to Weblogic.)
If you are using netBeans Ide, then right click on the project. click properties. in the properties menu select Run. in that the first text box is server. There select the server. with which u want to run the project. If the server details are not configured before. configure server details and try. it wil help you to solve the above problem.
This worked for me.
Right click on the Project -> Properties -> Run
And Change the server Setting from the current server to another sever and click OK.
Wait for any background scanning to finish.
Repeat the processes 1 to 3 again this time selecting the actual server you want to run the code on.
Then try Re-Running your application.
I also had this error. However despite adding servers in the Run section of the Properties window, repeatedly no servers showed as being available to add to the Project ( again within the Run section ). The solution to being able to see a server in this server list was to run Netbeans as an admin ( which I saw Rotunba referencing in this thread..It was then possible to add a server and the project built successfully..
I solved it like this, I added in the ANT properties field
"j2ee.server.home=http://localhost/"
tolls>options>java>Ant
this in linux netbeans
It could also be as simple as not running your IDE i.e. netbeans as an administrator on your machine. I had the same problem. Wasted some time.

Categories