[
https://issues.apache.org/jira/browse/GERONIMO-3016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484738
]
Frank G commented on GERONIMO-3016:
-----------------------------------
The modification of org.apache.geronimo.kernel.config.IOUtil in rev 518426
caused the this problem.
The modification of the IOUtile is as following:
Index:
F:/apache/geronimo/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/IOUtil.java
===================================================================
---
F:/apache/geronimo/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/IOUtil.java
(revision 476049)
+++
F:/apache/geronimo/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/IOUtil.java
(revision 518426)
@@ -189,7 +189,7 @@
if (!SelectorUtils.hasWildcards(pattern)) {
File match = new File(root, pattern);
if (match.exists() && match.canRead()) {
- return Collections.singleton(match.toURL());
+ return
Collections.singleton(match.toURI().normalize().toURL());
} else {
return Collections.EMPTY_SET;
}
@@ -201,7 +201,7 @@
String fileName = (String) entry.getKey();
if (SelectorUtils.matchPath(pattern, fileName)) {
File file = (File) entry.getValue();
- matches.add(file.toURL());
+ matches.add(file.toURI().normalize().toURL());
}
}
return matches;
Look like it's no problem with codes. But I did a test with the following
codes, showing an interesting thing:
File file1 = new File( "C:\\Program Files\\Google\\abc.txt" );
System.out.println( "Exists: " + file1.exists() );
System.out.println( "Can Read: " + file1.canRead() );
File file2 = new File( file1.toURI().normalize().toURL().getPath() );
System.out.println( "Exists: " + file2.exists() );
System.out.println( "Can Read: " + file2.canRead() );
System.out.println( "------------" );
File file3 = new File( "C:\\maven-2.0.5\\bin\\mvn.bat" );
System.out.println( "Exists: " + file3.exists() );
System.out.println( "Can Read: " + file3.canRead() );
File file4 = new File( file3.toURI().normalize().toURL().getPath() );
System.out.println( "Exists: " + file4.exists() );
System.out.println( "Can Read: " + file4.canRead() );
The outputs are as following:
Exists: true
Can Read: true
Exists: false
Can Read: false
------------
Exists: true
Can Read: true
Exists: true
Can Read: true
who knows why this happened?
> Server assemblies fail to start on Windows when there is a space in the path
> ----------------------------------------------------------------------------
>
> Key: GERONIMO-3016
> URL: https://issues.apache.org/jira/browse/GERONIMO-3016
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: connector
> Affects Versions: 2.0-M4
> Environment: Sun 1.5.0_11 on WinXP with a space in the directory path
> to the server
> trunk Rev521702 from 3/23
> Reporter: Donald Woods
> Assigned To: Donald Woods
> Priority: Critical
> Fix For: 2.0-M4
>
> Attachments: geronimo.log
>
>
> When the j225 server assemblies (Tomcat or Jetty) are extracted to path that
> has a space in it, the server fails to start.
> This bug has been introduced sometime after 3/8, which was the last build I
> tried this on.
> The same assemblies work on WinXP if the space is removed from the path and
> the following is used instead, so its not a length problem -
> C:\ProgramFiles\Apache\geronimo-tomcat6-jee5-2.0-SNAPSHOT
> Cmdline output -
> C:\Program Files\Apache\geronimo-tomcat6-jee5-2.0-SNAPSHOT\bin>geronimo run
> Using GERONIMO_BASE: C:\Program
> Files\Apache\geronimo-tomcat6-jee5-2.0-SNAPSHOT
> Using GERONIMO_HOME: C:\Program
> Files\Apache\geronimo-tomcat6-jee5-2.0-SNAPSHOT
> Using GERONIMO_TMPDIR: C:\Program
> Files\Apache\geronimo-tomcat6-jee5-2.0-SNAPSHOT\var\temp
> Using JRE_HOME: C:\PROGRA~1\Java\jdk1.5.0_11\jre
> Booting Geronimo Kernel (in Java 1.5.0_11)...
> Starting Geronimo Application Server v2.0-SNAPSHOT
> [*****> ] 19% 4s Starting org.apache.geron...
> 17:47:53,828 ERROR [GBeanInstanceState] Error while starting; GBean is now in
> the FAILED state:
> abstractName="org.apache.geronimo.configs/system-database/2.0-SNAPSHOT/car
> ?J2EEApplication=null,JCAConnectionFactory=SystemDatasource,JCAResource=org.apache.geronimo.configs/system-database/2.0-SNAPSHOT/car,ResourceAdapter=org.apache.
> geronimo.configs/system-database/2.0-SNAPSHOT/car,ResourceAdapterModule=org.apache.geronimo.configs/system-database/2.0-SNAPSHOT/car,j2eeType=JCAManagedConnecti
> onFactory,name=SystemDatasource"
> java.lang.ClassNotFoundException: org.tranql.connector.derby.EmbeddedXAMCF in
> classloader org.apache.geronimo.configs/system-database/2.0-SNAPSHOT/car
> at
> org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:305)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at
> org.apache.geronimo.connector.outbound.ManagedConnectionFactoryWrapper.<init>(ManagedConnectionFactoryWrapper.java:140)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:936)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:267)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:529)
> at
> org.apache.geronimo.gbean.runtime.GBeanDependency.attemptFullStart(GBeanDependency.java:111)
> at
> org.apache.geronimo.gbean.runtime.GBeanDependency.addTarget(GBeanDependency.java:146)
> at
> org.apache.geronimo.gbean.runtime.GBeanDependency$1.running(GBeanDependency.java:120)
> at
> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:173)
> at
> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$300(BasicLifecycleMonitor.java:41)
> at
> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent(BasicLifecycleMonitor.java:251)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:292)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:543)
> at
> org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
> at
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:434)
> at
> org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:188)
> at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:530)
> at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:511)
> at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.invoke(<generated>)
> at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
> at
> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
> at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:127)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:820)
> at
> org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
> at
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
> at
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
> at
> org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$b9ad94c0.startConfiguration(<generated>)
> at
> org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:254)
> at
> org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:78)
> at
> org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:79)
> at
> org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:66)
> 17:47:53,843 ERROR [GBeanInstanceState] Error while starting; GBean is now in
> the FAILED state:
> abstractName="org.apache.geronimo.configs/system-database/2.0-SNAPSHOT/car?J2EEApplication=null,JCAConnectionFactory=SystemDatasource,JCAResource=org.apache.geronimo.configs/system-database/2.0-SNAPSHOT/car,ResourceAdapter=org.apache.geronimo.configs/system-database/2.0-SNAPSHOT/car,ResourceAdapterModule=org.apache.geronimo.configs/system-database/2.0-SNAPSHOT/car,j2eeType=JCAManagedConnectionFactory,name=SystemDatasource"
> C:\Program Files\Apache\geronimo-jetty6-jee5-2.0-SNAPSHOT\bin>geronimo run
> Using GERONIMO_BASE: C:\Program
> Files\Apache\geronimo-jetty6-jee5-2.0-SNAPSHOT
> Using GERONIMO_HOME: C:\Program
> Files\Apache\geronimo-jetty6-jee5-2.0-SNAPSHOT
> Using GERONIMO_TMPDIR: C:\Program
> Files\Apache\geronimo-jetty6-jee5-2.0-SNAPSHOT\var\temp
> Using JRE_HOME: C:\PROGRA~1\Java\jdk1.5.0_11\jre
> Booting Geronimo Kernel (in Java 1.5.0_11)...
> Starting Geronimo Application Server v2.0-SNAPSHOT
> [*****> ] 19% 3s Starting org.apache.geron...
> 17:50:57,250 ERROR [GBeanInstanceState] Error while starting; GBean is now in
> the FAILED state:
> abstractName="org.apache.geronimo.configs/system-database/2.0-SNAPSHOT/car
> ?J2EEApplication=null,JCAConnectionFactory=SystemDatasource,JCAResource=org.apache.geronimo.configs/system-database/2.0-SNAPSHOT/car,ResourceAdapter=org.apache.
> geronimo.configs/system-database/2.0-SNAPSHOT/car,ResourceAdapterModule=org.apache.geronimo.configs/system-database/2.0-SNAPSHOT/car,j2eeType=JCAManagedConnecti
> onFactory,name=SystemDatasource"
> java.lang.ClassNotFoundException: org.tranql.connector.derby.EmbeddedXAMCF in
> classloader org.apache.geronimo.configs/system-database/2.0-SNAPSHOT/car
> at
> org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:305)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at
> org.apache.geronimo.connector.outbound.ManagedConnectionFactoryWrapper.<init>(ManagedConnectionFactoryWrapper.java:140)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:936)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:267)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:529)
> at
> org.apache.geronimo.gbean.runtime.GBeanDependency.attemptFullStart(GBeanDependency.java:111)
> at
> org.apache.geronimo.gbean.runtime.GBeanDependency.addTarget(GBeanDependency.java:146)
> at
> org.apache.geronimo.gbean.runtime.GBeanDependency$1.running(GBeanDependency.java:120)
> at
> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:173)
> at
> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$300(BasicLifecycleMonitor.java:41)
> at
> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent(BasicLifecycleMonitor.java:251)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:292)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:543)
> at
> org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
> at
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:434)
> at
> org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:188)
> at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:530)
> at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:511)
> at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.invoke(<generated>)
> at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
> at
> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
> at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:127)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:820)
> at
> org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
> at
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
> at
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
> at
> org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$b9ad94c0.startConfiguration(<generated>)
> at
> org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:254)
> at
> org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:78)
> at
> org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:79)
> at
> org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:66)
> 17:50:57,265 ERROR [GBeanInstanceState] Error while starting; GBean is now in
> the FAILED state:
> abstractName="org.apache.geronimo.configs/system-database/2.0-SNAPSHOT/car?J2EEApplication=null,JCAConnectionFactory=SystemDatasource,JCAResource=org.apache.geronimo.configs/system-database/2.0-SNAPSHOT/car,ResourceAdapter=org.apache.geronimo.configs/system-database/2.0-SNAPSHOT/car,ResourceAdapterModule=org.apache.geronimo.configs/system-database/2.0-SNAPSHOT/car,j2eeType=JCAManagedConnectionFactory,name=SystemDatasource"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.