Cannot use javahl, JavaSVN nor command line svn client

This post has been moved to http://srinichekuri.com/2014/02/14/cannot-use-javahl-javasvn-nor-command-line-svn-client/

*********************************************************************

I was working on a old project that had all build files that were working fine when coded originally. I tried using the same files and I ran into this issue.

Error: Cannot use javahl, JavaSVN nor command line svn client

Research:
I have googled on this and I was able to find two feasible solutions that apparently worked for others.

  1. javahl.dll or svnjavahl.dll files have to be appended to PATH variable. This solution didn’t work for me. First of all I didn’t find these files and even if would have found them, I wouldn’t have done it as changing PATH variable was not an option for me.
  2. Download a svn client like silksvn and install it. This will put in a PATH variable which will in turn help fixing the issue. This was not an option either as I was not willing to install a software for something that was supposed to work stand alone.

Solution:
After multiple trails this is what worked for me.

  • I downloaded the latest SvnAnt (svn 1.2.x at time of documentation).
  • I replaced svnant.jar, svnClientAdapter.jar, svnjavahl.jar files that were preexisiting and added svnkit.jar.
  • Add these files to classpath in ant script. (No changes done to PATH variables or any other system level variable)
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml">
 <classpath>
 <pathelement location="C:/svnAnt/lib/svnant.jar"/>
 <pathelement location="C:/svnAnt/lib/svnClientAdapter.jar"/>
 <pathelement location="C:/svnAnt/lib/svnjavahl.jar"/>
 <pathelement location="C:/svnAnt/lib/svnkit.jar"/>
 </classpath>
 </typedef>

Hope this helps!!!

Calling Spark components from MX components in flex4

This post is moved to http://srinichekuri.com/2011/04/05/spark-itemrenderer-for-mx-components-in-flex4/

**********************************************************************

Flex4 is still in adolescent stage of transition from flex3 architecture to spark architecture. Anyone that has worked on flex4 would know that while many components are completely migrated to spark architecture, there are few that are only available as mx components. So to address the scenario of spark components being used in conjunction with mx components, Adobe has come up with some components that help bridge the gap. One of such components is MXIterator.

I have an example here that will help us understand the problem I am talking about. I have a simple mx Combobox that uses a itemrenderer called NameRenderer. NameRenderer is using the tag <s:Iterator>. If we running the code we get a big error that says
“Type Coercion failed: cannot convert renderer::NameRenderer@6bf4c29 to mx.controls.listClasses.IListItemRenderer”. This is because we tried to use a spark component from mx component. The correct way is to use  <s:MXIterator> for NameRenderer.

Test.mxml

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
    xmlns:s="library://ns.adobe.com/flex/spark" 
    xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">

 <fx:Script>
 <![CDATA[
 import mx.collections.ArrayCollection;

 [Bindable]
 private var ac:ArrayCollection = new ArrayCollection([
 {employeeid:"001",firstname:"Mike",lastname:"Hallinger"},
 {employeeid:"002",firstname:"Tom",lastname:"Flemin"}
 ]);

 private function labelForCombo(value:Object):String{
	 return value.firstname+" "+value.lastname;
 }

 ]]>
 </fx:Script>

 <mx:Form>
	 <mx:ComboBox dataProvider="{ac}" itemRenderer="renderer.NameRenderer" 
	text="Employee" width="150" labelFunction="labelForCombo"/>

 </mx:Form>

</s:Application>

NumberRenderer(Wrong)

<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"  
xmlns:s="library://ns.adobe.com/flex/spark" 
 xmlns:mx="library://ns.adobe.com/flex/mx" 
 autoDrawBackground="true">
 <mx:Label text="{data.employeeid+'('+data.firstname + ' '+data.lastname+')'}"/>
</s:ItemRenderer>

This is the error you will see:

NumberRenderer(Correct)

<?xml version="1.0" encoding="utf-8"?>
<s:MXItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" 
 xmlns:s="library://ns.adobe.com/flex/spark" 
 xmlns:mx="library://ns.adobe.com/flex/mx" 
 autoDrawBackground="true">
 <mx:Label text="{data.employeeid+'('+data.firstname + ' '+data.lastname+')'}"/>
</s:MXItemRenderer>

These are set of components that are given by adobe that act as bridges. Few other components that fall into the same category are <s:MXAdvancedDataGridItemRenderer>, <s:MXDataGridItemRenderer>, <s:MXFTETextInput> and <s:MXTreeItemRenderer>.