title: joomla Jfactory does not instantiate itselft in a joomla webapp ( joomla 2.5 )
body: <p>I am trying to building an external webApp to upload some products in Joomla! with virtuemart.<br>
  All works as expected but I have still a problem with <code>Jfactory::getApplication</code>.</p>
  
  <p>I have followed this tutorial:</p>
  
  <p><a href="http://docs.joomla.org/How_to_create_a_stand-alone_application_using_the_Joomla!_Platform" rel="nofollow">http://docs.joomla.org/How_to_create_a_stand-alone_application_using_the_Joomla!_Platform</a></p>
  
  <p>But when I go calling the <code>VmModel</code> on the <code>__construct</code> method it calls a <code>parent::__construct($config)</code>:</p>
  
  <pre><code>$this-&gt;_cidName = $cidName;
  // Get the pagination request variables
  $mainframe = JFactory::getApplication() ;
  $limit = $mainframe-&gt;getUserStateFromRequest('global.list.limit', 'limit', $mainframe-&gt;getCfg('list_limit'), 'int');
  </code></pre>
  
  <p>That raises the following error: </p>
  
  <blockquote>
    <p>vCall to undefined method JException::getUserStateFromRequest()</p>
  </blockquote>
  
  <p>If could help there is also:</p>
  
  <blockquote>
    <p>vNotice: Trying to get property of non-object in /home/giuseppe/homeProj/ModaNuovo/libraries/joomla/application/application.php on line 201</p>
  </blockquote>
  
  <p>raised by:</p>
  
  <pre><code>public static function getInstance($client, $config = array(), $prefix = 'J')
  {
      if (empty(self::$instances[$client]))
      {
          // Load the router object.
          $info = JApplicationHelper::getClientInfo($client, true);
  
          $path = $info-&gt;path . '/includes/application.php';
          if (file_exists($path))
  </code></pre>