aspose file tools*
The moose likes JBoss/WildFly and the fly likes HTTP 404 error using JBoss Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "HTTP 404 error using JBoss" Watch "HTTP 404 error using JBoss" New topic
Author

HTTP 404 error using JBoss

Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 387

I am encountering an HTTP 404 error when trying to execute my website from the JBoss in my local environment in Eclipse. I am using Eclipse 3.5.SR1. :

HTTP Status 404 - /SCM/

My context root in my Eclipse web project is: SCM

When I try to run it in my browser I type in: http://localhost:8080/SCM and then I get the HTTP Status 404 - /SCM/ error.

The following is my console output when I START JBoss. I see no errors in here at all.

Any suggestions, direction or help would be greatly appreciated. Regards.

--------------------------------------------------------------------------------

type Status report

message /SCM/

description The requested resource (/SCM/) is not available.

I do have a jboss-web.xml setup in my WEB-INFO folder. I am running this application from Eclipse 3.0.5

10:30:13,231 INFO [Server] Starting JBoss (MX MicroKernel)...
10:30:13,277 INFO [Server] Release ID: JBoss [Zion] 4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)
10:30:13,277 INFO [Server] Home Dir: C:\server\jboss-4.0.5
10:30:13,277 INFO [Server] Home URL: file:/C:/server/jboss-4.0.5/
10:30:13,277 INFO [Server] Patch URL: null
10:30:13,277 INFO [Server] Server Name: default
10:30:13,277 INFO [Server] Server Home Dir: C:\server\jboss-4.0.5\server\default
10:30:13,277 INFO [Server] Server Home URL: file:/C:/server/jboss-4.0.5/server/default/
10:30:13,277 INFO [Server] Server Log Dir: C:\server\jboss-4.0.5\server\default\log
10:30:13,277 INFO [Server] Server Temp Dir: C:\server\jboss-4.0.5\server\default\tmp
10:30:13,277 INFO [Server] Root Deployment Filename: jboss-service.xml
10:30:13,590 INFO [ServerInfo] Java version: 1.6.0_13,Sun Microsystems Inc.
10:30:13,590 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 11.3-b02,Sun Microsystems Inc.
10:30:13,590 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
10:30:14,277 INFO [Server] Core system initialized
10:30:16,293 INFO [WebService] Using RMI server codebase: http://THRCNU9151CJ6:8083/
10:30:16,293 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
10:30:21,059 INFO [ServiceEndpointManager] WebServices: jbossws-1.0.3.SP1 (date=200609291417)
10:30:22,262 INFO [Embedded] Catalina naming disabled
10:30:22,324 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
10:30:22,324 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
10:30:22,652 INFO [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080
10:30:22,652 INFO [Catalina] Initialization processed in 328 ms
10:30:22,652 INFO [StandardService] Starting service jboss.web
10:30:22,652 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.5.20
10:30:22,668 INFO [StandardHost] XML validation disabled
10:30:22,684 INFO [Catalina] Server startup in 32 ms
10:30:22,856 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
10:30:23,059 INFO [WebappLoader] Dual registration of jndi stream handler: factory already defined
10:30:23,293 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jbossweb-tomcat55.sar/ROOT.war/
10:30:23,512 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../tmp/deploy/tmp7404270257469181469jbossws-context-exp.war/
10:30:23,606 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
10:30:24,184 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
10:30:24,559 INFO [MailService] Mail Service bound to java:/Mail
10:30:24,809 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
10:30:24,856 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
10:30:24,918 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
10:30:24,965 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
10:30:24,996 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
10:30:25,027 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/mail-ra.rar
10:30:25,746 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'javaefaultDS'
10:30:25,918 INFO [A] Bound to JNDI name: queue/A
10:30:25,918 INFO [B] Bound to JNDI name: queue/B
10:30:25,918 INFO [C] Bound to JNDI name: queue/C
10:30:25,918 INFO [D] Bound to JNDI name: queue/D
10:30:25,918 INFO [ex] Bound to JNDI name: queue/ex
10:30:25,934 INFO [testTopic] Bound to JNDI name: topic/testTopic
10:30:25,934 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
10:30:25,934 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
10:30:25,934 INFO [testQueue] Bound to JNDI name: queue/testQueue
10:30:25,965 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.0.0:8093
10:30:25,996 INFO [DLQ] Bound to JNDI name: queue/DLQ
10:30:26,106 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
10:30:26,184 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
10:30:26,324 INFO [EARDeployer] Init J2EE application: file:/C:/server/jboss-4.0.5/server/default/deploy/SCMWebEAR.ear
10:30:32,668 WARN [TomcatDeployer] Failed to map vhost: scmis
10:30:32,668 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../tmp/deploy/tmp3083093054379094778SCMWebEAR.ear-contents/SCM-exp.war/
10:30:32,668 INFO [StandardHost] XML validation disabled
10:30:33,152 INFO [ResolverUtil] Scanning for classes in [/C:/server/jboss-4.0.5/server/default/./tmp/deploy/tmp3083093054379094778SCMWebEAR.ear-contents/SCM-exp.war/WEB-INF/classes/org/texashealth/scmis/stripes/ext/] matching criteria: is assignable to Configuration
10:30:33,152 INFO [ResolverUtil] Scanning for classes in [/C:/server/jboss-4.0.5/server/default/./tmp/deploy/tmp3083093054379094778SCMWebEAR.ear-contents/SCM-exp.war/WEB-INF/classes/org/texashealth/scmis/stripes/ext/] matching criteria: is assignable to ActionResolver
10:30:33,168 INFO [ResolverUtil] Scanning for classes in [/C:/server/jboss-4.0.5/server/default/./tmp/deploy/tmp3083093054379094778SCMWebEAR.ear-contents/SCM-exp.war/WEB-INF/classes/org/texashealth/scm/stripes/] matching criteria: is assignable to ActionBean
10:30:33,199 INFO [ResolverUtil] Scanning for classes in [/C:/server/jboss-4.0.5/server/default/./tmp/deploy/tmp3083093054379094778SCMWebEAR.ear-contents/SCM-exp.war/WEB-INF/classes/org/texashealth/scmis/stripes/] matching criteria: is assignable to ActionBean
10:30:33,449 INFO [ResolverUtil] Scanning for classes in [/C:/server/jboss-4.0.5/server/default/./tmp/deploy/tmp3083093054379094778SCMWebEAR.ear-contents/SCM-exp.war/WEB-INF/classes/org/texashealth/scmis/stripes/ext/] matching criteria: is assignable to ActionBeanPropertyBinder
10:30:33,449 INFO [ResolverUtil] Scanning for classes in [/C:/server/jboss-4.0.5/server/default/./tmp/deploy/tmp3083093054379094778SCMWebEAR.ear-contents/SCM-exp.war/WEB-INF/classes/org/texashealth/scmis/stripes/ext/] matching criteria: is assignable to ActionBeanContextFactory
10:30:33,449 INFO [ResolverUtil] Scanning for classes in [/C:/server/jboss-4.0.5/server/default/./tmp/deploy/tmp3083093054379094778SCMWebEAR.ear-contents/SCM-exp.war/WEB-INF/classes/org/texashealth/scmis/stripes/ext/] matching criteria: is assignable to ActionBeanContext
10:30:33,449 INFO [BootstrapPropertyResolver] Class implementing/extending ActionBeanContext found via auto-discovery: org.texashealth.scmis.stripes.ext.SCMISActionBeanContext
10:30:33,449 INFO [DefaultActionBeanContextFactory] DefaultActionBeanContextFactory will use ActionBeanContext subclass org.texashealth.scmis.stripes.ext.SCMISActionBeanContext
10:30:33,449 INFO [ResolverUtil] Scanning for classes in [/C:/server/jboss-4.0.5/server/default/./tmp/deploy/tmp3083093054379094778SCMWebEAR.ear-contents/SCM-exp.war/WEB-INF/classes/org/texashealth/scmis/stripes/ext/] matching criteria: is assignable to TypeConverterFactory
10:30:33,465 INFO [ResolverUtil] Scanning for classes in [/C:/server/jboss-4.0.5/server/default/./tmp/deploy/tmp3083093054379094778SCMWebEAR.ear-contents/SCM-exp.war/WEB-INF/classes/org/texashealth/scmis/stripes/ext/] matching criteria: is assignable to LocalizationBundleFactory
10:30:33,465 INFO [ResolverUtil] Scanning for classes in [/C:/server/jboss-4.0.5/server/default/./tmp/deploy/tmp3083093054379094778SCMWebEAR.ear-contents/SCM-exp.war/WEB-INF/classes/org/texashealth/scmis/stripes/ext/] matching criteria: is assignable to LocalePicker
10:30:33,465 INFO [DefaultLocalePicker] No locale list specified, defaulting to single locale: en_US
10:30:33,465 INFO [ResolverUtil] Scanning for classes in [/C:/server/jboss-4.0.5/server/default/./tmp/deploy/tmp3083093054379094778SCMWebEAR.ear-contents/SCM-exp.war/WEB-INF/classes/org/texashealth/scmis/stripes/ext/] matching criteria: is assignable to FormatterFactory
10:30:33,465 INFO [ResolverUtil] Scanning for classes in [/C:/server/jboss-4.0.5/server/default/./tmp/deploy/tmp3083093054379094778SCMWebEAR.ear-contents/SCM-exp.war/WEB-INF/classes/org/texashealth/scmis/stripes/ext/] matching criteria: is assignable to TagErrorRendererFactory
10:30:33,465 INFO [ResolverUtil] Scanning for classes in [/C:/server/jboss-4.0.5/server/default/./tmp/deploy/tmp3083093054379094778SCMWebEAR.ear-contents/SCM-exp.war/WEB-INF/classes/org/texashealth/scmis/stripes/ext/] matching criteria: is assignable to TagErrorRenderer
10:30:33,481 INFO [BootstrapPropertyResolver] Class implementing/extending PopulationStrategy found in web.xml: net.sourceforge.stripes.tag.BeanFirstPopulationStrategy
10:30:33,481 INFO [ResolverUtil] Scanning for classes in [/C:/server/jboss-4.0.5/server/default/./tmp/deploy/tmp3083093054379094778SCMWebEAR.ear-contents/SCM-exp.war/WEB-INF/classes/org/texashealth/scmis/stripes/ext/] matching criteria: is assignable to ExceptionHandler
10:30:33,481 INFO [BootstrapPropertyResolver] Class implementing/extending ExceptionHandler found via auto-discovery: org.texashealth.scmis.stripes.ext.SCMISExceptionHandler
10:30:33,559 INFO [ResolverUtil] Scanning for classes in [/C:/server/jboss-4.0.5/server/default/./tmp/deploy/tmp3083093054379094778SCMWebEAR.ear-contents/SCM-exp.war/WEB-INF/classes/org/texashealth/scmis/stripes/ext/] matching criteria: is assignable to MultipartWrapperFactory
10:30:33,559 INFO [ResolverUtil] Scanning for classes in [/C:/server/jboss-4.0.5/server/default/./tmp/deploy/tmp3083093054379094778SCMWebEAR.ear-contents/SCM-exp.war/WEB-INF/classes/org/texashealth/scmis/stripes/ext/] matching criteria: is assignable to MultipartWrapper
10:30:33,559 INFO [DefaultMultipartWrapperFactory] Using net.sourceforge.stripes.controller.multipart.CosMultipartWrapper as MultipartWrapper implementation.
10:30:33,559 INFO [ResolverUtil] Scanning for classes in [/C:/server/jboss-4.0.5/server/default/./tmp/deploy/tmp3083093054379094778SCMWebEAR.ear-contents/SCM-exp.war/WEB-INF/classes/org/texashealth/scmis/stripes/ext/] matching criteria: is assignable to ValidationMetadataProvider
10:30:33,559 INFO [ResolverUtil] Scanning for classes in [/C:/server/jboss-4.0.5/server/default/./tmp/deploy/tmp3083093054379094778SCMWebEAR.ear-contents/SCM-exp.war/WEB-INF/classes/org/texashealth/scmis/stripes/ext/] matching criteria: is assignable to Interceptor
10:30:33,574 INFO [ResolverUtil] Scanning for classes in [/C:/server/jboss-4.0.5/server/default/./tmp/deploy/tmp3083093054379094778SCMWebEAR.ear-contents/SCM-exp.war/WEB-INF/classes/org/texashealth/scmis/stripes/ext/] matching criteria: is assignable to Formatter
10:30:33,574 INFO [ResolverUtil] Scanning for classes in [/C:/server/jboss-4.0.5/server/default/./tmp/deploy/tmp3083093054379094778SCMWebEAR.ear-contents/SCM-exp.war/WEB-INF/classes/org/texashealth/scmis/stripes/ext/] matching criteria: is assignable to TypeConverter
10:30:33,574 INFO [StripesFilter] Stripes Initialization Complete. Version: 1.5, Build: 955
10:30:33,590 INFO [EARDeployer] Started J2EE application: file:/C:/server/jboss-4.0.5/server/default/deploy/SCMWebEAR.ear
10:30:33,637 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
10:30:33,715 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
10:30:33,746 INFO [JkMain] Jk running ID=0 time=0/47 config=null
10:30:33,746 INFO [Server] JBoss (MX MicroKernel) [4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)] Started in 20s:469ms
Mark E Hansen
Ranch Hand

Joined: Apr 01, 2009
Posts: 650
Melinda Savoy wrote:I am encountering an HTTP 404 error when trying to execute my website from the JBoss in my local environment in Eclipse. I am using Eclipse 3.5.SR1. :

HTTP Status 404 - /SCM/

My context root in my Eclipse web project is: SCM

Are you sure? Have a look at the following line from your server.log output:


It sure sounds like your context path is not getting set properly.

Also, since you're browsing to the root of your web application, have you configured a Welcome page for the application?
Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 387

Thanks for the reply, Mark. You'll have to pardon my ignorance. Our team lead who had set this up before quitting did not make us knowledgeable on the configuration and so in inheriting this situation you'll understand if I'm not very knowledgeable in answering your question. My understanding in the JBoss documentation is that the EARDeployer is the EAR that gets deployed by the server and that file is my SCMWebEAR.ear file where there is the SCM.war file. We've not touched anything that would alter the configuration of what is deployed and I checked the EAR to ensure that the SCM.war file is contained therein.

That is all I know, unfortunately. Regards.
Mark E Hansen
Ranch Hand

Joined: Apr 01, 2009
Posts: 650
Melinda,

I'm sorry you're in such a position. The fact that the original application architect didn't leave any documentation on how to maintain the application is going to cause problems for your company - someone is going to have to figure it out. Even after the current problem is resolved, there will be others - even if just the result of upgrades to the application logic.

As I said in my earlier post, the server.log file is indicating that your web application (this is the War, not the Ear) is deploying with a context path (ctxPath) of /, which I'm pretty sure is not right. Certainly you are attempting to access the application using a context path of /SCM which does not appear to be deployed.

I'm not sure how to verify what should be the context path of the web application, so I hope someone else will chime in here and help you.

Note that you should be able to use the jmx-console to view the deployments on the application server. I don't know a lot about the use of the jmx-console, but here is a nickel tour: Launch it by going to your application server's URL /jmx-console. For example: Click on jboss.web.deployment under Object Name Filter on the left. This should give you a list of deployments. If your application is listed, click on it to get more information.

I hope this helps, or someone more knowledgeable will help.
Mark E Hansen
Ranch Hand

Joined: Apr 01, 2009
Posts: 650
After doing a little more reading, I see that the context path for web application on the JBoss application server default to the name of the War file (without the .war extension), but can be changed. You should check with your EAR to see if such a change has been made for your application. According to the book: JBoss In Action (which I highly recommend, by the way), for EAR applications, the context path for a web component can be set in the application.xml descriptor file. The section of the application.xml file should look like this: To make sure you're looking at the correct info, I would take the actual Ear file that is getting deployed, and extract it to a temporary directory, then inspect the contents/files there. That way, you're looking at the same content is viewed by the application server (and you don't have to worry about the process that builds the Ear file doing something funny).

Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 387

Mark,

Again, thank you for all your help. We're definitely in a pickle so to speak. But I appreciate the time you've taken to help us. We're in the process of moving our app to Apache Tomcat because we really don't even take advantage of all that is in JBoss.

Thanks again.
Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 387

Well I did some additional research and found this additional file info but still encountering HTTP 404 errors:

jboss-web.xml:


application.xml:


The SCM.war file is included in my SCMWebEAR.ear file.

I'm just not sure what else is needed or why I would be getting these HTTP 404 errors.

Any help or direction would be greatly appreciated.
Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 387

I forgot to say that I am entering in my URL address field of my browser: http://localhost:8080/SCM/

Thanks.
Mark E Hansen
Ranch Hand

Joined: Apr 01, 2009
Posts: 650
Does your web application have a welcome file listed? Does that resource exist within the web application?
It looks like you've set the context root for the application to "/", which means you would be accessing it using http://localhost:8080/, without the SCM part.

When you include your XML files (and other similar content), you should enclose it within code tags. You can go back and edit your messages to fix this. It will make the content much more readable.

I would start looking for what has changed since the application was last working.

Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 387

Mark - thanks again for replying. In my web.xml file I do have the following:



I have an index.jsp page that should be executing when I come into the website. One more item, when I just type http://localhost:8080/ I always go to the Welcome to JBoss page where I see JBoss Online Resources and JBoss Management.

The only thing that has changed is that I changed my eclipse version from a very old 3.4.1 to a 3.5 SR1 version (latest) because 3.4.1 had intermittent problems due to bugs. I tried using 3.4.2 but still had bug issues. I am still using JBoss 4.0.5GA as the server and the config has not changed in that server at all. Do you think it could be the Eclipse version I'm using?

Any help would be appreciated. I cannot believe that this is that difficult.

Does that help at all?
Mark E Hansen
Ranch Hand

Joined: Apr 01, 2009
Posts: 650
It sure sounds like you're application is not getting deployed properly.

I would check what should happen when you have the context path for your application set to "/" when JBoss has a ROOT application already. I've never done this, and I don't know if to get it to work, you need to do anything to disable the default JBoss ROOT application.

Next, does the server.log file show any problems when starting the application server, or when deploying the application?

Does the jmx-console show the application? Look at "jboss.web.deployment" with the console and see if your web application is listed there.

Otherwise, I'm not sure what is wrong.
Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 387

Thanks, Mark. Again, your time and help is very much appreciated.

Regards.
moudj bouss
Greenhorn

Joined: May 30, 2011
Posts: 1
Hi Melinda Savoy, am new to jboss and I have been trying to solve this problem for the past three weeks. Did you find solution to it?
You help would be much appreciated.
Thank you
Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 387

Hello moudj. Thanks for the reply. Since I posted this back in 2005, I am no longer using JBoss. I switched over to Tomcat and am very happy using that instead. Sorry you've been working on this for so long. Thanks anyway. Regards.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

moudj, welcome to Java Ranch!
It would help if you posted the details about the problem you are facing. Attach the log files and describe your application. Listing the EAR and WAR contents (using "jar -tf") will also help. Also, please post that in a new thread.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTTP 404 error using JBoss