You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Chris Clark <ri...@gmail.com> on 2015/04/16 19:04:36 UTC
external install of multiple xml files through bash
so i know i can do this..
java -jar ofbiz.jar -install -file=file.xml
although that doesnt work on my system i get
Exception in thread "main" org.ofbiz.base.start.StartupException: Couldn't
not fetch config instance at
org.ofbiz.base.start.Start.init(Start.java:202) at
org.ofbiz.base.start.Start.main(Start.java:127) Caused by:
java.io.IOException: Cannot load configuration properties :
org/ofbiz/base/start/-install.properties at
org.ofbiz.base.start.Config.getPropertiesFile(Config.java:229) at
org.ofbiz.base.start.Config.readConfig(Config.java:297) at
org.ofbiz.base.start.Config.getInstance(Config.java:58) at
org.ofbiz.base.start.Start.init(Start.java:200) ... 1 more
is this another one of those i didnt declare the classes thing? because i
read in the classes and its still the same error... is there some
idiosyncrasy to installing multiple files say from a directory...
please help
Chris
Re: external install of multiple xml files through bash
Posted by Chris Clark <ri...@gmail.com>.
yeah ive already hammered out all the gawk scripts to output an xml
document and a simple sed script will take care of removing the
header/footer, and a simple cat headers strippedfiles footer command will
combine them back into one...im solid on that part
thanks anyhow im trying to wrap my head around java at the moment and
adding another language type (ive already learned so many) would just be a
hassle for now
Chris
On Fri, Apr 17, 2015 at 8:49 AM, Ron Wheeler <rwheeler@artifact-software.com
> wrote:
> On 17/04/2015 9:40 AM, Chris Clark wrote:
>
>> awesome... thanks a lot i will give it a go...and can it do multiple files
>> in a directory say
>>
>> java -jar ofbiz.jar install -file=/filestoimport/*.xml
>>
>> im actually working on yet another script to take all the xml files strip
>> them of the two line header and one line footer, concatenate and then
>> reapply the headers/footer, but this would be much easier
>>
>
> Using XSLT? That might eliminate some of the stripping and reapplying.
>
>
>
>> Chris
>>
>> On Thu, Apr 16, 2015 at 11:44 PM, Jacques Le Roux <
>> jacques.le.roux@les7arts.com> wrote:
>>
>> With R13.07 use rather something like
>>>
>>> java -jar ofbiz.jar install -file=test.file
>>>
>>> "-install" was valid until R12.04, please refer to the wiki
>>>
>>>
>>> https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+Production+Setup+Guide#ApacheOFBizTechnicalProductionSetupGuide-InitialDataLoading
>>>
>>> Jacques
>>>
>>>
>>> Le 16/04/2015 19:04, Chris Clark a écrit :
>>>
>>> so i know i can do this..
>>>>
>>>> java -jar ofbiz.jar -install -file=file.xml
>>>>
>>>> although that doesnt work on my system i get
>>>>
>>>> Exception in thread "main" org.ofbiz.base.start.StartupException:
>>>> Couldn't
>>>> not fetch config instance at
>>>> org.ofbiz.base.start.Start.init(Start.java:202) at
>>>> org.ofbiz.base.start.Start.main(Start.java:127) Caused by:
>>>> java.io.IOException: Cannot load configuration properties :
>>>> org/ofbiz/base/start/-install.properties at
>>>> org.ofbiz.base.start.Config.getPropertiesFile(Config.java:229) at
>>>> org.ofbiz.base.start.Config.readConfig(Config.java:297) at
>>>> org.ofbiz.base.start.Config.getInstance(Config.java:58) at
>>>> org.ofbiz.base.start.Start.init(Start.java:200) ... 1 more
>>>>
>>>>
>>>> is this another one of those i didnt declare the classes thing? because
>>>> i
>>>> read in the classes and its still the same error... is there some
>>>> idiosyncrasy to installing multiple files say from a directory...
>>>>
>>>> please help
>>>>
>>>> Chris
>>>>
>>>>
>>>>
>
> --
> Ron Wheeler
> President
> Artifact Software Inc
> email: rwheeler@artifact-software.com
> skype: ronaldmwheeler
> phone: 866-970-2435, ext 102
>
>
Re: external install of multiple xml files through bash
Posted by Ron Wheeler <rw...@artifact-software.com>.
On 17/04/2015 9:40 AM, Chris Clark wrote:
> awesome... thanks a lot i will give it a go...and can it do multiple files
> in a directory say
>
> java -jar ofbiz.jar install -file=/filestoimport/*.xml
>
> im actually working on yet another script to take all the xml files strip
> them of the two line header and one line footer, concatenate and then
> reapply the headers/footer, but this would be much easier
Using XSLT? That might eliminate some of the stripping and reapplying.
>
> Chris
>
> On Thu, Apr 16, 2015 at 11:44 PM, Jacques Le Roux <
> jacques.le.roux@les7arts.com> wrote:
>
>> With R13.07 use rather something like
>>
>> java -jar ofbiz.jar install -file=test.file
>>
>> "-install" was valid until R12.04, please refer to the wiki
>>
>> https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+Production+Setup+Guide#ApacheOFBizTechnicalProductionSetupGuide-InitialDataLoading
>>
>> Jacques
>>
>>
>> Le 16/04/2015 19:04, Chris Clark a écrit :
>>
>>> so i know i can do this..
>>>
>>> java -jar ofbiz.jar -install -file=file.xml
>>>
>>> although that doesnt work on my system i get
>>>
>>> Exception in thread "main" org.ofbiz.base.start.StartupException: Couldn't
>>> not fetch config instance at
>>> org.ofbiz.base.start.Start.init(Start.java:202) at
>>> org.ofbiz.base.start.Start.main(Start.java:127) Caused by:
>>> java.io.IOException: Cannot load configuration properties :
>>> org/ofbiz/base/start/-install.properties at
>>> org.ofbiz.base.start.Config.getPropertiesFile(Config.java:229) at
>>> org.ofbiz.base.start.Config.readConfig(Config.java:297) at
>>> org.ofbiz.base.start.Config.getInstance(Config.java:58) at
>>> org.ofbiz.base.start.Start.init(Start.java:200) ... 1 more
>>>
>>>
>>> is this another one of those i didnt declare the classes thing? because i
>>> read in the classes and its still the same error... is there some
>>> idiosyncrasy to installing multiple files say from a directory...
>>>
>>> please help
>>>
>>> Chris
>>>
>>>
--
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102
Re: external install of multiple xml files through bash
Posted by Chris Clark <ri...@gmail.com>.
awesome... thanks a lot i will give it a go...and can it do multiple files
in a directory say
java -jar ofbiz.jar install -file=/filestoimport/*.xml
im actually working on yet another script to take all the xml files strip
them of the two line header and one line footer, concatenate and then
reapply the headers/footer, but this would be much easier
Chris
On Thu, Apr 16, 2015 at 11:44 PM, Jacques Le Roux <
jacques.le.roux@les7arts.com> wrote:
> With R13.07 use rather something like
>
> java -jar ofbiz.jar install -file=test.file
>
> "-install" was valid until R12.04, please refer to the wiki
>
> https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+Production+Setup+Guide#ApacheOFBizTechnicalProductionSetupGuide-InitialDataLoading
>
> Jacques
>
>
> Le 16/04/2015 19:04, Chris Clark a écrit :
>
>> so i know i can do this..
>>
>> java -jar ofbiz.jar -install -file=file.xml
>>
>> although that doesnt work on my system i get
>>
>> Exception in thread "main" org.ofbiz.base.start.StartupException: Couldn't
>> not fetch config instance at
>> org.ofbiz.base.start.Start.init(Start.java:202) at
>> org.ofbiz.base.start.Start.main(Start.java:127) Caused by:
>> java.io.IOException: Cannot load configuration properties :
>> org/ofbiz/base/start/-install.properties at
>> org.ofbiz.base.start.Config.getPropertiesFile(Config.java:229) at
>> org.ofbiz.base.start.Config.readConfig(Config.java:297) at
>> org.ofbiz.base.start.Config.getInstance(Config.java:58) at
>> org.ofbiz.base.start.Start.init(Start.java:200) ... 1 more
>>
>>
>> is this another one of those i didnt declare the classes thing? because i
>> read in the classes and its still the same error... is there some
>> idiosyncrasy to installing multiple files say from a directory...
>>
>> please help
>>
>> Chris
>>
>>
Re: external install of multiple xml files through bash
Posted by Jacques Le Roux <ja...@les7arts.com>.
With R13.07 use rather something like
java -jar ofbiz.jar install -file=test.file
"-install" was valid until R12.04, please refer to the wiki
https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+Production+Setup+Guide#ApacheOFBizTechnicalProductionSetupGuide-InitialDataLoading
Jacques
Le 16/04/2015 19:04, Chris Clark a écrit :
> so i know i can do this..
>
> java -jar ofbiz.jar -install -file=file.xml
>
> although that doesnt work on my system i get
>
> Exception in thread "main" org.ofbiz.base.start.StartupException: Couldn't
> not fetch config instance at
> org.ofbiz.base.start.Start.init(Start.java:202) at
> org.ofbiz.base.start.Start.main(Start.java:127) Caused by:
> java.io.IOException: Cannot load configuration properties :
> org/ofbiz/base/start/-install.properties at
> org.ofbiz.base.start.Config.getPropertiesFile(Config.java:229) at
> org.ofbiz.base.start.Config.readConfig(Config.java:297) at
> org.ofbiz.base.start.Config.getInstance(Config.java:58) at
> org.ofbiz.base.start.Start.init(Start.java:200) ... 1 more
>
>
> is this another one of those i didnt declare the classes thing? because i
> read in the classes and its still the same error... is there some
> idiosyncrasy to installing multiple files say from a directory...
>
> please help
>
> Chris
>
Re: external install of multiple xml files through bash
Posted by Chris Clark <ri...@gmail.com>.
what would you put for the class path....this was the issue with the
creation of the service, and what i did (and im sure this was like a band
aid with a little staph in it, working at first but messing things up in
the long run) was to find all the directories with classes in them under
the ofbiz home add those to a txt file ":" delimited and read in the text
file as the CLASSPATH env variable...
Chris
On Thu, Apr 16, 2015 at 1:42 PM, Mike <mz...@gmail.com> wrote:
> Maybe use a script (like the one I pasted), add the classpath, and have the
> service call the script instead of java directly.
>
> On Thu, Apr 16, 2015 at 10:55 AM, Chris Clark <ri...@gmail.com> wrote:
>
> > yeah i was hoping for something with the java command as i am going to
> try
> > and run this as a service and my system doesnt, or should i say, didnt
> like
> > ant when i was trying to make the ofbiz service... it does normally...
> just
> > not in the service context
> >
> > Chris
> >
> > On Thu, Apr 16, 2015 at 12:42 PM, Mike <mz...@gmail.com> wrote:
> >
> > > Use this, modify to suit:
> > >
> > > root@srv01:/opt/ofbiz.import/bin# cat load_xml.sh
> > > #! /bin/bash
> > >
> > > if [ ! -f "$1" ]; then
> > > echo "ERROR: finding $1"
> > > exit
> > > fi
> > >
> > > #cd /opt/ofbiz
> > > ./ant run-install-file -Ddata-file=$1
> > >
> > >
> > > On Thu, Apr 16, 2015 at 10:04 AM, Chris Clark <ri...@gmail.com>
> wrote:
> > >
> > > > so i know i can do this..
> > > >
> > > > java -jar ofbiz.jar -install -file=file.xml
> > > >
> > > > although that doesnt work on my system i get
> > > >
> > > > Exception in thread "main" org.ofbiz.base.start.StartupException:
> > > Couldn't
> > > > not fetch config instance at
> > > > org.ofbiz.base.start.Start.init(Start.java:202) at
> > > > org.ofbiz.base.start.Start.main(Start.java:127) Caused by:
> > > > java.io.IOException: Cannot load configuration properties :
> > > > org/ofbiz/base/start/-install.properties at
> > > > org.ofbiz.base.start.Config.getPropertiesFile(Config.java:229) at
> > > > org.ofbiz.base.start.Config.readConfig(Config.java:297) at
> > > > org.ofbiz.base.start.Config.getInstance(Config.java:58) at
> > > > org.ofbiz.base.start.Start.init(Start.java:200) ... 1 more
> > > >
> > > >
> > > > is this another one of those i didnt declare the classes thing?
> > because i
> > > > read in the classes and its still the same error... is there some
> > > > idiosyncrasy to installing multiple files say from a directory...
> > > >
> > > > please help
> > > >
> > > > Chris
> > > >
> > >
> >
>
Re: external install of multiple xml files through bash
Posted by Mike <mz...@gmail.com>.
Maybe use a script (like the one I pasted), add the classpath, and have the
service call the script instead of java directly.
On Thu, Apr 16, 2015 at 10:55 AM, Chris Clark <ri...@gmail.com> wrote:
> yeah i was hoping for something with the java command as i am going to try
> and run this as a service and my system doesnt, or should i say, didnt like
> ant when i was trying to make the ofbiz service... it does normally... just
> not in the service context
>
> Chris
>
> On Thu, Apr 16, 2015 at 12:42 PM, Mike <mz...@gmail.com> wrote:
>
> > Use this, modify to suit:
> >
> > root@srv01:/opt/ofbiz.import/bin# cat load_xml.sh
> > #! /bin/bash
> >
> > if [ ! -f "$1" ]; then
> > echo "ERROR: finding $1"
> > exit
> > fi
> >
> > #cd /opt/ofbiz
> > ./ant run-install-file -Ddata-file=$1
> >
> >
> > On Thu, Apr 16, 2015 at 10:04 AM, Chris Clark <ri...@gmail.com> wrote:
> >
> > > so i know i can do this..
> > >
> > > java -jar ofbiz.jar -install -file=file.xml
> > >
> > > although that doesnt work on my system i get
> > >
> > > Exception in thread "main" org.ofbiz.base.start.StartupException:
> > Couldn't
> > > not fetch config instance at
> > > org.ofbiz.base.start.Start.init(Start.java:202) at
> > > org.ofbiz.base.start.Start.main(Start.java:127) Caused by:
> > > java.io.IOException: Cannot load configuration properties :
> > > org/ofbiz/base/start/-install.properties at
> > > org.ofbiz.base.start.Config.getPropertiesFile(Config.java:229) at
> > > org.ofbiz.base.start.Config.readConfig(Config.java:297) at
> > > org.ofbiz.base.start.Config.getInstance(Config.java:58) at
> > > org.ofbiz.base.start.Start.init(Start.java:200) ... 1 more
> > >
> > >
> > > is this another one of those i didnt declare the classes thing?
> because i
> > > read in the classes and its still the same error... is there some
> > > idiosyncrasy to installing multiple files say from a directory...
> > >
> > > please help
> > >
> > > Chris
> > >
> >
>
Re: external install of multiple xml files through bash
Posted by Chris Clark <ri...@gmail.com>.
yeah i was hoping for something with the java command as i am going to try
and run this as a service and my system doesnt, or should i say, didnt like
ant when i was trying to make the ofbiz service... it does normally... just
not in the service context
Chris
On Thu, Apr 16, 2015 at 12:42 PM, Mike <mz...@gmail.com> wrote:
> Use this, modify to suit:
>
> root@srv01:/opt/ofbiz.import/bin# cat load_xml.sh
> #! /bin/bash
>
> if [ ! -f "$1" ]; then
> echo "ERROR: finding $1"
> exit
> fi
>
> #cd /opt/ofbiz
> ./ant run-install-file -Ddata-file=$1
>
>
> On Thu, Apr 16, 2015 at 10:04 AM, Chris Clark <ri...@gmail.com> wrote:
>
> > so i know i can do this..
> >
> > java -jar ofbiz.jar -install -file=file.xml
> >
> > although that doesnt work on my system i get
> >
> > Exception in thread "main" org.ofbiz.base.start.StartupException:
> Couldn't
> > not fetch config instance at
> > org.ofbiz.base.start.Start.init(Start.java:202) at
> > org.ofbiz.base.start.Start.main(Start.java:127) Caused by:
> > java.io.IOException: Cannot load configuration properties :
> > org/ofbiz/base/start/-install.properties at
> > org.ofbiz.base.start.Config.getPropertiesFile(Config.java:229) at
> > org.ofbiz.base.start.Config.readConfig(Config.java:297) at
> > org.ofbiz.base.start.Config.getInstance(Config.java:58) at
> > org.ofbiz.base.start.Start.init(Start.java:200) ... 1 more
> >
> >
> > is this another one of those i didnt declare the classes thing? because i
> > read in the classes and its still the same error... is there some
> > idiosyncrasy to installing multiple files say from a directory...
> >
> > please help
> >
> > Chris
> >
>
Re: external install of multiple xml files through bash
Posted by Mike <mz...@gmail.com>.
Use this, modify to suit:
root@srv01:/opt/ofbiz.import/bin# cat load_xml.sh
#! /bin/bash
if [ ! -f "$1" ]; then
echo "ERROR: finding $1"
exit
fi
#cd /opt/ofbiz
./ant run-install-file -Ddata-file=$1
On Thu, Apr 16, 2015 at 10:04 AM, Chris Clark <ri...@gmail.com> wrote:
> so i know i can do this..
>
> java -jar ofbiz.jar -install -file=file.xml
>
> although that doesnt work on my system i get
>
> Exception in thread "main" org.ofbiz.base.start.StartupException: Couldn't
> not fetch config instance at
> org.ofbiz.base.start.Start.init(Start.java:202) at
> org.ofbiz.base.start.Start.main(Start.java:127) Caused by:
> java.io.IOException: Cannot load configuration properties :
> org/ofbiz/base/start/-install.properties at
> org.ofbiz.base.start.Config.getPropertiesFile(Config.java:229) at
> org.ofbiz.base.start.Config.readConfig(Config.java:297) at
> org.ofbiz.base.start.Config.getInstance(Config.java:58) at
> org.ofbiz.base.start.Start.init(Start.java:200) ... 1 more
>
>
> is this another one of those i didnt declare the classes thing? because i
> read in the classes and its still the same error... is there some
> idiosyncrasy to installing multiple files say from a directory...
>
> please help
>
> Chris
>