ZF3 - Class 'Zend\Json\Json' not found - zend-framework

In zf3 while trying to use JsonModel I get error
Fatal error: Uncaught Error: Class 'Zend\Json\Json' not found in
\vendor\zendframework\zend-view\src\Model\JsonModel.php:

You probably didn't include zendframework/zend-json. You can do this by running this in your terminal:
$ composer require zendframework/zend-json
zend-json, as many other components, is a suggested package when zend-view is installed. But since there are many more suggested packages you might have missed that message.

Related

Laravel 7 Fatal error: Uncaught RuntimeException: A facade root has not been set

I have looked at several answers suggested to a similar issue but nothing worked in my case.
FYI, this is my first project in Laravel 7, working fine on my Mac.
I have deployed the project on my server following this article.
When running the project on the web, I get the following error :
Fatal error: Uncaught RuntimeException: A facade root has not been set. in /usr/www/users/utopiqwvpw/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:258
Stack trace: #0 /usr/www/users/utopiqwvpw/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(425): Illuminate\Support\Facades\Facade::__callStatic('replaceNamespac...', Array) #1 /usr/www/users/utopiqwvpw/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(402): Illuminate\Foundation\Exceptions\Handler->registerErrorViewPaths() #2 /usr/www/users/utopiqwvpw/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(313): Illuminate\Foundation\Exceptions\Handler->renderHttpException(Object(Symfony\Component\HttpKernel\Exception\HttpException)) #3 /usr/www/users/utopiqwvpw/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(210): Illuminate\Foundation\Exceptions\Handler->prepareResponse(Object(Illuminate\Http\Request), Object(Symfony\Component\HttpKernel\Exception\HttpExcepti in /usr/www/users/utopiqwvpw/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 258
How can I fix it?
I finally found a solution that worked in my case.
delete the folder vendor
run composer update
run php artisan config:cache
run php artisan config:clear
Home page now displays but the routes do not work...
If the solution from #Paul Godard doesn't work, it could be a psr/log issue as mine.
My composer update added psr/log v2.0.0, which requires php8. However, my application is on php7.4
That gave me the exact error output like in the description
Fatal error: Uncaught RuntimeException: A facade root has not been set. in /usr/www/users/utopiqwvpw/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:258
My solution was to specify in composer.json that I'm using "psr/log": "^1.1.0"
Then run composer update
I got that error when my config folder was deleted by mistake. So after recovering the config folder. My project worked fine. You have to check if any folder is removed on which project is depending. Recover or copy it. It will work fine then.

I am getting Petalinux build warning for specific application

I am getting this warning when I build specific application, with petalinux:
WARNING: zynqRegs-1.0-r0 do_package_qa: QA Issue: /usr/bin/zynqRegs contained in package zynqRegs requires libc.so.6()(64bit), but no providers found in RDEPENDS_zynqRegs? [file-rdeps]
I added this line into zynqREgs.bb and still getting the Warning:
RDEPENDS_${PN} += "libc.so.6"
Any idea what this means and how to resolve it?
Thnaks
PetaLinux support is best sought on the meta-xilinx mailing list.
https://lists.yoctoproject.org/listinfo/meta-xilinx
Philip

raspiberry pi pjsip compile error: emmintrin.h no such file or directory

I'm trying to compile PJSIP (version 2.6) on my Raspberry Pi 3 model B.
While running make dep && make, I get this error:
../../webrtc/src/webrtc//system_wrappers/source/cpu_features.cc
../../webrtc/src/webrtc//modules/audio_processing/aec/aec_core_sse2.c:15:23: fatal error: emmintrin.h: No such file or directory
#include <emmintrin.h>
^
compilation terminated.
../../webrtc/src/webrtc//modules/audio_processing/aec/aec_rdft_sse2.c:13:23: fatal error: emmintrin.h: No such file or directory
#include <emmintrin.h>
^
compilation terminated.
How can this be fixed?
I ran into the exact same issue trying to do exactly what you are doing.
I found a few solutions online but was not satisfied with any of them. They all seemed like nasty hacks.
I looked into the configure script and discovered that sse2 is only required for compiling libwebrtc, which I did not need. Thus I simply disabled the compilation of libwebrtc alongside other things that I didn't need:
./configure --disable-sdl --disable-ffmpeg --disable-v4l2 --disable-openh264 --disable-libwebrtc
Note that --disable-v4l2 is referencing video4linux2.
After that the compilation completed successfully.
Looks like this was solved in this thread: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=178384

how to run BasicGenerator.scala in swagger

after running ./sbt assembly, I'm trying to run the
./bin/runscala.sh src/main/scala/com/wordnik/swagger/codegen/BasicPHPGenerator.scala ~/Desktop/myspec.json
and I get the following error:
./src/main/scala/com/wordnik/swagger/codegen/BasicPHPGenerator.scala:17: error: illegal start of definition
package com.wordnik.swagger.codegen
What is the cause and how can I fix it?
I'd strongly recommend using the develop_2.0 branch of swagger-codegen which uses Java, is simpler, and is under active development. Please try it first and see if you still experience a problem.
https://github.com/swagger-api/swagger-codegen/tree/develop_2.0

How to implement ArcMenu for Android?

I'm trying to get ArcMenu for my application.
The code runs great by itself, but I don't know how to make it work with another project.
It doesn't look like an Android Library project...
When trying to use this project with my own, this is what I get in Eclipse's console:
res/layout/arc_menu.xml:4: error: No resource identifier found for attribute 'fromDegrees' in package 'com.capricorn'
res/layout/arc_menu.xml:4: error: No resource identifier found for attribute 'toDegrees' in package 'com.capricorn'
res/layout/ray_menu.xml:4: error: No resource identifier found for attribute 'childSize' in package 'com.capricorn'
res/layout/ray_menu.xml:4: error: No resource identifier found for attribute 'leftHolderWidth' in package 'com.capricorn'
EDIT
I forked ArcMenu and published it on Github.
Now a better recode of it appeared: https://github.com/siyamed/android-satellite-menu
I recommend you use that one.
it seems that on your XML you didn't properly define the namespace.
for example for all the android framework stuff is:
xmlns:android="http://schemas.android.com/apk/res/android"
I suggest checking on your examples what would be for the ArcLibrary.