0

Resteasy クライアントの作成中に google-app-engine で Resteasy を使用すると、 java.lang.NoClassDefFoundError: Could not initialize class org.jboss.resteasy.client.core.executors.ApacheHttpClient4Executor が発生します。

      import org.jboss.resteasy.client.ClientRequest;
      import org.jboss.resteasy.client.ClientResponse;

      public class Demo{
         public void testConnection()
         {
            ClientRequest request = new ClientRequest("url");
            request.accept("application/json");

            request.body("application/json", body);

            response = request.put(String.class);
         }
      }

ClientRequest クラスの intilaizing 中に例外が発生します。エラー トラック トレースは次のとおりです。

{java.lang.NoClassDefFoundError: Could not initialize class org.jboss.resteasy.client.core.executors.ApacheHttpClient4Executor
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance_(Runtime.java:127)    at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:148)
at org.jboss.resteasy.client.ClientRequest.getDefaultExecutor(ClientRequest.java:87)
at org.jboss.resteasy.client.ClientRequest.<init>(ClientRequest.java:97)}
4

0 に答える 0