• Welcome to KonaKart Community Forum. Please login or sign up.
 

Mass import of products

Started by Sphericus, July 29, 2007, 03:59:42 pm

Previous topic - Next topic

john

Hi Sphericus,

The answer is not obvious to me at this point, but you can help to diagnose the problem by turning on some of the log flags so that you can see what's happening.

Try settiing these and restarting tomcat:

log4j.logger.org.apache.torque.util.BasePeer  = DEBUG
log4j.logger.com.konakart                           = DEBUG
log4j.logger.com.konakartadmin                    = DEBUG


(Set these in webapps/konakartadmin/WEB-INF/classes/konakart-logging.properties)

(The first one will tell us more about the queries being executed which is probably what we need to see).

Hopefully this will give you some clues as to where the problem lies..  The obvious guess is that the data-loading has caused the problem...

Regards,
John

Sphericus

As follows


com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -401, SQLSTATE: 42818, SQLERRMC: =
Exception Stack Trace =
at org.apache.torque.util.BasePeer.throwTorqueException(BasePeer.java:106)
at org.apache.torque.util.BasePeer.executeQuery(BasePeer.java:923)
at org.apache.torque.util.BasePeer.doSelect(BasePeer.java:757)
at org.apache.torque.util.BasePeer.doSelect(BasePeer.java:729)
at com.konakartadmin.bl.AdminOrderMgr.searchForIpnHistory(AdminOrderMgr.java:1795)
at com.konakartadmin.bl.KKAdmin.searchForIpnHistory(KKAdmin.java:3206)
at com.konakartadmin.server.KKAdminGWTServiceImpl.searchForIpnHistory(KKAdminGWTServiceImpl.java:3699)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:262)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:146)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:803)

Exception Cause =
at com.ibm.db2.jcc.a.rf.e(rf.java:1680)
at com.ibm.db2.jcc.a.rf.a(rf.java:1239)
at com.ibm.db2.jcc.b.jb.h(jb.java:139)
at com.ibm.db2.jcc.b.jb.a(jb.java:43)
at com.ibm.db2.jcc.b.w.a(w.java:30)
at com.ibm.db2.jcc.b.cc.g(cc.java:160)
at com.ibm.db2.jcc.a.rf.n(rf.java:1219)
at com.ibm.db2.jcc.a.rf.a(rf.java:1949)
at com.ibm.db2.jcc.a.rf.a(rf.java:523)
at com.ibm.db2.jcc.a.rf.executeQuery(rf.java:507)
at com.workingdogs.village.QueryDataSet.(QueryDataSet.java:113)
at org.apache.torque.util.BasePeer.executeQuery(BasePeer.java:898)
at org.apache.torque.util.BasePeer.doSelect(BasePeer.java:757)
at org.apache.torque.util.BasePeer.doSelect(BasePeer.java:729)
at com.konakartadmin.bl.AdminOrderMgr.searchForIpnHistory(AdminOrderMgr.java:1795)
at com.konakartadmin.bl.KKAdmin.searchForIpnHistory(KKAdmin.java:3206)
at com.konakartadmin.server.KKAdminGWTServiceImpl.searchForIpnHistory(KKAdminGWTServiceImpl.java:3699)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:262)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:146)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:803)


and


12-Aug 21:14:05 DEBUG (AdminOrderMgr.java:searchForIpnHistory:1705) Data Descriptor = DataDescriptor:
Offset:0
Limit:5
Orderby:ORDER_BY_ORDER_ID_DESCENDING

12-Aug 21:14:05 INFO  (BasePeer.java:executeQuery:920) SQL causing exception: SELECT B.* FROM ( SELECT A.*, row_number() over() AS TORQUE$ROWNUM FROM ( SELECT ipn_history.date_added, ipn_history.gateway_full_response, ipn_history.gateway_result, ipn_history.gateway_transaction_id, ipn_history.ipn_history_id, ipn_history.konakart_result_description, ipn_history.konakart_result_id, ipn_history.module_code, ipn_history.order_id FROM ipn_history WHERE ipn_history.order_id='5' ORDER BY ipn_history.order_id DESC ) A
) B WHERE  B.TORQUE$ROWNUM <= 5
12-Aug 21:14:05 INFO  (BasePeer.java:executeQuery:920) SQL causing exception: SELECT B.* FROM ( SELECT A.*, row_number() over() AS TORQUE$ROWNUM FROM ( SELECT ipn_history.date_added, ipn_history.gateway_full_response, ipn_history.gateway_result, ipn_history.gateway_transaction_id, ipn_history.ipn_history_id, ipn_history.konakart_result_description, ipn_history.konakart_result_id, ipn_history.module_code, ipn_history.order_id FROM ipn_history WHERE ipn_history.order_id='5' ORDER BY ipn_history.order_id DESC ) A
) B WHERE  B.TORQUE$ROWNUM <= 5
12-Aug 21:14:05 INFO  (BasePeer.java:executeQuery:921) SQL         exception: DB2 SQL error: SQLCODE: -401, SQLSTATE: 42818, SQLERRMC: =
12-Aug 21:14:05 INFO  (BasePeer.java:executeQuery:921) SQL         exception: DB2 SQL error: SQLCODE: -401, SQLSTATE: 42818, SQLERRMC: =
12-Aug 21:14:05 DEBUG (BasePeer.java:executeQuery:902) SQL: SELECT sessions.expiry, sessions.value FROM sessions WHERE sessions.sesskey='7c644269291ba77e8f26675cc567ee45'
12-Aug 21:14:05 DEBUG (BasePeer.java:executeQuery:903) Elapsed time=3 ms
12-Aug 21:14:05 DEBUG (BasePeer.java:processTables:1698) BasePeer: whereClause=sesskey='7c644269291ba77e8f26675cc567ee45'
12-Aug 21:14:05 DEBUG (BasePeer.java:insertOrUpdateRecord:629) Save column sessions.expiry value = 1186919045
12-Aug 21:14:05 DEBUG (BasePeer.java:insertOrUpdateRecord:648) Save record = {'7c644269291ba77e8f26675cc567ee45','1186919045','0'}

Sphericus

The information center said this about SQLSTATE 42818:
42818    The operands of an operator or function are not compatible or not comparable.

And the SQLCODE returns this

Quote
DB2 Version 9 for Linux, UNIX, and Windows
SQL0401
SQL0401N
The data types of the operands for the operation operator are not compatible.
Explanation:

The operation using operator cannot be processed for one of the following reasons:

    * The data types of the operands must be compatible but there is at least one pair of types that is not compatible.
    * The data type of an operand is XML which cannot be compared (with itself or any other type).
    * The data type of an operand is DATALINK which cannot be compared (with itself or any other type).
    * The data type of an operand is a structured type which cannot be compared (with itself or any other type).

Federated system users: this data type violation can be at the data source or at the federated server.

Some data sources do not provide the appropriate values for operator. In these cases the message token will have the following format: "<data source>:UNKNOWN", indicating that the actual value for the specified data source is unknown.

The statement cannot be processed.
User response:

Check all operand data types to ensure that they are comparable and compatible with the statement usage.

If all the SQL statement operands are correct and accessing a view, check the data types of all the view operands.

Federated system users: if the reason is unknown, isolate the problem to the data source failing the request (see the Problem Determination Guide for procedures to follow to identify the failing data source) and examine the data type restrictions for that data source.

sqlcode: -401

sqlstate: 42818


from
http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2.udb.msg.doc/doc/sql0401.htm

paolo

Quote from: Sphericus on August 12, 2007, 09:44:50 am
Ran into a slight hurdle today, and not sure of the best method to debug.

When I click on payment info for an order purchased with COD as payment type.
I get the following error. This happens on both items I imported in via SQL as well as an item I manually created with the Admin tool.

Any light you can help shed would be appreciated.



We'll have to figure out what is causing the exception. However, the payment info really just shows you payment details received from the payment gateway for auditing purposes. i.e. You can see what was contained in the reply from the payment gateway and what the outcome was. In the case of COD, this will never contain any data.

Sphericus

Maybe the error then is simply the fact that the query didnt return any data?

If the button isn't supposed to work when COD is used, then it makes sense that an exception was recieved.

john

August 13, 2007, 02:04:12 pm #20 Last Edit: August 13, 2007, 04:25:05 pm by john
Hi Sphericus,

We were able to reproduce the error you reported - thanks for that.

The problem was due to an oversight in our DB2 port.

Please can you try placing the attached AdminOrderMgr.class into:

webapps/konakartadmin/WEB-INF/classes/com/konakartadmin/bl

(create the directory if it isn't already there)

.. and trying again.   Please let us know if it solves the problem.

We'll fix it for the next release.

Regards,
John

Sphericus


john

:) Good news..   thanks for letting us know.
John