Problem with document server

2000-11-29
2013-03-25
  • Konrad Neuwirth

    Konrad Neuwirth - 2000-11-29

    I currently have a severe problem with the document server:
    I can't get it to import (upload) any document; it always fails with an IO error.  The client reports

    org.mitre.cvw.docserv.DocServException:
    org.mitre.cvw.docserv.DocServException: I/O error:
    http://HOSTNAME:8080/servlet/docservlet/

    I've tried to access the tomcat server on 8080 on that host,
    and it displays an initial page, so I assume it must be up and
    running. Also, /test and /admin produce results that seem to
    be okay, so I guess the installation there is all right.

    When reading through documentation, I see references to
    a fair number of entities that I do not get when I install the
    Linux docserver tarball; I neither have a .cfg file nor an install.sh; and also, doc-store is conspiciously missing.

    So I generated that directory, but the I/O error remains.  I'm
    not quite sure what log files to include here, but the system
    is installed on a stock RedHat 7.0 machine, meaning the
    Java VM is Kaffe, and apart from installing CVW, no
    additional Java setup was done (setting any path or so forth).

    tomcat.log /does/ mention not finding docservlet, so that reads
    as
    java.lang.ClassNotFoundException: docservlet

    with an unset path.

    Any pointers what I need to twiddle with?

    Thanks,
    Konrad

     
    • Steve Jones

      Steve Jones - 2000-11-30

      Konrad,

      You have found the problem, now we just need to figure out how to fix it. Since the document server is a servlet, if it isn't started by Tomcat then there will be no documents available and you'll see the IO errors.

      The first thing to check is that the directory tomcat/webapps/app/WEB-INF/lib contains 4 jar files: cb.jar, ds.jar, mysql.jar, and xp.jar and that the permissions allow them to be read (DocServlet.class is in ds.jar). Since I've never used Kaffee, it may not be a bad thing to include these jar files in your CLASSPATH also. You can also check the web.xml file to make sure the <servlet-class> is org.mitre.cvw.docservlet.DocServlet, but I would think that file would be ok.

      Yeah, the documentation is off for the Linux docserver. I put this together to allow CVW to be run under Linux, but haven't had the opportunity (and probably won't anytime soon) to document it. On the bright side, I've found Tomcat to be quite cool in the way it configures itself, so believe it or not it's much easier to set up than the Solaris version!

      Hope this helps some,
      Steve

       
      • Konrad Neuwirth

        Konrad Neuwirth - 2000-12-02

        Hi Steve,
          thanks for helping. I've looked around some more, and I'm sure now that
        CLASSPATH contains the four .jar files, and they are also readable to
        the server.  What I don't quite understand, though, is that there seems to be
        no registration of the /docservlet/* path in the tomcat directory space.  I've found
        the following entries in servlet.log:

        Context log path="" :tomcat.errorPage: init
        Context log path="" :default: init
        Context log path="" :jsp: init
        Context log path="/admin" :tomcat.errorPage: init
        Context log path="/admin" :default: init
        Context log path="/admin" :jsp: init
        Context log path="/test" :tomcat.errorPage: init
        Context log path="/test" :default: init
        Context log path="/test" :jsp: init
        Context log path="/examples" :tomcat.errorPage: init
        Context log path="/examples" :default: init
        Context log path="/examples" :jsp: init
        Context log path="/app" :tomcat.errorPage: init
        Context log path="/app" :default: init
        Context log path="/app" :jsp: init
        Context log path="/app" :docservlet: init
        Context log path="" :invoker: init

        (that is, btw, the full servlet.log file)

        whereas web.xml in the directory $TOMCAT_HOME/webapps/apps/WEB-INF
        mentions
            <servlet-mapping>
                <servlet-name>
                    docservlet
                </servlet-name>
                <url-pattern>
                    /docservlet/*
                </url-pattern>
            </servlet-mapping>

        I didn't move around directories, though, so this is how it all came out when I
        unpacked the CVWdocserver4.0 package.  Maybe something int the tomcat
        configuration is still at fault?

        Thanks for providing assistance,
        Konrad

         
        • Konrad Neuwirth

          Konrad Neuwirth - 2000-12-02

          I know following up on myself is lame, but still, I just had an idea that I had to
          try, so I'll report that.  I just created a symlink from the abovementioned /app
          directory to /docservlet, and lo and behold, now docservlet gets mentioned
          in the servlet.log file.

          Context log path="" :tomcat.errorPage: init
          Context log path="" :default: init
          Context log path="" :jsp: init
          Context log path="/admin" :tomcat.errorPage: init
          Context log path="/admin" :default: init
          Context log path="/admin" :jsp: init
          Context log path="/test" :tomcat.errorPage: init
          Context log path="/test" :default: init
          Context log path="/test" :jsp: init
          Context log path="/docservlet" :tomcat.errorPage: init
          Context log path="/docservlet" :default: init
          Context log path="/docservlet" :jsp: init
          Context log path="/docservlet" :docservlet: init
          Context log path="/examples" :tomcat.errorPage: init
          Context log path="/examples" :default: init
          Context log path="/examples" :jsp: init
          Context log path="/app" :tomcat.errorPage: init
          Context log path="/app" :default: init
          Context log path="/app" :jsp: init
          Context log path="/app" :docservlet: init
          Context log path="" :invoker: init

          But still, tomcat.log says
          Context log: path="" Class Not Found in init
          java.lang.ClassNotFoundException: docservlet
                  at java.lang.Throwable.fillInStackTrace(Throwable.java:native)
                  at java.lang.Throwable.<init>(Throwable.java:38)
                  at java.lang.Exception.<init>(Exception.java:24)
                  at java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:23)
                  at org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:450)
                  at org.apache.tomcat.loader.AdaptiveServletLoader.loadClass(AdaptiveServletLoader.java:141)
                  at org.apache.tomcat.core.ServletWrapper.initServlet(ServletWrapper.java:294)
                  at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:445)
                  at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)
                  at org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                  at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
                  at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
                  at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
                  at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
                  at java.lang.Thread.run(Thread.java:325)
          (END)

          And the client reports the same IO error as before.

          Still at loss,
          Konrad

           
          • Steve Jones

            Steve Jones - 2000-12-13

            Konrad,

            Sorry I didn't get back to you sooner, but I was out for a bit. The directory structure for the app directory should be something like this:

            app
              |- WEB-INF
                    |- classes
                    |- lib
                         |- cb.jar
                         |- ds.jar
                         |- mysql.jar
                         |- xp.jar
                    |- web.xml

            That's all there is. Tomcat recognizes new directories under webapps and adds anything new automatically (I made the directory name "app"; it could be called anything you like). Then you should see the init line like you did here:

            Context log path="/app" :docservlet: init

            but hopefully it actually starts the servlet! Not sure what else I can add. Anyone else have any ideas?

            Steve

             
            • Konrad Neuwirth

              Konrad Neuwirth - 2000-12-16

              Hi Steve,

                thanks for getting back to me.  Alas, I was not able to make out
              the structure that you're trying to describe to me, because to me, it looks as if everything was just directly in the apps directory; I don't believe this to be true.  I'll try to outline my current structure with another way of indenting, maybe this helps.

              app
              app/WEB-INF/
              app/WEB-INF/web.xml
              app/WEB-INF/classes/
              app/WEB-INF/lib/cb.jar
              app/WEB-INF/lib/ds.jar
              app/WEB-INF/lib/mysql.jar
              app/WEB-INF/lib/xp.jar

                and that's the structure that came right out of the distribution tar files as I pulled them off sourceforge.

                As I'm not alone with the problem anymore, maybe things do
              warrant a closer inspection :-)  Maybe if you just installed onto
              a new box, the same problems would appear.

              Onward,
              Konrad

              Thanks for the help, it's appreciated.

               
              • Steve Jones

                Steve Jones - 2000-12-18

                Konrad,

                Sorry, didn't realize my message would get reformatted. Your directory structure looks ok. Just out of curiosity, is the database running ok? You can try it out using the username and password in the web.xml file. First, make sure the mysql server is running (there could be several mysql processes), then from the mysql directory you can type:

                bin/mysql -u dsuser -p

                and enter the password when prompted. Also, web.xml should point to a log file that the servlet uses to document connection pool information. Maybe that could provide some clue.

                Steve

                 
                • Steve Maher

                  Steve Maher - 2004-10-14

                  files missing from doc server for Solaris distro? I have no app dir or tomcat. is there a new tarball I can download ?

                   
          • Arlene Havlark

            Arlene Havlark - 2000-12-15

            I'm having the same problem.  Has anybody solved this one yet?

            Arlene

             
    • Dan Marner

      Dan Marner - 2000-12-28

      Let me chime in that I am having this problem as well. This is a Mandrake 6.1 system, using the latest JDK 1.3.0 from Blackdown. I have confirmed that mysql is working; there are four tables in the docserv database of which only "doctypes" has any data in it.

      One complicating factor is that I already had mysql installed on my system; but I believe I have successfully isolated that installation from the one that shipped with the doc server, and it is running on a different port.

      Anyone solved this yet?

       
      • Steve Jones

        Steve Jones - 2001-01-02

        I finally had a chance to take everything from our website and install it on a clean Linux system at home. I think I've found the problem most people are having. The Tomcat Document server seems to install as described, however the 4.0 client needs a configuration change. Under the client installation directory, there is a file named "server.cvw" which describes the MOO server and Doc Server connnections. Modify the cvw.docserver.url line to look like this:

        cvw.docserver.url=/app/docservlet

        Since the servlet under Tomcat was stored under the app directory, that's how we have to address it. Hope this helps everyone out.

        Steve

         
        • Dan Marner

          Dan Marner - 2001-01-02

          That fixed it. Thanks for the responsiveness! This might merit mention on a more visible page, or even a minor release of the client.

           
    • Dariush Azimi

      Dariush Azimi - 2001-02-19

      Hi Steve,

      With respect to the doc server problem, after checking the log file, I noticed that I'm getting the error that can not connect to db.

      [root@Redman /tmp]# more tomcat-dbconnection.log
      Starting DbConnectionBroker Version 1.0.7:
      dbDriver = org.gjt.mm.mysql.Driver
      dbServer = jdbc:mysql://localhost:3306/docserv
      dbLogin = dsuser
      log file = /tmp/tomcat-dbconnection.log
      minconnections = 5
      maxconnections = 30
      Total refresh interval = 0.01 days
      -----------------------------------------
      --->Attempt (1 of 20) failed to create new connections set at startup:
          java.sql.SQLException: Invalid authorization specification: Access denied fo
      r user: 'dsuser@Redman' (Using password: YES)
          Will try again in 15 seconds...

      Any idea?

      Thanks steve.

       
      • Steve Jones

        Steve Jones - 2001-02-19

        Hmm,

        All that I can think of is:

        1) Is the database running ok? You should see some processes running if you do a "ps auxww | grep mysql".

        2) Did you change the web.xml file, or the password for the database? The servlet requires a login to connect to the database, which by default is "dsuser", with password "dsuser2". These are the values that should be in web.xml when you downloaded the distribution. To make sure this login still works, you can move to the mysql directory and do the following command:

        bin/mysql -u dsuser -p
        Enter password: dsuser2

        If ok, you should have the mysql prompt. If the password has been changed to the db, then the web.xml will need to be changed accordingly.

        Steve

         
    • glen geraves

      glen geraves - 2005-06-27

      I've tried every trick in the book. I've created a user called cvw, used root, change cvw access to localhost, but I keep getting this message:

      --->Attempt (19 of 20) failed to create new connections set at startup:
          java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?
          Will try again in 15 seconds...

      All attempts at connecting to Database exhausted

      the above was trying to connect with root.
      The system is a dual PII running suse 9.3. DbConnectionBroker Version 1.0.7
      FATAL:java.net.BindException: Address already in use
      java.net.BindException: Address already in use
              at java.net.PlainSocketImpl.socketBind(Native Method)
              at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:331)
              at java.net.ServerSocket.bind(ServerSocket.java:318)
              at java.net.ServerSocket.<init>(ServerSocket.java:185)
              at java.net.ServerSocket.<init>(ServerSocket.java:141)
              at org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:97)
              at org.apache.tomcat.service.SimpleTcpEndpoint.startEndpoint(SimpleTcpEndpoint.java:186)
              at org.apache.tomcat.service.SimpleTcpConnector.start(SimpleTcpConnector.java:142)
              at org.apache.tomcat.core.ContextManager.start(ContextManager.java:253)
              at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:157)
              at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)

       
    • glen geraves

      glen geraves - 2005-06-28

      problem solved after doing some long googling. login to mysql as root from a terminal screen issue the command
      set password username@servername=old_password('password')
      Note single quotes required. MySql uses a new password method.

       
    • ramya

      ramya - 2006-02-06

      i have got problems with the document server ...
      i have installed it in redhat linux 9.0 ..
      when i start the server using the command
      /etc/init.d/cvwds start

      .. i get the following error message..

      Starting CVW document server database
      Starting mysqld daemon with databases from /var/lib/mysql
      /opt/CVWdocserver/mysql/bin/safe_mysqld: line 194: 18312 Segmentation fault
      ( trap "" 1; exec $NOHUP_NICENESS $ledir/mysqld $defaults --basedir=$MY_BASEDIR
      _VERSION --datadir=$DATADIR --user=$user --pid-file=$pid_file --skip-locking >>$
      err_log 2>&1 )
      060206 11:11:46  mysqld ended\n

      Just help me out to resolve it...
      thank you

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks