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

class not found error adding new payment gateway

Started by Cavs123, July 22, 2009, 04:42:52 am

Previous topic - Next topic

Cavs123

hi there,

I have had a problem adding a custom payment gateway, cpay, to KonaKart. I used an existing module payjunction, copying its files and modifying them according to the guide. I added the new payment module in the various config files. I build the new custom jar files with the ant build file and copied them to:
C:\Program Files\KonaKart\webapps\konakart\WEB-INF\classes
and
C:\Program Files\KonaKart\webapps\konakartadmin\WEB-INF\classes

When I run the KonaKart admin app, I get the following error (below). It says that the class com.konakarta
dmin.modules.payment.cpay.Cpay is missing but this is in one of the jar files I placed in both locations. Any ideas would be really helpful.


* KONAKART LICENSE AGREEMENT
*
* You may not use this software except in compliance with the licenses.
*

22-Jul 13:30:44 WARN  (AdminMgrFactory.java:instantiateAdminMultiStoreMgr:1026)
Admin Multi-Store functionality has not been installed
22-Jul 13:30:54 WARN  (AdminModulesMgr.java:loadModules:230) Class com.konakarta
dmin.modules.payment.cpay.Cpay not found but defined in /C:/Program%20Files/Kona
Kart/webapps/konakartadmin/WEB-INF/classes/konakartadmin.properties
com.konakart.app.KKException: The configuration at index 7 Cpay is null
        at com.konakartadmin.modules.Module.getKeys(Module.java:187)
        at com.konakartadmin.bl.AdminModulesMgr.loadModules(AdminModulesMgr.java
:208)
        at com.konakartadmin.bl.AdminModulesMgr.fetchModules(AdminModulesMgr.jav
a:128)
        at com.konakartadmin.bl.AdminModulesMgr.refreshConfigs(AdminModulesMgr.j
ava:537)
        at com.konakartadmin.bl.AdminModulesMgr.<init>(AdminModulesMgr.java:97)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at com.konakartadmin.bl.AdminMgrFactory.instantiateAdminModulesMgr(Admin
MgrFactory.java:1107)
        at com.konakartadmin.bl.AdminMgrFactory.getAdminModulesMgr(AdminMgrFacto
ry.java:1094)
        at com.konakartadmin.bl.KKAdminBase.getModulesMgr(KKAdminBase.java:1015)

        at com.konakartadmin.bl.KKAdmin.getModules(KKAdmin.java:1807)
        at com.konakartadmin.server.KKAdminGWTServiceImpl.getModules(KKAdminGWTS
erviceImpl.java:3494)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:5
27)
        at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(Remot
eServiceServlet.java:164)
        at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServ
iceServlet.java:86)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:286)
        at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcesso
r.java:857)
        at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.pr
ocess(Http11AprProtocol.java:565)
        at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:15
09)
        at java.lang.Thread.run(Unknown Source)

Cavs123

Actually,

The path I placed the jar files in was

C:\Program Files\KonaKart\webapps\konakartadmin\WEB-INF\lib and not C:\Program Files\KonaKart\webapps\konakartadmin\WEB-INF\classes

same for the konakart directory

Brian

The problem appears to be this, from the exception:

com.konakart.app.KKException: The configuration at index 7 Cpay is null


Check your source code.  Are you creating a configs array that's too big?

You should reduce the [8] that was used in payjunction to however many config elements you have in CPay


        if (configs == null)
        {
            configs = new KKConfiguration[8];
        }

Cavs123


Thanks a million for your help. You were right. I changed the array to match my configurable items and the module is now loaded in the admin app. One step closer!

:)