Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 369097

Summary: NPE attempting to set profile email address
Product: [ECD] Orion Reporter: John Arthorne <john.arthorne>
Component: ServerAssignee: Malgorzata Janczarska <malgorzata.tomczyk>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.4   
Target Milestone: 0.4 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

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
.