on 07-14-2016 7:31 PM
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, .
Hi, This is giving an exception while calling result.getResult().get(0); method.
Thank You, Manohar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
7 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.