Hi Eugen,

Are any of the commands you are running inside of a docker container?

The ofbiz.jar will have dependencies on various libraries that are hosted
in your gradle cache.

If you are running the build outside of the container, but the data-load
inside the container then you will run into trouble with missing
dependencies.

However I could be going in completely the wrong direction here. The error
messages would lead me to think the various .xsd/.xml files are missing,
but I think these are copied to the ofbiz.jar file along with other
resources, so I'm not sure what is going on at the moment.

Please could you provide your build steps then we can try to reproduce what
you're seeing.

Thanks,

Dan.

On Tue, 5 Jan 2021 at 10:04, Eugen Stan <eugen.s...@netdava.com> wrote:

> Hello,
>
> I can't start OFBiz from the built ofbiz.tar .
> My goal is to build ofbiz.tar and use it to build a docker image.
>
> Then use the image to deploy instances of OFBiz:
> - load data
> - run OFBiz
>
> [source,bash]
> ----
>
> ./gradlew clean pullAllPluginsSource build
>
>
> ./bin/ofbiz --load-data readers=seed,seed-initial,ext,ext-demo
>
> Config.java using configuration file load-data.properties
> Set OFBIZ_HOME to -
> /home/ieugen/proiecte/ofbiz/ofbiz-framework/build/distributions/ofbiz
> Shutdown hook disabled
> 2021-01-05 12:00:10,622 |main                 |UtilXml
>      |E| XmlFileLoader: File
> jar:file:/home/ieugen/proiecte/ofbiz/ofbiz-framework/build/distributions/ofbiz/lib/ofbiz.jar!/component-load.xml
>
> process warning. Line: 22. Error message: schema_reference.4: Failed to
> read schema document 'null', because 1) could not find the document; 2)
> the document could not be read; 3) the root element of the document is
> not <xsd:schema>.
> 2021-01-05 12:00:10,627 |main                 |UtilXml
>      |E| XmlFileLoader: File
> jar:file:/home/ieugen/proiecte/ofbiz/ofbiz-framework/build/distributions/ofbiz/lib/ofbiz.jar!/component-load.xml
>
> process error. Line: 22. Error message: cvc-elt.1.a: Cannot find the
> declaration of element 'component-loader'.
> org.apache.ofbiz.base.start.StartupException: Cannot init()
> component-container (org.apache.ofbiz.base.component.ComponentException:
> Error reading the component config file:
> jar:file:/home/ieugen/proiecte/ofbiz/ofbiz-framework/build/distributions/ofbiz/lib/ofbiz.jar!/component-load.xml
>
> (Stream closed) (Error reading the component config file:
> jar:file:/home/ieugen/proiecte/ofbiz/ofbiz-framework/build/distributions/ofbiz/lib/ofbiz.jar!/component-load.xml
>
> (Stream closed)))
>          at
>
> org.apache.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:69)
>          at
>
> org.apache.ofbiz.base.start.StartupControlPanel.loadContainers(StartupControlPanel.java:146)
>          at
>
> org.apache.ofbiz.base.start.StartupControlPanel.start(StartupControlPanel.java:70)
>          at org.apache.ofbiz.base.start.Start.main(Start.java:89)
> Caused by: org.apache.ofbiz.base.container.ContainerException:
> org.apache.ofbiz.base.component.ComponentException: Error reading the
> component config file:
> jar:file:/home/ieugen/proiecte/ofbiz/ofbiz-framework/build/distributions/ofbiz/lib/ofbiz.jar!/component-load.xml
>
> (Stream closed) (Error reading the component config file:
> jar:file:/home/ieugen/proiecte/ofbiz/ofbiz-framework/build/distributions/ofbiz/lib/ofbiz.jar!/component-load.xml
>
> (Stream closed))
>          at
>
> org.apache.ofbiz.base.container.ComponentContainer.init(ComponentContainer.java:79)
>          at
>
> org.apache.ofbiz.base.container.ComponentContainer.init(ComponentContainer.java:57)
>          at
>
> org.apache.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66)
>          ... 3 more
> Caused by: org.apache.ofbiz.base.component.ComponentException: Error
> reading the component config file:
> jar:file:/home/ieugen/proiecte/ofbiz/ofbiz-framework/build/distributions/ofbiz/lib/ofbiz.jar!/component-load.xml
>
> (Stream closed)
>          at
>
> org.apache.ofbiz.base.component.ComponentLoaderConfig.parseDocumentFromUrl(ComponentLoaderConfig.java:168)
>          at
>
> org.apache.ofbiz.base.component.ComponentLoaderConfig.getComponentsFromConfig(ComponentLoaderConfig.java:80)
>          at
>
> org.apache.ofbiz.base.component.ComponentLoaderConfig.getRootComponents(ComponentLoaderConfig.java:70)
>          at
>
> org.apache.ofbiz.base.container.ComponentContainer.init(ComponentContainer.java:74)
>          ... 5 more
> Caused by: java.io.IOException: Stream closed
>          at
> java.util.zip.InflaterInputStream.ensureOpen(InflaterInputStream.java:67)
>          at
> java.util.zip.InflaterInputStream.read(InflaterInputStream.java:142)
>          at java.io.FilterInputStream.read(FilterInputStream.java:133)
>          at
> org.apache.xerces.impl.XMLEntityManager$RewindableInputStream.read(Unknown
> Source)
>          at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)
>          at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
>          at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown
> Source)
>          at
> org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown
>
> Source)
>          at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)
>          at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> Source)
>          at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> Source)
>          at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>          at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>          at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
> Source)
>          at
> javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
>          at
> org.apache.ofbiz.base.util.UtilXml.readXmlDocument(UtilXml.java:443)
>          at
> org.apache.ofbiz.base.util.UtilXml.readXmlDocument(UtilXml.java:383)
>          at
>
> org.apache.ofbiz.base.component.ComponentLoaderConfig.parseDocumentFromUrl(ComponentLoaderConfig.java:166)
>          ... 8 more
>
> ---
>
>
> NOTE: I'm working on building a docker image for OFBiz and I've made
> some progress. I will share my work and try to merge it upstream.
>
>
> NOTE: I'm using: commit ba5536fe5735fcddc7eb8b515372cab932c0a913
> Improved: Apply CSS Grid to Find Orders (OFBIZ-12116)
>
> NOTE: java -version
> openjdk version "1.8.0_275"
> OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_275-b01)
> OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.275-b01, mixed mode)
>
>
> p.s. The ofbiz build is quite large at ~450MB
>
> Regards,
>
> --
> Eugen Stan
> +40720 898 747 / netdava.com
>


-- 
Daniel Watford

Reply via email to