Skip to content
Justin Miranda edited this page Mar 12, 2015 · 8 revisions

If you have any issues with installing (or using) OpenBoxes, please send an email to support@openboxes.com. We will document all installation issues here, linking to relevant issue where necessary.

Error executing git describe

https://github.com/openboxes/openboxes/issues/30

grails.mail.enabled: 'false'
2015-03-12 18:45:58,335 [main] INFO cfg.Environment - Hibernate 3.3.1.GA
2015-03-12 18:45:58,350 [main] INFO cfg.Environment - hibernate.properties not found
2015-03-12 18:45:58,355 [main] INFO cfg.Environment - Bytecode provider name : javassist
2015-03-12 18:45:58,370 [main] INFO cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
[copy] Copying 1 file to /home/jmiranda.grails/1.3.7/projects/openboxes
2015-03-12 18:46:09,857 [main] INFO warehouse._Events - Setting build date, build number, and revision number ...
2015-03-12 18:46:09,869 [main] ERROR warehouse._Events - Error executing git describe 
java.io.IOException: Cannot run program "git": CreateProcess error=2, The system cannot find the file specified

Solution(s)

  • Install git (recommended)
  • Comment out line 42 in scripts/_Events.groovy (hack)

InvalidDataAccessResourceUsageException: could not execute query

https://github.com/openboxes/openboxes/issues/26 During initial installation, app throws "InvalidDataAccessResourceUsageException: could not execute query; SQL [select product0_.id from product product0_ where product0_.product_code is null or product0_.product_code='']

org.quartz.JobExecutionException: org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; SQL [select product0_.id as id39_, product0_.version as version39_, product0_.active as active39_, product0_.brand_name as brand4_39_, product0_.category_id as category5_39_, product0_.cold_chain as cold6_39_, product0_.controlled_substance as controlled7_39_, product0_.created_by_id as created8_39_, product0_.date_created as date9_39_, product0_.default_uom_id as default10_39_, product0_.description as descrip11_39_, product0_.essential as essential39_, product0_.hazardous_material as hazardous13_39_, product0_.last_updated as last14_39_, product0_.lot_control as lot15_39_, product0_.manufacturer as manufac16_39_, product0_.manufacturer_code as manufac17_39_, product0_.manufacturer_name as manufac18_39_, product0_.model_number as model19_39_, product0_.name as name39_, product0_.ndc as ndc39_, product0_.package_size as package22_39_, product0_.price_per_unit as price23_39_, product0_.product_code as product24_39_, product0_.reconditioned as recondi25_39_, product0_.serialized as serialized39_, product0_.unit_of_measure as unit27_39_, product0_.upc as upc39_, product0_.updated_by_id as updated29_39_, product0_.vendor as vendor39_, product0_.vendor_code as vendor31_39_, product0_.vendor_name as vendor32_39_ from product product0_ where product0_.product_code is null or product0_.product_code='']; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query [See nested exception: org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; SQL [select product0_.id as id39_, product0_.version as version39_, product0_.active as active39_, product0_.brand_name as brand4_39_, product0_.category_id as category5_39_, product0_.cold_chain as cold6_39_, product0_.controlled_substance as controlled7_39_, product0_.created_by_id as created8_39_, product0_.date_created as date9_39_, product0_.default_uom_id as default10_39_, product0_.description as descrip11_39_, product0_.essential as essential39_, product0_.hazardous_material as hazardous13_39_, product0_.last_updated as last14_39_, product0_.lot_control as lot15_39_, product0_.manufacturer as manufac16_39_, product0_.manufacturer_code as manufac17_39_, product0_.manufacturer_name as manufac18_39_, product0_.model_number as model19_39_, product0_.name as name39_, product0_.ndc as ndc39_, product0_.package_size as package22_39_, product0_.price_per_unit as price23_39_, product0_.product_code as product24_39_, product0_.reconditioned as recondi25_39_, product0_.serialized as serialized39_, product0_.unit_of_measure as unit27_39_, product0_.upc as upc39_, product0_.updated_by_id as updated29_39_, product0_.vendor as vendor39_, product0_.vendor_code as vendor31_39_, product0_.vendor_name as vendor32_39_ from product product0_ where product0_.product_code is null or product0_.product_code='']; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query]
at grails.plugin.quartz2.GrailsArtefactJob.execute(GrailsArtefactJob.java:66)

Solution

You can safely ignore this error. This is caused by the fact that a background process (Quartz job) attempts to run before the database has been completely initialized. During an initial installation the database creation process takes a few minutes and the delay for the Quartz job is set at 60 seconds. Therefore, when the Quartz job tries to execute the query it cannot find the product table and throws the error.

As soon as the application has completed the execution of the liquibase changesets you should restart the server so that the Quartz job has a chance to start up with the database fully created.

2015-03-12 12:44:38,542 [main] INFO bootstrap.BootStrap - Running liquibase changelog(s) ...
2015-03-12 12:44:38,601 [main] INFO bootstrap.BootStrap - Setting default schema to openboxes
2015-03-12 12:44:38,610 [main] INFO bootstrap.BootStrap - Product Version: 5.5.41-MariaDB-1ubuntu0.14.10.1-log
2015-03-12 12:44:38,610 [main] INFO bootstrap.BootStrap - Database Version: 5.5
2015-03-12 12:44:38,616 [main] INFO liquibase - Reading from `DATABASECHANGELOG`
2015-03-12 12:44:39,000 [main] INFO liquibase - Lock Database
2015-03-12 12:44:39,009 [main] INFO liquibase - Successfully acquired change log lock
...
2015-03-12 12:44:39,816 [main] INFO liquibase - Release Database Lock
2015-03-12 12:44:39,824 [main] INFO liquibase - Successfully released change log lock
2015-03-12 12:44:39,825 [main] INFO bootstrap.BootStrap - Finished running liquibase changelog(s)!
before killing the process

Migration failed for change set 0.5.x/alter-table-engine-innodb.xml::1351380063409::jmiranda:

2015-03-12 22:52:04,253 [main] ERROR context.GrailsContextLoader - Error executing bootstraps: liquibase.exception.MigrationFailedException: Migration failed for change set 0.5.x/alter-table-engine-innodb.xml::1351380063409::jmiranda:
Caused by: liquibase.exception.JDBCException: Error executing SQL ALTER TABLE `fulfillment` ENGINE=InnoDB

Solution

This is a bug - please email support@openboxes.com.

liquibase.exception.LockException: Could not acquire change log lock

org.codehaus.groovy.runtime.InvokerInvocationException: liquibase.exception.LockException: Could not acquire change log lock. Currently locked by jmiranda (192.168.1.1) since 3/12/15 6:11 PM
at grails.util.Environment.evaluateEnvironmentSpecificBlock(Environment.java:251)

Liquibase is a plugin that is used to create the database tables. When you first boot up the application it needs to create ALL database tables, which ends up taking a few minutes. You'll encounter this issue if the application is interrupted before the database changelog lock has been related by Liquibase.

Solution

Check to see if there's a database changelog lock

select * from DATABASECHANGELOGLOCK

Delete the database changelog lock

delete from DATABASECHANGELOGLOCK

Restart the application

grails run-app

Unable to load specified config location classpath:openboxes-config.groovy

Unable to load specified config location classpath:openboxes-config.groovy : class path resource [openboxes-config.groovy] cannot be opened because it does not exist
Unable to load specified config location classpath:openboxes-config.properties : class path resource [openboxes-config.properties] cannot be opened because it does not exist
Unable to load specified config location file:/home/jmiranda/.grails/openboxes-config.groovy : /home/jmiranda/.grails/openboxes-config.groovy (The system cannot find the file specified)

Solution

There are four (4) possible configuration file locations defined in Config.groovy. If there are only three (3) "Unable to load specified config location ... " messages then you can safely ignore this error. However, if you see four (4) of these message, then you haven't configured openboxes-config.properties file yet (see Installation Instructions).

Config.groovy

grails.config.locations = [ 
"classpath:${appName}-config.properties",
"classpath:${appName}-config.groovy",
"file:${userHome}/.grails/${appName}-config.properties",
"file:${userHome}/.grails/${appName}-config.groovy"
]

FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]

Error Message

org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
at org.grails.tomcat.TomcatServer.start(TomcatServer.groovy:212)

Solution

You may need to run upgrade or compile a few times before running the app.

grails upgrade
grails compile
grails run-app

java.net.BindException: Address already in use: JVM_Bind:8080

Error Message

java.net.BindException: Address already in use: JVM_Bind<null>:8080

Solution

grails -Dserver.port=8081 run-app

Or you can stop the process that is running on port 8080.