Tapestry 5
  1. Tapestry 5
  2. TAP5-1686

Exceptions at application startup when the current directory includes spaces in the path name

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 5.3
    • Fix Version/s: 5.3
    • Component/s: tapestry-ioc
    • Labels:
      None

      Description

      This is a recent change, related to live class reloading of service implementations, introduced on or about 5.3-beta-18. It's more noticeable on Windows.

        Activity

        Hide
        Howard M. Lewis Ship added a comment - - edited



        Tried to reproduce this on Mac with no success; it must be Windows specific.

        Show
        Howard M. Lewis Ship added a comment - - edited Tried to reproduce this on Mac with no success; it must be Windows specific.
        Hide
        Howard M. Lewis Ship added a comment -

        Here's a better version of the exception:

        org.apache.tapestry5.ioc.internal.OperationException: Failure reading bytecode for class com.example.ReloadableServiceImpl: Illegal character in opaque part at index 20: file:C:/Users/Howard Lewis Ship/AppData/Local/Temp/132ef0ddd99/com/example/ReloadableServiceImpl.class
        at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:121)
        at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:88)
        at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87)
        at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1010)
        at org.apache.tapestry5.ioc.internal.AbstractReloadableObjectCreator.createInstance(AbstractReloadableObjectCreator.java:121)
        at org.apache.tapestry5.ioc.internal.AbstractReloadableObjectCreator.createObject(AbstractReloadableObjectCreator.java:113)
        at $ReloadableService_5f6d5179ee99.delegate(Unknown Source)
        at $ReloadableService_5f6d5179ee99.getStatus(Unknown Source)
        at org.apache.tapestry5.ioc.ReloadTest.reload_a_proxy_object(ReloadTest.java:190)
        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.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:74)
        at org.testng.internal.Invoker.invokeMethod(Invoker.java:673)
        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:846)
        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1170)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
        at org.testng.TestRunner.runWorkers(TestRunner.java:1125)
        at org.testng.TestRunner.privateRun(TestRunner.java:749)
        at org.testng.TestRunner.run(TestRunner.java:600)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:317)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:312)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:274)
        at org.testng.SuiteRunner.run(SuiteRunner.java:223)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1007)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:932)
        at org.testng.TestNG.run(TestNG.java:868)
        at org.gradle.api.internal.tasks.testing.testng.TestNGTestClassProcessor.stop(TestNGTestClassProcessor.java:95)
        at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:58)
        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.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
        at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
        at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
        at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:75)
        at $Proxy3.stop(Unknown Source)
        at org.gradle.api.internal.tasks.testing.worker.TestWorker.stop(TestWorker.java:91)
        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.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
        at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
        at org.gradle.messaging.remote.internal.MethodInvocationUnmarshallingDispatch.dispatch(MethodInvocationUnmarshallingDispatch.java:48)
        at org.gradle.messaging.dispatch.DiscardOnFailureDispatch.dispatch(DiscardOnFailureDispatch.java:31)
        at org.gradle.messaging.dispatch.AsyncDispatch.dispatchMessages(AsyncDispatch.java:129)
        at org.gradle.messaging.dispatch.AsyncDispatch.access$000(AsyncDispatch.java:33)
        at org.gradle.messaging.dispatch.AsyncDispatch$1.run(AsyncDispatch.java:69)
        at org.gradle.messaging.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:63)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
        Caused by: java.lang.RuntimeException: Failure reading bytecode for class com.example.ReloadableServiceImpl: Illegal character in opaque part at index 20: file:C:/Users/Howard Lewis Ship/AppData/Local/Temp/132ef0ddd99/com/example/ReloadableServiceImpl.class
        at org.apache.tapestry5.internal.plastic.PlasticInternalUtils.readBytecodeForClass(PlasticInternalUtils.java:385)
        at org.apache.tapestry5.ioc.internal.services.PlasticProxyFactoryImpl.readClassNode(PlasticProxyFactoryImpl.java:107)
        at org.apache.tapestry5.ioc.internal.services.PlasticProxyFactoryImpl.getMemberLocation(PlasticProxyFactoryImpl.java:141)
        at org.apache.tapestry5.ioc.internal.services.PlasticProxyFactoryImpl.getConstructorLocation(PlasticProxyFactoryImpl.java:135)
        at org.apache.tapestry5.ioc.internal.RegistryImpl.autobuild(RegistryImpl.java:937)
        at org.apache.tapestry5.ioc.internal.ReloadableObjectCreator.createInstance(ReloadableObjectCreator.java:39)
        at org.apache.tapestry5.ioc.internal.AbstractReloadableObjectCreator$1.invoke(AbstractReloadableObjectCreator.java:127)
        at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74)
        ... 56 more
        Caused by: java.io.IOException: Illegal character in opaque part at index 20: file:C:/Users/Howard Lewis Ship/AppData/Local/Temp/132ef0ddd99/com/example/ReloadableServiceImpl.class
        at org.apache.tapestry5.internal.plastic.PlasticInternalUtils.getStreamForPath(PlasticInternalUtils.java:413)
        at org.apache.tapestry5.internal.plastic.PlasticInternalUtils.readBytecodeForClass(PlasticInternalUtils.java:371)
        ... 63 more
        Caused by: java.net.URISyntaxException: Illegal character in opaque part at index 20: file:C:/Users/Howard Lewis Ship/AppData/Local/Temp/132ef0ddd99/com/example/ReloadableServiceImpl.class
        at java.net.URI$Parser.fail(URI.java:2809)
        at java.net.URI$Parser.checkChars(URI.java:2982)
        at java.net.URI$Parser.parse(URI.java:3019)
        at java.net.URI.<init>(URI.java:578)
        at java.net.URL.toURI(URL.java:918)
        at org.apache.tapestry5.internal.plastic.PlasticInternalUtils.getStreamForPath(PlasticInternalUtils.java:409)
        ... 64 more

        Show
        Howard M. Lewis Ship added a comment - Here's a better version of the exception: org.apache.tapestry5.ioc.internal.OperationException: Failure reading bytecode for class com.example.ReloadableServiceImpl: Illegal character in opaque part at index 20: file:C:/Users/Howard Lewis Ship/AppData/Local/Temp/132ef0ddd99/com/example/ReloadableServiceImpl.class at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:121) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:88) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1010) at org.apache.tapestry5.ioc.internal.AbstractReloadableObjectCreator.createInstance(AbstractReloadableObjectCreator.java:121) at org.apache.tapestry5.ioc.internal.AbstractReloadableObjectCreator.createObject(AbstractReloadableObjectCreator.java:113) at $ReloadableService_5f6d5179ee99.delegate(Unknown Source) at $ReloadableService_5f6d5179ee99.getStatus(Unknown Source) at org.apache.tapestry5.ioc.ReloadTest.reload_a_proxy_object(ReloadTest.java:190) 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.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:74) at org.testng.internal.Invoker.invokeMethod(Invoker.java:673) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:846) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1170) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109) at org.testng.TestRunner.runWorkers(TestRunner.java:1125) at org.testng.TestRunner.privateRun(TestRunner.java:749) at org.testng.TestRunner.run(TestRunner.java:600) at org.testng.SuiteRunner.runTest(SuiteRunner.java:317) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:312) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:274) at org.testng.SuiteRunner.run(SuiteRunner.java:223) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1007) at org.testng.TestNG.runSuitesLocally(TestNG.java:932) at org.testng.TestNG.run(TestNG.java:868) at org.gradle.api.internal.tasks.testing.testng.TestNGTestClassProcessor.stop(TestNGTestClassProcessor.java:95) at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:58) 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.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32) at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:75) at $Proxy3.stop(Unknown Source) at org.gradle.api.internal.tasks.testing.worker.TestWorker.stop(TestWorker.java:91) 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.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) at org.gradle.messaging.remote.internal.MethodInvocationUnmarshallingDispatch.dispatch(MethodInvocationUnmarshallingDispatch.java:48) at org.gradle.messaging.dispatch.DiscardOnFailureDispatch.dispatch(DiscardOnFailureDispatch.java:31) at org.gradle.messaging.dispatch.AsyncDispatch.dispatchMessages(AsyncDispatch.java:129) at org.gradle.messaging.dispatch.AsyncDispatch.access$000(AsyncDispatch.java:33) at org.gradle.messaging.dispatch.AsyncDispatch$1.run(AsyncDispatch.java:69) at org.gradle.messaging.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:63) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.RuntimeException: Failure reading bytecode for class com.example.ReloadableServiceImpl: Illegal character in opaque part at index 20: file:C:/Users/Howard Lewis Ship/AppData/Local/Temp/132ef0ddd99/com/example/ReloadableServiceImpl.class at org.apache.tapestry5.internal.plastic.PlasticInternalUtils.readBytecodeForClass(PlasticInternalUtils.java:385) at org.apache.tapestry5.ioc.internal.services.PlasticProxyFactoryImpl.readClassNode(PlasticProxyFactoryImpl.java:107) at org.apache.tapestry5.ioc.internal.services.PlasticProxyFactoryImpl.getMemberLocation(PlasticProxyFactoryImpl.java:141) at org.apache.tapestry5.ioc.internal.services.PlasticProxyFactoryImpl.getConstructorLocation(PlasticProxyFactoryImpl.java:135) at org.apache.tapestry5.ioc.internal.RegistryImpl.autobuild(RegistryImpl.java:937) at org.apache.tapestry5.ioc.internal.ReloadableObjectCreator.createInstance(ReloadableObjectCreator.java:39) at org.apache.tapestry5.ioc.internal.AbstractReloadableObjectCreator$1.invoke(AbstractReloadableObjectCreator.java:127) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74) ... 56 more Caused by: java.io.IOException: Illegal character in opaque part at index 20: file:C:/Users/Howard Lewis Ship/AppData/Local/Temp/132ef0ddd99/com/example/ReloadableServiceImpl.class at org.apache.tapestry5.internal.plastic.PlasticInternalUtils.getStreamForPath(PlasticInternalUtils.java:413) at org.apache.tapestry5.internal.plastic.PlasticInternalUtils.readBytecodeForClass(PlasticInternalUtils.java:371) ... 63 more Caused by: java.net.URISyntaxException: Illegal character in opaque part at index 20: file:C:/Users/Howard Lewis Ship/AppData/Local/Temp/132ef0ddd99/com/example/ReloadableServiceImpl.class at java.net.URI$Parser.fail(URI.java:2809) at java.net.URI$Parser.checkChars(URI.java:2982) at java.net.URI$Parser.parse(URI.java:3019) at java.net.URI.<init>(URI.java:578) at java.net.URL.toURI(URL.java:918) at org.apache.tapestry5.internal.plastic.PlasticInternalUtils.getStreamForPath(PlasticInternalUtils.java:409) ... 64 more
        Hide
        Howard M. Lewis Ship added a comment -

        Was able to reproduce on Windows; introduced changes, now works on both Windows and Mac.

        Show
        Howard M. Lewis Ship added a comment - Was able to reproduce on Windows; introduced changes, now works on both Windows and Mac.
        Hide
        Hudson added a comment -

        Integrated in tapestry-trunk-freestyle #568 (See https://builds.apache.org/job/tapestry-trunk-freestyle/568/)
        TAP5-1686: Exceptions at application startup when the current directory includes spaces in the path name

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1181139
        Files :

        • /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticInternalUtils.java
        Show
        Hudson added a comment - Integrated in tapestry-trunk-freestyle #568 (See https://builds.apache.org/job/tapestry-trunk-freestyle/568/ ) TAP5-1686 : Exceptions at application startup when the current directory includes spaces in the path name hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1181139 Files : /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticInternalUtils.java
        Hide
        Igor Drobiazko added a comment -

        Reopened because the fix causes exceptions. See for more details:

        http://tapestry.1045711.n5.nabble.com/Revision-1181139-td4913594.html

        Show
        Igor Drobiazko added a comment - Reopened because the fix causes exceptions. See for more details: http://tapestry.1045711.n5.nabble.com/Revision-1181139-td4913594.html
        Hide
        Hudson added a comment -

        Integrated in tapestry-trunk-freestyle #586 (See https://builds.apache.org/job/tapestry-trunk-freestyle/586/)
        TAP5-1686: Removed path decoding using URLDecoder.

        drobiazko : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1186008
        Files :

        • /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticInternalUtils.java
        Show
        Hudson added a comment - Integrated in tapestry-trunk-freestyle #586 (See https://builds.apache.org/job/tapestry-trunk-freestyle/586/ ) TAP5-1686 : Removed path decoding using URLDecoder. drobiazko : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1186008 Files : /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticInternalUtils.java
        Hide
        Hudson added a comment -

        Integrated in tapestry-trunk-freestyle #601 (See https://builds.apache.org/job/tapestry-trunk-freestyle/601/)
        TAP5-1686: Replacing %20 by a space.

        drobiazko : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1188049
        Files :

        • /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticInternalUtils.java
        Show
        Hudson added a comment - Integrated in tapestry-trunk-freestyle #601 (See https://builds.apache.org/job/tapestry-trunk-freestyle/601/ ) TAP5-1686 : Replacing %20 by a space. drobiazko : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1188049 Files : /tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticInternalUtils.java

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Howard M. Lewis Ship
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development