Customized Code For Profile Photo Is Not Working. (Doc ID 1433339.1)

Last updated on MARCH 08, 2017

Applies to:

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

Goal


One modified the getOriginalPhoto() method in SampleWebcenterSpacesExtention.jws > Profile Attributes > Application Sources > CustomProfileImpl.java. 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
*/
@Override
public byte[] getOriginalPhoto()
{

byte[] photo = null;
try
{
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 = in.read();
if (c < 0)
break;
out.write(c);
}

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

ex.printStackTrace();
}
catch (ProfileException e)
{

e.printStackTrace();
}

return photo;

}



Solution

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