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

Add an AboutUsAction issue

Started by Manu, June 24, 2011, 09:00:45 am

Previous topic - Next topic

Manu

Hi all,

I try to add an  « About Us » page on my Konakart Installation. [KonaKart V5.2.0.0 (6216)]

So, I've edited the struts-config.xml file :


<action path="/AboutUs" type="com.konakart.actions.AboutUsAction">
<forward name="AboutUs" path="/CatalogAboutUsPage.do"/>
</action>


and


<action path="/CatalogAboutUsPage" forward="catalog.aboutus.page"/>


I have edited the tiles-def.xml file :

<definition name="catalog.aboutus.page" extends="main.layout">
<put name="body" value="/WEB-INF/jsp/AboutUs.jsp"/>
</definition>


And I've created my AboutUsAction in /custom/appn/src/com/konakart/actions directory :


package com.konakart.actions;

public class AboutUsAction extends BaseAction {

    public ActionForward execute(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
    {
        KKAppEng kkAppEng;
try {
kkAppEng = this.getKKAppEng(request, response);
        kkAppEng.nav.set(getCatMessage(request, "header.aboutus"), request);
} catch (Exception e) {
            return mapping.findForward(super.handleException(request, e));
}

return mapping.findForward("AboutUs");
    }
}


But when I click on my link
<html:link page="/AboutUs.do"> <bean:message key="information.tile.aboutus"/> </html:link>

I get that error :

[ERROR] RequestProcessor - No action instance for path /AboutUs could be created <java.lang.ClassNotFoundException: com.konakart.actions.AboutUsAction>java.lang.ClassNotFoundException: com.konakart.actions.AboutUsAction



I think it's because the AboutUsAction.class file is not in the konakart_custom.jar  in WEB-INF/lib (Is it ?)

So I tried to run ant in custom dir to "update" the .jar (Is it the good way ?) but I get this error :


Buildfile: build.xml

clean_torque_classes:

clean_portlet_war:
     [echo] Cleanup portlet WARs...
     [echo] Cleanup portlet WAR staging area...

clean_admin_portlet_war:
     [echo] Cleanup admin portlet WARs...
     [echo] Cleanup admin portlet WAR staging area...

clean_wars:
     [echo] Cleanup WARs...
     [echo] Cleanup EARs...

clean:
     [echo] Cleanup...

generate_torque_java:

create_torque_classes:

make_manifest_file:
     [echo] Create the MANIFEST.MF file for all jars

compile:
     [echo] Compile the customisable application code
    [mkdir] Created dir: C:\Program Files\KonaKart\custom\appn\classes
    [javac] Compiling 137 source files to C:\Program Files\KonaKart\custom\appn\classes

BUILD FAILED
C:\Program Files\KonaKart\custom\build.xml:257: Error running C:\Program Files\Java\jdk1.6.0_26\bin\javac.exe compiler

Total time: 0 seconds


I look on the Internet but I didn't find an answer.

Currently my JAVA_HOME is : C:\Program Files\Java\jdk1.6.0_26
And my PATH is C:\WINDOWS\Program Files\Java\jdk1.6.0_26\bin;C:\WINDOWS\system32;C:\WINDOWS;[...]

(I didn't modify the build.xml file) I don't know how to have more information about this error.

Does anybody has an idea ?  :-[

Thanks,
Manu

(Sorry for my english but I'm French  :-X )

Manu

And Fyi, i've tried  Javac on a test file .java and itw works

and java -version :

java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)

cedroy

Salut,

chez moi, le problème se trouvait dans l'accès à javac. J'ai rajouté le chemin à la variable PATH et tout baigne.

Bon après-midi

CRy

Manu

Oui en effet en regardant bien la valeur dans le PATH était pas la bonne,
J'avais C:\WINDOWS\Program Files au lieu de C:\Program Files directement.

J'arrive à taper Javac directement dans la console. Par contre j'ai toujours l'erreur quand j'exécute le ant.

Je cherche encore ...

greg

are you executing ANT using the ANT supplied in the KonaKart installation:

custom>   bin\ant


.or something else....


BTW... there is an AboutUs page in the next version (from v 5.5.0.0)