Issue
I'm facing a trouble with a table in a MySQL database when accessing it with Tomcat.
When I insert a new line using either phpmyadmin or mysql on command line it is stored normally in my table. If I do the same using the same statement over JSP/java it seems to be stored normally, and when I make a query over JSP/java I see the line I inserted. But this line cannot be seen on phpmyadmin or mysql command line. If I restart Tomcat this line disappears when I query via JSP.
It looks like my Tomcat is dealing with an image of the table and not the real table. I don't know if it's a bad option I used when I created the table with phpmyadmin
I'm using Tomcat7 and mysql-server-5.6 on a VPS. All tables are in the same database and i'm using the same pool database for all. All the rest of tables worked fine for years.
This would be the insert statement that is generating my Java code:
INSERT INTO Pedido (Id,IdSupervisor,Concepto,Importe,ImporteTotal,Moneda,TipoTransaccion,Terminal,Comercio,Fecha,URLAction,Dsdate,Dsterminal,Dsmerchantcode,Dsresponse,Dsorder,Dscurrency,Comments) VALUES (505,'0','null','0.0','0.0','null','null','null','null','1970-01-01','null','1970-01-01','null','null','null','null','null','null')
Solution
At the end, as I expected, it was something on how I created the messy table. Changing the storing engine from "innoDB" to "MyISAM" did the trick.
Answered By - jaume
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.