1

I am trying to use jersey-client and getting "java.lang.RuntimeException: java.lang.ClassNotFoundException: Provider org.glassfish.jersey.internal.RuntimeDelegateImpl could not be instantiated: java.lang.IllegalStateException: No generator was provided and there is no default generator registered" I am getting this when making all required jars to single jar and removing META-INF folders. FYI: If i kept all jars itself then it's working fine.

So what is the solution to do so..

Anil kumar
  • 416
  • 1
  • 6
  • 18
  • You need the META-INF folders, and the combination of its contents. See the comments and answer in [this post](http://stackoverflow.com/q/35814340/2587435) – Paul Samsotha Mar 25 '16 at 12:07
  • @peeskillet thank you but I don't know anything about shade plugin and it's usage – Anil kumar Mar 25 '16 at 12:25
  • What build system are you using? – Paul Samsotha Mar 25 '16 at 12:29
  • @peeskillet, i am just using jar command for extracting & combining them – Anil kumar Mar 25 '16 at 12:38
  • You are going to have a tough task. You need all the files in the `META-INF/services` from all the jars. You need to combine the contents of all the files. You should really consider using Maven, and just use the shade plugin, and it will handle it for you. Otherwise it's going to be a tough task trying to do it manually. Maybe you can write a script to handle this. – Paul Samsotha Mar 25 '16 at 12:48
  • @peeskillet, once again thank you for the clarification that you have given to me – Anil kumar Mar 25 '16 at 13:00

0 Answers0