Hi All
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) and therefore the code needs cache.properties and ofbiz-component.xsd to be in the classpath during start up. 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? Best, Girish |
Hello Girish,
Girish Vasmatkar <[hidden email]> 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 |
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 <[hidden email]> wrote: > Hello Girish, > > Girish Vasmatkar <[hidden email]> 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 > |
What is the exact command used to run?
On Sat, May 25, 2019, 12:27 PM Girish Vasmatkar < [hidden email]> 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 <[hidden email]> > wrote: > > > Hello Girish, > > > > Girish Vasmatkar <[hidden email]> 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 > > > |
In reply to this post by grv
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 < [hidden email]> 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 <[hidden email]> > wrote: > >> Hello Girish, >> >> Girish Vasmatkar <[hidden email]> 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 >> > |
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. On Sat, May 25, 2019 at 4:49 PM Girish Vasmatkar <[hidden email]> 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 < [hidden email]> 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 < > [hidden email]> 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 < >> [hidden email]> 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 < >>> [hidden email]> wrote: >>> >>>> Hello Girish, >>>> >>>> Girish Vasmatkar <[hidden email]> 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 >>>> >>> |
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 <folders, jars> 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 <[hidden email]> 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 < > [hidden email]> 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 < > > [hidden email]> 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 < > >> [hidden email]> 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 < > >>> [hidden email]> wrote: > >>> > >>>> Hello Girish, > >>>> > >>>> Girish Vasmatkar <[hidden email]> 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 > >>>> > >>> > |
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 < [hidden email]> 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 <folders, jars> > > 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 < > [hidden email]> > 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 < > > [hidden email]> 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 < > > > [hidden email]> 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 < > > >> [hidden email]> 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 < > > >>> [hidden email]> wrote: > > >>> > > >>>> Hello Girish, > > >>>> > > >>>> Girish Vasmatkar <[hidden email]> 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 > > >>>> > > >>> > > > |
Hi Taher,
I find it extremely useful to start OFBiz from the IDE ;-) This way hot code replacement is supported which helps changing code at runtime or while debugging. We add these two classpath entries by hand in Eclipse until now. I think there would be no problem to remove the two exclusions which would make these extra steps obsolete. Thanks, Michael ecomify GmbH - www.ecomify.de Am 25.05.19 um 19:15 schrieb 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 < > [hidden email]> 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 <folders, jars> >> >> 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 < >> [hidden email]> >> 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 < >>> [hidden email]> 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 < >>>> [hidden email]> 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 < >>>>> [hidden email]> 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 < >>>>>> [hidden email]> wrote: >>>>>> >>>>>>> Hello Girish, >>>>>>> >>>>>>> Girish Vasmatkar <[hidden email]> 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 >>>>>>> smime.p7s (5K) Download Attachment |
I see, sounds good. No harm in altering the exclusions.
On Sun, May 26, 2019 at 10:01 PM Michael Brohl <[hidden email]> wrote: > > Hi Taher, > > I find it extremely useful to start OFBiz from the IDE ;-) > > This way hot code replacement is supported which helps changing code at > runtime or while debugging. > > We add these two classpath entries by hand in Eclipse until now. I think > there would be no problem to remove the two exclusions which would make > these extra steps obsolete. > > Thanks, > > Michael > > ecomify GmbH - www.ecomify.de > > > Am 25.05.19 um 19:15 schrieb 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 < > > [hidden email]> 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 <folders, jars> > >> > >> 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 < > >> [hidden email]> > >> 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 < > >>> [hidden email]> 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 < > >>>> [hidden email]> 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 < > >>>>> [hidden email]> 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 < > >>>>>> [hidden email]> wrote: > >>>>>> > >>>>>>> Hello Girish, > >>>>>>> > >>>>>>> Girish Vasmatkar <[hidden email]> 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 > >>>>>>> > |
Filed OFBIZ-11071 <https://issues.apache.org/jira/browse/OFBIZ-11071> for
the same. Best, Girish On Mon, May 27, 2019 at 1:21 AM Taher Alkhateeb <[hidden email]> wrote: > I see, sounds good. No harm in altering the exclusions. > > On Sun, May 26, 2019 at 10:01 PM Michael Brohl <[hidden email]> > wrote: > > > > Hi Taher, > > > > I find it extremely useful to start OFBiz from the IDE ;-) > > > > This way hot code replacement is supported which helps changing code at > > runtime or while debugging. > > > > We add these two classpath entries by hand in Eclipse until now. I think > > there would be no problem to remove the two exclusions which would make > > these extra steps obsolete. > > > > Thanks, > > > > Michael > > > > ecomify GmbH - www.ecomify.de > > > > > > Am 25.05.19 um 19:15 schrieb 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 < > > > [hidden email]> 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 <folders, jars> > > >> > > >> 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 < > > >> [hidden email]> > > >> 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 < > > >>> [hidden email]> 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 < > > >>>> [hidden email]> 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 < > > >>>>> [hidden email]> 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 < > > >>>>>> [hidden email]> wrote: > > >>>>>> > > >>>>>>> Hello Girish, > > >>>>>>> > > >>>>>>> Girish Vasmatkar <[hidden email]> 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 > > >>>>>>> > > > |
Free forum by Nabble | Edit this page |