title: CXF Policy Builder - Infinite Loop
body: <p>I'm new to building web services with Java and I'm taking a course on how to implement RESTful webservices with Java and Heroku using Tomcat, CXF, and JaxWS/RS. I've managed to deploy the application to Heroku and have been able to resolve all the errors until now. After finally getting the dependencies correct (I think), the server crashes because there appears to be an infinite loop of attempting to create a bean for org.apache.cxf.ws.policy.PolicyBuilder, which causes a StackOverflowException. I'm attaching the log file. Any help would be greatly appreciated. I'm rather lost.</p>
  
  <p>The log file is here: <a href="http://pastebin.com/1hK2sj1V" rel="nofollow">http://pastebin.com/1hK2sj1V</a></p>
  
  <p>My pom file is here: <a href="http://pastebin.com/SJxykTX8" rel="nofollow">http://pastebin.com/SJxykTX8</a></p>
  
  <p>My cxf file is here: <a href="http://pastebin.com/2Tgkfe2F" rel="nofollow">http://pastebin.com/2Tgkfe2F</a></p>
  
  <p>The log doesn't really seem to tell me where the problem is occurring, just that there's some issue with a bean being created infinitely. With my newbie-ness and the lack of helpful information in the log, I'm really confused with how to next debug the application. FWIW, I did check to see what <a href="https://cxf.apache.org/javadoc/latest-2.3.x/index.html?org/apache/cxf/ws/policy/class-use/PolicyBuilder.html" rel="nofollow">packages use this interface</a> as well as look for similar topics here and on Google, but I couldn't find anything helpful. Perhaps it's because I don't know really what I'm looking for. Thanks in advance for any help you can provide. </p>