GenericEntityException causing code dump on ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

GenericEntityException causing code dump on ftl

Sayoke Shome

This is an error trace which comes some times as code dump on ftl.

 

As per my knowledge GenericEntityException comes when the entity is not
present. But present condition and display suggests entity is very much
present.

Can you please tell what are the other reasons which may cause
"org.ofbiz.entity.GenericEntityException" . Also can you tell what may
be the cause of this code dump?

 

"Option" : Option is instance of ConfigOption Class.

 

Method public org.ofbiz.entity.GenericValue
org.ofbiz.product.config.ProductConfigWrapper$ConfigOption.getComponentP
roduct(int) throws org.ofbiz.entity.GenericEntityException threw an
exception when invoked on ConfigOption : configOption =
[GenericEntity:ProductConfigOption][configItemId,CON-30002-R1(java.lang.
String)][configOptionId,CON-20003-R1(java.lang.String)][configOptionName
,1471 Extra(java.lang.String)][createdStamp,2007-01-09
16:09:10.707633(java.sql.Timestamp)][createdTxStamp,2007-01-09
16:09:10.707633(java.sql.Timestamp)][description,1471
Extra(java.lang.String)][lastUpdatedStamp,2007-01-09
16:09:10.707633(java.sql.Timestamp)][lastUpdatedTxStamp,2007-01-09
16:09:10.707633(java.sql.Timestamp)][longDescription,null()][sequenceNum
,1(java.lang.Long)][tellMeMore,null()][tellMoreText,null()],
optionsPriceMap = {RECURRING_CHARGE=1.5}, componentList =
[[GenericEntity:ProductConfigProduct][configItemId,CON-30002-R1(java.lan
g.String)][configOptionId,CON-20003-R1(java.lang.String)][createdStamp,2
007-01-09 16:09:19.005932(java.sql.Timestamp)][createdTxStamp,2007-01-09
16:09:19.005932(java.sql.Timestamp)][lastUpdatedStamp,2007-01-09
16:09:19.005932(java.sql.Timestamp)][lastUpdatedTxStamp,2007-01-09
16:09:19.005932(java.sql.Timestamp)][productId,CON-1604(java.lang.String
)][quantity,null()][sequenceNum,null()]], selected = true The
problematic instruction: ---------- ==> assignment:
option_as_product=option.getComponentProduct(0) [on line 438, column 57
in configprodsummary.ftl] ---------- Java backtrace for programmers:
---------- freemarker.template.TemplateModelException: Method public
org.ofbiz.entity.GenericValue
org.ofbiz.product.config.ProductConfigWrapper$ConfigOption.getComponentP
roduct(int) throws org.ofbiz.entity.GenericEntityException threw an
exception when invoked on ConfigOption : configOption =
[GenericEntity:ProductConfigOption][configItemId,CON-30002-R1(java.lang.
String)][configOptionId,CON-20003-R1(java.lang.String)][configOptionName
,1471 Extra(java.lang.String)][createdStamp,2007-01-09
16:09:10.707633(java.sql.Timestamp)][createdTxStamp,2007-01-09
16:09:10.707633(java.sql.Timestamp)][description,1471
Extra(java.lang.String)][lastUpdatedStamp,2007-01-09
16:09:10.707633(java.sql.Timestamp)][lastUpdatedTxStamp,2007-01-09
16:09:10.707633(java.sql.Timestamp)][longDescription,null()][sequenceNum
,1(java.lang.Long)][tellMeMore,null()][tellMoreText,null()],
optionsPriceMap = {RECURRING_CHARGE=1.5}, componentList =
[[GenericEntity:ProductConfigProduct][configItemId,CON-30002-R1(java.lan
g.String)][configOptionId,CON-20003-R1(java.lang.String)][createdStamp,2
007-01-09 16:09:19.005932(java.sql.Timestamp)][createdTxStamp,2007-01-09
16:09:19.005932(java.sql.Timestamp)][lastUpdatedStamp,2007-01-09
16:09:19.005932(java.sql.Timestamp)][lastUpdatedTxStamp,2007-01-09
16:09:19.005932(java.sql.Timestamp)][productId,CON-1604(java.lang.String
)][quantity,null()][sequenceNum,null()]], selected = true at
freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:133)
at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93) at
freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at
freemarker.core.Assignment.accept(Assignment.java:91) at
freemarker.core.Environment.visit(Environment.java:196) at
freemarker.core.MixedContent.accept(MixedContent.java:92) at
freemarker.core.Environment.visit(Environment.java:196) at
freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79) at
freemarker.core.Environment.visit(Environment.java:196) at
freemarker.core.MixedContent.accept(MixedContent.java:92) at
freemarker.core.Environment.visit(Environment.java:196) at
freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79) at
freemarker.core.Environment.visit(Environment.java:196) at
freemarker.core.MixedContent.accept(MixedContent.java:92) at
freemarker.core.Environment.visit(Environment.java:196) at
freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:160) at
freemarker.core.Environment.visit(Environment.java:351) at
freemarker.core.IteratorBlock.accept(IteratorBlock.java:95) at
freemarker.core.Environment.visit(Environment.java:196) at
freemarker.core.MixedContent.accept(MixedContent.java:92) at
freemarker.core.Environment.visit(Environment.java:196) at
freemarker.core.IfBlock.accept(IfBlock.java:82) at
freemarker.core.Environment.visit(Environment.java:196) at
freemarker.core.MixedContent.accept(MixedContent.java:92) at
freemarker.core.Environment.visit(Environment.java:196) at
freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79) at
freemarker.core.Environment.visit(Environment.java:196) at
freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79) at
freemarker.core.Environment.visit(Environment.java:196) at
freemarker.core.MixedContent.accept(MixedContent.java:92) at
freemarker.core.Environment.visit(Environment.java:196) at
freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:160) at
freemarker.core.Environment.visit(Environment.java:351) at
freemarker.core.IteratorBlock.accept(IteratorBlock.java:95) at
freemarker.core.Environment.visit(Environment.java:196) at
freemarker.core.MixedContent.accept(MixedContent.java:92) at
freemarker.core.Environment.visit(Environment.java:196) at
freemarker.core.Environment.process(Environment.java:176) at
freemarker.template.Template.process(Template.java:231) at
org.ofbiz.base.util.template.FreeMarkerWorker.renderTemplateAtLocation(F
reeMarkerWorker.java:176) at
org.ofbiz.widget.screen.HtmlWidget.renderHtmlTemplate(HtmlWidget.java:86
) at
org.ofbiz.widget.screen.HtmlWidget$HtmlTemplate.renderWidgetString(HtmlW
idget.java:114) at
org.ofbiz.widget.screen.HtmlWidget.renderWidgetString(HtmlWidget.java:73
) at
org.ofbiz.widget.screen.ModelScreenWidget$PlatformSpecific.renderWidgetS
tring(ModelScreenWidget.java:801) at
org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelSc
reenWidget.java:156) at
org.ofbiz.widget.screen.ModelScreenWidget$DecoratorSection.renderWidgetS
tring(ModelScreenWidget.java:527) at
org.ofbiz.widget.screen.ModelScreenWidget$SectionsRenderer.render(ModelS
creenWidget.java:188) at
org.ofbiz.widget.screen.ModelScreenWidget$DecoratorSectionInclude.render
WidgetString(ModelScreenWidget.java:549) at
org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelSc
reenWidget.java:156) at
org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(Mod
elScreenWidget.java:249) at
org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:
102) at
org.ofbiz.widget.screen.ModelScreenWidget$DecoratorScreen.renderWidgetSt
ring(ModelScreenWidget.java:495) at
org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelSc
reenWidget.java:156) at
org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(Mod
elScreenWidget.java:249) at
org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:
102) at
org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:139)
at
org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:104)
at
org.ofbiz.widget.screen.ScreenWidgetViewHandler.render(ScreenWidgetViewH
andler.java:85) at
org.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:5
51) at
org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:35
4) at
org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:191)
at
org.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Se
rvletStubImpl.java:1072) at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:465) at
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28) at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:
27) at
org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:241)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:
27) at
com.bt.netc.frameworks.filters.FilterProxyImpl.doFilter(FilterProxyImpl.
java:65) at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(Delegating
FilterProxy.java:137) at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:
27) at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.r
un(WebAppServletContext.java:6987) at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu
bject.java:321) at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121
) at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
etContext.java:3892) at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
java:2766) at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224) at
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183) Caused by:
java.lang.NullPointerException at
org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:
90) at
org.ofbiz.entity.transaction.TransactionUtil.begin(TransactionUtil.java:
63) at
org.ofbiz.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java
:1285) at
org.ofbiz.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java
:1355) at
org.ofbiz.entity.GenericDelegator.getRelatedOne(GenericDelegator.java:22
38) at
org.ofbiz.entity.GenericValue.getRelatedOne(GenericValue.java:312) at
org.ofbiz.product.config.ProductConfigWrapper$ConfigOption.getComponentP
roduct(ProductConfigWrapper.java:1041) at
sun.reflect.GeneratedMethodAccessor325.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at
freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:457) at
freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:110)
... 79 more

 

 

Thanks and regards,

Sayoke Shome

----------------------------------------------------------

eCommerce Framework Developer (ENSIA)

TechM | BIPL, sector V, salt lake |* 033-4009-8012 | 0.99031.80520 |

 



============================================================================================================================

Tech Mahindra, formerly Mahindra-British Telecom.
 
Disclaimer:

This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech Mahindra.

============================================================================================================================