velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam" <adam.p.reyno...@gmail.com>
Subject DataSourceResourceLoader error when initializing Velocity runtime engine
Date Mon, 23 Feb 2009 07:25:56 GMT
Hi All,

I am attemping to incorporate velocity into a EJB3 application.

Initializing the velocity runtime engine results in  results in the
following error accessing the datasource.

The Velocity log indicates that the properties were loaded ok.

I have accessing the same table successfully through  Java Persistence API.

Any help would be much appreciated.

Thanks,
Adam


velocity.log as follows:
2009-02-23 14:59:09,676 - Default ResourceManager initializing. (class
org.apache.velocity.runtime.resource.ResourceManagerImpl)
2009-02-23 14:59:09,691 - ResourceLoader instantiated:
org.apache.velocity.runtime.resource.loader.DataSourceResourceLoader
2009-02-23 14:59:09,691 - DataSourceResourceLoader: using "jdbc/mydb"
datasource with table "velocity_template"
2009-02-23 14:59:09,691 - DataSourceResourceLoader: using columns "name",
"content" and "last_modified_date"
2009-02-23 14:59:09,738 - ResourceCache: initialized (class
org.apache.velocity.runtime.resource.ResourceCacheImpl)
2009-02-23 14:59:09,738 - Loaded System Directive:
org.apache.velocity.runtime.directive.Literal
2009-02-23 14:59:09,754 - Loaded System Directive:
org.apache.velocity.runtime.directive.Macro
2009-02-23 14:59:09,754 - Loaded System Directive:
org.apache.velocity.runtime.directive.Parse
2009-02-23 14:59:09,769 - Loaded System Directive:
org.apache.velocity.runtime.directive.Include
2009-02-23 14:59:09,769 - Loaded System Directive:
org.apache.velocity.runtime.directive.Foreach
2009-02-23 14:59:09,863 - Created '20' parsers.
2009-02-23 14:59:09,910 - Velocimacro : "velocimacro.library" is not set.
Trying default library: VM_global_library.vm
2009-02-23 14:59:09,926 - DataSourceResourceLoader: database problem while
getting resource 'VM_global_library.vm':
org.postgresql.util.PSQLException: ERROR: relation "velocity_template" does
not exist


velocity.properties:
resource.loader = ds
ds.resource.loader.public.name = DataSource
ds.resource.loader.description = Velocity DataSource Resource Loader
ds.resource.loader.class =
org.apache.velocity.runtime.resource.loader.DataSourceResourceLoader
ds.resource.loader.resource.datasource = jdbc/mydb
ds.resource.loader.resource.table = velocity_template
ds.resource.loader.resource.keycolumn = name
ds.resource.loader.resource.templatecolumn = content
ds.resource.loader.resource.timestampcolumn = last_modified_date
ds.resource.loader.cache = false
ds.resource.loader.modificationCheckInterval = 60
runtime.log = velocity.log

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message