0

I have been creating a component that will manage some data on my amazon webservice and I would like to use the amazon library on working with it but I have been encountering an error here is the error:

Fatal error: Class 'JView' not found in C:\xampp\htdocs\joomla1\administrator\components\com_amazon\views\amazon\view.html.php on line 8

here the code coming from the view:

jimport('joomla.application.component.view');
class AmazonViewAmazon extends JView{
    function display()
    {
        $this->setLayout('table_layout');
        parent::display();
    }
}

It's weird cause the error will only happen when I require the sdk library from the amazon package here is the controller code I have:

jimport('joomla.application.component.controller');

class AmazonController extends JController
{
    function display()
    {
        require_once(JPATH_COMPONENT.DS.'lib'.DS.'amazon'.DS.'sdk.class.php');

        parent::display();
    }
}

If I try to comment out the require_once statement from the code above the component will load successfully, is there anyone who is able to encounter the same problem I'm encountering or anyone who has knowledge about how to resolve it? any answer is highly appreciated. :)

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Christopher Pelayo
  • 792
  • 11
  • 30
  • well there is something happening in the amazon library that maybe causing the problem what I just did is load all the needed libraries for the sqs service to run I dig on the sdk and comment out this code: spl_autoload_register(array('CFLoader', 'autoloader')); I can't find the code that is causing the problem so I just dig into the amazon library and load all the needed files just to run the amazon sqs service now it's working on joomla 1.5 component. XD – Christopher Pelayo Nov 16 '11 at 06:09

1 Answers1

0

I impacted the same problem here. Tried to fix it with namespaces which did no help, so I switched to this solution http://undesigned.org.za/2007/10/22/amazon-s3-php-class

It's pretty simple and does the trick perfectly.

Community
  • 1
  • 1
user1520978
  • 81
  • 1
  • 3