java.lang.IllegalArgumentException: The path of an ForwardCo

Use this forum for questions regarding adoption and functionality of OpenEMM

Moderator: moderator

pixus
Posts: 10
Joined: Tue Dec 04, 2012 4:53 pm

java.lang.IllegalArgumentException: The path of an ForwardCo

Post by pixus »

Hello Everyone,
I'm trying the ScriptActions in the documentation.
In that case I was trying the one Example to load all customer data for given email address:

Code: Select all

$Customer.loadCustDBStructure()
$Customer.resetCustParameters()
$Customer.setCustomerID(0)
#set($custId=$Customer.findByKeyColumn("username", "myUsername"))
#set($requestParameters = $ScriptHelper.newHashMap().putAll($Customer.getCustomerDataFromDb()))
But I get the following error, made by my last code row.
java.lang.IllegalArgumentException: The path of an ForwardConfig cannot be null

In fact, without the last code row, it works fine and the CustomerId obtained is the correct one.

Where I'm wrong?
Thanks you!
pixus
Posts: 10
Joined: Tue Dec 04, 2012 4:53 pm

Re: java.lang.IllegalArgumentException: The path of an Forwa

Post by pixus »

of course, the solution.

It just needs to use a different variable name instead of "$requestParameters" in this code line

Code: Select all

#set($requestParameters = $ScriptHelper.newHashMap().putAll($Customer.getCustomerDataFromDb()))
with this, no error

Code: Select all

#set([b]$theNameYouPrefer[/b] = $ScriptHelper.newHashMap().putAll($Customer.getCustomerDataFromDb()))
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: java.lang.IllegalArgumentException: The path of an Forwa

Post by maschoff »

$requestParameters is a predefined variable which holds all parameters of the current request. In general you should not overwrite this vaiable but use it to read or write single request parameters (see first lines of ScriptActions documentation).
OpenEMM Maintainer
Post Reply