Having problem converting String to Long

I am setting a property in a useBean
and I need to convert String to Long

but get the following exception

JSPG0122E: Unable to parse EL function ${Long.parseLong(orderObject)}.

      at com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.validateElFunction(ValidateVisitor.java:1298)

<wcbase:useBean id="orderShippingModeList" classname="com.allenedmonds.commerce.order.beans.OrderShippingModeListDataBean">
	<c:set target="${orderShippingModeList}" property="orderId" value="${Long.parseLong(orderObject)}"/>
	<c:set target="${orderShippingModeList}" property="calculateShippingCharge" value="true"/>
	<c:set target="${orderShippingModeList}" property="calculateShippingAdjustment" value="true"/>
	<c:set target="${orderShippingModeList}" property="resolveFulfillmentCenter" value="false"/>

Open in new window

Who is Participating?
cypher_punkConnect With a Mentor Commented:
try  this:

String str;
Long l;
l = Long.parseLong(str);

It will work...
Check the value of orderObject to ensure that you're passing a proper value
You need to cast to String, as in

Long.parseLong((String) orderObject)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.