Re: Gradle eclipse task - classpath modification

2019-05-25 Thread Taher Alkhateeb
It might be more useful not to launch from the IDE. Instead run gradle
"ofbizDebug" and hookup remotely with the debug port. This would maintain a
consistent environment instead of being surprised (happened to me in the
past). It would also make a consistent experience to development team
regardless of the IDE and you won't have to alter the jar file to
accommodate an IDE.

With that being said I don't think it's a big deal if you wish to remove
those exclusions. Up to community to decide.



On Sat, May 25, 2019, 6:37 PM Girish Vasmatkar <
girish.vasmat...@hotwaxsystems.com> wrote:

> So every IDE provides a shortcut (certain combination of keys) to execute
> any java file in a project as a java application, that in turn invokes
> *java
> *command on that class file. Eclipse applies all classpath entries (list of
> jar files from gradle dependency) as -classpath argument.
>
> Under the hood command that gets executed is -
>
> java org.apache.ofbiz.base.start.Start -classpath 
>
> I do this because it saves a lot of time. As soon as you make any change in
> any file, especially java, it is compiled instantaneously as soon as you
> save it. All you have to do is, just run Start.java as a java application
> and you have OFBiz launched quickly.
>
>
>
> On Sat, May 25, 2019 at 7:23 PM Taher Alkhateeb <
> slidingfilame...@gmail.com>
> wrote:
>
> > start how? what is the command? Are you trying to start _from_ eclipse.
> If
> > yes why?
> >
> > On Sat, May 25, 2019 at 2:26 PM Girish Vasmatkar <
> > girish.vasmat...@hotwaxsystems.com> wrote:
> >
> > > I realised Taher's reply after I had sent my response.
> > >
> > > Following's the command.
> > >
> > > *./gradlew eclipse*
> > >
> > > This would do the job of setting up the eclipse workspace with all all
> > > gradle dependencies nicely set-up in the classpath.
> > >
> > > Then I would normally try to start OFBiz using Start.java. Not sure if
> > you
> > > can see the inline screenshot. Pl see below.
> > >
> > > [image: image.png]
> > >
> > >
> > >
> > >
> > >
> > >
> > > On Sat, May 25, 2019 at 4:49 PM Girish Vasmatkar <
> > > girish.vasmat...@hotwaxsystems.com> wrote:
> > >
> > >> There is a bit more to it ...
> > >>
> > >> When the system can't find cache.properties (as it's no more on the
> > >> classpath), following happens -
> > >>
> > >> 1. Exception is thrown (which is obvious)
> > >> 2. Code execution halts (which is fine), so no tomcat is launched.
> > >> 3. Since execution stops, JVM should be terminated in my opinion. In
> > >> other words, JVM should not keep hanging doing nothing, better stop it
> > if a
> > >> major exception has occurred. The JVM process is never terminated in
> > this
> > >> case.
> > >>
> > >> Again, this is a very isolated scenario because it is always expected
> > >> that these config files and folders are always going to be on the
> > >> classpath. But this is one of those rare scenarios
> > >> where that's not the case.
> > >>
> > >> Log4j2 internal initialization logging.
> > >>
> > >> java.util.MissingResourceException: Can't find bundle for base name
> > >> cache, locale en
> > >>
> > >> at java.util.ResourceBundle.throwMissingResourceException(
> > >> ResourceBundle.java:1573)
> > >>
> > >> at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1396)
> > >>
> > >> at java.util.ResourceBundle.getBundle(ResourceBundle.java:782)
> > >>
> > >> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
> > >> UtilCache.java:191)
> > >>
> > >> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
> > >> UtilCache.java:173)
> > >>
> > >> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
> > >> UtilCache.java:169)
> > >>
> > >> at
> org.apache.ofbiz.base.util.cache.UtilCache.(UtilCache.java:125)
> > >>
> > >> at org.apache.ofbiz.base.util.cache.UtilCache.createUtilCache(
> > >> UtilCache.java:797)
> > >>
> > >> at org.apache.ofbiz.base.util.UtilProperties.(
> > >> UtilProperties.java:75)
> > >>
> > >> at org.apache.ofbiz.base.util.Debug.(Debug.java:69)
> > >>
> > >> at org.apache.ofbiz.base.container.ContainerLoader.load(
> > >> ContainerLoader.java:61)
> > >>
> > >> at org.apache.ofbiz.base.start.StartupControlPanel.loadStartupLoaders(
> > >> StartupControlPanel.java:218)
> > >>
> > >> at org.apache.ofbiz.base.start.StartupControlPanel.start(
> > >> StartupControlPanel.java:71)
> > >>
> > >> at org.apache.ofbiz.base.start.Start.main(Start.java:85)
> > >>
> > >>
> > >> Best,
> > >> Girish
> > >>
> > >> On Sat, May 25, 2019 at 2:56 PM Girish Vasmatkar <
> > >> girish.vasmat...@hotwaxsystems.com> wrote:
> > >>
> > >>> Hi Mathieu,
> > >>>
> > >>> With those entries missing from the classpath, you'd get the
> following
> > >>> exceptions and warning -
> > >>>
> > >>> 1. For cache.properties (when /framework/base/config entry is
> missing)
> > >>>
> > >>> Exception in thread "main" java.lang.ExceptionInInitializerError
> > >>>
> > >>> at org.apache.ofbiz.base.util.Debug.(Debug.java:69)
> 

Re: Gradle eclipse task - classpath modification

2019-05-25 Thread Girish Vasmatkar
So every IDE provides a shortcut (certain combination of keys) to execute
any java file in a project as a java application, that in turn invokes *java
*command on that class file. Eclipse applies all classpath entries (list of
jar files from gradle dependency) as -classpath argument.

Under the hood command that gets executed is -

java org.apache.ofbiz.base.start.Start -classpath 

I do this because it saves a lot of time. As soon as you make any change in
any file, especially java, it is compiled instantaneously as soon as you
save it. All you have to do is, just run Start.java as a java application
and you have OFBiz launched quickly.



On Sat, May 25, 2019 at 7:23 PM Taher Alkhateeb 
wrote:

> start how? what is the command? Are you trying to start _from_ eclipse. If
> yes why?
>
> On Sat, May 25, 2019 at 2:26 PM Girish Vasmatkar <
> girish.vasmat...@hotwaxsystems.com> wrote:
>
> > I realised Taher's reply after I had sent my response.
> >
> > Following's the command.
> >
> > *./gradlew eclipse*
> >
> > This would do the job of setting up the eclipse workspace with all all
> > gradle dependencies nicely set-up in the classpath.
> >
> > Then I would normally try to start OFBiz using Start.java. Not sure if
> you
> > can see the inline screenshot. Pl see below.
> >
> > [image: image.png]
> >
> >
> >
> >
> >
> >
> > On Sat, May 25, 2019 at 4:49 PM Girish Vasmatkar <
> > girish.vasmat...@hotwaxsystems.com> wrote:
> >
> >> There is a bit more to it ...
> >>
> >> When the system can't find cache.properties (as it's no more on the
> >> classpath), following happens -
> >>
> >> 1. Exception is thrown (which is obvious)
> >> 2. Code execution halts (which is fine), so no tomcat is launched.
> >> 3. Since execution stops, JVM should be terminated in my opinion. In
> >> other words, JVM should not keep hanging doing nothing, better stop it
> if a
> >> major exception has occurred. The JVM process is never terminated in
> this
> >> case.
> >>
> >> Again, this is a very isolated scenario because it is always expected
> >> that these config files and folders are always going to be on the
> >> classpath. But this is one of those rare scenarios
> >> where that's not the case.
> >>
> >> Log4j2 internal initialization logging.
> >>
> >> java.util.MissingResourceException: Can't find bundle for base name
> >> cache, locale en
> >>
> >> at java.util.ResourceBundle.throwMissingResourceException(
> >> ResourceBundle.java:1573)
> >>
> >> at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1396)
> >>
> >> at java.util.ResourceBundle.getBundle(ResourceBundle.java:782)
> >>
> >> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
> >> UtilCache.java:191)
> >>
> >> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
> >> UtilCache.java:173)
> >>
> >> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
> >> UtilCache.java:169)
> >>
> >> at org.apache.ofbiz.base.util.cache.UtilCache.(UtilCache.java:125)
> >>
> >> at org.apache.ofbiz.base.util.cache.UtilCache.createUtilCache(
> >> UtilCache.java:797)
> >>
> >> at org.apache.ofbiz.base.util.UtilProperties.(
> >> UtilProperties.java:75)
> >>
> >> at org.apache.ofbiz.base.util.Debug.(Debug.java:69)
> >>
> >> at org.apache.ofbiz.base.container.ContainerLoader.load(
> >> ContainerLoader.java:61)
> >>
> >> at org.apache.ofbiz.base.start.StartupControlPanel.loadStartupLoaders(
> >> StartupControlPanel.java:218)
> >>
> >> at org.apache.ofbiz.base.start.StartupControlPanel.start(
> >> StartupControlPanel.java:71)
> >>
> >> at org.apache.ofbiz.base.start.Start.main(Start.java:85)
> >>
> >>
> >> Best,
> >> Girish
> >>
> >> On Sat, May 25, 2019 at 2:56 PM Girish Vasmatkar <
> >> girish.vasmat...@hotwaxsystems.com> wrote:
> >>
> >>> Hi Mathieu,
> >>>
> >>> With those entries missing from the classpath, you'd get the following
> >>> exceptions and warning -
> >>>
> >>> 1. For cache.properties (when /framework/base/config entry is missing)
> >>>
> >>> Exception in thread "main" java.lang.ExceptionInInitializerError
> >>>
> >>> at org.apache.ofbiz.base.util.Debug.(Debug.java:69)
> >>>
> >>> at org.apache.ofbiz.base.container.ContainerLoader.load(
> >>> ContainerLoader.java:61)
> >>>
> >>> at org.apache.ofbiz.base.start.StartupControlPanel.loadStartupLoaders(
> >>> StartupControlPanel.java:218)
> >>>
> >>> at org.apache.ofbiz.base.start.StartupControlPanel.start(
> >>> StartupControlPanel.java:71)
> >>>
> >>> at org.apache.ofbiz.base.start.Start.main(Start.java:85)
> >>>
> >>> Caused by: java.util.MissingResourceException: Can't find bundle for
> >>> base name cache, locale en
> >>>
> >>> at java.util.ResourceBundle.throwMissingResourceException(
> >>> ResourceBundle.java:1573)
> >>>
> >>> at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1396)
> >>>
> >>> at java.util.ResourceBundle.getBundle(ResourceBundle.java:782)
> >>>
> >>> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
> >>> UtilCache.java:177)
> >>>
> 

Re: Gradle eclipse task - classpath modification

2019-05-25 Thread Taher Alkhateeb
start how? what is the command? Are you trying to start _from_ eclipse. If
yes why?

On Sat, May 25, 2019 at 2:26 PM Girish Vasmatkar <
girish.vasmat...@hotwaxsystems.com> wrote:

> I realised Taher's reply after I had sent my response.
>
> Following's the command.
>
> *./gradlew eclipse*
>
> This would do the job of setting up the eclipse workspace with all all
> gradle dependencies nicely set-up in the classpath.
>
> Then I would normally try to start OFBiz using Start.java. Not sure if you
> can see the inline screenshot. Pl see below.
>
> [image: image.png]
>
>
>
>
>
>
> On Sat, May 25, 2019 at 4:49 PM Girish Vasmatkar <
> girish.vasmat...@hotwaxsystems.com> wrote:
>
>> There is a bit more to it ...
>>
>> When the system can't find cache.properties (as it's no more on the
>> classpath), following happens -
>>
>> 1. Exception is thrown (which is obvious)
>> 2. Code execution halts (which is fine), so no tomcat is launched.
>> 3. Since execution stops, JVM should be terminated in my opinion. In
>> other words, JVM should not keep hanging doing nothing, better stop it if a
>> major exception has occurred. The JVM process is never terminated in this
>> case.
>>
>> Again, this is a very isolated scenario because it is always expected
>> that these config files and folders are always going to be on the
>> classpath. But this is one of those rare scenarios
>> where that's not the case.
>>
>> Log4j2 internal initialization logging.
>>
>> java.util.MissingResourceException: Can't find bundle for base name
>> cache, locale en
>>
>> at java.util.ResourceBundle.throwMissingResourceException(
>> ResourceBundle.java:1573)
>>
>> at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1396)
>>
>> at java.util.ResourceBundle.getBundle(ResourceBundle.java:782)
>>
>> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
>> UtilCache.java:191)
>>
>> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
>> UtilCache.java:173)
>>
>> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
>> UtilCache.java:169)
>>
>> at org.apache.ofbiz.base.util.cache.UtilCache.(UtilCache.java:125)
>>
>> at org.apache.ofbiz.base.util.cache.UtilCache.createUtilCache(
>> UtilCache.java:797)
>>
>> at org.apache.ofbiz.base.util.UtilProperties.(
>> UtilProperties.java:75)
>>
>> at org.apache.ofbiz.base.util.Debug.(Debug.java:69)
>>
>> at org.apache.ofbiz.base.container.ContainerLoader.load(
>> ContainerLoader.java:61)
>>
>> at org.apache.ofbiz.base.start.StartupControlPanel.loadStartupLoaders(
>> StartupControlPanel.java:218)
>>
>> at org.apache.ofbiz.base.start.StartupControlPanel.start(
>> StartupControlPanel.java:71)
>>
>> at org.apache.ofbiz.base.start.Start.main(Start.java:85)
>>
>>
>> Best,
>> Girish
>>
>> On Sat, May 25, 2019 at 2:56 PM Girish Vasmatkar <
>> girish.vasmat...@hotwaxsystems.com> wrote:
>>
>>> Hi Mathieu,
>>>
>>> With those entries missing from the classpath, you'd get the following
>>> exceptions and warning -
>>>
>>> 1. For cache.properties (when /framework/base/config entry is missing)
>>>
>>> Exception in thread "main" java.lang.ExceptionInInitializerError
>>>
>>> at org.apache.ofbiz.base.util.Debug.(Debug.java:69)
>>>
>>> at org.apache.ofbiz.base.container.ContainerLoader.load(
>>> ContainerLoader.java:61)
>>>
>>> at org.apache.ofbiz.base.start.StartupControlPanel.loadStartupLoaders(
>>> StartupControlPanel.java:218)
>>>
>>> at org.apache.ofbiz.base.start.StartupControlPanel.start(
>>> StartupControlPanel.java:71)
>>>
>>> at org.apache.ofbiz.base.start.Start.main(Start.java:85)
>>>
>>> Caused by: java.util.MissingResourceException: Can't find bundle for
>>> base name cache, locale en
>>>
>>> at java.util.ResourceBundle.throwMissingResourceException(
>>> ResourceBundle.java:1573)
>>>
>>> at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1396)
>>>
>>> at java.util.ResourceBundle.getBundle(ResourceBundle.java:782)
>>>
>>> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
>>> UtilCache.java:177)
>>>
>>> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
>>> UtilCache.java:173)
>>>
>>> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
>>> UtilCache.java:169)
>>>
>>> at org.apache.ofbiz.base.util.cache.UtilCache.(UtilCache.java:125)
>>>
>>> at org.apache.ofbiz.base.util.cache.UtilCache.createUtilCache(
>>> UtilCache.java:779)
>>>
>>> at org.apache.ofbiz.base.util.UtilProperties.(
>>> UtilProperties.java:75)
>>>
>>> ... 5 more
>>>
>>> 2. when /framework/base/dtd entry is missing (contains all schema files)
>>>
>>> 2019-05-25 14:48:37,591 |main |ContainerLoader
>>>   |I| [Startup] Loading containers...
>>>
>>> 2019-05-25 14:48:38,431 |main |UtilXml
>>>   |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL
>>> DTD/Schema with publicId [null] and the file/resource is
>>> [ofbiz-containers.xsd]
>>>
>>> 2019-05-25 14:48:39,139 |main |ContainerLoader
>>>   

Re: Missing microseconds support in date-time picker

2019-05-25 Thread Jacques Le Roux

Le 25/05/2019 à 14:22, Pawan Verma a écrit :

Hello Devs,

While working on OFBIZ-11022, I have found that current date-time picker
does not have support for microseconds.
In existing demo data for WebSitePathAlias, we have microseconds in it. But
on Edit webSitePathAlias screen date-time picker does not pass microseconds
and due to this system can not find the exact record for update.

Should we add support in date-time picker for microseconds or remove it
from demo data?

Suggestions and thoughts are welcome. Thanks!


Hi Pawan,

I'd be more inclined to remove microseconds from demo data

Thanks

Jacques



Re: svn commit: r1859877 - in /ofbiz/ofbiz-framework/trunk: applications/accounting/servicedef/ applications/content/servicedef/ applications/marketing/servicedef/ applications/order/servicedef/ appli

2019-05-25 Thread Jacques Le Roux

Le 25/05/2019 à 11:01, Mathieu Lirzin a écrit :

Hello,

Jacques Le Roux  writes:


Le 25/05/2019 à 09:07, Jacques Le Roux a écrit :

Le 25/05/2019 à 08:54, Jacques Le Roux a écrit :

You mean when ran isolated, right?

OK, got it, it's a framework only issue

https://ci.apache.org/projects/ofbiz/logs/trunk/framework/html/

Looking at it...

Jacques

This is due to the simple quote in

subject="OFBiz - Your Request is received: '${custRequestName}' 
#CR${custRequestId}"/>

in OrderTypeData.xml

I have yet not idea why the CustomSafePolicy class (based on Slashdot policy) 
rejects it, seems weird to me.

It's also (even more) weird that when the plugins data are loaded the issue 
does not exist

Indeed this is weird, thanks for investigating!
This was a peculiar case that could be generalised to all escapable characters. The general solution is to compare the original value with the 
filtered value unescaped in UtilCodec::checkStringForHtmlSafe.

BTW, weirdly enough StringEscapeUtils::escapeHtml4 does not escape single quote.

Another weirdness is the test was passing with plugins data loaded. This is due to duplicated demo data in scrumTypeData.xml (which is actually not 
only type data)


As ever the scrum component is a mess, that's not new and I always wonder if we should not get rid of it! I guess there are plenty of good tools 
outside...


Jacques



Re: Missing microseconds support in date-time picker

2019-05-25 Thread Pierre Smits
IMO microseconds for something like demo data for fairly static (from a
second viewpoint) records is overkill.

Best regards,

Pierre Smits

*Apache Trafodion , Vice President*
*Apache Directory , PMC Member*
Apache Incubator , committer
*Apache OFBiz , contributor (without privileges)
since 2008*
Apache Steve , committer


On Sat, May 25, 2019 at 3:18 PM Pawan Verma 
wrote:

> Hello Devs,
>
> While working on OFBIZ-11022, I have found that current date-time picker
> does not have support for microseconds.
> In existing demo data for WebSitePathAlias, we have microseconds in it. But
> on Edit webSitePathAlias screen date-time picker does not pass microseconds
> and due to this system can not find the exact record for update.
>
> Should we add support in date-time picker for microseconds or remove it
> from demo data?
>
> Suggestions and thoughts are welcome. Thanks!
> --
> Thanks & Regards
> Pawan Verma
> Technical Consultant
> *HotWax Systems*
> *Enterprise open source experts*
> http://www.hotwaxsystems.com
>


Missing microseconds support in date-time picker

2019-05-25 Thread Pawan Verma
Hello Devs,

While working on OFBIZ-11022, I have found that current date-time picker
does not have support for microseconds.
In existing demo data for WebSitePathAlias, we have microseconds in it. But
on Edit webSitePathAlias screen date-time picker does not pass microseconds
and due to this system can not find the exact record for update.

Should we add support in date-time picker for microseconds or remove it
from demo data?

Suggestions and thoughts are welcome. Thanks!
-- 
Thanks & Regards
Pawan Verma
Technical Consultant
*HotWax Systems*
*Enterprise open source experts*
http://www.hotwaxsystems.com


Re: Gradle eclipse task - classpath modification

2019-05-25 Thread Girish Vasmatkar
I realised Taher's reply after I had sent my response.

Following's the command.

*./gradlew eclipse*

This would do the job of setting up the eclipse workspace with all all
gradle dependencies nicely set-up in the classpath.

Then I would normally try to start OFBiz using Start.java. Not sure if you
can see the inline screenshot. Pl see below.

[image: image.png]






On Sat, May 25, 2019 at 4:49 PM Girish Vasmatkar <
girish.vasmat...@hotwaxsystems.com> wrote:

> There is a bit more to it ...
>
> When the system can't find cache.properties (as it's no more on the
> classpath), following happens -
>
> 1. Exception is thrown (which is obvious)
> 2. Code execution halts (which is fine), so no tomcat is launched.
> 3. Since execution stops, JVM should be terminated in my opinion. In other
> words, JVM should not keep hanging doing nothing, better stop it if a major
> exception has occurred. The JVM process is never terminated in this case.
>
> Again, this is a very isolated scenario because it is always expected that
> these config files and folders are always going to be on the classpath. But
> this is one of those rare scenarios
> where that's not the case.
>
> Log4j2 internal initialization logging.
>
> java.util.MissingResourceException: Can't find bundle for base name
> cache, locale en
>
> at java.util.ResourceBundle.throwMissingResourceException(
> ResourceBundle.java:1573)
>
> at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1396)
>
> at java.util.ResourceBundle.getBundle(ResourceBundle.java:782)
>
> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
> UtilCache.java:191)
>
> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
> UtilCache.java:173)
>
> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
> UtilCache.java:169)
>
> at org.apache.ofbiz.base.util.cache.UtilCache.(UtilCache.java:125)
>
> at org.apache.ofbiz.base.util.cache.UtilCache.createUtilCache(
> UtilCache.java:797)
>
> at org.apache.ofbiz.base.util.UtilProperties.(
> UtilProperties.java:75)
>
> at org.apache.ofbiz.base.util.Debug.(Debug.java:69)
>
> at org.apache.ofbiz.base.container.ContainerLoader.load(
> ContainerLoader.java:61)
>
> at org.apache.ofbiz.base.start.StartupControlPanel.loadStartupLoaders(
> StartupControlPanel.java:218)
>
> at org.apache.ofbiz.base.start.StartupControlPanel.start(
> StartupControlPanel.java:71)
>
> at org.apache.ofbiz.base.start.Start.main(Start.java:85)
>
>
> Best,
> Girish
>
> On Sat, May 25, 2019 at 2:56 PM Girish Vasmatkar <
> girish.vasmat...@hotwaxsystems.com> wrote:
>
>> Hi Mathieu,
>>
>> With those entries missing from the classpath, you'd get the following
>> exceptions and warning -
>>
>> 1. For cache.properties (when /framework/base/config entry is missing)
>>
>> Exception in thread "main" java.lang.ExceptionInInitializerError
>>
>> at org.apache.ofbiz.base.util.Debug.(Debug.java:69)
>>
>> at org.apache.ofbiz.base.container.ContainerLoader.load(
>> ContainerLoader.java:61)
>>
>> at org.apache.ofbiz.base.start.StartupControlPanel.loadStartupLoaders(
>> StartupControlPanel.java:218)
>>
>> at org.apache.ofbiz.base.start.StartupControlPanel.start(
>> StartupControlPanel.java:71)
>>
>> at org.apache.ofbiz.base.start.Start.main(Start.java:85)
>>
>> Caused by: java.util.MissingResourceException: Can't find bundle for
>> base name cache, locale en
>>
>> at java.util.ResourceBundle.throwMissingResourceException(
>> ResourceBundle.java:1573)
>>
>> at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1396)
>>
>> at java.util.ResourceBundle.getBundle(ResourceBundle.java:782)
>>
>> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
>> UtilCache.java:177)
>>
>> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
>> UtilCache.java:173)
>>
>> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
>> UtilCache.java:169)
>>
>> at org.apache.ofbiz.base.util.cache.UtilCache.(UtilCache.java:125)
>>
>> at org.apache.ofbiz.base.util.cache.UtilCache.createUtilCache(
>> UtilCache.java:779)
>>
>> at org.apache.ofbiz.base.util.UtilProperties.(
>> UtilProperties.java:75)
>>
>> ... 5 more
>>
>> 2. when /framework/base/dtd entry is missing (contains all schema files)
>>
>> 2019-05-25 14:48:37,591 |main |ContainerLoader
>> |I| [Startup] Loading containers...
>>
>> 2019-05-25 14:48:38,431 |main |UtilXml
>> |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL
>> DTD/Schema with publicId [null] and the file/resource is
>> [ofbiz-containers.xsd]
>>
>> 2019-05-25 14:48:39,139 |main |ContainerLoader
>> |I| Loading container: component-container
>>
>> 2019-05-25 14:48:39,244 |main |UtilXml
>> |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL
>> DTD/Schema with publicId [null] and the file/resource is
>> [component-loader.xsd]
>>
>> 2019-05-25 14:48:39,596 |main |ComponentContainer
>> |I| 

Re: Gradle eclipse task - classpath modification

2019-05-25 Thread Girish Vasmatkar
There is a bit more to it ...

When the system can't find cache.properties (as it's no more on the
classpath), following happens -

1. Exception is thrown (which is obvious)
2. Code execution halts (which is fine), so no tomcat is launched.
3. Since execution stops, JVM should be terminated in my opinion. In other
words, JVM should not keep hanging doing nothing, better stop it if a major
exception has occurred. The JVM process is never terminated in this case.

Again, this is a very isolated scenario because it is always expected that
these config files and folders are always going to be on the classpath. But
this is one of those rare scenarios
where that's not the case.

Log4j2 internal initialization logging.

java.util.MissingResourceException: Can't find bundle for base name cache,
locale en

at java.util.ResourceBundle.throwMissingResourceException(
ResourceBundle.java:1573)

at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1396)

at java.util.ResourceBundle.getBundle(ResourceBundle.java:782)

at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
UtilCache.java:191)

at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
UtilCache.java:173)

at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
UtilCache.java:169)

at org.apache.ofbiz.base.util.cache.UtilCache.(UtilCache.java:125)

at org.apache.ofbiz.base.util.cache.UtilCache.createUtilCache(
UtilCache.java:797)

at org.apache.ofbiz.base.util.UtilProperties.(UtilProperties.java:75
)

at org.apache.ofbiz.base.util.Debug.(Debug.java:69)

at org.apache.ofbiz.base.container.ContainerLoader.load(
ContainerLoader.java:61)

at org.apache.ofbiz.base.start.StartupControlPanel.loadStartupLoaders(
StartupControlPanel.java:218)

at org.apache.ofbiz.base.start.StartupControlPanel.start(
StartupControlPanel.java:71)

at org.apache.ofbiz.base.start.Start.main(Start.java:85)


Best,
Girish

On Sat, May 25, 2019 at 2:56 PM Girish Vasmatkar <
girish.vasmat...@hotwaxsystems.com> wrote:

> Hi Mathieu,
>
> With those entries missing from the classpath, you'd get the following
> exceptions and warning -
>
> 1. For cache.properties (when /framework/base/config entry is missing)
>
> Exception in thread "main" java.lang.ExceptionInInitializerError
>
> at org.apache.ofbiz.base.util.Debug.(Debug.java:69)
>
> at org.apache.ofbiz.base.container.ContainerLoader.load(
> ContainerLoader.java:61)
>
> at org.apache.ofbiz.base.start.StartupControlPanel.loadStartupLoaders(
> StartupControlPanel.java:218)
>
> at org.apache.ofbiz.base.start.StartupControlPanel.start(
> StartupControlPanel.java:71)
>
> at org.apache.ofbiz.base.start.Start.main(Start.java:85)
>
> Caused by: java.util.MissingResourceException: Can't find bundle for base
> name cache, locale en
>
> at java.util.ResourceBundle.throwMissingResourceException(
> ResourceBundle.java:1573)
>
> at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1396)
>
> at java.util.ResourceBundle.getBundle(ResourceBundle.java:782)
>
> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
> UtilCache.java:177)
>
> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
> UtilCache.java:173)
>
> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
> UtilCache.java:169)
>
> at org.apache.ofbiz.base.util.cache.UtilCache.(UtilCache.java:125)
>
> at org.apache.ofbiz.base.util.cache.UtilCache.createUtilCache(
> UtilCache.java:779)
>
> at org.apache.ofbiz.base.util.UtilProperties.(
> UtilProperties.java:75)
>
> ... 5 more
>
> 2. when /framework/base/dtd entry is missing (contains all schema files)
>
> 2019-05-25 14:48:37,591 |main |ContainerLoader
> |I| [Startup] Loading containers...
>
> 2019-05-25 14:48:38,431 |main |UtilXml
> |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL
> DTD/Schema with publicId [null] and the file/resource is
> [ofbiz-containers.xsd]
>
> 2019-05-25 14:48:39,139 |main |ContainerLoader
> |I| Loading container: component-container
>
> 2019-05-25 14:48:39,244 |main |UtilXml
> |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL
> DTD/Schema with publicId [null] and the file/resource is
> [component-loader.xsd]
>
> 2019-05-25 14:48:39,596 |main |ComponentContainer
> |I| Auto-Loading component directory :
> [/Users/grv/git/clients/warbyparker/github/ofbiz/framework]
>
> 2019-05-25 14:48:39,641 |main |UtilXml
> |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL
> DTD/Schema with publicId [null] and the file/resource is
> [component-loader.xsd]
>
> 2019-05-25 14:48:39,898 |main |UtilXml
> |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL
> DTD/Schema with publicId [null] and the file/resource is
> [ofbiz-component.xsd]
>
> 2019-05-25 14:48:40,210 |main |UtilXml
> |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL
> 

Re: Gradle eclipse task - classpath modification

2019-05-25 Thread Taher Alkhateeb
What is the exact command used to run?

On Sat, May 25, 2019, 12:27 PM Girish Vasmatkar <
girish.vasmat...@hotwaxsystems.com> wrote:

> Hi Mathieu,
>
> With those entries missing from the classpath, you'd get the following
> exceptions and warning -
>
> 1. For cache.properties (when /framework/base/config entry is missing)
>
> Exception in thread "main" java.lang.ExceptionInInitializerError
>
> at org.apache.ofbiz.base.util.Debug.(Debug.java:69)
>
> at org.apache.ofbiz.base.container.ContainerLoader.load(
> ContainerLoader.java:61)
>
> at org.apache.ofbiz.base.start.StartupControlPanel.loadStartupLoaders(
> StartupControlPanel.java:218)
>
> at org.apache.ofbiz.base.start.StartupControlPanel.start(
> StartupControlPanel.java:71)
>
> at org.apache.ofbiz.base.start.Start.main(Start.java:85)
>
> Caused by: java.util.MissingResourceException: Can't find bundle for base
> name cache, locale en
>
> at java.util.ResourceBundle.throwMissingResourceException(
> ResourceBundle.java:1573)
>
> at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1396)
>
> at java.util.ResourceBundle.getBundle(ResourceBundle.java:782)
>
> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
> UtilCache.java:177)
>
> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
> UtilCache.java:173)
>
> at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
> UtilCache.java:169)
>
> at org.apache.ofbiz.base.util.cache.UtilCache.(UtilCache.java:125)
>
> at org.apache.ofbiz.base.util.cache.UtilCache.createUtilCache(
> UtilCache.java:779)
>
> at
> org.apache.ofbiz.base.util.UtilProperties.(UtilProperties.java:75
> )
>
> ... 5 more
>
> 2. when /framework/base/dtd entry is missing (contains all schema files)
>
> 2019-05-25 14:48:37,591 |main |ContainerLoader
>   |I| [Startup] Loading containers...
>
> 2019-05-25 14:48:38,431 |main |UtilXml
>   |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
> with publicId [null] and the file/resource is [ofbiz-containers.xsd]
>
> 2019-05-25 14:48:39,139 |main |ContainerLoader
>   |I| Loading container: component-container
>
> 2019-05-25 14:48:39,244 |main |UtilXml
>   |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
> with publicId [null] and the file/resource is [component-loader.xsd]
>
> 2019-05-25 14:48:39,596 |main |ComponentContainer
>   |I| Auto-Loading component directory :
> [/Users/grv/git/clients/warbyparker/github/ofbiz/framework]
>
> 2019-05-25 14:48:39,641 |main |UtilXml
>   |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
> with publicId [null] and the file/resource is [component-loader.xsd]
>
> 2019-05-25 14:48:39,898 |main |UtilXml
>   |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
> with publicId [null] and the file/resource is [ofbiz-component.xsd]
>
> 2019-05-25 14:48:40,210 |main |UtilXml
>   |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
> with publicId [null] and the file/resource is [ofbiz-component.xsd]
>
> 2019-05-25 14:48:40,496 |main |ComponentContainer
>   |I| Added class path for component : [base]
>
> 2019-05-25 14:48:40,552 |main |UtilXml
>   |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
> with publicId [null] and the file/resource is [ofbiz-component.xsd]
>
> 2019-05-25 14:48:40,923 |main |UtilXml
>   |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
> with publicId [null] and the file/resource is [ofbiz-component.xsd]
>
> 2019-05-25 14:48:41,162 |main |ComponentContainer
>   |I| Added class path for component : [entity]
>
> 2019-05-25 14:48:41,190 |main |UtilXml
>   |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
> with publicId [null] and the file/resource is [ofbiz-component.xsd]
>
> 2019-05-25 14:48:41,491 |main |UtilXml
>   |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
> with publicId [null] and the file/resource is [ofbiz-component.xsd]
>
> 2019-05-25 14:48:42,300 |main |ComponentContainer
>   |I| Added class path for component : [security]
>
> 2019-05-25 14:48:42,323 |main |UtilXml
>   |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
> with publicId [null] and the file/resource is [ofbiz-component.xsd]
>
> 2019-05-25 14:48:42,615 |main |UtilXml
>   |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
> with publicId [null] and the file/resource is [ofbiz-component.xsd]
>
> 2019-05-25 14:48:42,865 |main |ComponentContainer
>   |I| Added class path for component : [datafile]
>
> 2019-05-25 14:48:42,883 |main |UtilXml
>   |W| 

Re: Gradle eclipse task - classpath modification

2019-05-25 Thread Girish Vasmatkar
Hi Mathieu,

With those entries missing from the classpath, you'd get the following
exceptions and warning -

1. For cache.properties (when /framework/base/config entry is missing)

Exception in thread "main" java.lang.ExceptionInInitializerError

at org.apache.ofbiz.base.util.Debug.(Debug.java:69)

at org.apache.ofbiz.base.container.ContainerLoader.load(
ContainerLoader.java:61)

at org.apache.ofbiz.base.start.StartupControlPanel.loadStartupLoaders(
StartupControlPanel.java:218)

at org.apache.ofbiz.base.start.StartupControlPanel.start(
StartupControlPanel.java:71)

at org.apache.ofbiz.base.start.Start.main(Start.java:85)

Caused by: java.util.MissingResourceException: Can't find bundle for base
name cache, locale en

at java.util.ResourceBundle.throwMissingResourceException(
ResourceBundle.java:1573)

at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1396)

at java.util.ResourceBundle.getBundle(ResourceBundle.java:782)

at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
UtilCache.java:177)

at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
UtilCache.java:173)

at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(
UtilCache.java:169)

at org.apache.ofbiz.base.util.cache.UtilCache.(UtilCache.java:125)

at org.apache.ofbiz.base.util.cache.UtilCache.createUtilCache(
UtilCache.java:779)

at org.apache.ofbiz.base.util.UtilProperties.(UtilProperties.java:75
)

... 5 more

2. when /framework/base/dtd entry is missing (contains all schema files)

2019-05-25 14:48:37,591 |main |ContainerLoader
  |I| [Startup] Loading containers...

2019-05-25 14:48:38,431 |main |UtilXml
  |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
with publicId [null] and the file/resource is [ofbiz-containers.xsd]

2019-05-25 14:48:39,139 |main |ContainerLoader
  |I| Loading container: component-container

2019-05-25 14:48:39,244 |main |UtilXml
  |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
with publicId [null] and the file/resource is [component-loader.xsd]

2019-05-25 14:48:39,596 |main |ComponentContainer
  |I| Auto-Loading component directory :
[/Users/grv/git/clients/warbyparker/github/ofbiz/framework]

2019-05-25 14:48:39,641 |main |UtilXml
  |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
with publicId [null] and the file/resource is [component-loader.xsd]

2019-05-25 14:48:39,898 |main |UtilXml
  |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
with publicId [null] and the file/resource is [ofbiz-component.xsd]

2019-05-25 14:48:40,210 |main |UtilXml
  |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
with publicId [null] and the file/resource is [ofbiz-component.xsd]

2019-05-25 14:48:40,496 |main |ComponentContainer
  |I| Added class path for component : [base]

2019-05-25 14:48:40,552 |main |UtilXml
  |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
with publicId [null] and the file/resource is [ofbiz-component.xsd]

2019-05-25 14:48:40,923 |main |UtilXml
  |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
with publicId [null] and the file/resource is [ofbiz-component.xsd]

2019-05-25 14:48:41,162 |main |ComponentContainer
  |I| Added class path for component : [entity]

2019-05-25 14:48:41,190 |main |UtilXml
  |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
with publicId [null] and the file/resource is [ofbiz-component.xsd]

2019-05-25 14:48:41,491 |main |UtilXml
  |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
with publicId [null] and the file/resource is [ofbiz-component.xsd]

2019-05-25 14:48:42,300 |main |ComponentContainer
  |I| Added class path for component : [security]

2019-05-25 14:48:42,323 |main |UtilXml
  |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
with publicId [null] and the file/resource is [ofbiz-component.xsd]

2019-05-25 14:48:42,615 |main |UtilXml
  |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
with publicId [null] and the file/resource is [ofbiz-component.xsd]

2019-05-25 14:48:42,865 |main |ComponentContainer
  |I| Added class path for component : [datafile]

2019-05-25 14:48:42,883 |main |UtilXml
  |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
with publicId [null] and the file/resource is [ofbiz-component.xsd]

2019-05-25 14:48:43,128 |main |UtilXml
  |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema
with pub

Best,
Girish




On Sat, May 25, 2019 at 2:27 PM Mathieu Lirzin 
wrote:

> Hello Girish,
>

Re: svn commit: r1859877 - in /ofbiz/ofbiz-framework/trunk: applications/accounting/servicedef/ applications/content/servicedef/ applications/marketing/servicedef/ applications/order/servicedef/ appli

2019-05-25 Thread Mathieu Lirzin
Hello,

Jacques Le Roux  writes:

> Le 25/05/2019 à 09:07, Jacques Le Roux a écrit :
>> Le 25/05/2019 à 08:54, Jacques Le Roux a écrit :
>>> You mean when ran isolated, right? 
>>
>> OK, got it, it's a framework only issue
>>
>> https://ci.apache.org/projects/ofbiz/logs/trunk/framework/html/
>>
>> Looking at it...
>>
>> Jacques
>
> This is due to the simple quote in
>
> subject="OFBiz - Your Request is received: '${custRequestName}' 
> #CR${custRequestId}"/>
>
> in OrderTypeData.xml
>
> I have yet not idea why the CustomSafePolicy class (based on Slashdot policy) 
> rejects it, seems weird to me.
>
> It's also (even more) weird that when the plugins data are loaded the issue 
> does not exist

Indeed this is weird, thanks for investigating!

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37


Re: Gradle eclipse task - classpath modification

2019-05-25 Thread Mathieu Lirzin
Hello Girish,

Girish Vasmatkar  writes:

> When you run eclipse task it removes all unnecessary classpath entries
> including the ones containing "config" and "dtd". This introduces a minor
> inconvenience, in turn, because you do need two entries below in order for
> OFBiz to start normally -
>
> /framework/base/config
> /framework/base/dtd
>
> I rely heavily on *Start.java* to launch OFBiz (Run as Java Application)

I guess every one using OFBiz is relying on it, no? :-)

> and therefore the code needs cache.properties and ofbiz-component.xsd to be
> in the classpath during start up.

Can you tell us during the startup when and for what purpose are those
files needed?

And what does happen when you don't add “/framework/base/{config,dtd}”
manually to the classpath? an error, a warning?

> I see that we are removing certain eclipse classpath entries (rightly
> so). Doing so also deletes classpath entry for /framework/base/config
> and /framework/base/dtd that we need for normal start-up.
>
> I opine that we have to make provision for escaping deletion of these two
> entries. This is essential because every time we run ./gradlew eclipse, you
> have to add the two entries manually all over again as the eclipse task
> resets classpath entries.
>
> Granted, it is a minor inconvenience, but I feel this should be handled.
> Should I go file a ticket for this change if we have a mutual consent on
> this one?

I see no reason not to fix this issue. Moreover it would be nice to make
it clearer in the ‘build.gradle’ what is the actual problem about having
extra entries in the ‘.classpath’.

Thanks.

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37


Re: svn commit: r1859877 - in /ofbiz/ofbiz-framework/trunk: applications/accounting/servicedef/ applications/content/servicedef/ applications/marketing/servicedef/ applications/order/servicedef/ appli

2019-05-25 Thread Jacques Le Roux

Le 25/05/2019 à 09:07, Jacques Le Roux a écrit :

Le 25/05/2019 à 08:54, Jacques Le Roux a écrit :
You mean when ran isolated, right? 


OK, got it, it's a framework only issue

https://ci.apache.org/projects/ofbiz/logs/trunk/framework/html/

Looking at it...

Jacques


This is due to the simple quote in

subject="OFBiz - Your Request is received: '${custRequestName}' 
#CR${custRequestId}"/>

in OrderTypeData.xml

I have yet not idea why the CustomSafePolicy class (based on Slashdot policy) 
rejects it, seems weird to me.

It's also (even more) weird that when the plugins data are loaded the issue 
does not exist

Jacques



Re: svn commit: r1859877 - in /ofbiz/ofbiz-framework/trunk: applications/accounting/servicedef/ applications/content/servicedef/ applications/marketing/servicedef/ applications/order/servicedef/ appli

2019-05-25 Thread Jacques Le Roux

Le 25/05/2019 à 08:54, Jacques Le Roux a écrit :
You mean when ran isolated, right? 


OK, got it, it's a framework only issue

https://ci.apache.org/projects/ofbiz/logs/trunk/framework/html/

Looking at it...

Jacques



Re: svn commit: r1859877 - in /ofbiz/ofbiz-framework/trunk: applications/accounting/servicedef/ applications/content/servicedef/ applications/marketing/servicedef/ applications/order/servicedef/ appli

2019-05-25 Thread Jacques Le Roux

Hi Mathieu,

You mean when ran isolated, right?

Because https://ci.apache.org/builders/ofbizTrunkFrameworkPlugins is OK

Thanks

Jacques

Le 24/05/2019 à 23:50, Mathieu Lirzin a écrit :

Hello Jacques,

jler...@apache.org writes:


Author: jleroux
Date: Fri May 24 13:47:08 2019
New Revision: 1859877

URL: http://svn.apache.org/viewvc?rev=1859877=rev
Log:
Fixed: Services allow arbitrary HTML for parameters with allow-html set to 
"safe"
(OFBIZ-5254)

This was reopened after discussion at
https://markmail.org/message/jnaitmwahjcjmdn5

This is a new solution which follows the work done with and OFBIZ-10187
Roughly said, it uses org.owasp.html.PolicyFactory and org.owasp.html.Sanitizers

Thanks: Christoph Neuroth for report

This commit breaks the “custrequesttests” test suite with a vanilla
framework after ‘loadAll’. If the issue can not be solved tomorrow
please revert.

Thanks.