0

I'm having a problem registering a REST web service in the ColdFusion Administrator. I'm using ColdFusion 10 on a Windows server, and the error I get after trying to register a REST web service is:

Error registering REST service. Please ensure that you have entered a proper mapping and path. Application CA could not be initialized. Reason: class "com.sun.xml.bind.Util"'s signer information does not match signer information of other classes in the same package class "com.sun.xml.bind.Util"'s signer information does not match signer information of other classes in the same package

I've tried registering a service on both a remote CF instance as well as my local instance. Locally I've tried just a real basic service - basically one CFC in an application all by itself, but still get the error. I am putting in both the Root path and the Service Mapping, as I do not have an Application.cfc in the application.

Any ideas?

el-kammino
  • 116
  • 3
  • Not sure why this was downvoted. It woulda been cool if whoever did that actually tried to *help* by explaining why. – Adam Cameron Mar 24 '15 at 13:42
  • 1
    Is it related to this: http://stackoverflow.com/a/2877355/894061 ? Sounds to me like possibly your classpath might be pointing to same but different-versioned packages that CF needs? That's a wild guess. Can you post the code for your local / basic attempt, just for good measure. – Adam Cameron Mar 24 '15 at 13:45
  • Thanks Adam! You were correct about the Class Path. My local CF setup had some custom JARs included, and after removing those and restarting the instances I was able to add the REST service. Now I'll have to re-add those JARs and see if my WS sticks, but theoretically it should - otherwise I'm not sure how I will register the service on a remote instance. – el-kammino Mar 24 '15 at 14:52
  • Followup - it appears you can just re-add the JARs and restart the instance and the WS sticks. Thanks again! – el-kammino Mar 24 '15 at 15:43
  • OK, it's probably worthwhile you writing up your solution as an "answer" and mark it as such. – Adam Cameron Mar 24 '15 at 16:19

1 Answers1

1

This problem was caused by some custom JARs I was referencing in the ColdFusion Class Path in the Java and JVM settings in the CF Admin utility. I removed the references to the JARs and restarted the CF instance. Then I was able to successfully add the REST WS. I then re-added the JARs in the class path and restarted the instance. The proper solution is probably to recompile those JARs with the same certificate, but if you don't have access to the source code, this may be the only workaround.

el-kammino
  • 116
  • 3
  • The issue I'm noticing now is if I re-add the JAR files to the build path after adding my web service, my web service does not work. Even though I was able to add my WS in the CF Admin utility, CF must be doing some kind of on-the-fly compilation and hitting the same error and preventing it from working. If I remove the JAR files from the build path, the WS works just fine. – el-kammino Mar 25 '15 at 13:34
  • I'll just keep responding to my own question and answer - maybe this will help someone else. I've narrowed this down to three JAR files related to JAXB: jaxb-api-2.27.jar, jaxb-core-2.2.7.jar, and jaxb-imple-2.2.7.jar. If you have these in your Java build path it might cause a conflict with REST services. Makes sense because CF probably uses different signed versions of the same classes for marshalling/unmarshalling. If you remove these JARs or do not include them in your build path then REST web services will work, but your other stuff might break... – el-kammino Mar 25 '15 at 15:17