Hi all;

Sorry if this is a repeat message. I have been trying to post this few times and I don't see it posted so I am not sure why it is not getting into the mailing list.

-----

I have been trying out AndroMDA for about a month and got to a point where I would like to use more extensive menu structures in my web application in a horizontal Navigation Bar like style instead of the side-bar style in the car rental example (which is a great tutorial example by the way). So after poking around I saw that in the cartridge profile and in the Velocity template for struts-config.xml there is a reference to the struts menu so I added the commented out struts menu template and the struts-config.xml reference (through merge points via "Bpm4StrutsMergeMappings.xml" mapping among other merge-points mappings.

What I get is a Null-pointer exception! Here is a small extract from the bpm4struts log-file:

---------------------------------- Exception error below

---------------------------------------

INFO 2005-04-24 18:02:59,608 - Velocimacro : added new VM : #renderMenuItem( item indent ) : source = templates/bpm4struts/configuration/menu-config.xml.vsl

INFO 2005-04-24 18:02:59,608 - VM #renderMenuItem: error : too few arguments to macro. Wanted 2 got 0 INFO 2005-04-24 18:02:59,608 - ResourceManager : found templates/bpm4struts/configuration/menu-config.xml.vsl with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader

INFO 2005-04-24 18:02:59,608 - RHS of #set statement is null. Context will not be modified. templates/bpm4struts/configuration/menu-config.xml.vsl [line 4, column 1] INFO 2005-04-24 18:02:59,608 -

org.apache.velocity.runtime.exception.ReferenceException: reference : template = templates/bpm4struts/configuration/menu-config.xml.vsl [line 33,column 21] : $applicationUseCase.titleKey is not a valid reference. INFO 2005-04-24 18:02:59,608 -

org.apache.velocity.runtime.exception.ReferenceException: reference : template = templates/bpm4struts/configuration/menu-config.xml.vsl [line 33,column 58] : $applicationUseCase.titleKey is not a valid reference. INFO 2005-04-24 18:02:59,608 -

org.apache.velocity.runtime.exception.ReferenceException: reference : template = templates/bpm4struts/configuration/menu-config.xml.vsl [line 33,column 97] : $applicationUseCase.onlineHelpKey is not a valid reference. INFO 2005-04-24 18:02:59,608 - Method listEnumeration threw exception for reference $bpmUtils in template templates/bpm4struts/configuration/menu-config.xml.vsl at [34,25]

--------------------------------- End of Exception Error

---------------------------------------

Obviously the problem starts in the menu-config.xml.vsl when setting:

#set ($root = $applicationUseCase.applicationHierarchyRoot)

For some reason $applicationUseCase is not set properly even if the template in my merge point mapping is the exact copy of the original template from "andromeda-cartridge.xml" which is:

<template

path="templates/bpm4struts/configuration/menu-config.xml.vsl"

outputPattern="menu-config.xml"

outlet="configuration"

overwrite="true"

outputToSingleFile="true">

<modelElements variable="applicationUseCase">

<modelElement>

<type name="org.andromda.cartridges.bpm4struts.metafacades.StrutsUseCase">

<property name="applicationUseCase"/>

</type>

</modelElement>

</modelElements>

</template>

Your help is appreciate specially if you have used struts menu successfully. BTW, I have looked through the messages in this mailing list and in the developer's list and could not find a reference or a bug regarding the use of struts menu so I am assuming it should work. It also possible that I have missed another something.

Thanks in advance.

Safaaa Hashim

Email: [EMAIL PROTECTED]

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Reply via email to