2 Replies Latest reply on Nov 2, 2008 1:17 PM by nbelaevski

    Error while trying example given in cdk guide

    tutyrichard

      I am getting this error at the final step which is given in the CDK guide.

      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [INFO] Building inputDate
      [INFO] task-segment: [clean, install]
      [INFO] ------------------------------------------------------------------------
      [INFO] [clean:clean]
      [INFO] Deleting directory E:\encore\workspace\sandbox\inputDate\target
      [INFO] Preparing cdk:generate
      [WARNING] Removing: generate from forked lifecycle, to prevent recursive invocat
      ion.
      [INFO] [resources:resources]
      [INFO] Using default encoding to copy filtered resources.
      [INFO] [compiler:compile]
      [INFO] Compiling 2 source files to E:\encore\workspace\sandbox\inputDate\target\
      classes
      [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus
      .velocity.ContextClassLoaderResourceLoader'.
      [INFO] Setting property: velocimacro.messages.on => 'false'.
      [INFO] Setting property: resource.loader => 'classpath,cdk'.
      [INFO] Setting property: resource.manager.logwhenfound => 'false'.
      [INFO] Setting property: cdk.resource.loader.class => 'org.ajax4jsf.builder.velo
      city.ResourceLoader'.
      [INFO] **************************************************************
      [INFO] Starting Jakarta Velocity v1.4
      [INFO] RuntimeInstance initializing.
      [INFO] Default Properties File: org\apache\velocity\runtime\defaults\velocity.pr
      operties
      [INFO] Default ResourceManager initializing. (class org.apache.velocity.runtime.
      resource.ResourceManagerImpl)
      [INFO] Resource Loader Instantiated: org.codehaus.plexus.velocity.ContextClassLo
      aderResourceLoader
      [INFO] ClasspathResourceLoader : initialization starting.
      [INFO] ClasspathResourceLoader : initialization complete.
      [INFO] Resource Loader Instantiated: org.ajax4jsf.builder.velocity.ResourceLoade
      r
      [INFO] ClasspathResourceLoader : initialization starting.
      [INFO] ClasspathResourceLoader : initialization complete.
      [INFO] ResourceCache : initialized. (class org.apache.velocity.runtime.resource.
      ResourceCacheImpl)
      [INFO] Default ResourceManager initialization complete.
      [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Literal
      [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
      [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
      [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Include
      [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
      [INFO] Created: 20 parsers.
      [INFO] Velocimacro : initialization starting.
      [INFO] Velocimacro : adding VMs from VM library template : VM_global_library.vm
      [INFO] Velocimacro : added new VM : #quietnull( a ) : source = VM_global_library
      .vm
      [INFO] Velocimacro : added new VM : #tagPropertyMethods12( source ) : source = V
      M_global_library.vm
      [INFO] Velocimacro : added new VM : #tagPropertyRelease( source ) : source = VM_
      global_library.vm
      [INFO] Velocimacro : VM library template macro registration complete.
      [INFO] Velocimacro : allowInline = true : VMs can be defined inline in templates

      [INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT
      replace previous VM definitions
      [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be glob
      al in scope if allowed.
      [INFO] Velocimacro : initialization complete.
      [INFO] Velocity successfully started.
      [INFO] [cdk:generate {execution: default}]
      [INFO] Parse config file E:\encore\workspace\sandbox\inputDate\src\main\config\
      component\inputDate.xml
      [ERROR] Class java.lang.String for property value not equals with real bean prop
      erty type: java.lang.Object
      [ERROR] Class java.lang.String for property value not equals with real bean prop
      erty type: java.lang.Object
      [ERROR] Class java.lang.String for property value not equals with real bean prop
      erty type: java.lang.Object
      [ERROR] Class java.lang.String for property value not equals with real bean prop
      erty type: java.lang.Object
      [ERROR] Class java.lang.String for property value not equals with real bean prop
      erty type: java.lang.Object
      [INFO] Create tag class file com.infy.component.html.HtmlInputDate
      [INFO] Component com.infy.InputDate included in taglib inputDate
      [INFO] Component com.infy.InputDate included to taglib inputDate
      [INFO] [resources:resources]
      [INFO] Using default encoding to copy filtered resources.
      [INFO] [compiler:compile]
      [INFO] Compiling 3 source files to E:\encore\workspace\sandbox\inputDate\target\
      classes
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Compilation failure
      E:\encore\workspace\sandbox\inputDate\target\generated-component\java\com\infy\r
      enderkit\html\InputDateRenderer.java:[199,49] cannot find symbol
      symbol : method getValueAsString(javax.faces.context.FacesContext,com.infy.comp
      onent.UIInputDate)
      location: class com.infy.renderkit.html.InputDateRenderer



      E:\encore\workspace\sandbox\inputDate\target\generated-component\java\com\infy\r
      enderkit\html\InputDateRenderer.java:[199,49] cannot find symbol
      symbol : method getValueAsString(javax.faces.context.FacesContext,com.infy.comp
      onent.UIInputDate)
      location: class com.infy.renderkit.html.InputDateRenderer


      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 6 seconds
      [INFO] Finished at: Tue Oct 28 17:08:59 GMT+05:30 2008
      [INFO] Final Memory: 18M/32M
      [INFO] ------------------------------------------------------------------------

        • 1. Re: Error while trying example given in cdk guide
          tutyrichard

          The above error occurs coz of the below bold in the .jspx file. Can any one tell what is wrong in that file

          <?xml version="1.0" encoding="UTF-8"?>
          <f:root
          xmlns:f="http://ajax4jsf.org/cdk/template"
          xmlns:c=" http://java.sun.com/jsf/core"
          xmlns:ui=" http://ajax4jsf.org/cdk/ui"
          xmlns:u=" http://ajax4jsf.org/cdk/u"
          xmlns:x=" http://ajax4jsf.org/cdk/x"
          class="com.infy.renderkit.html.InputDateRenderer"
          baseclass="org.ajax4jsf.renderkit.AjaxComponentRendererBase"
          component="com.infy.component.UIInputDate"
          >
          <f:clientid var="clientId"/>
          <h:styles>/com/infy/renderkit/html/css/inputDate.xcss</h:styles>
          <f:resource name="/com/infy/renderkit/html/images/inputDate.png" var="icon" />
          <c:object var="caption" type="javax.faces.component.UIComponent" />
          <jsp:scriptlet>
          <![CDATA[
          caption = component.getFacet("caption");
          if(caption !=null && caption.isRendered()) {]]>
          </jsp:scriptlet>
          <div id="#{clientId}_caption" class="my-inputDate-caption #{component.attributes['captionClass']}">
          <f:insertComponent value="#{caption}" />

          <jsp:scriptlet>
          <![CDATA[}]]>
          </jsp:scriptlet>
          <div id="#{clientId}" title="#{value}" x:passThruWithExclusions="value,name,type,id">
          <input id="#{clientId}"
          name="#{clientId}"
          type="text"
          value="#{this:getValueAsString(context, component)}"
          class="my-inputDate-input #{component.attributes['inputClass']}"
          style="#{component.attributes['inputStyle']}"/>

          <jsp:scriptlet>
          <![CDATA[if(component.getFacet("icon")!=null && component.getFacet("icon").isRendered()) {]]>
          </jsp:scriptlet>
          <u:insertFacet name="icon" />
          <jsp:scriptlet>
          <![CDATA[
          }else{
          ]]>
          </jsp:scriptlet>
          <img src="#{icon}" class="my-inputDate-icon #{component.attributes['iconClass']}" style="#{component.attributes['iconStyle']}"/>
          <jsp:scriptlet>
          <![CDATA[
          }
          ]]>
          </jsp:scriptlet>

          </f:root>

          • 2. Re: Error while trying example given in cdk guide
            nbelaevski

            AjaxComponentRendererBase class does not have getValueAsString(javax.faces.context.FacesContext,com.infy.comp
            onent.UIInputDate) public method