-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPE in picture preview #6
Comments
Hi Klemens, in Eclipse open it as a maven project. Btw. very similar error I've fixed in 5e5cb5a#diff-1 Are you sure you have the latest sources deployed? Thanks -- tom |
No, I am not sure. :) What I did: So, I am not sure if the plug-in is really up-to-date in the tomcat installation. Have you an idea how I can check this? thanks and bye, Another little detail: I had to install the maven extension "JRebel m2eclipse integration" that is used by fsrepo - maybe would be nice to mention this in the readme |
Yeah, the jRebel - I use it for debugging :) I'm surprised that you have to install the plugin into Eclipse to make it work. To be 100% sure: Then try to see if the error is still there & debug it in this case. From the stacktrace I presume that it tries to load file from the WebServlet in the VirtualHostFilter, which ends with NPE. Can you try it and get back to me with the result? Thank you!!!! -- tom |
Ahoj Tom .) I followed your procedure and think I found out something: First, the first access to a folder creates a listing of "neutral" Second, I still have the NPE but I can now see under what circumstances: But when I grant view rights for "Guest" and "Site Member" (to both .) I also found the reason of my faulty tomcat deploy routine - silly .) May I ask you one other question: I'd like to have a finde-grained I'll call it a day now, but can do some debugging tomorrow. :) thanks for the support, On Sun, May 6, 2012 at 3:51 PM, Tomáš Polešovský
|
Ahoj :) Thank you for the investigation. I've found the bug with thumbnails - it's calling default LocalRepository implementation and I don't care about local calls. Now it should be fixed - 1fe0c47 The other question - bulk permissions settings - there is currently no UI for this in the portal. But. You could use ACCESS permission in the Document Library & permissions.view.dynamic.inheritance in portal.properties ( https://github.com/liferay/liferay-portal/blob/6.1.0-ga1/portal-impl/src/portal.properties#L3536). The sad think here is that I haven't implemented it yet. So you can't use it right now. But using this you can then easily set at least VIEW permission hierarchically - in a tree. |
When I apply your fix for the issue I have report (Fixing NPE when PermissionChecker is not initialized) image thumbnail and preview work good but now after apply the fix about this issue, some thumbnails and preview stop working, and I receive error of this kind: 13:13:39,685 INFO [PortalImpl:4873] Current URL /documents/127897/127924/GECAD1280x1024.bmp?version=1.0&t=1146137985519&imageThumbnail=1 generates exception: null The images in repository main folder work, but if they are in a sub-folder don´t work. EDIT: I replaced LocalFileSystemPermissionsUtil.java with the old code and now is working, something you have change broke this. And about a thing McAviti have said: "First, the first access to a folder creates a listing of "neutral" I like that too, because is annoying do constantly refresh to load all images thumbnails. |
Ahoj I debugged a little into the thing and found the following: in a getData(..) method, line 75:
In the Expando Proxy class the following Exception is being thrown:com.liferay.portal.security.auth.PrincipalException: PermissionChecker not initializedThe stack trace there is:Daemon Thread http-bio-8080-exec-7 org.apache.tomcat.util.threads.TaskThread(java.lang.Thread).run() line: 662Then in this class (ExpandoBridgeImpl, line 177) the Exception is Then the variable "data" is return, but is obviously null. And then it happens what has to happen:cz.topolik.fsrepo.LocalFileSystemRepository.getFileFromExpando(com.liferay.portal.model.RepositoryEntry) line: 915In the line:String file = value.substring(value.indexOf("-") + 1);value is null and we get the NPE. So - the originating PrincipalException is causing the problem, and I hope my long story was not too confusing.... |
Hi guys, thank you for finding this. I'm going to reopen the issue. Klemens, thank you - I now understand what's going on but currently don't know how to fix it. I will need to go deeper into the code. Seems that I can't use ExpandoBridge in these system calls, because I need call to Expando_LocalService. I assume ExpandoBridgeImpl use Expando_Service. |
Should be fixed by 10a807d. Thx! |
I can confirm this. ~k On Sun, Jun 3, 2012 at 2:47 PM, Tomáš Polešovský
|
Sorry for raising an issue, but there is no forum here, and I do not know how to ask otherwise.
I have the latest source and deployed it to the local tomcat. But when opening a media gallery I see the following errors (one for each graphics file) in the log:
03:04:33,251 INFO [PortalImpl:4873] Current URL /documents/26389/26390/g3.jpg?version=1.0&t=1160233067000&imageThumbnail=1 generates exception: null
Unfortunaetly I have not stack trace in the log.
Do you use Eclipse for the Hook development? Can you possibly direct me to a site where it is described how to create a Eclipse project for a hook for an existing project? The Liferay Eclipse plug-in refuses to create a new project from my local git repo, saying that the directory is "wrong". If I can get that to work it would be nice to remote debug the tomcat process, maybe.
Sorry for the beginners questions, I am not yet familiar with Liferay, git and Maven... :)
~klemens
The text was updated successfully, but these errors were encountered: