GeeCON Prague 2014*
The moose likes JBoss/WildFly and the fly likes Some Deployment Error. JBoss(4.2). Error code 404 displayed while running Project. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Some Deployment Error. JBoss(4.2). Error code 404 displayed while running Project." Watch "Some Deployment Error. JBoss(4.2). Error code 404 displayed while running Project." New topic
Author

Some Deployment Error. JBoss(4.2). Error code 404 displayed while running Project.

Ian Geez
Greenhorn

Joined: Oct 15, 2011
Posts: 6
I am new at working on JBoss as my employer has switched project to Eclipse-Jboss from NetBeans-Apache.
I tried running same code(Web application containing a JSP page and a servlet) file here with JBoss which was running fine earlier with Apache. I got 404 resource not available Error while doing this. I checked server log and found it as:
11:18:23,767 INFO [Server] Starting JBoss (MX MicroKernel)...
11:18:23,770 INFO [Server] Release ID: JBoss [Trinity] 4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA

date=200707131605)
11:18:23,771 INFO [Server] Home Dir: E:\Installed JBoss and Eclipse\jboss-4.2.1
11:18:23,772 INFO [Server] Home URL: file:/E:/Installed JBoss and Eclipse/jboss-4.2.1/
11:18:23,777 INFO [Server] Patch URL: null
11:18:23,777 INFO [Server] Server Name: default
11:18:23,778 INFO [Server] Server Home Dir: E:\Installed JBoss and Eclipse\jboss-4.2.1\server

\default
11:18:23,778 INFO [Server] Server Home URL: file:/E:/Installed JBoss and Eclipse/jboss-

4.2.1/server/default/
11:18:23,779 INFO [Server] Server Log Dir: E:\Installed JBoss and Eclipse\jboss-4.2.1\server\default

\log
11:18:23,779 INFO [Server] Server Temp Dir: E:\Installed JBoss and Eclipse\jboss-4.2.1\server

\default\tmp
11:18:23,780 INFO [Server] Root Deployment Filename: jboss-service.xml
11:18:24,568 INFO [ServerInfo] Java version: 1.6.0_26,Sun Microsystems Inc.
11:18:24,568 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 20.1-b02,Sun Microsystems

Inc.
11:18:24,568 INFO [ServerInfo] OS-System: Windows 7 6.1,x86
11:18:25,856 INFO [Server] Core system initialized
11:18:29,059 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
11:18:29,063 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-

log4j.xml
11:18:29,916 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) -

JBoss Inc.
11:18:29,917 INFO [TransactionManagerService] Setting up property manager MBean and JMX

layer
11:18:30,226 INFO [TransactionManagerService] Starting recovery manager
11:18:30,429 INFO [TransactionManagerService] Recovery manager started
11:18:30,429 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
11:18:34,248 INFO [EJB3Deployer] Starting java:comp multiplexer
11:18:37,002 INFO [ServiceEndpointManager] jbossws-1.2.1.GA (build=200704151756)
11:18:41,305 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal

performance in production environments was not found on the java.library.path: D:\Java\jre6\bin;C:

\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:\Java\jre6\bin\client;D:\Java\jre6\bin;C:

\Program Files\PC Connectivity Solution\;C:\Windows\system32;C:\Windows;C:\Windows

\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL

Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files

\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual

Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;.
11:18:41,438 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080
11:18:41,439 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
11:18:41,439 INFO [Catalina] Initialization processed in 853 ms
11:18:41,439 INFO [StandardService] Starting service jboss.web
11:18:41,442 INFO [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.0.GA
11:18:41,503 INFO [Catalina] Server startup in 63 ms
11:18:42,022 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jboss-

web.deployer/ROOT.war/
11:18:44,320 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-

invoker.sar/invoker.war/
11:18:44,601 INFO [TomcatDeployer] deploy, ctxPath=/jbossws,

warUrl=.../tmp/deploy/tmp8556745816677078268jbossws-context-exp.war/
11:18:44,787 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil,

warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
11:18:45,733 INFO [TomcatDeployer] deploy, ctxPath=/web-console,

warUrl=.../deploy/management/console-mgr.sar/web-console.war/
11:18:46,883 INFO [MailService] Mail Service bound to java:/Mail
11:18:47,259 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in

.../deploy/jboss-ha-local-jdbc.rar
11:18:47,307 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in

.../deploy/jboss-ha-xa-jdbc.rar
11:18:47,347 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in

.../deploy/jboss-local-jdbc.rar
11:18:47,394 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in

.../deploy/jboss-xa-jdbc.rar
11:18:47,480 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in

.../deploy/jms/jms-ra.rar
11:18:47,527 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in

.../deploy/quartz-ra.rar
11:18:47,552 INFO [QuartzResourceAdapter] start quartz!!!
11:18:47,688 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
11:18:47,790 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
11:18:47,795 INFO [RAMJobStore] RAMJobStore initialized.
11:18:47,796 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized

from default resource file in Quartz package: 'quartz.properties'
11:18:47,796 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
11:18:47,796 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED

started.
11:18:52,898 INFO [ConnectionFactoryBindingService] Bound ConnectionManager

'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java: DefaultDS'
11:18:53,339 INFO [A] Bound to JNDI name: queue/A
11:18:53,341 INFO [B ] Bound to JNDI name: queue/B
11:18:53,346 INFO [C] Bound to JNDI name: queue/C
11:18:53,348 INFO [D] Bound to JNDI name: queue/D
11:18:53,350 INFO [ex] Bound to JNDI name: queue/ex
11:18:53,371 INFO [testTopic] Bound to JNDI name: topic/testTopic
11:18:53,373 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
11:18:53,375 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
11:18:53,379 INFO [testQueue] Bound to JNDI name: queue/testQueue
11:18:53,436 INFO [UILServerILService] JBossMQ UIL service available at : /127.0.0.1:8093
11:18:53,509 INFO [DLQ] Bound to JNDI name: queue/DLQ
11:18:53,676 INFO [ConnectionFactoryBindingService] Bound ConnectionManager

'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
11:18:54,467 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-

console.war/
11:18:55,091 INFO [EARDeployer] Init J2EE application: file:/E:/Installed JBoss and Eclipse/jboss-
4.2.1/server/default/deploy/Task05-10-2011EAR.ear

11:18:55,093 ERROR [MainDeployer] Could not initialise deployment: file:/E:/Installed JBoss and
Eclipse/jboss-4.2.1/server/default/deploy/Task05-10-2011EAR.ear

org.jboss.deployment.DeploymentException: No META-INF/application.xml found
at org.jboss.deployment.EARDeployer.init(EARDeployer.java:146)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:872)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:809)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke

(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy

(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan

(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan

(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService

(AbstractDeploymentScanner.java:336)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart

(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle

(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke

(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:508)
at java.lang.Thread.run(Unknown Source)
11:18:55,100 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

--- Incompletely deployed packages ---
org.jboss.deployment.DeploymentInfo@74121d2d { url=file:/E:/Installed JBoss and Eclipse/jboss-
4.2.1/server/default/deploy/Task05-10-2011EAR.ear }
deployer: org.jboss.deployment.EARDeployer@1d23e75
status: null
state: FAILED
watch: file:/E:/Installed JBoss and Eclipse/jboss-4.2.1/server/default/deploy/Task05-10-2011EAR.ear
altDD: null
lastDeployed: 1318657735093
lastModified: 1318657735087
mbeans:


11:18:55,243 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
11:18:55,366 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
11:18:55,383 INFO [Server] JBoss (MX MicroKernel) [4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA

date=200707131605)] Started in 31s:593ms


Please help me as i am not able to get what can i do to resolve this problem.
Ifteqar Ahmed
Ranch Hand

Joined: May 02, 2011
Posts: 85

Right click on Task05-10-2011EAR.ear and choose Add File. Click Project Folder, and select application.xml under the /META-INF directory. In the Prefix, type: META-INF, and click OK.

Please Build your EAR file from the beginning.

Ian Geez
Greenhorn

Joined: Oct 15, 2011
Posts: 6
Ifteqar Ahmed wrote:Right click on Task05-10-2011EAR.ear and choose Add File. Click Project Folder, and select application.xml under the /META-INF directory. In the Prefix, type: META-INF, and click OK.

Please Build your EAR file from the beginning.

Jboss Users Blog


i got what you said and i have build the EAR file from the beginning but my problem is that it can't locate that "application.xml" file anywhere, neither in my project's .EAR nor in .WAR files.
i tried configuring my JBoss but still same problem shows up. Why is the file not getting create on it's own if it is supposed to during the building of project.
Can anyone help me making this "application.xml" file or just give the syntax or sample of how it looks like i can make it on my own and add to the EAR file. Maybe that will work.
Ian Geez
Greenhorn

Joined: Oct 15, 2011
Posts: 6
Guys please help asap as i have to submit this report after bringing the project in running state to my employer on or before 19-10-2011 otherwise i will be in loads of trouble.
if anyhow anybody send in format or syntax or also example of that "application.xml" file then that also will be of great help to me..
thank you..
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10146
    
165

What modules does your .ear contain?

A typical application.xml would look like:


That application.xml maps a yourweb.war (at the root of the .ear) to a context named "webappcontext" and also maps the yourejbjar.jar as a EJB module.

[My Blog] [JavaRanch Journal]
Ian Geez
Greenhorn

Joined: Oct 15, 2011
Posts: 6
Jaikiran Pai wrote:


Thank you for the post it was a great help. but i am new at this Eclipse and Bean part so please can you guide me with an example how to do this.

what all this part includes
<module>
<ejb>yourejbjar.jar</ejb>
</module>

i am having nearly 2-3 jar files so do i have to add all files here. secondly do i have to add the "jre" file too..

Second thing please give more info about the part
<module>
<web>
<web-uri>yourweb.war</web-uri>
<context-root>webappcontext</context-root>
</web>

i am unable to get what this "myweb.war" is here is it path to my war file or does it means something else. and also what is this "webappcontext" in here..

Sorry to go into this basics but please do help..
Thank you..
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10146
    
165

Before answering some of those questions, let's see what exactly your application consists of. In your first post you say:

tried running same code(Web application containing a JSP page and a servlet) file here with JBoss which was running fine earlier with Apache.


Tomcat doesn't support .ear files. So my guess is that you were deploying a web application (.war) with those Servlets and JSPs. Is there any reason why you are trying to deploy it as a .ear in JBoss? Also, I would recommend that you try building the application without an IDE (maybe use a build tool like Ant) so that you don't confuse yourself with too many under the hood things.
Ian Geez
Greenhorn

Joined: Oct 15, 2011
Posts: 6
Thank you guys. problem solved..
actually the problem was with the *.war file was not getting with the project so it was unable to deploy the project.
exporting the *.war file to the JBoss default location made it working.
Ian Geez
Greenhorn

Joined: Oct 15, 2011
Posts: 6
but Jaikiran Pai can you please give idea about "application.xml" file in details. It will be highly appreciated. Thank you.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10146
    
165

Ian Geez wrote:
Jaikiran Pai wrote:


Thank you for the post it was a great help. but i am new at this Eclipse and Bean part so please can you guide me with an example how to do this.

what all this part includes
<module>
<ejb>yourejbjar.jar</ejb>
</module>

i am having nearly 2-3 jar files so do i have to add all files here. secondly do i have to add the "jre" file too..


An enterprise archive (.ear) can consists of a various different well known "module" types. Examples include "ejb" module, "connector" module, "web" module. Each such module can have a packaging structure of its own (and is defined by the spec). For example, ejb is typically packaged in a .jar and a web module in a .war. The .ear uses the application.xml to list these modules. Not all jar files are modules. Some of the jar files can be some plain Java code which act as "libraries" containing some classes that support the application components. These library jars are typically added to the .ear/lib folder so that they are available in the classpath of the application.

So no, not all jar files are listed in the application.xml and you do not have to add the "jre" file (there's no such thing as a "jre" file, by the way).


Ian Geez wrote:
Second thing please give more info about the part
<module>
<web>
<web-uri>yourweb.war</web-uri>
<context-root>webappcontext</context-root>
</web>

i am unable to get what this "myweb.war" is here is it path to my war file or does it means something else. and also what is this "webappcontext" in here..




The web-url element specifies the relative path of the .war within the .ear. Typically the war placed at the root of the .ear, so just the war name (including the .war suffix) is mentioned. However if the .war is within some nested folder in the .ear, then it needs to be specified too (example: nested/myweb.war).

Each web application is accessible at a "context" (this is what you use in the URL http:<IP>:<port>/<context> to access your application). So the <context-root> element specifies the context at which the .war file will be accessible.

P.S: Recent Java EE spec versions (which introduced annotation scanning of classes) do not mandate the use of application.xml, since the annotation scanning mechanism allows the server to identify potential modules
 
GeeCON Prague 2014
 
subject: Some Deployment Error. JBoss(4.2). Error code 404 displayed while running Project.