12-16-2010 06:48 PM
Error Please correct the errors below then click Finish.
* error regenerating rendition using phone.ftl: null
and the log:
18:31:54,686 User:admin ERROR [ui.common.Utils] error regenerating rendition using phone.ftl: null
java.lang.NullPointerException
at org.alfresco.web.forms.FormInstanceDataImpl.regenerateRenditions(FormInstanceDataImpl.java:284)
at org.alfresco.web.bean.wcm.EditWebContentWizard.saveContent(EditWebContentWizard.java:195)
at org.alfresco.web.bean.wcm.CreateWebContentWizard$2.execute(CreateWebContentWizard.java:276)
at org.alfresco.web.bean.wcm.CreateWebContentWizard$2.execute(CreateWebContentWizard.java:272)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:377)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:251)
at org.alfresco.web.bean.wcm.CreateWebContentWizard.next(CreateWebContentWizard.java:284)
at org.alfresco.web.bean.wizard.WizardManager.next(WizardManager.java:554)
at sun.reflect.GeneratedMethodAccessor2861.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
at javax.faces.component.UICommand.broadcast(UICommand.java:109)
at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.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(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:104)
at sun.reflect.GeneratedMethodAccessor635.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:116)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy214.doFilter(Unknown Source)
at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.repo.web.filter.beans.NullFilter.doFilter(NullFilter.java:68)
at sun.reflect.GeneratedMethodAccessor635.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:116)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy214.doFilter(Unknown Source)
at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
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:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
at java.lang.Thread.run(Thread.java:619)
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.example.org/side"
xmlns:si="http://www.example.org/side"
elementFormDefault="qualified">
<xs:element name="sideBar">
<xs:complexType>
<xs:sequence>
<xs:element name="phoneNumber" type="xs:normalizedString" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
(phone.ftl)
<#ftl ns_prefixes={"D", "http://www.example.org/side"}>
<h2>Contact Number:</h2>
<p>${sideBar.phoneNumber}</p>
<p><a href="contact.html" target="blank">Contact us</a></p>
01-06-2011 03:54 PM
lockOwner = avmLockService.getLockOwner(storeId, storePath);
/*bse: to avoid NPE when there is not locked data. Moved inside the conditional*/
if (lockOwner != null)
{
Map<String, String> lockData = avmLockService.getLockData(storeId, storePath);
currentLockStore = lockData.get(WCMUtil.LOCK_KEY_STORE_NAME);
if (logger.isDebugEnabled())
…
Actually the class RegenerateResult.java require a not null lockOwner in the constructor method, so we must add an 'else' sentence in the above conditional where if not exist a lockOwner, we assign the current user as lockOwner.
else
{
/*bse: to have a lockOwner, as this is required*/
lockOwner = username;
}
result.add(new RegenerateResult(ret, path, ret.render(this, path), lockOwner));
With the change mentioned above, we avoid the NPE, but now there is other error.
final ContentWriter writer = this.getAvmService().getContentWriter(this.createdPath, true);
/*bse: to update the lockOwner, as this is required*/
lockOwner = this.getAvmLockingService().getLockOwner(storeId, storePath);
this.content = XMLUtil.toString(this.getInstanceDataDocument(), false);
writer.putContent(this.content);
With these two changes, the edit webForm content works.
/*bse: to unlock the files when user click 'cancel'*/
// if (rr.getLockOwner() != null)
// {
// this.existingLocks.add(path);
// }
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.