Skip to Content
author's profile photo Former Member
Former Member

java.lang.IllegalArgumentException: invalid pks [10] - unknown typecode 0

Hi Experts, I'm trying to fire Flexible Search Query from DAO layer my query is something like "SELECT {loyaltypoints},{redeemedloyaltypoints} FROM {LoyaltyUser} WHERE {uid} =?uid" it is throwing me like unknown type code but my type code is proper. I see the stack-trace message like "SEVERE: Servlet.service() for servlet [DispatcherServlet] in context with path [/store] threw excepti on [Request processing failed; nested exception is java.lang.IllegalArgumentException: invalid pks [1 0] - unknown typecode 0] with root cause java.lang.IllegalArgumentException: invalid pks [10] - unknown typecode 0 at de.hybris.platform.core.WrapperFactory.getCachedItems(WrapperFactory.java:304) at de.hybris.platform.core.LazyLoadItemList.loadPage(LazyLoadItemList.java:230) at de.hybris.platform.servicelayer.search.impl.LazyLoadModelList.loadPage(LazyLoadModelList.java)"

my items.xml looks like <itemtype code="LoyaltyUser" extends="Customer" autocreate="true" generate="true" jaloclass="de.hybris.merchandise.core.jalo.LoyaltyUser"> <deployment table="LoyaltyUsers" typecode="10010"/> <attributes> <attribute generate="true" autocreate="true" qualifier="loyaltypoints" type="java.lang.Integer" > <description>Loyalty points given for each purchase</description> <modifiers read="true" write="true" search="true" optional="true" /> <defaultvalue>Integer.valueOf(0)</defaultvalue> </attribute> <attribute generate="true" autocreate="true" qualifier="redeemedloyaltypoints" type="java.lang.Integer" > <description>Redeemed Loyalty points For a customer</description> <modifiers read="true" write="true" search="true" optional="true" /> <defaultvalue>Integer.valueOf(0)</defaultvalue> <persistence type="property"/> </attribute>
</attributes> </itemtype>

Could anyone help me out from this issue.

Thank You, .

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 15, 2016 at 10:19 AM

    Hi, This is giving an exception while calling result.getResult().get(0); method.

    Thank You, Manohar.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 15, 2016 at 08:41 AM

    does your query work fine in hac? can you see the type in hmc? you can also see the data for the type in hmc. BTW you created a deployment for the type extending Customer which means it creates a new table with Customer type attributes. New customer registrations will not be saved to your new table.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Abdul, Thank You for your reply. Query is working fine from the hac, I tried checking the Type from the hmc It was available, I also verified data which was persisted for my Type it was saved successfully I'm able to see the data from hmc. Yeah it will create a new table which will be used for my customized functionality. did you experienced this issue anytime in your past experience?

      Thank You, Manohar.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.