cancel
Showing results for 
Search instead for 
Did you mean: 

Store not Found

uthayakumar
Champ in-the-making
Champ in-the-making
Creating a new content, The final Stage of the Content Creation the following
error will appear. 
org.alfresco.service.cmr.avm.AVMNotFoundException: Store not found.
33 REPLIES 33

deas0815
Star Contributor
Star Contributor
I guess the bug is in RenderingEngineTemplateImpl.

The following change fixed the problem for me (3c community).

: projects/web-client/source/java/org/alfresco/web/forms/RenderingEngineTemplateImpl.java
===================================================================
— projects/web-client/source/java/org/alfresco/web/forms/RenderingEngineTemplateImpl.java     (revision 3278)
+++ projects/web-client/source/java/org/alfresco/web/forms/RenderingEngineTemplateImpl.java     (working copy)
@@ -377,7 +377,7 @@
       final String formInstanceDataAvmPath = formInstanceData.getPath();
       final String renditionAvmPath = rendition.getPath();
       final String parentPath = AVMNodeConverter.SplitBase(formInstanceDataAvmPath)[0];
-      final String sandboxUrl = AVMUtil.buildStoreUrl(formInstanceDataAvmPath);
+      final String sandboxUrl = AVMUtil.buildStoreUrl(AVMUtil.getStoreName(formInstanceDataAvmPath));
       final String webappUrl = AVMUtil.buildWebappUrl(formInstanceDataAvmPath);
       final HashMap<QName, Object> model = new HashMap<QName, Object>();
       // add simple scalar parameters

regards
Andreas

zmicer
Champ in-the-making
Champ in-the-making
Thanks deas0815!!

I have checked this, and yes, it is working for now. This fixes issue with rendering, and also it provides a clue to fix an issue with dynamic include discussed here http://forums.alfresco.com/en/viewtopic.php?f=30&t=8947&p=52519#p52519, my last post provides a fix.

tvaughan77
Champ in-the-making
Champ in-the-making
I've made the recommended code change to my lab3c installation, and I'm still unable to use a JSP to produce an includable XSD snippet.

My XSD snippet is:
<xs:include schemaLocation="/zzzalfresco/xsdEnumConvert_Ease.jsp"/>

My JSP is:

<jsp:root version="1.2"
          xmlns:jsp="http://java.sun.com/JSP/Page"
          xmlns:c="http://java.sun.com/jsp/jstl/core"
          xmlns:pr="http://www.mycompany.com/posnet/core">
    <jsp:directive.page language="java" contentType="text/html; charset=UTF-8"/>
    <jsp:directive.page isELIgnored="false"/>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
               xmlns:alf="http://www.alfresco.org"
               elementFormDefault="qualified">
        <xs:simpleType name="possible-ease">
            <xs:restriction base="xs:normalizedString">
                <xs:enumeration value="EASY"/>
                <xs:enumeration value="MEDIUM"/>
                <xs:enumeration value="HARD"/>
            </xs:restriction>
        </xs:simpleType>
    </xs:schema>
</jsp:root>

When I try to use the web form, I get this error:

10:13:38,085 User:admin ERROR [ui.common.Utils] Store not found.
org.alfresco.service.cmr.avm.AVMNotFoundException: Store not found.
   at org.alfresco.repo.avm.AVMRepository.queryStorePropertyKey(AVMRepository.java:2344)
   at org.alfresco.repo.avm.AVMServiceImpl.queryStorePropertyKey(AVMServiceImpl.java:1154)
   at sun.reflect.GeneratedMethodAccessor706.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:616)
       ….

deas0815
Star Contributor
Star Contributor
I've made the recommended code change to my lab3c installation, and I'm still unable to use a JSP to produce an includable XSD snippet.

You have to apply the same fix to XFormsBean as well if you use JSP includes. Have a look at

http://forums.alfresco.com/en/viewtopic.php?f=30&t=8947&p=52519#p52519

regards
Andreas

tvaughan77
Champ in-the-making
Champ in-the-making
Ahhh….ok, I understand now.

So the total set of changes needed to fix this issue are:


Index: projects/web-client/source/java/org/alfresco/web/forms/xforms/XFormsBean.java
===================================================================
— projects/web-client/source/java/org/alfresco/web/forms/xforms/XFormsBean.java   (revision 3445)
+++ projects/web-client/source/java/org/alfresco/web/forms/xforms/XFormsBean.java   (working copy)
@@ -608,7 +608,7 @@
             {
                // It's a web project asset include / import
                final String baseURI = (uri.charAt(0) == '/'
-                                       ? AVMUtil.buildStoreUrl(cwdAvmPath)
+                                       ? AVMUtil.buildStoreUrl(AVMUtil.getStoreName(cwdAvmPath))
                                        : AVMUtil.buildAssetUrl(cwdAvmPath));

                finalURI = baseURI + uri;


And


Index: projects/web-client/source/java/org/alfresco/web/forms/RenderingEngineTemplateImpl.java
===================================================================
— projects/web-client/source/java/org/alfresco/web/forms/RenderingEngineTemplateImpl.java   (revision 3445)
+++ projects/web-client/source/java/org/alfresco/web/forms/RenderingEngineTemplateImpl.java   (working copy)
@@ -377,7 +377,9 @@
       final String formInstanceDataAvmPath = formInstanceData.getPath();
       final String renditionAvmPath = rendition.getPath();
       final String parentPath = AVMNodeConverter.SplitBase(formInstanceDataAvmPath)[0];
-      final String sandboxUrl = AVMUtil.buildStoreUrl(formInstanceDataAvmPath);
+      // orig (see http://forums.alfresco.com/en/viewtopic.php?f=30&p=52523)
+      // final String sandboxUrl = AVMUtil.buildStoreUrl(formInstanceDataAvmPath);
+      final String sandboxUrl = AVMUtil.buildStoreUrl(AVMUtil.getStoreName(formInstanceDataAvmPath));
       final String webappUrl = AVMUtil.buildWebappUrl(formInstanceDataAvmPath);
       final HashMap<QName, Object> model = new HashMap<QName, Object>();
       // add simple scalar parameters

dfundak
Champ in-the-making
Champ in-the-making
After patching as written here I made xsl transformation working.
But When I try to make freemarker transformation I'got this error:
17:34:55,119 User:admin ERROR [ui.common.Utils]
java.lang.NullPointerException
        at java.util.StringTokenizer.<init>(StringTokenizer.java:197)
        at java.util.StringTokenizer.<init>(StringTokenizer.java:219)
        at org.alfresco.web.bean.wcm.CreateWebContentWizard.saveContent(CreateWe
bContentWizard.java:600)
        at org.alfresco.web.bean.wcm.CreateWebContentWizard$2.execute(CreateWebC
ontentWizard.java:285)
        at org.alfresco.web.bean.wcm.CreateWebContentWizard$2.execute(CreateWebC
ontentWizard.java:282)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransacti
on(RetryingTransactionHelper.java:294)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransacti
on(RetryingTransactionHelper.java:209)
        at org.alfresco.web.bean.wcm.CreateWebContentWizard.next(CreateWebConten
tWizard.java:293)
        at org.alfresco.web.bean.wizard.WizardManager.next(WizardManager.java:54
1)
        at sun.reflect.GeneratedMethodAccessor1085.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:618)
        at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java
:132)
        at org.apache.myfaces.application.ActionListenerImpl.processAction(Actio
nListenerImpl.java:61)
        at javax.faces.component.UICommand.broadcast(UICommand.java:109)
        at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:9
7)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1
71)
        at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(Invoke
ApplicationExecutor.java:32)
        at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl
.java:95)
        at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java
:70)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:188)
        at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(Authentica
tionFilter.java:81)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:188)
        at org.alfresco.module.vti.VtiContextFilter.doFilter(VtiContextFilter.ja
va:94)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:188)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:210)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:174)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:151)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:870)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
rocessConnection(Http11BaseProtocol.java:665)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
int.java:528)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol
lowerWorkerThread.java:81)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:685)
        at java.lang.Thread.run(Thread.java:810)

I use xsd like this:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           elementFormDefault="qualified">
  <xs:element name="simple">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="string" type="xs:normalizedString"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

xsl like this:
 <xsl:stylesheet version="1"
                 xmlns:xhtml="http://www.w3.org/1999/xhtml"
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 exclude-result-prefixes="xhtml">
   <xsl:output method="html" indent="yes" encoding="UTF-8" version="4.01"
               doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
               doctype-system="http://www.w3.org/TR/html4/loose.dtd'/>
   <xsl:template match="/">
     <xhtml:html>
       <xhtml:body>
         <xsl:value-of select="/simple/string"/>
       </xhtml:body>
     </xhtml:html>
   </xsl:template>
</xsl:stylesheet>

and freemarker template like this:
<html>
   <body>
   ${simple.string}
   </body>
</html>

Any Ideas?

leonardo
Champ in-the-making
Champ in-the-making
Hi All,

I have the same issue and I read this post completely but I don´t know what I have to fix to solve this problem…

In RenderingEngineTemplateImpl.java I see this code :
final String formInstanceDataAvmPath = formInstanceData.getPath();
      final String renditionAvmPath = rendition.getPath();
      final String parentPath = AVMNodeConverter.SplitBase(formInstanceDataAvmPath)[0];
      final String sandboxUrl = AVMUtil.buildStoreUrl(formInstanceDataAvmPath);
      final String webappUrl = AVMUtil.buildWebappUrl(formInstanceDataAvmPath);
      final HashMap<QName, Object> model = new HashMap<QName, Object>();

please say me what I have to fix in this class to solve this issue…

I´m using Alfresco Labs 3c.

ASAP, Please!!!
Thanks

leonardo
Champ in-the-making
Champ in-the-making
Hi All,

I read this post completely and I don´t understand what I have to fix to solve my problem…
In RenderingEngineTemplateImpl.java I see this code,but what I have to fix in code to solve the problem???
final String formInstanceDataAvmPath = formInstanceData.getPath();
      final String renditionAvmPath = rendition.getPath();
      final String parentPath = AVMNodeConverter.SplitBase(formInstanceDataAvmPath)[0];
      final String sandboxUrl = AVMUtil.buildStoreUrl(formInstanceDataAvmPath);
      final String webappUrl = AVMUtil.buildWebappUrl(formInstanceDataAvmPath);
      final HashMap<QName, Object> model = new HashMap<QName, Object>();

I´m using Alfresco Labs 3c.

ASAP!
Thanks

tvaughan77
Champ in-the-making
Champ in-the-making
There are two files you need to change:

File #1)
projects/web-client/source/java/org/alfresco/web/forms/RenderingEngineTemplateImpl.java

Change "final String sandboxUrl = AVMUtil.buildStoreUrl(formInstanceDataAvmPath);"
Make it "final String sandboxUrl = AVMUtil.buildStoreUrl(AVMUtil.getStoreName(formInstanceDataAvmPath));"


File #2)
projects/web-client/source/java/org/alfresco/web/forms/xforms/XFormsBean.java

Change "? AVMUtil.buildStoreUrl(cwdAvmPath)"
Make it "? AVMUtil.buildStoreUrl(AVMUtil.getStoreName(cwdAvmPath))"

deas0815
Star Contributor
Star Contributor
Exacly.

BTW: 3.0 Stable still has this bug and the fix is the same. Seems we should have reported it on JIRA, but somebody else now has
so I guess it will be fixed in the next labs release.

regards
Andreas