Hi,
I'm having a NullPointerException at com.konakart.al.KKAppEng.<init>(KKAppEng.java:316) while starting the GWT One Page checkout via the ant script. This is preventing me from running it so as to change its code, debug it etc. Any help?
Thanks,
Guilherme
Hi Guilherme,
Could you send us the stack trace of the exception.
Thx,
Pete
Hi,
I couldn't find the rest of it, but the problem happens in Torque, at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:469):
run:
[java] com.konakart.app.KKException: java.lang.NullPointerException
[java] at com.konakart.app.KKEng.getTempCustomerId(KKEng.java:1831)
[java] at com.konakart.al.CustomerMgr.createGuest(CustomerMgr.java:304)
[java] at com.konakart.al.KKAppEng.<init>(KKAppEng.java:309)
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[java] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[java] at java.lang.Class.newInstance0(Class.java:355)
[java] at java.lang.Class.newInstance(Class.java:308)
[java] at com.konakart.server.KKGWTServiceImpl.<init>(Unknown Source)
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[java] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[java] at java.lang.Class.newInstance0(Class.java:355)
[java] at java.lang.Class.newInstance(Class.java:308)
[java] at com.google.gwt.dev.shell.GWTShellServlet.tryGetOrLoadServlet(GWTShellServlet.java:875)
[java] at com.google.gwt.dev.shell.GWTShellServlet.service(GWTShellServlet.java:240)
[java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
[java] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
[java] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
[java] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
[java] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
[java] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
[java] at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
[java] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
[java] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
[java] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
[java] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
[java] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
[java] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
[java] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
[java] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
[java] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
[java] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
[java] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
[java] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
[java] at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
[java] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
[java] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java
:705)
[java] at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
[java] at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
[java] at java.lang.Thread.run(Thread.java:619)
[java] Caused by: java.lang.NullPointerException
[java] at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:469)
[java] at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:413)
[java] at com.konakart.bl.CustomerMgr.getTempCustomerId(CustomerMgr.java:1690)
[java] at com.konakart.app.KKEng.getTempCustomerId(KKEng.java:1824)
[java] ... 42 more
Guilherme
It looks like a problem with versions. It appears that the DB schema isn't up to date. In 2.2.0.7 a database change was made to the counter table :
DROP TABLE IF EXISTS counter;
CREATE TABLE counter (
counter_id int NOT NULL auto_increment,
startdate char(8 ),
counter int(12),
PRIMARY KEY (counter_id)
);
-Pete
Hi, thaks for the prompt support, but I still have the same problem :-[
Here is the mySQL output:
mysql> DROP TABLE IF EXISTS counter;
Query OK, 0 rows affected (0.14 sec)
mysql> CREATE TABLE counter (
-> counter_id int NOT NULL auto_increment,
-> startdate char(8 ),
-> counter int(12),
-> PRIMARY KEY (counter_id)
-> );
Query OK, 0 rows affected (0.11 sec)
And here is the new stacktrace:
run:
[java] com.konakart.app.KKException: java.lang.NullPointerException
[java] at com.konakart.app.KKEng.getTempCustomerId(KKEng.java:1831)
[java] at com.konakart.al.CustomerMgr.createGuest(CustomerMgr.java:304)
[java] at com.konakart.al.KKAppEng.<init>(KKAppEng.java:309)
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[java] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[java] at java.lang.Class.newInstance0(Class.java:355)
[java] at java.lang.Class.newInstance(Class.java:308)
[java] at com.konakart.server.KKGWTServiceImpl.<init>(Unknown Source)
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[java] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[java] at java.lang.Class.newInstance0(Class.java:355)
[java] at java.lang.Class.newInstance(Class.java:308)
[java] at com.google.gwt.dev.shell.GWTShellServlet.tryGetOrLoadServlet(GWTShellServlet.java:875)
[java] at com.google.gwt.dev.shell.GWTShellServlet.service(GWTShellServlet.java:240)
[java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
[java] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
[java] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
[java] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
[java] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
[java] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
[java] at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
[java] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
[java] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
[java] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
[java] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
[java] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
[java] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
[java] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
[java] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
[java] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
[java] at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
[java] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
[java] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
[java] at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
[java] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
[java] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java
:705)
[java] at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
[java] at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
[java] at java.lang.Thread.run(Thread.java:619)
[java] Caused by: java.lang.NullPointerException
[java] at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:469)
[java] at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:413)
[java] at com.konakart.bl.CustomerMgr.getTempCustomerId(CustomerMgr.java:1690)
[java] at com.konakart.app.KKEng.getTempCustomerId(KKEng.java:1824)
[java] ... 42 more
Still needing help,
Guilherme
Hi,
I recreated my database (drop / create) reinstalled Konakart (KonaKart-2.2.0.7-Windows-Setup.exe), so it recreated all tables. This is what I already have just after reinstalling:
mysql> show columns from counter;
Field | Type | Null | Key | Default | Extra |
counter_id | int(11) | NO | PRI | NULL | auto_increment |
startdate | char(8 ) | YES | | NULL | |
counter | int(12) | YES | | NULL | |
I started Konakart, put one product in my cart and run the ant script before getting the same stacktrace again, so I believe I have some other problem...
Thanks,
Guilherme
Hi,
I have just tried to recreate your problem without success. I followed the FAQ to the letter and could run the single-page checkout by running the ant script.
So, it's tricky to figure out what's wrong, if this cannot be explained by a version mis-match somewhere.
Are you using the gwt-dev-kit for the version of KonaKart that you're running? The 2.2.0.7 kit is available at http://www.konakart.com/kits/konakart-gwt-dev-kit-2.2.0.7.zip Is that the same size as the one you're using?
You definitely have the correct settings in your src/konakart.properties file under your gwt dev kit directory don't you? (i.e. you're definitely pointing to a database with the counter table in it?)
Maybe external factors are making it fail? Which version of java are you using? Which version of MySQL? Does the full KonaKart application work ok? Does the Admin App work OK?
If you run ant with debug (-d) do you get any clues?
Ming
Hi,
The problem was that I changed the database name. Although I also changed all properties accordingly, id didn't work, so I suppose I'm not allowed to do that. Once I reinstalled maintaining "oscommerce" as the database name, It worked. Thanks a lot for your patience. I would also like to point to some minor issues:
1) The HTML refers to "KonakartAdmin.css", which does not exist in the project. I changed it to "Konakart.css" to correct the problem.
2) There is an unbalanced comment in the HTML source (the old way), so I deleted it.
Despite those minor issues, I'm now ready to go further :)
Thanks again,
Guilherme