AW: [opencms-dev] Hang Opencms

Tanja Baravaya tanjabaravaya at gmx.de
Mon Aug 23 08:18:02 CEST 2004


Hello,

here is my code:
May be can you find my mistakes...

here is code in my  .jsp:(When the documents are  for the inputted keywords
in the DB been, then I become this dicumnets with links for update and
delete... )

                    ......
                   <tr>
                   <td colspan="3" class="textNormal">

<% 
   
   String keywords =cms.getRequest().getParameter("keywords");
               
      if (keywords == null){
      } 
      else {
       Vector document = doc.getDocument(keywords); 
       doc.setKeywords(keywords);
       

       int doc_size = document.size();
       int s=0;
       out.println ("Anzahl gefundener Dokumente: "+ doc_size/2);
              %>
             <br>
       <%

       while(s<doc_size)
       {
     %>
             <br>
           <table cellspacing="0" cellpadding="0" border="0">
           <tr><td width="250px">

    <%      int doc_id = Integer.parseInt(document.get(s).toString());
      String download = prop.getPath()+doc.getPath(doc_id)+
doc.getDocuname(doc_id);
     
     out.println ("<img src=\""+ cms.link (docum)+"\">"+" "+"<a class
=\"linkSmall\"  href=" +download+ " target=\"_blank\">"+
document.get(s+1)+"</a>");
      %> </td>
        


  <!-- Aktualisieren & Löschen -->

        
        <td width=15px> </td>

        <td><A  class ="linkSmall"
HREF="docu_navigation.jsp?keywords=<%=keywords%>"
               
onClick="window.open('/opencms/opencms/de.daimlerchrysler.vbz/Update/update.html','aktualisieren',config='height=500,width=500')">
                Aktualisieren</A></td> 

        <td width=15px> </td>

        <td><A  class ="linkSmall" HREF="docu_navigation.jsp"
               
onClick="window.open('/opencms/opencms/de.daimlerchrysler.vbz/Delete/delete.jsp?id=<%=doc_id%>','löschen',config='height=200,width=300')">
                Löschen</A></td>



</tr></table>

 <%

    s= s+2;
    
            } 
      }   
    %>

                   </td>
                   </tr>
 


In this file I have created the objects from java-classes, and then  by
java-code I use the different metods for delete for example:
.....
 public void delete(int doc_id) throws CmsException {
       this.doc_id = doc_id;
	   delete_dm_categories_refs(doc_id);
	   String filepfad =
"C:/catalina/webapps/ROOT"+getPath(doc_id)+getDocuname(doc_id); 
        File file = new File(filepfad);
        file.delete();
        try {
           con = DriverManager.getConnection(c_pool);
            // delete data from database
            statement = con.prepareStatement(C_DELETE_DOCUMENT);
            statement.setInt(1, doc_id);
             statement.execute();
        }catch(Exception e) {
            throw new CmsException("[" + this.getClass().getName() + "] " +
e.getMessage(), CmsException.C_SQL_ERROR, e);
        }finally{
            try{
                statement.close();
            }catch(Exception e){
                // ignore the exception
            }
           
        }
    
    }

.....

so , I think, my opencms hangs by running delete-function. 

May be, I am mistaken?!

Thank you!
Tanja
> 
> Tanja:
> 
> So is it your code that's hanging?
> does opencms by itself run clean?
> 
> You may want to post the code here if you expect anyone on this list to be
> able to help you.
> 
> best
> Ari
> 
> 
> ----- Original Message -----
> From: "Tanja Baravaya" <tanjabaravaya at gmx.de>
> Date: Fri, 20 Aug 2004 09:05:34 +0200 (MEST)
> To: The OpenCms mailing list <opencms-dev at opencms.org>
> Subject: Re: AW: [opencms-dev] Hang Opencms
> 
> > I am developing with my colege,and I am making connection from the my
> > machine, where opencms is running on, my colege from the other.
> > 
> > OS is Windows Nt, and I have had mistake , I use IE 6.0
> > I don't become the messages from server and  in the logsfiles, at the
> > server's msdos-window.
> > 
> > This problem with hanging, I have became , when I wrote delete -function
> for
> > mydatabase...
> > 
> > It so my site  should be use for documentmanagement, for this purpose I
> have
> >  defined the new database in MySQl(documanagement), where I store names,
> > titles, pathes and etc, normal action... My files will be stored at the
> > server... For Upload I use the separate servlet from the user interface,
> > that with opencms I had wrote... It was without problem, All is running
> > clean!
> > 
> > But now I have wrote for this documents the function delete. it is so
> the
> > user selects with "javascript" the files, that will be deleted...
> > 
> > na ja, then I make in my Java code File file = new File(mypath);
> >                                    file.delete();
> > 
> > Once in while this program runs  clean, once in while  it hangs, but at
> > client 's sites... Because the other's webaplication at server are
> > running...?!
> > 
> > Thank you!
> > 
> > > Tanja:
> > > 
> > > Are you making the connection from the same machine as the opencms is
> > > running on?
> > > What OS is the opencms on?
> > > What is in the logs? 
> > > Can you tell what the process is doing?
> > > 
> > > Ari
> > > 
> > > ----- Original Message -----
> > > From: "Tanja Baravaya" <tanjabaravaya at gmx.de>
> > > Date: Thu, 19 Aug 2004 14:19:26 +0200 (MEST)
> > > To: The OpenCms mailing list <opencms-dev at opencms.org>
> > > Subject: Re: AW: [opencms-dev] Hang Opencms
> > > 
> > > > Hi Steffen,
> > > > 
> > > > I am working with OpenCMS 5.0, Tomcat 4.1.30, MySQL 4.0, IE 5.0
> > > > 
> > > > It  is so, how you wrote: the request is started but never comes
> back?
> > > > But it is firstly at my pages, then in my workplace.
> > > > I must restart Tomcat, then I can do something a few minutes , then
> > > again,
> > > > and so since 2 days...
> > > > 
> > > > I don't understand that, because I am developing with opencms for 4
> > > monthes
> > > > and so for the first time...
> > > > 
> > > > Thank you!
> > > > Tanja
> > > > 
> > > > > Hi,
> > > > > 
> > > > > could you please provide more information? OpenCMs-Version,
> > > App-Server,
> > > > > Database, Browser?
> > > > > What does "hang" mean? You click on a button/file/menue item, the
> > > request
> > > > > is started but never comes back?
> > > > > 
> > > > > I had a similar problem: the cause in my case was that the
> database
> > > didn't
> > > > > have enough space left to store the new data ... but there might
> be
> > > other
> > > > > reasons.
> > > > > JavaScript should not be a problem, because openCMS uses
> JavaScript a
> > > lot
> > > > > for it's interface.
> > > > > 
> > > > > A look into the log-File might reveal the cause too.
> > > > > 
> > > > > Cheers,
> > > > > Stefan
> > > > > 
> > > > > 
> > > > > 
> > > > > > -----Ursprüngliche Nachricht-----
> > > > > > Von: Tanja Baravaya [mailto:tanjabaravaya at gmx.de]
> > > > > > Gesendet: Donnerstag, 19. August 2004 07:48
> > > > > > An: opencms-dev at opencms.org
> > > > > > Betreff: [opencms-dev] Hang Opencms
> > > > > > 
> > > > > > 
> > > > > > Hello ,
> > > > > > 
> > > > > > I have a problem. The last time my openCMS workplace hangs 
> > > > > > every time, why I
> > > > > > don't know?! I use Javascript at my pages, may be opencms is 
> > > > > > not compatibel 
> > > > > > with javascript?
> > > > > > 
> > > > > > Thank you 
> > > > > > Tanja
> > > > > > 
> > > > > > -- 
> > > > > > NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler!
> > > > > > GMX DSL = supergünstig & kabellos http://www.gmx.net/de/go/dsl
> > > > > > 
> > > > > > 
> > > > > 
> > > > > 
> > > > > _______________________________________________
> > > > > This mail is send to you from the opencms-dev mailing list
> > > > > To change your list options, or to unsubscribe from the list,
> please
> > > visit
> > > > > http://mail.opencms.org/mailman/listinfo/opencms-dev
> > > > > 
> > > > 
> > > > -- 
> > > > NEU: Bis zu 10 GB Speicher für e-mails & Dateien!
> > > > 1 GB bereits bei GMX FreeMail http://www.gmx.net/de/go/mail
> > > > 
> > > > 
> > > > 
> > > > _______________________________________________
> > > > This mail is send to you from the opencms-dev mailing list
> > > > To change your list options, or to unsubscribe from the list, please
> > > visit
> > > > http://mail.opencms.org/mailman/listinfo/opencms-dev
> > > > 
> > > 
> > > -- 
> > > _______________________________________________
> > > Find what you are looking for with the Lycos Yellow Pages
> > >
> >
>
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > This mail is send to you from the opencms-dev mailing list
> > > To change your list options, or to unsubscribe from the list, please
> visit
> > > http://mail.opencms.org/mailman/listinfo/opencms-dev
> > > 
> > 
> > -- 
> > NEU: Bis zu 10 GB Speicher für e-mails & Dateien!
> > 1 GB bereits bei GMX FreeMail http://www.gmx.net/de/go/mail
> > 
> > 
> > 
> > _______________________________________________
> > This mail is send to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the list, please
> visit
> > http://mail.opencms.org/mailman/listinfo/opencms-dev
> 
> -- 
> _______________________________________________
> Find what you are looking for with the Lycos Yellow Pages
>
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10
> 
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
> 

-- 
NEU: Bis zu 10 GB Speicher für e-mails & Dateien!
1 GB bereits bei GMX FreeMail http://www.gmx.net/de/go/mail




More information about the opencms-dev mailing list