How can I populate the database on a mac?
Submitted by dadmin on Thu, 10/04/2008 - 23:46
I have successfully installed OpenVPMS locally for testing on my mac running osX 10.5 (leopard). The only thing I haven't been able to do is to pre-populate the database as the scripts are windows (.bat) files. Is there another way for me to do this? (eg. just importing a .sql file with the info contained in it.)Thanks,Matt.
Re: How can I populate the database on a mac?
I haven't got a copy of the .bat file to look at, but I'm sure I could translate it for you if I saw it.
Its much of the sameness on both platforms.
- BenDog
> From: > Reply-To: , OpenVPMS User Mailing List > > Date: 10 Apr 2008 12:46:37 -0000 > To: > Subject: [OpenVPMS Users] How can I populate the database on a mac? > > I have successfully installed OpenVPMS locally for testing on my mac running > osX 10.5 (leopard). The only thing I haven't been able to do is > to pre-populate the database as the scripts are windows (.bat) files. Is there > another way for me to do this? (eg. just importing a .sql file with the info > contained in it.)Thanks,Matt. > _______________________________________________ > OpenVPMS User Mailing List > users@lists.openvpms.org > http://lists.openvpms.org/mailman/listinfo/users_______________________________________________ OpenVPMS User Mailing List users@lists.openvpms.org http://lists.openvpms.org/mailman/listinfo/users
Re: How can I populate the database on a mac?
Let me know how you go.
Regards,
Tim
BenDog wrote: > You could probably cut and paste the bat file to a bash session and that > might work... > > I haven't got a copy of the .bat file to look at, but I'm sure I could > translate it for you if I saw it. > > Its much of the sameness on both platforms. > > - BenDog > > > >> From: >> Reply-To: , OpenVPMS User Mailing List >> >> Date: 10 Apr 2008 12:46:37 -0000 >> To: >> Subject: [OpenVPMS Users] How can I populate the database on a mac? >> >> I have successfully installed OpenVPMS locally for testing on my mac running >> osX 10.5 (leopard). The only thing I haven't been able to do is >> to pre-populate the database as the scripts are windows (.bat) files. Is there >> another way for me to do this? (eg. just importing a .sql file with the info >> contained in it.)Thanks,Matt.still can't get them to work
Re: still can't get them to work
2. Copied the new .sh scripts to the openvpms-release-1.1/bin directory
If you cd to the bin dir, you should be able to do: > ls ../import/data
This directory should contain two files, base.xml and setup.xml
The database setup should be the same for the mac as for windows, with the exception of path names. ie. the section on "OpenVPMS Database Setup" in http://confluence.openvpms.org/confluence/display/IMPLEM/OpenVPMS+Installation+%28Windows%29 should apply.
Regards,
-Tim
r_myoung@yahoo.com.au wrote: > Hi Tim, > > I tried those scripts but didn't work, got this message when I ran > dataload: > > 20:55:21,409 INFO StaxArchetypeDataLoader,main:936 - Using > application context [../conf/applicationContext.xml] > 20:55:29,396 INFO StaxArchetypeDataLoader,main:269 - [PROCESSING FILE > : ../import/data] > > Exception in thread "main" java.io.FileNotFoundException: > ../import/data (No such file or directory) > at java.io.FileInputStream.open(Native Method) > at java.io.FileInputStream.(FileInputStream.java:106) > at java.io.FileInputStream.(FileInputStream.java:66) > at > org.openvpms.tools.data.loader.StaxArchetypeDataLoader.getReader(StaxArchetypeDataLoader.java:956) > > at > org.openvpms.tools.data.loader.StaxArchetypeDataLoader.processFile(StaxArchetypeDataLoader.java:271) > > at > org.openvpms.tools.data.loader.StaxArchetypeDataLoader.load(StaxArchetypeDataLoader.java:217) > > at > org.openvpms.tools.data.loader.StaxArchetypeDataLoader.main(StaxArchetypeDataLoader.java:200) > > > > Is the script the problem or my setup? > > Matt. > _______________________________________________ > OpenVPMS User Mailing List > users@lists.openvpms.org > http://lists.openvpms.org/mailman/listinfo/users >_______________________________________________ OpenVPMS User Mailing List users@lists.openvpms.org http://lists.openvpms.org/mailman/listinfo/users
Re: still can't get them to work
-Tim
Tim Anderson wrote: > Have you: > 1. Downloaded and extracted the 1.1 release from > http://maven.openvpms.org/org.openvpms/zips/openvpms-release-1.1.zip > > 2. Copied the new .sh scripts to the openvpms-release-1.1/bin directory > > If you cd to the bin dir, you should be able to do: > > ls ../import/data > > This directory should contain two files, base.xml and setup.xml > > The database setup should be the same for the mac as for windows, with > the exception of path names. > ie. the section on "OpenVPMS Database Setup" > in > http://confluence.openvpms.org/confluence/display/IMPLEM/OpenVPMS+Installation+%28Windows%29 > > should apply. > > Regards, > > -Tim > > r_myoung@yahoo.com.au wrote: >> Hi Tim, >> >> I tried those scripts but didn't work, got this message when I ran >> dataload: >> >> 20:55:21,409 INFO StaxArchetypeDataLoader,main:936 - Using >> application context [../conf/applicationContext.xml] >> 20:55:29,396 INFO StaxArchetypeDataLoader,main:269 - [PROCESSING >> FILE : ../import/data] >> >> Exception in thread "main" java.io.FileNotFoundException: >> ../import/data (No such file or directory) >> at java.io.FileInputStream.open(Native Method) >> at java.io.FileInputStream.(FileInputStream.java:106) >> at java.io.FileInputStream.(FileInputStream.java:66) >> at >> org.openvpms.tools.data.loader.StaxArchetypeDataLoader.getReader(StaxArchetypeDataLoader.java:956) >> >> at >> org.openvpms.tools.data.loader.StaxArchetypeDataLoader.processFile(StaxArchetypeDataLoader.java:271) >> >> at >> org.openvpms.tools.data.loader.StaxArchetypeDataLoader.load(StaxArchetypeDataLoader.java:217) >> >> at >> org.openvpms.tools.data.loader.StaxArchetypeDataLoader.main(StaxArchetypeDataLoader.java:200) >> >> >> >> Is the script the problem or my setup? >> >> Matt. >> _______________________________________________ >> OpenVPMS User Mailing List >> users@lists.openvpms.org >> http://lists.openvpms.org/mailman/listinfo/users >> > > _______________________________________________ > OpenVPMS User Mailing List > users@lists.openvpms.org > http://lists.openvpms.org/mailman/listinfo/users >Re: still can't get them to work
You can view them in the mail archives, but they have been inlined, removing file name information. E.g http://lists.openvpms.org/mailman/public/users/msg00142.html
For those not afraid of getting their hands dirty, the scripts can be accessed from version control from svn://svn.openvpms.org/openvpms/release/trunk/src/bin
Alternatively, just send me a mail and I'll post them out.
-Tim
Tim Anderson wrote: > Oops - my bad. The dataload script was wrong. Try the attached. > > -Tim > > Tim Anderson wrote: >> Have you: >> 1. Downloaded and extracted the 1.1 release from >> http://maven.openvpms.org/org.openvpms/zips/openvpms-release-1.1.zip >> >> 2. Copied the new .sh scripts to the openvpms-release-1.1/bin directory >> >> If you cd to the bin dir, you should be able to do: >> > ls ../import/data >> >> This directory should contain two files, base.xml and setup.xml >> >> The database setup should be the same for the mac as for windows, >> with the exception of path names. >> ie. the section on "OpenVPMS Database Setup" >> in >> http://confluence.openvpms.org/confluence/display/IMPLEM/OpenVPMS+Installation+%28Windows%29 >> >> should apply. >> >> Regards, >> >> -Tim_______________________________________________ OpenVPMS User Mailing List users@lists.openvpms.org http://lists.openvpms.org/mailman/listinfo/users
Re: still can't get them to work
You can get them from: http://www.openvpms.org/fisheye/browse/openvpms/release/trunk/src/bin
The scripts will also be included in the 1.2 release.
-Tim
Tim Anderson wrote: > Looks as though anyone trying to find the scripts in the forum won't > see them - > the attachments appear to be being stripped out of the email. > > You can view them in the mail archives, but they have been inlined, > removing > file name information. > E.g http://lists.openvpms.org/mailman/public/users/msg00142.html > > For those not afraid of getting their hands dirty, the scripts can be > accessed > from version control from > svn://svn.openvpms.org/openvpms/release/trunk/src/bin > > Alternatively, just send me a mail and I'll post them out. > > -Tim_______________________________________________ OpenVPMS User Mailing List users@lists.openvpms.org http://lists.openvpms.org/mailman/listinfo/users
Scripts won't work
Re: Scripts won't work
You'll need to change lines 7 and 10.
If that doesn't work, try changing setenv.sh to export the classpath. ie. replace:
CLASSPATH=.....
with: export CLASSPATH=
I don't believe any of the above should make any difference, but I don't have a unix install to check.
If none of the above works, send the output of running:
sh -x dataload.sh
to tma@netspace.net.au
Thanks,
Tim
r_myoung@yahoo.com.au wrote: > I have downloaded the 1.1 release and put the latest scripts in bin > from fisheye. When I run the dataload script I get the following error: > > Exception in thread "main" java.lang.NoClassDefFoundError: > org/openvpms/tools/data/loader/StaxArchetypeDataLoader > > Matt._______________________________________________ OpenVPMS User Mailing List users@lists.openvpms.org To unsubscribe or change your subscription visit: http://lists.openvpms.org/mailman/listinfo/users
Re: How can I populate the database on a mac?
I'm working on the assumption that the java stuff should be cross platform...
Just read my notes in the [ ... ]'s
=-=-=-=-=-=-=-=-=-=-=-=-=-=- @echo off
call setenv.bat
[ basically this line above does this: setenv CLASSPATH "../conf" (you will probably have to find the full name of this directory to import it.) ]
if ""%1"" == ""base"" goto doBase if ""%1"" == ""setup"" goto doSetup
echo Usage: dataload ( commands ... ) echo commands: echo base Load base data echo setup Load setup data goto end
:doBase java org.openvpms.tools.data.loader.StaxArchetypeDataLoader -c ./conf/applicationContext.xml -f ../import/data/base.xml goto end
:doSetup java org.openvpms.tools.data.loader.StaxArchetypeDataLoader -c ./conf/applicationContext.xml -d ../import/data
:end
[ you should just be able to cut and paste these lines into your terminal.
for the command 'base' java org.openvpms.tools.data.loader.StaxArchetypeDataLoader -c ./conf/applicationContext.xml -f ../import/data/base.xml
for the command 'setup' java org.openvpms.tools.data.loader.StaxArchetypeDataLoader -c ./conf/applicationContext.xml -d ../import/data
thats the basic gist of the script... give it a shot and if it doesn't work, i'm sure somebody in the mailing list will find the part thats wrong. ]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> From: Matthew Young > Date: Fri, 11 Apr 2008 14:21:55 +1000 > To: BenDog > Subject: Re: [OpenVPMS Users] How can I populate the database on a mac? > > > > Hi BenDog, > > I have attached the .bat files for you to have a look at. > > Many thanks, > Matt Young. > > > On 11/04/2008, at 12:52 PM, BenDog wrote: > >> You could probably cut and paste the bat file to a bash session and >> that >> might work... >> >> I haven't got a copy of the .bat file to look at, but I'm sure I could >> translate it for you if I saw it. >> >> Its much of the sameness on both platforms. >> >> - BenDog >> >> >>> From: >>> Reply-To: , OpenVPMS User Mailing List >>> >>> Date: 10 Apr 2008 12:46:37 -0000 >>> To: >>> Subject: [OpenVPMS Users] How can I populate the database on a mac? >>> >>> I have successfully installed OpenVPMS locally for testing on my >>> mac running >>> osX 10.5 (leopard). The only thing I haven't been able to do is >>> to pre-populate the database as the scripts are windows (.bat) >>> files. Is there >>> another way for me to do this? (eg. just importing a .sql file >>> with the info >>> contained in it.)Thanks,Matt. >>> _______________________________________________ >>> OpenVPMS User Mailing List >>> users@lists.openvpms.org >>> http://lists.openvpms.org/mailman/listinfo/users >> >> >_______________________________________________ OpenVPMS User Mailing List users@lists.openvpms.org http://lists.openvpms.org/mailman/listinfo/users