You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by bu...@apache.org on 2002/07/10 01:37:16 UTC

DO NOT REPLY [Bug 7639] - init( {java.util.Properties} ) fails to set Velocity & VelocityEngine properties

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7639>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7639

init( {java.util.Properties} ) fails to set Velocity & VelocityEngine properties





------- Additional Comments From valentine@library.ucsb.edu  2002-07-09 23:37 -------
Ok, I know I've got the right path in the context, but for some reason, 
velocity is not getting the information.
My "servlet" can find the file:
velocity.properties: velocity.properties
velocity.properties realpath: D:\ApacheTomcat4.0\webapps\webclient\velocity.prop
erties
Starting service Tomcat-Apache
Apache Tomcat/4.0.4
SampleServlet : template not found org.apache.velocity.exception.ResourceNotFoun
dException: Unable to find resource 'query_noframe.vm'

But for some reason, the file resource loader, cannot. Even though the code is 
identical.


two cases outlines below: First two fail, last one works.
For some reason, the file resource loaded in not seeing the paths.

JDK 1.4, TC4
Fail: Tue Jul 09 14:42:29 PDT 2002   [info] FileResourceLoader : adding path '.'
JDK 1.3_02
Works: Tue Jul 09 15:07:54 PDT 2002   [info] FileResourceLoader : adding 
path 'D:\ApacheTomcat4.0\webapps\webclient\templates'



Windows 2k
Apache 4.04, JDK 1.4-rc
file.resource.loader.path = D:\ApacheTomcat4.0\webapps\webclient\templates
or file.resource.loader.path = templates
Tue Jul 09 14:42:29 PDT 2002   [info] Default Properties File: 
org\apache\velocity\runtime\defaults\velocity.properties
Tue Jul 09 14:42:29 PDT 2002   [info] Resource manager initializing.
Tue Jul 09 14:42:29 PDT 2002   [info] Resource Loader Instantiated: 
org.apache.velocity.runtime.resource.loader.FileResourceLoader
Tue Jul 09 14:42:29 PDT 2002   [info] FileResourceLoader : initialization 
starting.
Tue Jul 09 14:42:29 PDT 2002   [info] FileResourceLoader : adding path '.'
Tue Jul 09 14:42:29 PDT 2002   [info] FileResourceLoader : initialization 
complete.
Tue Jul 09 14:42:29 PDT 2002   [info] Loaded Pluggable Directive: 
org.apache.velocity.runtime.directive.Literal
Tue Jul 09 14:42:29 PDT 2002   [info] Loaded Pluggable Directive: 
org.apache.velocity.runtime.directive.Macro
Tue Jul 09 14:42:29 PDT 2002   [info] Loaded Pluggable Directive: 
org.apache.velocity.runtime.directive.Parse
Tue Jul 09 14:42:29 PDT 2002   [info] Loaded Pluggable Directive: 
org.apache.velocity.runtime.directive.Include
Tue Jul 09 14:42:29 PDT 2002   [info] Loaded Pluggable Directive: 
org.apache.velocity.runtime.directive.Foreach
Tue Jul 09 14:42:30 PDT 2002   [info] Created: 20 parsers.
Tue Jul 09 14:42:30 PDT 2002   [info] Velocimacro : initialization starting.
Tue Jul 09 14:42:30 PDT 2002   [info] Velocimacro : adding VMs from VM library 
template : VM_global_library.vm
Tue Jul 09 14:42:30 PDT 2002  [error] ResourceManager : unable to find 
resource 'VM_global_library.vm' in any resource loader.
Tue Jul 09 14:42:30 PDT 2002   [info] Velocimacro : error using  VM library 
template VM_global_library.vm : 
org.apache.velocity.exception.ResourceNotFoundException: Unable to find 
resource 'VM_global_library.vm'
Tue Jul 09 14:42:30 PDT 2002   [info] Velocimacro :  VM library template macro 
registration complete.
Tue Jul 09 14:42:30 PDT 2002   [info] Velocimacro : allowInline = true : VMs 
can be defined inline in templates
Tue Jul 09 14:42:30 PDT 2002   [info] Velocimacro : allowInlineToOverride = 
false : VMs defined inline may NOT replace previous VM definitions
Tue Jul 09 14:42:30 PDT 2002   [info] Velocimacro : allowInlineLocal = false : 
VMs defined inline will be  global in scope if allowed.
Tue Jul 09 14:42:30 PDT 2002   [info] Velocimacro : messages on  : VM system 
will output logging messages
Tue Jul 09 14:42:30 PDT 2002   [info] Velocimacro : autoload off  : VM system 
will not automatically reload global library macros
Tue Jul 09 14:42:30 PDT 2002   [info] Velocimacro : initialization complete.
Tue Jul 09 14:42:30 PDT 2002   [info] Velocity successfully started.
Tue Jul 09 14:44:05 PDT 2002  [error] ResourceManager : unable to find 
resource 'query_noframe.vm' in any resource loader.Tue Jul 09 15:04:10 PDT 
2002  [debug] AvalonLogSystem initialized using logfile D:\ApacheTomcat4.0
\webapps\webclient\velocity.log
Tue Jul 09 15:04:10 PDT 2002   [info] Jakarta Velocity v1.2
Tue Jul 09 15:04:10 PDT 2002   [info] RuntimeInstance initializing.
Tue Jul 09 15:04:10 PDT 2002   [info] Default Properties File: 
org\apache\velocity\runtime\defaults\velocity.properties
Tue Jul 09 15:04:10 PDT 2002   [info] Resource manager initializing.
Tue Jul 09 15:04:10 PDT 2002   [info] Resource Loader Instantiated: 
org.apache.velocity.runtime.resource.loader.FileResourceLoader
Tue Jul 09 15:04:10 PDT 2002   [info] FileResourceLoader : initialization 
starting.
Tue Jul 09 15:04:10 PDT 2002   [info] FileResourceLoader : adding 
path 'D:\ApacheTomcat4.0\webapps\webclient\D:ApacheTomcat4.0webappswebclient
	emplates'
Tue Jul 09 15:04:10 PDT 2002   [info] FileResourceLoader : initialization 
complete.
Tue Jul 09 15:04:10 PDT 2002   [info] Loaded Pluggable Directive: 
org.apache.velocity.runtime.directive.Literal
Tue Jul 09 15:04:10 PDT 2002   [info] Loaded Pluggable Directive: 
org.apache.velocity.runtime.directive.Macro
Tue Jul 09 15:04:10 PDT 2002   [info] Loaded Pluggable Directive: 
org.apache.velocity.runtime.directive.Parse
Tue Jul 09 15:04:10 PDT 2002   [info] Loaded Pluggable Directive: 
org.apache.velocity.runtime.directive.Include
Tue Jul 09 15:04:10 PDT 2002   [info] Loaded Pluggable Directive: 
org.apache.velocity.runtime.directive.Foreach
Tue Jul 09 15:04:10 PDT 2002   [info] Created: 20 parsers.
Tue Jul 09 15:04:10 PDT 2002   [info] Velocimacro : initialization starting.
Tue Jul 09 15:04:10 PDT 2002   [info] Velocimacro : adding VMs from VM library 
template : VM_global_library.vm
Tue Jul 09 15:04:10 PDT 2002  [error] ResourceManager : unable to find 
resource 'VM_global_library.vm' in any resource loader.
Tue Jul 09 15:04:10 PDT 2002   [info] Velocimacro : error using  VM library 
template VM_global_library.vm : 
org.apache.velocity.exception.ResourceNotFoundException: Unable to find 
resource 'VM_global_library.vm'
Tue Jul 09 15:04:10 PDT 2002   [info] Velocimacro :  VM library template macro 
registration complete.
Tue Jul 09 15:04:10 PDT 2002   [info] Velocimacro : allowInline = true : VMs 
can be defined inline in templates
Tue Jul 09 15:04:10 PDT 2002   [info] Velocimacro : allowInlineToOverride = 
false : VMs defined inline may NOT replace previous VM definitions
Tue Jul 09 15:04:10 PDT 2002   [info] Velocimacro : allowInlineLocal = false : 
VMs defined inline will be  global in scope if allowed.
Tue Jul 09 15:04:10 PDT 2002   [info] Velocimacro : messages on  : VM system 
will output logging messages
Tue Jul 09 15:04:10 PDT 2002   [info] Velocimacro : autoload on  : VM system 
will automatically reload global library macros
Tue Jul 09 15:04:10 PDT 2002   [info] Velocimacro : initialization complete.
Tue Jul 09 15:04:10 PDT 2002   [info] Velocity successfully started.
Tue Jul 09 15:04:17 PDT 2002  [error] ResourceManager : unable to find 
resource 'query_noframe.vm' in any resource loader.


Apache 4.04, JDK 1.3_02 
file.resource.loader.path = templates
Tue Jul 09 15:07:54 PDT 2002  [debug] AvalonLogSystem initialized using logfile 
D:\ApacheTomcat4.0\webapps\webclient\velocity.log
Tue Jul 09 15:07:54 PDT 2002   [info] Jakarta Velocity v1.2
Tue Jul 09 15:07:54 PDT 2002   [info] RuntimeInstance initializing.
Tue Jul 09 15:07:54 PDT 2002   [info] Default Properties File: 
org\apache\velocity\runtime\defaults\velocity.properties
Tue Jul 09 15:07:54 PDT 2002   [info] Resource manager initializing.
Tue Jul 09 15:07:54 PDT 2002   [info] Resource Loader Instantiated: 
org.apache.velocity.runtime.resource.loader.FileResourceLoader
Tue Jul 09 15:07:54 PDT 2002   [info] FileResourceLoader : initialization 
starting.
Tue Jul 09 15:07:54 PDT 2002   [info] FileResourceLoader : adding 
path 'D:\ApacheTomcat4.0\webapps\webclient\templates'
Tue Jul 09 15:07:54 PDT 2002   [info] FileResourceLoader : initialization 
complete.
Tue Jul 09 15:07:54 PDT 2002   [info] Loaded Pluggable Directive: 
org.apache.velocity.runtime.directive.Literal
Tue Jul 09 15:07:54 PDT 2002   [info] Loaded Pluggable Directive: 
org.apache.velocity.runtime.directive.Macro
Tue Jul 09 15:07:54 PDT 2002   [info] Loaded Pluggable Directive: 
org.apache.velocity.runtime.directive.Parse
Tue Jul 09 15:07:54 PDT 2002   [info] Loaded Pluggable Directive: 
org.apache.velocity.runtime.directive.Include
Tue Jul 09 15:07:54 PDT 2002   [info] Loaded Pluggable Directive: 
org.apache.velocity.runtime.directive.Foreach
Tue Jul 09 15:07:54 PDT 2002   [info] Created: 20 parsers.
Tue Jul 09 15:07:54 PDT 2002   [info] Velocimacro : initialization starting.
Tue Jul 09 15:07:54 PDT 2002   [info] Velocimacro : adding VMs from VM library 
template : VM_global_library.vm
Tue Jul 09 15:07:54 PDT 2002   [info] Velocimacro : added new VM : 
#start_javascript( ) : source = VM_global_library.vm
Tue Jul 09 15:07:54 PDT 2002   [info] Velocimacro : added new VM : 
#adl_header_frame( ) : source = VM_global_library.vm
Tue Jul 09 15:07:54 PDT 2002   [info] Velocimacro : added new VM : 
#gaz_panel_frame( mw_query_url map_url gaz_coll ) : source = 
VM_global_library.vm
Tue Jul 09 15:07:54 PDT 2002   [info] Velocimacro : added new VM : 
#gaz_panel_noframe( mw_query_url map_url gaz_coll ) : source = 
VM_global_library.vm
Tue Jul 09 15:07:54 PDT 2002   [info] Velocimacro : added new VM : 
#orig_open_table( table_label ) : source = VM_global_library.vm
Tue Jul 09 15:07:54 PDT 2002   [info] Velocimacro : added new VM : 
#search_openForm_frame( mw_query_url ) : source = VM_global_library.vm
Tue Jul 09 15:07:54 PDT 2002   [info] Velocimacro : added new VM : 
#collection_menu_frame( num coll_param collection coll_array coll_names 
coll_urls coll_base_url onchange ) : source = VM_global_library.vm
Tue Jul 09 15:07:54 PDT 2002   [info] Velocimacro : added new VM : 
#option_and_or( num ) : source = VM_global_library.vm
Tue Jul 09 15:07:54 PDT 2002   [info] Velocimacro : added new VM : 
#option_geog_region_frame( ) : source = VM_global_library.vm
Tue Jul 09 15:07:54 PDT 2002   [info] Velocimacro : added new VM : 
#option_time_period( ) : source = VM_global_library.vm
Tue Jul 09 15:07:54 PDT 2002   [info] Velocimacro : added new VM : 
#option_adl_thesarus_menu( ) : source = VM_global_library.vm
Tue Jul 09 15:07:54 PDT 2002   [info] Velocimacro : added new VM : 
#option_adl_format_menu( ) : source = VM_global_library.vm
Tue Jul 09 15:07:54 PDT 2002   [info] Velocimacro : added new VM : #option_text
( words ) : source = VM_global_library.vm
Tue Jul 09 15:07:54 PDT 2002   [info] Velocimacro : added new VM : 
#gaz_option_text( words ) : source = VM_global_library.vm
Tue Jul 09 15:07:54 PDT 2002   [info] Velocimacro : added new VM : 
#option_originator_text( originator ) : source = VM_global_library.vm
Tue Jul 09 15:07:54 PDT 2002   [info] Velocimacro : added new VM : 
#option_identifier_text( identifier ) : source = VM_global_library.vm
Tue Jul 09 15:07:54 PDT 2002   [info] Velocimacro : added new VM : 
#option_noidentifier( ) : source = VM_global_library.vm
Tue Jul 09 15:07:54 PDT 2002   [info] Velocimacro : added new VM : 
#option_date_ranker( num ) : source = VM_global_library.vm
Tue Jul 09 15:07:54 PDT 2002   [info] Velocimacro : added new VM : 
#option_max_results_menu( num select max options ) : source = 
VM_global_library.vm
Tue Jul 09 15:07:54 PDT 2002   [info] Velocimacro : added new VM : 
#option_results_per_page_menu( num select options ) : source = 
VM_global_library.vm
Tue Jul 09 15:07:55 PDT 2002   [info] Velocimacro : added new VM : 
#search_closeForm( num action ) : source = VM_global_library.vm
Tue Jul 09 15:07:55 PDT 2002   [info] Velocimacro : added new VM : 
#orig_closeTable( ) : source = VM_global_library.vm
Tue Jul 09 15:07:55 PDT 2002   [info] Velocimacro : added new VM : 
#option_gaz_feature_menu( ) : source = VM_global_library.vm
Tue Jul 09 15:07:55 PDT 2002   [info] Velocimacro : added new VM : 
#option_notime( ) : source = VM_global_library.vm
Tue Jul 09 15:07:55 PDT 2002   [info] ResourceManager : found 
VM_global_library.vm with loader 
org.apache.velocity.runtime.resource.loader.FileResourceLoader
Tue Jul 09 15:07:55 PDT 2002   [info] Velocimacro :  VM library template macro 
registration complete.
Tue Jul 09 15:07:55 PDT 2002   [info] Velocimacro : allowInline = true : VMs 
can be defined inline in templates
Tue Jul 09 15:07:55 PDT 2002   [info] Velocimacro : allowInlineToOverride = 
false : VMs defined inline may NOT replace previous VM definitions
Tue Jul 09 15:07:55 PDT 2002   [info] Velocimacro : allowInlineLocal = false : 
VMs defined inline will be  global in scope if allowed.
Tue Jul 09 15:07:55 PDT 2002   [info] Velocimacro : messages on  : VM system 
will output logging messages
Tue Jul 09 15:07:55 PDT 2002   [info] Velocimacro : autoload on  : VM system 
will automatically reload global library macros
Tue Jul 09 15:07:55 PDT 2002   [info] Velocimacro : initialization complete.
Tue Jul 09 15:07:55 PDT 2002   [info] Velocity successfully started.
Tue Jul 09 15:08:02 PDT 2002  [error] VM #orig_open_table: error : too few 
arguments to macro. Wanted 1 got 0  -->
Tue Jul 09 15:08:02 PDT 2002   [info] ResourceManager : found query_noframe.vm 
with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader
Tue Jul 09 15:08:02 PDT 2002  [error] VM error : orig_open_table. Null AST

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>