Wednesday, 22 April 2015

Another quick lesson in media objects

Here is a nice example of a media object that does not work the first time…

image

Normal JDE screen with normal attachments.

The fact is we’ve upgraded and these attachments have not been moved to the new location.  Therefore they are still pointing to the old location (funny that).  I’m going somewhere, please stay with me.  The OLD location let’s say \\oldservername\htmlupload is NOT available from the 910 web servers.  So, when we try and look at the attachment, we get the following:

image

This is the web server telling us that it cannot get to the attachment.  Media Object Fetch Image Failed!  Noooo.

So the JAS instance cannot get to the location that is saved in the F00165 for this record.  Check the MO record out with a query like the below (it might take a while).

select * from proddta.F00165 where gdgtfilenm like '%FILE-10-68-191-84-5219925678619586-1427694405303.xlsx';

We also get a handy message in server manager:

22 Apr 2015 15:57:59,184[SEVERE][JAS]Error: MediaObject file not found or accessable: \\nsgshsjdncls01\AR\E812\MediaObjects\HTMLUpload\FILE-10-68-191-84-5219925678619586-1427694405303.xlsx Corrective Action :Verify the Application Server service is running under a valid domain user ID.

But, JDE is not giving up – and neither should you!


image


The circled bit is the link that we are dealing with below

<a type="application/octet-stream" href="/jde/moqueue/nsgshsjdncls01/AR/E812/MediaObjects/HTMLUpload/FILE-10-68-191-84-5219925678619586-1427694405303.xlsx?stackId=1&amp;File=%2Fnsgshsjdncls01%2FAR%2FE812%2FMediaObjects%2FHTMLUpload%2FFILE-10-68-191-84-5219925678619586-1427694405303.xlsx">Hold down the Control key, and click here to save this media object</a>

You can see that the file link above (File=%2Fnsgshsjdncls01%2FAR%2FE812%2FMediaObjects%2FHTMLUpload%2FFILE-10-68-191-84-5219925678619586-1427694405303.xlsx) is actually a link to the old location.  So JDE get’s angry and lets you use your browser credentials to try and grab the file.  Honestly this is a better way of doing it – want to know why?  You don’t have 100000 MO’s sitting in the  “C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\servers\JDEPD_8080\stage\JDEPD_8080\app\webclient.war\moqueue” directory of your JAS servers – that NEVER get cleaned up.


The wrap is my PC can see the old MO location and therefore drag the attachment back to my browser.  This fools everyone to thinking that their MO’s are okay – until you decommission your old deployment server and everything goes POP!


Also, the JVM does not take the hit on loading the content into memory, it’s just your browser – this is win / win to me.

1 comment:

Unknown said...

It looks like it's pointing to the local disk cached copy location in the exploded E1 war location.

Wouldn't a link to the old location be \\nsgshsjdncls01\AR...\FILE... or %5C%5Cnsgshsjdncls01%5CAR...%5CFILE... ?

Extending JDE to generative AI