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

Config confusion

Started by Diggy, July 05, 2007, 12:30:34 am

Previous topic - Next topic

Diggy

Hi to all.

As a prelude to developing an ecommerce site (which will run on Fedora Core 4), I installed Fedora 7 as a development environment.  I installed jdk1.6.0_02 successfully.  I then installed KonaKart.  I accepted the default install directory "/usr/local" (while my apache document root is /var/www/html).  At the end of the installation, KonaKart didn't launch, even though the launch checkbox was ticked (that may just be to start KonaKart, and not go to an interface - I'm not sure).  I tried localhost:8780 - no joy.  OK, I think, let me try to access the Admin interface.  The only way I can see to do that is through "file:///usr/local/konakart/webapps/konakartadmin/KonakartAdmin.html".  I get the interface, but when I add uname and pw, I get the following:  "Unable to initiate the asynchronous service invocation -- check the network connection".

With respect, the documentation isn't very helpful.  So, I ask:

     - How do I normally access KonaKart, in general?
     - How do I normally access the  it?admin interface?
     - What does the above error mean when I try to access the admin interface, and how do I correct it?
     - Perhaps most importantly, how do I integrate KonaKart into my Web site?

Apologies if these questions are completely lame.  I have plenty of experience with MySQL, but have usually struggled with Java and Tomcat.  Your help would be most appreciated.

Diggy

Diggy

Sorry to reply to my own post (and so soon after posting the orig!), but I just solved the two of my problems, namely:

   - How do I normally access the  it?admin interface?e
   - What does the above error mean when I try to access the admin interface, and how do I correct it?

by accessing the admin interface through "localhost:8780/konakartadmin".  Doh!

Still after answers to the other questions, especially the last.

Diggy

john

Hi Diggy,

> I installed jdk1.6.0_02 successfully.

We haven't tested on 1.6, only up to 1.5.   I'm not sure of the impact however.

> I accepted the default install directory "/usr/local" (while my apache document root is /var/www/html).

That's OK.  The apache document root isn't relevant here.   KonaKart runs in the tomcat container that is installed during the installation.   You can configure apache to redirect requests to KonaKart but that comes much later.

>  At the end of the installation, KonaKart didn't launch, even though the launch checkbox was ticked (that may just be to start KonaKart, and not go to an interface - I'm not sure).

On *nix it doesn't launch a browser - it just starts the application by starting tomcat.   After this you have to run a browser and enter http://localhost:8780/konakart for the application and http://localhost:8780/konakartadmin for the admin application.  (With the Windows installer, KonaKart starts AND a browser opens up with a window showing the application and another showing the admin app).   

A useful place to look is the catalina.out file in the logs directory under your KonaKart installation.  This is the tomcat log file and most of the errors will be reported in there.

>     - How do I normally access KonaKart, in general?

See above, using http://localhost:8780/konakart

     - What does the above error mean when I try to access the admin interface, and how do I correct it?

It sounds like the admin app is not able to fetch data (it uses asynchronous calls - it's AJAX).  It probably indicates that the server has not started correctly.   (You could open up a terminal window and try the bin/startkonakart.sh script and see if you get any errors?   - if it starts a java process but still doesn't work, check the tomcat log for other errors)

     - Perhaps most importantly, how do I integrate KonaKart into my Web site?

Well, that's a tricky question because there are are few limits on how you would integrate KonaKart into your website.   It has a comprehensive set of APIs that allow you to add shopping cart / eCommerce functionality to your web site.   To be succcessful with the more complicated forms of integration you really will need to know how to run a java application in a container (such as tomcat as we provide) and know how to make SOAP calls or use POJO to make the calls to the APIs.
There are simpler forms of integration - if you can get what you need by modifying the Struts application that's included.   For major changes you will need to know you way around Struts, but for small changes a knowledge of HTML may well be sufficient.

> Apologies if these questions are completely lame.  I have plenty of experience with MySQL, but have usually struggled with Java and Tomcat.  Your help would be most appreciated.

I hope the above helps you to get started.

John

BruceLee

September 28, 2007, 09:43:46 pm #3 Last Edit: September 28, 2007, 09:56:15 pm by BruceLee
John,
I also have concerns about
- Perhaps most importantly, how do I integrate KonaKart into my Web site?

Our website uses WebWork2 +Spring framework in Tomcat. Is it possible
1) to use both WebWork and Struts for JSP?
2) call client API and Structs action from my WebWork Action class?

More questions:
1. Now WebWork2 and Struts are converging to single code base. Do you have plan to support Struts 2?
2. How can I put KonaKart software to my Tomcat 5.2.23 environment? Note we use WebWork2+Spring now.
Or just run 2 Tomcat's, one is on port 8080 for my application, another on 8780 for KonaKart. If so, how does my application communicate to KonaKart?

Thanks!
-Bruce

BruceLee

Team,

We figured out Q2. Still have questions

Our website uses WebWork2 +Spring framework in Tomcat. Is it possible
1) to use both WebWork and Struts for JSP?
2) call client API and Structs action from my WebWork Action class?

Forgive me if it looks like spam...
-Bruce

trevor

Hi Bruce,

> Our website uses WebWork2 +Spring framework in Tomcat. Is it possible
> 1) to use both WebWork and Struts for JSP?
> 2) call client API and Structs action from my WebWork Action class?

I'm afraid I don't know WebWork in detail but I expect that you have two main integration choices:

a) Use SOAP from your WebWork app and deploy KonaKart in any webapp in any container.
b) Use the java API and deploy KonaKart jars with your WebWork jars in the same webapp.

I can't answer 1) but you can yourself by trying this very quickly.  I would expect you to be able to run them side-by-side however.

We don't have any plans (that I'm aware of) to migrate to the merged Webwork/Struts.   It looks an interesting direction, however Struts has a large installed base and understood by many developers so makes it a relatively easy technology for people to extend.   One of the things to remember about KonaKart is that it lends itself to being used with any client techologies through the power of its APIs.   In some ways, although it is a fully-functional web store, our Struts application is merely an example of a client using the KonaKart engines - and hence that's why we call it the "demo" app.  With all this in mind, you could choose to write your entire client using WebWork2 if that's where you're most comfortable.

Regards,
Trevor

BruceLee

Thanks Trevor.
1) If we deploy 2 webapps in same Tomcat, is there easy way for our app to communicate with KonaKart app besides SOAP? Like some method through Tomcat?
2) Do you say if we put KK jars to our app, WorkWeb actions shall be able to call client API? Do we also need to copy/merge some WEB-INF config files like web.xml, struts-config.xml?
3) Can you share the source code of  KonaKart Catalog Inspector built using the OpenLaszlo platform? Does it use any Struts JSP pages or just call KK client API directly?

I wonder how to integrate WebWork2 WEB-INF config files with KK struts' ones.

Thanks!
-Bruce

trevor

Hi Bruce,

Quote1) If we deploy 2 webapps in same Tomcat, is there easy way for our app to communicate with KonaKart app besides SOAP? Like some method through Tomcat?


Not that I know of.  The SOAP interface is a good way to keep these things separate so it can have advantages over the direct java route.

Quote2) Do you say if we put KK jars to our app, WorkWeb actions shall be able to call client API? Do we also need to copy/merge some WEB-INF config files like web.xml, struts-config.xml?


Yes I don't see any reason why not.   A word of caution on mixing your WebWork and our Struts.  You will need to ensure that all the jars being used are compatible.   They may not be.   You should have no problem if you wrote all your client in Webwork and just relied on the KonaKart engine for the shopping cart functionality.  If you really wanted to use the KonaKart Struts code alongside your WebWork code you may well find you have to deploy them in separate webapps due to incompatibilities between the jars...
If the jars were compatible, yes you would have to merge those config files but I think this approach of mixing the two frameworks could lead to complexities you could do without.


Quote3) Can you share the source code of  KonaKart Catalog Inspector built using the OpenLaszlo platform? Does it use any Struts JSP pages or just call KK client API directly?


Please write an email to request this to support at konakart . com.  The OpenLaszlo example calls XMLOverHTTP.do to reach the KonaKart engine.  If your look in our struts-config.xml you will see the mapping:

<!-- =========================================== XML over HTTP  -->
<action path="/XMLOverHTTP" type="com.konakart.actions.XMLOverHTTPAction">
   <forward name="SendResponse" path="/WEB-INF/jsp/XMLOverHTTPResponse.jsp"/>
</action>

You can also see the java source for the action under the examples directory in the download kit.

Regards,
Trevor

BruceLee

Thank Trevor for support.

Quote from: trevor on September 30, 2007, 11:50:16 am
Not that I know of.  The SOAP interface is a good way to keep these things separate so it can have advantages over the direct java route.
...
You should have no problem if you wrote all your client in Webwork and just relied on the KonaKart engine for the shopping cart functionality. 

About SOAP, Our website don't need full-featured shopping cart (at least in current stage), but need basket list, checkout pages mostly. I guess SOAP interface is over-kill and requires much work based on our app?
About client API, do you mean we don't use any Struts action class like LoginAction, but just use KKAppEng API directly from our WorkWork action class?
import com.konakart.al.KKAppEng;

Thanks!
-Bruce

trevor

Hi Bruce,

QuoteAbout SOAP, Our website don't need full-featured shopping cart (at least in current stage), but need basket list, checkout pages mostly. I guess SOAP interface is over-kill and requires much work based on our app?


You might be surprised at how easy it is to use the SOAP interface.  Check out the example code in http://www.konakart.com/apiexamplesfaq.php#HowDoIUseKonaKartsSOAPWebServiceInterface

If you are planning to write everything in WebWork you may find that using the KonaKart client API the easiest route however (and it will give you optimum performance).   

Just taking a selection of the features of the shopping cart is perfectly OK, and expected.

QuoteAbout client API, do you mean we don't use any Struts action class like LoginAction, but just use KKAppEng API directly from our WorkWork action class?
import com.konakart.al.KKAppEng;


Yes.. the KonaKart client API isn't dependent on Struts, so a good route for you would probably be to use WebWork and call the client API.

We'll be interested to hear how you get on.

Regards,
Trevor

BruceLee

Thanks Trevlor. I'll go that road and let you know our progress. -Bruce