facebook

NoClassDefFound when running my web-app [Closed]

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #223240 Reply

    korg
    Member

    Hi,

    I try to run my web-app with resin 2.x but when I start it I have an exception :

    java.lang.NoClassDefFoundError: com/caucho/server/http/HttpServer
    Exception in thread “main”

    It looks like I should include the path of my Resin/lib directory in my build path, but I don’t understand why I should do it. I’ve already setted the resin home directory, the JDK directory, etc…

    Someone could help me please??

    Thanks!

    #223246 Reply

    Riyad Kalla
    Member

    Few things:

    1) Make sure you are using the Resin 2 connector and not the Resin 3 connector
    2) If that doesn’t fix it, go to your Resin 2 > Paths preferences, and add ALL the libs from the /lib dir to the first box “prepend to classpath”
    3) If THAT doesn’t fix it, upgrade to Resin 3 and setup the Resin 3 connector appropriately.

    #223249 Reply

    korg
    Member

    Still Doesn’t work! I also read on Resin2 connector and set the <Resin_Home>/bin directory to Resin2’s Library Path, but I always get the error

    java.lang.NoClassDefFoundError: com/caucho/server/http/HttpServer
    Exception in thread “main”

    When trying to run the web-app in eclipse.

    No other idea on what my problem could be??

    Thanks

    #223251 Reply

    Riyad Kalla
    Member

    This has got to be something simple, I’d suggest trying to figure out which resin JAR has that class (com.caucho.server.http.HttpServer) in it, and make SURE it is in your classpath in your Path’s settings for your Resin 2 connector.

    #223252 Reply

    korg
    Member

    Everything’s there. I added all .jar files that were in my RESIN_HOME/lib directory and it still doesn’t work. I think the Run launcher doesn’t use my settings in MyEclipse preferences. If I click “Run…”, it should use my MyEclipse settings right?

    I’m exasperated!

    🙁

    #223256 Reply

    Riyad Kalla
    Member

    I think the Run launcher doesn’t use my settings in MyEclipse preferences. If I click “Run…”, it should use my MyEclipse settings right?

    :|, this isn’t how you run your application using MyEclipse, please refer to our documentation here on how to do it: http://www.myeclipseide.com/images/tutorials/quickstarts/webprojects/

    And application server specific doc here: http://www.myeclipseide.com/images/tutorials/quickstarts/appservers/

    #223288 Reply

    korg
    Member

    I start it this way now and I still have an NoClassDefFound when I try stating my server. It seems like the application still doesn’t resolve com.caucho.http.httpservlet

    🙁

    #223290 Reply

    Riyad Kalla
    Member

    korg,
    What version of MyEclipse are you using? What are ALL your settings for Resin from the application connector settings? And how are you trying to start it? Also what version of Eclipse are you running?

    #223295 Reply

    korg
    Member

    Ok, here are all my settings and all things I’ve done so far.

    I just removed Eclipse and uninstalled MyEclipse and reinstalled both, so everything is set to default settings.

    I’m using :

    MyEclipse 3.8.3
    Eclipse 3.0.1
    Resin 2

    In Window->Preferences->Resin 2:

    Resin home directory is OK and the configuration file too.
    I specified a real JDK (not a JRE) (J2SDK 1.4.2_06)
    No path is set in the path preferences (I previously added resin/bin directory to the library path, but it changed nothing so i removed it. I previously added all the resin/lib jar files to the “append to classpath” field and it still didn’t work, again I removed them).

    I created a very simple Web Project with only 1 jsp in it. Then, I clicked on “Deploy J2EE project to server…”, added it properly (using resin 2 connector) and the deployment was OK. Then, I clicked on the black men icon->Resin2->Start and the first time I do it, I receive a popup error saying:

    “This application has failed to start because LIBEAY32.dll was not found. Re-installing the application may fix this problem.”

    If I stop the server (Resin 2->stop) and I restart it, I switch to the debug view and here is what it looks like:

    Thread [main] (Suspended (exception FileNotFoundException))
    FileInputStream.open(String) line: not available [native method]
    FileInputStream.<init>(File) line: 106
    ZoneInfoFile$1.run() line: 910
    AccessController.doPrivileged(PrivilegedExceptionAction) line: not available [native method]
    ZoneInfoFile.readZoneInfoFile(String) line: 904
    ZoneInfoFile.createZoneInfo(String) line: 520
    ZoneInfoFile.getZoneInfo(String) line: 511
    ZoneInfo.getTimeZone(String) line: 524
    TimeZone.getTimeZone(String, boolean) line: 448
    TimeZone.getTimeZone(String) line: 444
    QDate.<init>() line: 126
    LogStream.<init>(String) line: 76
    LogStream.open(String) line: 178
    L10N.<init>(String) line: 77
    ResinServer.<clinit>() line: 78
    HttpServer.main(String[]) line: 103

    Can’t say more than that!

    Any idea?

    Thanks a lot, man… hope it will finally works!

    #223296 Reply

    Riyad Kalla
    Member

    Workaround, click the “Play” button in the debug view, for some reason Resin’s exception stops execution in Eclipse’s debugger, you have to hit Play to continue, it will throw that popup, then just hit OK and it starts just fine… I’m looking into why that popup comes up, very strange.

    #223297 Reply

    Riyad Kalla
    Member

    Ahh it seems the popup and exception is caused by Resin not being able to find OpenSSL libraries:
    http://www.caucho.com/support/resin-interest/0303/0247.html

    I guess you can download it from here:
    http://www.dll-files.com/dllindex/dll-files.shtml?libeay32

    Or install this maybe:
    http://gnuwin32.sourceforge.net/packages/openssl.htm

    You’ll have to check the Resin OpenSSL doc to see how to do it:
    http://songpa.miso.co.kr/resin-doc/security/ssl.xtp

    #223299 Reply

    korg
    Member

    Thanks a lot man, I did a erally basic test and everything was working fine… I’ll try with a lot more complexe web-app and I’ll give you news.

    Thanks again,
    Phil

    #223307 Reply

    korg
    Member

    Everything works fine! Thanks a lot man. I still have the error, but when I’ll have some free time, I’ll try to install OpenSSL libraries.

    Thanks!

    #223315 Reply

    Riyad Kalla
    Member

    Glad to hear it is working.

Viewing 14 posts - 1 through 14 (of 14 total)
Reply To: NoClassDefFound when running my web-app [Closed]

You must be logged in to post in the forum log in