cancel
Showing results for 
Search instead for 
Did you mean: 

Error when Document versioning is enabled

alfiennes
Champ in-the-making
Champ in-the-making
Please i get this system error when i enable versioning for an individual document.

javax.faces.FacesException: Cannot get value for expression '#{DialogManager.bean.versionHistory}'
caused by:
org.apache.jasper.JasperException: Cannot get value for expression '#{DialogManager.bean.versionHistory}'
caused by:
javax.faces.el.EvaluationException: Cannot get value for expression '#{DialogManager.bean.versionHistory}'
caused by:
javax.faces.el.EvaluationException: Exception getting value of property versionHistory of base of type : org.alfresco.web.bean.content.DocumentDetailsDialog
caused by:
javax.faces.el.EvaluationException: Bean: org.alfresco.web.bean.content.DocumentDetailsDialog, property: versionHistory
caused by:
java.lang.reflect.InvocationTargetException
caused by:
java.lang.ClassCastException: org.alfresco.service.cmr.repository.MLText cannot be cast to java.lang.String

Please does anyone know why? 

Thank you in advance.
8 REPLIES 8

janv
Employee
Employee
Which version of Alfresco are you using ? Did you perform an upgrade, if yes then from which version ? Do you have repeatable test data/steps ?

Thanks,
Jan

alfiennes
Champ in-the-making
Champ in-the-making
Thanks for the response.
I am using Alfresco Labs 3b and it's a fresh installation not an upgrade.

I don't know what happened, after fresh instalation, i added a file and tried to enable versioning and the error just came up.

Thank you

womer
Champ in-the-making
Champ in-the-making
I have the same error.  I started out installing the 3b tomcat bundle onto a RHEL5 server and got this error just walking through the getting started document.  I get the erroe after creating the versioning rule, copy a file into the space and try to view the details, that's when this error gets generated. I was getting a couple other unrelated errors too dealing with missing options (like soffice).  So I backed out and installed 2.1, and that one did not generate this error.  But the features I really want to test for my organization is in 3b.  Next I blew out the entire server and loaded FC8 with pretty much everything installed.  Took a little tweaking, but I got rid of the soffice error, fixed the java HEAP warning and the relative ./alf_dir warning, so now I have a clean, super clean… startup log.  Then I followed the getting started document again and got to this same point and and got the same error again.  Here's the trace:


20:26:31,823 User:womer ERROR [[localhost].[/alfresco].[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.ClassCastException: org.alfresco.service.cmr.repository.MLText cannot be cast to java.lang.String
        at org.alfresco.repo.version.common.VersionImpl.getDescription(VersionImpl.java:148)
        at org.alfresco.web.bean.content.DocumentDetailsDialog.getVersionHistory(DocumentDetailsDialog.java:279)
        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:597)
        at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:457)
        at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:85)
        at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java:535)
        at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
        at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:386)
        at org.alfresco.web.ui.common.component.data.UIRichList.getValue(UIRichList.java:157)
        at org.alfresco.web.ui.common.component.data.UIRichList.getDataModel(UIRichList.java:511)
        at org.alfresco.web.ui.common.component.data.UIRichList.bind(UIRichList.java:454)
        at org.alfresco.web.ui.common.renderer.data.RichListRenderer.encodeChildren(RichListRenderer.java:84)
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:527)
        at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:483)
        at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:364)
        at org.apache.jsp.jsp.content.document_002ddetails_jsp._jspx_meth_a_005frichList_005f1(document_002ddetails_jsp.java:4057)
        at org.apache.jsp.jsp.content.document_002ddetails_jsp._jspx_meth_a_005fpanel_005f11(document_002ddetails_jsp.java:3985)
        at org.apache.jsp.jsp.content.document_002ddetails_jsp._jspService(document_002ddetails_jsp.java:556)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:594)
        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:505)
        at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:965)
        at org.apache.jsp.jsp.dialog.container_jsp._jspService(container_jsp.java:618)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
        at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419)
        at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
        at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
        at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
        at java.lang.Thread.run(Thread.java:619)


This is repeatable.  I remove the rule and the file, then recopy the file into the DRAFTs space and I can select the properties page and view all the details.  Delete the file again, recreate the versioning rule, copy the file in there again, click to view the details and get the same error again.

Any suggestions?

alfiennes
Champ in-the-making
Champ in-the-making
I think I just solved mine. I blew out the server.  Setup Ubuntu 8.04 server and installed Sun-java5 instead of using Java6 and i have not been getting any errors again. SO the problem to me seems not to be from Alfresco but Java version. I think version 5 is more compatible than Version 6.

You can try installing Java version 5 instead of 6 and see how it goes.

womer
Champ in-the-making
Champ in-the-making
Were you using the same version of Ubuntu the last time too?  I ask because I've used the same version of java in all four of my installs.  I get the error in 3b, but not in 2.1 each time.

alfiennes
Champ in-the-making
Champ in-the-making
Yes,

I use the same version of Ubuntu all the time i had the errors, i only chnaged the jAVA version to version 5 in the new install and still stayed with my version of ubuntu and its been working fine

janv
Employee
Employee
This issue affects Alfresco Labs 3b. It is fixed in Alfresco 3.0 Enterprise and also fixed on latest HEAD.

Regards,
Jan

jmpe
Champ in-the-making
Champ in-the-making
You can try installing Java version 5 instead of 6 and see how it goes.

Thank you for this post. I came across this error this morning. Running the binary version of 3B on XPSP3 with JDK 6.
I downloaded JDK 5, updated my class path and the setpaths.bat reference and the problem was resolved.

Thanks again.