1

I'm using Eclipse 3.6 SR2, I have a Dynamic Web Project that uses JSF. Using Apache Tomcat 6.0, I'm able to run the project and see it on browser. Then I tried to use JBoss 6.0, but I get HTTP 404 requested resource is not available. I can browse to http://localhost:8080/ ok. I have JBoss Tools 3.2 installed. The project contains the following libraries: jsf-api.jar, jsf-impl.jar, jstl-api-1.2.jar, jstl-impl-1.2.jar, primefaces-2.2.1.jar, and redmond-1.0.1.jar (primefaces theme) Any idea of why it works in Tomcat but not in JBoss 6.0? What should I do to make it work? Thanks!

Edit: I restarted server and did not see any error/exceptions. Then I tried to run the project again, and these are the exceptions I got:

16:38:16,160 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] deploy, ctxPath=/VirtualTimeClock-Web
16:38:16,160 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=jboss.web.deployment:war=/VirtualTimeClock-Web state=Create mode=Manual requiredState=Installed: java.net.URISyntaxException: Illegal character in path at index 18: file:/C:/Documents and Settings/sebastianlucero/Escritorio/Documentos/Workspace/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_6.0_Runtime_Server1306767701579/deploy/VirtualTimeClock.ear/VirtualTimeClock-Web.war/
    at java.net.URI$Parser.fail(Unknown Source) [:1.6.0_24]
    at java.net.URI$Parser.checkChars(Unknown Source) [:1.6.0_24]
    at java.net.URI$Parser.parseHierarchical(Unknown Source) [:1.6.0_24]
    at java.net.URI$Parser.parse(Unknown Source) [:1.6.0_24]
    at java.net.URI.<init>(Unknown Source) [:1.6.0_24]
    at java.net.URL.toURI(Unknown Source) [:1.6.0_24]
    at org.jboss.vfs.VFS.getChild(VFS.java:174) [jboss-vfs.jar:3.0.0.GA]
    at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:223) [:6.0.0.Final]
    at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:146) [:6.0.0.Final]
    at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:477) [:6.0.0.Final]
    at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118) [:6.0.0.Final]
    at org.jboss.web.deployers.WebModule.start(WebModule.java:95) [:6.0.0.Final]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_24]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [:1.6.0_24]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [:1.6.0_24]
    at java.lang.reflect.Method.invoke(Unknown Source) [:1.6.0_24]
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) [:6.0.0.GA]
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) [:6.0.0.GA]
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) [:6.0.0.GA]
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271) [:6.0.0.GA]
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670) [:6.0.0.GA]
    at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206) [:2.2.0.GA]
    at $Proxy41.start(Unknown Source)   at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:53) [:2.2.0.GA]
    at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:41) [:2.2.0.GA]
    at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:301) [:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:894) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:641) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:182) [:2.2.0.GA]
    at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:58) [:2.2.0.GA]
    at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62) [:2.2.0.GA]
    at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) [:2.2.0.GA]
    at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.GA]
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.GA]
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.GA]
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1571) [:2.2.0.GA]
    at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1603) [:2.2.0.GA]
    at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.GA]
    at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.GA]
    at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.0.GA]
    at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.Final]
    at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]
    at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:151) [:0.2.2]
    at org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94) [:0.2.2]
    at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.GA]
    at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]
    at org.jboss.profileservice.dependency.ProfileActivationWrapper$BasicProfileActivation.start(ProfileActivationWrapper.java:190) [:0.2.2]
    at org.jboss.profileservice.dependency.ProfileActivationWrapper.start(ProfileActivationWrapper.java:87) [:0.2.2]
    at org.jboss.profileservice.dependency.ProfileActivationService.activateProfile(ProfileActivationService.java:215) [:0.2.2]
    at org.jboss.profileservice.dependency.ProfileActivationService.activate(ProfileActivationService.java:159) [:0.2.2]
    at org.jboss.profileservice.AbstractProfileService.activateProfile(AbstractProfileService.java:154) [:0.2.2]
    at org.jboss.system.tools.ProfileServiceToolsFacade.addURI(ProfileServiceToolsFacade.java:233) [:6.0.0.Final]
    at org.jboss.system.tools.LegacyDeploymentScannerAdapter.addURL(LegacyDeploymentScannerAdapter.java:140) [:6.0.0.Final]
    at org.jboss.system.tools.DeploymentScanner.addURL(DeploymentScanner.java:91) [:6.0.0.Final]
    at org.jboss.system.tools.DeploymentScanner.addURL(DeploymentScanner.java:83) [:6.0.0.Final]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_24]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [:1.6.0_24]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [:1.6.0_24]
    at java.lang.reflect.Method.invoke(Unknown Source) [:1.6.0_24]
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) [:6.0.0.GA]
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) [:6.0.0.GA]
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) [:6.0.0.GA]
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271) [:6.0.0.GA]
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670) [:6.0.0.GA]
    at org.jboss.system.server.jmx.MBeanServerWrapper.invoke(MBeanServerWrapper.java:138) [:6.0.0.Final (Build SVNTag:JBoss_6.0.0.Final date: 20101228)]
    at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source) [:1.6.0_24]
    at javax.management.remote.rmi.RMIConnectionImpl.access$200(Unknown Source) [:1.6.0_24]
    at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source) [:1.6.0_24]
    at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source) [:1.6.0_24]
    at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source) [:1.6.0_24]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_24]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [:1.6.0_24]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [:1.6.0_24]
    at java.lang.reflect.Method.invoke(Unknown Source) [:1.6.0_24]
    at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) [:1.6.0_24]
    at sun.rmi.transport.Transport$1.run(Unknown Source) [:1.6.0_24]
    at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_24]
    at sun.rmi.transport.Transport.serviceCall(Unknown Source) [:1.6.0_24]
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) [:1.6.0_24]
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source) [:1.6.0_24]
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) [:1.6.0_24]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [:1.6.0_24]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [:1.6.0_24]
    at java.lang.Thread.run(Unknown Source) [:1.6.0_24]
damian
  • 4,024
  • 5
  • 35
  • 53
  • Your Eclipse workspace is in `Documents and Settings`, this will cause this problem. Try exporting your workspace to a folder location that does not have blank spaces in the path. – maple_shaft May 31 '11 at 19:53

3 Answers3

4

You really need to be much more specific about what "doesn't work". Read the server logs for any startup errors and on.

I however guess that this is caused because you didn't tell JBoss that your project already includes the necessary JSF libraries. Full fledged Java EE application servers such as JBoss AS 6 namely ships with builtin JSF libraries which get automatically loaded, whereas simple servletcontainers such as Tomcat doesn't. The JBoss-managed JSF libraries might have conflicted with the JSF libraries which you included in your webapp due to version differences.

You need to tell JBoss to not load its JSF libraries by adding the following context param to web.xml:

<context-param>
    <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
    <param-value>true</param-value>
</context-param> 

Update: you finally posted the exception. Here's the important bit

java.net.URISyntaxException: Illegal character in path at index 18: file:/C:/Documents and Settings/sebastianlucero/Escritorio/Documentos/Workspace/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_6.0_Runtime_Server1306767701579/deploy/VirtualTimeClock.ear/VirtualTimeClock-Web.war/

Let's check what's on index 18:

file:/C:/Documents and Settings/sebastianlucero/Escritorio/Documentos/Workspace/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_6.0_Runtime_Server1306767701579/deploy/VirtualTimeClock.ear/VirtualTimeClock-Web.war/
------------------^

A space. You have installed Eclipse in a folder with spaces in the pathname. This is not going to work, see also JBAS issue 8677. Put JBoss and Eclipse in a folder without spaces, e.g. C:/Java.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • I bundle my own JSF libraries in my web application deployed to JBoss 6 and I do not have this in my `web.xml` file. My application loads the JBoss JSF libraries instead but it doesn't give me startup errors. The classloader just ignores what I have bundled in WEB-INF\lib – maple_shaft May 31 '11 at 19:24
  • @maple: Then your JSF libs are by coincidence of the same or a slight older version and you didn't utilize the new features in the newer version. I had problems when using JSF 2.1.1 on JBoss 6. The JBoss provided JSF 2.0 got loaded instead of the webapp bundled JSF 2.1.1. – BalusC May 31 '11 at 19:31
  • thanks @BalusC I edited post with the exception I see in the console – damian May 31 '11 at 19:49
  • @BalusC, Thanks for the tip! Do you think this context parameter affect the WAR file deployed to Tomcat or another servlet container or do you think that the other servlet container will likely ignore this? – maple_shaft May 31 '11 at 19:51
  • @Damian: See answer update. @maple: You only need to ensure that you don't run this on a different servletcontainer which uses by coincidence exactly the same context param for an entirely different purpose. But this chance is less than zero :) – BalusC May 31 '11 at 19:54
  • Thanks @BalusC! Doing that I was able to run a project with JSF. But the one I'm currently trying to run uses Primefaces (I added primefaces-2.2.1.jar to lib folder). Now I got this exception: Unable to process annotations for url, vfs:/C:/workspace/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_6.0_Runtime_Server1306872221469/deploy/TimeclockLayout.war/WEB-INF/lib/primefaces-2.2.1.jar/META-INF/faces-config.xml. Reason: java.util.zip.ZipException: error in opening zip file For what I've read, that was an issue in JBoss 6 M3, but I'm using JBoss 6.0 Final. any idea? – damian May 31 '11 at 20:37
  • 1
    You're welcome. Ah this one is pretty nasty. I experienced this as well, but I have no sensible explanation for this. Check this answer: http://stackoverflow.com/questions/5493931/error-in-catalina-2011-03-30-log-java-util-zip-zipexception-error-in-opening-zi/5494089#5494089 – BalusC May 31 '11 at 21:03
0

The problem would be with Context Root. Just give Project Name instead of Context Root.

0

In your JBoss instance look in the deploy folder and make sure your web app has been deployed properly. If so then look in the logs folder and inspect the boot and server log files. Look for any errors and make sure that your application deployed correctly when you started up JBoss.

Also verify that your JBoss instance is indeed listening on port 8080.

Good luck!

maple_shaft
  • 10,435
  • 6
  • 46
  • 74
  • 1
    If JBoss didn't listen on 8080, he wouldn't have gotten a 404, but a browser default connection timeout page. – BalusC May 31 '11 at 19:07