Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369097 - NPE attempting to set profile email address
Summary: NPE attempting to set profile email address
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Server (show other bugs)
Version: 0.4   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.4 M2   Edit
Assignee: Malgorzata Janczarska CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-19 10:34 EST by John Arthorne CLA
Modified: 2012-01-20 05:36 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2012-01-19 10:34:51 EST
I20120118-2230

Attempting to set my email address on the profile page failed. I found this in the server log:

java.lang.NullPointerException
        at org.eclipse.core.internal.runtime.Activator.getURLConverter(Activator.java:333)
        at org.eclipse.core.runtime.FileLocator.resolve(FileLocator.java:227)
        at org.eclipse.orion.server.useradmin.UserEmailUtil$EmailContent.<init>(UserEmailUtil.java:63)
        at org.eclipse.orion.server.useradmin.UserEmailUtil.sendEmailConfirmation(UserEmailUtil.java:132)
        at org.eclipse.orion.server.useradmin.servlets.UserHandlerV1.handleUserPut(UserHandlerV1.java:258)
        at org.eclipse.orion.server.useradmin.servlets.UserHandlerV1.handleRequest(UserHandlerV1.java:95)
        at org.eclipse.orion.server.useradmin.servlets.UserHandlerV1.handleRequest(UserHandlerV1.java:1)
        at org.eclipse.orion.server.useradmin.servlets.ServletUserHandler.handleRequest(ServletUserHandler.java:49)
        at org.eclipse.orion.server.useradmin.servlets.ServletUserHandler.handleRequest(ServletUserHandler.java:1)
        at org.eclipse.orion.server.useradmin.servlets.UserServlet.doGet(UserServlet.java:63)
        at org.eclipse.orion.server.useradmin.servlets.UserServlet.doPut(UserServlet.java:76)
Comment 1 John Arthorne CLA 2012-01-19 10:36:22 EST
Here is the server configuration from that build:

mail.smtp.host=mail.eclipse.org
mail.smtp.port=25
mail.smtp.user=orion-admin
mail.smtp.password={password}
mail.smtp.auth=false
mail.from=orion-admin@eclipse.org
Comment 2 Malgorzata Janczarska CLA 2012-01-19 11:42:35 EST
Strange, it seems that this invocation:
UserAdminActivator.getDefault().getBundleContext().getBundle().getEntry(fileName) returned null. I used a path relative to top project folder in fileName. I changed it to absolute path, so maybe this will help. I can't reproduce it on localhost. I'm pretty sure that file exists.
Could you verify after build tomorrow if NPE is still thrown?
Comment 3 John Arthorne CLA 2012-01-19 11:54:32 EST
(In reply to comment #2)
> I used a path relative to top project folder in fileName. I
> changed it to absolute path, so maybe this will help. I can't reproduce it on
> localhost. I'm pretty sure that file exists.
> Could you verify after build tomorrow if NPE is still thrown?

A relative path is correct. The problem is that you haven't included the "emails" folder in build.properties. The bin.includes needs to add this folder so that the built bundle will include it.
Comment 4 John Arthorne CLA 2012-01-19 15:19:17 EST
(In reply to comment #3)
> A relative path is correct. The problem is that you haven't included the
> "emails" folder in build.properties. The bin.includes needs to add this folder
> so that the built bundle will include it.

Fixed:

http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=b1d95f972deed6a6b6174e7307be939ff0fdda97
Comment 5 Malgorzata Janczarska CLA 2012-01-20 03:01:53 EST
Thanks John! I didn't even think about it.
Comment 6 Malgorzata Janczarska CLA 2012-01-20 05:36:29 EST
.