• Welcome to KonaKart Community Forum. Please login or sign up.
 

Liferay Portlet - new Product error

Started by naeryeo, May 28, 2013, 04:47:50 pm

Previous topic - Next topic

naeryeo

Hello,

After many trials and errors I've successfully deployed both portlets on Liferay 6.1.2, by compiling with -DnoAXIS=true and -DforStruts1=true, but now I face another error:

I have created a new product, with the name Product 1, and filled all the required fields.
I am able to see it in the specified category, but on click it throws an ArrayIndexOutOfBoundsException with the following message:

28-May 15:39:24 ERROR (InsertTag.java:doEndTag:922) ServletException in '/WEB-INF/jsp/ProductDetailsBody.jsp': 1
org.apache.jasper.JasperException: An exception occurred processing JSP page /WEB-INF/jsp/ProductDetailsBody.jsp at line 137

134: <%if (name != null){%>
135: <%String[] names = name.split("\\.");%>
136: <%name = names[0];%>
137: <%String ext = names[1];%>
138: <%String imgSrc = request.getContextPath()+"/images"+"/"+name+"_"+i+"."+ext;%>
139: <a rel="img<%=i%>" href="javascript:;"><img src="<%=imgSrc%>" /></a>
140: <%}%>


The name is set for all 4 languages.
What am I missing?

Thank you,
naeryeo

trevor

Looks like you've given it an image name without an extension so the split doesn't work.