Customized Code For Profile Photo Is Not Working.

(Doc ID 1433339.1)

Last updated on MARCH 08, 2017

Applies to:

Oracle WebCenter Portal - Version: and later   [Release: 11g and later ]
Information in this document applies to any platform.


One modified the getOriginalPhoto() method in SampleWebcenterSpacesExtention.jws > Profile Attributes > Application Sources > After deploying the code still it's fetching the photo from theold location, It's not using the new code. What could be the problem? Please find the code below :

* Override the photo
public byte[] getOriginalPhoto()

byte[] photo = null;
String profileEmployeeNumber = _profile.getEmployeeNumber();

InputStream in =
Thread.currentThread().getContextClassLoader().getResourceAsStream("/content/conn/UCM2/path/Contribution%20Folders/LADBS/Employee Photo" +
profileEmployeeNumber +".jpg");

if (in != null)

ByteArrayOutputStream out = new ByteArrayOutputStream();
for (; ; )
int c =;
if (c < 0)

photo = out.toByteArray();
catch (IOException ex)

catch (ProfileException e)


return photo;



Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms