installation misguides? and problem with postcode setup

Greetings all

New to this forum and I have spent some time looking through them to find help on my problem.

I have been asked to implement a OpenVPMS system for a veterinarian friend of mine. I gave up on the linux install, the level of assummed knowledge was taking to long to ramp up, so I moved to a Windows 7 install.

All went well until i reached the portion of the install guide MySQL Configuration, Startup Variables, innoDB Parameters, Data Directory. In the example given, the path to the data directory reads - C;\openvpms\data.

However there is no folder at that location. During the preceeding installation, you are instructed to create a folder c:\openvpms and unzip the Openvpms zip file into that folder. This unzips to give a nested folder called openvpms-release-1.5.1, with subfolders ..\bin to ..\webapps. There is no DATA folder.

In order to proceed, i copied the contents of c:\openvpms\openvpms-release-1.5.1 to c:\openvpms, and pointed MySQL to look in c:\openvpms\db for it's data files. It seems to work, though i am concerned i fudged the instructions and am unsure if there will be repercussions down the track.

I finished the installation according to the Win7 setup instructions, brought up the system and voila, OpenVPMS is running in admin mode. However, i noticed that Workflow pages were not populating at all, and that I seemed to have come to a stop. Came back to the forum and looked for continuing setup information. I found the pointer to the guide, Configuring Your New Installation, and started to implement it's instructions, and hit problems.

From a command window in folder c:\openvpms\bin - type dataload.bat ..\upload\data\postcodesAU.xml - this returns an error - unexpected argument: ... ..\import\data\postcodesAU.xml

Question is, were the instructions during setup non-explicit. Did my fudge affect other future configurations. Why can i not progress past this point.

Any advice or pointers would be greatly appreciated

Regards MatR

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Continuing lack of light bulbs

If this postcode problem was a bone, it would have been ground to dust ages ago, I have been worrying and gnawing at this problem on and off all day.

Came across a post between Yuri and Tim - with an updated Win dataload command line, namely dataload.bat -f ..\upload\data\postcodesAU.xml. Tried this and got the following result -

***********************************************************************

C:\OpenVPMS\bin> dataload.bat -f ..\import\data\postcodeAU.xml
01:15:08,070 INFO StaxArchetypeDataLoader,main:236 - [PROCESSING FILE : ..\import\data\postcodeAU.xml]
01:15:08,072 ERROR StaxArchetypeDataLoader,main:203 - java.io.FileNotFoundException: ..\import\data\postcodeAU.xml
(The system cannot find the file specified) java.io.FileNotFoundException: ..\import\data\postcodeAU.xml (The system cannot find the file specified)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(Unknown Source)
         at org.openvpms.tools.data.loader.StaxArchetypeDataLoader.getReader(StaxArchetypeDataLoader.java:272)
         at org.openvpms.tools.data.loader.StaxArchetypeDataLoader.processFile(StaxArchetypeDataLoader.java:238)
         at org.openvpms.tools.data.loader.StaxArchetypeDataLoader.load(StaxArchetypeDataLoader.java:159)
         at org.openvpms.tools.data.loader.StaxArchetypeDataLoader.main(StaxArchetypeDataLoader.java:197)

********************************************************************

I am starting to feel that my earlier freedom with the copying of folders to a non-standard location may be the source of my troubles. I also found another post between Yuri and Tony DeK that described a reason for finding a ..\openvpms\data\ folder where none exists at install. Just a personal foible of an installer.

Can anyone offer some insight for which way to move at this point.

Regards Mat

Re: Continuing lack of light bulbs

The script is expecting an argument of either 'setup' or 'base', not the file location. I can't recall off the top of my head but I think you need setup. So you cd to the bin directory and then type 'dataload.bat setup'.

 

Matt Y

Re: installation misguides? and problem with postcode setup

Thank you for the response Matt Y

Hmm - from memory i have already seeded the database with setup.xml (not the base.xml, after all this is a new installation, i am not mitrgrating from another version/copy)

oVPMS runs. It starts with the login screen, allows you to log in with admin/admin and to navigate thru the various screens. It allows me to configure clinic start times and end times, set up a clinic and surgery scdedule, and also allowed workflow view to be setup. Allows you to create new users, and login with them

All this works. The problem atm is the postcode upload - that is not working. When i have time late rtoday, i think i may pull apart the dataload.bat and it's interaction with setup.xml - i feel that there are explicit folder structures embedded or expected within those elements, which is not being replicated in the postcode instruction. Hmm actually that is bollocks, i shouldnt think before cofee. If that were the case why didnt the initial setup dataload fail with my fudge setup.

Back to the drawing board.

 

Reference to Previous posts noted

Use of \openvpms\data\ folder - http://www.openvpms.org/forum/re-get-help-using-website-mysql-setup

Loading of AU Postcodes - http://www.openvpms.org/forum/postcode-and-suburbs

Re: installation misguides? and problem with postcode setup

You should be using:

cd bin
dataload.bat -f ../import/data/postcodesAU.xml

-Tim

Re: installation misguides? and problem with postcode setup

Okay Tim

I will flop the slashes from MS format to Unix format, and see what happens.

Thanks for the response

MatR

Re: installation misguides? and problem with postcode setup

Thanks for that pointer Tim - at least teh response from the system is better than my pitiful attempts.

Hmm - okay i am perplexed. That appeared to  run thru without issue, forward slashes required syntax for a mysql operation?

Hmm, maybe not. I have already manually entered some address details, Time to back those entries out and start again.

Okay, it is doing something - no idea what but there  seem to be a heck of a lot of screen messages scrolling up.

Question what happens if you load the postcodes twice? - do you exception errors or duplicate record errors?

On the gripping hand, seems it may be time to wipe the system clean and run a re-install from scratch, now i have a better appreciation of the process.

By the way, external access is working as well, with reasonable response more than likely limited by my internet connection

 

Openvpms.log - random sample

16:06:46,232 ERROR DataLoader,main:450 - Failed to save object, archetype=lookup.suburb from path=..\import\data\postcodesAU.xml, line=1432
org.openvpms.component.business.service.archetype.ArchetypeServiceException: Failed to save a collection of 1 objects.
 at org.openvpms.component.business.service.archetype.ArchetypeService.save(ArchetypeService.java:545)
 at org.openvpms.component.business.service.archetype.ArchetypeService.save(ArchetypeService.java:513)
 at org.openvpms.tools.data.loader.DataLoader.save(DataLoader.java:531)
 at org.openvpms.tools.data.loader.DataLoader.save(DataLoader.java:446)
 at org.openvpms.tools.data.loader.DataLoader.queue(DataLoader.java:408)
 at org.openvpms.tools.data.loader.DataLoader.load(DataLoader.java:377)
 at org.openvpms.tools.data.loader.DataLoader.load(DataLoader.java:169)
 at org.openvpms.tools.data.loader.StaxArchetypeDataLoader.processFile(StaxArchetypeDataLoader.java:239)
 at org.openvpms.tools.data.loader.StaxArchetypeDataLoader.load(StaxArchetypeDataLoader.java:159)
 at org.openvpms.tools.data.loader.StaxArchetypeDataLoader.main(StaxArchetypeDataLoader.java:197)
Caused by: org.openvpms.component.business.dao.im.common.IMObjectDAOException: Failed to save a collection of objects
 at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate.save(IMObjectDAOHibernate.java:191)
 at org.openvpms.component.business.service.archetype.ArchetypeService.save(ArchetypeService.java:542)
 ... 9 more
Caused by: org.springframework.dao.DataIntegrityViolationException: could not insert: [org.openvpms.component.business.dao.hibernate.im.lookup.LookupDOImpl]; SQL [insert into lookups (version, linkId, active, arch_short_name, arch_version, code, name, description, default_lookup) values (?, ?, ?, ?, ?, ?, ?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not insert: [org.openvpms.component.business.dao.hibernate.im.lookup.LookupDOImpl]
 at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:637)
 at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
 at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
 at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339)
 at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate$9$1.doInHibernate(IMObjectDAOHibernate.java:1086)
 at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
 at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339)
 at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate$9.doInTransaction(IMObjectDAOHibernate.java:1082)
 at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
 at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate.update(IMObjectDAOHibernate.java:1080)
 at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate.save(IMObjectDAOHibernate.java:183)
 ... 10 more
Caused by: org.hibernate.exception.ConstraintViolationException: could not insert: [org.openvpms.component.business.dao.hibernate.im.lookup.LookupDOImpl]
 at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)
 at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
 at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:64)
 at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2176)
 at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2656)
 at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:71)
 at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
 at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:321)
 at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204)
 at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:130)
 at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)
 at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)
 at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:117)
 at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
 at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:535)
 at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:527)
 at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:523)
 at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate.save(IMObjectDAOHibernate.java:991)
 at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate.save(IMObjectDAOHibernate.java:881)
 at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate.save(IMObjectDAOHibernate.java:897)
 at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate.access$100(IMObjectDAOHibernate.java:98)
 at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate$2.doInHibernate(IMObjectDAOHibernate.java:186)
 at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
 ... 18 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'lookup.suburb-DAIRYMANS_PLAINS_2630' for key 'arch_short_name'
 at sun.reflect.GeneratedConstructorAccessor48.newInstance(Unknown Source)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
 at java.lang.reflect.Constructor.newInstance(Unknown Source)
 at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
 at com.mysql.jdbc.Util.getInstance(Util.java:381)
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1015)
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
 at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
 at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
 at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
 at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
 at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2019)
 at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1937)
 at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1922)
 at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
 at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:94)
 at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:57)
 ... 38 more

Re: installation misguides? and problem with postcode setup

If you run the load twice, you'll get duplicate errors,  e.g.:

 Duplicate entry 'lookup.suburb-DAIRYMANS_PLAINS_2630' for key 'arch_short_name' 

These won't be inserted twice. It can depend on what you data are loading however. To avoid duplicates, only load datasets once.

-Tim

Re: installation misguides? and problem with postcode setup

I leave Tim to help you with the dataload side of stuff, however I will just make one comment on your installation.

C:\openvpms\data  is a directory you probably should have made during installation.

Here is how I installed openvpms

I created a directory 

{Drive}:\OPENVPMS\DATA and directed MYSQL to place its data there.  (Please note the OPENVPMS zip file does NOT contain any files that MYSQL needs to initial setup. the directory you directed MYSQL to install to actually contains the SQL files that you need to run on the MYSQL installation AFTER it has been setup...having those sql files in the data directory shouldnt create problems ...but I dont think its a great plan.

So I think the current thinking is 

 

C:\openvpms\current_release\  is where I copy the unziped openvpms.zip

but I also leave 

C:\openvpms\openvpms-release-1.5.1 intact 

I do this so if I completely screw up a report I am trying to adjust I have the original stored nice and nearby to restart my adjustments with

when the new openvpms release comes out 

it will unzip automatically to 

C:\openvpms\openvpms-release-1.6

which I will promptly copy to my current_release directory..

this means however I will be careful to not copy over any reports I may have customized and make ure I read patch notes carefully to see if there are changes to the reporting system that might require adjustments to my custom reports.

I can forsee a few problems

1. BACKUPS - mysql DOES not work well with backup solutions that use Volume shadow copy, the backups are usually invalid so you need to exclude the mysql data directory from backups and use an alternative solution. Read your backup solution instructions carefully so you know if this affects you.

2. Antivirus - as above often its wise to exclude the mysql data directory from antivirus program scanning. Again read the instructions to see if you need to do this manually.

keep in mind that while its running openvpms does care where you unzipped the file to...it doesnt access those files at all. All that matters is you put the .war file in the correct tomcat directory so it deploys and your mysql installation was done properly.

So in my implementation at least i have:- 

{drive}:\OPENVPMSDATA (this is NOT under the {drive}:\Openvpms folder because I want to be able to exclude it from backups etc)

{drive}:\Openvpms\current-release (and the directories that come out of the zip under it ) ie

{drive}:\Openvpms\current-release\bin
{drive}:\Openvpms\current-release\reports
{drive}:\Openvpms\current-release\conf
{drive}:\Openvpms\current-release\db
{drive}:\Openvpms\current-release\images
{drive}:\Openvpms\current-release\import
{drive}:\Openvpms\current-release\lib
{drive}:\Openvpms\current-release\update
{drive}:\Openvpms\current-release\webapps

{drive}:\Openvpms\openvpms-release-1.5.1 (sub directories as above).

{drive}:\Openvpms\openvpms-release-1.5

etc etc

Does that make it any clearer?

 

Ben

Re: installation misguides? and problem with postcode setup

Quoting Matr

"All went well until i reached the portion of the install guide MySQL Configuration, Startup Variables, innoDB Parameters, Data Directory. In the example given, the path to the data directory reads - C;\openvpms\data.

However there is no folder at that location."

I've only just discovered this thread, hence my late reply.

Sorry, I thought that most Windows users would understand that the ellipsis (...) indicates folder options and that clicking on it, the following window has an icon of folder-with-asterisk indicating that you can create a new folder.  I've now added a line advising users to create a data folder at the top of the tutorial and will add screenshots at the appropriate place within the MySQL setup section.

Thank you for your endorsement of my "misguide".  I look forward to your absolutely perfect, explicit  tutorials being uploaded in the near future.  Until then, my imperfect misguides will have to do. 

Yuri.

(trying to be part of the solution, not the problem)

Re: installation misguides? and problem with postcode setup

  I did notice much of the instructions were obsolete (at least for Precise Pangolin, and Debian Wheezy).  I've attached a script which I've bundled all the required changes into eg. mysql crashes unless the deprecated option "default-collation" is changed to "collation-server", updated from OpenOffice.org to LibreOffice etc...  I have noted things I'm unsure of.  It should be fine to run on a clean machine, but it isn't well tested, so use at your own risk.

AttachmentSize
Install_OpenVPMS.txt 6.28 KB

Re: installation misguides? and problem with postcode setup

Please feel free to update the documentation.

BTW you shouldn't need to start up LibreOffice - you should leave that to OpenVPMS. By default, OpenVPMS periodically restarts it in order to work around memory leaks.

-Tim

Syndicate content