WebSphere Issue - java

I working in an Java application. I am using Struts2 and Hibernate. The application was working fine in Tomcat7 , But when I deployed that On IBM"S Websphere I am getting the following error for the following URL
http://localhost:8080/MYAPPS
Error 404: There is no Action mapped for action name .
http://localhost:8080/MYAPPS/
Error 404: There is no Action mapped for namespace [/] and action name [] associated with context path

The default port is 9080. Change the port in url as others suggested.

Check the following:
Login to the console , click on servers -> serverName -> ports -> WC_defaulthost (webcontainer port )
For example if it shows as 9080
Click on Environment -> Virtual Host -> default host (or the host the application is mapped to)- > Click on Host Aliases . Make sure the port is defined, if not add the port and the restart the server.
access the application as follow.
http://localhost:9080/MYAPPS/
http://hostname:9080/MYAPPS/
If the problem persists, open the systemout.log file and look for more details.

Try this, it may help to find the port number for web host or secure web host,
Go for the following path,
/opt/IBM/WebSphere/AppServer/profiles/Dmgr01_demo/config/cells/localhostCell01/nodes/Dmgr_node,
try find this file serverindex.xml,
there you can find the "WC_adminhost" port number.
Hope this help !
thanks!.

I don't think this is the virtual host issue. You obviously have configured it right as there's no virtualhost error.
What's your WAS's version? WAS V6.1.X has the notorious reputation not to support whatever is popular. Try adding this as a customized web container property:
com.ibm.ws.webcontainer.invokefilterscompatibility
set its value to true

Related

Soap Webservice Picking Wrong port number

I am deploying SOAP web service in weblogic 12c .It is picking the wrong port number is there any way that we can manually set the port number .
<WL5G3N3:address location="https://XXX.xxx.com:11201/XXX/XXX">
</WL5G3N0:port>
</WL5G3N0:service>
It should be 11202.We have F5 URl in which http is set to 11201 and https to 11202. can anyone help what is the problem.
This can be solved by setting the following system property at WLS startup script:
-Dweblogic.wsee.useRequestHost=true

How do I get the Tomcat manager/status to work with my local hostname?

This works http://localhost:8080/manager/status and this doesn't http://canalistan:8080/manager/status. The Tomcat home page displays OK with either localhost or canalistan (my hostname).
I've put an entry in the hosts file. I'm using Tomcat v7, Windows 7 etc. Everything else seems to work OK and I've even managed to set up a virtual host, but this has so far eluded me.
Can you use the host name aliases for your purpose? For an example if you are using tomcat 7 try this: tomcat 7 host name aliases

Tomcat 7 is not running on browser(http://localhost:8080/ )

Actually the apache-tomcat 7 server running at The Eclipse.but in browser getting error "The requested resource is not available." .Any reasons Please..?
When you start tomcat independently and type http://localhost:8080/, tomcat show its default page (tomcat has its default page at TOMCAT_ROOT_DIRECTORY\webapps\ROOT\index.jsp).
When you start tomcat from eclipse, eclipse doesn't have any default page for url http://localhost:8080/ so it show error message. This doesn't mean that tomcat7 is not running.when you put your project specific url like http://localhost:8080/PROJECT_NAME_YOU_HAVE_CREATE_USING_ECLIPSE will display the default page of your web project.
I had the same issue and for me, I tried changing the options in
Server Locations
and it worked.
Double click on the Tomcat Server under the Servers tab in Eclipse
Doing that opens a window in the editor with the top heading being Overview opens (there are 2 tabs-Overview and Modules).
In that change the options under Server Locations, and give Ctrl+S (Save configurations)
For me, Use Tomcat installation (takes control of Tomcat installation) worked
Try starting the server and checking if localhost opens in the browser. Else select a different option.
I do not understand why that issue came up. I did search but did not find a relevant answer(Maybe I didn't use the right keywords). If someone knows why that worked, kindly share.
Thanks.
There could be a number of reasons, have it as a checklist and go through it
Is your server running on 8080?I mean that is the default port but it could be configured to run on other.
Also there is a possibility that the default application is removed/uninstalled that is why it is giving "the requested resource is not available"
Also it could be a proxy issue. make sure you are not using any proxy in your browser.
1)Goto Server tab
2)Right on server -> general -> click on switch location.
3)Double click on the server -> under server location -> select tomcat installation.
4) restart the server.
It will be proxy configuration of your browser.
In NetWork Setting, use no proxy
For Manual proxy configuration add exception(No Proxy for in Firefox) like localhost:8080, localhost.
You may face two errors while testing tomcat server startup.
Error in the Eclipse inbuilt browser - This page can’t be displayed
Turn on TLS 1.0, TLS 1.1, and TLS 1.2 in Advanced settings and try connecting to https://localhost:8080 again. If this error persists, it is possible that this site uses an unsupported protocol. Please contact the site administrator.
404 error in the normal browsers.
Fixes -
For the eclipse browser error, check whether you are using secured URL - https://localhost:8080. This should be http://localhost:8080
For the 404 error:
Go to Tomcat server in the console. Do a right click, select properties. In the properties window, Click "Switch location" and then click OK.
Followed by that, Go to Tomcat server in the console, double click it, Under "server locations" select "Use Tomcat installation" radio button. Save it.
The reason for choosing this option is, When the default option is given as eclipse location, we will see 404 error as it changes Catalina parameters (sometimes). But if we change it to Tomcat location, it works fine.
Sometimes another software can be holding this door and it can be the cause of this conflict, try change the door on the server.xml.
Double click on the Tomcat Server under the Servers tab in Eclipse
Doing that opens a window in the editor with the top heading being Overview opens (there are 2 tabs-Overview and Modules).
In that change the options under Server Locations, and g
You can run below commands.
./catalina.sh run
Note: Make sure the port 8080 is open. If not, kill the process that is using 8080 port using sudo kill -9 $(sudo lsof -t -i:8080)
Many of us get this error after setting up the eclipse and server for first time. This solution is -
go to server tab
select the properties option of your respective server and expand it
in the properties window ,
select general tab -> click Switch Location -> click apply
->click ok.
This may work .

Java servlet application running behind squid proxy on windows

I'm behind a squid HTTP proxy requiring authentication and want to make API requests to an external server. However when I do so, I get the following error :
Caused by: java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.0 407 Proxy Authentication Required"
I've tried setting the proxy configuration by going to Control Panel > Java > Network Settings, but to no avail.
How to solve this?
You should set the proxy-settings in java.
System.getProperties().put("http.proxyHost", "someProxyURL");
System.getProperties().put("http.proxyPort", "someProxyPort");
System.getProperties().put("http.proxyUser", "someUserName");
System.getProperties().put("http.proxyPassword", "somePassword");
Copy from http://www.it.iitb.ac.in/~roshan/articles/javahttpproxy.html:
Tomcat Settings: catalina.properties
Append these properties to the catalina.properties file in Tomcat: ${CATALINA_OME}/conf/catalina.properties file:
http.proxyHost=yourProxyURL
http.proxyPort=yourProxyPort
http.proxyUser=yourUserName
http.proxyPassword=yourPassword
Tomcat Settings: catalina.bat
Add all the parameters defined above in the ${CATALINA_HOME}/bin/catalina.bat (for Windows) or ${CATALINA_HOME}/bin/catalina.bat (for *nix):
JAVA_OPTS="-Dhttp.proxyHost=yourProxyURL ..."
(Each option is seperated by spaces.)

Liferay blog URL's and virtual host

Our company running Liferay without virtual host. We using VM IP with port 80 open for our portal. No any problems with this setup.
When I'm added virtual host to Liferay and changed DNS on my machine -- I can't opened any assets (articles) with long russian names.
Tomcat console:
WARN [404_jsp:109] /home/-/asset_publisher/JbL5ejmhvwSa/content/%D1%80%D0%B5%D1%88%D0%B5%D0%BD%D0%B8%D1%8F-%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D0%BF%D1%80%D0%BE%D0%BA%D0%BE%D0%BC-%D0%BF%D0%BE-%D0%BE%D0%BF%D1%82%D0%B8%D0%BC%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D0%B8-%D1%80%D0%B0%D0%B1%D0%BE%D1%87%D0%B5%D0%B3%D0%BE-%D0%B2%D1%80%D0%B5%D0%BC%D0%B5%D0%BD%D0%B8-%D1%81%D0%BE%D1%82%D1%80%D1%83%D0%B4%D0%BD%D0%B8%D0%BA%D0%BE%D0%B2-%D0%BD%D0%B0-%D0%B1%D0%B0%D0%B7%D0%B5-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2-ibm
Virtual host enabled URL (not working)
http://companyname.com/home/-/asset_publisher/JbL5ejmhvwSa/content/%D1%80%D0%B5%D1%88%D0%B5%D0%BD%D0%B8%D1%8F-%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D0%BF%D1%80%D0%BE%D0%BA%D0%BE%D0%BC-%D0%BF%D0%BE-%D0%BE%D0%BF%D1%82%D0%B8%D0%BC%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D0%B8-%D1%80%D0%B0%D0%B1%D0%BE%D1%87%D0%B5%D0%B3%D0%BE-%D0%B2%D1%80%D0%B5%D0%BC%D0%B5%D0%BD%D0%B8-%D1%81%D0%BE%D1%82%D1%80%D1%83%D0%B4%D0%BD%D0%B8%D0%BA%D0%BE%D0%B2-%D0%BD%D0%B0-%D0%B1%D0%B0%D0%B7%D0%B5-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2-ibm?redirect=http%3A%2F%2Finterprocom.ru%2Fhome%3Fp_p_id%3D101_INSTANCE_JbL5ejmhvwSa%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_mode%3Dview%26p_p_col_id%3Dcolumn-2%26p_p_col_pos%3D1%26p_p_col_count%3D2
Virtual host disabled URL (working)
http://192.168.10.35/web/guest/home/-/asset_publisher/JbL5ejmhvwSa/content/%D1%80%D0%B5%D1%88%D0%B5%D0%BD%D0%B8%D1%8F-%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D0%BF%D1%80%D0%BE%D0%BA%D0%BE%D0%BC-%D0%BF%D0%BE-%D0%BE%D0%BF%D1%82%D0%B8%D0%BC%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D0%B8-%D1%80%D0%B0%D0%B1%D0%BE%D1%87%D0%B5%D0%B3%D0%BE-%D0%B2%D1%80%D0%B5%D0%BC%D0%B5%D0%BD%D0%B8-%D1%81%D0%BE%D1%82%D1%80%D1%83%D0%B4%D0%BD%D0%B8%D0%BA%D0%BE%D0%B2-%D0%BD%D0%B0-%D0%B1%D0%B0%D0%B7%D0%B5-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2-ibm?redirect=http%3A%2F%2F192.168.10.45%2Fweb%2Fguest%2Fhome%3Fp_p_id%3D101_INSTANCE_JbL5ejmhvwSa%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_mode%3Dview%26p_p_col_id%3Dcolumn-2%26p_p_col_pos%3D1%26p_p_col_count%3D2
It's few days until we go public. We'll use our domain companyname.com
I'm worried that we will got same issue.
Without being able to immediately solve the underlying problem: You can also use the last option with the host name: No virtual host names, just have the name resolve to 192.168.10.35 (change to an actual IP when going live).
Also, what version of Liferay are you on?
see this Question, my be it help you: Liferay: After changing Public Virtual Host settings, can't log in
Also you can see in generated jsp code tomcat/work/... why this do not work.
And at last, you can debug Liferay and find the solution :) The simple way to debug Liferay is to get Liferay IDE and add Liferay Source as eclipse project. Good luck.
Even I face this issue and observed that with liferay's virtual host mapping, url's with special characters are not showing up when they are related to entries in Guest site.
By mapping virtual host, web/guest part is removed from the URL.
Now if you try manually adding web/guest before the URL, In your case
try accessing with following URL
http://companyname.com/web/guest/home/-/asset_publisher/JbL5ejmhvwSa/content/%D1%80%D0%B5%D1%88%D0%B5%D0%BD%D0%B8%D1%8F-%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D0%BF%D1%80%D0%BE%D0%BA%D0%BE%D0%BC-%D0%BF%D0%BE-%D0%BE%D0%BF%D1%82%D0%B8%D0%BC%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D0%B8-%D1%80%D0%B0%D0%B1%D0%BE%D1%87%D0%B5%D0%B3%D0%BE-%D0%B2%D1%80%D0%B5%D0%BC%D0%B5%D0%BD%D0%B8-%D1%81%D0%BE%D1%82%D1%80%D1%83%D0%B4%D0%BD%D0%B8%D0%BA%D0%BE%D0%B2-%D0%BD%D0%B0-%D0%B1%D0%B0%D0%B7%D0%B5-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2-ibm?redirect=http%3A%2F%2Finterprocom.ru%2Fhome%3Fp_p_id%3D101_INSTANCE_JbL5ejmhvwSa%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_mode%3Dview%26p_p_col_id%3Dcolumn-2%26p_p_col_pos%3D1%26p_p_col_count%3D2
and it should work.
So one possible way to resolve this issue is to keep virtual host
mapping in your windows/your os hosts file and rename virtual host to
localhost in Liferay in portal settings under Portal tab in control
panel.
STEPS:
1) In hosts file keep the mapping as you have done i.e
192.168.10.35 companyname.com
2) In liferay, remove the virtual host mapping i.e rename virtual host to localhost in "portal settings" under "Portal" tab in control panel.
and try to access your entry and it will work.
This is very interesting behavior/ may be a bug in liferay.
Hope this helps.
So you testing Liferay on your local host, then trying to move on real domain and facing some weird behaviour.
First thing you want to do is to check Control Panel and type in your new virtual host there.
I'm not sure about this because we are using 6.0 now and I did not remember how exactly we fixed it. If my advice did not helped please check other comments to this question.

Categories

Resources