0 Replies Latest reply on Apr 9, 2013 8:58 PM by Mitches

    Problem with SAP JCO 3 connection with CF 9 developer edition

    Mitches

      When we try to connect using SAP JCO3 under CF9 developer or trial edition , we get the error 'Could not initalize class com.sap.conn.rfc.engine.GUID'.

      As soon as we update the version to a licensed version and restart CF , the problem goes away.

       

      Does anyone know what we could do to make it work with the developer edition ?

       

       

      <Cftry>
      <cfscript>

        v_config_file = "config.jcoDestination";
        properties = createObject( 'java', 'java.util.Properties' ).init();
        outputstream = createObject( 'java', 'java.io.FileOutputStream').init( v_config_file );
        dataprovider = CreateObject("java","com.sap.conn.jco.ext.DestinationDataProvider");
        destinationManager = CreateObject("java","com.sap.conn.jco.JCoDestinationManager");
       
        properties.setProperty(DataProvider.JCO_ASHOST, "dev.someserver.com");
        properties.setProperty(DataProvider.JCO_SYSNR,  "00");
        properties.setProperty(DataProvider.JCO_CLIENT, "300");
        properties.setProperty(DataProvider.JCO_USER,   "zzzzzzz");
        properties.setProperty(DataProvider.JCO_PASSWD, "wwwwwww");
        properties.setProperty(DataProvider.JCO_LANG,   "EN");
        properties.store(outputstream,'For tests only');
       
        destination = destinationManager.getDestination('config');
       
       
        destination.ping();


      </cfscript>
      <p style="border:solid 1px red;padding:30px;">
      <cfoutput>User:#destination.getUser()# connected to client: #destination.getClient()# on server: #destination.getApplicationServerHost()#</cfoutput>
      </p>

      <cfcatch type="any">
        <cfoutput>#cfcatch.message#</cfoutput>
      </cfcatch>
      </Cftry>