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.<init>(UtilCache.java:125)
>
> at org.apache.ofbiz.base.util.cache.UtilCache.createUtilCache(
> UtilCache.java:797)
>
> at org.apache.ofbiz.base.util.UtilProperties.<clinit>(
> UtilProperties.java:75)
>
> at org.apache.ofbiz.base.util.Debug.<clinit>(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.<clinit>(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.<init>(UtilCache.java:125)
>>
>> at org.apache.ofbiz.base.util.cache.UtilCache.createUtilCache(
>> UtilCache.java:779)
>>
>> at org.apache.ofbiz.base.util.UtilProperties.<clinit>(
>> 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 <mathieu.lir...@nereide.fr>
>> wrote:
>>
>>> Hello Girish,
>>>
>>> Girish Vasmatkar <girish.vasmat...@hotwaxsystems.com> 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 -
>>> >
>>> > <OFBiz>/framework/base/config
>>> > <OFBiz>/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
>>>
>>

Reply via email to