Java Mailing List Archive

http://www.gg3721.com/

Home » users.tapestry »

Tapestry 5.2.4 with JBoss 5.1: URISyntaxException

Faber, Michael

2011-01-20

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi Community,

I am trying to deploy a Tapestry 5.2.4 application to a JBoss 5.1 application server.

During startup of the TapestryFilter an IOException is thrown, which is caused by an URISyntaxException thrown by the JBoss VFS handlers.
The URI which caused the exception looks like this

<code>
vfszip:/D:/Programme/jboss-5.1.0.GA/server/default/deploy/TapestryTestCase-0.0.1-SNAPSHOT.war/WEB-INF/lib/tapestry-core-5.2.4.jar/org/apache/tapestry5/corelib/pages/PK__/
</code>

with the last two characters (after the 'PK') being an ASCII ETX(03) and an ASCII EOT(04). It does not specify any folder included in the war and is somehow 'added' to the file structure.

I created a small test application to eliminate as many sideeffects as possible. The deployed application is a single war file, including only the necessary libraries for tapestry to run and a simple 'Hello World' tapestry page. This is deployed to a vanilla JBoss 5.1 default server causing the problem mentioned above.
I traced the problem down to the class 'ClassNameLocatorImpl' in the org.apache.tapestry5.ioc.internal.services package and the 'scanDirStream' method.
The java.io.LineNumberReader returns the lines that are used to create the nonexistent wrong URI mentioned above.

The environment and versions I am using when building the test application and experiencing this error are:

-       Tapestry 5.2.4

-       JBoss 5.1.0

-       JDK 1.6.0_19



-       Windows XP

-       Eclipse 3.5.2 with m2e plugin 0.10.2 using the embedded maven version 3.0-SNAPSHOT

This error only occurs in this particular Tapestry/JBoss combination, i.e. Tapestry 5.2.4 with JBoss 4.2.3 works fine as well as Tapestry 5.1.5 with JBoss 5.1.0.

At the moment I can only work around this problem by patching the tapestry source, which I don't want to do, if I can avoid it.
Any help and/or comment on this problem is appreciated, including any field report of deploying an application in the mentioned setup successfully.
I will send out the test application if needed to reproduce the problem.

For the sake of completeness the stacktrace from the JBoss log:

<code>
09:51:05,768 INFO [STDOUT] 09:51:05,768 INFO [RegistryBuilder] Adding module definition for class org.apache.tapestry5.ioc.services.TapestryIOCModule
09:51:06,456 INFO [STDOUT] 09:51:06,456 INFO [RegistryBuilder] Adding module definition for class org.apache.tapestry5.services.TapestryModule
09:51:06,518 INFO [STDOUT] 09:51:06,518 INFO [RegistryBuilder] Adding module definition for class org.apache.tapestry5.internal.services.InternalModule
09:51:06,940 ERROR [1-SNAPSHOT]] Exception starting filter tapestryFilter
java.lang.RuntimeException: java.io.IOException
          at org.apache.tapestry5.ioc.internal.services.ClassNameLocatorImpl.locateClassNames (ClassNameLocatorImpl.java:80)
          at $ClassNameLocator_12da29eb5e0.locateClassNames($ClassNameLocator_12da29eb5e0.java)
          at org.apache.tapestry5.internal.services.ComponentClassResolverImpl.fillNameToClassNameMap (ComponentClassResolverImpl.java:305)
          at org.apache.tapestry5.internal.services.ComponentClassResolverImpl.rebuild (ComponentClassResolverImpl.java:294)
          at org.apache.tapestry5.internal.services.ComponentClassResolverImpl.performRebuild (ComponentClassResolverImpl.java:222)
          at org.apache.tapestry5.internal.services.ComponentClassResolverImpl.access$100(ComponentClassResolverImpl.java:40)
          at org.apache.tapestry5.internal.services.ComponentClassResolverImpl$2.run(ComponentClassResolverImpl.java:195)
          at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier$2.invoke(ConcurrentBarrier.java:200)
          at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier$2.invoke(ConcurrentBarrier.java:197)
          at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withWrite (ConcurrentBarrier.java:140)
          at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withWrite (ConcurrentBarrier.java:206)
          at org.apache.tapestry5.internal.services.ComponentClassResolverImpl.rebuild (ComponentClassResolverImpl.java:191)
          at org.apache.tapestry5.internal.services.ComponentClassResolverImpl.locate (ComponentClassResolverImpl.java:536)
          at org.apache.tapestry5.internal.services.ComponentClassResolverImpl.access$300(ComponentClassResolverImpl.java:40)
          at org.apache.tapestry5.internal.services.ComponentClassResolverImpl$4.invoke(ComponentClassResolverImpl.java:448)
          at org.apache.tapestry5.internal.services.ComponentClassResolverImpl$4.invoke(ComponentClassResolverImpl.java:445)
          at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead (ConcurrentBarrier.java:85)
          at org.apache.tapestry5.internal.services.ComponentClassResolverImpl.isPageName (ComponentClassResolverImpl.java:444)
          at $ComponentClassResolver_12da29eb5d8.isPageName($ComponentClassResolver_12da29eb5d8.java)
          at org.apache.tapestry5.services.TapestryModule$38.initializeApplication(TapestryModule.java:2551)
          at $ApplicationInitializer_12da29eb5da.initializeApplication($ApplicationInitializer_12da29eb5da.java)
          at $ApplicationInitializer_12da29eb5d6.initializeApplication($ApplicationInitializer_12da29eb5d6.java)
          at org.apache.tapestry5.services.TapestryModule$ServletApplicationInitializerTerminator.initializeApplication(TapestryModule.java:298)
          at $ServletApplicationInitializer_12da29eb5bd.initializeApplication($ServletApplicationInitializer_12da29eb5bd.java)
          at org.apache.tapestry5.TapestryFilter.init (TapestryFilter.java:102)
          at org.apache.catalina.core.ApplicationFilterConfig.getFilter (ApplicationFilterConfig.java:234)
          at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef (ApplicationFilterConfig.java:332)
          at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:90)
          at org.apache.catalina.core.StandardContext.filterStart (StandardContext.java:3783)
          at org.apache.catalina.core.StandardContext.start (StandardContext.java:4413)
          at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal (TomcatDeployment.java:310)
          at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy (TomcatDeployment.java:142)
          at org.jboss.web.deployers.AbstractWarDeployment.start (AbstractWarDeployment.java:461)
          at org.jboss.web.deployers.WebModule.startModule (WebModule.java:118)
          at org.jboss.web.deployers.WebModule.start (WebModule.java:97)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke (Method.java:597)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke (ReflectedDispatcher.java:157)
          at org.jboss.mx.server.Invocation.dispatch (Invocation.java:96)
          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:668)
          at org.jboss.system.microcontainer.ServiceProxy.invoke (ServiceProxy.java:206)
          at $Proxy38.start(Unknown Source)
          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction (StartStopLifecycleAction.java:42)
          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction (StartStopLifecycleAction.java:37)
          at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction (SimpleControllerContextAction.java:62)
          at org.jboss.dependency.plugins.action.AccessControllerContextAction.install (AccessControllerContextAction.java:71)
          at org.jboss.dependency.plugins.AbstractControllerContextActions.install (AbstractControllerContextActions.java:51)
          at org.jboss.dependency.plugins.AbstractControllerContext.install (AbstractControllerContext.java:348)
          at org.jboss.system.microcontainer.ServiceControllerContext.install (ServiceControllerContext.java:286)
          at org.jboss.dependency.plugins.AbstractController.install (AbstractController.java:1631)
          at org.jboss.dependency.plugins.AbstractController.incrementState (AbstractController.java:934)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts (AbstractController.java:1082)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts (AbstractController.java:984)
          at org.jboss.dependency.plugins.AbstractController.change (AbstractController.java:822)
          at org.jboss.dependency.plugins.AbstractController.change (AbstractController.java:553)
          at org.jboss.system.ServiceController.doChange (ServiceController.java:688)
          at org.jboss.system.ServiceController.start (ServiceController.java:460)
          at org.jboss.system.deployers.ServiceDeployer.start (ServiceDeployer.java:163)
          at org.jboss.system.deployers.ServiceDeployer.deploy (ServiceDeployer.java:99)
          at org.jboss.system.deployers.ServiceDeployer.deploy (ServiceDeployer.java:46)
          at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy (AbstractSimpleRealDeployer.java:62)
          at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy (AbstractRealDeployer.java:50)
          at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy (DeployerWrapper.java:171)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy (DeployersImpl.java:1439)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst (DeployersImpl.java:1157)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst (DeployersImpl.java:1178)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.install (DeployersImpl.java:1098)
          at org.jboss.dependency.plugins.AbstractControllerContext.install (AbstractControllerContext.java:348)
          at org.jboss.dependency.plugins.AbstractController.install (AbstractController.java:1631)
          at org.jboss.dependency.plugins.AbstractController.incrementState (AbstractController.java:934)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts (AbstractController.java:1082)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts (AbstractController.java:984)
          at org.jboss.dependency.plugins.AbstractController.change (AbstractController.java:822)
          at org.jboss.dependency.plugins.AbstractController.change (AbstractController.java:553)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.process (DeployersImpl.java:781)
          at org.jboss.deployers.plugins.main.MainDeployerImpl.process (MainDeployerImpl.java:702)
          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process (MainDeployerAdapter.java:117)
          at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install (ProfileDeployAction.java:70)
          at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install (AbstractProfileAction.java:53)
          at org.jboss.system.server.profileservice.repository.AbstractProfileService.install (AbstractProfileService.java:361)
          at org.jboss.dependency.plugins.AbstractControllerContext.install (AbstractControllerContext.java:348)
          at org.jboss.dependency.plugins.AbstractController.install (AbstractController.java:1631)
          at org.jboss.dependency.plugins.AbstractController.incrementState (AbstractController.java:934)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts (AbstractController.java:1082)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts (AbstractController.java:984)
          at org.jboss.dependency.plugins.AbstractController.change (AbstractController.java:822)
          at org.jboss.dependency.plugins.AbstractController.change (AbstractController.java:553)
          at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile (AbstractProfileService.java:306)
          at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start (ProfileServiceBootstrap.java:271)
          at org.jboss.bootstrap.AbstractServerImpl.start (AbstractServerImpl.java:461)
          at org.jboss.Main.boot (Main.java:221)
          at org.jboss.Main$1.run(Main.java:556)
          at java.lang.Thread.run (Thread.java:619)
Caused by: java.io.IOException
          at org.jboss.virtual.plugins.registry.DefaultVFSRegistry.getFile (DefaultVFSRegistry.java:144)
          at org.jboss.virtual.protocol.AbstractVFSHandler.openConnection (AbstractVFSHandler.java:71)
          at java.net.URL.openConnection (URL.java:945)
          at java.net.URL.openStream (URL.java:1010)
          at org.apache.tapestry5.ioc.internal.services.ClassNameLocatorImpl.scanDirStream (ClassNameLocatorImpl.java:182)
          at org.apache.tapestry5.ioc.internal.services.ClassNameLocatorImpl.scanURL (ClassNameLocatorImpl.java:131)
          at org.apache.tapestry5.ioc.internal.services.ClassNameLocatorImpl.findClassesWithinPath (ClassNameLocatorImpl.java:96)
          at org.apache.tapestry5.ioc.internal.services.ClassNameLocatorImpl.locateClassNames (ClassNameLocatorImpl.java:75)
          ... 96 more
Caused by: java.net.URISyntaxException: Illegal character in path at index 167: vfszip:/D:/Programme/jboss-5.1.0.GA/server/default/deploy/TapestryTestCase-0.0.1-SNAPSHOT.war/WEB-INF/lib/tapestry-core-5.2.4.jar/org/apache/tapestry5/corelib/pages/PK
________________________________
________________________________
/
          at java.net.URI$Parser.fail(URI.java:2809)
          at java.net.URI$Parser.checkChars(URI.java:2982)
          at java.net.URI$Parser.parseHierarchical(URI.java:3066)
          at java.net.URI$Parser.parse(URI.java:3014)
          at java.net.URI.<init>(URI.java:578)
          at org.jboss.virtual.VFSUtils.toURI (VFSUtils.java:505)
          at org.jboss.virtual.plugins.registry.DefaultVFSRegistry.getFile (DefaultVFSRegistry.java:140)
          ... 103 more
09:51:06,940 ERROR [StandardContext] Error filterStart
09:51:06,940 ERROR [StandardContext] Context [/TapestryTestCase-0.0.1-SNAPSHOT] startup failed due to previous errors
</code>


Thank you for your time,

Michael Faber

---------------------------------------
Atos Worldline GmbH
Pascalstr. 19
52076 Aachen
Germany
Phone: +49 (2408) 148 134
Fax: +49 (2408) 148 204
Mobile: [VAR]mobile[/VAR]
mailto: Michael.Faber@(protected)
http://www.atosworldline.com

Geschäftsführer: Wolf Kunisch
Sitz der Gesellschaft: Frankfurt/Main
Handelsregister: Frankfurt/Main HRB 58 268

* * * * * * * * L E G A L   D I S C L A I M E R * * * * * * * *
This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail by error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and shall not be liable for any damages resulting from any virus transmitted.
* * * * * * * * L E G A L   D I S C L A I M E R * * * * * * * *
©2008 gg3721.com - Jax Systems, LLC, U.S.A.