• NullPointerException on adding documents

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #4627  by Anshul
 
Hi,

I have compiled and configured fresh code from svn on my local machine.

I am able to login successfully. I am able to add folder also but when I try to add documents it generates NullPointerException as following:
Code: Select all
2010-04-12 09:52:18,093 INFO  [STDOUT] INFO  es.git.openkm.module.direct.DirectDashboardModule - getUserDocumentsSize(1076396525670056587295-2641880071) 
2010-04-12 09:52:18,093 INFO  [STDOUT] INFO  es.git.openkm.module.direct.DirectDashboardModule - getUserDocumentsSizeCached(1076396525670056587295-2641880071) 
2010-04-12 09:52:18,093 INFO  [STDOUT] INFO  es.git.openkm.module.direct.DirectDashboardModule - getUserDocumentsSizeCached: 0 
2010-04-12 09:52:18,093 INFO  [STDOUT] INFO  es.git.openkm.module.direct.DirectDashboardModule - getUserDocumentsSize: 0 
2010-04-12 09:52:32,421 INFO  [STDOUT] ERROR es.git.openkm.frontend.server.OKMFileUploadServlet -  
java.lang.NullPointerException
	at es.git.openkm.module.direct.DirectDocumentModule.create(DirectDocumentModule.java:278)
	at es.git.openkm.api.OKMDocument.create(OKMDocument.java:68)
	at es.git.openkm.frontend.server.OKMFileUploadServlet.doPost(OKMFileUploadServlet.java:132)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	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:230)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
Attachments
err-add doc.png
err-add doc.png (26.58 KiB) Viewed 2471 times
 #4653  by jllort
 
Which exact OpenKM version 4.0 or 4.1 ? put here your svn url.

Which kind of file are you uploading, can you send us to try it.

Could you try uploading in demo.openkm.com to see if there appears the error too ?
 #4689  by jllort
 
Sure you're doing something bad.

I've downloaded a fresh OpenKM 4.0 version, exploded, replaced OpenKM.war file by actual 4.0/trunk, started and uploaded successfully a file.

There's no problem in actual 4.0/trunk if you make OpenKM.war file successfully sure must upload the file without problems.

Ensure you're compiling with jdk 1.6 and run with same version jboss, take a look not appears any problem on eclipse problems tab, etc... you've got some extrange problem.

1- Ensure in your actual testing computer the openkm 4.0 without changes starts well and can upload files ( with it you're sure problem is not on your computer environment, etc... )
2- After it take a look at eclipse and ensure you've compiling with right jdk, etc.. and you've not got any error ... after it replacing OpenKM.war 4.0 to your generated must run well ( there's no reason for it in code )

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.