You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Elisabetta Zamorani <ez...@sodalia.it> on 2002/06/13 16:16:15 UTC

org.apache.velocity.runtime.exception.ReferenceException:

I have some (I hope) configuration problems with velocity.
I had some problems while migrating from component test to integration
test environment.
As I ran my component test everything went OK.
The velocity.log file reported.

Tue Jun 11 18:36:12 CEST 2002  [debug] AvalonLogSystem initialized using
logfile
/sf4/sasf/dev/NOICOM-Custom/cmp/Activators/cmp/EMail/src/velocity.log
Tue Jun 11 18:36:12 CEST 2002   [info] Jakarta Velocity v1.2
Tue Jun 11 18:36:12 CEST 2002   [info] RuntimeInstance initializing.
Tue Jun 11 18:36:12 CEST 2002   [info] Default Properties File:
org/apache/velocity/runtime/defaults/velocity.properties
Tue Jun 11 18:36:12 CEST 2002   [info] Resource manager initializing.
Tue Jun 11 18:36:12 CEST 2002   [info] Resource Loader Instantiated:
org.apache.velocity.runtime.resource.loader.FileResourceLoader
Tue Jun 11 18:36:12 CEST 2002   [info] FileResourceLoader :
initialization starting.
Tue Jun 11 18:36:12 CEST 2002   [info] FileResourceLoader : adding path
'/sf4/sasf/NOICOM/NOICOM-Custom/cmp/Activators/cmp/EMail/conf'
Tue Jun 11 18:36:12 CEST 2002   [info] FileResourceLoader :
initialization complete.
Tue Jun 11 18:36:12 CEST 2002   [info] Loaded Pluggable Directive:
org.apache.velocity.runtime.directive.Literal
Tue Jun 11 18:36:12 CEST 2002   [info] Loaded Pluggable Directive:
org.apache.velocity.runtime.directive.Macro
Tue Jun 11 18:36:12 CEST 2002   [info] Loaded Pluggable Directive:
org.apache.velocity.runtime.directive.Parse
Tue Jun 11 18:36:12 CEST 2002   [info] Loaded Pluggable Directive:
org.apache.velocity.runtime.directive.Include
Tue Jun 11 18:36:12 CEST 2002   [info] Loaded Pluggable Directive:
org.apache.velocity.runtime.directive.Foreach
Tue Jun 11 18:36:12 CEST 2002   [info] Created: 20 parsers.
Tue Jun 11 18:36:12 CEST 2002   [info] Velocimacro : initialization
starting.
Tue Jun 11 18:36:12 CEST 2002   [info] Velocimacro : adding VMs from VM
library template : VM_global_library.vm
Tue Jun 11 18:36:12 CEST 2002  [error] ResourceManager : unable to find
resource 'VM_global_library.vm' in any resource loader.
Tue Jun 11 18:36:12 CEST 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 Jun 11 18:36:12 CEST 2002   [info] Velocimacro :  VM library
template macro registration complete.
Tue Jun 11 18:36:12 CEST 2002   [info] Velocimacro : allowInline = true
: VMs can be defined inline in templates
Tue Jun 11 18:36:12 CEST 2002   [info] Velocimacro :
allowInlineToOverride = false : VMs defined inline may NOT replace
previous VMdefinitions
Tue Jun 11 18:36:12 CEST 2002   [info] Velocimacro : allowInlineLocal =
false : VMs defined inline will be  global in scope if allowed.
Tue Jun 11 18:36:12 CEST 2002   [info] Velocimacro : messages on  : VM
system will output logging messages
Tue Jun 11 18:36:12 CEST 2002   [info] Velocimacro : autoload off  : VM
system will not automatically reload global library macros
Tue Jun 11 18:36:12 CEST 2002   [info] Velocimacro : initialization
complete.
Tue Jun 11 18:36:12 CEST 2002   [info] Velocity successfully started.
Tue Jun 11 18:36:12 CEST 2002   [info] ResourceManager : found
installa_CPE_body.vm with loader org.apache.velocity.runtime.resource
.loader.FileResourceLoader
Tue Jun 11 18:36:12 CEST 2002  [error] RHS of #set statement is null.
Context will not be modified. installa_CPE_body.vm [line 1, column 1]
Tue Jun 11 18:36:12 CEST 2002  [error] RHS of #set statement is null.
Context will not be modified. installa_CPE_body.vm [line 2, column 1]

My output text was OK.

In the component test environment I had my java files in

HOME_DIR/cmp/Activators/cmp/EMail/src/PACKAGE_DIR/*.java

the shell script which launches the java virtual machine in
HOME_DIR/cmp/Activators/cmp/EMail/src/launchActv.sh

my  jar file in
HOME_DIR/cmp/Activators/lib/sasfEMAactv.jar
(this last path is contained in the CLASSPATH)

the .vm file  is in
HOME_DIR/cmp/Activators/EMail/conf/myTemplate.vm

As I ran the application I found the velocity.log file in
HOME_DIR/cmp/Activators/cmp/EMail/src/


In the installation environment I got a wrong output
( I see my parameters in the macro) with the subsequent trace:

hu Jun 13 13:40:36 CEST 2002  [debug] AvalonLogSystem initialized using
logfile /WORM/NFCore_1.1.6/NetFulfill_2.1/scripts/ve
locity.log
Thu Jun 13 13:40:36 CEST 2002   [info] Jakarta Velocity v1.2
Thu Jun 13 13:40:36 CEST 2002   [info] RuntimeInstance initializing.
Thu Jun 13 13:40:36 CEST 2002   [info] Default Properties File:
org/apache/velocity/runtime/defaults/velocity.properties
Thu Jun 13 13:40:36 CEST 2002   [info] Resource manager initializing.
Thu Jun 13 13:40:36 CEST 2002   [info] Resource Loader Instantiated:
org.apache.velocity.runtime.resource.loader.FileResource
Loader
Thu Jun 13 13:40:36 CEST 2002   [info] FileResourceLoader :
initialization starting.
Thu Jun 13 13:40:36 CEST 2002   [info] FileResourceLoader : adding path
'/WORM/NFCore_1.1.6/NetFulfill_2.1/Activators/EMail/c
onf'
Thu Jun 13 13:40:36 CEST 2002   [info] FileResourceLoader :
initialization complete.
Thu Jun 13 13:40:36 CEST 2002   [info] Loaded Pluggable Directive:
org.apache.velocity.runtime.directive.Literal
Thu Jun 13 13:40:36 CEST 2002   [info] Loaded Pluggable Directive:
org.apache.velocity.runtime.directive.Macro
Thu Jun 13 13:40:36 CEST 2002   [info] Loaded Pluggable Directive:
org.apache.velocity.runtime.directive.Parse
Thu Jun 13 13:40:36 CEST 2002   [info] Loaded Pluggable Directive:
org.apache.velocity.runtime.directive.Include
Thu Jun 13 13:40:36 CEST 2002   [info] Loaded Pluggable Directive:
org.apache.velocity.runtime.directive.Foreach
Thu Jun 13 13:40:36 CEST 2002   [info] Created: 20 parsers.
Thu Jun 13 13:40:36 CEST 2002   [info] Velocimacro : initialization
starting.
Thu Jun 13 13:40:36 CEST 2002   [info] Velocimacro : adding VMs from VM
library template : VM_global_library.vm
Thu Jun 13 13:40:36 CEST 2002  [error] ResourceManager : unable to find
resource 'VM_global_library.vm' in any resource loade
r.
Thu Jun 13 13:40:36 CEST 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'
Thu Jun 13 13:40:36 CEST 2002   [info] Velocimacro :  VM library
template macro registration complete.
Thu Jun 13 13:40:36 CEST 2002   [info] Velocimacro : allowInline = true
: VMs can be defined inline in templates
Thu Jun 13 13:40:36 CEST 2002   [info] Velocimacro :
allowInlineToOverride = false : VMs defined inline may NOT replace
previous VM definitions
Thu Jun 13 13:40:36 CEST 2002   [info] Velocimacro : allowInlineLocal =
false : VMs defined inline will be  global in scope if allowed.
Thu Jun 13 13:40:36 CEST 2002   [info] Velocimacro : messages on  : VM
system will output logging messages
Thu Jun 13 13:40:36 CEST 2002   [info] Velocimacro : autoload off  : VM
system will not automatically reload global library macros
Thu Jun 13 13:40:36 CEST 2002   [info] Velocimacro : initialization
complete.
Thu Jun 13 13:40:36 CEST 2002   [info] Velocity successfully started.
Thu Jun 13 13:40:37 CEST 2002   [info] ResourceManager : found
installa_CPE_body.vm with loader
org.apache.velocity.runtime.resource.loader.FileResourceLoader
Thu Jun 13 13:40:37 CEST 2002  [error] RHS of #set statement is null.
Context will not be modified. installa_CPE_body.vm [line 1, column 1]
Thu Jun 13 13:40:37 CEST 2002  [error] RHS of #set statement is null.
Context will not be modified. installa_CPE_body.vm [line 2, column 1]
Thu Jun 13 13:40:37 CEST 2002  [error] RHS of #set statement is null.
Context will not be modified. installa_CPE_body.vm [line 3, column 1]
Thu Jun 13 13:40:37 CEST 2002  [error] RHS of #set statement is null.
Context will not be modified. installa_CPE_body.vm [line 4, column 1]
Thu Jun 13 13:40:37 CEST 2002   [warn]
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = installa_CPE_body.vm [line 9,column 9] :
$body.getNumero_Ordine_Noicom() is not a valid reference.
Thu Jun 13 13:40:37 CEST 2002   [warn]
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = installa_CPE_body.vm [line 11,column 11] :
$body.getTipo_CPE() is not a valid reference.
Thu Jun 13 13:40:37 CEST 2002   [warn]
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = installa_CPE_body.vm [line 13,column 15] :
$body.getTipologia_Richiesta() is not a valid reference.
Thu Jun 13 13:40:37 CEST 2002   [warn]
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = installa_CPE_body.vm [line 20,column 18] : $body.getName() is
not a valid reference.
Thu Jun 13 13:40:37 CEST 2002   [warn]
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = installa_CPE_body.vm [line 21,column 25] :
$body.getNamecontact() is not a valid reference.
Thu Jun 13 13:40:37 CEST 2002   [warn]
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = installa_CPE_body.vm [line 22,column 12] : $body.getAddress()
is not a valid reference.
Thu Jun 13 13:40:37 CEST 2002   [warn]
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = installa_CPE_body.vm [line 23,column 6] : $body.getZipattr()
is not a valid reference.
Thu Jun 13 13:40:37 CEST 2002   [warn]
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = installa_CPE_body.vm [line 24,column 9] :
$body.getLocalitycontact() is not a valid reference.
Thu Jun 13 13:40:37 CEST 2002   [warn]
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = installa_CPE_body.vm [line 25,column 12] :
$body.getProvinceattr() is not a valid reference.
Thu Jun 13 13:40:37 CEST 2002   [warn]
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = installa_CPE_body.vm [line 26,column 11] :
$body.getPhonecontact() is not a valid reference.
Thu Jun 13 13:40:37 CEST 2002   [warn]
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = installa_CPE_body.vm [line 27,column 6] :
$body.getFaxcontact() is not a valid reference.
Thu Jun 13 13:40:37 CEST 2002   [warn]
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = installa_CPE_body.vm [line 28,column 12] :
$body.getMobilecontact() is not a valid reference.
Thu Jun 13 13:40:37 CEST 2002   [warn]
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = installa_CPE_body.vm [line 29,column 9] :
$body.getEmailcontact() is not a valid reference.
Thu Jun 13 13:40:37 CEST 2002   [warn]
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = installa_CPE_body.vm [line 35,column 15] :
$body.getLogin_Utente() is not a valid reference.
Thu Jun 13 13:40:37 CEST 2002   [warn]
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = installa_CPE_body.vm [line 36,column 11] :
$body.getPassword() is not a valid reference.

The installation environment is set as follows:

the shell script which launches the java virtual machine  in
INSTALLATION_HOME/Activators/scripts/launchActv.sh

the jar file with the application in
INSTALLATION_HOME/lib/sasfEMA.jar
(this  path is contained in the CLASSPATH)

the .vm file are  in
INSTALLATION_HOME/Activators/EMail/conf/*.vm

As I ran the application I expected to find velocity.log file in
INSTALLATION_HOME/Activators/scripts/
from where I launched the java, but instead I found it in

INSTALLATION_HOME/scripts/

which is a general scripts directory which has nothing to do with my
component directories!
Why is the log file there? Has this anything to do with the fact that I
got a wrong output?
What should I do?

Please, please, answer me...
Thank you very much



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