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

Startup exceptions

Started by kastor, July 31, 2007, 11:30:37 pm

Previous topic - Next topic

kastor

July 31, 2007, 11:30:37 pm Last Edit: August 03, 2007, 01:12:11 pm by kastor
Hi all,

first of all, congratulations for konakart application, is great!

I'm trying to start konakart v.2.2.0.4 with a custom installation from the .zip file that you provide in the downloads area.

I have installed MySql 5.0 and Tomcat 5.5.23, and I'm trying to deploy konakart in an exploded directory way, not in a .war file, adding <Context...> in the server.xml file in Tomcat.

but I'm getting the following exception when launching Tomcat:

...
01-ago 00:04:02 INFO  (KKEng.java:init:137) Initialising Torque
01-ago 00:04:02 INFO  (KKTorque.java:init:53) Initialising KonaKart-Torque for org.apache.torque.adapter.DBMM
01-ago 00:04:02 INFO  (KKEng.java:init:145) Finished Initialising Torque
01-ago 00:04:02 INFO  (KKEng.java:init:151) Initialising konakart
01-ago 00:04:02 INFO  (KKEng.java:initKonakart:254) KonaKart V2.2.0.4 built 12:31PM 11-Jul-2007 BST
01-ago 00:04:02 INFO  (KKEng.java:init:153) Finished Initialising konakart
com.konakart.app.KKException: org.apache.torque.TorqueException: java.lang.NullPointerException
        at com.konakart.app.KKEng.removeBasketItemsPerCustomer(KKEng.java:824)
        at com.konakart.al.CustomerMgr.createGuest(CustomerMgr.java:319)
        at com.konakart.al.KKAppEng.<init>(KKAppEng.java:306)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
        at com.konakart.server.KKGWTServiceImpl.<init>(KKGWTServiceImpl.java:148)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1089)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:448)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: org.apache.torque.TorqueException: java.lang.NullPointerException
        at org.apache.torque.util.BasePeer.throwTorqueException(BasePeer.java:106)
        at org.apache.torque.util.BasePeer.doDelete(BasePeer.java:379)
        at com.konakart.bl.BasketMgr.removeBasketItemsPerCustomer(BasketMgr.java:461)
        at com.konakart.bl.BasketMgr.removeBasketItemsPerCustomer(BasketMgr.java:440)
        at com.konakart.app.KKEng.removeBasketItemsPerCustomer(KKEng.java:817)
        ... 32 more
Caused by: java.lang.NullPointerException
        at org.apache.torque.util.BasePeer.processTables(BasePeer.java:1660)
        at org.apache.torque.util.BasePeer.doDelete(BasePeer.java:369)
        ... 35 more


Any hint or idea?

Thanks in advance,

Kastor!

paolo

Hi Kastor,

I must say that we've never seen an error like that before. What I suggest is to do a quick windows install, pointing it to your populated DB just to check that it all works fine and it isn't some data related problem.

If that works, then you should compare the server.xml and web.xml files that we produce (from the automated windows install), to the ones that you've edited to see what the differences are.

Good luck !

-Paolo

kastor

Hi, thanks Paolo!

I've tried your recommendation, but doing quick install in Linux Ubuntu, and the problem persists. I think is a data related problem, as I have only modified konakart.properties to connect to my database. I have recreated the database 2 times, with no success. What exactly does removeBasketItemsPerCustomer?

Thank again and have a nice day!

Kastor!


paolo

I'm taking bit of a wild guess now, but here goes :

It seems to me that after startup of Tomcat this is the first attempt we make to delete something, and the delete is in a transaction since it deletes data across multiple tables.

Could you check that the database user you are using, has privileges to delete data and that the database is configured to support transactions ?

-Paolo

kastor

Thanks a lot, Paolo!

I've tried your suggestions. I've modified default mysql params to support transactions (InnoDB table types) in the my.cnf file. Also I've change the default collation to utf8_general_ci. But the problem persists  ???

Anyway, I post here the whole stacktrace, maybe can give you some clue...


01-Aug 10:56:07 INFO  (KKEng.java:init:128) Finished Initialising Log4j
01-Aug 10:56:07 INFO  (KKEng.java:init:131) The configuration file being used is /opt/konakart/webapps/konakart/WEB-INF/classes/konakart.properties
01-Aug 10:56:07 INFO  (KKEng.java:init:137) Initialising Torque
01-Aug 10:56:08 INFO  (KKTorque.java:init:53) Initialising KonaKart-Torque for org.apache.torque.adapter.DBMM
01-Aug 10:56:08 INFO  (KKEng.java:init:145) Finished Initialising Torque
01-Aug 10:56:08 INFO  (KKEng.java:init:151) Initialising konakart
01-Aug 10:56:08 INFO  (KKEng.java:initKonakart:254) KonaKart V2.2.0.4 built 11:50AM 11-Jul-2007 BST
01-Aug 10:56:08 INFO  (KKEng.java:init:153) Finished Initialising konakart
KKAppEngPlugin : propertiesPath = konakart_app.properties
01-Aug 10:56:08 INFO  (KKAppEng.java:readPropertiesFile:212) kkAppEng using configuration file: /opt/konakart/webapps/konakart/WEB-INF/classes/konakart_app.properties
01-Aug 10:56:08 INFO  (KKAppEng.java:<init>:271) Engine used by application is com.konakart.app.KKEng
com.konakart.app.KKException: org.apache.torque.TorqueException: java.lang.NullPointerException
        at com.konakart.app.KKEng.removeBasketItemsPerCustomer(KKEng.java:824)
        at com.konakart.al.CustomerMgr.createGuest(CustomerMgr.java:319)
        at com.konakart.al.KKAppEng.<init>(KKAppEng.java:306)
        at com.konakart.al.ConfigCacheUpdater.getClientEng(ConfigCacheUpdater.java:70)
        at com.konakart.al.ConfigCacheUpdater.getCheckFlag(ConfigCacheUpdater.java:189)
        at com.konakart.al.ConfigCacheUpdater.hasCheckFlagBeenSet(ConfigCacheUpdater.java:205)
        at com.konakart.al.ConfigCacheUpdater.run(ConfigCacheUpdater.java:131)
Caused by: org.apache.torque.TorqueException: java.lang.NullPointerException
        at org.apache.torque.util.BasePeer.throwTorqueException(BasePeer.java:106)
        at org.apache.torque.util.BasePeer.doDelete(BasePeer.java:379)
        at com.konakart.bl.BasketMgr.removeBasketItemsPerCustomer(BasketMgr.java:461)
        at com.konakart.bl.BasketMgr.removeBasketItemsPerCustomer(BasketMgr.java:440)
        at com.konakart.app.KKEng.removeBasketItemsPerCustomer(KKEng.java:817)
        ... 6 more
Caused by: java.lang.NullPointerException
        at org.apache.torque.util.BasePeer.processTables(BasePeer.java:1660)
        at org.apache.torque.util.BasePeer.doDelete(BasePeer.java:369)
        ... 9 more
com.konakart.al.KKAppException: com.konakart.app.KKException: org.apache.torque.TorqueException: java.lang.NullPointerException
        at com.konakart.al.KKAppEng.<init>(KKAppEng.java:313)
        at com.konakart.al.ConfigCacheUpdater.getClientEng(ConfigCacheUpdater.java:70)
        at com.konakart.al.ConfigCacheUpdater.getCheckFlag(ConfigCacheUpdater.java:189)
        at com.konakart.al.ConfigCacheUpdater.hasCheckFlagBeenSet(ConfigCacheUpdater.java:205)
        at com.konakart.al.ConfigCacheUpdater.run(ConfigCacheUpdater.java:131)
Caused by: com.konakart.app.KKException: org.apache.torque.TorqueException: java.lang.NullPointerException
        at com.konakart.app.KKEng.removeBasketItemsPerCustomer(KKEng.java:824)
        at com.konakart.al.CustomerMgr.createGuest(CustomerMgr.java:319)
        at com.konakart.al.KKAppEng.<init>(KKAppEng.java:306)
        ... 4 more
Caused by: org.apache.torque.TorqueException: java.lang.NullPointerException
        at org.apache.torque.util.BasePeer.throwTorqueException(BasePeer.java:106)
        at org.apache.torque.util.BasePeer.doDelete(BasePeer.java:379)
        at com.konakart.bl.BasketMgr.removeBasketItemsPerCustomer(BasketMgr.java:461)
        at com.konakart.bl.BasketMgr.removeBasketItemsPerCustomer(BasketMgr.java:440)
        at com.konakart.app.KKEng.removeBasketItemsPerCustomer(KKEng.java:817)
        ... 6 more
Caused by: java.lang.NullPointerException
        at org.apache.torque.util.BasePeer.processTables(BasePeer.java:1660)
        at org.apache.torque.util.BasePeer.doDelete(BasePeer.java:369)
        ... 9 more
01-Aug 10:56:10 INFO  (KKGWTServiceImpl.java:<init>:86) KKGWTService ready and waiting....
01-Aug 10:56:10 INFO  (KKAppEng.java:<init>:271) Engine used by application is com.konakart.app.KKEng
com.konakart.app.KKException: org.apache.torque.TorqueException: java.lang.NullPointerException
        at com.konakart.app.KKEng.removeBasketItemsPerCustomer(KKEng.java:824)
        at com.konakart.al.CustomerMgr.createGuest(CustomerMgr.java:319)
        at com.konakart.al.KKAppEng.<init>(KKAppEng.java:306)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
        at com.konakart.server.KKGWTServiceImpl.<init>(KKGWTServiceImpl.java:148)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1055)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3917)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4201)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
        at org.apache.catalina.core.StandardService.start(StandardService.java:450)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Caused by: org.apache.torque.TorqueException: java.lang.NullPointerException
        at org.apache.torque.util.BasePeer.throwTorqueException(BasePeer.java:106)
        at org.apache.torque.util.BasePeer.doDelete(BasePeer.java:379)
        at com.konakart.bl.BasketMgr.removeBasketItemsPerCustomer(BasketMgr.java:461)
        at com.konakart.bl.BasketMgr.removeBasketItemsPerCustomer(BasketMgr.java:440)
        at com.konakart.app.KKEng.removeBasketItemsPerCustomer(KKEng.java:817)
        ... 41 more
Caused by: java.lang.NullPointerException
        at org.apache.torque.util.BasePeer.processTables(BasePeer.java:1660)
        at org.apache.torque.util.BasePeer.doDelete(BasePeer.java:369)
        ... 44 more
01-Aug 10:56:10 ERROR (StandardContext.java:loadOnStartup:3919) Servlet /konakart threw load() exception
com.konakart.client.util.KKGWTException: com.konakart.app.KKException: org.apache.torque.TorqueException: java.lang.NullPointerException<br>Exception Stack Trace = <br>   at com.konakart.al.KKAppEng.<init>(KKAppEng.java:313)<br>   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)<br>   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)<br>   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)<br>   at java.lang.reflect.Constructor.newInstance(Constructor.java:494)<br>   at java.lang.Class.newInstance0(Class.java:350)<br>   at java.lang.Class.newInstance(Class.java:303)<br>   at com.konakart.server.KKGWTServiceImpl.<init>(KKGWTServiceImpl.java:148)<br>   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)<br>   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)<br>   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)<br>   at java.lang.reflect.Constructor.newInstance(Constructor.java:494)<br>   at java.lang.Class.newInstance0(Class.java:350)<br>   at java.lang.Class.newInstance(Class.java:303)<br>   at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1055)<br>   at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)<br>   at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3917)<br>   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4201)<br>   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)<br>   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)<br>   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)<br>   at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)<br>   at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)<br>   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)<br>   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)<br>   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)<br>   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)<br>   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)<br>   at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)<br>   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)<br>   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)<br>   at org.apache.catalina.core.StandardService.start(StandardService.java:450)<br>   at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)<br>   at org.apache.catalina.startup.Catalina.start(Catalina.java:551)<br>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>   at java.lang.reflect.Method.invoke(Method.java:585)<br>   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)<br>   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)<br><br>Exception Cause = <br>   at com.konakart.app.KKEng.removeBasketItemsPerCustomer(KKEng.java:824)<br>   at com.konakart.al.CustomerMgr.createGuest(CustomerMgr.java:319)<br>   at com.konakart.al.KKAppEng.<init>(KKAppEng.java:306)<br>   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)<br>   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)<br>   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)<br>   at java.lang.reflect.Constructor.newInstance(Constructor.java:494)<br>   at java.lang.Class.newInstance0(Class.java:350)<br>   at java.lang.Class.newInstance(Class.java:303)<br>   at com.konakart.server.KKGWTServiceImpl.<init>(KKGWTServiceImpl.java:148)<br>   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)<br>   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)<br>   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)<br>   at java.lang.reflect.Constructor.newInstance(Constructor.java:494)<br>   at java.lang.Class.newInstance0(Class.java:350)<br>   at java.lang.Class.newInstance(Class.java:303)<br>   at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1055)<br>   at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)<br>   at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3917)<br>   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4201)<br>   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)<br>   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)<br>   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)<br>   at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)<br>   at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)<br>   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)<br>   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)<br>   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)<br>   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)<br>   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)<br>   at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)<br>   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)<br>   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)<br>   at org.apache.catalina.core.StandardService.start(StandardService.java:450)<br>   at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)<br>   at org.apache.catalina.startup.Catalina.start(Catalina.java:551)<br>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>   at java.lang.reflect.Method.invoke(Method.java:585)<br>   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)<br>   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
        at com.konakart.server.KKGWTServiceImpl.<init>(KKGWTServiceImpl.java:156)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1055)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3917)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4201)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
        at org.apache.catalina.core.StandardService.start(StandardService.java:450)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)


Thanks again!

Kastor!

paolo

Yes, I can see where the problem is but have no idea why it won't let you do a delete. Maybe you can try running the AdminApp and see if that gives us any more clues ? Another suggestion could be to try it on another database if you have one handy (i.e. postgreSQL, Oracle, MSSQL or DB2) just to verify that the problem is related to the database.

-Paolo

kastor


Hi Paolo, thank you for your time & help.

As you recommended, I've tried with PostgreSQL, and same result!!

I don't know if I'm doing something wrong with the db scripts: what's the script execution order? When I run the scripts, I've got some errors, but referred to duplicate columns...


Thanks in advance!

Kastor!

paolo

That's very strange indeed... The only script that you should run is konakart_demo.sql and it shouldn't give any errors; maybe some warnings if it tries to drop a table when it doesn't exist etc.

The script called konakart_supplementary_demo.sql is only for people who are using a standard osCommerce database and want to move to KonaKart. The other scripts named upgrade_*.sql are for upgrading from previous versions of KonaKart.

Cheers,

Paolo

kastor


F*ck!!  >:(

Tested with MS Sql Server and same error!!

Tested in Windows XP 64bit version with Tomcat 5.5.23 with MySql 5.0.41 & MS SQL Server 2005
Also tested in Ubuntu 6.06.1 with Tomcat 5.0.28 with MySql 5.0.22 & PostgreSQL 8.1

Maybe a problem with my locale settings (es_ES)?

I have added traces in the removeBasketItemsPerCustomer method and the generated customerId number is a little bit rare (-9999999)...

Thanks,

Kastor!




paolo

The customerId is OK. We've never heard of any specific locale problems and know that people are running Konakart in Spain and countries in South America. Could you send us your konakart.properties file ?

Thanks,

Paolo

kastor

Thanks again, Paolo,

this is my konakart.properties with MySql settings:

      1 # -----------------------------------------------------------------------------------
      2 #
      3 #  K O N A K A R T   P R O P E R T I E S
      4 #
      5 #  For help on changing these parameters check the FAQs on http://www.konakart.com
      6 # -----------------------------------------------------------------------------------
      7
      8 # -----------------------------------------------------------------------------------
      9 #  D A T A B A S E   P R O P E R T I E S
     10 #  Database Connection Parameters Set by Installer:
     11 # -----------------------------------------------------------------------------------
     12
     13 torque.applicationRoot = .
     14
     15 torque.database.default                       = mydatabase
     16
     17 torque.database.mydatabase.adapter              = mysql
     18 torque.dsfactory.mydatabase.connection.driver   = com.mysql.jdbc.Driver
     19 torque.dsfactory.mydatabase.connection.url      = jdbc:mysql://localhost:3306/mydatabase?zeroDateTimeBehavior=convertToNull
     20 torque.dsfactory.mydatabase.connection.user     = mydatabase
     21 torque.dsfactory.mydatabase.connection.password = mydatabase
     22
     23 # Examples:
     24
     25 #torque.database.oscommerce.adapter             = mysql
     26 #torque.dsfactory.oscommerce.connection.driver  = com.mysql.jdbc.Driver
     27 #torque.dsfactory.oscommerce.connection.url     = jdbc:mysql://localhost:3306/dbname?zeroDateTimeBehavior=convertToNull
     28 #torque.dsfactory.oscommerce.connection.user    = root
     29 #torque.dsfactory.oscommerce.connection.password=
     30
     31 #torque.database.oscommerce.adapter             = postgresql
     32 #torque.dsfactory.oscommerce.connection.driver  = org.postgresql.Driver
     33 #torque.dsfactory.oscommerce.connection.url     = jdbc:postgresql://127.0.0.1:5432/konakart
     34 #torque.dsfactory.oscommerce.connection.user    = root
     35 #torque.dsfactory.oscommerce.connection.password=
     36
     37 #torque.database.oscommerce.adapter             = oracle
     38 #torque.dsfactory.oscommerce.connection.driver  = oracle.jdbc.OracleDriver
     39 #torque.dsfactory.oscommerce.connection.url     = jdbc:oracle:thin:@dbhost:1521:dbname
     40 #torque.dsfactory.oscommerce.connection.user    = dbuser
     41 #torque.dsfactory.oscommerce.connection.password= dbpassword
     42
     43 #torque.database.oscommerce.adapter             = db2net
     44 #torque.dsfactory.oscommerce.connection.driver  = com.ibm.db2.jcc.DB2Driver
     45 #torque.dsfactory.oscommerce.connection.url     = jdbc:db2://leedsutd:50000/konakart
     46 #torque.dsfactory.oscommerce.connection.user    = dbuser
     47 #torque.dsfactory.oscommerce.connection.password= dbpassword
     48
     49 #torque.database.oscommerce.adapter             = mssql
     50 #torque.dsfactory.oscommerce.connection.driver  = com.microsoft.jdbc.sqlserver.SQLServerDriver
     51 #torque.dsfactory.oscommerce.connection.url     = jdbc:microsoft:sqlserver://norwich:1597;SelectMethod=cursor;DatabaseName=konakart
     52 #torque.dsfactory.oscommerce.connection.user    = dbuser
     53 #torque.dsfactory.oscommerce.connection.password= dbpassword
     54
     55 # -----------------------------------------------------------------------------------
     56 #  C O N N E C T I O N   P O O L   P R O P E R T I E S
     57 # -----------------------------------------------------------------------------------
     58 # You can leave the defaults
     59 # -----------------------------------------------------------------------------------
     60
     61 # Using commons-dbcp
     62
     63 torque.dsfactory.mydatabase.factory=org.apache.torque.dsfactory.SharedPoolDataSourceFactory
     64
     65 # The maximum number of active connections that can be allocated from this pool at
     66 # the same time, or zero for no limit.
     67
     68 torque.dsfactory.oscommerce.pool.maxActive=0
     69
     70 # The maximum number of active connections that can remain idle in the pool, without
     71 # extra ones being released, or zero for no limit.
     72
     73 torque.dsfactory.oscommerce.pool.maxIdle=10
     74
     75 # The maximum number of milliseconds that the pool will wait (when there are no
     76 # available connections) for a connection to be returned before throwing an exception,
     77 # or -1 to wait indefinitely.
     78
     79 torque.dsfactory.oscommerce.pool.maxWait=-1
     80
     81 # The indication of whether objects will be validated before being borrowed from the
     82 # pool. If the object fails to validate, it will be dropped from the pool, and we will
     83 # attempt to borrow another.
     84
     85 torque.dsfactory.oscommerce.pool.testOnBorrow=true
     86
     87 # The SQL query that will be used to validate connections from this pool before
     88 # returning them to the caller. If specified, this query MUST be an SQL SELECT
     89 # statement that returns at least one row.
     90 # Recommended settings:
     91 # for MySQL/PostgreSQL use: SELECT 1
     92 # for Oracle           use: SELECT 1 from dual
     93 # for DB2              use: SELECT 1 FROM sysibm.sysdummy1
     94
     95 torque.dsfactory.oscommerce.pool.validationQuery=SELECT 1
     96
     97 # -----------------------------------------------------------------------------------
     98 #  K O N A K A R T  P R O P E R T I E S
     99 # -----------------------------------------------------------------------------------
    100 # The parameters to configure KonaKart
    101 # -----------------------------------------------------------------------------------
    102
    103 konakart.session.durationMinutes=30
    104
    105 # konakart.delete_reviews - set to TRUE to delete a customer's reviews when a
    106 #                           customer is deleted
    107 # konakart.delete_reviews - set to FALSE to leave a customer's reviews when a
    108 #                           customer is deleted (default)
    109 #                           (in this default case the customerID on the review
    110 #                           records is set to null)
    111 konakart.delete_reviews = FALSE
    112
    113 # -----------------------------------------------------------------------------------
    114 # Modules available to this konakart system
    115 #
    116 # You have to add the name for the module in the right property, separate these
    117 # with ";".  You also have to supply the class in the appropriate location - and
    118 # these classes must implement the appropriate KonakartModuleInterface interface....
    119 # These are:
    120 #     KonakartPaymentInterface    - payment modules
    121 #     KonakartShippingInterface   - shipping modules
    122 #     KonakartOrderTotalInterface - order total modules
    123
    124 konakart.modules.payment = Cod;IPayment;MoneyOrder;NoChex;PayPal;Pm2Checkout;PsiGate;SecPay
    125 konakart.modules.shipping = Flat;Item;Table;Ups;Usps;Zones
    126 konakart.modules.order_total = LowOrderFee;Shipping;SubTotal;Tax;Total
    127
    128 # -----------------------------------------------------------------------------------
    129 # Velocity parameters
    130
    131 # Full path and name of log file for error, warning, and informational messages. The location,
    132 # if not absolute, is relative to the 'current directory'.
    133
    134 konakart.velocity.logfile = konakart_velocity.log
    135
    136 # -----------------------------------------------------------------------------------
    137 # KonaKart database owner (only used by MS SQL Server currently)
    138
    139 konakart.database.owner = dbo
    140
    141 # -----------------------------------------------------------------------------------
    142 # KonaKart Version Information
    143
    144 konakart.version    = 2.2.0.4
    145 konakart.build.date = 11:50AM 11-Jul-2007 BST


I have only changed this props:

  • torque.database.default

  • torque.database.mydatabase.adapter

  • torque.dsfactory.mydatabase.connection.driver

  • torque.dsfactory.mydatabase.connection.url

  • torque.dsfactory.mydatabase.connection.user

  • torque.dsfactory.mydatabase.connection.password

  • torque.dsfactory.mydatabase.factory



Maybe something missing? I have tested also replacing every property that has 'oscommerce' to my db name, but the results are the same...


Thanks,

Kastor!

paolo

I think I've spotted it  :)

First of all I'd like to point out for anyone following this thread, that when installing using the Windows or Linux installation wizards, you shouldn't even have to edit the properties file since it is all done by the installer which even checks the DB connection and populates the tables.

When installing using the zip package (useful for where the installer isn't supported or for where you require a servlet engine other than Tomcat) you should follow the instructions in http://www.konakart.com/installationfaq.php#Defining_Database_Parameters . Especially where it says :

<snip>

Leave the torque.database.default equal to oscommerce.

You need to set the five parameters appropriate for your environment:

torque.database.oscommerce.adapter   (either "mysql", "oracle", "db2net", "mssql" "postgresql")
torque.dsfactory.oscommerce.connection.driver    (All JDBC drivers for the supported databases are on the default classpath)
torque.dsfactory.oscommerce.connection.url    (keep the value on the same line after the equals sign)
torque.dsfactory.oscommerce.connection.user
torque.dsfactory.oscommerce.connection.password

</snip>

In your case, you have changed torque.database.default which should have been left set to oscommerce and you have converted torque.dsfactory.oscommerce to torque.dsfactory.mydatabase in many places. Please try again just setting the five parameters above and I'm confident that it should work.

Let me know !

-Paolo

kastor


That's it!  ;D

Sorry for my stupidity ::) , and thank you so much.

The problem was:

1st install: Windows Wizard: OK, everything works fine, but 2 months ago.
2nd install: Zip file: Not OK, I put wrong properties in konakart.properties
3rd install: Linux Wizard but in CONSOLE mode: Not OK, wizard in console mode doesn't ask you for database properties, so I put wrong properties again!

Regards,

Kastor!


paolo

Great !

I'm pleased that you are up and running. Please keep us informed of your progress and send us a link when you are live .

Cheers,

Paolo

kastor

August 05, 2007, 07:45:29 pm #14 Last Edit: August 05, 2007, 10:24:42 pm by kastor
Hi,

only two points that I have discovered while installing konakart with .zip file bundle. Maybe would help somebody...

-My installation doesn't work with latest Tomcat version, 5.5.23, JSPs launch "Define tag cannot set a null value for bean with id:..." exception. Maybe a .jar version problem or similar, I have no time to investigate why. Everything works fine with Tomcat version 5.0.28. I have to investigate this problem, because probably my hosting provider will have a more newer version than 5.0.28...

-You have to change parameter "listing" in Tomcat\conf\web.xml to value "false", because default Tomcat installation has "true" value, and JSPs shows directory listing in all the konakart pages.

Kastor!