You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2012/04/01 13:27:45 UTC
svn commit: r1308078 -
/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
Author: jleroux
Date: Sun Apr 1 11:27:45 2012
New Revision: 1308078
URL: http://svn.apache.org/viewvc?rev=1308078&view=rev
Log:
A patch from Francis ANDRE "Avoid exiting ofbiz when running in debug mode,i.e with -DDEBUG=true set on theJVM arguments" https://issues.apache.org/jira/browse/OFBIZ-3790
This is a patch for allowing to run OFBiz in debug mode,i.e with -DDEBUG=true on the JVM arguments, and avoid to exit from the process when a Error or a StartupException occurs.
jleroux: replaced tabs by 4 spaces
Modified:
ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java?rev=1308078&r1=1308077&r2=1308078&view=diff
==============================================================================
--- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java (original)
+++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java Sun Apr 1 11:27:45 2012
@@ -37,7 +37,7 @@ import java.util.List;
*
*/
public class Start {
-
+ private static final String DEBUG = System.getProperty("DEBUG");
private static final String SHUTDOWN_COMMAND = "SHUTDOWN";
private static final String STATUS_COMMAND = "STATUS";
@@ -206,7 +206,7 @@ public class Start {
System.setProperty("java.class.path", classPath.toString());
ClassLoader classloader = classPath.getClassLoader();
Thread.currentThread().setContextClassLoader(classloader);
- if (System.getProperty("DEBUG") != null) {
+ if (DEBUG != null) {
System.out.println("Startup Classloader: " + classloader.toString());
System.out.println("Startup Classpath: " + classPath.toString());
}
@@ -310,7 +310,12 @@ public class Start {
loader.start();
} catch (StartupException e) {
e.printStackTrace();
- return false;
+ if (DEBUG == null)
+ return false;
+ } catch(Error e) {
+ e.printStackTrace();
+ if (DEBUG == null)
+ return false;
}
}
serverStarted = true;
Re: svn commit: r1308078 - /ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
Posted by Jacques Le Roux <ja...@les7arts.com>.
J. Eckard wrote:
> On Apr 1, 2012, at 10:01 AM, Jacopo Cappellato wrote:
>
>> Well,
>>
>> I would like to understand well what we commit; what is the problem we are trying to fix? I don't understand what is the meaning
>> of being thrown out... shouldn't the debug mode work as the standard mode when an exception is thrown?
>>
>> Jacopo
>>
>
> I agree - I'm not sure I understand the meaning of "...this does not help when debugging the ofbiz code". Also, the link in the
> commit message (https://issues.apache.org/jira/browse/OFBIZ-3790) points to an issue called "email password broken" which appears
> to be unrelated.
>
> Joe
Indeed I C/P and forgot to change the issue number, it's actually https://issues.apache.org/jira/browse/OFBIZ-4776
I hope Francis's explanatation clarified the reason of this commit
Jacques
>> On Apr 1, 2012, at 2:09 PM, Jacques Le Roux wrote:
>>
>>> I guess the idea is to not being thrown out when debugging in Eclipse and be able to troubleshoot from there. Maybe Francis can
>>> explain better?
>>>
>>> As it's only in DEBUG mode (explicitly passed to the JVM) I can't see any issues with this. Do you fear something or foresee
>>> some issues?
>>>
>>> Jacques
>>>
>>> From: "Jacopo Cappellato" <ja...@hotwaxmedia.com>
>>>> It doesn't explain why we should not exit on error.
>>>>
>>>> Jacopo
>>>>
>>>> On Apr 1, 2012, at 1:45 PM, Jacques Le Roux wrote:
>>>>
>>>>> Francis explained it here
>>>>> https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse#RunningandDebuggingOFBizinEclipse-Debugging(orrunning)OFBizinEclipsewithhotreplacementofclasses
>>>>> But he should update now because I have just added the converters in
>>>>> /ofbiz/framework/entity/src/META-INF/services/org.ofbiz.base.conversion.ConverterLoader at
>>>>> http://svn.apache.org/viewvc?rev=1308085&view=rev
>>>>>
>>>>> Jacques
>>>>>
>>>>> From: "Jacopo Cappellato" <ja...@hotwaxmedia.com>
>>>>>> maybe I don't understand but why should we want this?
>>>>>>
>>>>>> Jacopo
>>>>>>
>>>>>> On Apr 1, 2012, at 1:27 PM, jleroux@apache.org wrote:
>>>>>>
>>>>>>> Author: jleroux
>>>>>>> Date: Sun Apr 1 11:27:45 2012
>>>>>>> New Revision: 1308078
>>>>>>>
>>>>>>> URL: http://svn.apache.org/viewvc?rev=1308078&view=rev
>>>>>>> Log:
>>>>>>> A patch from Francis ANDRE "Avoid exiting ofbiz when running in debug mode,i.e with -DDEBUG=true set on theJVM arguments"
>>>>>>> https://issues.apache.org/jira/browse/OFBIZ-3790
>>>>>>>
>>>>>>> This is a patch for allowing to run OFBiz in debug mode,i.e with -DDEBUG=true on the JVM arguments, and avoid to exit from
>>>>>>> the process when a Error or a StartupException occurs.
>>>>>>>
>>>>>>> jleroux: replaced tabs by 4 spaces
>>>>>>>
>>>>>>> Modified:
>>>>>>> ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
>>>>>>>
>>>>>>> Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
>>>>>>> URL:
>>>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java?rev=1308078&r1=1308077&r2=1308078&view=diff
>>>>>>> ============================================================================== ---
>>>>>>> ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java (original) +++
>>>>>>> ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java Sun Apr 1 11:27:45 2012 @@ -37,7 +37,7 @@ import
>>>>>>> java.util.List; *
>>>>>>> */
>>>>>>> public class Start {
>>>>>>> -
>>>>>>> + private static final String DEBUG = System.getProperty("DEBUG");
>>>>>>> private static final String SHUTDOWN_COMMAND = "SHUTDOWN";
>>>>>>> private static final String STATUS_COMMAND = "STATUS";
>>>>>>>
>>>>>>> @@ -206,7 +206,7 @@ public class Start {
>>>>>>> System.setProperty("java.class.path", classPath.toString());
>>>>>>> ClassLoader classloader = classPath.getClassLoader();
>>>>>>> Thread.currentThread().setContextClassLoader(classloader);
>>>>>>> - if (System.getProperty("DEBUG") != null) {
>>>>>>> + if (DEBUG != null) {
>>>>>>> System.out.println("Startup Classloader: " + classloader.toString());
>>>>>>> System.out.println("Startup Classpath: " + classPath.toString());
>>>>>>> }
>>>>>>> @@ -310,7 +310,12 @@ public class Start {
>>>>>>> loader.start();
>>>>>>> } catch (StartupException e) {
>>>>>>> e.printStackTrace();
>>>>>>> - return false;
>>>>>>> + if (DEBUG == null)
>>>>>>> + return false;
>>>>>>> + } catch(Error e) {
>>>>>>> + e.printStackTrace();
>>>>>>> + if (DEBUG == null)
>>>>>>> + return false;
>>>>>>> }
>>>>>>> }
>>>>>>> serverStarted = true;
Re: svn commit: r1308078 - /ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
Posted by Jacques Le Roux <ja...@les7arts.com>.
OK, to simplify I removed it at revision: 1308792
Jacques
From: "Scott Gray" <sc...@hotwaxmedia.com>
> On 2/04/2012, at 5:35 AM, J. Eckard wrote:
>
>>
>> On Apr 1, 2012, at 10:01 AM, Jacopo Cappellato wrote:
>>
>>> Well,
>>>
>>> I would like to understand well what we commit; what is the problem we are trying to fix? I don't understand what is the meaning
>>> of being thrown out... shouldn't the debug mode work as the standard mode when an exception is thrown?
>>>
>>> Jacopo
>>>
>>
>> I agree - I'm not sure I understand the meaning of "...this does not help when debugging the ofbiz code". Also, the link in the
>> commit message (https://issues.apache.org/jira/browse/OFBIZ-3790) points to an issue called "email password broken" which appears
>> to be unrelated.
>>
>> Joe
>
>
> +1, wouldn't you just put a breakpoint in place and debug from there? I can't understand the need for this. It's not that it's
> going to cause any problems but I think it's time we stopped putting obscure pieces of code that no one understands in the code
> base.
>
> p.s. Jacques, I pretty sure I've asked this a million times, but if you don't understand something then please don't commit it.
> "It works and seems like a feature" is not a substitute for a full understanding of the code your committing. Deferring to the
> contributor for comment isn't (IMO) acceptable, once you commit the code it becomes your code.
>
>
>>> On Apr 1, 2012, at 2:09 PM, Jacques Le Roux wrote:
>>>
>>>> I guess the idea is to not being thrown out when debugging in Eclipse and be able to troubleshoot from there. Maybe Francis can
>>>> explain better?
>>>>
>>>> As it's only in DEBUG mode (explicitly passed to the JVM) I can't see any issues with this. Do you fear something or foresee
>>>> some issues?
>>>>
>>>> Jacques
>>>>
>>>> From: "Jacopo Cappellato" <ja...@hotwaxmedia.com>
>>>>> It doesn't explain why we should not exit on error.
>>>>>
>>>>> Jacopo
>>>>>
>>>>> On Apr 1, 2012, at 1:45 PM, Jacques Le Roux wrote:
>>>>>
>>>>>> Francis explained it here
>>>>>> https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse#RunningandDebuggingOFBizinEclipse-Debugging(orrunning)OFBizinEclipsewithhotreplacementofclasses
>>>>>> But he should update now because I have just added the converters in
>>>>>> /ofbiz/framework/entity/src/META-INF/services/org.ofbiz.base.conversion.ConverterLoader at
>>>>>> http://svn.apache.org/viewvc?rev=1308085&view=rev
>>>>>>
>>>>>> Jacques
>>>>>>
>>>>>> From: "Jacopo Cappellato" <ja...@hotwaxmedia.com>
>>>>>>> maybe I don't understand but why should we want this?
>>>>>>>
>>>>>>> Jacopo
>>>>>>>
>>>>>>> On Apr 1, 2012, at 1:27 PM, jleroux@apache.org wrote:
>>>>>>>
>>>>>>>> Author: jleroux
>>>>>>>> Date: Sun Apr 1 11:27:45 2012
>>>>>>>> New Revision: 1308078
>>>>>>>>
>>>>>>>> URL: http://svn.apache.org/viewvc?rev=1308078&view=rev
>>>>>>>> Log:
>>>>>>>> A patch from Francis ANDRE "Avoid exiting ofbiz when running in debug mode,i.e with -DDEBUG=true set on theJVM arguments"
>>>>>>>> https://issues.apache.org/jira/browse/OFBIZ-3790
>>>>>>>>
>>>>>>>> This is a patch for allowing to run OFBiz in debug mode,i.e with -DDEBUG=true on the JVM arguments, and avoid to exit from
>>>>>>>> the process when a Error or a StartupException occurs.
>>>>>>>>
>>>>>>>> jleroux: replaced tabs by 4 spaces
>>>>>>>>
>>>>>>>> Modified:
>>>>>>>> ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
>>>>>>>>
>>>>>>>> Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
>>>>>>>> URL:
>>>>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java?rev=1308078&r1=1308077&r2=1308078&view=diff
>>>>>>>> ==============================================================================
>>>>>>>> --- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java (original)
>>>>>>>> +++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java Sun Apr 1 11:27:45 2012
>>>>>>>> @@ -37,7 +37,7 @@ import java.util.List;
>>>>>>>> *
>>>>>>>> */
>>>>>>>> public class Start {
>>>>>>>> -
>>>>>>>> + private static final String DEBUG = System.getProperty("DEBUG");
>>>>>>>> private static final String SHUTDOWN_COMMAND = "SHUTDOWN";
>>>>>>>> private static final String STATUS_COMMAND = "STATUS";
>>>>>>>>
>>>>>>>> @@ -206,7 +206,7 @@ public class Start {
>>>>>>>> System.setProperty("java.class.path", classPath.toString());
>>>>>>>> ClassLoader classloader = classPath.getClassLoader();
>>>>>>>> Thread.currentThread().setContextClassLoader(classloader);
>>>>>>>> - if (System.getProperty("DEBUG") != null) {
>>>>>>>> + if (DEBUG != null) {
>>>>>>>> System.out.println("Startup Classloader: " + classloader.toString());
>>>>>>>> System.out.println("Startup Classpath: " + classPath.toString());
>>>>>>>> }
>>>>>>>> @@ -310,7 +310,12 @@ public class Start {
>>>>>>>> loader.start();
>>>>>>>> } catch (StartupException e) {
>>>>>>>> e.printStackTrace();
>>>>>>>> - return false;
>>>>>>>> + if (DEBUG == null)
>>>>>>>> + return false;
>>>>>>>> + } catch(Error e) {
>>>>>>>> + e.printStackTrace();
>>>>>>>> + if (DEBUG == null)
>>>>>>>> + return false;
>>>>>>>> }
>>>>>>>> }
>>>>>>>> serverStarted = true;
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>
>>>
>>
>
>
Re: svn commit: r1308078 - /ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
Posted by Scott Gray <sc...@hotwaxmedia.com>.
On 2/04/2012, at 5:35 AM, J. Eckard wrote:
>
> On Apr 1, 2012, at 10:01 AM, Jacopo Cappellato wrote:
>
>> Well,
>>
>> I would like to understand well what we commit; what is the problem we are trying to fix? I don't understand what is the meaning of being thrown out... shouldn't the debug mode work as the standard mode when an exception is thrown?
>>
>> Jacopo
>>
>
> I agree - I'm not sure I understand the meaning of "...this does not help when debugging the ofbiz code". Also, the link in the commit message (https://issues.apache.org/jira/browse/OFBIZ-3790) points to an issue called "email password broken" which appears to be unrelated.
>
> Joe
+1, wouldn't you just put a breakpoint in place and debug from there? I can't understand the need for this. It's not that it's going to cause any problems but I think it's time we stopped putting obscure pieces of code that no one understands in the code base.
p.s. Jacques, I pretty sure I've asked this a million times, but if you don't understand something then please don't commit it. "It works and seems like a feature" is not a substitute for a full understanding of the code your committing. Deferring to the contributor for comment isn't (IMO) acceptable, once you commit the code it becomes your code.
>> On Apr 1, 2012, at 2:09 PM, Jacques Le Roux wrote:
>>
>>> I guess the idea is to not being thrown out when debugging in Eclipse and be able to troubleshoot from there. Maybe Francis can explain better?
>>>
>>> As it's only in DEBUG mode (explicitly passed to the JVM) I can't see any issues with this. Do you fear something or foresee some issues?
>>>
>>> Jacques
>>>
>>> From: "Jacopo Cappellato" <ja...@hotwaxmedia.com>
>>>> It doesn't explain why we should not exit on error.
>>>>
>>>> Jacopo
>>>>
>>>> On Apr 1, 2012, at 1:45 PM, Jacques Le Roux wrote:
>>>>
>>>>> Francis explained it here https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse#RunningandDebuggingOFBizinEclipse-Debugging(orrunning)OFBizinEclipsewithhotreplacementofclasses
>>>>> But he should update now because I have just added the converters in /ofbiz/framework/entity/src/META-INF/services/org.ofbiz.base.conversion.ConverterLoader at http://svn.apache.org/viewvc?rev=1308085&view=rev
>>>>>
>>>>> Jacques
>>>>>
>>>>> From: "Jacopo Cappellato" <ja...@hotwaxmedia.com>
>>>>>> maybe I don't understand but why should we want this?
>>>>>>
>>>>>> Jacopo
>>>>>>
>>>>>> On Apr 1, 2012, at 1:27 PM, jleroux@apache.org wrote:
>>>>>>
>>>>>>> Author: jleroux
>>>>>>> Date: Sun Apr 1 11:27:45 2012
>>>>>>> New Revision: 1308078
>>>>>>>
>>>>>>> URL: http://svn.apache.org/viewvc?rev=1308078&view=rev
>>>>>>> Log:
>>>>>>> A patch from Francis ANDRE "Avoid exiting ofbiz when running in debug mode,i.e with -DDEBUG=true set on theJVM arguments" https://issues.apache.org/jira/browse/OFBIZ-3790
>>>>>>>
>>>>>>> This is a patch for allowing to run OFBiz in debug mode,i.e with -DDEBUG=true on the JVM arguments, and avoid to exit from the process when a Error or a StartupException occurs.
>>>>>>>
>>>>>>> jleroux: replaced tabs by 4 spaces
>>>>>>>
>>>>>>> Modified:
>>>>>>> ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
>>>>>>>
>>>>>>> Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
>>>>>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java?rev=1308078&r1=1308077&r2=1308078&view=diff
>>>>>>> ==============================================================================
>>>>>>> --- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java (original)
>>>>>>> +++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java Sun Apr 1 11:27:45 2012
>>>>>>> @@ -37,7 +37,7 @@ import java.util.List;
>>>>>>> *
>>>>>>> */
>>>>>>> public class Start {
>>>>>>> -
>>>>>>> + private static final String DEBUG = System.getProperty("DEBUG");
>>>>>>> private static final String SHUTDOWN_COMMAND = "SHUTDOWN";
>>>>>>> private static final String STATUS_COMMAND = "STATUS";
>>>>>>>
>>>>>>> @@ -206,7 +206,7 @@ public class Start {
>>>>>>> System.setProperty("java.class.path", classPath.toString());
>>>>>>> ClassLoader classloader = classPath.getClassLoader();
>>>>>>> Thread.currentThread().setContextClassLoader(classloader);
>>>>>>> - if (System.getProperty("DEBUG") != null) {
>>>>>>> + if (DEBUG != null) {
>>>>>>> System.out.println("Startup Classloader: " + classloader.toString());
>>>>>>> System.out.println("Startup Classpath: " + classPath.toString());
>>>>>>> }
>>>>>>> @@ -310,7 +310,12 @@ public class Start {
>>>>>>> loader.start();
>>>>>>> } catch (StartupException e) {
>>>>>>> e.printStackTrace();
>>>>>>> - return false;
>>>>>>> + if (DEBUG == null)
>>>>>>> + return false;
>>>>>>> + } catch(Error e) {
>>>>>>> + e.printStackTrace();
>>>>>>> + if (DEBUG == null)
>>>>>>> + return false;
>>>>>>> }
>>>>>>> }
>>>>>>> serverStarted = true;
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
>
Re: svn commit: r1308078 - /ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
Posted by "J. Eckard" <ec...@redrocketcorp.com>.
On Apr 1, 2012, at 10:01 AM, Jacopo Cappellato wrote:
> Well,
>
> I would like to understand well what we commit; what is the problem we are trying to fix? I don't understand what is the meaning of being thrown out... shouldn't the debug mode work as the standard mode when an exception is thrown?
>
> Jacopo
>
I agree - I'm not sure I understand the meaning of "...this does not help when debugging the ofbiz code". Also, the link in the commit message (https://issues.apache.org/jira/browse/OFBIZ-3790) points to an issue called "email password broken" which appears to be unrelated.
Joe
> On Apr 1, 2012, at 2:09 PM, Jacques Le Roux wrote:
>
>> I guess the idea is to not being thrown out when debugging in Eclipse and be able to troubleshoot from there. Maybe Francis can explain better?
>>
>> As it's only in DEBUG mode (explicitly passed to the JVM) I can't see any issues with this. Do you fear something or foresee some issues?
>>
>> Jacques
>>
>> From: "Jacopo Cappellato" <ja...@hotwaxmedia.com>
>>> It doesn't explain why we should not exit on error.
>>>
>>> Jacopo
>>>
>>> On Apr 1, 2012, at 1:45 PM, Jacques Le Roux wrote:
>>>
>>>> Francis explained it here https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse#RunningandDebuggingOFBizinEclipse-Debugging(orrunning)OFBizinEclipsewithhotreplacementofclasses
>>>> But he should update now because I have just added the converters in /ofbiz/framework/entity/src/META-INF/services/org.ofbiz.base.conversion.ConverterLoader at http://svn.apache.org/viewvc?rev=1308085&view=rev
>>>>
>>>> Jacques
>>>>
>>>> From: "Jacopo Cappellato" <ja...@hotwaxmedia.com>
>>>>> maybe I don't understand but why should we want this?
>>>>>
>>>>> Jacopo
>>>>>
>>>>> On Apr 1, 2012, at 1:27 PM, jleroux@apache.org wrote:
>>>>>
>>>>>> Author: jleroux
>>>>>> Date: Sun Apr 1 11:27:45 2012
>>>>>> New Revision: 1308078
>>>>>>
>>>>>> URL: http://svn.apache.org/viewvc?rev=1308078&view=rev
>>>>>> Log:
>>>>>> A patch from Francis ANDRE "Avoid exiting ofbiz when running in debug mode,i.e with -DDEBUG=true set on theJVM arguments" https://issues.apache.org/jira/browse/OFBIZ-3790
>>>>>>
>>>>>> This is a patch for allowing to run OFBiz in debug mode,i.e with -DDEBUG=true on the JVM arguments, and avoid to exit from the process when a Error or a StartupException occurs.
>>>>>>
>>>>>> jleroux: replaced tabs by 4 spaces
>>>>>>
>>>>>> Modified:
>>>>>> ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
>>>>>>
>>>>>> Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
>>>>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java?rev=1308078&r1=1308077&r2=1308078&view=diff
>>>>>> ==============================================================================
>>>>>> --- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java (original)
>>>>>> +++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java Sun Apr 1 11:27:45 2012
>>>>>> @@ -37,7 +37,7 @@ import java.util.List;
>>>>>> *
>>>>>> */
>>>>>> public class Start {
>>>>>> -
>>>>>> + private static final String DEBUG = System.getProperty("DEBUG");
>>>>>> private static final String SHUTDOWN_COMMAND = "SHUTDOWN";
>>>>>> private static final String STATUS_COMMAND = "STATUS";
>>>>>>
>>>>>> @@ -206,7 +206,7 @@ public class Start {
>>>>>> System.setProperty("java.class.path", classPath.toString());
>>>>>> ClassLoader classloader = classPath.getClassLoader();
>>>>>> Thread.currentThread().setContextClassLoader(classloader);
>>>>>> - if (System.getProperty("DEBUG") != null) {
>>>>>> + if (DEBUG != null) {
>>>>>> System.out.println("Startup Classloader: " + classloader.toString());
>>>>>> System.out.println("Startup Classpath: " + classPath.toString());
>>>>>> }
>>>>>> @@ -310,7 +310,12 @@ public class Start {
>>>>>> loader.start();
>>>>>> } catch (StartupException e) {
>>>>>> e.printStackTrace();
>>>>>> - return false;
>>>>>> + if (DEBUG == null)
>>>>>> + return false;
>>>>>> + } catch(Error e) {
>>>>>> + e.printStackTrace();
>>>>>> + if (DEBUG == null)
>>>>>> + return false;
>>>>>> }
>>>>>> }
>>>>>> serverStarted = true;
>>>>>>
>>>>>>
>>>>>
>>>
>
Re: svn commit: r1308078 - /ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
Posted by Jacopo Cappellato <ja...@hotwaxmedia.com>.
Sorry, I am not an Eclipse user but I know that there are several out there that are using Eclipse to debug OFbiz: is any of you experiencing the same issue?
Thanks,
Jacopo
On Apr 1, 2012, at 7:06 PM, Francis ANDRE wrote:
> Hi Jacopo and Jacques
>
> Here the point:
>
> When running under Eclipse with the standard run launcher or the debug launcher, the ofbiz JVM exits as per the code in Start.java on any Error or StartupException since returning false from startStartLoaders() exits with a 99 code:
>
> public void start() {
> if (!startStartLoaders()) {
> System.exit(99);
> }
> if (config.shutdownAfterLoad) {
> stopServer();
> }
> }
>
> this does not help when debugging the ofbiz code. Thus, returning true from startStartLoaders() in any case will let the JVM alive and will make the développement and debugging as any standard java application.
>
>
> Here the log when running the Start code and returning false on the NoClassDefFoundError: org/eclipse/core/runtime/CoreException:
>
> 2012-04-01 18:55:21,843 (main) [ CatalinaContainer.java:255:INFO ] Started Apache Tomcat/7.0.26
> 2012-04-01 18:55:21,843 (main) [ BirtContainer.java:50 :INFO ] Start BIRT container
> 2012-04-01 18:55:21,937 (main) [ BirtContainer.java:70 :INFO ] Startup BIRT platform
> java.lang.NoClassDefFoundError: org/eclipse/core/runtime/CoreException
> at org.eclipse.birt.core.framework.Platform.createPlatformLauncher(Platform.java:115)
> at org.eclipse.birt.core.framework.Platform.startup(Platform.java:74)
> at org.ofbiz.birt.container.BirtContainer.start(BirtContainer.java:71)
> at org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:230)
> at org.ofbiz.base.start.Start.startStartLoaders(Start.java:310)
> at org.ofbiz.base.start.Start.start(Start.java:289)
> at org.ofbiz.base.start.Start.main(Start.java:119)
> Caused by: java.lang.ClassNotFoundException: org.eclipse.core.runtime.CoreException
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> ... 7 more
>
>
>
> Le 01/04/2012 16:01, Jacopo Cappellato a écrit :
>> Well,
>>
>> I would like to understand well what we commit; what is the problem we are trying to fix? I don't understand what is the meaning of being thrown out... shouldn't the debug mode work as the standard mode when an exception is thrown?
>>
>> Jacopo
>>
>> On Apr 1, 2012, at 2:09 PM, Jacques Le Roux wrote:
>>
>>> I guess the idea is to not being thrown out when debugging in Eclipse and be able to troubleshoot from there. Maybe Francis can explain better?
>>>
>>> As it's only in DEBUG mode (explicitly passed to the JVM) I can't see any issues with this. Do you fear something or foresee some issues?
>>>
>>> Jacques
>>>
>>> From: "Jacopo Cappellato"<ja...@hotwaxmedia.com>
>>>> It doesn't explain why we should not exit on error.
>>>>
>>>> Jacopo
>>>>
>>>> On Apr 1, 2012, at 1:45 PM, Jacques Le Roux wrote:
>>>>
>>>>> Francis explained it here https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse#RunningandDebuggingOFBizinEclipse-Debugging(orrunning)OFBizinEclipsewithhotreplacementofclasses
>>>>> But he should update now because I have just added the converters in /ofbiz/framework/entity/src/META-INF/services/org.ofbiz.base.conversion.ConverterLoader at http://svn.apache.org/viewvc?rev=1308085&view=rev
>>>>>
>>>>> Jacques
>>>>>
>>>>> From: "Jacopo Cappellato"<ja...@hotwaxmedia.com>
>>>>>> maybe I don't understand but why should we want this?
>>>>>>
>>>>>> Jacopo
>>>>>>
>>>>>> On Apr 1, 2012, at 1:27 PM, jleroux@apache.org wrote:
>>>>>>
>>>>>>> Author: jleroux
>>>>>>> Date: Sun Apr 1 11:27:45 2012
>>>>>>> New Revision: 1308078
>>>>>>>
>>>>>>> URL: http://svn.apache.org/viewvc?rev=1308078&view=rev
>>>>>>> Log:
>>>>>>> A patch from Francis ANDRE "Avoid exiting ofbiz when running in debug mode,i.e with -DDEBUG=true set on theJVM arguments" https://issues.apache.org/jira/browse/OFBIZ-3790
>>>>>>>
>>>>>>> This is a patch for allowing to run OFBiz in debug mode,i.e with -DDEBUG=true on the JVM arguments, and avoid to exit from the process when a Error or a StartupException occurs.
>>>>>>>
>>>>>>> jleroux: replaced tabs by 4 spaces
>>>>>>>
>>>>>>> Modified:
>>>>>>> ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
>>>>>>>
>>>>>>> Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
>>>>>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java?rev=1308078&r1=1308077&r2=1308078&view=diff
>>>>>>> ==============================================================================
>>>>>>> --- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java (original)
>>>>>>> +++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java Sun Apr 1 11:27:45 2012
>>>>>>> @@ -37,7 +37,7 @@ import java.util.List;
>>>>>>> *
>>>>>>> */
>>>>>>> public class Start {
>>>>>>> -
>>>>>>> + private static final String DEBUG = System.getProperty("DEBUG");
>>>>>>> private static final String SHUTDOWN_COMMAND = "SHUTDOWN";
>>>>>>> private static final String STATUS_COMMAND = "STATUS";
>>>>>>>
>>>>>>> @@ -206,7 +206,7 @@ public class Start {
>>>>>>> System.setProperty("java.class.path", classPath.toString());
>>>>>>> ClassLoader classloader = classPath.getClassLoader();
>>>>>>> Thread.currentThread().setContextClassLoader(classloader);
>>>>>>> - if (System.getProperty("DEBUG") != null) {
>>>>>>> + if (DEBUG != null) {
>>>>>>> System.out.println("Startup Classloader: " + classloader.toString());
>>>>>>> System.out.println("Startup Classpath: " + classPath.toString());
>>>>>>> }
>>>>>>> @@ -310,7 +310,12 @@ public class Start {
>>>>>>> loader.start();
>>>>>>> } catch (StartupException e) {
>>>>>>> e.printStackTrace();
>>>>>>> - return false;
>>>>>>> + if (DEBUG == null)
>>>>>>> + return false;
>>>>>>> + } catch(Error e) {
>>>>>>> + e.printStackTrace();
>>>>>>> + if (DEBUG == null)
>>>>>>> + return false;
>>>>>>> }
>>>>>>> }
>>>>>>> serverStarted = true;
>>>>>>>
>>>>>>>
>>
Re: svn commit: r1308078 - /ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
Posted by Francis ANDRE <fr...@orange.fr>.
Hi Jacopo and Jacques
Here the point:
When running under Eclipse with the standard run launcher or the debug launcher,
the ofbiz JVM exits as per the code in Start.java on any Error or
StartupException since returning false from startStartLoaders() exits with a 99
code:
public void start() {
if (!startStartLoaders()) {
System.exit(99);
}
if (config.shutdownAfterLoad) {
stopServer();
}
}
this does not help when debugging the ofbiz code. Thus, returning true from
startStartLoaders() in any case will let the JVM alive and will make the
développement and debugging as any standard java application.
Here the log when running the Start code and returning false on the
NoClassDefFoundError: org/eclipse/core/runtime/CoreException:
2012-04-01 18:55:21,843 (main) [ CatalinaContainer.java:255:INFO ] Started
Apache Tomcat/7.0.26
2012-04-01 18:55:21,843 (main) [ BirtContainer.java:50 :INFO ] Start BIRT
container
2012-04-01 18:55:21,937 (main) [ BirtContainer.java:70 :INFO ] Startup BIRT
platform
java.lang.NoClassDefFoundError: org/eclipse/core/runtime/CoreException
at
org.eclipse.birt.core.framework.Platform.createPlatformLauncher(Platform.java:115)
at org.eclipse.birt.core.framework.Platform.startup(Platform.java:74)
at org.ofbiz.birt.container.BirtContainer.start(BirtContainer.java:71)
at org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:230)
at org.ofbiz.base.start.Start.startStartLoaders(Start.java:310)
at org.ofbiz.base.start.Start.start(Start.java:289)
at org.ofbiz.base.start.Start.main(Start.java:119)
Caused by: java.lang.ClassNotFoundException: org.eclipse.core.runtime.CoreException
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 7 more
Le 01/04/2012 16:01, Jacopo Cappellato a écrit :
> Well,
>
> I would like to understand well what we commit; what is the problem we are trying to fix? I don't understand what is the meaning of being thrown out... shouldn't the debug mode work as the standard mode when an exception is thrown?
>
> Jacopo
>
> On Apr 1, 2012, at 2:09 PM, Jacques Le Roux wrote:
>
>> I guess the idea is to not being thrown out when debugging in Eclipse and be able to troubleshoot from there. Maybe Francis can explain better?
>>
>> As it's only in DEBUG mode (explicitly passed to the JVM) I can't see any issues with this. Do you fear something or foresee some issues?
>>
>> Jacques
>>
>> From: "Jacopo Cappellato"<ja...@hotwaxmedia.com>
>>> It doesn't explain why we should not exit on error.
>>>
>>> Jacopo
>>>
>>> On Apr 1, 2012, at 1:45 PM, Jacques Le Roux wrote:
>>>
>>>> Francis explained it here https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse#RunningandDebuggingOFBizinEclipse-Debugging(orrunning)OFBizinEclipsewithhotreplacementofclasses
>>>> But he should update now because I have just added the converters in /ofbiz/framework/entity/src/META-INF/services/org.ofbiz.base.conversion.ConverterLoader at http://svn.apache.org/viewvc?rev=1308085&view=rev
>>>>
>>>> Jacques
>>>>
>>>> From: "Jacopo Cappellato"<ja...@hotwaxmedia.com>
>>>>> maybe I don't understand but why should we want this?
>>>>>
>>>>> Jacopo
>>>>>
>>>>> On Apr 1, 2012, at 1:27 PM, jleroux@apache.org wrote:
>>>>>
>>>>>> Author: jleroux
>>>>>> Date: Sun Apr 1 11:27:45 2012
>>>>>> New Revision: 1308078
>>>>>>
>>>>>> URL: http://svn.apache.org/viewvc?rev=1308078&view=rev
>>>>>> Log:
>>>>>> A patch from Francis ANDRE "Avoid exiting ofbiz when running in debug mode,i.e with -DDEBUG=true set on theJVM arguments" https://issues.apache.org/jira/browse/OFBIZ-3790
>>>>>>
>>>>>> This is a patch for allowing to run OFBiz in debug mode,i.e with -DDEBUG=true on the JVM arguments, and avoid to exit from the process when a Error or a StartupException occurs.
>>>>>>
>>>>>> jleroux: replaced tabs by 4 spaces
>>>>>>
>>>>>> Modified:
>>>>>> ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
>>>>>>
>>>>>> Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
>>>>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java?rev=1308078&r1=1308077&r2=1308078&view=diff
>>>>>> ==============================================================================
>>>>>> --- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java (original)
>>>>>> +++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java Sun Apr 1 11:27:45 2012
>>>>>> @@ -37,7 +37,7 @@ import java.util.List;
>>>>>> *
>>>>>> */
>>>>>> public class Start {
>>>>>> -
>>>>>> + private static final String DEBUG = System.getProperty("DEBUG");
>>>>>> private static final String SHUTDOWN_COMMAND = "SHUTDOWN";
>>>>>> private static final String STATUS_COMMAND = "STATUS";
>>>>>>
>>>>>> @@ -206,7 +206,7 @@ public class Start {
>>>>>> System.setProperty("java.class.path", classPath.toString());
>>>>>> ClassLoader classloader = classPath.getClassLoader();
>>>>>> Thread.currentThread().setContextClassLoader(classloader);
>>>>>> - if (System.getProperty("DEBUG") != null) {
>>>>>> + if (DEBUG != null) {
>>>>>> System.out.println("Startup Classloader: " + classloader.toString());
>>>>>> System.out.println("Startup Classpath: " + classPath.toString());
>>>>>> }
>>>>>> @@ -310,7 +310,12 @@ public class Start {
>>>>>> loader.start();
>>>>>> } catch (StartupException e) {
>>>>>> e.printStackTrace();
>>>>>> - return false;
>>>>>> + if (DEBUG == null)
>>>>>> + return false;
>>>>>> + } catch(Error e) {
>>>>>> + e.printStackTrace();
>>>>>> + if (DEBUG == null)
>>>>>> + return false;
>>>>>> }
>>>>>> }
>>>>>> serverStarted = true;
>>>>>>
>>>>>>
>
Re: svn commit: r1308078 - /ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
Posted by Jacopo Cappellato <ja...@hotwaxmedia.com>.
Well,
I would like to understand well what we commit; what is the problem we are trying to fix? I don't understand what is the meaning of being thrown out... shouldn't the debug mode work as the standard mode when an exception is thrown?
Jacopo
On Apr 1, 2012, at 2:09 PM, Jacques Le Roux wrote:
> I guess the idea is to not being thrown out when debugging in Eclipse and be able to troubleshoot from there. Maybe Francis can explain better?
>
> As it's only in DEBUG mode (explicitly passed to the JVM) I can't see any issues with this. Do you fear something or foresee some issues?
>
> Jacques
>
> From: "Jacopo Cappellato" <ja...@hotwaxmedia.com>
>> It doesn't explain why we should not exit on error.
>>
>> Jacopo
>>
>> On Apr 1, 2012, at 1:45 PM, Jacques Le Roux wrote:
>>
>>> Francis explained it here https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse#RunningandDebuggingOFBizinEclipse-Debugging(orrunning)OFBizinEclipsewithhotreplacementofclasses
>>> But he should update now because I have just added the converters in /ofbiz/framework/entity/src/META-INF/services/org.ofbiz.base.conversion.ConverterLoader at http://svn.apache.org/viewvc?rev=1308085&view=rev
>>>
>>> Jacques
>>>
>>> From: "Jacopo Cappellato" <ja...@hotwaxmedia.com>
>>>> maybe I don't understand but why should we want this?
>>>>
>>>> Jacopo
>>>>
>>>> On Apr 1, 2012, at 1:27 PM, jleroux@apache.org wrote:
>>>>
>>>>> Author: jleroux
>>>>> Date: Sun Apr 1 11:27:45 2012
>>>>> New Revision: 1308078
>>>>>
>>>>> URL: http://svn.apache.org/viewvc?rev=1308078&view=rev
>>>>> Log:
>>>>> A patch from Francis ANDRE "Avoid exiting ofbiz when running in debug mode,i.e with -DDEBUG=true set on theJVM arguments" https://issues.apache.org/jira/browse/OFBIZ-3790
>>>>>
>>>>> This is a patch for allowing to run OFBiz in debug mode,i.e with -DDEBUG=true on the JVM arguments, and avoid to exit from the process when a Error or a StartupException occurs.
>>>>>
>>>>> jleroux: replaced tabs by 4 spaces
>>>>>
>>>>> Modified:
>>>>> ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
>>>>>
>>>>> Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
>>>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java?rev=1308078&r1=1308077&r2=1308078&view=diff
>>>>> ==============================================================================
>>>>> --- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java (original)
>>>>> +++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java Sun Apr 1 11:27:45 2012
>>>>> @@ -37,7 +37,7 @@ import java.util.List;
>>>>> *
>>>>> */
>>>>> public class Start {
>>>>> -
>>>>> + private static final String DEBUG = System.getProperty("DEBUG");
>>>>> private static final String SHUTDOWN_COMMAND = "SHUTDOWN";
>>>>> private static final String STATUS_COMMAND = "STATUS";
>>>>>
>>>>> @@ -206,7 +206,7 @@ public class Start {
>>>>> System.setProperty("java.class.path", classPath.toString());
>>>>> ClassLoader classloader = classPath.getClassLoader();
>>>>> Thread.currentThread().setContextClassLoader(classloader);
>>>>> - if (System.getProperty("DEBUG") != null) {
>>>>> + if (DEBUG != null) {
>>>>> System.out.println("Startup Classloader: " + classloader.toString());
>>>>> System.out.println("Startup Classpath: " + classPath.toString());
>>>>> }
>>>>> @@ -310,7 +310,12 @@ public class Start {
>>>>> loader.start();
>>>>> } catch (StartupException e) {
>>>>> e.printStackTrace();
>>>>> - return false;
>>>>> + if (DEBUG == null)
>>>>> + return false;
>>>>> + } catch(Error e) {
>>>>> + e.printStackTrace();
>>>>> + if (DEBUG == null)
>>>>> + return false;
>>>>> }
>>>>> }
>>>>> serverStarted = true;
>>>>>
>>>>>
>>>>
>>
Re: svn commit: r1308078 - /ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
Posted by Jacques Le Roux <jl...@les7arts.com>.
I guess the idea is to not being thrown out when debugging in Eclipse and be able to troubleshoot from there. Maybe Francis can
explain better?
As it's only in DEBUG mode (explicitly passed to the JVM) I can't see any issues with this. Do you fear something or foresee some
issues?
Jacques
From: "Jacopo Cappellato" <ja...@hotwaxmedia.com>
> It doesn't explain why we should not exit on error.
>
> Jacopo
>
> On Apr 1, 2012, at 1:45 PM, Jacques Le Roux wrote:
>
>> Francis explained it here
>> https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse#RunningandDebuggingOFBizinEclipse-Debugging(orrunning)OFBizinEclipsewithhotreplacementofclasses
>> But he should update now because I have just added the converters in
>> /ofbiz/framework/entity/src/META-INF/services/org.ofbiz.base.conversion.ConverterLoader at
>> http://svn.apache.org/viewvc?rev=1308085&view=rev
>>
>> Jacques
>>
>> From: "Jacopo Cappellato" <ja...@hotwaxmedia.com>
>>> maybe I don't understand but why should we want this?
>>>
>>> Jacopo
>>>
>>> On Apr 1, 2012, at 1:27 PM, jleroux@apache.org wrote:
>>>
>>>> Author: jleroux
>>>> Date: Sun Apr 1 11:27:45 2012
>>>> New Revision: 1308078
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=1308078&view=rev
>>>> Log:
>>>> A patch from Francis ANDRE "Avoid exiting ofbiz when running in debug mode,i.e with -DDEBUG=true set on theJVM arguments"
>>>> https://issues.apache.org/jira/browse/OFBIZ-3790
>>>>
>>>> This is a patch for allowing to run OFBiz in debug mode,i.e with -DDEBUG=true on the JVM arguments, and avoid to exit from the
>>>> process when a Error or a StartupException occurs.
>>>>
>>>> jleroux: replaced tabs by 4 spaces
>>>>
>>>> Modified:
>>>> ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
>>>>
>>>> Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
>>>> URL:
>>>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java?rev=1308078&r1=1308077&r2=1308078&view=diff
>>>> ==============================================================================
>>>> --- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java (original)
>>>> +++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java Sun Apr 1 11:27:45 2012
>>>> @@ -37,7 +37,7 @@ import java.util.List;
>>>> *
>>>> */
>>>> public class Start {
>>>> -
>>>> + private static final String DEBUG = System.getProperty("DEBUG");
>>>> private static final String SHUTDOWN_COMMAND = "SHUTDOWN";
>>>> private static final String STATUS_COMMAND = "STATUS";
>>>>
>>>> @@ -206,7 +206,7 @@ public class Start {
>>>> System.setProperty("java.class.path", classPath.toString());
>>>> ClassLoader classloader = classPath.getClassLoader();
>>>> Thread.currentThread().setContextClassLoader(classloader);
>>>> - if (System.getProperty("DEBUG") != null) {
>>>> + if (DEBUG != null) {
>>>> System.out.println("Startup Classloader: " + classloader.toString());
>>>> System.out.println("Startup Classpath: " + classPath.toString());
>>>> }
>>>> @@ -310,7 +310,12 @@ public class Start {
>>>> loader.start();
>>>> } catch (StartupException e) {
>>>> e.printStackTrace();
>>>> - return false;
>>>> + if (DEBUG == null)
>>>> + return false;
>>>> + } catch(Error e) {
>>>> + e.printStackTrace();
>>>> + if (DEBUG == null)
>>>> + return false;
>>>> }
>>>> }
>>>> serverStarted = true;
>>>>
>>>>
>>>
>
>
Re: svn commit: r1308078 - /ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
Posted by Jacopo Cappellato <ja...@hotwaxmedia.com>.
It doesn't explain why we should not exit on error.
Jacopo
On Apr 1, 2012, at 1:45 PM, Jacques Le Roux wrote:
> Francis explained it here https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse#RunningandDebuggingOFBizinEclipse-Debugging(orrunning)OFBizinEclipsewithhotreplacementofclasses
> But he should update now because I have just added the converters in /ofbiz/framework/entity/src/META-INF/services/org.ofbiz.base.conversion.ConverterLoader at http://svn.apache.org/viewvc?rev=1308085&view=rev
>
> Jacques
>
> From: "Jacopo Cappellato" <ja...@hotwaxmedia.com>
>> maybe I don't understand but why should we want this?
>>
>> Jacopo
>>
>> On Apr 1, 2012, at 1:27 PM, jleroux@apache.org wrote:
>>
>>> Author: jleroux
>>> Date: Sun Apr 1 11:27:45 2012
>>> New Revision: 1308078
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1308078&view=rev
>>> Log:
>>> A patch from Francis ANDRE "Avoid exiting ofbiz when running in debug mode,i.e with -DDEBUG=true set on theJVM arguments" https://issues.apache.org/jira/browse/OFBIZ-3790
>>>
>>> This is a patch for allowing to run OFBiz in debug mode,i.e with -DDEBUG=true on the JVM arguments, and avoid to exit from the process when a Error or a StartupException occurs.
>>>
>>> jleroux: replaced tabs by 4 spaces
>>>
>>> Modified:
>>> ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
>>>
>>> Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java?rev=1308078&r1=1308077&r2=1308078&view=diff
>>> ==============================================================================
>>> --- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java (original)
>>> +++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java Sun Apr 1 11:27:45 2012
>>> @@ -37,7 +37,7 @@ import java.util.List;
>>> *
>>> */
>>> public class Start {
>>> -
>>> + private static final String DEBUG = System.getProperty("DEBUG");
>>> private static final String SHUTDOWN_COMMAND = "SHUTDOWN";
>>> private static final String STATUS_COMMAND = "STATUS";
>>>
>>> @@ -206,7 +206,7 @@ public class Start {
>>> System.setProperty("java.class.path", classPath.toString());
>>> ClassLoader classloader = classPath.getClassLoader();
>>> Thread.currentThread().setContextClassLoader(classloader);
>>> - if (System.getProperty("DEBUG") != null) {
>>> + if (DEBUG != null) {
>>> System.out.println("Startup Classloader: " + classloader.toString());
>>> System.out.println("Startup Classpath: " + classPath.toString());
>>> }
>>> @@ -310,7 +310,12 @@ public class Start {
>>> loader.start();
>>> } catch (StartupException e) {
>>> e.printStackTrace();
>>> - return false;
>>> + if (DEBUG == null)
>>> + return false;
>>> + } catch(Error e) {
>>> + e.printStackTrace();
>>> + if (DEBUG == null)
>>> + return false;
>>> }
>>> }
>>> serverStarted = true;
>>>
>>>
>>
Re: svn commit: r1308078 - /ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
Posted by Jacques Le Roux <ja...@les7arts.com>.
Francis explained it here
https://cwiki.apache.org/confluence/display/OFBIZ/Running+and+Debugging+OFBiz+in+Eclipse#RunningandDebuggingOFBizinEclipse-Debugging(orrunning)OFBizinEclipsewithhotreplacementofclasses
But he should update now because I have just added the converters in
/ofbiz/framework/entity/src/META-INF/services/org.ofbiz.base.conversion.ConverterLoader at
http://svn.apache.org/viewvc?rev=1308085&view=rev
Jacques
From: "Jacopo Cappellato" <ja...@hotwaxmedia.com>
> maybe I don't understand but why should we want this?
>
> Jacopo
>
> On Apr 1, 2012, at 1:27 PM, jleroux@apache.org wrote:
>
>> Author: jleroux
>> Date: Sun Apr 1 11:27:45 2012
>> New Revision: 1308078
>>
>> URL: http://svn.apache.org/viewvc?rev=1308078&view=rev
>> Log:
>> A patch from Francis ANDRE "Avoid exiting ofbiz when running in debug mode,i.e with -DDEBUG=true set on theJVM arguments"
>> https://issues.apache.org/jira/browse/OFBIZ-3790
>>
>> This is a patch for allowing to run OFBiz in debug mode,i.e with -DDEBUG=true on the JVM arguments, and avoid to exit from the
>> process when a Error or a StartupException occurs.
>>
>> jleroux: replaced tabs by 4 spaces
>>
>> Modified:
>> ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
>>
>> Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
>> URL:
>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java?rev=1308078&r1=1308077&r2=1308078&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java (original)
>> +++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java Sun Apr 1 11:27:45 2012
>> @@ -37,7 +37,7 @@ import java.util.List;
>> *
>> */
>> public class Start {
>> -
>> + private static final String DEBUG = System.getProperty("DEBUG");
>> private static final String SHUTDOWN_COMMAND = "SHUTDOWN";
>> private static final String STATUS_COMMAND = "STATUS";
>>
>> @@ -206,7 +206,7 @@ public class Start {
>> System.setProperty("java.class.path", classPath.toString());
>> ClassLoader classloader = classPath.getClassLoader();
>> Thread.currentThread().setContextClassLoader(classloader);
>> - if (System.getProperty("DEBUG") != null) {
>> + if (DEBUG != null) {
>> System.out.println("Startup Classloader: " + classloader.toString());
>> System.out.println("Startup Classpath: " + classPath.toString());
>> }
>> @@ -310,7 +310,12 @@ public class Start {
>> loader.start();
>> } catch (StartupException e) {
>> e.printStackTrace();
>> - return false;
>> + if (DEBUG == null)
>> + return false;
>> + } catch(Error e) {
>> + e.printStackTrace();
>> + if (DEBUG == null)
>> + return false;
>> }
>> }
>> serverStarted = true;
>>
>>
>
>
Re: svn commit: r1308078 - /ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
Posted by Jacopo Cappellato <ja...@hotwaxmedia.com>.
maybe I don't understand but why should we want this?
Jacopo
On Apr 1, 2012, at 1:27 PM, jleroux@apache.org wrote:
> Author: jleroux
> Date: Sun Apr 1 11:27:45 2012
> New Revision: 1308078
>
> URL: http://svn.apache.org/viewvc?rev=1308078&view=rev
> Log:
> A patch from Francis ANDRE "Avoid exiting ofbiz when running in debug mode,i.e with -DDEBUG=true set on theJVM arguments" https://issues.apache.org/jira/browse/OFBIZ-3790
>
> This is a patch for allowing to run OFBiz in debug mode,i.e with -DDEBUG=true on the JVM arguments, and avoid to exit from the process when a Error or a StartupException occurs.
>
> jleroux: replaced tabs by 4 spaces
>
> Modified:
> ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
>
> Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java?rev=1308078&r1=1308077&r2=1308078&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java (original)
> +++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java Sun Apr 1 11:27:45 2012
> @@ -37,7 +37,7 @@ import java.util.List;
> *
> */
> public class Start {
> -
> + private static final String DEBUG = System.getProperty("DEBUG");
> private static final String SHUTDOWN_COMMAND = "SHUTDOWN";
> private static final String STATUS_COMMAND = "STATUS";
>
> @@ -206,7 +206,7 @@ public class Start {
> System.setProperty("java.class.path", classPath.toString());
> ClassLoader classloader = classPath.getClassLoader();
> Thread.currentThread().setContextClassLoader(classloader);
> - if (System.getProperty("DEBUG") != null) {
> + if (DEBUG != null) {
> System.out.println("Startup Classloader: " + classloader.toString());
> System.out.println("Startup Classpath: " + classPath.toString());
> }
> @@ -310,7 +310,12 @@ public class Start {
> loader.start();
> } catch (StartupException e) {
> e.printStackTrace();
> - return false;
> + if (DEBUG == null)
> + return false;
> + } catch(Error e) {
> + e.printStackTrace();
> + if (DEBUG == null)
> + return false;
> }
> }
> serverStarted = true;
>
>