getting error message "Failed to load resource: the server responded with a status of 404 (Not Found)" - netbeans

I have a simple MVC web application, which was running locally without problems 3 weeks ago.
When I now open the application in Netbeans and run it, everything seems to work fine as well. However, when I go to the browser (in my case google chrome) to look at the app's frontend (at http://localhost:8080/optimizer), I get the following error message:
HTTP Status 404 - Not Found
In Chrome's javascript console the following error message is given:
optimizer:1 Failed to load resource: the server responded with a status of 404 (Not Found)
"optimizer" is the name of the app. (What's the point of the "1" in "optimizer:1"? ... I don't get this either.)
The server (payara) is running:
I can also reach the server's admin page:
However, somehow the server cannot seem to find the application, although 3 weeks ago everything worked fine ... I just don't get it.
What's wrong? How can I fix this?
UPDATE:
Clicking on "List Deployed Applications" in Payara's Admin Console reveals that my app is not(!) deployed.
I tried to deploy it by clicking on "Deploy an Application" -> "Choose file".
I selected the jar-file "optimizer-1.0-SNAPSHOT.jar", selected Type "EJB Jar", then clicked on OK.
I got this error message:
Archive type of /private/var/folders/hh/hgq7wrjn5d51gy2tkbxkkbwh0000gn/T/optimizer-15075570634779987058.0-SNAPSHOT.jar was not recognized
How can I deploy my app? And why did it work automatically before and now it doesn't work any more?
UPDATE 2:
A difference I realise compared to before (3 weeks ago) is that the browser doesn't open automatically any more when I run the app.
Furthermore, Google Chrome used to be the IDE'S default browser ... now there is just a grey globe and I can no longer choose Chrome as my browser:
UPDATE 3:
I just noticed there is an error message that appears when the server is started (it's in the middle of hundred of rows of log output so I didn't notice it at first):
UPDATE 4:
-> NetBeans IDE 11.2
-> Payara Server 5.193

Error clearly shows, server is not able to recognize archive type of jar,
Archive type of
/private/var/folders/hh/hgq7wrjn5d51gy2tkbxkkbwh0000gn/T/optimizer-15075570634779987058.0-SNAPSHOT.jar
was not recognized
From payara blog,
If you set “Location” by “Packaged File to Be Uploaded to the Server”,
the suitable type would be selected.
So, the suitable type would be selected automatically.
Also, optimizer-15075570634779987058.0-SNAPSHOT.jar is not an original jar optimizer-1.0-SNAPSHOT.jar
It seems that issue is with the path of an archive, from thread
Code in uploadFrame.jsf:
<sun:form id="form">
I probe to change it to:
<sun:form id="form" enctype="multipart/form-data">
in uploadFrame.jsf into console-common.jar file. And it works.
You can try with changing uploadFrame.jsf into console-common.jar file.
(Not sure if chrome takes care of this, as it was working for you with chrome).
You may also want to try manual deployment,
install-directory/bin/asadmin deploy PATH_TO_ARCHIEVE/optimizer-1.0-SNAPSHOT.jar

Ok, I now found out how to run the app locally without problems: by creating a .war file instead of a .jar file - now I can run the app again without problems.

Related

Unity-WebGL showing grey window instead of interactive website

I have a Unity project, where you can navigate around in a 3D space environment. I'm using Unity version 2020.3.4f1 Personal. I went to 'Build settings', chose WebGL, and then clicked 'Build And Run.
The project seems to launch on a Chrome browser in localhost, without any issues:
However, when I zip the build files & folders (index.html file along with the 'Build' and 'StreamingAssets'), then host as a website, all I get is a grey screen, instead of an interactive website!
As mentioned the build created is - index.html file, 'Build' folder, and 'StreamingAssets' folder:
Clearly, there's something wrong with the build as the project seems to run fine directly in localhost.
Any help would be really appreciated.
Many thanks
Edit
Looking at the logs in the Chrome browser console (running on localhost), these are the logs:
For the 404 error, I found some Unity forum thread: https://forum.unity.com/threads/webgl-builds-only-partially-working.357591/ , where I then thought the solution was to enable Data Caching & Decompression Fallback, and set Compression Format Gzip.
But this didn't solve the issue, as I still get the 404 in the console log, running on localhost (although as mentioned before, in localhost it runs). Also, when hosting it on a server using Netlify it still shows just a Grey window.
Note: strangely when I refresh the browser running localhost, the 404 disappears, but still the main thing is that when hosted on a remote server (Netlify), I just get a Grey window.
Localhost will be case-insensitive on Windows, while Linux is usually case sensitive on the Host. Check URLs and file names, and try looking at the Web server logs for 404 errors.

Customization YCommerceWebService - Webroot "/rest" not working anymore

I created a YcommerceWebServices with "ant extgen", added it in localextension file, I added the oAuth2 authentification extension.
When I was doing request from postam like :
https://localhost:9002/rest/v2/{baseSiteID}/users/{userID}/...
It was working, I was receiving all the information. Since I started to customize I get all the time HTTP Error 302 Moved temporarily .
Even when I am on the hac and I click on my customExtension in the column web on "/rest" I get a 404 (before it was working too)
I tried to "Ant clean all" and update from Hac, no result.
The problem came from the fact, that during my customization by modifying the file /web/webroot/WEB-INF/config/v2/dto-level-mappings-v2-spring.xml
I had made an error on the declaration of a bean.
Indeed looking carefully at the compilation and launch of the server (ant clean all - ./hybrisserver.sh). I saw that there was an error. the launcher was launched but my webservice was not active.

Click once application Deployment - Installation Error

I have created winform application using .Net Framework 4.5
I have created click once deployment package for it. But when i install it on server it gives me error as below
and the error upon clicking Details buttons shown as
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Users******\Downloads\Publish******.application resulted in exception. Following failure messages were detected:
+ Downloading file:///C:/Users/******/Downloads/Publish/Application Files/********_1_0_0_3/*******.dll.deploy did not succeed.
+ Access to the path 'C:\Users**********\AppData\Local\Temp\2\Deployment\********.dll' is denied.
I have a similar problem on occasion. ...\Temp\2... seems to be a default folder for doing stuff. My clickonce deployment was getting blocked by a test run in Selenium using the same location to store its test logs.
Check if the location is being used by other processes to store files while they are working or see if you can clear the folder before starting the update (if you do an update in code vs just clicking the *.appref-ms file).
Also note that ...\Temp\2 can show up as a file instead of a folder thereby blocking any use of it as a folder.

What can cause a display bug on different devices in a meteor web app and only once bundled

My problem is that my content does not show at all on particular device/browser and only once bundled. The wep app display correctly in debug (running it from meteor) whatever the device or browser are.
EDIT : I can see the navbar and the footer but not the yield on affected devices/browsers
Affected devices/browser known to date are Chrome on Nexus 4 (not on Note3) and Dolphin on Note 3.
Dev environment is Windows and prod is Linux.
I've also tried to run the app through meteor directly on server and the problem is not here but is back even when I bundle the app from the server.
Any idea about what can cause that and/or how to troubleshoot that?
EDIT 2
I can finally confirm that it's a client side bug.
Here is the error from chrome console on the device
Exception from Deps recompute function: ReferenceError: Lists is not defined
at Object.Template.layout.helpers.lists (http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:31:25567)
at http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:10:5624
at Object.e.call (http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:27:20793)
at HTML.DIV.HTML.UL.UI.Each.UI.block.e [as __sequence] (http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:27:28178)
at http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:10:4102
at http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:9:3419
at a (http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:2:4791)
at n.extend._compute (http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:2:5846)
at new e.Computation (http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:2:5183)
at Object.n.extend.autorun (http://example.com/8f6c9295e0ef7b38e613447d9a44d5c7af448efa.js:2:7042)
But the Lists collection is defined, published and subscribed. And the weirdest part is that everything works well when debugging through Meteor
In my specific case, Collections definitions were located in a /collections folder at the root of the app. That caused the app to load them after the /client folder but only once deployed and on some devices/browsers only!
To fix that, I've just move the /collections folder into /lib, bundled it again, push it to the server and everything now works flawlessly whatever the device/browser is.

Click Once Deployment Error

I am new to Click Once Application deployment so I think I may have a simple problem. I have a window app that I created and deployed successfully as a ClickOnce App using Vis. Studio 2010 and deploying to a web service. I made some changes to the app and changed the deployment location so I started the click Once Process over. Now when I deploy I get an error. The app builds fine, runs fine in VS 2010, when I deploy files are created. Double clicking the App.application file will start the install of the app with a .Net framework error.
"Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.
System.UriFormatException: Invalid URI: The URI is empty..."
I have double checked and triple checked the Publish Foldre Location and INstallation Folder URL to make sure they are pointing in the correct places and using the correct format. I double and triple checked the Updates dialog box when you click the Updates button. The combobox for the Application Updates matches the Installation Folder URL. "\MyServer\Users\Administrator\Desktop\Transfer\Deploy\" I double checked to make sure the required files are correct. Security settings did not change.
What could I be missing?
It seems you missed one backslash in your installation folder URL:
\\MyServer\Users\Administrator\Desktop\Transfer\Deploy\
Please make sure that if you are using some image/sound or log files then its Build Action must be "Content" type.