error when I try to run archload.bat

Somebody can help me whit this error when I try to run archload.bat?

 

 

0 [main] ERROR org.hibernate.util.JDBCExceptionReporter  - Cannot create Poolabl
eConnectionFactory (Access denied for user 'openvpms'@'localhost' to database 'o
penvpms')
1262 [main] ERROR org.hibernate.util.JDBCExceptionReporter  - Cannot create Pool
ableConnectionFactory (Access denied for user 'openvpms'@'localhost' to database
 'openvpms')
1272 [main] ERROR org.hibernate.util.JDBCExceptionReporter  - Cannot create Pool
ableConnectionFactory (Access denied for user 'openvpms'@'localhost' to database
 'openvpms')
1402 [main] ERROR org.openvpms.tools.archetype.loader.ArchetypeLoader  - org.spr
ingframework.beans.factory.BeanCreationException: Error creating bean with name
'archetypeDescriptorCache' defined in file [C:\OpenVPMS\openvpms-release-1.5.1\b
in\..\conf\applicationContext.xml]: Instantiation of bean failed; nested excepti
on is org.springframework.beans.BeanInstantiationException: Could not instantiat
e bean class [org.openvpms.component.business.service.archetype.descriptor.cache
.ArchetypeDescriptorCacheDB]: Constructor threw exception; nested exception is o
rg.openvpms.component.business.dao.im.common.IMObjectDAOException: Failed to fin
d IMObjects for class org.openvpms.component.business.dao.hibernate.im.archetype
.AssertionTypeDescriptorDO with shortName: descriptor.assertionType and instance
Name: null.
org.springframework.beans.factory.BeanCreationException: Error creating bean wit
h name 'archetypeDescriptorCache' defined in file [C:\OpenVPMS\openvpms-release-
1.5.1\bin\..\conf\applicationContext.xml]: Instantiation of bean failed; nested
exception is org.springframework.beans.BeanInstantiationException: Could not ins
tantiate bean class [org.openvpms.component.business.service.archetype.descripto
r.cache.ArchetypeDescriptorCacheDB]: Constructor threw exception; nested excepti
on is org.openvpms.component.business.dao.im.common.IMObjectDAOException: Failed
 to find IMObjects for class org.openvpms.component.business.dao.hibernate.im.ar
chetype.AssertionTypeDescriptorDO with shortName: descriptor.assertionType and i
nstanceName: null.
        at org.springframework.beans.factory.support.ConstructorResolver.autowir
eConstructor(ConstructorResolver.java:288)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:291)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
an(AbstractBeanFactory.java:288)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:190)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.
preInstantiateSingletons(DefaultListableBeanFactory.java:580)
        at org.springframework.context.support.AbstractApplicationContext.finish
BeanFactoryInitialization(AbstractApplicationContext.java:895)
        at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:425)
        at org.springframework.context.support.FileSystemXmlApplicationContext.<
init>(FileSystemXmlApplicationContext.java:140)
        at org.springframework.context.support.FileSystemXmlApplicationContext.<
init>(FileSystemXmlApplicationContext.java:84)
        at org.openvpms.tools.archetype.loader.ArchetypeLoader.main(ArchetypeLoa
der.java:278)
Caused by: org.springframework.beans.BeanInstantiationException: Could not insta
ntiate bean class [org.openvpms.component.business.service.archetype.descriptor.
cache.ArchetypeDescriptorCacheDB]: Constructor threw exception; nested exception
 is org.openvpms.component.business.dao.im.common.IMObjectDAOException: Failed t
o find IMObjects for class org.openvpms.component.business.dao.hibernate.im.arch
etype.AssertionTypeDescriptorDO with shortName: descriptor.assertionType and ins
tanceName: null.
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:1
41)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy
.instantiate(SimpleInstantiationStrategy.java:108)
        at org.springframework.beans.factory.support.ConstructorResolver.autowir
eConstructor(ConstructorResolver.java:280)
        ... 14 more
Caused by: org.openvpms.component.business.dao.im.common.IMObjectDAOException: F
ailed to find IMObjects for class org.openvpms.component.business.dao.hibernate.
im.archetype.AssertionTypeDescriptorDO with shortName: descriptor.assertionType
and instanceName: null.
        at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate
.get(IMObjectDAOHibernate.java:458)
        at org.openvpms.component.business.service.archetype.descriptor.cache.Ar
chetypeDescriptorCacheDB.loadAssertionTypeDescriptors(ArchetypeDescriptorCacheDB
.java:84)
        at org.openvpms.component.business.service.archetype.descriptor.cache.Ar
chetypeDescriptorCacheDB.<init>(ArchetypeDescriptorCacheDB.java:74)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:1
26)
        ... 16 more
Caused by: org.springframework.jdbc.UncategorizedSQLException: Hibernate operati
on: Cannot open connection; uncategorized SQLException for SQL [???]; SQL state
[null]; error code [0]; Cannot create PoolableConnectionFactory (Access denied f
or user 'openvpms'@'localhost' to database 'openvpms'); nested exception is org.
apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory
(Access denied for user 'openvpms'@'localhost' to database 'openvpms')
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslat
or.translate(AbstractFallbackSQLExceptionTranslator.java:83)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslat
or.translate(AbstractFallbackSQLExceptionTranslator.java:80)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslat
or.translate(AbstractFallbackSQLExceptionTranslator.java:80)
        at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAcces
sException(HibernateAccessor.java:424)
        at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernate
AccessException(HibernateAccessor.java:410)
        at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(Hibern
ateTemplate.java:411)
        at org.springframework.orm.hibernate3.HibernateTemplate.execute(Hibernat
eTemplate.java:339)
        at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate
.execute(IMObjectDAOHibernate.java:1115)
        at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate
.executeQuery(IMObjectDAOHibernate.java:609)
        at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate
.get(IMObjectDAOHibernate.java:455)
        ... 23 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableCon
nectionFactory (Access denied for user 'openvpms'@'localhost' to database 'openv
pms')
        at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:855)
        at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
.java:540)
        at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.
getConnection(LocalDataSourceConnectionProvider.java:81)
        at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager
.java:446)
        at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.
java:167)
        at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatc
her.java:161)
        at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1577)
        at org.hibernate.loader.Loader.doQuery(Loader.java:696)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Lo
ader.java:259)
        at org.hibernate.loader.Loader.doList(Loader.java:2232)
        at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2161)
        at org.hibernate.loader.Loader.list(Loader.java:2121)
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.ja
va:363)
        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java
:196)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1149)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
        at org.openvpms.component.business.dao.hibernate.im.IMObjectDAOHibernate
$6.doInHibernate(IMObjectDAOHibernate.java:641)
        at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(Hibern
ateTemplate.java:406)
        ... 27 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access den
ied for user 'openvpms'@'localhost' to database 'openvpms'
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
        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:1030)
        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.checkErrorPacket(MysqlIO.java:910)
        at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3923)
        at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1273)
        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2031)
        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
:282)
        at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driv
erConnectionFactory.java:37)
        at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(Poolable
ConnectionFactory.java:290)
        at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Bas
icDataSource.java:877)
        at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:851)
        ... 45 more

Comment viewing options

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

Re: error when I try to run archload.bat

The openvpms user doesn't have permissions to connect to the database.

This user gets set up by the createdb.sql script. See section 13. OpenVPMS Database Setup of http://www.openvpms.org/documentation/installing-openvpms-windows-7-comp... for more details.

-Tim

Re: error when I try to run archload.bat

I'm trying to update 1.5.1 to 1.6.beta-2 and get the same error message when I run archload.bat from the c:\openvpms-release-1.6-beta-2\bin folder: I've tried running it directly by double-click and also from a command prompt window in the bin folder. I've tried it with both Tomcat on and off.  I'm obviously missing something here.

Yuri.

Re: error when I try to run archload.bat

If you've changed the default connection properties, or changed the the password for the openvpms user on the database, you need to reflect this in the <OPENVPMS_HOME>/conf/hibernate.properties file.

The relevant properties are:

 hibernate.connection.url=jdbc:mysql://localhost:3306/openvpms
hibernate.connection.username=openvpms
hibernate.connection.password=openvpms 

Re: error when I try to run archload.bat

Hi Tim

Sorry for tardy reply, the internet's down at work (thanks a lot, Optus! whose definition of "available" is "maybe in three weeks"), so have to reply at home.

I've changed nothing since installing v1.4 a year ago, then updating to v1.5.1 in March. Username and pwd are still both openvpms.  Actually looking at my errorlog.txt, it's a bit different to jrivera's (I'd looked at the 14, 16, 23, ...27,...45 more etc and thought it was the same), so I've attached it here.

v1.5.1 continues to work fine on this machine (I was planning on using my "demo/educational" machine to evaluate v1.6.b2 before any thoughts of rolling it out on the work server).

Yuri.

AttachmentSize
errorlog.txt 9.27 KB

Re: error when I try to run archload.bat

The relevant error is:

Cannot load JDBC driver class 'com.mysql.jdbc.Driver'

You simply need to copy the mysql JDBC driver jar to the <OPENVPMS_HOME>/lib

-Tim

Re: error when I try to run archload.bat

Hi,

I think you may have fogotten to copy the mysql jar file into the OpenVPMS release lib folder. 

Cheers Tony

Syndicate content