Discussion:
Symfony2 - ORA-01861: literal does not match format string
Iftah Abdelghafour
2013-10-09 10:32:18 UTC
Permalink
Hi everyone,

I moved my project from MySQL to Oracle, and I get this error when I try to
insert into the database.

This error is caused by the date format, in my form the date format is
dd/mm/yyyy, so my question is HOW DOES SYMFONY2 GET THE DATE FORMAT BEFORE
DB INSERT?

I added this date_default_timezone_set("Europe/Paris"); to my config.php
and app_dev.php, but nothing changed.

An exception occurred while executing 'INSERT INTO arborescence (IDNT_ARBR,
NOM_ARBR, DATE_CREATION, IDNT_SERV, IDNT_UTLS) VALUES (?, ?, ?, ?, ?)' with
params [7, "B", "2013-10-09 00:00:00", 7, 1]:

ORA-01861: literal does not match format string


Any ideas on how to solve this would be really appreciated.

Thank you very much.


Best Regards
iftah
--
--
If you want to report a vulnerability issue on Symfony, please read the procedure on http://symfony.com/security

You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/***@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Christophe COEVOET
2013-10-09 10:59:19 UTC
Permalink
Post by Iftah Abdelghafour
Hi everyone,
I moved my project from MySQL to Oracle, and I get this error when I
try to insert into the database.
This error is caused by the date format, in my form the date format is
dd/mm/yyyy, so my question is HOW DOES SYMFONY2 GET THE DATE FORMAT
BEFORE DB INSERT?
I added this date_default_timezone_set("Europe/Paris"); to my
config.php and app_dev.php, but nothing changed.
An exception occurred while executing 'INSERT INTO arborescence
(IDNT_ARBR, NOM_ARBR, DATE_CREATION, IDNT_SERV, IDNT_UTLS) VALUES
ORA-01861: literal does not match format string
Any ideas on how to solve this would be really appreciated.
Symfony does not do anything related to database insertion (it does not
do anything related to databases at all).
The handling of the database insertion is probably done by Doctrine in
your project (or by Propel in case you use it). the date format is
defined by the OraclePlatform of the DBAL project:
https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Platforms/OraclePlatform.php
If there is a bug for Oracle, please report it to the Doctrine issue
tracker: http://www.doctrine-project.org/jira/browse/DBAL Orache is not
the most tested platform (AFAIK, none of the core developers is using
Oracle in their projects) so it is possible that some bugs remains in it.
--
Christophe | Stof
--
--
If you want to report a vulnerability issue on Symfony, please read the procedure on http://symfony.com/security

You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/***@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Iftah Abdelghafour
2013-10-09 13:19:24 UTC
Permalink
Thank you for your reply,

I solved this problem by adding the following code to :
app/config/config.yml

services:
oracle.listener:
class: Doctrine\DBAL\Event\Listeners\OracleSessionInit
tags:
- { name: doctrine.event_listener, event: postConnect }

I hope someone is going to find this helpful.


Respect,
iftah
Post by Iftah Abdelghafour
Hi everyone,
I moved my project from MySQL to Oracle, and I get this error when I try
to insert into the database.
This error is caused by the date format, in my form the date format is
dd/mm/yyyy, so my question is HOW DOES SYMFONY2 GET THE DATE FORMAT BEFORE
DB INSERT?
I added this date_default_timezone_set("Europe/Paris"); to my config.php
and app_dev.php, but nothing changed.
An exception occurred while executing 'INSERT INTO arborescence
(IDNT_ARBR, NOM_ARBR, DATE_CREATION, IDNT_SERV, IDNT_UTLS) VALUES (?, ?, ?,
ORA-01861: literal does not match format string
Any ideas on how to solve this would be really appreciated.
Symfony does not do anything related to database insertion (it does not
do anything related to databases at all).
The handling of the database insertion is probably done by Doctrine in
your project (or by Propel in case you use it). the date format is defined
https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Platforms/OraclePlatform.php
If there is a bug for Oracle, please report it to the Doctrine issue
tracker: http://www.doctrine-project.org/jira/browse/DBAL Orache is not
the most tested platform (AFAIK, none of the core developers is using
Oracle in their projects) so it is possible that some bugs remains in it.
--
Christophe | Stof
--
--
If you want to report a vulnerability issue on Symfony, please read the
procedure on http://symfony.com/security
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to a topic in the
Google Groups "Symfony2" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/symfony2/gUAcheB9JaU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/groups/opt_out.
--
--
If you want to report a vulnerability issue on Symfony, please read the procedure on http://symfony.com/security

You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/***@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Christian Flothmann
2013-10-10 12:46:49 UTC
Permalink
Hi,

this seems to be a bug in the DoctrineBundle. If you use the MySQL
driver, the corresponding MysqlSessionInit is loaded properly in the
Dependency Injection extension. But this doesn't happen with the
OracleSessionInit class, if you use the Oracle driver.
Post by Iftah Abdelghafour
Thank you for your reply,
app/config/config.yml
class: Doctrine\DBAL\Event\Listeners\OracleSessionInit
- { name: doctrine.event_listener, event: postConnect }
I hope someone is going to find this helpful.
Respect,
iftah
Post by Iftah Abdelghafour
Hi everyone,
I moved my project from MySQL to Oracle, and I get this error when I try
to insert into the database.
This error is caused by the date format, in my form the date format is
dd/mm/yyyy, so my question is HOW DOES SYMFONY2 GET THE DATE FORMAT BEFORE
DB INSERT?
I added this date_default_timezone_set("Europe/Paris"); to my config.php
and app_dev.php, but nothing changed.
An exception occurred while executing 'INSERT INTO arborescence
(IDNT_ARBR, NOM_ARBR, DATE_CREATION, IDNT_SERV, IDNT_UTLS) VALUES (?, ?, ?,
ORA-01861: literal does not match format string
Any ideas on how to solve this would be really appreciated.
Symfony does not do anything related to database insertion (it does not do
anything related to databases at all).
The handling of the database insertion is probably done by Doctrine in
your project (or by Propel in case you use it). the date format is defined
https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Platforms/OraclePlatform.php
If there is a bug for Oracle, please report it to the Doctrine issue
tracker: http://www.doctrine-project.org/jira/browse/DBAL Orache is not the
most tested platform (AFAIK, none of the core developers is using Oracle in
their projects) so it is possible that some bugs remains in it.
--
Christophe | Stof
--
--
If you want to report a vulnerability issue on Symfony, please read the
procedure on http://symfony.com/security
You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to a topic in the
Google Groups "Symfony2" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/symfony2/gUAcheB9JaU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/groups/opt_out.
--
--
If you want to report a vulnerability issue on Symfony, please read the
procedure on http://symfony.com/security
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
--
If you want to report a vulnerability issue on Symfony, please read the procedure on http://symfony.com/security

You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/***@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Iftah Abdelghafour
2013-10-10 13:11:21 UTC
Permalink
Hi Christian,

Thank you for your explanation, I just submitted a issue to symfony github:
https://github.com/symfony/symfony/issues/9271

Thank you.

Best regards,
iftah


On Thu, Oct 10, 2013 at 1:46 PM, Christian Flothmann <
Post by Christian Flothmann
Hi,
this seems to be a bug in the DoctrineBundle. If you use the MySQL
driver, the corresponding MysqlSessionInit is loaded properly in the
Dependency Injection extension. But this doesn't happen with the
OracleSessionInit class, if you use the Oracle driver.
Post by Iftah Abdelghafour
Thank you for your reply,
app/config/config.yml
class: Doctrine\DBAL\Event\Listeners\OracleSessionInit
- { name: doctrine.event_listener, event: postConnect }
I hope someone is going to find this helpful.
Respect,
iftah
Post by Iftah Abdelghafour
Hi everyone,
I moved my project from MySQL to Oracle, and I get this error when I try
to insert into the database.
This error is caused by the date format, in my form the date format is
dd/mm/yyyy, so my question is HOW DOES SYMFONY2 GET THE DATE FORMAT
BEFORE
Post by Iftah Abdelghafour
Post by Iftah Abdelghafour
DB INSERT?
I added this date_default_timezone_set("Europe/Paris"); to my config.php
and app_dev.php, but nothing changed.
An exception occurred while executing 'INSERT INTO arborescence
(IDNT_ARBR, NOM_ARBR, DATE_CREATION, IDNT_SERV, IDNT_UTLS) VALUES (?,
?, ?,
Post by Iftah Abdelghafour
Post by Iftah Abdelghafour
ORA-01861: literal does not match format string
Any ideas on how to solve this would be really appreciated.
Symfony does not do anything related to database insertion (it does not
do
Post by Iftah Abdelghafour
Post by Iftah Abdelghafour
anything related to databases at all).
The handling of the database insertion is probably done by Doctrine in
your project (or by Propel in case you use it). the date format is
defined
https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Platforms/OraclePlatform.php
Post by Iftah Abdelghafour
Post by Iftah Abdelghafour
If there is a bug for Oracle, please report it to the Doctrine issue
tracker: http://www.doctrine-project.org/jira/browse/DBAL Orache is
not the
Post by Iftah Abdelghafour
Post by Iftah Abdelghafour
most tested platform (AFAIK, none of the core developers is using
Oracle in
Post by Iftah Abdelghafour
Post by Iftah Abdelghafour
their projects) so it is possible that some bugs remains in it.
--
Christophe | Stof
--
--
If you want to report a vulnerability issue on Symfony, please read the
procedure on http://symfony.com/security
You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to a topic in the
Google Groups "Symfony2" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/symfony2/gUAcheB9JaU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/groups/opt_out.
--
--
If you want to report a vulnerability issue on Symfony, please read the
procedure on http://symfony.com/security
You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to the Google Groups
"Symfony2" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
--
If you want to report a vulnerability issue on Symfony, please read the
procedure on http://symfony.com/security
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to a topic in the
Google Groups "Symfony2" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/symfony2/gUAcheB9JaU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/groups/opt_out.
--
--
If you want to report a vulnerability issue on Symfony, please read the procedure on http://symfony.com/security

You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/***@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Iftah Abdelghafour
2013-10-10 13:16:09 UTC
Permalink
Hi,

I submitted the issue to
https://github.com/doctrine/DoctrineBundle/issues/217

Thank you everyone.

Best regards,
iftah
Post by Iftah Abdelghafour
Hi Christian,
https://github.com/symfony/symfony/issues/9271
Thank you.
Best regards,
iftah
On Thu, Oct 10, 2013 at 1:46 PM, Christian Flothmann <
Post by Christian Flothmann
Hi,
this seems to be a bug in the DoctrineBundle. If you use the MySQL
driver, the corresponding MysqlSessionInit is loaded properly in the
Dependency Injection extension. But this doesn't happen with the
OracleSessionInit class, if you use the Oracle driver.
Post by Iftah Abdelghafour
Thank you for your reply,
app/config/config.yml
class: Doctrine\DBAL\Event\Listeners\OracleSessionInit
- { name: doctrine.event_listener, event: postConnect }
I hope someone is going to find this helpful.
Respect,
iftah
Post by Iftah Abdelghafour
Hi everyone,
I moved my project from MySQL to Oracle, and I get this error when I
try
Post by Iftah Abdelghafour
Post by Iftah Abdelghafour
to insert into the database.
This error is caused by the date format, in my form the date format is
dd/mm/yyyy, so my question is HOW DOES SYMFONY2 GET THE DATE FORMAT
BEFORE
Post by Iftah Abdelghafour
Post by Iftah Abdelghafour
DB INSERT?
I added this date_default_timezone_set("Europe/Paris"); to my
config.php
Post by Iftah Abdelghafour
Post by Iftah Abdelghafour
and app_dev.php, but nothing changed.
An exception occurred while executing 'INSERT INTO arborescence
(IDNT_ARBR, NOM_ARBR, DATE_CREATION, IDNT_SERV, IDNT_UTLS) VALUES (?,
?, ?,
Post by Iftah Abdelghafour
Post by Iftah Abdelghafour
ORA-01861: literal does not match format string
Any ideas on how to solve this would be really appreciated.
Symfony does not do anything related to database insertion (it does
not do
Post by Iftah Abdelghafour
Post by Iftah Abdelghafour
anything related to databases at all).
The handling of the database insertion is probably done by Doctrine in
your project (or by Propel in case you use it). the date format is
defined
https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Platforms/OraclePlatform.php
Post by Iftah Abdelghafour
Post by Iftah Abdelghafour
If there is a bug for Oracle, please report it to the Doctrine issue
tracker: http://www.doctrine-project.org/jira/browse/DBAL Orache is
not the
Post by Iftah Abdelghafour
Post by Iftah Abdelghafour
most tested platform (AFAIK, none of the core developers is using
Oracle in
Post by Iftah Abdelghafour
Post by Iftah Abdelghafour
their projects) so it is possible that some bugs remains in it.
--
Christophe | Stof
--
--
If you want to report a vulnerability issue on Symfony, please read the
procedure on http://symfony.com/security
You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to a topic in the
Google Groups "Symfony2" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/symfony2/gUAcheB9JaU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/groups/opt_out.
--
--
If you want to report a vulnerability issue on Symfony, please read the
procedure on http://symfony.com/security
You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to the Google
Groups
Post by Iftah Abdelghafour
"Symfony2" group.
To unsubscribe from this group and stop receiving emails from it, send
an
Post by Iftah Abdelghafour
For more options, visit https://groups.google.com/groups/opt_out.
--
--
If you want to report a vulnerability issue on Symfony, please read the
procedure on http://symfony.com/security
You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to a topic in the
Google Groups "Symfony2" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/symfony2/gUAcheB9JaU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/groups/opt_out.
--
--
If you want to report a vulnerability issue on Symfony, please read the procedure on http://symfony.com/security

You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/***@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Loading...