I created an Import File Loader Format with 5 fields: Search Key, Name, Product Category, UoM and Product Type. This Import FIle Loader Format is created in the client who uses this products (not in System).
I go to Import File Loader, upload the file I want and Click on Okay. After a few seconds of processing I get an :
java.lang.IllegalStateException: DB.getConnectionRO - @NoDBConnection@
When I go to the Import Product section, I see that the table has been filled with some of the products from my catalog but only 46 of them 266.
===========> DB.executeUpdate: UPDATE I_Product SET Value='Clave de Busqueda',Name='Nombre del Producto',M_Product_Category_ID='Categoria de Producto',C_UOM_ID='UDM',ProductType='T',IsActive='Y',Processed='N',I_IsImported='N',Updated=CURRENT_TIMESTAMP,UpdatedBy=1000000 WHERE I_Product_ID=1004855
org.postgresql.util.PSQLException: ERROR: invalid input syntax for type numeric: "Categoria de Producto"
Position: 97; State=22P02; ErrorCode=0
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:334)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.compiere.db.StatementProxy.invoke(StatementProxy.java:100)
at $Proxy67.executeUpdate(Unknown Source)
at org.compiere.util.DB.executeUpdate(DB.java:1024)
at org.compiere.util.DB.executeUpdate(DB.java:886)
at org.compiere.util.DB.executeUpdate(DB.java:873)
at org.compiere.impexp.ImpFormat.updateDB(ImpFormat.java:615)
at org.adempiere.webui.apps.form.WFileImport.cmd_process(WFileImport.java:543)
at org.adempiere.webui.apps.form.WFileImport.onEvent(WFileImport.java:301)
at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:197)
at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:141) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:519)
===========> DB.saveError: DBExecuteError - ERROR: invalid input syntax for type numeric: "Categoria de Producto"
Position: 97
===========> ImpFormat.updateDB: I_Product_ID=1004855 - rows updated=-1 ===========> PreparedStatementProxy.init: UPDATE I_Product SET Value='1.C2.5.09.1.JC.4.99.0',Name='MP CAMARON BLANCO DE CULTIVO TERRESTRE TAILS SHELL ON A FRES. U12 U/LB',M_Product_Category_ID='1000004',C_UOM_ID='1000000',ProductType='I',IsActive='Y',Processed='N',I_IsImported='N',Updated=CURRENT_TIMESTAMP,UpdatedBy=1000000 WHERE I_Product_ID=1004900 java.lang.IllegalStateException: DB.getConnectionRO - @NoDBConnection@ at org.compiere.util.DB.createConnection(DB.java:463)
at org.compiere.util.DB.getConnectionRW(DB.java:374)
at org.compiere.util.DB.getConnectionRW(DB.java:363)
at org.compiere.db.PreparedStatementProxy.init(PreparedStatementProxy.java:64)
at org.compiere.db.PreparedStatementProxy.<init>(PreparedStatementProxy.java:44)
at org.compiere.db.ProxyFactory.newCPreparedStatement(ProxyFactory.java:54)
at org.compiere.util.DB.executeUpdate(DB.java:1016)
at org.compiere.util.DB.executeUpdate(DB.java:886)
at org.compiere.util.DB.executeUpdate(DB.java:873)
at org.compiere.impexp.ImpFormat.updateDB(ImpFormat.java:615)
at org.adempiere.webui.apps.form.WFileImport.cmd_process(WFileImport.java:543)
Any suggestions will be welcomed.
Thanks,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ah, thank you. I had the line but had not deciphered it accordingly. I have successfully imported the products by simply eliminating the first row of the csv file (contained the header of the columns, amongst them was "Categoria de Producto").
Thank you very much for the swift reply!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I created an Import File Loader Format with 5 fields: Search Key, Name, Product Category, UoM and Product Type. This Import FIle Loader Format is created in the client who uses this products (not in System).
I go to Import File Loader, upload the file I want and Click on Okay. After a few seconds of processing I get an :
java.lang.IllegalStateException: DB.getConnectionRO - @NoDBConnection@
When I go to the Import Product section, I see that the table has been filled with some of the products from my catalog but only 46 of them 266.
System Information
OS= Opensuse 12.1
DB= Postgres 9.1
Virtual Enviroment = Proxmox 2.0
App Server Log
===========> DB.executeUpdate: UPDATE I_Product SET Value='Clave de Busqueda',Name='Nombre del Producto',M_Product_Category_ID='Categoria de Producto',C_UOM_ID='UDM',ProductType='T',IsActive='Y',Processed='N',I_IsImported='N',Updated=CURRENT_TIMESTAMP,UpdatedBy=1000000 WHERE I_Product_ID=1004855
org.postgresql.util.PSQLException: ERROR: invalid input syntax for type numeric: "Categoria de Producto"
Position: 97; State=22P02; ErrorCode=0
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:334)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.compiere.db.StatementProxy.invoke(StatementProxy.java:100)
at $Proxy67.executeUpdate(Unknown Source)
at org.compiere.util.DB.executeUpdate(DB.java:1024)
at org.compiere.util.DB.executeUpdate(DB.java:886)
at org.compiere.util.DB.executeUpdate(DB.java:873)
at org.compiere.impexp.ImpFormat.updateDB(ImpFormat.java:615)
at org.adempiere.webui.apps.form.WFileImport.cmd_process(WFileImport.java:543)
at org.adempiere.webui.apps.form.WFileImport.onEvent(WFileImport.java:301)
at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:197)
at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:141) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:519)
===========> DB.saveError: DBExecuteError - ERROR: invalid input syntax for type numeric: "Categoria de Producto"
Position: 97
===========> ImpFormat.updateDB: I_Product_ID=1004855 - rows updated=-1 ===========> PreparedStatementProxy.init: UPDATE I_Product SET Value='1.C2.5.09.1.JC.4.99.0',Name='MP CAMARON BLANCO DE CULTIVO TERRESTRE TAILS SHELL ON A FRES. U12 U/LB',M_Product_Category_ID='1000004',C_UOM_ID='1000000',ProductType='I',IsActive='Y',Processed='N',I_IsImported='N',Updated=CURRENT_TIMESTAMP,UpdatedBy=1000000 WHERE I_Product_ID=1004900 java.lang.IllegalStateException: DB.getConnectionRO - @NoDBConnection@ at org.compiere.util.DB.createConnection(DB.java:463)
at org.compiere.util.DB.getConnectionRW(DB.java:374)
at org.compiere.util.DB.getConnectionRW(DB.java:363)
at org.compiere.db.PreparedStatementProxy.init(PreparedStatementProxy.java:64)
at org.compiere.db.PreparedStatementProxy.<init>(PreparedStatementProxy.java:44)
at org.compiere.db.ProxyFactory.newCPreparedStatement(ProxyFactory.java:54)
at org.compiere.util.DB.executeUpdate(DB.java:1016)
at org.compiere.util.DB.executeUpdate(DB.java:886)
at org.compiere.util.DB.executeUpdate(DB.java:873)
at org.compiere.impexp.ImpFormat.updateDB(ImpFormat.java:615)
at org.adempiere.webui.apps.form.WFileImport.cmd_process(WFileImport.java:543)
Any suggestions will be welcomed.
Thanks,
Hi,
Please check the error:
It is not about the Connection but the syntax:
org.postgresql.util.PSQLException: ERROR: invalid input syntax for type numeric: "Categoria de Producto"
Position: 97; State=22P02; ErrorCode=0
You have assigned M_Product_Category_ID to String value "Categoria de
Producto"
regards,
Trifon
Ah, thank you. I had the line but had not deciphered it accordingly. I have successfully imported the products by simply eliminating the first row of the csv file (contained the header of the columns, amongst them was "Categoria de Producto").
Thank you very much for the swift reply!