Saturday 25 July 2009

Yet another juicy Alfresco Labs 3.1 stacktrace...

...which kept me busy for a couple of days.
I dumped it here for in case somebody else hits it.
So if you didn't find this post by googling an alfresco exception, you need to move along people, there is nothing to see here.

Without further ado, if you get the following exception:

javax.faces.FacesException: javax.faces.FacesException: Could not retrieve value of component with path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /jsp/dialog/container.jsp][Class: javax.faces.component.html.HtmlForm,Id: dialog][Class: javax.faces.component.UINamingContainer,Id: dialog-body][Class: org.alfresco.web.ui.common.component.UIPanel,Id: users-panel][Class: org.alfresco.web.ui.common.component.data.UIRichList,Id: users-list][Class: org.alfresco.web.ui.common.component.data.UIColumn,Id: _idJsp33][Class: javax.faces.component.html.HtmlOutputText,Id: _idJsp35]}
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:425)
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:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
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: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.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
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:619)
Caused by: org.apache.jasper.JasperException: javax.faces.FacesException: Could not retrieve value of component with path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /jsp/dialog/container.jsp][Class: javax.faces.component.html.HtmlForm,Id: dialog][Class: javax.faces.component.UINamingContainer,Id: dialog-body][Class: org.alfresco.web.ui.common.component.UIPanel,Id: users-panel][Class: org.alfresco.web.ui.common.component.data.UIRichList,Id: users-list][Class: org.alfresco.web.ui.common.component.data.UIColumn,Id: _idJsp33][Class: javax.faces.component.html.HtmlOutputText,Id: _idJsp35]}
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
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.doInclude(ApplicationDispatcher.java:535)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
at org.apache.jsp.jsp.dialog.container_jsp._jspService(container_jsp.java:637)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
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.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419)
... 19 more
Caused by: javax.faces.FacesException: Could not retrieve value of component with path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /jsp/dialog/container.jsp][Class: javax.faces.component.html.HtmlForm,Id: dialog][Class: javax.faces.component.UINamingContainer,Id: dialog-body][Class: org.alfresco.web.ui.common.component.UIPanel,Id: users-panel][Class: org.alfresco.web.ui.common.component.data.UIRichList,Id: users-list][Class: org.alfresco.web.ui.common.component.data.UIColumn,Id: _idJsp33][Class: javax.faces.component.html.HtmlOutputText,Id: _idJsp35]}
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(RendererUtils.java:227)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderOutput(HtmlTextRendererBase.java:69)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:57)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
at org.alfresco.web.ui.common.Utils.encodeRecursive(Utils.java:173)
at org.alfresco.web.ui.common.Utils.encodeRecursive(Utils.java:168)
at org.alfresco.web.ui.common.renderer.data.RichListRenderer$DetailsViewRenderer.renderListRow(RichListRenderer.java:292)
at org.alfresco.web.ui.common.renderer.data.RichListRenderer.encodeChildren(RichListRenderer.java:118)
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.users.users_jsp._jspx_meth_a_005frichList_005f0(users_jsp.java:659)
at org.apache.jsp.jsp.users.users_jsp._jspService(users_jsp.java:273)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
... 42 more
Caused by: javax.faces.el.EvaluationException: Cannot get value for expression '#{r.sizeLatest}'
at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:405)
at javax.faces.component.UIOutput.getValue(UIOutput.java:80)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(RendererUtils.java:223)
... 57 more
Caused by: javax.faces.el.EvaluationException: Exception getting value of property sizeLatest of base of type : org.alfresco.web.bean.repository.MapNode
at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:99)
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)
... 59 more
Caused by: java.lang.NullPointerException
at java.io.StringReader.(StringReader.java:33)
at org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl.indexProperty(ADMLuceneIndexerImpl.java:1037)
at org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl.createDocuments(ADMLuceneIndexerImpl.java:606)
at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerImpl.indexImpl(AbstractLuceneIndexerImpl.java:632)
at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerImpl.indexImpl(AbstractLuceneIndexerImpl.java:657)
at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerImpl.flushPending(AbstractLuceneIndexerImpl.java:789)
at org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl.doPrepare(ADMLuceneIndexerImpl.java:1591)
at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerImpl.prepare(AbstractLuceneIndexerImpl.java:472)
at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerAndSearcherFactory.prepare(AbstractLuceneIndexerAndSearcherFactory.java:783)
at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.beforeCommit(AlfrescoTransactionSupport.java:661)
at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:48)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:835)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:645)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:632)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:314)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:117)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy176.getUserUsage(Unknown Source)
at org.alfresco.web.bean.users.UsersBeanProperties.getUserUsage(UsersBeanProperties.java:290)
at org.alfresco.web.bean.users.UsersDialog$1.get(UsersDialog.java:410)
at org.alfresco.web.bean.repository.QNameNodeMap.get(QNameNodeMap.java:117)
at org.alfresco.web.bean.repository.MapNode.get(MapNode.java:157)
at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:81)
... 62 more


nice, hey.

I think its reported here
https://issues.alfresco.com/jira/browse/ETHREEOH-1846

To fix it, I built a newer version of org.alfresco.repo.search.impl.lucene.ADMLuceneIndexerImpl from the svn sources, and dumped it in the alfresco/WEB-INF/classes and it works!

Thursday 23 July 2009

get rid of glassfish master password

I've set up a webapp to be able to create-domain, deploy, test and delete-domain using the maven-glassfish-plugin.
The problem is that it insists on setting the master password.
Now its not possible to set the master password being used by the eclipse JavaEE glassfish plugin.
So when you try to start it from eclipse it asks for the master
password in the background:
Please enter the master password
After a while it times out and it says:
Server GlassFish at localhost failed to start.

I found out that you can tell glassfish to not ask the password anymore by doing:
asadmin change-master-password --savemasterpassword domain1
http://forums.java.net/jive/message.jspa?messageID=341172

However, I changed my admin password maven uses,
to be the real defaut master password: "changeit",
and now eclipse can start maven-created domains without me
having to --savemasterpassword
http://blogs.sun.com/alexismp/entry/what_is_a_glassfish_master

Tuesday 21 July 2009

more alfresco pain

This time I tried to send e-mails when new documents are added. I thought this would be simple. (With Alfresco labs 3.1)
First I got errors like:
20:08:32,529  ERROR [action.executer.MailActionExecuter]
Failed to send email to 'amanica@localhost'
as the address is incorrectly formatted

Eventually I figured out my test addresses are not acceptable to javamail. I had to setup amanica@localhost.dev before it worked.

Next I got the following:
20:08:33,310  ERROR [action.executer.MailActionExecuter]
Failed to send email to [root, test]
org.springframework.mail.MailPreparationException:
Could not prepare mail; nested exception is java.lang.NullPointerException
Caused by: java.lang.NullPointerException
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:599)
at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:388)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:332)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:347)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:336)
at org.alfresco.repo.action.executer.MailActionExecuter.executeImpl(MailActionExecuter.java:352

And I think setting a e-mail address for the admin user fixed that.

Thirdly it only wanted to send these rule e-mails from alfresco@alfresco.com, but if I copy slightly newer versions of
MailActionExecuter$1.class and MailActionExecuter.class into
${ALF_HOME}/tomcat/shared/classes/org/alfresco/repo/action/executer/
it works. I don't know if that breaks anything else in the process.

And finally, I'm still unhappy that they don't ship with oracle hibernate mapping files in the community edition, even in version 3.2 .
Caused by: java.lang.RuntimeException: Error occurred.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException
: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.sqlmap.client.SqlMapException: The <sqlmap> resource is missing: alfresco/ibatis/#resource.
dialect#/content-insert-SqlMap.xml
at org.alfresco.ibatis.HierarchicalSqlMapConfigParser.parse(HierarchicalSqlMapConfigParser.java:112)
at org.alfresco.ibatis.HierarchicalSqlMapClientFactoryBean.buildSqlMapClient(HierarchicalSqlMapClientFactoryBean.java:86)
</sqlmap>

Like eclipse and maven, its painfull but theres nothing better :(

Wednesday 8 July 2009

explore bazaar

The up an coming bzr explorer is really promising to become: version control for human beings!

I tried to do a commit in it today and the following was very nice:
  • I can have the diff and the commit windows open simultaneously to be able to referback. (this was a problem before for me because both wants to lock to branch)
  • The auto-completion of words and filenames is awesome.
I tried to take a snapshot but [fn]+[prt_sc] launched infinite ksnapthots :( (but thats another story). After some reboots, I tried again:



  • trying to find related revisions is almost impossible on the commandline (i.e. it took too long), but its so nice with qlog.
  • The commit progress is also ultra cool

Wishlist:
  • Save draft commit messages eg. every 30 seconds (like gmail). Anything can happen while or after you typed the message and before you hit commit eg. a power failure.
  • In my case, my computer basically crashed when I tried to make a snapshot and it launched the infinite ksnapshots. (bonus points for a [save now] button!)
  • [esc] should close qdiff windows
  • qannotate
    • ctrl+G should go to a line (like gannotate)
    • ctrl+F should start a search (like gannotate)

So far I made an alias to be able to launch it while at the branch in a terminal:
alias be='bzr explore . &'
But I suspect I'll have a bzr explore icon on my application launcher soon.

Version control is getting so cool that I'm be tempted to quit coding and become a full-time version-controllist. :-P whooa endorphin rush..