10 Replies Latest reply on Aug 20, 2014 7:52 AM by Crazygoji

    CompilationFailedException consuming web services on CF10

    JeffHorne2

      I am trying to consume webservices on my CF 10 environment.  I keep getting a CompilationFailedException error looking for java/utils.  I have uninstalled CF, uninstalled the jdk, used the bundled jdk, reinstalled jdk 17.0_25 but to no avail.  I tried replacing C:\coldfusion10\cfusion\lib\tools.jar with the same file in the latest JDK as recommended on this forum on earlier releases encountering this error.

       

      I have pasted the text from coldfusion-out.log but changed the name of the server with the wsdl.

       

      Any direction is very appreciated.

       

      Thanks

       

      Jun 21, 2013 11:29:09 AM Information [ajp-bio-8012-exec-1] - Starting Web service request.

      Jun 21, 2013 11:29:09 AM Information [ajp-bio-8012-exec-1] - Creating Web service proxy {url='https://serverdomain/rpc/soap-axis/confluenceservice-v2?wsdl'}

      Jun 21, 2013 11:29:15 AM Information [ajp-bio-8012-exec-1] - Using Axis 1 for consuming the service https://serverdomain/rpc/soap-axis/confluenceservice-v2?wsdl.

      Jun 21, 2013 11:29:16 AM Information [ajp-bio-8012-exec-1] - logAdmin Error: Application|coldfusion.jsp.CompilationFailedException: Errors reported by Java compiler:  Found 2 system errors:  *** Error: Could not find package ""java/util"" in:                 C:\ColdFusion10\cfusion\wwwroot\WEB-INF\classes                 C:\ColdFusion10\cfusion\wwwroot\WEB-INF\lib\cf-bootstrap-for-flex.jar                 C:\ColdFusion10\cfusion\wwwroot\WEB-INF\lib\cfmx_bootstrap.jar                 C:\ColdFusion10\cfusion\wwwroot\WEB-INF\lib\cfx.jar                 C:\ColdFusion10\cfusion\wwwroot\WEB-INF\lib\commons-beanutils-1.8.0.jar                 C:\ColdFusion10\cfusion\wwwroot\WEB-INF\lib\commons-collections-2.1.jar                 C:\ColdFusion10\cfusion\wwwroot\WEB-INF\lib\cryptojce.jar                 C:\ColdFusion10\cfusion\wwwroot\WEB-INF\lib\cryptojcommon.jar                 C:\ColdFusion10\cfusion\wwwroot\WEB-INF\lib\jcm.jar                 C:\ColdFusion10\cfusion\wwwroot\WEB-INF\lib\jcmFIPS.jar                 C:\ColdFusion10\cfusion\wwwroot\WEB-INF\lib\js.jar                 C:\ColdFusion10\cfusion\wwwroot\WEB-INF\lib\portlet-proxy.jar                 C:\ColdFusion10\cfusion....|

        • 1. Re: CompilationFailedException consuming web services on CF10
          BKBK Adobe Community Professional & MVP

          It remains unclear why you chose to use the external JDK/JVM. Since you are in a position to reinstall, I would suggest that you do so. After that, let ColdFusion use its own built-in JVM.

           

          However, let's assume you wish to use the external JDK. You mentioned copying the file, tools.jar, from the external JDK to ColdFusion's lib directory. However, it is unclear whether you had reconfigured ColdFusion beforehand to use the external JDK. You can either do that in the ColdFusion Administrator or, equivalently, by modifying the java.home option in the jvm.config file to something like

           

          java.home=C:\\Program Files\\Java\\jdk1.7.0_25\\jre

          • 2. Re: CompilationFailedException consuming web services on CF10
            JeffHorne2 Level 1

            Thank you.  I was hoping to resolve this without reinstalling.  I have done so several times since first encountering this issue.  updating the tools.jar was following resolution from a thread elsewhere where CompilationFailedException occurred with Error: Could not find package ""java/util"".

             

            I upgraded to a newer JDK because of the recent hotfixes involved going to JDK 1.7 as JDK 1.6 was no longer supported by Oracle.

             

            Here is my java.config.

             

            #

            # VM configuration

            #

            # Where to find JVM, if {java.home}/jre exists then that JVM is used

            # if not then it must be the path to the JRE itself

             

            #java.home=C:/ColdFusion10/jre

            java.home=C:/ColdFusion10/jdk1.7.0_25/jre

            application.home=C:\\ColdFusion10\\cfusion

             

            #

            # If no java.home is specified a VM is located by looking in these places in this

            # order:

            #

            #  1) ../runtime/jre

            #  2) registry (windows only)

            #  3) JAVA_HOME env var plus jre (ie $JAVA_HOME/jre)

            #  4) java.exe in path

            #

             

            # Arguments to VM

            java.args=-server  -Xms512m -Xmx1024m -XX:MaxPermSize=192m -XX:+UseParallelGC -Xbatch -Dcoldfusion.home={application.home} -Dcoldfusion.rootDir={application.home} -Dcoldfusion.libPath={application.home}/lib -Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true -Dcoldfusion.jsafe.defaultalgo=FIPS186Random -Dcoldfusion.classPath={application.home}/lib/updates,{application.home}/lib,{application .home}/lib/axis2,{application.home}/gateway/lib/,{application.home}/wwwroot/WEB-INF/flex/j ars,{application.home}/wwwroot/WEB-INF/cfform/jars

             

            # Comma separated list of shared library path

            java.library.path={application.home}/lib,{application.home}/jintegra/bin,{application.home }/jintegra/bin/international,{application.home}/lib/oosdk/classes/win

             

            java.class.path={application.home}/lib/oosdk/lib,{application.home}/lib/oosdk/classes

            • 3. Re: CompilationFailedException consuming web services on CF10
              BKBK Adobe Community Professional & MVP

              Your JVM configuration file looks fine. The error message might be quite literal. If so, then it is telling you that compilation of a source file, very likely one of yours, failed. It tells you more. The source may be referring to "java/util" as a package, rather than to "java.util".

              • 4. Re: CompilationFailedException consuming web services on CF10
                JeffHorne2 Level 1

                Thanks again.  Unfortunately, there is no compilation of a file.  It is a call to a web service on another CF site using CF 9.  When I had CF 9 running on my dev box, the call works fine.  Now that I am on CF 10 on the dev box, when I call the same web service, I get this message.

                • 5. Re: CompilationFailedException consuming web services on CF10
                  BKBK Adobe Community Professional & MVP

                  Then, my, does that error message really suck. I saw an old fix for this on the web, that says you should add the lib directory to the classpath, for example, like this:

                   

                  application.home=C:/ColdFusion10/cfusion

                  java.class.path={application.home}/lib,{application.home}/lib/oosdk/lib,{application.home} /lib/oosdk/classes

                  • 6. Re: CompilationFailedException consuming web services on CF10
                    JeffHorne2 Level 1

                    That message sure does.  ""java/util"" must be a place holder.  I added lib to the class.path and there is no difference.  I am going to punt.  Uninstall CX, reinstall, apply hotfixes, rebuild sites in IIS and see if results are different.  This is just crazy.

                     

                    Are you on CF 10 and consuming Web Services successfully?

                    • 7. Re: CompilationFailedException consuming web services on CF10
                      BKBK Adobe Community Professional & MVP

                      Perhaps incompatibility issues between Axis 1 and Axis 2 web services? What happens when you put the following at the beginning of your Application.cfc, testing them in turn:

                       

                      <cfset this.wssettings.version.consume = "2">

                      <!--- <cfset this.wssettings.version.consume = "1"> --->

                       

                      To answer your question, I consume web services successfully. My version is 10.0.10.284825.

                      • 8. Re: CompilationFailedException consuming web services on CF10
                        JeffHorne2 Level 1

                        I went ahead and did the uninstall route, got rid of all java, even ran CCleaner to get rid of any java related entries in the registry.  Now after applying the keystore, the error is back.  When I toggle to the <cfset this.wssettings.version.consume = "2"> I get an error message "Cannot generate stub objects for web service"  I enter the wsdl url in a browser and see WSDL created by Apache Axis version: 1.2.1, so I switch back to <cfset this.wssettings.version.consume = "1">.  As for version, I am a fresh install with the manditory update applied only.  I was fine before reinstalling and now I cannot apply hotfixes through CFAdmin. 

                         

                        I really appreciate you sticking with me on this but I am definitely at my wits end.  It just keeps getting worse.  Thankfully this is my local dev install.  I sure hope it goes goes better on the prod server install.

                        • 9. Re: CompilationFailedException consuming web services on CF10
                          BKBK Adobe Community Professional & MVP

                          There is something not quite right happening on your development server. Could you follow a clean procedure right from the start?

                           

                          By this I mean, install ColdFusion, letting it use the JVM that ships with it. No keystore, no extra Java, just ColdFusion 10. Then open the ColdFusion Administrator and apply the updates.

                           

                          Next, do a test. Set up a basic CFC containing one function that returns the string "Hello World". Then use that as the basis for consuming a web service locally.

                          • 10. Re: CompilationFailedException consuming web services on CF10
                            Crazygoji

                            It must have been something specific to the Dev server and some patch or setting.  I got a new box, installed CF10 and was able to consume web services.  I unfortunately have no idea what it was.