Classes not pushed to bin folder - eclipse spring boot - java

I am working on a spring boot project. Whenever I make a change & run as spring boot app , the latest changes are not reflecting. This was working fine for past 3-4 month and I started seeing this issue in the past couple of days. I have been trying to unsuccessfully find the change that may have triggered this issue. For instance , I change the application.properties and run a gradle build. I see the latest application.properties in build folder but the old one in the bin folder. So I am having to manually copy all the modified files under bin folder before running the project as spring app. Can you please suggest as to how I can investigate this further? Thanks.
EDIT: This seems to be impact one specific application and not all the applications in the workspace.

Related

IntelliJ Tomcat serves wrong webapp

I'm using IntelliJ Ultimate to develop a SpringBoot App (+ maven). When i hit run, tomcat still serves a old vaadin project. How can i remove it? I already cleared my browsers cache, tried to load the side in a private browser window and removed the project from the tomcats webapp folder
I think you should try these things:
Change the port number in the application.properties file.
server.port = [port number]
Edit the project's configuration and explicitly add the #SpringBootApplication containing class or just go to the file and run the main() method.
Few things can be checked.
If you are using your local tomcat then verify the tomcat if that is the one you are actually using. Better remove the tomcat and import a fresh one.
or
close the project from IntelliJ and reimport.
clean build maven project and run again.

Problem with creating a Spring Boot Application

i am still a beginner with spring boot, and i have a bunch of questions.
First of all, do i have to download maven in my pc and add it to my pc path envirement to make spring boot work correctly ?
Secondly, Spring boot wasn't able to work, was doing a hello world app and there were lot of errors on the console one of them is "SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".. why that ? i looked for the error and followed some mvn command line steps "mvn dependency:purge-local-repository", and my app finally worked.. but do i have to run this command everytime i create a spring boot app ? isn't everything supposed to be alright since it's only a hello world app ? ..
Thank you
Yes, you need to have installed maven or gradle in order to run your application. And it needs to be reachable, so you have to configure your system variables accordingly.
You can find more details here.
As per the maven error, maven keeps all the artifacts you need to run your application in a shared folder with all versions, sometimes maven could have corrupted files or a mismatch in version so you need to purge the repository and download artifacts again.
You can find a more detailed answer here.
Even when you are coding a simple application, spring-boot bring up a lot of code for supporting operations you may require, such code is self configured and hidden.

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

Warning: No deployer available in JDeveloper

I couldn't find any info in google on this one, someone changed properties on a project and I'm not sure why the project can no longer deploy to jar. It compiles ok, but won't build into a jar file even though the dependencies do so just fine.
Has anyone run into this issue in JDeveloper before?
I can rename the jar to a different name (it's a dependency as well) but I need that specific name to match up with the other project.
I'm working with JDeveloper 10g and the project has been building fine for the last few months, and just now I'm getting this error which I can find no source or help on.
I've fixed it, it plagued me for 3 days.
The project itself had some deploy profile stuck in it, directly in the properties file of the project, not the external "blah blah.deploy".
When looking under the "Miscellaneous Files" area I noticed an extra deploy file, i.e. two deploy files in that area even though I hadn't deployed yet. This is how I figured out it was stuck in the project properties not in the external files. Removing one of these from the project fixed the issue, although I imagine ridding the project of both and creating a new deploy profile (still need to do this) would also fix it.
10g for the lose :p

Roo doesn't update class-files anymore

After working for weeks on a Roo Project mine stopped to update the .class-files inside the directory:
Project\src\main\webapp\WEB-INF\classes\com\company
and
Project\src\main\webapp\WEB-INF\classes\com\company\web
When I deploy with STS on the local Tomcat it used the new class-files but perform package command used the old one from the locations mentioned above.
Once I deployed the war-file to a remote server I got silly errors.
It took me like one workday to figure out what is going wrong.
How can I make Roo update the .class-files again? I tried poll now but it finishes within one second without any results.
Have you tried doing a perform clean from within the roo shell? This should remove the target folder and rebuild all your class files.

Categories