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

Notification

Icon
Error

Options
Go to last post Go to first unread
davidgore  
#1 Posted : Sunday, April 7, 2013 9:41:12 PM(UTC)
davidgore

Rank: Newbie

Groups: Member
Joined: 12/27/2012(UTC)
Posts: 2

Thanks: 1 times
I'm a new user. Forgive me if I'm overlooking something simple. I've read and searched the forum, but can't seem to find an answer.

The following code renders an empty frame with the words "Error. Click for details" displayed in red. When clicked, a message box displays an error of "ClassNotFoundException" and references "com.aurigma.uploader.Uploader"

Below is the PHP I'm running. The script path is correct, and the jar and cab files are there. What am I missing?

Mac OS X, tested with Firefox and Safari.

Thank you in advance.

Code:

<?php
    $uploader = new Uploader("Uploader1");
    $uploader->setScriptsDirectory('../../../ImageUploaderPHP/Scripts');
    $uploader->getJavaControl()->setCodeBase ('../../../ImageUploaderPHP/Scripts/Uploader8.jar');
    $uploader->getActiveXControl()->setCodeBase ('../../../ImageUploaderPHP/Scripts/Uploader8.cab');

    $uploader->render();
?>
vitaly  
#2 Posted : Sunday, April 7, 2013 10:43:39 PM(UTC)
vitaly

Rank: Advanced Member

Groups: Member
Joined: 12/19/2012(UTC)
Posts: 164

Was thanked: 8 time(s) in 8 post(s)
Hello davidgore,

The error means that you have incorrect codeBase. Perhaps you have made a mistake in your path.
If scriptDirectory path is correct you can remove the code:
Code:

$uploader = new Uploader("Uploader1");
$uploader->setScriptsDirectory('../../../ImageUploaderPHP/Scripts');

// You can remove the code if above path is correct
//$uploader->getJavaControl()->setCodeBase ('../../../ImageUploaderPHP/Scripts/Uploader8.jar');
//$uploader->getActiveXControl()->setCodeBase ('../../../ImageUploaderPHP/Scripts/Uploader8.cab');

$uploader->render();
Best regards,
Vitaly Kustov
Aurigma Technical Support
thanks 1 user thanked vitaly for this useful post.
davidgore on 4/8/2013(UTC)
davidgore  
#3 Posted : Monday, April 8, 2013 7:15:41 AM(UTC)
davidgore

Rank: Newbie

Groups: Member
Joined: 12/27/2012(UTC)
Posts: 2

Thanks: 1 times
Vitaly,
Thank you for your prompt response to my issue. I have discovered that the problem was in fact path-related. I now have the Uploader rendering correctly.

In Post #2, you advised that I should only have to call setScriptsDirectory, and that I could comment out the two calls to setCodeBase. However, it only works for me when I make all 3 calls as shown below. If I leave out the setCodeBase calls, I get a ClassNotFoundException.

Code:

$uploader = new Uploader("Uploader1");

//configure ActiveX/Java Uploader
$uploader->setScriptsDirectory('../../ImageUploaderPHP/Scripts');
$uploader->getJavaControl()->setCodeBase ('../../ImageUploaderPHP/Scripts/Uploader8.jar');
$uploader->getActiveXControl()->setCodeBase ('../../ImageUploaderPHP/Scripts/Uploader8.cab');

$uploader->render();


Thank you,
David
vitaly  
#4 Posted : Monday, April 8, 2013 7:40:10 PM(UTC)
vitaly

Rank: Advanced Member

Groups: Member
Joined: 12/19/2012(UTC)
Posts: 164

Was thanked: 8 time(s) in 8 post(s)
davidgore,

I am sorry. Perhaps I have made mistake. Please make all 3 calls.
Best regards,
Vitaly Kustov
Aurigma Technical Support
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.