[Building Sakai] profile image urls and direct database updates

Steve Swinsburg steve.swinsburg at gmail.com
Sat Nov 10 17:46:22 PST 2012


Hi Ron
There is the standard hibernate cache but I've done what you do, manually editing the records, and it gets updated ok. Strange it is still showing the old image after a restart, that means the old image is still persisted somewhere. 

Have you any odd cache settings, or overflow to disk enabled for example?

Cheers 

Sent from my iPhone

On 10/11/2012, at 10:22, Ron Peterson <rpeterso at mtholyoke.edu> wrote:

> On Wed, Nov 7, 2012 at 2:43 PM, Steve Swinsburg <steve.swinsburg at gmail.com> wrote:
>> So are you saying that if you have a URL set through the UI, it works fine, but if you change that URL directly in the db record, then it still shows the old URL? 
>> 
>> Are you sure the save is happening in the database when you do it manually? There is no cache on those records, probably should be, but what you are describing is impossible.
> 
> Seems like it should be impossible yes.  But that is what is happening.  This is Oracle 10g, if that counts for anything.  I'm wondering if it's a jdbc connection pooling caching transaction level something or other.  I really don't get it.  I'm doing the updates via sql developer.  A query via sql developer to confim the update happened.  Maybe sql developer is being wierd - I should try doing a query via sql*plus I suppose.
> 
> Not two user records either.  (Records are unique on user_uuid, IIRC)
> 
> This is my oracle config, fwiw:
> 
> vendor at org.sakaiproject.db.api.SqlService=oracle
> driverClassName at javax.sql.BaseDataSource=oracle.jdbc.driver.OracleDriver
> hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
> 
> # For improved Oracle performance, implementers using Oracle should strongly consider
> # enabling all the following settings just as they appear (suggestion from the University of Michigan).
> validationQuery at javax.sql.BaseDataSource=
> defaultTransactionIsolationString at javax.sql.BaseDataSource=
> testOnBorrow at javax.sql.BaseDataSource=false
> 
> R.
>  
>> 
>> Could it be browser caching? 
>> 
>> Cheers
>> Steve
>> 
>> Sent from my iPhone
>> 
>> On 08/11/2012, at 2:33, Ron Peterson <rpeterso at mtholyoke.edu> wrote:
>> 
>>> profile2.picture.max=2
>>> profile2.convert=false
>>> profile2.picture.change.enabled=true
>>> profile2.picture.type=url
>>> profile2.privacy.change.enabled=true
>>> profile2.invisible.users = postmaster
>>> profile.manager.integration.bean=org.sakaiproject.profile2.legacy.ProfileManager
>>> profile2.official.image.enabled=false
>>> profile2.official.image.source=provider
>>> profile2.official.image.attribute=jpegPhoto
>>> 
>>> For the accounts I'm testing the eid and internal id are the same, e.g. 'rpeterso'.  I'm leaving the thumbnail column at null.
>>> 
>>> The database record updates if I use the UI to indicate a new URL.  But if I update that record for that user with a direct database update, that update is never seen, even if I do the update with sakai completely shut off.
>>> 
>>> R.
>>> 
>>> On Mon, Nov 5, 2012 at 6:07 PM, Steve Swinsburg <steve.swinsburg at gmail.com> wrote:
>>>> Hi Ron
>>>> Can you send the sakai.properties that you have for profile2 and a sample of the data in the relevant db table, you can replace the URL. Are you using uuids or eids for the value for the user in that table?
>>>> 
>>>> When you say old values, do you mean the default image is being shown? 
>>>> 
>>>> Also if you go to /direct/profile/userid/image what do you get?
>>>> 
>>>> Cheers
>>>> Steve
>>>> 
>>>> Sent from my iPhone
>>>> 
>>>> On 06/11/2012, at 9:13, Ron Peterson <rpeterso at mtholyoke.edu> wrote:
>>>> 
>>>>> Yes, those are all set correctly.
>>>>> 
>>>>> R.
>>>>> 
>>>>> On Mon, Nov 5, 2012 at 4:49 PM, Adrian Fish <adrian.r.fish at gmail.com> wrote:
>>>>>> Hi Ron,
>>>>>> 
>>>>>> Have you set the appropriate properties in your sakai.properties? There are a few relating to profile images.
>>>>>> 
>>>>>> 
>>>>>> Here's the Confluence page listing the properties:
>>>>>> https://confluence.sakaiproject.org/display/PROFILE/Profile2-Settings
>>>>>> 
>>>>>> The one you may need is:
>>>>>> 
>>>>>> profile2.picture.type=url
>>>>>> 
>>>>>> Hope that does the trick.
>>>>>> 
>>>>>> Cheers,
>>>>>> Adrian.
>>>>>> 
>>>>>> 
>>>>>> On 5 November 2012 21:26, Ron Peterson <rpeterso at mtholyoke.edu> wrote:
>>>>>>> I'm trying to update people's profile picture URL's (on my test server) by directly setting the value of the 'url_main' column in the profile_images_external_t table.  If I do this, the changes are not reflected in the profile2 tool.  I imagine hibernate or something is caching the data somewhere.  But I don't know who might be caching this, or how.  I've tried shutting down tomcat, updating the database, deleting all .ser files under tomcat, but still the old values appear in the UI.
>>>>>>> 
>>>>>>> So - how can I bulk push a bunch of URL's to the profile2 tool?  Is it hibernate caching that's biting me?  If so, how can I clear the cache?  If not hibernate, then what?  How do old values keep coming back after I've directly updated the database?
>>>>>>> 
>>>>>>> R.
>>>>>>> 
>>>>>>> 
>>>>>>> _______________________________________________
>>>>>>> sakai-dev mailing list
>>>>>>> sakai-dev at collab.sakaiproject.org
>>>>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>>>> 
>>>>>>> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>>>>> 
>>>>> _______________________________________________
>>>>> sakai-dev mailing list
>>>>> sakai-dev at collab.sakaiproject.org
>>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>> 
>>>>> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20121111/41c15033/attachment.html 


More information about the sakai-dev mailing list