Class not found exception, when querying from doctrine - symfony

I am getting this really weird exception when I try to query from Doctrine:
Class string does not exist
500 Internal Server Error - ReflectionException
I have no idea what the problem could be. Have you seen anything similar?
I don't even know which details are relevant. I put it all here:
Here is the full stack trace (/mnt/data/Projects/F5 is where the project is located).
Here is the definition of fields in class User and here for class Email.

well , this surely jumps the eye
CRITICAL - Uncaught PHP Exception ReflectionException: "Class string does not exist" at /mnt/data/Projects/F5/vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/ProxyFactory.php line 233
also , https://github.com/symfony/symfony/issues/5732 had a similar error mensage and some insight on the error

Related

Not able to display 404 error in prod environment

When I try to throw a simple throw $this->NotFoundHttpException('We do not currently have a website configured at this address. Please visit our website for more information or contact our support team');in dev environment, it works fine. But when I do the same in prod environment I get 500 server error.
Any ideas?
Here are screenshots of my dev and prod log files
Note: 500 error only happens when I use www in the url in prod env. On using any other word eg. nike, this is what i get
Here is the dev env result for the normal www.blore.eduflats.com url
According to the symfony documentation in order to return a 404 from your controller you need to do the following:
throw $this->createNotFoundException('The product does not exist');
Whereas, you have
throw $this->NotFoundHttpException
The error you are seeing is telling you that NotFoundHttpException does not exist. To fix your problem simply replace NotFoundHttpException with createNotFoundException
You call Eduflas.. UniversityResolver->NotFoundHttpException();
If you want to trhow exception like this, you should declare it.
Symfony Controller have $this->createNotFoundException('Something Not found');
You can throw 404 like this:
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException
//...
throw new NotFoundHttpException("Not found");
Use this way to be sure that Exception exist and test it.
Anyway clear your production and dev cache to be sure you use "the same code".
Last thing that come to my head - its possible you override error pages and you make something to your error.html.twig or error404.html.twig and you got different pages.
EDIT
When i enter your http://blore.eduflats.com/ i got
"array(29) { ["HTTP_HOST"]=> string(18) "blore.eduflats.com" ["HTTP_USER_AGENT"]=> s..."
Anyway your dev env. got error too so how it can work on prod env...
If you throw NotFoundException in dev you should get symfony debugger page and this error. In porduction this error is catch with ExceptionController and display blank error page (user should not see exceptions, only 500 error)

You have requested a non-existent service "projet_rating.manager.rating"

I am getting the following error message: "You have requested a non-existent service "projet_rating.manager.rating" - Help please.
Two possibilities come to mind:
1) Somewhere in your application you have a controller that includes $this->container->get("projet_rating.manager.rating")
2) Somewhere in a config file you create a service that includes as an argument %"projet_rating.manager.rating"%.
If you're using an IDE that allows searching multiple files for a string, try searching for "projet_rating.manager.rating" in ...src/ or ...app/config

Wordpress parse error unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING

Mates, two days ago, the webhosting of a site i'm administrating went down.
Now it seems to be back working, but when I try to acces to wp-admin i recieve the following error message:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE,
expecting T_STRING or T_VARIABLE or T_NUM_STRING in
/home/ohmycut/public_html/wp-settings.php on line 80
These are lines from 75 to 85:
// Include the wpdb class and, if present, a db.php database drop-in.
require_wp_db();
// Set the database table prefix and the format specifiers for database table columns.
$GLOBALS['table_prefix'] = $table_prefix;
wp_set_wpdb_vars();
// Start the WordPress object cache, or an external object cache if the drop-in is present.
wp_start_object_cache();
I, honestly, don't understand why am i getting this error.
Any ideas?
thanks!
Try contacting the web hosting service to see if they can revert it to a state before the service went down.

RestKit: "mappingsByKeyPath" mutated while being enumerated

when i request multiple request to my web service , i received
this error
* Terminating app due to uncaught exception 'NSGenericException', reason: '* Collection <__NSCFDictionary: 0x8a32310> was mutated
while being enumerated.'
* First throw call stack: (0x1b02052 0x1f95d0a 0x1b01c21 0x5a38c 0x5342b 0x53b1a 0x53baa 0x13534e6 0x1353457 0x9b455ed9 0x9b4596de)
I think this is releated "singleton RKObjectManager" in RestKit when it receives multiple responses from web service. But i can't find solution for it.
Please help me solve this problem. Thanks advatange!
I had the same issue and it turned out I was mutating mappings while parsing objects. For more info checkout the comment on this github issue:
https://github.com/RestKit/RestKit/issues/345#issuecomment-8072999

getting HTTP Status 500 when location href or when forwarding from Servlet?

I get this error:
HTTP Status 500 -
type Exception report
message
descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: java.lang.NullPointerException
root cause
java.lang.NullPointerException
note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 3.1-b24 logs.
GlassFish Server Open Source Edition 3.1-b24
when I try to forward from a jsp to another jsp or when I forward in a servlet... The thing is that Y modify some datils from my page and I want to go back to the login-page and log in again to see if the update was successful !... Any ideas on this error ?... Thankx
A NullPointerException is a rather trivial exception and has actually nothing to do with JSP/Servlets, but with basic Java in general (look, it's an exception of java.lang package, not of javax.servlet package). It just means that some object is null while your code is trying to access/invoke it using the period . operator.
Something like:
SomeObject someObject = null;
someObject.doSomething(); // NullPointerException!
The 1st line of the stacktrace tells you in detail all about the class name, method name and line number where it occurred.
Fixing it is relatively easy. Just make sure that it's not null or bypass the access altogether. You should rather concentrate on why it is null and/or why your code is trying to deal with null.

Resources