Running jar archive

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Running jar archive

Tomek
Hi all,

Is it possible to run ofbiz.jar file without other resources? I have
used 'gradlew clean build' command to build jar archive. The ofbiz.jar
archive is located in build/lib/ofbiz.jar directory by default. So I
have moved this file to another directory and I used 'java -jar
ofbiz.jar' command to run Ofbiz. Unfortunately I have got the following
error:

Config.java using configuration file start.properties
Set OFBIZ_HOME to - /home/tk/Pulpit/test
Admin socket configured on - /127.0.0.1:10523
2020-04-23 12:47:40,224 |main |ContainerLoader               |I|
[Startup] Loading containers...
org.apache.ofbiz.base.start.StartupException:
org.apache.ofbiz.base.container.ContainerException: Could not find
container config file
/home/tk/Pulpit/test/framework/base/config/ofbiz-containers.xml (Could
not find container config file
/home/tk/Pulpit/test/framework/base/config/ofbiz-containers.xml)
         at
org.apache.ofbiz.base.container.ContainerLoader.retrieveOfbizContainers(ContainerLoader.java:80)
         at
org.apache.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:63)
         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: org.apache.ofbiz.base.container.ContainerException: Could not
find container config file
/home/tk/Pulpit/test/framework/base/config/ofbiz-containers.xml
         at
org.apache.ofbiz.base.container.ContainerConfig.getConfigurations(ContainerConfig.java:70)
         at
org.apache.ofbiz.base.container.ContainerLoader.retrieveOfbizContainers(ContainerLoader.java:78)
         ... 4 more
2020-04-23 12:47:40,236 |Thread-3 |ContainerLoader               |I|
Shutting down containers

grv
Reply | Threaded
Open this post in threaded view
|

Re: Running jar archive

grv
You probably do not have OFBIZ_HOME environment variable defined. It should
be the root directory containing your ofbiz installation.

export OFBIZ_HOME=<path-to-ofbiz-installation-dir>

Best,
Girish

On Thu, Apr 23, 2020 at 4:43 PM Tomek <[hidden email]> wrote:

> Hi all,
>
> Is it possible to run ofbiz.jar file without other resources? I have
> used 'gradlew clean build' command to build jar archive. The ofbiz.jar
> archive is located in build/lib/ofbiz.jar directory by default. So I
> have moved this file to another directory and I used 'java -jar
> ofbiz.jar' command to run Ofbiz. Unfortunately I have got the following
> error:
>
> Config.java using configuration file start.properties
> Set OFBIZ_HOME to - /home/tk/Pulpit/test
> Admin socket configured on - /127.0.0.1:10523
> 2020-04-23 12:47:40,224 |main |ContainerLoader               |I|
> [Startup] Loading containers...
> org.apache.ofbiz.base.start.StartupException:
> org.apache.ofbiz.base.container.ContainerException: Could not find
> container config file
> /home/tk/Pulpit/test/framework/base/config/ofbiz-containers.xml (Could
> not find container config file
> /home/tk/Pulpit/test/framework/base/config/ofbiz-containers.xml)
>          at
>
> org.apache.ofbiz.base.container.ContainerLoader.retrieveOfbizContainers(ContainerLoader.java:80)
>          at
>
> org.apache.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:63)
>          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: org.apache.ofbiz.base.container.ContainerException: Could not
> find container config file
> /home/tk/Pulpit/test/framework/base/config/ofbiz-containers.xml
>          at
>
> org.apache.ofbiz.base.container.ContainerConfig.getConfigurations(ContainerConfig.java:70)
>          at
>
> org.apache.ofbiz.base.container.ContainerLoader.retrieveOfbizContainers(ContainerLoader.java:78)
>          ... 4 more
> 2020-04-23 12:47:40,236 |Thread-3 |ContainerLoader               |I|
> Shutting down containers
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Running jar archive

Tomek
I invoke the following commands:

cd /home/tk/Pulpit/test

export OFBIZ_HOME=/home/tk/Pulpit/test

/opt/jdk8u242-b08/bin/java -jar ofbiz.jar

It still doesn't work and I have got the same error. Additionally, I
would like to point out that the OFBIZ_HOME directory contains only one
file (ofbiz.jar).

On 23.04.2020 17:24, Girish Vasmatkar wrote:

> You probably do not have OFBIZ_HOME environment variable defined. It should
> be the root directory containing your ofbiz installation.
>
> export OFBIZ_HOME=<path-to-ofbiz-installation-dir>
>
> Best,
> Girish
>
> On Thu, Apr 23, 2020 at 4:43 PM Tomek <[hidden email]> wrote:
>
>> Hi all,
>>
>> Is it possible to run ofbiz.jar file without other resources? I have
>> used 'gradlew clean build' command to build jar archive. The ofbiz.jar
>> archive is located in build/lib/ofbiz.jar directory by default. So I
>> have moved this file to another directory and I used 'java -jar
>> ofbiz.jar' command to run Ofbiz. Unfortunately I have got the following
>> error:
>>
>> Config.java using configuration file start.properties
>> Set OFBIZ_HOME to - /home/tk/Pulpit/test
>> Admin socket configured on - /127.0.0.1:10523
>> 2020-04-23 12:47:40,224 |main |ContainerLoader               |I|
>> [Startup] Loading containers...
>> org.apache.ofbiz.base.start.StartupException:
>> org.apache.ofbiz.base.container.ContainerException: Could not find
>> container config file
>> /home/tk/Pulpit/test/framework/base/config/ofbiz-containers.xml (Could
>> not find container config file
>> /home/tk/Pulpit/test/framework/base/config/ofbiz-containers.xml)
>>           at
>>
>> org.apache.ofbiz.base.container.ContainerLoader.retrieveOfbizContainers(ContainerLoader.java:80)
>>           at
>>
>> org.apache.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:63)
>>           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: org.apache.ofbiz.base.container.ContainerException: Could not
>> find container config file
>> /home/tk/Pulpit/test/framework/base/config/ofbiz-containers.xml
>>           at
>>
>> org.apache.ofbiz.base.container.ContainerConfig.getConfigurations(ContainerConfig.java:70)
>>           at
>>
>> org.apache.ofbiz.base.container.ContainerLoader.retrieveOfbizContainers(ContainerLoader.java:78)
>>           ... 4 more
>> 2020-04-23 12:47:40,236 |Thread-3 |ContainerLoader               |I|
>> Shutting down containers
>>
>>
grv
Reply | Threaded
Open this post in threaded view
|

Re: Running jar archive

grv
As I mentioned earlier, OFBIZ_HOME must point to the directory where you
checked out your ofbiz code. It is then up to you to execute the jar file
from anywhere you want.

The idea behind having OFBIZ_HOME is that the code internally starts
looking for resources using OFBIZ_HOME environment variable.



On Thu, Apr 23, 2020 at 9:29 PM Tomek <[hidden email]> wrote:

> I invoke the following commands:
>
> cd /home/tk/Pulpit/test
>
> export OFBIZ_HOME=/home/tk/Pulpit/test
>
> /opt/jdk8u242-b08/bin/java -jar ofbiz.jar
>
> It still doesn't work and I have got the same error. Additionally, I
> would like to point out that the OFBIZ_HOME directory contains only one
> file (ofbiz.jar).
>
> On 23.04.2020 17:24, Girish Vasmatkar wrote:
> > You probably do not have OFBIZ_HOME environment variable defined. It
> should
> > be the root directory containing your ofbiz installation.
> >
> > export OFBIZ_HOME=<path-to-ofbiz-installation-dir>
> >
> > Best,
> > Girish
> >
> > On Thu, Apr 23, 2020 at 4:43 PM Tomek <[hidden email]> wrote:
> >
> >> Hi all,
> >>
> >> Is it possible to run ofbiz.jar file without other resources? I have
> >> used 'gradlew clean build' command to build jar archive. The ofbiz.jar
> >> archive is located in build/lib/ofbiz.jar directory by default. So I
> >> have moved this file to another directory and I used 'java -jar
> >> ofbiz.jar' command to run Ofbiz. Unfortunately I have got the following
> >> error:
> >>
> >> Config.java using configuration file start.properties
> >> Set OFBIZ_HOME to - /home/tk/Pulpit/test
> >> Admin socket configured on - /127.0.0.1:10523
> >> 2020-04-23 12:47:40,224 |main |ContainerLoader               |I|
> >> [Startup] Loading containers...
> >> org.apache.ofbiz.base.start.StartupException:
> >> org.apache.ofbiz.base.container.ContainerException: Could not find
> >> container config file
> >> /home/tk/Pulpit/test/framework/base/config/ofbiz-containers.xml (Could
> >> not find container config file
> >> /home/tk/Pulpit/test/framework/base/config/ofbiz-containers.xml)
> >>           at
> >>
> >>
> org.apache.ofbiz.base.container.ContainerLoader.retrieveOfbizContainers(ContainerLoader.java:80)
> >>           at
> >>
> >>
> org.apache.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:63)
> >>           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: org.apache.ofbiz.base.container.ContainerException: Could not
> >> find container config file
> >> /home/tk/Pulpit/test/framework/base/config/ofbiz-containers.xml
> >>           at
> >>
> >>
> org.apache.ofbiz.base.container.ContainerConfig.getConfigurations(ContainerConfig.java:70)
> >>           at
> >>
> >>
> org.apache.ofbiz.base.container.ContainerLoader.retrieveOfbizContainers(ContainerLoader.java:78)
> >>           ... 4 more
> >> 2020-04-23 12:47:40,236 |Thread-3 |ContainerLoader               |I|
> >> Shutting down containers
> >>
> >>
>