Can't start recent trunk

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't start recent trunk

Adrian Crum
I did an SVN update from the trunk this morning, then ran ant clean and
build. OFBiz starts, gets to

UtilXml.java:241:INFO ] XML Read 0.015s:
file:/C:/ofbiz/framework/base/config/component-load.xml

then shuts down. Debug.log and ofbiz.log both show first few lines of
startup messages, and nothing else. error.log is empty.

I did a fresh checkout, ran ant run-install - it stops at the same
place. I confirmed I'm running Java 1.5.

Any ideas?

-Adrian

Reply | Threaded
Open this post in threaded view
|

Re: Can't start recent trunk

Adam Heath-2
Adrian Crum wrote:

> I did an SVN update from the trunk this morning, then ran ant clean and
> build. OFBiz starts, gets to
>
> UtilXml.java:241:INFO ] XML Read 0.015s:
> file:/C:/ofbiz/framework/base/config/component-load.xml
>
> then shuts down. Debug.log and ofbiz.log both show first few lines of
> startup messages, and nothing else. error.log is empty.
>
> I did a fresh checkout, ran ant run-install - it stops at the same
> place. I confirmed I'm running Java 1.5.
>
> Any ideas?
Try the attached patch; I don't develop on windows, so haven't tested it
yet.  My windows machine is currently rebooting, after installing
tortiose, and then I can test this myself.

=== framework/base/src/base/org/ofbiz/base/util/FileUtil.java
==================================================================
--- framework/base/src/base/org/ofbiz/base/util/FileUtil.java (revision 5704)
+++ framework/base/src/base/org/ofbiz/base/util/FileUtil.java (local)
@@ -47,11 +47,11 @@
     public static final String module = FileUtil.class.getName();
 
     public static File getFile(String path) {
-        return new File(path.replaceAll("/+|\\\\+", File.separator));
+        return new File(path.replaceAll("/|\\\\", File.separator));
     }
 
     public static File getFile(File root, String path) {
-        return new File(root, path.replaceAll("/+|\\\\+", File.separator));
+        return new File(root, path.replaceAll("/+|\\\\", File.separator));
     }
 
     public static void writeString(String fileName, String s) throws IOException {
Reply | Threaded
Open this post in threaded view
|

Re: Can't start recent trunk

Jacques Le Roux
Administrator
From: "Adam Heath" <[hidden email]>

> Adrian Crum wrote:
>> I did an SVN update from the trunk this morning, then ran ant clean and
>> build. OFBiz starts, gets to
>>
>> UtilXml.java:241:INFO ] XML Read 0.015s:
>> file:/C:/ofbiz/framework/base/config/component-load.xml
>>
>> then shuts down. Debug.log and ofbiz.log both show first few lines of
>> startup messages, and nothing else. error.log is empty.
>>
>> I did a fresh checkout, ran ant run-install - it stops at the same
>> place. I confirmed I'm running Java 1.5.
>>
>> Any ideas?
>
> Try the attached patch; I don't develop on windows, so haven't tested it
> yet.  My windows machine is currently rebooting, after installing
> tortiose, and then I can test this myself.


Sorry Adam,

Same issue :

D:\Workspace\ofbizRun>"C:\Program Files\Java\jdk1.5.0_11\bin\java" -Xms256M -Xmx512M -jar ofbiz.jar
Set OFBIZ_HOME to - D:/Workspace/ofbizRun
Admin socket not configured; set to port 0
2008-08-04 23:55:59,419 (main) [    ContainerLoader.java:51 :INFO ] [Startup] Loading containers...
2008-08-04 23:55:59,779 (main) [            UtilXml.java:241:INFO ] XML Read 0.344s:
file:/D:/Workspace/ofbizRun/framework/base/config/ofbiz-containers.xml
2008-08-04 23:55:59,826 (main) [            UtilXml.java:241:INFO ] XML Read 0.016s:
file:/D:/workspace/ofbizRun/framework/base/config/component-load.xml
java.lang.StringIndexOutOfBoundsException: String index out of range: 1
        at java.lang.String.charAt(String.java:558)
        at java.util.regex.Matcher.appendReplacement(Matcher.java:696)
        at java.util.regex.Matcher.replaceAll(Matcher.java:806)
        at java.lang.String.replaceAll(String.java:2000)
        at org.ofbiz.base.util.FileUtil.getFile(FileUtil.java:50)
        at org.ofbiz.base.container.ComponentContainer.loadComponents(ComponentContainer.java:107)
        at org.ofbiz.base.container.ComponentContainer.init(ComponentContainer.java:77)
        at org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
        at org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
        at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
        at org.ofbiz.base.start.Start.init(Start.java:89)
        at org.ofbiz.base.start.Start.main(Start.java:398)



--------------------------------------------------------------------------------


> === framework/base/src/base/org/ofbiz/base/util/FileUtil.java
> ==================================================================
> --- framework/base/src/base/org/ofbiz/base/util/FileUtil.java (revision 5704)
> +++ framework/base/src/base/org/ofbiz/base/util/FileUtil.java (local)
> @@ -47,11 +47,11 @@
>     public static final String module = FileUtil.class.getName();
>
>     public static File getFile(String path) {
> -        return new File(path.replaceAll("/+|\\\\+", File.separator));
> +        return new File(path.replaceAll("/|\\\\", File.separator));
>     }
>
>     public static File getFile(File root, String path) {
> -        return new File(root, path.replaceAll("/+|\\\\+", File.separator));
> +        return new File(root, path.replaceAll("/+|\\\\", File.separator));
>     }
>
>     public static void writeString(String fileName, String s) throws IOException {
>

Reply | Threaded
Open this post in threaded view
|

Re: Can't start recent trunk

Adrian Crum
I don't know if this will help, but I reverted back to rev 681992 - my
last good build - and it works fine. So the problem was introduced after
that.

-Adrian

Jacques Le Roux wrote:

> From: "Adam Heath" <[hidden email]>
>> Adrian Crum wrote:
>>> I did an SVN update from the trunk this morning, then ran ant clean and
>>> build. OFBiz starts, gets to
>>>
>>> UtilXml.java:241:INFO ] XML Read 0.015s:
>>> file:/C:/ofbiz/framework/base/config/component-load.xml
>>>
>>> then shuts down. Debug.log and ofbiz.log both show first few lines of
>>> startup messages, and nothing else. error.log is empty.
>>>
>>> I did a fresh checkout, ran ant run-install - it stops at the same
>>> place. I confirmed I'm running Java 1.5.
>>>
>>> Any ideas?
>>
>> Try the attached patch; I don't develop on windows, so haven't tested it
>> yet.  My windows machine is currently rebooting, after installing
>> tortiose, and then I can test this myself.
>
>
> Sorry Adam,
>
> Same issue :
>
> D:\Workspace\ofbizRun>"C:\Program Files\Java\jdk1.5.0_11\bin\java"
> -Xms256M -Xmx512M -jar ofbiz.jar
> Set OFBIZ_HOME to - D:/Workspace/ofbizRun
> Admin socket not configured; set to port 0
> 2008-08-04 23:55:59,419 (main) [    ContainerLoader.java:51 :INFO ]
> [Startup] Loading containers...
> 2008-08-04 23:55:59,779 (main) [            UtilXml.java:241:INFO ] XML
> Read 0.344s:
> file:/D:/Workspace/ofbizRun/framework/base/config/ofbiz-containers.xml
> 2008-08-04 23:55:59,826 (main) [            UtilXml.java:241:INFO ] XML
> Read 0.016s:
> file:/D:/workspace/ofbizRun/framework/base/config/component-load.xml
> java.lang.StringIndexOutOfBoundsException: String index out of range: 1
>        at java.lang.String.charAt(String.java:558)
>        at java.util.regex.Matcher.appendReplacement(Matcher.java:696)
>        at java.util.regex.Matcher.replaceAll(Matcher.java:806)
>        at java.lang.String.replaceAll(String.java:2000)
>        at org.ofbiz.base.util.FileUtil.getFile(FileUtil.java:50)
>        at
> org.ofbiz.base.container.ComponentContainer.loadComponents(ComponentContainer.java:107)
>
>        at
> org.ofbiz.base.container.ComponentContainer.init(ComponentContainer.java:77)
>
>        at
> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
>
>        at
> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
>        at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>        at org.ofbiz.base.start.Start.init(Start.java:89)
>        at org.ofbiz.base.start.Start.main(Start.java:398)
>
>
>
> --------------------------------------------------------------------------------
>
>
>
>> === framework/base/src/base/org/ofbiz/base/util/FileUtil.java
>> ==================================================================
>> --- framework/base/src/base/org/ofbiz/base/util/FileUtil.java
>> (revision 5704)
>> +++ framework/base/src/base/org/ofbiz/base/util/FileUtil.java (local)
>> @@ -47,11 +47,11 @@
>>     public static final String module = FileUtil.class.getName();
>>
>>     public static File getFile(String path) {
>> -        return new File(path.replaceAll("/+|\\\\+", File.separator));
>> +        return new File(path.replaceAll("/|\\\\", File.separator));
>>     }
>>
>>     public static File getFile(File root, String path) {
>> -        return new File(root, path.replaceAll("/+|\\\\+",
>> File.separator));
>> +        return new File(root, path.replaceAll("/+|\\\\",
>> File.separator));
>>     }
>>
>>     public static void writeString(String fileName, String s) throws
>> IOException {
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Can't start recent trunk

Adam Heath-2
Adrian Crum wrote:

> I don't know if this will help, but I reverted back to rev 681992 - my
> last good build - and it works fine. So the problem was introduced after
> that.
>
> -Adrian
>
> Jacques Le Roux wrote:
>> From: "Adam Heath" <[hidden email]>
>>> Adrian Crum wrote:
>>>> I did an SVN update from the trunk this morning, then ran ant clean and
>>>> build. OFBiz starts, gets to
>>>>
>>>> UtilXml.java:241:INFO ] XML Read 0.015s:
>>>> file:/C:/ofbiz/framework/base/config/component-load.xml
>>>>
>>>> then shuts down. Debug.log and ofbiz.log both show first few lines of
>>>> startup messages, and nothing else. error.log is empty.
>>>>
>>>> I did a fresh checkout, ran ant run-install - it stops at the same
>>>> place. I confirmed I'm running Java 1.5.
>>>>
>>>> Any ideas?
>>>
>>> Try the attached patch; I don't develop on windows, so haven't tested it
>>> yet.  My windows machine is currently rebooting, after installing
>>> tortiose, and then I can test this myself.
>>
>>
>> Sorry Adam,
>>
>> Same issue :

It'll have to wait until after work(2 more hours) for me to look at it
closely.  Java 1.5 isn't installed on my windows machine, so I can't
compile anything there to test it yet.
Reply | Threaded
Open this post in threaded view
|

Re: Can't start recent trunk

Adrian Crum
Same thing here, I can take a look at it when I get home - about 3 hrs
from now.

-Adrian

Adam Heath wrote:

> Adrian Crum wrote:
>> I don't know if this will help, but I reverted back to rev 681992 - my
>> last good build - and it works fine. So the problem was introduced
>> after that.
>>
>> -Adrian
>>
>> Jacques Le Roux wrote:
>>> From: "Adam Heath" <[hidden email]>
>>>> Adrian Crum wrote:
>>>>> I did an SVN update from the trunk this morning, then ran ant clean
>>>>> and
>>>>> build. OFBiz starts, gets to
>>>>>
>>>>> UtilXml.java:241:INFO ] XML Read 0.015s:
>>>>> file:/C:/ofbiz/framework/base/config/component-load.xml
>>>>>
>>>>> then shuts down. Debug.log and ofbiz.log both show first few lines of
>>>>> startup messages, and nothing else. error.log is empty.
>>>>>
>>>>> I did a fresh checkout, ran ant run-install - it stops at the same
>>>>> place. I confirmed I'm running Java 1.5.
>>>>>
>>>>> Any ideas?
>>>>
>>>> Try the attached patch; I don't develop on windows, so haven't
>>>> tested it
>>>> yet.  My windows machine is currently rebooting, after installing
>>>> tortiose, and then I can test this myself.
>>>
>>>
>>> Sorry Adam,
>>>
>>> Same issue :
>
> It'll have to wait until after work(2 more hours) for me to look at it
> closely.  Java 1.5 isn't installed on my windows machine, so I can't
> compile anything there to test it yet.
>
Reply | Threaded
Open this post in threaded view
|

Re: Can't start recent trunk

Jacques Le Roux
Administrator
Adrian, Adam, All,

I confirm the problem is in FileUtil.getFile(FileUtil.java:50)
FYI, as a quick fixup you can revert ComponentContainer.java back to r682265. From Subclipse History view :
svn merge --depth=infinity -r682266:682265
https://svn.apache.org/repos/asf/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/container/ComponentContainer.java 
D:/workspace/ofbizRun/framework/base/src/base/org/ofbiz/base/container/ComponentContainer.java

Jacques

From: "Adrian Crum" <[hidden email]>

> Same thing here, I can take a look at it when I get home - about 3 hrs from now.
>
> -Adrian
>
> Adam Heath wrote:
>> Adrian Crum wrote:
>>> I don't know if this will help, but I reverted back to rev 681992 - my last good build - and it works fine. So the problem was
>>> introduced after that.
>>>
>>> -Adrian
>>>
>>> Jacques Le Roux wrote:
>>>> From: "Adam Heath" <[hidden email]>
>>>>> Adrian Crum wrote:
>>>>>> I did an SVN update from the trunk this morning, then ran ant clean and
>>>>>> build. OFBiz starts, gets to
>>>>>>
>>>>>> UtilXml.java:241:INFO ] XML Read 0.015s:
>>>>>> file:/C:/ofbiz/framework/base/config/component-load.xml
>>>>>>
>>>>>> then shuts down. Debug.log and ofbiz.log both show first few lines of
>>>>>> startup messages, and nothing else. error.log is empty.
>>>>>>
>>>>>> I did a fresh checkout, ran ant run-install - it stops at the same
>>>>>> place. I confirmed I'm running Java 1.5.
>>>>>>
>>>>>> Any ideas?
>>>>>
>>>>> Try the attached patch; I don't develop on windows, so haven't tested it
>>>>> yet.  My windows machine is currently rebooting, after installing
>>>>> tortiose, and then I can test this myself.
>>>>
>>>>
>>>> Sorry Adam,
>>>>
>>>> Same issue :
>>
>> It'll have to wait until after work(2 more hours) for me to look at it closely.  Java 1.5 isn't installed on my windows machine,
>> so I can't compile anything there to test it yet.
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Can't start recent trunk

Jacques Le Roux
Administrator
In reply to this post by Adrian Crum
Oops, too fast on this one. Then you get

2008-08-05 05:40:23,093 (main) [            SSLImpl.java:64 :ERROR]
---- runtime exception report --------------------------------------------------
Exception: java.lang.StringIndexOutOfBoundsException
Message: String index out of range: 1
---- stack trace ---------------------------------------------------------------
java.lang.StringIndexOutOfBoundsException: String index out of range: 1
java.lang.String.charAt(String.java:558)
java.util.regex.Matcher.appendReplacement(Matcher.java:696)
java.util.regex.Matcher.replaceAll(Matcher.java:806)
java.lang.String.replaceAll(String.java:2000)
org.ofbiz.base.util.FileUtil.getFile(FileUtil.java:50)
org.ofbiz.base.util.KeyStoreUtil.getSystemTrustStore(KeyStoreUtil.java:87)
org.ofbiz.base.util.SSLUtil.getTrustManagers(SSLUtil.java:106)
org.ofbiz.catalina.container.SSLImpl$AllowTrustManager.<init>(SSLImpl.java:62)
org.ofbiz.catalina.container.SSLImpl.<init>(SSLImpl.java:48)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:494)
java.lang.Class.newInstance0(Class.java:350)
java.lang.Class.newInstance(Class.java:303)
org.apache.tomcat.util.net.SSLImplementation.getInstance(SSLImplementation.java:75)
org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:152)
org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:214)
org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
org.ofbiz.base.start.Start.init(Start.java:89)
org.ofbiz.base.start.Start.main(Start.java:398)
--------------------------------------------------------------------------------

Jacques

From: "Jacques Le Roux" <[hidden email]>

> Adrian, Adam, All,
>
> I confirm the problem is in FileUtil.getFile(FileUtil.java:50)
> FYI, as a quick fixup you can revert ComponentContainer.java back to r682265. From Subclipse History view :
> svn merge --depth=infinity -r682266:682265
> https://svn.apache.org/repos/asf/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/container/ComponentContainer.java 
> D:/workspace/ofbizRun/framework/base/src/base/org/ofbiz/base/container/ComponentContainer.java
>
> Jacques
>
> From: "Adrian Crum" <[hidden email]>
>> Same thing here, I can take a look at it when I get home - about 3 hrs from now.
>>
>> -Adrian
>>
>> Adam Heath wrote:
>>> Adrian Crum wrote:
>>>> I don't know if this will help, but I reverted back to rev 681992 - my last good build - and it works fine. So the problem was
>>>> introduced after that.
>>>>
>>>> -Adrian
>>>>
>>>> Jacques Le Roux wrote:
>>>>> From: "Adam Heath" <[hidden email]>
>>>>>> Adrian Crum wrote:
>>>>>>> I did an SVN update from the trunk this morning, then ran ant clean and
>>>>>>> build. OFBiz starts, gets to
>>>>>>>
>>>>>>> UtilXml.java:241:INFO ] XML Read 0.015s:
>>>>>>> file:/C:/ofbiz/framework/base/config/component-load.xml
>>>>>>>
>>>>>>> then shuts down. Debug.log and ofbiz.log both show first few lines of
>>>>>>> startup messages, and nothing else. error.log is empty.
>>>>>>>
>>>>>>> I did a fresh checkout, ran ant run-install - it stops at the same
>>>>>>> place. I confirmed I'm running Java 1.5.
>>>>>>>
>>>>>>> Any ideas?
>>>>>>
>>>>>> Try the attached patch; I don't develop on windows, so haven't tested it
>>>>>> yet.  My windows machine is currently rebooting, after installing
>>>>>> tortiose, and then I can test this myself.
>>>>>
>>>>>
>>>>> Sorry Adam,
>>>>>
>>>>> Same issue :
>>>
>>> It'll have to wait until after work(2 more hours) for me to look at it closely.  Java 1.5 isn't installed on my windows machine,
>>> so I can't compile anything there to test it yet.
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Can't start recent trunk

Marco Ruocco
Jacques Le Roux ha scritto:

> Oops, too fast on this one. Then you get
>
> 2008-08-05 05:40:23,093 (main) [            SSLImpl.java:64 :ERROR]
> ---- runtime exception report
> --------------------------------------------------
> Exception: java.lang.StringIndexOutOfBoundsException
> Message: String index out of range: 1
> ---- stack trace
> ---------------------------------------------------------------
> java.lang.StringIndexOutOfBoundsException: String index out of range: 1
> java.lang.String.charAt(String.java:558)
> java.util.regex.Matcher.appendReplacement(Matcher.java:696)
> java.util.regex.Matcher.replaceAll(Matcher.java:806)
> java.lang.String.replaceAll(String.java:2000)
> org.ofbiz.base.util.FileUtil.getFile(FileUtil.java:50)
> org.ofbiz.base.util.KeyStoreUtil.getSystemTrustStore(KeyStoreUtil.java:87)
>
> org.ofbiz.base.util.SSLUtil.getTrustManagers(SSLUtil.java:106)
> org.ofbiz.catalina.container.SSLImpl$AllowTrustManager.<init>(SSLImpl.java:62)
>
> org.ofbiz.catalina.container.SSLImpl.<init>(SSLImpl.java:48)
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>
> java.lang.reflect.Constructor.newInstance(Constructor.java:494)
> java.lang.Class.newInstance0(Class.java:350)
> java.lang.Class.newInstance(Class.java:303)
> org.apache.tomcat.util.net.SSLImplementation.getInstance(SSLImplementation.java:75)
>
> org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:152)
> org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
> org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
>
> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:214)
>
> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
>
> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
> org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
> org.ofbiz.base.start.Start.init(Start.java:89)
> org.ofbiz.base.start.Start.main(Start.java:398)
> --------------------------------------------------------------------------------
>
>
> Jacques
>
> From: "Jacques Le Roux" <[hidden email]>
>> Adrian, Adam, All,
>>
>> I confirm the problem is in FileUtil.getFile(FileUtil.java:50)
>> FYI, as a quick fixup you can revert ComponentContainer.java back to
>> r682265. From Subclipse History view :
>> svn merge --depth=infinity -r682266:682265
>> https://svn.apache.org/repos/asf/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/container/ComponentContainer.java 
>> D:/workspace/ofbizRun/framework/base/src/base/org/ofbiz/base/container/ComponentContainer.java
>>
>>
>> Jacques
>>
>> From: "Adrian Crum" <[hidden email]>
>>> Same thing here, I can take a look at it when I get home - about 3
>>> hrs from now.
>>>
>>> -Adrian
>>>
>>> Adam Heath wrote:
>>>> Adrian Crum wrote:
>>>>> I don't know if this will help, but I reverted back to rev 681992
>>>>> - my last good build - and it works fine. So the problem was
>>>>> introduced after that.
>>>>>
>>>>> -Adrian
>>>>>
>>>>> Jacques Le Roux wrote:
>>>>>> From: "Adam Heath" <[hidden email]>
>>>>>>> Adrian Crum wrote:
>>>>>>>> I did an SVN update from the trunk this morning, then ran ant
>>>>>>>> clean and
>>>>>>>> build. OFBiz starts, gets to
>>>>>>>>
>>>>>>>> UtilXml.java:241:INFO ] XML Read 0.015s:
>>>>>>>> file:/C:/ofbiz/framework/base/config/component-load.xml
>>>>>>>>
>>>>>>>> then shuts down. Debug.log and ofbiz.log both show first few
>>>>>>>> lines of
>>>>>>>> startup messages, and nothing else. error.log is empty.
>>>>>>>>
>>>>>>>> I did a fresh checkout, ran ant run-install - it stops at the same
>>>>>>>> place. I confirmed I'm running Java 1.5.
>>>>>>>>
>>>>>>>> Any ideas?
>>>>>>>
>>>>>>> Try the attached patch; I don't develop on windows, so haven't
>>>>>>> tested it
>>>>>>> yet.  My windows machine is currently rebooting, after installing
>>>>>>> tortiose, and then I can test this myself.
>>>>>>
>>>>>>
>>>>>> Sorry Adam,
>>>>>>
>>>>>> Same issue :
>>>>
>>>> It'll have to wait until after work(2 more hours) for me to look at
>>>> it closely.  Java 1.5 isn't installed on my windows machine, so I
>>>> can't compile anything there to test it yet.
>>>>
>>>
>>
>
>
>
>
Hi all,

I attach the patch that solve the problem on Windows Machine. It depends
on the value of File.separator that in Windows system is "\", that is,
also, the first character of an escape sequence. So the replaceAll
method expects another char after that.

Index: D:/Progetti Eclipse 3.3/ofbiz/framework/base/src/base/org/ofbiz/base/util/FileUtil.java
===================================================================
--- D:/Progetti Eclipse 3.3/ofbiz/framework/base/src/base/org/ofbiz/base/util/FileUtil.java (revision 682284)
+++ D:/Progetti Eclipse 3.3/ofbiz/framework/base/src/base/org/ofbiz/base/util/FileUtil.java (working copy)
@@ -46,12 +46,24 @@
 
     public static final String module = FileUtil.class.getName();
 
+    public static String escapeSeparator( String separator )
+    {
+      if( "\\".equals( separator ) )
+      {
+        return "\\" + separator;
+      }
+      else
+      {
+        return separator;
+      }
+    }
+    
     public static File getFile(String path) {
-        return new File(path.replaceAll("/+|\\\\+", File.separator));
+        return new File(path.replaceAll("/+|\\\\+", escapeSeparator(File.separator)));
     }
 
     public static File getFile(File root, String path) {
-        return new File(root, path.replaceAll("/+|\\\\+", File.separator));
+        return new File(root, path.replaceAll("/+|\\\\+", escapeSeparator(File.separator)));
     }
 
     public static void writeString(String fileName, String s) throws IOException {
Reply | Threaded
Open this post in threaded view
|

Re: Can't start recent trunk

Jacques Le Roux
Administrator
Hi Marco,

Good news this morning : it's already done :o)

Commited in trunk revision: 682652  

Thanks

Jacques

From: "Marco Ruocco" <[hidden email]>

> Jacques Le Roux ha scritto:
>> Oops, too fast on this one. Then you get
>>
>> 2008-08-05 05:40:23,093 (main) [            SSLImpl.java:64 :ERROR]
>> ---- runtime exception report
>> --------------------------------------------------
>> Exception: java.lang.StringIndexOutOfBoundsException
>> Message: String index out of range: 1
>> ---- stack trace
>> ---------------------------------------------------------------
>> java.lang.StringIndexOutOfBoundsException: String index out of range: 1
>> java.lang.String.charAt(String.java:558)
>> java.util.regex.Matcher.appendReplacement(Matcher.java:696)
>> java.util.regex.Matcher.replaceAll(Matcher.java:806)
>> java.lang.String.replaceAll(String.java:2000)
>> org.ofbiz.base.util.FileUtil.getFile(FileUtil.java:50)
>> org.ofbiz.base.util.KeyStoreUtil.getSystemTrustStore(KeyStoreUtil.java:87)
>>
>> org.ofbiz.base.util.SSLUtil.getTrustManagers(SSLUtil.java:106)
>> org.ofbiz.catalina.container.SSLImpl$AllowTrustManager.<init>(SSLImpl.java:62)
>>
>> org.ofbiz.catalina.container.SSLImpl.<init>(SSLImpl.java:48)
>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>>
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>>
>> java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>> java.lang.Class.newInstance0(Class.java:350)
>> java.lang.Class.newInstance(Class.java:303)
>> org.apache.tomcat.util.net.SSLImplementation.getInstance(SSLImplementation.java:75)
>>
>> org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:152)
>> org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
>> org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
>>
>> org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:214)
>>
>> org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:190)
>>
>> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
>> org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>> org.ofbiz.base.start.Start.init(Start.java:89)
>> org.ofbiz.base.start.Start.main(Start.java:398)
>> --------------------------------------------------------------------------------
>>
>>
>> Jacques
>>
>> From: "Jacques Le Roux" <[hidden email]>
>>> Adrian, Adam, All,
>>>
>>> I confirm the problem is in FileUtil.getFile(FileUtil.java:50)
>>> FYI, as a quick fixup you can revert ComponentContainer.java back to
>>> r682265. From Subclipse History view :
>>> svn merge --depth=infinity -r682266:682265
>>> https://svn.apache.org/repos/asf/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/container/ComponentContainer.java 
>>> D:/workspace/ofbizRun/framework/base/src/base/org/ofbiz/base/container/ComponentContainer.java
>>>
>>>
>>> Jacques
>>>
>>> From: "Adrian Crum" <[hidden email]>
>>>> Same thing here, I can take a look at it when I get home - about 3
>>>> hrs from now.
>>>>
>>>> -Adrian
>>>>
>>>> Adam Heath wrote:
>>>>> Adrian Crum wrote:
>>>>>> I don't know if this will help, but I reverted back to rev 681992
>>>>>> - my last good build - and it works fine. So the problem was
>>>>>> introduced after that.
>>>>>>
>>>>>> -Adrian
>>>>>>
>>>>>> Jacques Le Roux wrote:
>>>>>>> From: "Adam Heath" <[hidden email]>
>>>>>>>> Adrian Crum wrote:
>>>>>>>>> I did an SVN update from the trunk this morning, then ran ant
>>>>>>>>> clean and
>>>>>>>>> build. OFBiz starts, gets to
>>>>>>>>>
>>>>>>>>> UtilXml.java:241:INFO ] XML Read 0.015s:
>>>>>>>>> file:/C:/ofbiz/framework/base/config/component-load.xml
>>>>>>>>>
>>>>>>>>> then shuts down. Debug.log and ofbiz.log both show first few
>>>>>>>>> lines of
>>>>>>>>> startup messages, and nothing else. error.log is empty.
>>>>>>>>>
>>>>>>>>> I did a fresh checkout, ran ant run-install - it stops at the same
>>>>>>>>> place. I confirmed I'm running Java 1.5.
>>>>>>>>>
>>>>>>>>> Any ideas?
>>>>>>>>
>>>>>>>> Try the attached patch; I don't develop on windows, so haven't
>>>>>>>> tested it
>>>>>>>> yet.  My windows machine is currently rebooting, after installing
>>>>>>>> tortiose, and then I can test this myself.
>>>>>>>
>>>>>>>
>>>>>>> Sorry Adam,
>>>>>>>
>>>>>>> Same issue :
>>>>>
>>>>> It'll have to wait until after work(2 more hours) for me to look at
>>>>> it closely.  Java 1.5 isn't installed on my windows machine, so I
>>>>> can't compile anything there to test it yet.
>>>>>
>>>>
>>>
>>
>>
>>
>>
> Hi all,
>
> I attach the patch that solve the problem on Windows Machine. It depends
> on the value of File.separator that in Windows system is "\", that is,
> also, the first character of an escape sequence. So the replaceAll
> method expects another char after that.
>


--------------------------------------------------------------------------------


> Index: D:/Progetti Eclipse 3.3/ofbiz/framework/base/src/base/org/ofbiz/base/util/FileUtil.java
> ===================================================================
> --- D:/Progetti Eclipse 3.3/ofbiz/framework/base/src/base/org/ofbiz/base/util/FileUtil.java (revision 682284)
> +++ D:/Progetti Eclipse 3.3/ofbiz/framework/base/src/base/org/ofbiz/base/util/FileUtil.java (working copy)
> @@ -46,12 +46,24 @@
>
>     public static final String module = FileUtil.class.getName();
>
> +    public static String escapeSeparator( String separator )
> +    {
> +      if( "\\".equals( separator ) )
> +      {
> +        return "\\" + separator;
> +      }
> +      else
> +      {
> +        return separator;
> +      }
> +    }
> +    
>     public static File getFile(String path) {
> -        return new File(path.replaceAll("/+|\\\\+", File.separator));
> +        return new File(path.replaceAll("/+|\\\\+", escapeSeparator(File.separator)));
>     }
>
>     public static File getFile(File root, String path) {
> -        return new File(root, path.replaceAll("/+|\\\\+", File.separator));
> +        return new File(root, path.replaceAll("/+|\\\\+", escapeSeparator(File.separator)));
>     }
>
>     public static void writeString(String fileName, String s) throws IOException {
>
Reply | Threaded
Open this post in threaded view
|

Re: Can't start recent trunk

Adam Heath-2
In reply to this post by Marco Ruocco
Marco Ruocco wrote:

> I attach the patch that solve the problem on Windows Machine. It depends
> on the value of File.separator that in Windows system is "\", that is,
> also, the first character of an escape sequence. So the replaceAll
> method expects another char after that.

Nice, I like it.  Thanks for looking into this.
Reply | Threaded
Open this post in threaded view
|

Re: Can't start recent trunk

Adrian Crum
Many thanks to everyone who worked on this. I just updated to the latest
revision and all is working fine.

-Adrian

Adam Heath wrote:
> Marco Ruocco wrote:
>
>> I attach the patch that solve the problem on Windows Machine. It
>> depends on the value of File.separator that in Windows system is "\",
>> that is, also, the first character of an escape sequence. So the
>> replaceAll method expects another char after that.
>
> Nice, I like it.  Thanks for looking into this.
>
Reply | Threaded
Open this post in threaded view
|

Re: Can't start recent trunk

BJ Freeman
thanks for the testing and headsup.
:)

Adrian Crum sent the following on 8/5/2008 10:05 AM:

> Many thanks to everyone who worked on this. I just updated to the latest
> revision and all is working fine.
>
> -Adrian
>
> Adam Heath wrote:
>> Marco Ruocco wrote:
>>
>>> I attach the patch that solve the problem on Windows Machine. It
>>> depends on the value of File.separator that in Windows system is "\",
>>> that is, also, the first character of an escape sequence. So the
>>> replaceAll method expects another char after that.
>>
>> Nice, I like it.  Thanks for looking into this.
>>
>
>
>