Results 1 to 3 of 3
  1. #1
    rafacabanas is offline Member
    Join Date
    Oct 2010
    Posts
    2
    Rep Power
    0

    Default Could not initialize class com.geopista.app.AppContex

    Hello,
    I'm trying to create an application which connects to a data base. When running the program in Eclipse or in a compiled .jar, I get the following message. However, when I use the IDE Intellij IDEA, it works properly. I do have the .jar in the classpath.

    Exception in thread "main" java.lang.NoSuchMethodError: org.apache.commons.httpclient.methods.PostMethod.s etRequestContentLength(J)V
    at com.geopista.protocol.net.EnviarSeguro.enviar(Envi arSeguro.java:280)
    at com.geopista.protocol.net.EnviarSeguro.enviarPlano (EnviarSeguro.java:55)
    at com.geopista.security.SecurityManager.callHeartBea tNS(SecurityManager.java:394)
    at com.geopista.security.SecurityManager.callHeartBea t(SecurityManager.java:387)
    at com.geopista.app.AppContext.initHeartBeat(AppConte xt.java:221)
    at com.geopista.app.AppContext.<init>(AppContext.java :200)
    at com.geopista.app.AppContext.<clinit>(AppContext.ja va:156)
    at Pruebas.main(Pruebas.java:10)
    Exception in thread "Thread-3" java.lang.NoClassDefFoundError: Could not initialize class com.geopista.app.AppContext
    at com.geopista.app.AppContext.getHttpClient(AppConte xt.java:1202)
    at com.geopista.protocol.net.EnviarSeguro.enviar(Envi arSeguro.java:251)
    at com.geopista.protocol.net.EnviarSeguro.enviarPlano (EnviarSeguro.java:55)
    at com.geopista.security.SecurityManager.callHeartBea tNS(SecurityManager.java:394)
    at com.geopista.security.SecurityManager.callHeartBea t(SecurityManager.java:387)
    at com.geopista.security.TestConnection.run(TestConne ction.java:59)


    Thanks in advance

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    5

    Default

    the commons-httpclient jar file version you have is probably not the one expected by this other application ?

  3. #3
    rafacabanas is offline Member
    Join Date
    Oct 2010
    Posts
    2
    Rep Power
    0

    Default

    In my app I use the libraries of another application (localgis geopista). My code doesn't use directly commons-http.jar, and this application uses the version of the library installed in my system. I guess this is the correct version because the application works porperly.

Similar Threads

  1. Replies: 3
    Last Post: 09-29-2010, 09:26 AM
  2. How to show class initialize data in JSP ?
    By tking88 in forum New To Java
    Replies: 0
    Last Post: 03-07-2010, 09:17 AM
  3. ObjectInputStream does not initialize
    By Singing Boyo in forum New To Java
    Replies: 1
    Last Post: 06-03-2009, 08:11 AM
  4. Replies: 16
    Last Post: 05-08-2008, 09:45 PM
  5. Initialize variables before use
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-22-2007, 11:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •