Question: I am using captcha and I want to create a captcha using the cpatcha helper!I read the user guide and write a piece of code,but it fails to create an captcha,also here is no error displayed on the page,so I just can't find where I am wrong,my code is as follows:

```
public function captcha(){
        $this->load->helper('captcha');

        $vals=array(
            'word'=>'0123456789',
            'img_path'=>base_url('asserts/cpatcha').'/',
            'img_url'=>base_url('asserts/cpatcha').'/',
            'img_width'=>150,
            'img_height'=>30,
            'expiration'=>7200
            );

        var_dump($vals);
        $cap=create_captcha($vals);
        var_dump($cap['image']);
    }

```

as I print the two variables,the result displayed on the page is as follows:

```
array (size=6)
  'word' => string '0123456789' (length=10)
  'img_path' => string 'http://wrecruit.tudouya.com/asserts/cpatcha/' (length=44)
  'img_url' => string 'http://wrecruit.tudouya.com/asserts/cpatcha/' (length=44)
  'img_width' => int 150
  'img_height' => int 30
  'expiration' => int 7200

null

```

Answer: 
It looks like derby locking issue. you can temporarily fix this issue by deleting the lock file inside the directory `/var/lib/hive/metastore/metastore_db`. But this issue will also occur in future also

`sudo rm -rf /var/lib/hive/metastore/metastore_db/*.lck`

With default hive metastore embedded derby, it is not possible to start multiple instance of hive at the same time. By changing hive metastore to mysql or postgres server this issue can be solved.

See the following cloudera documentation for changing hive metastore

<http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH4/4.2.0/CDH4-Installation-Guide/cdh4ig_topic_18_4.html>
I've encountered similar error when I forgot about another instance of `spark-shell` running on same node.