KonaKart Community Forum

Installation / Configuration => Programming of KonaKart => Topic started by: jiaqiangyan on March 19, 2008, 02:44:19 am

Title: Can't see the new orertotal module
Post by: jiaqiangyan on March 19, 2008, 02:44:19 am
I add a new ordertotal module :
in  konakart/custom/module/src
I create a java file : EryijuOrderTotal.java  in the package :  com.konakart.bl.modules.ordertotal.eryijuordertotal; 

and then I run the ant : (the working directory is konakart/custom)

$bin/ant compile_modules
$bin/ant copy_jars
$bin/ant make_wars

now copy the wars to my tomcat home directiory
$copy wars/*.war ../../../tomcat/webapps/           

now I restart the tomcat, log on : localhost:8080/konakartadmin  .
but I can't see  eryijuordertotal in the modules.

can you tell the reasons? are there any steps I made wrong ?
Title: Re: Can't see the new orertotal module
Post by: kate on March 19, 2008, 05:58:10 am
Did you add EryijuOrderTotal.java in the  com.konakartadmin.modules.ordertotal.Eryijuorderyotal package? (and properties file)

Also add EryijuOrderTotal to the konakartadmin.properties file:

# Make these space or semi-colon-separated class names - they have implied prefixes
# of:
#     com.konakartadmin.modules.payment.{lower case module name}.
#     com.konakartadmin.modules.shipping.{lower case module name}.
#     com.konakartadmin.modules.orderTotal.{lower case module name}.

konakart.modules.payment=Paypal Chronopay Epaybg Cod Worldpay Authorizenet Usaepay Yourpay Payjunction
konakart.modules.shipping=Flat Item Table Zones Free DigitalDownload Ups FreeProduct
konakart.modules.ordertotal=Shipping SubTotal Tax Total ProductDiscount TotalDiscount EryijuOrderTotal

This should get you to the next stage..

Kate

Title: Re: Can't see the new orertotal module
Post by: jiaqiangyan on March 19, 2008, 06:09:53 am
Thank you very much!!!

Now I can see the EryijuOrderTotal module !
but  I got a new problem:
...
19-Mar 13:23:00 INFO  (?:loadModules:?) Loaded module: 'EryijuOrderTotal' title: 'Eryiju-Total'
19-Mar 13:23:14 INFO  (?:run:?) Refreshing Config Variables
java.lang.ClassNotFoundException: com.konakart.bl.modules.ordertotal.ot_eryijuordertotal.Ot_eryijuordertotal
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at com.konakart.bl.modules.ordertotal.OrderTotalMgr.refreshConfigs(Unknown Source)
        at com.konakart.bl.modules.ordertotal.OrderTotalMgr.<init>(Unknown Source)
        at com.konakart.app.KKEng.updateCachedConfigurations(Unknown Source)
        at com.konakart.al.ConfigCacheUpdater.run(Unknown Source)
java.lang.ClassNotFoundException: com.konakart.bl.modules.ordertotal.ot_eryijuordertotal.Ot_eryijuordertotal
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at com.konakart.bl.modules.ordertotal.OrderTotalMgr.refreshConfigs(Unknown Source)
        at com.konakart.app.KKEng.updateCachedConfigurations(Unknown Source)
        at com.konakart.al.ConfigCacheUpdater.run(Unknown Source)


Should I add class Ot_eryijuordertotal? and where? I didn't get any documentations on this...
Title: Re: Can't see the new orertotal module
Post by: kate on March 19, 2008, 06:16:27 am
I have no idea what Ot_eryijuordertotal is but if it's an order total module then you must add all the pieces that you have to add for an order total module - just as you did with the one that works

The best way to do these things is to copy an existing one...   you have to add the application part of the module, and the administration part of the module, as you've seen.

Kate
Title: Re: Can't see the new orertotal module
Post by: jiaqiangyan on March 19, 2008, 06:45:42 am
Kate,

I copy the exsiting one (SubTotal) ......  , and it works,

but  when I set the "Sort Order" property to another number on Admin APP,
I got the exception message:


19-Mar 14:37:18 INFO  (?:run:?) Refreshing Config Variables
java.lang.ClassNotFoundException: com.konakart.bl.modules.ordertotal.ot_eryijuordertotal.Ot_eryijuordertotal
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at com.konakart.bl.modules.ordertotal.OrderTotalMgr.refreshConfigs(Unknown Source)
        at com.konakart.app.KKEng.updateCachedConfigurations(Unknown Source)
        at com.konakart.al.ConfigCacheUpdater.run(Unknown Source)
19-Mar 14:37:48 INFO  (?:run:?) Refreshing Config Variables
java.lang.ClassNotFoundException: com.konakart.bl.modules.ordertotal.ot_eryijuordertotal.Ot_eryijuordertotal
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at com.konakart.bl.modules.ordertotal.OrderTotalMgr.refreshConfigs(Unknown Source)
        at com.konakart.app.KKEng.updateCachedConfigurations(Unknown Source)
        at com.konakart.al.ConfigCacheUpdater.run(Unknown Source)
Title: Re: Can't see the new orertotal module
Post by: kate on March 19, 2008, 07:45:55 am
The clue is in the exception:

Quotejava.lang.ClassNotFoundException: com.konakart.bl.modules.ordertotal.ot_eryijuordertotal.Ot_eryijuordertotal


You must ensure that this class is in your classpath.  Have you checked the jars that you made?

Kate
Title: Re: Can't see the new orertotal module
Post by: kate on March 19, 2008, 07:54:47 am
On your earlier comment:

Quoteand then I run the ant : (the working directory is konakart/custom)

$bin/ant compile_modules
$bin/ant copy_jars
$bin/ant make_wars

now copy the wars to my tomcat home directiory
$copy wars/*.war ../../../tomcat/webapps/       


Although you can, I wouldn't create WAR files each time.   Just create the jar you're working on and copy that into position.

I would also restart tomcat each time.

Kate
Title: Re: Can't see the new orertotal module
Post by: vpod on December 11, 2009, 01:57:56 pm
I'm having the same problem. I created a new order total module and I get the "java.lang.ClassNotFoundException".
Did you manage to solve it?

Quote from: jiaqiangyan on March 19, 2008, 06:45:42 am
Kate,

I copy the exsiting one (SubTotal) ......  , and it works,

but  when I set the "Sort Order" property to another number on Admin APP,
I got the exception message:


19-Mar 14:37:18 INFO  (?:run:?) Refreshing Config Variables
java.lang.ClassNotFoundException: com.konakart.bl.modules.ordertotal.ot_eryijuordertotal.Ot_eryijuordertotal
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at com.konakart.bl.modules.ordertotal.OrderTotalMgr.refreshConfigs(Unknown Source)
        at com.konakart.app.KKEng.updateCachedConfigurations(Unknown Source)
        at com.konakart.al.ConfigCacheUpdater.run(Unknown Source)
19-Mar 14:37:48 INFO  (?:run:?) Refreshing Config Variables
java.lang.ClassNotFoundException: com.konakart.bl.modules.ordertotal.ot_eryijuordertotal.Ot_eryijuordertotal
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at com.konakart.bl.modules.ordertotal.OrderTotalMgr.refreshConfigs(Unknown Source)
        at com.konakart.app.KKEng.updateCachedConfigurations(Unknown Source)
        at com.konakart.al.ConfigCacheUpdater.run(Unknown Source)