KonaKart Community Forum

Installation / Configuration => Using KonaKart as a Portlet => Topic started by: naeryeo on May 28, 2013, 04:47:50 pm

Title: Liferay Portlet - new Product error
Post by: naeryeo on May 28, 2013, 04:47:50 pm
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
Title: Re: Liferay Portlet - new Product error
Post by: trevor on May 28, 2013, 05:26:33 pm
Looks like you've given it an image name without an extension so the split doesn't work.