• NullPointerException with LDAP

  • 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.
 #9603  by Catscratch
 
Yeah, that's right. But e.g. if I login as UserA OpenKM tries to read the email address of UserA out of the AD, right? Now if e.g. UserB has no email address, this shouldn't be a problem. Because only UserA tries to login. Or does OpenKM tries to get the email addresses of all users if only one user logs in?
I don't think so.

So UserA got an email address but OpenKM throws a nullpointer exception anyway. And that's the only thing I don't understand at the moment. :-)
 #9609  by jllort
 
OK :) it's not so simply.

I think login gets all users and all roles not only one user and role. That could be the reason why it happens this problem, I'm not totally sure about it. Althought it you've got other problem on security panels, because there must be shown all users and all roles.
 #9645  by Catscratch
 
Hello again,

I've tried a new way. I installed a new active directory with only 2
users which are in 1 OU.

There I also get the same error (NullPointerException) at
OKMWorkspaceServlet.java at the point:
workspace.setEmail(user.getEmail());

Both users got email addresses.

So what's wrong here?

Thank you and best regards,
Ronny
 #9677  by jllort
 
I think must increase log error, add ctegory in jboss-log4j.xml for LdapPrincipal class
 #9678  by pavila
 
Seems "user" is null. The execution should be traced to wee what happens. Try the log tip proposed by jllort to increase the log messages.
 #9679  by Catscratch
 
Hm, I added the following in the jboss-log4j.xml:
Code: Select all
<category name="com.openkm.principal.LdapPrincipalAdapter">
  <priority value="WARN" />
</category>
But there is no new error message in the log file (server.log of jboss). Only the stack trace I posted in my first message.
 #9681  by Catscratch
 
I already tried. But the same. I tried ERROR, WARN and DEBUG. And than I searched the log file (which is very very long) for something like "*ldap*". But no hit.
 #9768  by jllort
 
In this tedious scenario we might debug the application.
 #9804  by jllort
 
I think in developer guide is well explained, first you must configure your IDE environment ( eclipse galileo or helios, we're using both ). Configure maven, checkout project etc...
 #9835  by Catscratch
 
I hang on this step http://wiki.openkm.com/index.php/Checko ... Subversion

Everytime I check out the project eclipse downloads the files from the svn. Then the maven plugin starts with "importen maven projects" and there it stucks. And nothings happens for hours.

Edit: If I try to build it manually I get:
Code: Select all
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building OpenKM Web Application 5.0.4-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.019s
[INFO] Finished at: Fri Mar 25 16:23:56 CET 2011
[INFO] Final Memory: 10M/24M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project openkm: Could not resolve dependencies
 for project com.openkm:openkm:war:5.0.4-SNAPSHOT: Failure to find com.openkm:ex
tensions-full:jar:5.0 in http://repository.jboss.org/maven2 was cached in the lo
cal repository, resolution will not be reattempted until the update interval of
jboss.org has elapsed or updates are forced -> [Help 1]
 #9839  by jllort
 
into ext-lib there's some library that you must install manually with terminal take a look at install.sh there's the command you must execute to register some library into maven.
 #9851  by jllort
 
run from terminal
mvn clean package into your project checkout with eclipse closed.

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.