cancel
Showing results for 
Search instead for 
Did you mean: 

Delete File Error

fracat71
Champ on-the-rise
Champ on-the-rise
Hi all,
I'm using

- ALFRESCO: Community Current version 3.2.0 (r2 2440) schema 3300
- OS: Windows xp 32 bit , RAM 2,5G , Intel Core Duo 2,1 GHz
- AS: Tomcat 6.0.18
- JAVA: Jdk 6.0_11. Heap 986,125MB
- DB :Mysql 5.1.35 Communit


When i try to delete a file from list it is ok.
When i try to delete a file from "view details" i have this error:

javax.faces.FacesException: java.lang.NullPointerException
caused by:
org.apache.jasper.JasperException: java.lang.NullPointerException
caused by:
java.lang.NullPointerException

Probably it is a wrong return page.
What i have to change?

Regards
20 REPLIES 20

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
can you give me rest of ex to see?

refilo
Champ in-the-making
Champ in-the-making
hi…
i have the same problem here…
is there any solution for this problem?

fracat71
Champ on-the-rise
Champ on-the-rise
Hi,
this is the error shown inside web page (not error inside logs).

javax.faces.FacesException: java.lang.NullPointerException
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:110)
at sun.reflect.GeneratedMethodAccessor437.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:122)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy197.doFilter(Unknown Source)
at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:88)
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:74)
at sun.reflect.GeneratedMethodAccessor437.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:122)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy197.doFilter(Unknown Source)
at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:88)
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: java.lang.NullPointerException
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.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)
… 38 more
Caused by: java.lang.NullPointerException
at org.alfresco.web.bean.BaseDetailsBean.getName(BaseDetailsBean.java:198)
at org.alfresco.web.bean.content.DocumentDetailsDialog.getContainerTitle(DocumentDetailsDialog.java:1037)
at org.alfresco.web.bean.dialog.DialogManager.getTitle(DialogManager.java:208)
at org.apache.jsp.jsp.dialog.container_jsp._jspService(container_jsp.java:179)
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)
… 48 more

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
well the problem is  null pointer hire:

return this.browseBean.getDocument();

because eather browseBean is null or documetn is null ( 100$% is brose bean)
document is current file.

if this is a bug you can fix it easy with  next code and overrriding DocumentDetailsDialog .



/**
    * Returns the Node this bean is currently representing
    *
    * @return The Node
    */
   public Node getNode()
   {

if(browseBean==null)
{
browseBean =(BrowseBean) FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "BrowseBean");
}
      return this.browseBean.getDocument();
   }

also check the faces-config-beans.xml for BaseDetailsBean and see if browse bean has been defined.

ET: 10 min.

fracat71
Champ on-the-rise
Champ on-the-rise
Hi,
i cannot attach my faces-config-beans.xml (too longer),
i dont' change it (it is the Alfresco 3.2r2 default) but i don't have the definition of BaseDetailsBean.

Regards.

refilo
Champ in-the-making
Champ in-the-making
well the problem is  null pointer hire:

return this.browseBean.getDocument();

because eather browseBean is null or documetn is null ( 100$% is brose bean)
document is current file.

if this is a bug you can fix it easy with  next code and overrriding DocumentDetailsDialog .



/**
    * Returns the Node this bean is currently representing
    *
    * @return The Node
    */
   public Node getNode()
   {

if(browseBean==null)
{
browseBean =(BrowseBean) FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "BrowseBean");
}
      return this.browseBean.getDocument();
   }

also check the faces-config-beans.xml for BaseDetailsBean and see if browse bean has been defined.

ET: 10 min.

hallo savic….
sorry… i little bit confuse… what file i should override?
i don't find any file with name DocumentDetailsDialog…
thanks…

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
You need some java coding , you do not override file -you overreide java class .

fracat71
Champ on-the-rise
Champ on-the-rise
well the problem is  null pointer hire:

return this.browseBean.getDocument();

because eather browseBean is null or documetn is null ( 100$% is brose bean)
document is current file.

if this is a bug you can fix it easy with  next code and overrriding DocumentDetailsDialog .



/**
    * Returns the Node this bean is currently representing
    *
    * @return The Node
    */
   public Node getNode()
   {

if(browseBean==null)
{
browseBean =(BrowseBean) FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "BrowseBean");
}
      return this.browseBean.getDocument();
   }

also check the faces-config-beans.xml for BaseDetailsBean and see if browse bean has been defined.

ET: 10 min.

I think that browseBean is null or documetn is null because Alfresco redirects on a deleted object: is it possible?
The same delete on a folder works fine.

Regards

nhsyim
Champ in-the-making
Champ in-the-making
Hi savic,

I've override DocumentDetailsDialog as suggested but the same error still happen, I also check the file faces-config-beans.xml in DocumentDetailsDialog already define BrowseBean.

Are there any other suggestions to fix this problem?

Thank you.



DocumentDetailsDialog.java


   public Node getNode()
   {
      if(browseBean==null)
      {
         browseBean =(BrowseBean) FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "BrowseBean");
      }      
      return this.browseBean.getDocument();
   }

faces-config-beans.xml

   <managed-bean>
      <description>
         Backing bean used by the document details dialog
      </description>
      <managed-bean-name>DocumentDetailsDialog</managed-bean-name>
      <managed-bean-class>org.alfresco.web.bean.content.DocumentDetailsDialog</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      <managed-property>
         <property-name>baseDetailsBean</property-name>
         <value>#{BaseDetailsBean}</value>
      </managed-property>
      <managed-property>
         <property-name>browseBean</property-name>
         <value>#{BrowseBean}</value>
      </managed-property>
      <managed-property>
         <property-name>nodeService</property-name>
         <value>#{NodeService}</value>
      </managed-property>
      <managed-property>
         <property-name>lockService</property-name>
         <value>#{LockService}</value>
      </managed-property>
      <managed-property>
         <property-name>versionService</property-name>
         <value>#{VersionService}</value>
      </managed-property>
      <managed-property>
         <property-name>copyService</property-name>
         <value>#{CopyService}</value>
      </managed-property>
      <managed-property>
         <property-name>ownableService</property-name>
         <value>#{OwnableService}</value>
      </managed-property>
      <managed-property>
         <property-name>checkOutCheckInService</property-name>
         <value>#{CheckoutCheckinService}</value>
      </managed-property>
      <managed-property>
         <property-name>navigator</property-name>
         <value>#{NavigationBean}</value>
      </managed-property>
     <managed-property>
         <property-name>multilingualContentService</property-name>
         <value>#{MultilingualContentService}</value>
      </managed-property>
      <managed-property>
         <property-name>contentFilterLanguagesService</property-name>
         <value>#{ContentFilterLanguagesService}</value>
      </managed-property>
      <managed-property>
         <property-name>editionService</property-name>
         <value>#{EditionService}</value>
      </managed-property>
      <managed-property>
         <property-name>permissionService</property-name>
         <value>#{PermissionService}</value>
      </managed-property>
   </managed-bean>