Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
allanbj  
#1 Posted : Monday, November 27, 2006 6:52:22 PM(UTC)
allanbj

Rank: Member

Groups: Member
Joined: 11/27/2006(UTC)
Posts: 5

In trying to implement the dual version IU we have bought I experience a strange problem. In the Java version it works fine the first time I upload a file but fails the second time. It first says "Waiting for retry..." and then finally it says "Image Uploader encountered some problem. If you see this message, contact web master.". I have tried in both IE 6.0 (by forcing Java) and Firefox 1.5. The samples you provide work fine though... I have made a custom upload pane using the sample script but have modified it a bit. I'm pasting the IU config and the Java console log. Are you able to see what the problem is, or give me some clue about where to look?

By the way, a more descriptive error message than "encountered some problem" would have been nice! :)

********************************************************
IU configuration:
********************************************************
Code:
var iu = new ImageUploaderWriter("ImageUploader1", 650, 185);
iu.activeXControlEnabled = false;  //force use of Java
iu.javaAppletEnabled = true;
iu.activeXControlCodeBase = "includes/ImageUploader4.cab";
iu.activeXControlVersion = "4,0,47,0";
iu.javaAppletCodeBase = "includes/";
iu.javaAppletCached = true;
iu.javaAppletVersion = "2.0.50.0";

iu.addParam("PaneLayout", "ThreePanes");
iu.addParam("FolderView", "Thumbnails");
iu.addParam("BackgroundColor", "#eff1f9");

iu.addParam("ShowDescriptions", "false");
iu.addParam("EnableRotate", "true");
iu.addParam("ShowButtons", "false");
iu.addParam("FolderPaneHeight", "-1"); //Hide standard upload pane
iu.addParam("AllowMultipleSelection", "false");
iu.addParam("MaxFileCount", "1");
iu.require_caption = true;
iu.default_caption = "<?php echo addslashes($prefilled_caption); ?>";
iu.addParam("EnableFileViewer", "false"); //false=doubleclick will add to upload list
iu.addParam("FileMask", "*.jpeg;*.jpg");
iu.addParam("MaxFileSize", "31457280");
iu.addParam("ThumbnailHorizontalSpacing", "3");
iu.addParam("PreviewThumbnailSize", "80");
iu.addParam("Action", "upload_multimedia_receive.php");  //Configure URL files are uploaded to
iu.addParam("RedirectUrl", "upload_multimedia.php?uploadresult=ok&pass=zEOIQgDF482hfT%2FW%2FQzg6nay%2BFWGz5soibudLmuRN8M2BO5SF%2FP5Mv69uOtPKOqE1OyhosJJqk4uEqFFZj2uuExdxen2eoS4O88p2gQd77fQ0%2Fl0hEaPwocBzMEoIxQkMf10CVKYeb5w4kpk1uWT3g%3D%3D");  //Configure URL where to redirect after upload
iu.addEventListener("UploadFileCountChange", "ImageUploader_UploadFileCountChange");
iu.addEventListener("BeforeUpload", "ImageUploader_BeforeUpload")
iu.fullPageLoadListenerName = "fullPageLoad";
iu.writeHtml();



********************************************************
Java console:
********************************************************
Code:
Reading additional form content
Exception occured
-----
Exception class: class java.security.AccessControlException
-----
access denied (java.lang.RuntimePermission preferences)
-----
java.security.AccessControlException: access denied (java.lang.RuntimePermission preferences)
	at java.security.AccessControlContext.checkPermission(Unknown Source)
	at java.security.AccessController.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPermission(Unknown Source)
	at java.util.prefs.Preferences.userRoot(Unknown Source)
	at java.util.prefs.Preferences.userNodeForPackage(Unknown Source)
	at com.aurigma.imageuploader.tools.a.b(Unknown Source)
	at com.aurigma.imageuploader.tools.a.b(Unknown Source)
	at com.aurigma.imageuploader.upload.b.a(Unknown Source)
	at com.aurigma.imageuploader.upload.b.b(Unknown Source)
	at com.aurigma.imageuploader.upload.b.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
-----
getResponseBodyAsString:4
Exception occured
-----
Exception class: class java.security.AccessControlException
-----
access denied (java.lang.RuntimePermission preferences)
-----
java.security.AccessControlException: access denied (java.lang.RuntimePermission preferences)
	at java.security.AccessControlContext.checkPermission(Unknown Source)
	at java.security.AccessController.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPermission(Unknown Source)
	at java.util.prefs.Preferences.userRoot(Unknown Source)
	at java.util.prefs.Preferences.userNodeForPackage(Unknown Source)
	at com.aurigma.imageuploader.tools.a.b(Unknown Source)
	at com.aurigma.imageuploader.tools.a.b(Unknown Source)
	at com.aurigma.imageuploader.upload.b.a(Unknown Source)
	at com.aurigma.imageuploader.upload.b.b(Unknown Source)
	at com.aurigma.imageuploader.upload.b.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
-----
getResponseBodyAsString:4
###Error occured###
Status=[ERROR]
Progress=[0]
ValueMax=[0]
Value=[0]
[ErrorPage]

[EndOfErrorPage]

********************************************************
********************************************************

Edited by user Wednesday, February 20, 2008 4:15:41 PM(UTC)  | Reason: Not specified

Alex Makhov  
#2 Posted : Monday, November 27, 2006 7:09:44 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

You have to use the setTimeout JavaScript function to start the upload process by using the custom button. Here is the code sample:
Code:
function onBtnClick()
{
	setTimeout("getImageUploader('ImageUploader1').Send();", 1000, "JavaScript");
}

Also it looks like there are some problems in the AdditionalForm processing on your page. Make sure that you did not add the non-form elements inside the <FORM>…</FORM> tags.

Edited by user Wednesday, February 20, 2008 4:23:50 PM(UTC)  | Reason: Not specified

Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
allanbj  
#3 Posted : Tuesday, November 28, 2006 4:31:43 PM(UTC)
allanbj

Rank: Member

Groups: Member
Joined: 11/27/2006(UTC)
Posts: 5

Adding the timeout did not make any difference. Also I tried to use the original script.js from the MultipleDescriptions sample but same problem persisted. So the problem cannot be the customizations in my form.

BUT - if I refresh the page with Ctrl-F5 in IE (just F5 makes no difference) the upload suddenly works again. So it seems like something Java stuff is "hanging in the air" from the first download - something is not being closed down properly - or being initiallized correctly the second time - and this prohibits it to continue with the second upload. Any ideas?
allanbj  
#4 Posted : Tuesday, November 28, 2006 4:56:07 PM(UTC)
allanbj

Rank: Member

Groups: Member
Joined: 11/27/2006(UTC)
Posts: 5

Now I discovered that your sample called BasicDemo works just fine (like I said in the first post) but the sample MultipleDescriptions have the exact same problem as my own implementation when I force it to use Java only.

So the issue is lying somewhere in the differences between these two scripts - and optionally some Java setting on my machine (even though they are default - I haven't messed around with them). It cannot be browser settings because both IE and Firefox react the same way.
allanbj  
#5 Posted : Tuesday, November 28, 2006 5:46:22 PM(UTC)
allanbj

Rank: Member

Groups: Member
Joined: 11/27/2006(UTC)
Posts: 5

I have now tested the sample MultipleDescriptions on 3 different completely independent webservers/computers and the same problem still occurs. So my guess is that if you try this sample yourself and you force it to use the Java version by setting iu.activeXControlEnabled = false, you will be able to reproduce this error yourself.
Alex Makhov  
#6 Posted : Tuesday, November 28, 2006 6:46:40 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

Why don’t you use the ActiveX version of Image Uploader on IE? Image Uploader for Java does not work well on IE but ActiveX version works fine.
Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
allanbj  
#7 Posted : Tuesday, November 28, 2006 7:59:15 PM(UTC)
allanbj

Rank: Member

Groups: Member
Joined: 11/27/2006(UTC)
Posts: 5

Sure, I will use ActiveX with IE when I go online with it, but the real problem is if people use other browsers like Firefox and Opera. At the moment those browsers cannot be used - except for uploading just one file. But that is not going to work in my situation.

There is a problem in the sample MultipleDescriptions and I think you should try to find out what it is. Everything works fine if you use the Java "Send" button, but as soon as you use javascript to start the upload the problem arises.

Regards,
Allan Jensen
Website developer for ShareHIM
Alex Makhov  
#8 Posted : Wednesday, November 29, 2006 5:36:53 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

We have added this bug information to our bug tracking system and the problem will be resolved in the next release. Thank you for the bug report.
Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
Phive_  
#9 Posted : Wednesday, January 17, 2007 3:30:12 PM(UTC)
Phive_

Rank: Member

Groups: Member
Joined: 1/17/2007(UTC)
Posts: 7

To add to this (further debugging information):

I noticed this same problem, but only with the Java version and only if I attempted to attach form elements. To be clear, the below code works with Active-X but NOT Java (it seems that Java Applet is not passing the vars to the upload page).

Code:
<form name="AlbInfo">
	<input type="hidden" name="AlbTitle" value="My Title">
	<input type="hidden" name="AlbDesc" value="My Desc.">
	<input type="hidden" name="AlbSite" value="100">
</form>


Javascript Excerpt:
Code:
//Append the the form
iu.addParam("AdditionalFormName", "AlbInfo");

If I comment out the "Append to form" line in my javascript - all goes well, everything works fine.

I resolved this by adding these 3 var's to my session scope (CFML)... not the best way to do things, but with this bug I don't have much of a choice. :ermm:

Edited by user Wednesday, February 20, 2008 4:24:30 PM(UTC)  | Reason: Not specified

Alex Makhov  
#10 Posted : Thursday, January 18, 2007 12:36:39 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

Anyway, the specified workaround with timeout works fine.
Also I would like to note that we have improved the additional form processing mechanism in Image Uploader for Java so there should not be any more problems when the user adds some non-form element (applet etc.) inside the form. The specified improvement will be available in Image Uploader 4.5.
Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.