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

Startng and using soap interface with openlaszlo

Started by jbarb, March 26, 2008, 11:43:33 pm

Previous topic - Next topic

jbarb

Here is what I get when I try to get the soap interface started.


"C:\Program Files\KonaKart\java_soap_examples>ant
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre1.6.
0_03\lib\tools.jar
Buildfile: build.xml" It ends up telling me the Build Failed.

I know it is something simple I am overlooking. If ant cannot find this "tools.jar"
then it must not be in that folder or it is improperly named??? Where would it be? I am trying use Open laszlo for my front end.

Thanks,
James Barber

kate

Hi James,

Yes you need a tools.jar for ant..

Perhaps the best way is to install a JDK (rather than your JRE) because that will have one under the lib directory.

Regards,
Kate

jbarb

Hi Kate,

Thanks for your reply.

I have both jdk1.6.0_03 and jre and                                                   C:\Program files\KonaKart\java_soap_examples> still can't find it (tools.jar.)

Also the "ant-p" syntax doesn't work with this path, only "ant" alone.
Why is tools.jar not in either of the java folders? Is it possible for it to be excluded during download? Should I try and remove it (Jdk/jre1.6.0_03) and reinstall it, or will that cause other problems?

Also, do I need to load all the particulars regarding my products, e.g. name, description, price, image etc. into my MYSQLserver tables before KonaKart or openLaszlo single page shopping cart will function?

Thanks,

James Barber

kate

Hi James,

tools.jar is included with a JDK, but not with a JRE.   You should find it in your JDK installation.

When you run ant are you sure you're using the JDK and not the JRE?

Check your path and your JAVA_HOME.


QuoteAlso the "ant-p" syntax doesn't work with this path, only "ant" alone.

Not sure what you mean by that but you do need a space between "ant" and the "-p"


QuoteAlso, do I need to load all the particulars regarding my products, e.g. name, description, price, image etc. into my MYSQLserver tables before KonaKart or openLaszlo single page shopping cart will function?

I don't really understand your question.  The default installation loads some dummy categories and products for you to see how the application works.   You should use the KonaKart Admin App to change the catalog.

Regards
Kate

jbarb

How do I set the ANT_HOME environment. Everything I have tried has resulted in ant not starting because it is not set correctly. Ant is installed and in the correct folder, Program Files/KonaKart/custom/bin. What is the syntax for setting ant correctly and the path?

James Barber

kate

Hi James,

You can set ANT_HOME as an environment variable or call ant directly, as in many of the examples - eg..

..\custom\bin\ant -p

Kate

jbarb

This is what I get when I set paths and then try to start ant. I installed ANT 1.7.0, in C:\ Program Files\KonaKart\custom\bin\apache-ant-1.7.0\bin
I can set the path and it seems to work but it still cannot find the tools.jar and it still keeps looking in the jre for it even though I set the path for the jdk.



C:\Program Files\KonaKart\custom\bin\apache-ant-1.7.0\bin>set JAVA_HOME=jdk1.6.0_05

C:\Program Files\KonaKart\custom\bin\apache-ant-1.7.0\bin>Path=C:\jdk1.6.0_05\bin;C:\WINDOWS\system32;C:\WINDOWS

C:\Program Files\KonaKart\custom\bin\apache-ant-1.7.0\bin>Path=C:\jdk1.6.0_05\bin;C:\WIndows\system32;C:\WINDOWS;C:\Program Files\KonaKart\custom\bin\apache-ant1.7.0\bin

C:\Program Files\KonaKart\custom\bin\apache-ant-1.7.0\bin>ant
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre1.6.
0_05\lib\tools.jar Buildfile: build.xml does not exist!
Build failed


C:\Program Files\KonaKart\custom\bin\apache-ant-1.7.0\bin>cd C:\Program Files\KonaKart\java_soap_examples

2,300]C:\Program Files\KonaKart\java_soap_examples>ant
'ant' is not recognized as an internal or external command,
operable program or batch file./color]

C:\Program Files\KonaKart\java_soap_examples>

It seems that the path for ant doesn't exist. I have tried setting it as per the examples on the KonaKart site but to no avail.

I have installed Openlaszlo 3.3.3 dev installation and it has all the soaps for the Amazon single page shopping cart I want to install. Is there any other way to make this work besides using ant?

Jim Barber

kate

Hi,

It wasn't necessary to install ant because a cut-down ant installation is supplied in the download kit - but anyway, it won't hurt.

Your setting of JAVA_HOME looks suspicious.

Once you've defined that correctly, why don't you follow the examples, as I suggested below, and use:

..\custom\bin\ant

Kate

jbarb

Kate,
Here is what I get when I try to find out if "JAVA_HOME" is set correctly.(BELOW)
I believe you are correct in that JAVA_HOME is suspicious. I cannot find out where it is or how to set it. This is probably the reason ant keeps looking for tools.jar in the JRE instead of the JDK. JDK is installed but I installed a later version of both JRE and JDK and they installed separately. THis is what I downloaded and installed: jdk-6u5-windows-i586-p from Sun Micro. Should I uninstall it and maybe go with the earlier version or is there a way to establish JAVA_HOME globally using this later java version?


C:\>cd C:\Program Files\KonaKart\Java_soap_examples

C:\Program Files\KonaKart\java_soap_examples>JAVA_HOME=C:\jdk1.6.0_05

'JAVA_HOME' is not recognized as an internal or external command,
operable program or batch file.

C:\Program Files\KonaKart\java_soap_examples>set JAVA_HOME=C:\jdk1.6.0_05

C:\Program Files\KonaKart\java_soap_examples>JAVA_HOME=C:\jdk1.6.0_05
'JAVA_HOME' is not recognized as an internal or external command,
operable program or batch file.

C:\Program Files\KonaKart\java_soap_examples>JAVA_HOME=C:\Program Files\java\jdk
1.6.0_05
'JAVA_HOME' is not recognized as an internal or external command,
operable program or batch file.

C:\Program Files\KonaKart\java_soap_examples>set JAVA_HOME=C:\Program Files\java
\jdk1.6.0_05

C:\Program Files\KonaKart\java_soap_examples>JAVA_HOME=C:\Program Files\java\jdk
1.6.0_05
'JAVA_HOME' is not recognized as an internal or external command,
operable program or batch file.

C:\Program Files\KonaKart\java_soap_examples>

Thanks,

Jim Barber

kate

Jim,

The syntax is:

SET JAVA_HOME=C:\jdk1.5.0_07

You could also set it globally in your environment using the Windows operating system tools for setting environment variables.

Kate

jbarb

Kate,

Thanks for your help.

I really should not have installed apache ant 1.7.0 as I now realize I installed it incorrectly. It is in conflict with the ant package included with KonaKart.
The instructions said ( I thought) to install it in the bin folder in the path with the jdk. This is obviously wrong. I must uninstall ant but I cannot find an uninstall tool anywhere in the package. It is a zip file and you just extract to a folder. There is no install after the extract.

At any rate I need to uninstall or remove two separate extraction/installs of apache ant 1.7.0. One in the KonaKart folder and another in my Document and Settings folder. I extracted the apache ant files to the documents and settings when I thought there was an installation procedure after the files extract. I can't delete the files as they are write protected and access is denied. How can I change the permissions on these
files and folders in order to delete them? I tried changing them from read only to archive but that didn't work.

Thanks, Jim Barber
.

kate

Hi Jim,

Can't you uncheck the read-only attribute and delete those files normally?  Haven't you got Administrator privileges?

In any event, it shouldn't matter that you have ant installed there, although it wouldn't have been my chosen location for it.  There is no reason for it to conflict with the cut down ant provided in KonaKart.

Kate


jbarb

Thanks Kate,

Yes I have admin privileges I probably just need to invoke them. I am relieved to know that apache ant 1.7.0 should not interfere with the original KonaKart ant but I had better read more regarding install of apache ant.

My biggest headache is establishing ANT_HOME and JAVA_HOME. I just haven't been able to establish the proper path for either.
This is the path for the Apache Ant:                                                                                               
"C:\Program files\KonaKart\custom\bin\apache-ant-1.7.0\bin"
therin may lie the problem.
The KonaKart ant is the other bin just before the "apache ant 1.7.0"

My java is: "C:\Program Files\Java\jdk1.6.0_05\bin"

I see the KonaKart site says to set the path at C:\jdk1.6.0_05,  How is that possible when jdk1.6.0_05 is not installed on the root "C:\"? The same in the Kona Kart installation examples where it asks for you to show where your JRE is installed and the example shows C:\jdk1.5(vers)?
During KonaKart Installation I specified my JRE location as the installed location: e.g. "C:\Program Files\Java\jdk1.6.0_05

In the jdk1.6.0_05 folder is a zip file that is 18.5 mb. I was hesitant about unzipping it and have not up to now. Could this be where "tools.jar" is residing? According to Sun Microsystem's download site, "tools.jar is in the "lib" folder but the "lib" folder is empty presently. Is it wise to unzip the folder when you do not know the destination of the files?

The question then remains, how do establish ANT_ HOME (either version) and
JAVA_HOME, either globally or the command screen temporary way? That seems to be the major problem. But until I have these other questions resolved I won't know if that is the underlying problem(s) interfering with making this thing work.

Thanks,

Jim Barber

kate

Hi Jim,

I suggest you read up on setting up java and ANT for development.  These really are basic pre-requisites for much greater challenges ahead, for example when you try to code using openLaszlo.

You set your JAVA_HOME to where your own java DK is.   Our FAQ just provides an example - but since you can put your java anywhere you like you have to point your JAVA_HOME at where you put it!

FYI my jdk lib directory contains a tools.jar

Regards,

Kate

jbarb

  Kate,
Thanks for your help. I am reading all I can find on apache ant and java. It is still a little confusing but I am learning.

Beside problems with ant, I think I just created another one.
I noticed that my version of KonaKart  2.2.1.0. is not the latest version on the KonaKart site, 2.2.4.0. So I decided to upgrade since my jre/jdk and mysql were up to date versions. I also hoped that it would solve some of my build problems. Well here is the message I get when it opens up KonaKart Admin subsequent to the install.
 
Welcome to the KonaKart Admin Application
   
Login

Username: 
Password: 
Login Cancel
 
There has been a problem....
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'konakart.kk_customer_group' doesn't exist


I first uninstalled the old version and reinstalled 2.2.4.0 without updating the old database, got the same error message. Uninstalled new version, reinstalled old version and the old version worked fine.

I then tried to reinstall 2.2.4.0 and check the box that allows the db to upgrade (upgrade was successful)and all indications were that it was a good install, except I got the same error message. Can I go into MYSQL and add this missing table? I should not be much of a problem to add this table (if that is the correct syntax) is that also a field? but I am concerned about creating more unintended consequences.

Thanks,

Jim B