Adding Products to Cloned Ecommerce Application

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

Adding Products to Cloned Ecommerce Application

Gaurav kalia
Hi All

I created a new cloned ecommerce application successfully and now i
would like to add product for that particular cloned application. For
this i have done the following:

1. Created a Party.
2. Created a Website.
3. Created a Store.
4. Created a  Catalog.
5. Created a Category.
6. Created a Product.

And the product created is accessible in ecommerce application
(original)  but not in cloned one. Everytime i try to view the product
with the URL in cloned application i get following error.

> Method public java.lang.String
> org.ofbiz.widget.screen.ScreenRenderer.render(java.lang.String) throws
> org.ofbiz.base.util.GeneralException,java.io.IOException,org.xml.sax.SAXException,javax.xml.parsers.ParserConfigurationException
> threw an exception when invoked on
> org.ofbiz.widget.screen.ScreenRenderer@3e8692 with arguments of types
> [java.lang.String,] The problematic instruction: ---------- ==>
> ${screens.render(productsummaryScreen)} [on line 111, column 13 in
> component://order/webapp/ordermgr/entry/catalog/categorydetail.ftl]
> ---------- Java backtrace for programmers: ----------
> freemarker.template.TemplateModelException: Method public
> java.lang.String
> org.ofbiz.widget.screen.ScreenRenderer.render(java.lang.String) throws
> org.ofbiz.base.util.GeneralException,java.io.IOException,org.xml.sax.SAXException,javax.xml.parsers.ParserConfigurationException
> threw an exception when invoked on
> org.ofbiz.widget.screen.ScreenRenderer@3e8692 with arguments of types
> [java.lang.String,] at
> freemarker.ext.beans.OverloadedMethodModel.exec(OverloadedMethodModel.java:134)
> at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
> at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
> at freemarker.core.Expression.getStringValue(Expression.java:93) at
> freemarker.core.DollarVariable.accept(DollarVariable.java:76) at
> freemarker.core.Environment.visit(Environment.java:209) at
> freemarker.core.MixedContent.accept(MixedContent.java:92) at
> freemarker.core.Environment.visit(Environment.java:209) at
> freemarker.core.IfBlock.accept(IfBlock.java:82) at
> freemarker.core.Environment.visit(Environment.java:209) at
> freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167)
> at freemarker.core.Environment.visit(Environment.java:416) at
> freemarker.core.IteratorBlock.accept(IteratorBlock.java:102) at
> freemarker.core.Environment.visit(Environment.java:209) at
> freemarker.core.MixedContent.accept(MixedContent.java:92) at
> freemarker.core.Environment.visit(Environment.java:209) at
> freemarker.core.IfBlock.accept(IfBlock.java:82) at
> freemarker.core.Environment.visit(Environment.java:209) at
> freemarker.core.MixedContent.accept(MixedContent.java:92) at
> freemarker.core.Environment.visit(Environment.java:209) at
> freemarker.core.Environment.process(Environment.java:189) at
> org.ofbiz.base.util.template.FreeMarkerWorker.renderTemplate(FreeMarkerWorker.java:205)
> at
> org.ofbiz.widget.screen.HtmlWidget.renderHtmlTemplate(HtmlWidget.java:201)
> at
> org.ofbiz.widget.screen.HtmlWidget$HtmlTemplate.renderWidgetString(HtmlWidget.java:245)
> at
> org.ofbiz.widget.screen.HtmlWidget.renderWidgetString(HtmlWidget.java:107)
> at
> org.ofbiz.widget.screen.ModelScreenWidget$PlatformSpecific.renderWidgetString(ModelScreenWidget.java:976)
> at
> org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:138)
> at
> org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:227)
> at
> org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393)
> at
> org.ofbiz.widget.screen.ModelScreenWidget$IncludeScreen.renderWidgetString(ModelScreenWidget.java:552)
> at
> org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:138)
> at
> org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:227)
> at
> org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:138)
> at
> org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:227)
> at
> org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393)
> at
> org.ofbiz.widget.screen.ModelScreenWidget$IncludeScreen.renderWidgetString(ModelScreenWidget.java:552)
> at
> org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:138)
> at
> org.ofbiz.widget.screen.ModelScreenWidget$DecoratorSection.renderWidgetString(ModelScreenWidget.java:676)
> at
> org.ofbiz.widget.screen.ModelScreenWidget$SectionsRenderer.render(ModelScreenWidget.java:167)
> at
> org.ofbiz.widget.screen.ModelScreenWidget$DecoratorSectionInclude.renderWidgetString(ModelScreenWidget.java:706)
> at
> org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:138)
> at
> org.ofbiz.widget.screen.ModelScreenWidget$Container.renderWidgetString(ModelScreenWidget.java:292)
> at
> org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:138)
> at
> org.ofbiz.widget.screen.ModelScreenWidget$Container.renderWidgetString(ModelScreenWidget.java:292)
> at
> org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:138)
> at
> org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:227)
> at
> org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393)
> at
> org.ofbiz.widget.screen.ModelScreenWidget$DecoratorScreen.renderWidgetString(ModelScreenWidget.java:646)
> at
> org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:138)
> at
> org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:227)
> at
> org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393)
> at
> org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:132)
> at
> org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:92)
> at
> org.ofbiz.widget.screen.ScreenWidgetViewHandler.render(ScreenWidgetViewHandler.java:98)
> at
> org.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:789)
> at
> org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:533)
> at
> org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:201)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
> at
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
> at
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
> at
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
> at
> org.ofbiz.product.category.CatalogUrlServlet.doGet(CatalogUrlServlet.java:135)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at
> org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:259) at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
> at
> org.ofbiz.catalina.container.CrossSubdomainSessionValve.invoke(CrossSubdomainSessionValve.java:62)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at
> java.lang.Thread.run(Thread.java:595) Caused by:
> org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen
> [component://ecommerce/widget/CatalogScreens.xml#productsummary]:
> java.lang.NullPointerException (null) at
> org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:406)
> at
> org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:132)
> at
> org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:92)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585) at
> freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:840)
> at
> freemarker.ext.beans.OverloadedMethodModel.exec(OverloadedMethodModel.java:104)
> ... 84 more Caused by: java.lang.NullPointerException at
> org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:178)
> at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:477)
> at ProductSummary.run(ProductSummary.groovy:44) at
> org.ofbiz.base.util.GroovyUtil.runScriptAtLocation(GroovyUtil.java:117) at
> org.ofbiz.widget.screen.ModelScreenAction$Script.runAction(ModelScreenAction.java:408)
> at
> org.ofbiz.widget.screen.ModelScreenAction.runSubActions(ModelScreenAction.java:118)
> at
> org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:220)
> at
> org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393)
> ... 92 more Error rendering included template at location
> [component://order/webapp/ordermgr/entry/catalog/categorydetail.ftl]:
> freemarker.template.TemplateModelException: Method public
> java.lang.String
> org.ofbiz.widget.screen.ScreenRenderer.render(java.lang.String) throws
> org.ofbiz.base.util.GeneralException,java.io.IOException,org.xml.sax.SAXException,javax.xml.parsers.ParserConfigurationException
> threw an exception when invoked on
> org.ofbiz.widget.screen.ScreenRenderer@3e8692 with arguments of types
> [java.lang.String,]


Please suggest.

Regards
Gaurav


Reply | Threaded
Open this post in threaded view
|

Re: Adding Products to Cloned Ecommerce Application

Scott Gray-2
Hi Gaurav,

I know it isn't obvious but buried in that exception is this:
>> at ProductSummary.run(ProductSummary.groovy:44)

That line of code is attempting to access the ProductStore for the website which the code couldn't seem to find.
- Have you set the webSiteId in your web.xml file to point to your WebSite's webSiteId?
- Have you set a productStoreId on your WebSite record?

I'm guessing the answer to one of those is no and if you fix that then it should work correctly.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 9/06/2010, at 7:01 PM, Gaurav Kalia wrote:

> Hi All
>
> I created a new cloned ecommerce application successfully and now i would like to add product for that particular cloned application. For this i have done the following:
>
> 1. Created a Party.
> 2. Created a Website.
> 3. Created a Store.
> 4. Created a  Catalog.
> 5. Created a Category.
> 6. Created a Product.
>
> And the product created is accessible in ecommerce application (original)  but not in cloned one. Everytime i try to view the product with the URL in cloned application i get following error.
>
>> Method public java.lang.String org.ofbiz.widget.screen.ScreenRenderer.render(java.lang.String) throws org.ofbiz.base.util.GeneralException,java.io.IOException,org.xml.sax.SAXException,javax.xml.parsers.ParserConfigurationException threw an exception when invoked on org.ofbiz.widget.screen.ScreenRenderer@3e8692 with arguments of types [java.lang.String,] The problematic instruction: ---------- ==> ${screens.render(productsummaryScreen)} [on line 111, column 13 in component://order/webapp/ordermgr/entry/catalog/categorydetail.ftl] ---------- Java backtrace for programmers: ---------- freemarker.template.TemplateModelException: Method public java.lang.String org.ofbiz.widget.screen.ScreenRenderer.render(java.lang.String) throws org.ofbiz.base.util.GeneralException,java.io.IOException,org.xml.sax.SAXException,javax.xml.parsers.ParserConfigurationException threw an exception when invoked on org.ofbiz.widget.screen.ScreenRenderer@3e8692 with arguments of types [java.lang.String,] at freemarker.ext.beans.OverloadedMethodModel.exec(OverloadedMethodModel.java:134) at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93) at freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at freemarker.core.Expression.getStringValue(Expression.java:93) at freemarker.core.DollarVariable.accept(DollarVariable.java:76) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.IfBlock.accept(IfBlock.java:82) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167) at freemarker.core.Environment.visit(Environment.java:416) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.IfBlock.accept(IfBlock.java:82) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.Environment.process(Environment.java:189) at org.ofbiz.base.util.template.FreeMarkerWorker.renderTemplate(FreeMarkerWorker.java:205) at org.ofbiz.widget.screen.HtmlWidget.renderHtmlTemplate(HtmlWidget.java:201) at org.ofbiz.widget.screen.HtmlWidget$HtmlTemplate.renderWidgetString(HtmlWidget.java:245) at org.ofbiz.widget.screen.HtmlWidget.renderWidgetString(HtmlWidget.java:107) at org.ofbiz.widget.screen.ModelScreenWidget$PlatformSpecific.renderWidgetString(ModelScreenWidget.java:976) at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:138) at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:227) at org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393) at org.ofbiz.widget.screen.ModelScreenWidget$IncludeScreen.renderWidgetString(ModelScreenWidget.java:552) at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:138) at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:227) at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:138) at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:227) at org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393) at org.ofbiz.widget.screen.ModelScreenWidget$IncludeScreen.renderWidgetString(ModelScreenWidget.java:552) at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:138) at org.ofbiz.widget.screen.ModelScreenWidget$DecoratorSection.renderWidgetString(ModelScreenWidget.java:676) at org.ofbiz.widget.screen.ModelScreenWidget$SectionsRenderer.render(ModelScreenWidget.java:167) at org.ofbiz.widget.screen.ModelScreenWidget$DecoratorSectionInclude.renderWidgetString(ModelScreenWidget.java:706) at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:138) at org.ofbiz.widget.screen.ModelScreenWidget$Container.renderWidgetString(ModelScreenWidget.java:292) at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:138) at org.ofbiz.widget.screen.ModelScreenWidget$Container.renderWidgetString(ModelScreenWidget.java:292) at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:138) at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:227) at org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393) at org.ofbiz.widget.screen.ModelScreenWidget$DecoratorScreen.renderWidgetString(ModelScreenWidget.java:646) at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:138) at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:227) at org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393) at org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:132) at org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:92) at org.ofbiz.widget.screen.ScreenWidgetViewHandler.render(ScreenWidgetViewHandler.java:98) at org.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:789) at org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:533) at org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:201) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) at org.ofbiz.product.category.CatalogUrlServlet.doGet(CatalogUrlServlet.java:135) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:259) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568) at org.ofbiz.catalina.container.CrossSubdomainSessionValve.invoke(CrossSubdomainSessionValve.java:62) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:595) Caused by: org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://ecommerce/widget/CatalogScreens.xml#productsummary]: java.lang.NullPointerException (null) at org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:406) at org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:132) at org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:92) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:840) at freemarker.ext.beans.OverloadedMethodModel.exec(OverloadedMethodModel.java:104) ... 84 more Caused by: java.lang.NullPointerException at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:178) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:477) at ProductSummary.run(ProductSummary.groovy:44) at org.ofbiz.base.util.GroovyUtil.runScriptAtLocation(GroovyUtil.java:117) at org.ofbiz.widget.screen.ModelScreenAction$Script.runAction(ModelScreenAction.java:408) at org.ofbiz.widget.screen.ModelScreenAction.runSubActions(ModelScreenAction.java:118) at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:220) at org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393) ... 92 more Error rendering included template at location [component://order/webapp/ordermgr/entry/catalog/categorydetail.ftl]: freemarker.template.TemplateModelException: Method public java.lang.String org.ofbiz.widget.screen.ScreenRenderer.render(java.lang.String) throws org.ofbiz.base.util.GeneralException,java.io.IOException,org.xml.sax.SAXException,javax.xml.parsers.ParserConfigurationException threw an exception when invoked on org.ofbiz.widget.screen.ScreenRenderer@3e8692 with arguments of types [java.lang.String,]
>
>
> Please suggest.
>
> Regards
> Gaurav
>
>


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Adding Products to Cloned Ecommerce Application

Gaurav kalia
Hi Scott

I have added the webSiteID in web.xml of clone application

<context-param>
        <param-name>webSiteId</param-name>
        <param-value>demosite</param-value>
        <description>A unique ID used to look up the WebSite entity</description>
</context-param>

But I am not sure what you mean by the second one. I have interlinked all of them like party with website,website with store and so on by accessing admin section.

If you meant something else please let me know. Might be possible I am doing some mistake.

Thanks for quick reply

Regards
Gaurav
Reply | Threaded
Open this post in threaded view
|

Re: Adding Products to Cloned Ecommerce Application

Scott Gray-2
Okay so you should have a WebSite record that represents your store with an ID of demosite, you can confirm that it is in the list found at: Content -> WebSites
If you click on that record (if it is there) then there should be a Product Store assigned in the form that is displayed.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 9/06/2010, at 8:19 PM, kaliagaurav wrote:

>
> Hi Scott
>
> I have added the webSiteID in web.xml of clone application
>
> <context-param>
>        <param-name>webSiteId</param-name>
>        <param-value>demosite</param-value>
>        <description>A unique ID used to look up the WebSite
> entity</description>
> </context-param>
>
> But I am not sure what you mean by the second one. I have interlinked all of
> them like party with website,website with store and so on by accessing admin
> section.
>
> If you meant something else please let me know. Might be possible I am doing
> some mistake.
>
> Thanks for quick reply
>
> Regards
> Gaurav
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Adding-Products-to-Cloned-Ecommerce-Application-tp2248395p2248473.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Adding Products to Cloned Ecommerce Application

Gaurav kalia
Hi Scott

Thanks for the explanation. As you have suggested I have added the store in that form and I have restated the application again but I am still getting error and this time I am getting two exceptions.

First one is:

Expression layoutSettings.companyName is undefined on line 29, column 14 in component://bluelight/includes/header.ftl.
The problematic instruction:
----------
==> ${layoutSettings.companyName} [on line 29, column 12 in component://bluelight/includes/header.ftl]
----------


And a part of second one is below:

Caused by: org.ofbiz.base.util.GeneralException: Error running Groovy script at location [component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy] (The following required parameter is missing: [getInventoryAvailableByFacility.facilityId])
        at org.ofbiz.widget.screen.ModelScreenAction$Script.runAction(ModelScreenAction.java:410)
        at org.ofbiz.widget.screen.ModelScreenAction.runSubActions(ModelScreenAction.java:118)
        at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:220)
        at org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393)
        ... 92 more
Caused by: org.ofbiz.service.ServiceValidationException: The following required parameter is missing: [getInventoryAvailableByFacility.facilityId]
        at org.ofbiz.service.ModelService.validate(ModelService.java:522)
        at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:372)
        at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:219)
        at org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
        at org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:766)
        at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:754)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
        at ProductSummary.run(ProductSummary.groovy:60)
        at org.ofbiz.base.util.GroovyUtil.runScriptAtLocation(GroovyUtil.java:117)
        at org.ofbiz.widget.sc

"getInventoryAvailableByFacility.facilityId" This is missing  so i tried creating a facility and linked it with the party ID but no luck.

How can I configure facility if its really necessary.

Please suggest

Regards
Gaurav
Reply | Threaded
Open this post in threaded view
|

Re: Adding Products to Cloned Ecommerce Application

Atul Vani
Hi Gaurav,

check your main-decorator and if not there then screen for this
<set field="layoutSettings.companyName" from-field="..."/>

you might wanna use a uiLabel for the from-field value.
    <property key="CompanyName">
        <value xml:lang="en">My Company</value>
    </property>


I always wondered why don't we have
${layoutSettings.companyName}
replaced by
${layoutSettings.companyName?if_exists}
in all themes.

--
Thanks & Regards
Atul Vani
Enterprise Software Developer
HotWax Media Pvt. Ltd.
http://www.hotwaxmedia.com/
We are the Global Leaders in Apache OFBiz, Google 'ofbiz' and see for yourself.


kaliagaurav wrote:

> Hi Scott
>
> Thanks for the explanation. As you have suggested I have added the store in
> that form and I have restated the application again but I am still getting
> error and this time I am getting two exceptions.
>
> First one is:
>
> Expression layoutSettings.companyName is undefined on line 29, column 14 in
> component://bluelight/includes/header.ftl.
> The problematic instruction:
> ----------
> ==> ${layoutSettings.companyName} [on line 29, column 12 in
> component://bluelight/includes/header.ftl]
> ----------
>
>
> And a part of second one is below:
>
> Caused by: org.ofbiz.base.util.GeneralException: Error running Groovy script
> at location
> [component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy]
> (The following required parameter is missing:
> [getInventoryAvailableByFacility.facilityId])
> at
> org.ofbiz.widget.screen.ModelScreenAction$Script.runAction(ModelScreenAction.java:410)
> at
> org.ofbiz.widget.screen.ModelScreenAction.runSubActions(ModelScreenAction.java:118)
> at
> org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:220)
> at
> org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393)
> ... 92 more
> Caused by: org.ofbiz.service.ServiceValidationException: The following
> required parameter is missing: [getInventoryAvailableByFacility.facilityId]
> at org.ofbiz.service.ModelService.validate(ModelService.java:522)
> at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:372)
> at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:219)
> at org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
> at
> org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:766)
> at
> org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:754)
> at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
> at ProductSummary.run(ProductSummary.groovy:60)
> at org.ofbiz.base.util.GroovyUtil.runScriptAtLocation(GroovyUtil.java:117)
> at org.ofbiz.widget.sc
>
> "getInventoryAvailableByFacility.facilityId" This is missing  so i tried
> creating a facility and linked it with the party ID but no luck.
>
> How can I configure facility if its really necessary.
>
> Please suggest
>
> Regards
> Gaurav
>  
Reply | Threaded
Open this post in threaded view
|

Re: Adding Products to Cloned Ecommerce Application

Shubham Dubey
Hi Gaurav

Check your ProductStore Data specially the field *inventoryFacilityId*


Thanks & Regards
Shubham Dubey
Enterprise Software Developer
HotWax Media Pvt. Ltd.
http://www.hotwaxmedia.com/



Atul Vani wrote:

> Hi Gaurav,
>
> check your main-decorator and if not there then screen for this
> <set field="layoutSettings.companyName" from-field="..."/>
>
> you might wanna use a uiLabel for the from-field value.
>    <property key="CompanyName">
>        <value xml:lang="en">My Company</value>
>    </property>
>
>
> I always wondered why don't we have
> ${layoutSettings.companyName}
> replaced by
> ${layoutSettings.companyName?if_exists}
> in all themes.
>
Reply | Threaded
Open this post in threaded view
|

Re: Adding Products to Cloned Ecommerce Application

Gaurav kalia
In reply to this post by Atul Vani
Hi Atul

It wasnt there so i have added it in maindecorator screen  present in CommonScreens but sorry it did worked.

I am still getting both the exception previously i was not getting this exception (first one).

Just after I added store name in website form I started getting this error and error is coming without any template previously it were coming with the template that I am using.

I am not sure what I am missing.

Please suggest.

Regards
Gaurav
Reply | Threaded
Open this post in threaded view
|

Re: Adding Products to Cloned Ecommerce Application

Atul Vani
hi Gaurav,

you need to restart the server after adding it, if you have used uiLabel
for it,
if it works correctly, then first error should disappear.

to correct myself, it needs to be added in main-decorator only,
I mis-typed 'screen' too in previous reply.

--
Thanks & Regards
Atul Vani
Enterprise Software Developer
HotWax Media Pvt. Ltd.
http://www.hotwaxmedia.com/
We are the Global Leaders in Apache OFBiz, Google 'ofbiz' and see for yourself.

kaliagaurav wrote:

> Hi Atul
>
> It wasnt there so i have added it in maindecorator screen  present in
> CommonScreens but sorry it did worked.
>
> I am still getting both the exception previously i was not getting this
> exception (first one).
>
> Just after I added store name in website form I started getting this error
> and error is coming without any template previously it were coming with the
> template that I am using.
>
> I am not sure what I am missing.
>
> Please suggest.
>
> Regards
> Gaurav
>  
Reply | Threaded
Open this post in threaded view
|

Re: Adding Products to Cloned Ecommerce Application

Gaurav kalia
In reply to this post by Shubham Dubey
Hi Shubham

Thanks for the suggestion.

I can see the product I have created for the cloned application with the same template without any exception. :)

Thanks alot everyone for the ideas.

But now I have another question ;)

Why these product are coming in the main application. Do I need to configure anything else so that product of one application should not be visible in other

Regards
Gaurav

Reply | Threaded
Open this post in threaded view
|

Re: Adding Products to Cloned Ecommerce Application

Gaurav kalia
In reply to this post by Atul Vani
Hi Atul

After configuring InventoryfacilityID in store form all worked fine for me.

I can see the products with in the template I have created for cloned application without any exceptions.

But now I dont want the products to appear in any other application right now I can see them in main application (original).

Please suggest


Regards
Gaurav
Reply | Threaded
Open this post in threaded view
|

Re: Adding Products to Cloned Ecommerce Application

Atul Vani
Hi Gaurav,

please check if both the websites share same productStoreId.

--
Thanks & Regards
Atul Vani
Enterprise Software Developer
HotWax Media Pvt. Ltd.
http://www.hotwaxmedia.com/
We are the Global Leaders in Apache OFBiz, Google 'ofbiz' and see for yourself.

kaliagaurav wrote:

> Hi Atul
>
> After configuring InventoryfacilityID in store form all worked fine for me.
>
> I can see the products with in the template I have created for cloned
> application without any exceptions.
>
> But now I dont want the products to appear in any other application right
> now I can see them in main application (original).
>
> Please suggest
>
>
> Regards
> Gaurav
>  
Reply | Threaded
Open this post in threaded view
|

Re: Adding Products to Cloned Ecommerce Application

Gaurav kalia
Hi Atul

I have checked both are configured with different StoreID.


Regards
Gaurav
Reply | Threaded
Open this post in threaded view
|

Re: Adding Products to Cloned Ecommerce Application

Rishi Solanki
May be you have setup the same catalog to both product store.

Rishi Solanki
Manager, Enterprise Software Development
HotWax Media Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxmedia.com


On Wed, Jun 9, 2010 at 8:20 PM, kaliagaurav <[hidden email]>wrote:

>
> Hi Atul
>
> I have checked both are configured with different StoreID.
>
>
> Regards
> Gaurav
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Adding-Products-to-Cloned-Ecommerce-Application-tp2248395p2248977.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Adding Products to Cloned Ecommerce Application

Jacques Le Roux
Administrator
In reply to this post by Atul Vani
From: "Atul Vani" <[hidden email]>

> Hi Gaurav,
>
> check your main-decorator and if not there then screen for this
> <set field="layoutSettings.companyName" from-field="..."/>
>
> you might wanna use a uiLabel for the from-field value.
>    <property key="CompanyName">
>        <value xml:lang="en">My Company</value>
>    </property>
>
>
> I always wondered why don't we have
> ${layoutSettings.companyName}
> replaced by
> ${layoutSettings.companyName?if_exists}
> in all themes.

Maybe because it's better to show the error and fix it than to hide it (I did not check into details, just a quick answer)

Jacques
 

> --
> Thanks & Regards
> Atul Vani
> Enterprise Software Developer
> HotWax Media Pvt. Ltd.
> http://www.hotwaxmedia.com/
> We are the Global Leaders in Apache OFBiz, Google 'ofbiz' and see for yourself.
>
>
> kaliagaurav wrote:
>> Hi Scott
>>
>> Thanks for the explanation. As you have suggested I have added the store in
>> that form and I have restated the application again but I am still getting
>> error and this time I am getting two exceptions.
>>
>> First one is:
>>
>> Expression layoutSettings.companyName is undefined on line 29, column 14 in
>> component://bluelight/includes/header.ftl.
>> The problematic instruction:
>> ----------
>> ==> ${layoutSettings.companyName} [on line 29, column 12 in
>> component://bluelight/includes/header.ftl]
>> ----------
>>
>>
>> And a part of second one is below:
>>
>> Caused by: org.ofbiz.base.util.GeneralException: Error running Groovy script
>> at location
>> [component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy]
>> (The following required parameter is missing:
>> [getInventoryAvailableByFacility.facilityId])
>> at
>> org.ofbiz.widget.screen.ModelScreenAction$Script.runAction(ModelScreenAction.java:410)
>> at
>> org.ofbiz.widget.screen.ModelScreenAction.runSubActions(ModelScreenAction.java:118)
>> at
>> org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:220)
>> at
>> org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393)
>> ... 92 more
>> Caused by: org.ofbiz.service.ServiceValidationException: The following
>> required parameter is missing: [getInventoryAvailableByFacility.facilityId]
>> at org.ofbiz.service.ModelService.validate(ModelService.java:522)
>> at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:372)
>> at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:219)
>> at org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:585)
>> at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
>> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
>> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
>> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
>> at
>> org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:766)
>> at
>> org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:754)
>> at
>> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
>> at ProductSummary.run(ProductSummary.groovy:60)
>> at org.ofbiz.base.util.GroovyUtil.runScriptAtLocation(GroovyUtil.java:117)
>> at org.ofbiz.widget.sc
>>
>> "getInventoryAvailableByFacility.facilityId" This is missing  so i tried
>> creating a facility and linked it with the party ID but no luck.
>>
>> How can I configure facility if its really necessary.
>>
>> Please suggest
>>
>> Regards
>> Gaurav
>>  
>