Hi!
So first; funny story about how I got here; if you don't want to read a funny story and you just want to read the problem description, skip this paragraph: This Monday I scheduled a meeting with one of my company's owners to demo the new features we've added to the site over the past few months because we're hoping to release them soon. Then about 15 minutes later I had the horrible realization that there was a *huge* unaddressed issue with the features we'd added which was going to ripple through the entire program architecture and break some things which are at the heart of our web application. We hadn't noticed it before because by incredible coincidence, 90% of the time it looked like it was working perfectly even though you were technically never more than a few clicks away from a 500 error or some horrendously wrong data showing up on the screen. In our database, a formerly one-to-one relationship (which was built on some assumptions about the data in multiple fields instead of an actual unique key) had been turned into a many-to-many. So we had a couple tens of thousands of rows in a database that needed to be associated with each other, and when I saw how they used to be associated I wasn't even sure it would be *possible* to put the puzzle pieces back together. So panic panic panic, the next day I spent from 8:30 to 1:30 PM figuring out how to knit the data back together, which involved writing a new
java program to run a stupidly weird query for every row in the database to find the associated rows and set the values of two new columns in the database, then I spent from 1:30 to 12:30 AM adjusting all the code that used that table so it would use the new field and insert the right stuff into it on save, and chasing the ripple of this architecture change through the entire project.
Then at 12:30 AM, when I was finally ready to deploy the project to the live
test server so the upper management people could use it during the demo the next day, it suddenly started throwing
servlet exceptions every time I went to a certain page on the site, complaining that it couldn't find a class file which it totally should have been able to find, and my console started filling up with a horrifying endlessly cascading error message about a
jsp associated with a completely different project which was not just "not running at the time", but had been undeployed, closed in netbeans, and deleted from the server and my netbeans projects folder hours ago. Why it suddenly decided to resurrect it and try to look at that jsp, I have no idea, but apparently something caused an issue in my
tomcat server *and* in a totally unrelated error, netbeans stopped compiling class files correctly. It compiles most of them, but there's a few files which, when I compile my project and look in the build folder, are just totally missing. So around 12:30 AM yesterday I'm figuratively running around like a headless
chicken trying to figure out why my compiler suddenly hates me, I haven't taken a break since 8:30 AM, and I'm about ready to shatter the windows with computer equipment and ask for my job back at Max and Erma's. But not really since I was slowly going nuts when I worked there and not getting paid nearly as much.
Yet, in spite of the story I just recounted, this is not urgent anymore. I am still sane and my windows are intact. I threw the code into another computer, compiled it there, and it built just fine, so the code itself is not the issue, and I was able to use the build produced by *that* computer to deploy to the live test server, and the demo went great. Also I have a laptop and a desktop, and only the laptop's environment is totally screwed up, so I can still do work on the desktop if need be but I'd really prefer to have a working environment on both of these machines.
SO. The actual error being thrown in the console reads as follows:
Jan 28, 2016 11:06:29 AM org.apache.struts.action.RequestProcessor processActionCreate
SEVERE: No action instance for path /<TheActionPath> could be created
java.lang.ClassNotFoundException: <something>.<myCompanyName>.actions.<subsetOfActions>.<TheStrutsActionUsedByTheActionPath>
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1722)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1573)
at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:207)
at org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:231)
at org.apache.struts.action.RequestProcessor.processActionCreate(RequestProcessor.java:326)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:268)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
Until you navigate to something that calls the missing class, it looks like everything is working fine. Also I've fiddled with the server and undeployed and redeployed contexts, looked for memory leaks, found and fixed memory leaks, and I think anything that was wrong with the server itself is fine now, but there's definitely still something wrong with netbeans. But it must be a related problem somehow because fiddling with the server had an effect on netbeans' behavior. Earlier, netbeans was failing to compile a java class that made a
struts tag. Now it's failing to compile a different java class that makes a struts action. At some point it was also failing to compile an object factory class which didn't use anything from the struts library, so sadly I don't think we can assume it's a problem with something in struts. What's even stranger is there don't seem to be any errors thrown in the netbeans console during build; if I hit clean and build, Netbeans gets all proud of itself on and says "I did it!", then I go look at the build folder and stuff is missing, and I want to tell Netbeans but I don't know how. And it seems so please with itself I hardly have the heart to tell it even if I did know how.
So this is where I'm at now. I haven't been able to find a
pattern in the files it fails to compile, but I do know that the files it fails to compile are consistent between build attempts, and somehow, changing things in the tomcat environment has an influence on *which* files it fails to compile.