Spring web application. Can't Run on Server -> 404 error - java

Here is the problem. I have a Spring web application which I develop on two computers: one with Windows another in Linux, and I share the code via github.
So far I did not have any problems until recently. I can't run in on linux. I get 404 error. At the same time it's working perfectly fine on Windows. I even managed to run it on a completely different computer (fitted with Windows).
Both laptops were switched to Java 8 and that was my primary suspect but so far I couldn't find anything that would cause this issue..
I would appreciate if somebody pointed me the way to fix it.

Related

Java WebSphere server stop randomly when debugging in IntelliJ IDEA

I'm running a Java server and it works fine by now but recently it stops sometimes when I'm debugging my code. I don't know if the problem is due to java class is using many request/response API or it can be something else.
Have you got any ideas or met this issue before?
Best regards

Java reflection property works in Linux but not Windows

I'm working on some code that is acting strange. The code is using the Java reflection property, loading the method name from a JSON file. Works perfectly in Linux, yet, importing and running the same code in the same IDE, with the code running in the same version and profile of a Websphere Application server setup, they are both using the same source files through a file server mount. Other parts of the application manipulate these files without a problem in both environments. Yet, somehow in Windows, it is unable to load the method from the file while Linux can. Stepping through the debugger in Windows I find that the null pointer error occurs at the time of trying to dynamically load the method, while stepping through the code in Linux in the same manner it simply proceeds where Windows gets stuck without issues. I'm getting this null pointer error from the application pointing to a method that does not exist due to the failure to load:
java.lang.NullPointerException
at com.mpi.factory.ToolStateFactory.getToolStateExtended(ToolStateFactory.java:19)
at com.mpi.factory.ToolStateFactory.getToolStateExtended(ToolStateFactory.java:33)
at com.mpi.factory.ToolStateFactory.getToolStateExtended(ToolStateFactory.java:41)
Given that the JRE is supposed to be portable and it shouldn't matter in what environment it runs, I suspect it's related to the OS. Has anyone experienced this issue before? I'm wondering if it's something that needs to be addressed at the OS level, or Java security settings? I know Windows is a bit more glitchy when it comes to drive mounts than Linux. I'm wondering if it's an obvious, well known issue with J2EE projects trying to use reflection in Java. I really don't think this has to do with the Webpshere, or project settings (Classpath, Deployment Descriptor, etc) since they are identical in both environments. Can't really find anything online about this quirk.

Unable to run existing java Play Framework project on windows machine

I'm getting
Error: Unable to access jarfile C:\Users\stepa\workspace\sse-chat-java\\activator-launch-1.1.0.jar
when running Markus Jura's Play Framework simple chat application on windows 10 system.
On a Ubuntu machine Markus Jura's Play Framework simple chat application works without any problems.
This is what I tried so far:
reinstalling Typesafe Activator to the currently newest version (2.4.3 - same as on Ubuntu machine)
searching for activator-launch-1.1.0.jar (not present on any of the machines)
searching for someone with same problem
I'm running out of ideas. I appreciate any suggestions.
There are 2 places where you may try to change version. See image below (but please also check another file).
I'm not sure it will fully fix your issue, but it worth a try.

Why Java Applet working only on my computer, but not on the others?

I just wonder something about java applet with awt. I quite disappointed with this problem and want to throw it away sometimes. Below are my descriptions:
I already created one application using java applet with awt controls on my own computer, let's say computerA using Window 7 32bit Operating System. To up and running this application, I update java version to the latest one.
Application is working fine with computerA. However, this application also need to run on the others as well. As my own situation, I run with another computer, let's say computerB using Window 7 64bits Operation System. I knew that the application created with 32bits java version, thus I decided to install this java version on computerB. However, when I run the application it can only display interface on browswer, but some of its function did not work.
Yet I didn't throw it away, I decided to configure in the last computer, let's say computerC. This computer use Window 8 32bits Operating System. I did configure as I did with computerA and computerB. The result is still exact as computerB.
I also checked up this solution on here, but it is not fit my problem.
Here are my questions:
What is the exact problem on here?
Where does the problem come from?
Is it solvable?
How can I solve this kind of problem? Any helps?
Update:
PostgreSQL Database also install in other local computers as well.
I noticed that If I convert my code into eclipse project, it worked fine. No problem at all.
Thanks in Advance.

Debugger not stopping at breakpoints: Websphere in Eclipse

I've recently had my app moved from Websphere Application Server 6.1 to WAS 7.5, due to end-of-life for 6.1. Consequently, I needed to update my debugging server. I found this to be an opportune time to move my application from an IBM RAD IDE to Eclipse (already had Indigo installed). Or so I thought.
Anyway, the powers that be, here, have recommended taking my debugger all the way to WAS 8.5, since I'm only using it to debug.
But the issue that I'm encountering is that I cannot get the debugger to stop on my breakpoints. I've got approx. 10 breakpoints in my opening page, all in JSP/Java code.
I'm running Java 1.6.0_32 and Java SE Runtime Environment build 1.6.0_32-b05. I really don't know how to check which JDK I've got loaded. I've seen recommendations to "go back" to JDK 1.5, but I can't be certain that's not what I'm running.
And to cover a few other bases, I have JUST started my system for the day, opened the IDE, started the server in debug (says "Debugging, Synchronized"), put focus on the opening page of the application and clicked "Debug on server". The front page opens without stopping at any of the breakpoints.
Does anyone have ideas or suggestions?
If you use eclipse's debugger and running the application outside eclipse environment , we have to configure it as remote java application.
Also check if the code deployed in server is in sync with the one present in workspace.
anything wrong of the ecplise's site.
Run->Skip all breakpoints
Well, I had recently faced this problem, where the code did not use to stop at breakpoints while I was in debugging mode and was sure that the particular piece of code is executing. In order to solve the problem, I did a clean-build-republish but it did not work, recreated the profile and readded the server with new profile, still did not work then finally re-installed RAD and web-sphere but It still did not work. Then I found the below article
https://www-304.ibm.com/support/docview.wss?uid=swg21240896
and realized it could be a problem due to some other OS process interfering with debug process/port so I performed a system restore. After restore when I deployed the application, debugger started working properly.
I'd like to say I found the answer to this, but I never did. I ended up dropping RAD and moving to debugging on Jetty. My local testing isn't EXACTLY as it would be on the test server, but it works. Not sure if this should be flagged as "answered" or not.
UPDATE: I have left this project but before I did, the entire development platform was moved to IDEA and debugging was no longer an issue. I don't know if I should find a way to mark this question as inactive or closed or whatever so that it's not just sitting out here getting views and responses when it's no longer an issue for me.

Categories