Problem in concurrent access of a single method

Hi,
I have one servlet named "Controllerservlet.java" and a jsp page "Inward jsp".
Now from this jsp user enters data which are being passed to controller servlet 's "insertData" method which is a synchronized method then it stores the query result in a variable "query_result" whatever it is ( if it throws exception "duplicate value insertion.... this will be assigned to query_result).
now when only one user is using then it is working fine.But when two user tried to enter the same data simultaneously then in one sceen it showed error message "Can't insert Duplicate value " and in others's it didn't show anything but inserted data.
I know that when i think data is being entered simultaneously then it is actually not simultaneously for computer.but according to me it shud have shown in one screen "successfully entered" and in other error message "Duplicate value....".
this is my servlets code
private synchronized void insertData(HttpServletRequest req, HttpServletResponse res)
             String date = req.getParameter("date");
             String department[] = req.getParameterValues("Department");
             String main_Building[] = req.getParameterValues("Main_Building");
             String Other = req.getParameter("Other");
             String Roll_No = req.getParameter("Roll_No");
             String Receiver = req.getParameter("Receiver");
             String subject = req.getParameter("subject");
              String buttontype = req.getParameter("buttontype");
             String entrytype = req.getParameter("type");
             String query="";
             String query_result="";
             String source="";
             String Department="",Main_Building="";
             if(department!=null && !department[0].equals("Select"))Department=department[0];
             if(department!=null)
            for (int i=1;i<department.length;i++)
                    Department+=","+department;
if(!Department.equals("")) source= Department;
if(main_Building!=null && !main_Building[0].equals("Select"))
Main_Building=main_Building[0];
if(main_Building!=null)
for (int i=1;i<main_Building.length;i++)
Main_Building+=","+main_Building[i];
if(!Main_Building.equals(""))
if(source.length()!=0)
source+="/"+Main_Building;
else source = Main_Building;
if(Other!=null&&Other.length()!=0)
if(source.length()!=0)
source+="/"+Other;
else source = Other;
Date now = new Date();
SimpleDateFormat formatter = new SimpleDateFormat(" hh:mm:ss a zzz");
String user = (String)session.getAttribute("user");
int srno=1;
try {
conn.setAutoCommit(false);
ResultSet rs = stmt.executeQuery("select max(srno) from incommingletters where deleted = 'F'");
if (rs.next())srno=rs.getInt(1);
srno++;
query= "insert into incommingletters values ("+srno+",'"+date+"','"+source+"','"+Roll_No+"','"+Receiver+"','"+subject+"','"+entrytype+"','F')";
stmt.executeUpdate(query);
query="insert into traceuser values ('"+user+"','Insertion','"+now+"','"+formatter.format(now)+"',"+srno+")";
stmt.executeUpdate(query);
conn.commit();
query_result="Entry No. "+srno+" Successfully Saved";
catch (SQLException e)
query_result= e.toString();
try
conn.rollback();
catch (SQLException e1)
out.println(e.toString());
out.println(e.toString());
     session.setAttribute("query_result",query_result);
     //gotojspPage("/resources/Inward.jsp", req, res);
          try
               res.sendRedirect(res.encodeRedirectURL("../resources/Inward.jsp"));
          catch (Exception e)
               out.println(e.toString());
manish

hi declangallagher,
now i am doing the connection in bean it looks like this
servlet code :
public class ControllerServlet extends HttpServlet
    PrintWriter out;
    HttpSession session;
    String  name=null;
    String buttontype=null;
    ManipulationOfData md= new ManipulationOfData();
     * Method which intialises the servlet
     * @throws ServletException
    public void init() throws ServletException
         * Method in servlet
         * @param req HttpServletRequest req
         * @param res HttpServletResponse res
         * @throws java.io.IOException
         * @throws ServletException
        public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException
            doGet(req, res);
     * Method used in servlet
     * @param req HttpServletRequest req
     * @param res HttpServletResponse res
     * @throws IOException
     * @throws ServletException
    public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException
        res.setContentType("text/html");
        out = res.getWriter();
        session = req.getSession(true);
        initialization();
     try
              trafficController(req, res);
        catch (Exception e)
            out.println(e.toString() + " In traffic controller");
         * Method that controls the traffic in Controllerservlet
         * @param req HttpServletRquest req
         * @param res HttpServletResponse res
         * @throws Exception
        private void trafficController(HttpServletRequest req, HttpServletResponse res) throws Exception
         String submit=null;
        submit= req.getParameter("submit");
        if (submit != null)
            submit = submit.trim();
        if (submit!=null)
                if (submit.equalsIgnoreCase("submit"))
                         buttontype =  req.getParameter("buttontype");
                           if(buttontype!=null)session.setAttribute("buttontype",buttontype);
                           insertData(req,res);
               else if (submit.equalsIgnoreCase("Sign in"))
                     removeValiditySession();
                       checkUser(req,res);
               else if (submit.equalsIgnoreCase("inward"))
                      removeInwardSession();
                   res.sendRedirect(res.encodeRedirectURL("../resources/Inward.jsp"));
                    //gotojspPage("/resources/Inward.jsp", req, res);
               else if (submit.equalsIgnoreCase("edit"))
                    removeOkSession();
                   session.setAttribute("updation","edit");
                   res.sendRedirect(res.encodeRedirectURL("../resources/serialno.jsp"));
               else if (submit.equalsIgnoreCase("remove"))
                    removeOkSession();
                   session.setAttribute("updation","delete");
                   res.sendRedirect(res.encodeRedirectURL("../resources/serialno.jsp"));
                else if (submit.equalsIgnoreCase("Ok"))
                    editDelete(req,res);
                else if (submit.equalsIgnoreCase("view"))
                       removeShowSession();
                    res.sendRedirect(res.encodeRedirectURL("../resources/viewresult.jsp"));
                         //gotojspPage("/resources/viewresult.jsp", req, res);
                else if (submit.equalsIgnoreCase("Update"))
                    updateRecord(req,res);
                else if (submit.equalsIgnoreCase("Delete"))
                    //out.println("manish");
                      deleteRecord(req,res);
                        //gotojspPage("/resources/delete.jsp", req, res);
                else if (submit.equalsIgnoreCase("Show Data"))
                    removeShowSession();
                       showData(req,res);
                else if (submit.equalsIgnoreCase("signout"))
                    SignOut();
                  res.sendRedirect(res.encodeRedirectURL("../resources/signout.jsp"));
                else if (submit.equalsIgnoreCase("home"))
                    res.sendRedirect(res.encodeRedirectURL("../resources/authentication.jsp"));
                else if (submit.equalsIgnoreCase("back"))
                    removeShowSession();
                    res.sendRedirect(res.encodeRedirectURL("../resources/viewresult.jsp"));
                else if (submit.equalsIgnoreCase("deleteback"))
                    removeInwardSession();
                    res.sendRedirect(res.encodeRedirectURL("../resources/Inward.jsp"));
                  else
                       out.println("No Target");
    private void checkUser(HttpServletRequest req, HttpServletResponse res)
        try
            Authentication auth = new Authentication();
            String user = req.getParameter("userid");
            user = user.trim();
            String password = req.getParameter("password");
            password = password.trim();
            session.setAttribute("password", password);
            String validity = auth.isValid(user, password);
            session.setAttribute("validity", validity);
            session.setAttribute("user",user);
            if(validity.equals("true"))
                  removeInwardSession();
                res.sendRedirect(res.encodeRedirectURL("../resources/Inward.jsp"));
               //gotojspPage("/resources/Inward.jsp", req, res);
            else
                removeInwardSession();
                res.sendRedirect(res.encodeRedirectURL("../resources/authentication.jsp"));
        catch (Exception ex)
            out.println(ex.toString());
        private   void insertData(HttpServletRequest req, HttpServletResponse res)
             String date = req.getParameter("date");
             String department[] = req.getParameterValues("Department");
             String main_Building[] = req.getParameterValues("Main_Building");
             String Other = req.getParameter("Other");
             String Roll_No = req.getParameter("Roll_No");
             String Receiver = req.getParameter("Receiver");
             String subject = req.getParameter("subject");
              String buttontype = req.getParameter("buttontype");
             String entrytype = req.getParameter("type");
             String query="";
             String query_result="";
             String source="";
             String Department="",Main_Building="";
             if(department!=null && !department[0].equals("Select"))Department=department[0];
             if(department!=null)
            for (int i=1;i<department.length;i++)
                    Department+=","+department;
if(!Department.equals("")) source= Department;
if(main_Building!=null && !main_Building[0].equals("Select"))
Main_Building=main_Building[0];
if(main_Building!=null)
for (int i=1;i<main_Building.length;i++)
Main_Building+=","+main_Building[i];
if(!Main_Building.equals(""))
if(source.length()!=0)
source+="/"+Main_Building;
else source = Main_Building;
if(Other!=null&&Other.length()!=0)
if(source.length()!=0)
source+="/"+Other;
else source = Other;
String user = (String)session.getAttribute("user");
query_result=md.InsertData(date,source,Roll_No,Receiver,subject,entrytype,user);
     session.setAttribute("query_result",query_result);
     //gotojspPage("/resources/Inward.jsp", req, res);
          try
               res.sendRedirect(res.encodeRedirectURL("../resources/Inward.jsp"));
          catch (Exception e)
               out.println(e.toString());
private void showData(HttpServletRequest req, HttpServletResponse res)
String exactdate = req.getParameter("date");
String srnostr = req.getParameter("srno");
String fromdate = req.getParameter("from");
String todate = req.getParameter("to");
String Roll_No = req.getParameter("Roll_No");
String Receiver = req.getParameter("Receiver");
String subject = req.getParameter("subject");
String Department = req.getParameter("Department");
String Main_Building = req.getParameter("Main_Building");
String Other = req.getParameter("Other");
String entrytype = req.getParameter("type");
String condition="";
String buttontxt ="",source="";
String date;
// out.println(fromdate);out.println(todate);
subject = subject.trim();
if(!Department.equalsIgnoreCase("Select")) source= Department;
if(!Main_Building.equalsIgnoreCase("Select"))
if(source.length()!=0)
source+="/"+Main_Building;
else source = Main_Building;
if(Other!=null&&Other.length()!=0)
if(source.length()!=0)
source+="/"+Other;
else source = Other;
if (exactdate!=null && exactdate.length()!=0) condition = " date = '"+exactdate+"'";
else if(fromdate!=null &&todate!=null &&fromdate.length()!=0 && todate.length()!=0)
condition = " date between '"+ fromdate+"' and '"+ todate+"'";
if(source!=null&&source.length()!=0)
if(!condition.equals(""))
condition+=" AND source like '%"+source+"%'";
else
condition+=" source like '%"+source+"%'";
if(Roll_No!=null&&Roll_No.length()!=0)
if(!condition.equals(""))
condition+=" AND rollno like '%"+Roll_No+"%'";
else
condition+=" rollno like '%"+Roll_No+"%'";
if(Receiver!=null&&!Receiver.equalsIgnoreCase("Select"))
if(!condition.equals(""))
condition+=" AND reciever like '%"+Receiver+"%'";
else
condition+=" reciever like '%"+Receiver+"%'";
if(subject!=null&&subject.length()!=0)
if(!condition.equals(""))
condition+=" AND subject like '%"+subject+"%'";
else
condition+=" subject like '%"+subject+"%'";
if(entrytype!=null&&entrytype.length()!=0)
if(!condition.equals(""))
condition+=" AND type = '"+entrytype+"'";
else
condition+=" type = '"+entrytype+"'";
if(srnostr!=null&&srnostr.length()!=0)
int srno = Integer.parseInt(srnostr);
if(!condition.equals(""))
condition+=" AND srno = "+srno;
else
condition+=" srno = "+srno;
buttontxt = req.getParameter("buttontxt");
Vector show_data_vec = md.showData(condition);
String queryexception= show_data_vec.elementAt(0).toString();
Vector cols_name_vec = (Vector)show_data_vec.elementAt(1);
Vector resultset_ob_vec = (Vector)show_data_vec.elementAt(2);
if(queryexception.equals("Successful"))
try {
res.sendRedirect(res.encodeRedirectURL("../resources/result.jsp"));
catch (IOException e)
out.println(e.toString());
else
try
res.sendRedirect(res.encodeRedirectURL("../resources/viewresult.jsp"));
          catch (Exception e)
               out.println(e.toString());
session.setAttribute("queryexception",queryexception);
session.setAttribute("buttontxt",buttontxt);
session.setAttribute("resultset_ob_vec",resultset_ob_vec);
session.setAttribute("cols_name_vec",cols_name_vec);
private void updateRecord(HttpServletRequest req, HttpServletResponse res)
String date = req.getParameter("date");
String department[] = req.getParameterValues("Department");
String main_Building[] = req.getParameterValues("Main_Building");
String Other = req.getParameter("Other");
String Roll_No = req.getParameter("Roll_No");
String Receiver = req.getParameter("Receiver");
String subject = req.getParameter("subject");
     String buttonedit = req.getParameter("buttonedit");
String entrytype = req.getParameter("type");
String query="";
String source="";
String serialnostr=(String)session.getAttribute("serialno");
int serialno=Integer.parseInt(serialnostr);
String Department="",Main_Building="";
if(department!=null && !department[0].equals("Select"))Department=department[0];
if(department!=null)
for (int i=1;i<department.length;i++)
Department+=","+department[i];
if(!Department.equals("")) source= Department;
if(main_Building!=null && !main_Building[0].equals("Select"))
Main_Building=main_Building[0];
if(main_Building!=null)
for (int i=1;i<main_Building.length;i++)
Main_Building+=","+main_Building[i];
if(!Main_Building.equals(""))
if(source.length()!=0)
source+="/"+Main_Building;
else source = Main_Building;
if(Other!=null&&Other.length()!=0)
if(source.length()!=0)
source+="/"+Other;
else source = Other;
String user = (String)session.getAttribute("user");
String editqrexception=null;
ResultsetData rsdata = new ResultsetData();
editqrexception=md.UpdateData(rsdata,date,source,Roll_No,Receiver,subject,serialno,entrytype,user);
session.setAttribute("rsdata",rsdata);
session.setAttribute("buttonedit",buttonedit);
session.setAttribute("editqrexception",editqrexception);
try
res.sendRedirect(res.encodeRedirectURL("../resources/edit.jsp"));
catch (Exception e)
out.println(e.toString());
private void deleteRecord(HttpServletRequest req, HttpServletResponse res)
          String serialnostr = (String) session.getAttribute("serialno");
int serialno = Integer.parseInt(serialnostr);
          out.println(serialno);
          String deleteqrexception=null,buttondelete=null;
ResultsetData rsdata = new ResultsetData();
String user = (String)session.getAttribute("user");
deleteqrexception=md.DeleteData(rsdata,serialno,user);
          if(!deleteqrexception.equals("Successful"))
session.setAttribute("rsdata",rsdata);
session.setAttribute("buttondelete",buttondelete);
session.setAttribute("deleteqrexception",deleteqrexception);
try
res.sendRedirect("../resources/delete.jsp");
catch (Exception e)
out.println(e.toString());
else
try
res.sendRedirect(res.encodeRedirectURL("../resources/deletemessage.html"));
catch (Exception e)
out.println(e.toString());
private void editDelete(HttpServletRequest req, HttpServletResponse res)
String buttonok=null;
String updation=(String)session.getAttribute("updation");
String serialnostr = req.getParameter("serialno");
buttonok = req.getParameter("buttonok");
session.setAttribute("buttonok",buttonok);
int rowcount = 0;
ResultsetData rsdata = new ResultsetData();
String query_result =null;
int serialno = Integer.parseInt(serialnostr);
query_result = md.editDelete(serialno,rsdata);
session.setAttribute("serialno",serialnostr);
session.setAttribute("rsdata",rsdata);
if(query_result.equals("Successful"))
if (updation!=null)
if(updation.equals("edit"))
try
removeEditSession();
res.sendRedirect(res.encodeRedirectURL("../resources/edit.jsp"));
catch (IOException e)
out.println(e.toString());
else if (updation.equals("delete"))
try {
removeDeleteSession();
res.sendRedirect(res.encodeRedirectURL("../resources/delete.jsp"));
catch (IOException e)
out.println(e.toString());
else
try
res.sendRedirect(res.encodeRedirectURL("../resources/serialno.jsp"));
          catch (Exception e)
               out.println(e.toString());
private void initialization()
Vector initial_vec = new Vector();
Vector departments_vec = new Vector();
Vector mainbuild_vec = new Vector();
Vector receiver_vec = new Vector();
initial_vec = md.Initialization();
departments_vec = (Vector)initial_vec.elementAt(0);
mainbuild_vec = (Vector)initial_vec.elementAt(1);
receiver_vec = (Vector)initial_vec.elementAt(2);
session.setAttribute("departments_vec",departments_vec);
session.setAttribute("mainbuild_vec",mainbuild_vec);
session.setAttribute("receiver_vec",receiver_vec);
private void removeInwardSession()
          String serialno ="";
          String buttontype = (String)session.getAttribute("buttontype");
serialno = (String) session.getAttribute("serialno");
          if(serialno!=null)
                    serialno=null;
                    session.setAttribute("serialno",serialno);
          if(buttontype!=null)
                    buttontype=null;
                    session.setAttribute("buttontype",buttontype);
private void removeShowSession()
          String buttontxt ="";String queryexception ="";
          buttontxt = (String) session.getAttribute("buttontxt");
          if(buttontxt!=null)
                    buttontxt=null;
                    session.setAttribute("buttontxt",buttontxt);
queryexception = (String) session.getAttribute("buttontxt");
          if(queryexception!=null)
                    queryexception=null;
                    session.setAttribute("queryexception",queryexception);
private void removeEditSession()
          String buttonedit ="";
          buttonedit = (String) session.getAttribute("buttonedit");
          if(buttonedit!=null)
                    buttonedit=null;
                    session.setAttribute("buttonedit",buttonedit);
private void removeDeleteSession()
          String buttondelete ="";
          buttondelete = (String) session.getAttribute("buttondelete");
          if(buttondelete!=null)
                    buttondelete=null;
                    session.setAttribute("buttondelete",buttondelete);
private void removeOkSession()
          String buttonok ="";
          buttonok = (String) session.getAttribute("buttonok");
          if(buttonok!=null)
                    buttonok=null;
                    session.setAttribute("buttonok",buttonok);
private void removeValiditySession()
          String validity ="";
          validity = (String) session.getAttribute("validity");
          if(validity!=null)
                    validity=null;
                    session.setAttribute("validity",validity);
private void SignOut()
removeValiditySession();
public void destroy()
try
ConnectionPool.freeCon(conn);
removeValiditySession();
catch (Exception exp)
out.println(exp.toString());
i know its very lengthy so concentrate on insertData method and doget only
and here is the bean
public class ManipulationOfData
        String url="jdbc:postgresql://10.99.13.203/dispatch";
        String driver="org.postgresql.Driver";
        String username="manish";
        String password="manish";
        Connection conn=null;
        Statement stmt =null;
       String valid="false";
    public void getConnection()
      try
           Class.forName(driver);
           conn = DriverManager.getConnection(url,username,password);
           stmt= conn.createStatement();
        catch(Exception e)
            valid=e.toString();
    public void closeConnection()
      try
           stmt.close();
           conn.close();
        catch(Exception e)
            valid=e.toString();
    public synchronized String InsertData(String date,String source,String Roll_No,String Receiver,String subject,String entrytype,String user)
        getConnection();
        int srno=1;
        String query_result="";
        Date now = new Date();
        SimpleDateFormat formatter = new SimpleDateFormat(" hh:mm:ss a zzz");
            try {
                    conn.setAutoCommit(false);
                    ResultSet rs = stmt.executeQuery("select max(srno) from incommingletters where deleted = 'F'");
                    if (rs.next())srno=rs.getInt(1);
                    srno++;
                    String query= "insert into incommingletters values ("+srno+",'"+date+"','"+source+"','"+Roll_No+"','"+Receiver+"','"+subject+"','"+entrytype+"','F')";
                        stmt.executeUpdate(query);
                        query="insert into traceuser values ('"+user+"','Insertion','"+now+"','"+formatter.format(now)+"',"+srno+")";
                        stmt.executeUpdate(query);
                        conn.commit();
                     query_result="Entry No. "+srno+" Successfully Saved";
            catch (SQLException e)
                    query_result= e.toString();
                    try
                        conn.rollback();
                    catch (SQLException e1)
                        query_result=e.toString();
                  query_result=e.toString();
        closeConnection();
    return query_result;
    public synchronized String UpdateData(ResultsetData rsdata,String date,String source,String Roll_No,String Receiver,String subject,int serialno,String entrytype,String user)
        getConnection();
        String query_result="";
        Date now = new Date();
        SimpleDateFormat formatter = new SimpleDateFormat(" hh:mm:ss a zzz");
        try {
                conn.setAutoCommit(false);
                String query= "update incommingletters set date = '"+date+"',type = '"+entrytype+"',source = '"+source+"',rollno = '"+Roll_No+"',"+
                        "reciever = '"+Receiver+"',subject = '"+subject+"' where srno ="+serialno +" and deleted = 'F'";
                stmt.executeUpdate(query);
                query="insert into traceuser values ('"+user+"','Updation','"+now+"','"+formatter.format(now)+"',"+serialno+")";
                stmt.executeUpdate(query);
               conn.commit();
               ResultSet rs = stmt.executeQuery("select * from incommingletters where srno ="+serialno+
                       " and deleted = 'F'");
               rsdata =  putResClass(rs,rsdata);
                //conn.close();
                //ConnectionPool.freeCon(conn);
                query_result="Successfully Updated";
            catch (SQLException e)
                try
                    conn.rollback();
                    //conn.close();
                    //  ConnectionPool.freeCon(conn);
                } catch (SQLException e1) {
                    query_result=e.toString();
                query_result=e.toString();
        closeConnection();
     return query_result;
    public synchronized String DeleteData(ResultsetData rsdata,int serialno,String user)
        getConnection();
        Date now = new Date();
        SimpleDateFormat formatter = new SimpleDateFormat(" hh:mm:ss a zzz");
        String query_result="";
        try {
                conn.setAutoCommit(false);
                stmt.executeUpdate("update incommingletters set deleted ='T' where srno ="+serialno);
                String query="insert into traceuser values ('"+user+"','Deletion','"+now+"','"+formatter.format(now)+"',"+serialno+")";
                stmt.executeUpdate(query);
                conn.commit();
                query_result = "Successful";
        catch (SQLException e)
            query_result=e.toString();
            try {
                    conn.rollback();
                    ResultSet rs = stmt.executeQuery("select * from incommingletters where srno ="+serialno+" and deleted='F'");
                    rsdata =  putResClass(rs,rsdata);
                    // conn.close();
                    //ConnectionPool.freeCon(conn);
            catch (SQLException e1)
                    query_result=e1.toString();
         closeConnection();
       return query_result;
   public Vector showData(String condition)
       getConnection();
       String query="",query_result="";
       int rowcount=0;
       Vector show_data = new Vector();
       Vector cols_name_vec = new Vector();
       Vector resultset_ob_vec = new Vector();
       ResultSet rs=null;
       try {
                if(!condition.equals(""))
                query = "select COUNT(*) as rowcount from incommingletters where "+condition+" and deleted='F'";
                 else
                query = "select COUNT(*) as rowcount from incommingletters where deleted ='F' ";
                 rs = stmt.executeQuery(query);
                if(rs.next()) rowcount= rs.getInt("rowcount") ;
       catch (SQLException e)
                query_result=e.toString();
       if(rowcount!=0)
                 try
                     if(!condition.equals(""))
                      query = "select * from incommingletters where "+condition+" and deleted='F' order by srno";
                    else
                        query = "select * from incommingletters where deleted = 'F' order by srno";
                        rs = stmt.executeQuery(query);
                     query_result ="Successful";
                     ResultSetMetaData rsmd = rs.getMetaData();
                     int totcols=rsmd.getColumnCount();
                     String col;
                     for(int i=0;i<totcols;i++)
                         if(!rsmd.getColumnName(i+1).equals("type")&&!rsmd.getColumnName(i+1).equals("deleted"))
                         cols_name_vec.addElement(rsmd.getColumnName(i+1));
                        try {
                                while (rs.next())
                                          ResultsetData rsdata = new ResultsetData();
                                          rsdata = new ResultsetData();
                                          rsdata.setSrno(rs.getInt("srno"));
                                          rsdata.setDate(rs.getDate("date"));
                                          rsdata.setRollno(rs.getString("rollno"));
                                          rsdata.setSource(rs.getString("source"));
                                          rsdata.setReciever(rs.getString("reciever"));
                                          rsdata.setSubject(rs.getString("subject"));
                                          resultset_ob_vec.addElement(rsdata);
                        catch (SQLException e)
                     Results                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         

Similar Messages

  • Outlook Anywhere concurrent access to a single mailbox

    Hi , we have a customer that fo some particular reason have 17 device ( PC ) who need to have outlook configured on the same exchange account ( I know we tried to talk him out of it but to no avail ) , the problem we are facing is that only the first Computer
    can connect succesfully and then the remeaing device are unable to connect to Exchange ( disconnected from exchange ) . Basically is a first came first serve. I have already created a Throttling policy for these users and set RCAMaxConcurrent to Unlimited
    but even this did not solve my issue. I am sure I am hitting some limit imposed from the exchange server but have no clue which one
    Thanks

    Hi ,
    Thank you for your question.
    we could create a new throttling policy to apply this specific mailbox:
    New-ThrottlingPolicy –name <Name>
    Set-ThrottlingPolicy –identity <Name> –RCAMaxConcurrency <Value>
    Set-Mailbox –Identity “Username” –ThrottlingPolicy <Name>  
    Notice: The RcaMaxConcurrency parameter specifies how many concurrent connections an RPC Client Access user can have against a server running Exchange 2013 at one time. A connection is held from the moment a request is received until
    the connection is closed or the connection is otherwise disconnected (for example, if the user goes offline). If users attempt to make more concurrent requests than their policy allows, the new connection attempt fails. However, the existing connections remain
    valid. The RcaMaxConcurrency parameter has a valid range from 0 through 2147483647 inclusive. The default value is 20. To indicate that the number of concurrent connections should be unthrottled (no limit), this value should be set to $null.
    We could refer to the following link:
    https://technet.microsoft.com/en-us/library/dd298094(v=exchg.150).aspx
    If there are any questions regarding this issue, please be free to let me know. 
    Best Regard,
    Jim

  • Concurrent accessing of a static method

    Hi,
    We have an online application, which has some methods in the middle tier that have been declared as "static".
    Application is running fine with less number of users but when the load is increasing the application is crashing with a core dump.
    The application is running on Solaris.
    Can somebody give some inputs on what can be wrong in this scenario.
    Thanks in advance..
    Niranjan

    Application is running fine with less number of
    users but when the load is increasing the application
    is crashing with a core dump.
    The application is running on Solaris.Crashes with a core dump and no stack trace? Then your application does something very bad to the JVM, or the JVM is buggy. Maybe it's enougth to upgrade to the latest stable Java version.

  • Problem with concurrent access

    Hello,
    I'm not very comfortable with JMF yet as i'm a beginner. I'm building a sort of JMF security application that captures a frame every minute in order to check that nobody's breaking in my house.
    This application works fine, but my problem is that I can't use my webcam anymore, as it's sort of "blocked" by my application. I was wondering if there was a way to capture frames without "blocking" webcam, because I would want to be able to use it when I'm home and I don't want to have to disable and enable my application each time I need my webcam.
    Is there a way to prevent such an application from blocking my webcam?
    Thank you.
    Joel
    PS: Sory for any english mistake, I tried to do my best, but I'm french.

    853909 wrote:
    Is there any other Java Multimedia API that could solve this problem?I don't think there's any API that can solve that problem... every software package I'm aware of requires a "lock" to use a web cam.
    There are some programs available that you can use as a virtual web cam, however, that essentially pass-through the web cam (and most of them do stuff like append text to it, etc), so you might look into that concept.

  • Synchronized method not preventing concurrent access

    Hi
    I have 3 classes, T (a Runnable), TRunner (instantiates and starts a thread using T), and Sync (with one synchronized method, foo).
    The problem is that foo is entered concurrently by different threads at the same time. How so?
    T.java:
    import java.util.Calendar;
    class T implements Runnable
       private String name;
       public T(String name)
         this.name = name;
       public void run()
          Thread.currentThread().setName(name);
          Sync s = new Sync();
          System.out.println(Calendar.getInstance().getTime() + ".....Running " + Thread.currentThread().getName());
          s.foo(name);
    }TRunner.java:
    class TRunner
       public static void main(String args[])
           T tx = new T("x");
           T ty = new T("y");
           T tz = new T("z");
           Thread t1 = new Thread(tx);
           Thread t2 = new Thread(ty);
           Thread t3 = new Thread(tz);
           t1.start();
           t2.start();
           t3.start();
    }Sync.java:
    import java.util.Calendar;
    class Sync
       public synchronized void foo(String threadname)
              System.out.println(Calendar.getInstance().getTime() + ":" + threadname + "....entering FOO");
              try
                   Thread.sleep(5000);
              catch (InterruptedException e)
                   System.out.println("interrupted");
              System.out.println(Calendar.getInstance().getTime() + ":" + threadname + "....leaving FOO");
    }Console output:
    C:\javatemp>java TRunner
    Mon Apr 09 15:35:46 CEST 2007.....Running x
    Mon Apr 09 15:35:46 CEST 2007:x....entering FOO
    Mon Apr 09 15:35:46 CEST 2007.....Running y
    Mon Apr 09 15:35:46 CEST 2007:y....entering FOO
    Mon Apr 09 15:35:46 CEST 2007.....Running z
    Mon Apr 09 15:35:46 CEST 2007:z....entering FOO
    Mon Apr 09 15:35:51 CEST 2007:x....leaving FOO
    Mon Apr 09 15:35:51 CEST 2007:y....leaving FOO
    Mon Apr 09 15:35:51 CEST 2007:z....leaving FOO
    C:\javatemp>Thanks in advance.

    Only for static methods. For instance methods, the lock >is the object.You are absolutely right.
    The Class object is no different from any other object. >"Entire" Class object makes no sense.What I wanted to say is that it's better to synchronize on the object we want to protect from concurrent access rather than on the entire class or instance object.
    "Efficiency" is not altered by locking on a Class object vs. >any other object.I studied that it's better to synchronize on the objects we want to protect instead of the entire instance or class object. If one declares a method as synchronized, it means that other threads won't be able to access other synchronized methods for the same object, even if the two weren't in conflict. That was explained as a performance penalty.
    >
    Or when one or more threads may modify it and one or
    more may read it.
    Yep, sure.
    >
    No, they're not.
    You are absolutely right. What I wanted to say is that local variables are unique per thread.
    >
    Local variables are unique per thread, but that's NOT
    atomicity.Sorry for any confusion
    Message was edited by:
    mtedone

  • Segment fault in concurrent access to BDB

    Hi, All
    I am extending a single thread BDB application to allow concurrent
    access to the DB from 2 threads, transaction is not needed.
    The environment is opened with the flag (DB_CREATE | DB_INIT_MPOOL | DB_INIT_LOCK).
    Then I open a new DB under the same directory in each thread, and
    modify the DB simultaneously.  my expectation was that each thread
    will not conflict with each other and in turn improve the
    throughput. While the program constantly crashed because of segment
    fault in file (src/lock/lock.c:832, both threads crashed on this
    line).
    I inspected the back trace, the only suspecious thing I found is that
    the 2 threads are using the same locker object[1], so I'm wondering if
    anyone has similar experience implementing concurrent BDB
    applications? And what's possible cause of my problem and possible
    fixes? Thanks.
    [1]
    thread 1: #0  0x00002aaab3651a7f in __lock_get_internal (lt=0x13cbda0, sh_locker=0x2aab0119f258, flags=4, obj=0x1c55650, lock_mode=DB_LOCK_WRITE, timeout=0, lock=0x2aab449fe8a0)
        at ../src/lock/lock.c:832
    thread 2: #0  0x00002aaab3651a7f in __lock_get_internal (lt=0x13cbda0, sh_locker=0x2aab0119f258, flags=4, obj=0x13da640, lock_mode=DB_LOCK_WRITE, timeout=0, lock=0x2aab3ffc78a0)
        at ../src/lock/lock.c:832

    Hi, Mike
    Thanks for the timely reply!
    I referred to the Berkeley DB Transaction Guide, while the doc does not mention the consequence if you violate the scenario requirement. 
    1. I choose the default Data Store model, and my program will allow multiple writers, what's the expected behavior? 2 threads using the same locker compete different locks is supposed to segment fault?  I'm also curious about how a put(key, data) correspond to a locker, keys in the memory page map to the same locker?
    2. I try to enable concurrent reader & writer without transaction, while the guide assumes transaction is enable, is Data Store able to achieve this? Or at least Concurrent Data Store is required?
    Thank you very much!

  • Remote access to a single application on a mac os 10.4 server (vmware)

    Hello all,
    I need to give multiple users (all on mac's) access to a shared windows accounting application.
    We have absolutely no windows servers in the organisation and i was wondering if it would be possible to load the accounting app as a vmware fusion (or parallels) session on one of our Xserve's and only give remote users (using remote desktop or vnc) access to that single application ..
    I'm basically trying to "emulate some of the functionality of Citrix/Windows Remote Desktop on a MAC OS 10.4 server ?
    Have anyone ever done anything similar ? Or have any hints in relation to solving this issue ?
    Thanks in advance,

    To give you a direction to go in, you might want to look at the possibility of having one dedicated PC that runs the application, and use Microsoft's Remote Desktop Connection to connect to it from the Macs. I think all you need is XP Pro to receive RDC connections. You might be able to use an emulator to set that up, but I don't know well how emulators handle RDC if at all. The problem is that you can only have one user connected to it at a time, but emulating it wouldn't do anything to help that.
    Hope this helps.

  • Error #1009: Cannot access a property or method

    Here's the context of the problem, in which I will try to include as much information as possible while keeping the explanation brief.
    I am trying to make a portfolio website (architectural design + concept art).  Flash / programing are not my focus and this is my first go at learning the software.  Due to the nature of the content and my (lack) of ability in AS3, I want the the coding to be really simple and still let the site look good.  The way the site is currently structured:
    1) Basic menu buttons that navigate to sections of the site (brings up a new page).
    2) Example, clicking on <Graphics> takes you to a new page and a sub-menu animates in (simple motion tween for the buttons to cascade down).  This animation is a movie clip placed on the main timeline.
    3) On the screen is also a slideshow for all the images within <Graphics>.  Instead of multiple small slideshows, I combined them all into one, so as to avoid complications with add / remove from stage.  There are prev / next buttons that keep images within their sub section (ie 1->2->3->1).  The sub-menu buttons are suppose to link to the start of each sub section, much like chapters on a DVD.  (The slideshow is a movieclip sub-nested in the menu movieclip).
    Main menu buttons work.
    Sub-menu animation works.
    Slideshow works.
    Can't get the sub-menu buttons to access the slideshow chapters.
    I have created and solved about half a dozen errors, and each time I fix something, it just causes another point to break.  I've gone around in circles for days, and not sure which was is up anymore.  So, while the slideshow works independently of the rest of the content, and I think I have the parent referencing correct, the problem I am currently facing is thus:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at 03graphics_fla::MainTimeline/frame1()
    I've browsed some other threads, and I think I know what the problem is.  Since the sub-menu is animated, the buttons do not appear on frame 1 of the nested timeline, while the actionscript is on frame 1 of the main timeline - thus the code doesn't exist yet when I click the button.
    Is this indeed the problem?  If so, how do I go about fixing it?
    Additionally, does the structure makes sense on how my site is organized?  Is there an easier / cleaner way to code it?
    (This thing is completely ghetto-rigged, I just need it to function - it's like my own little Millenium Falcon...)
    Cheers,
    Andy

    Try following this posting, which is just a posting or two away from your own in the forum...
    http://forums.adobe.com/thread/748542?tstart=0

  • New to action script and getting: TypeError: Error #1009: Cannot access a property or method of a nu

    I am getting this message in the output tab for buttons that I am trying to create.  Here's the code:
    import flash.events.MouseEvent;
    stop();
    function goHome(myEvent:MouseEvent):void {
    gotoAndStop("home");
    SoundMixer.stopAll();
    function goAbout(myEvent:MouseEvent):void {
    gotoAndStop("about");
    SoundMixer.stopAll();
    function goBusiness(myEvent:MouseEvent):void {
    gotoAndStop("business");
    SoundMixer.stopAll();
    function goContact(myEvent:MouseEvent):void {
    gotoAndStop("contact");
    SoundMixer.stopAll();
    function goArchives(myEvent:MouseEvent):void {
    gotoAndStop("archives");
    SoundMixer.stopAll();
    function goBioTech(myEvent:MouseEvent):void {
    gotoAndStop("bioTech");
    SoundMixer.stopAll();
    function goRealEstate(myEvent:MouseEvent):void {
    gotoAndStop("realEstate");
    SoundMixer.stopAll();
    function goTechnology(myEvent:MouseEvent):void {
    gotoAndStop("technology");
    SoundMixer.stopAll();
    function goEnergy(myEvent:MouseEvent):void {
    gotoAndStop("energy");
    SoundMixer.stopAll();
    home_btn.addEventListener(MouseEvent.CLICK, goHome);
    about_btn.addEventListener(MouseEvent.CLICK, goAbout);
    business_btn.addEventListener(MouseEvent.CLICK, goBusiness);
    contact_btn.addEventListener(MouseEvent.CLICK, goContact);
    archives_btn.addEventListener(MouseEvent.CLICK, goArchives);
    bioTech_btn.addEventListener(MouseEvent.CLICK, goBioTech);
    realEstate_btn.addEventListener(MouseEvent.CLICK, goRealEstate);
    technology_btn.addEventListener(MouseEvent.CLICK, goTechnology);
    energy_btn.addEventListener(MouseEvent.CLICK, goEnergy);
    I ran the debugger and got this:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at peakInsights_fla::MainTimeline/frame1()[peakInsights_fla.MainTimeline::frame1:48]
    I guess it's telling me there's a problem with line 48 but what?
    The home, about, business, contact, and archives button works. On the business page there are the remaining buttons biotech, technology, real estate, and energy. when i test it; i get the finger but the buttons don't work. this is my first flash site so I'am new, new.

    I followed the steps and read some of your comments on the same top topic in another thread. When I put it on the first frame it was okay but the next button on that page had the same problem.  So what I am guessing is that I have to either create a document class or put the actions where the buttons are.  Am I understanding that correctly?  In the other thread in which you helped someone else; there was so comments about document class.  I found a tutorial on it and the way I understand it is that it you can put you actions in an external document.  But you have to include in the event listener the frame in which you want that action to happen.
    Thaks for your help.  And patience.

  • Problem with file access in other computer in jsp

    I have problem with file accessing in other computer in jsp.
    The follow code
    File folder=new File("Z:"+File.separator+"sharefolder");//Z is a net share driver
    File[] files=folder.listFiles();
    System.out.println("test");
    System.out.println("length="+files.length);
    will throw exception at the second print.
    but it works well in main funtion.
    Is anybody know what is the problem.
    JSP works on windows2003 server,tomcat 5.0.28 JDK1.4 net share folder on windows2000 server

    no error code for this.But when I start tomcat I get the follow error.
    java.lang.IllegalArgumentException: Document base Z:\ does not exist or is not a readable directory
         at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:138)
         at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3910)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4138)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
         at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
         at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
         at org.apache.commons.digester.Rule.end(Rule.java:276)
         at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
         at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
         at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.apache.commons.digester.Digester.parse(Digester.java:1567)
         at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
         at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
         at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
         at org.apache.catalina.core.StandardService.start(StandardService.java:480)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
    Jun 5, 2006 6:55:41 PM org.apache.catalina.core.StandardContext start
    SEVERE: Error in resourceStart()
    Jun 5, 2006 6:55:41 PM org.apache.catalina.core.StandardContext start
    SEVERE: Error getConfigured
    Jun 5, 2006 6:55:41 PM org.apache.catalina.core.StandardContext start
    SEVERE: Context startup failed due to previous errors
    Jun 5, 2006 6:55:41 PM org.apache.catalina.core.StandardContext start
    SEVERE: Exception during cleanup after start failed
    LifecycleException: Container StandardContext[msgstore] has not been started
         at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4466)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
         at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
         at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
         at org.apache.commons.digester.Rule.end(Rule.java:276)
         at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
         at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
         at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.apache.commons.digester.Digester.parse(Digester.java:1567)
         at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
         at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
         at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
         at org.apache.catalina.core.StandardService.start(StandardService.java:480)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)

  • How to synchronize concurrent access to static data in ABAP Objects

    Hi,
    1) First of all I mwould like to know the scope of static (class-data) data of an ABAP Objects Class: If changing a static data variable is that change visible to all concurrent processes in the same Application Server?
    2) If that is the case. How can concurrent access to such data (that can be shared between many processes) be controlled. In C one could use semaphores and in Java Synchronized methods and the monitor concept. But what controls are available in ABAP for controlling concurrent access to in-memory data?
    Many thanks for your help!
    Regards,
    Christian

    Hello Christian
    Here is an example that shows that the static attributes of a class are not shared between two reports that are linked via SUBMIT statement.
    *& Report  ZUS_SDN_OO_STATIC_ATTRIBUTES
    REPORT  zus_sdn_oo_static_attributes.
    DATA:
      gt_list        TYPE STANDARD TABLE OF abaplist,
      go_static      TYPE REF TO zcl_sdn_static_attributes.
    <i>* CONSTRUCTOR method of class ZCL_SDN_STATIC_ATTRIBUTES:
    **METHOD constructor.
    *** define local data
    **  DATA:
    **    ld_msg    TYPE bapi_msg.
    **  ADD id_count TO md_count.
    **ENDMETHOD.
    * Static public attribute MD_COUNT (type i), initial value = 1</i>
    PARAMETERS:
      p_called(1)  TYPE c  DEFAULT ' ' NO-DISPLAY.
    START-OF-SELECTION.
    <b>* Initial state of static attribute:
    *    zcl_sdn_static_attributes=>md_count = 0</b>
      syst-index = 0.
      WRITE: / syst-index, '. object: static counter=',
               zcl_sdn_static_attributes=>md_count.
      DO 5 TIMES.
    <b>*   Every time sy-index is added to md_count</b>
        CREATE OBJECT go_static
          EXPORTING
            id_count = syst-index.
        WRITE: / syst-index, '. object: static counter=',
                 zcl_sdn_static_attributes=>md_count.
    <b>*   After the 3rd round we start the report again (via SUBMIT)
    *   and return the result via list memory.
    *   If the value of the static attribute is not reset we would
    *   start with initial value of md_count = 7 (1+1+2+3).</b>
        IF ( p_called = ' '  AND
             syst-index = 3 ).
          SUBMIT zus_sdn_oo_static_attributes EXPORTING LIST TO MEMORY
            WITH p_called = 'X'
          AND RETURN.
          CALL FUNCTION 'LIST_FROM_MEMORY'
            TABLES
              listobject = gt_list
            EXCEPTIONS
              not_found  = 1
              OTHERS     = 2.
          IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          CALL FUNCTION 'DISPLAY_LIST'
    *       EXPORTING
    *         FULLSCREEN                  =
    *         CALLER_HANDLES_EVENTS       =
    *         STARTING_X                  = 10
    *         STARTING_Y                  = 10
    *         ENDING_X                    = 60
    *         ENDING_Y                    = 20
    *       IMPORTING
    *         USER_COMMAND                =
            TABLES
              listobject                  = gt_list
            EXCEPTIONS
              empty_list                  = 1
              OTHERS                      = 2.
          IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
        ENDIF.
      ENDDO.
    <b>* Result: in the 2nd run of the report (via SUBMIT) we get
    *         the same values for the static counter.</b>
    END-OF-SELECTION.
    Regards
      Uwe

  • TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.controls::AdvancedDataGrid/findHeaderRenderer()

    Can anyone throw any light on this obscure Flex error?...
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at mx.controls::AdvancedDataGrid/findHeaderRenderer()[...path...\projects\datavisualisation\ src\mx\controls\AdvancedDataGrid.as:1350]
    at mx.controls::AdvancedDataGrid/mouseEventToItemRenderer()[...path...\projects\datavisualis ation\src\mx\controls\AdvancedDataGrid.as:1315]
    at mx.controls.listClasses::AdvancedListBase/mouseMoveHandler()[...path...\projects\datavisu alisation\src\mx\controls\listClasses\AdvancedListBase.as:8091]
    I found a related bug reported on Jira: https://bugs.adobe.com/jira/browse/FLEXDMV-1631
    But in our case, we have no zoom effect.  It may be timing related, as there is a lot of computation going on when this page, and the ADG is first initialised.
    Please?... Any suggestions or workarounds?  We don't want this falling over in the hands of our customers.
    <rant> And people wonder why I hate Flex!?  These obscure instabilities never happen when I develop Pure ActionScript.  The Flash platform is wonderfully stable.  But as soon as you bring Flex into play, things take longer to develop, it's a struggle to extend or change the behaviour of the bloated components, and everything falls apart as these bugs begin to surface.</rant>

    facing the same problem... sdk 4.1. no solution for about 2 years ????

  • How does the Concurrent Access License (CAL) work.

    Description from Google: How does the Concurrent Access License (CAL) work? Xcelsius Engage Server CALs allow for concurrent live data updates inside Xcelsius dashboards. Every time an end-user triggers a Web service inside an Xcelsius dashboard to retrieve live data, a CAL is consumed for a period of 5 minutes. For that period, in a five CAL deployment for example, there will be only four CALs left for consumption. A five CAL deployment could support up to 25 users and additional CALs can be added to support a larger deployment.
    My question is as follows:
    How a five CAL deployment could support up to 25 users and what does it mean. In the first line it is saying that each CAL for a web service is consumed for a period of 5 minutes and how come it can support 25 users concurrently. Did it mean 25 web service connections inside a swf flash file or 25 different users to access a single web service through swf flash.

    The "Set cost controls" concurrent program is used in R12 to mass update the cost control fields on item costs.
    The cost control region is found by going to Cost management >Item costs > Item Costs
    The concurrent program lets you specify which items /costs should be updated by using various parameters such as cost type, item range, category range etc.
    And you can specify the source for the new cost control data and the new value for the fields.
    Hope this answers your question,
    Sandeep Gandhi

  • Air Sqlite data paging (Cannot access a property or method of a null object reference.)

    I want to paging this data from my table but i get this error:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    public function retrieveData():void
        var stmt:SQLStatement = new SQLStatement();
        stmt.sqlConnection = sqlConn;
        sqlConn.addEventListener(SQLErrorEvent.ERROR, errorHandler);
        stmt.addEventListener(SQLEvent.RESULT, selectResult);
        stmt.text = "SELECT * FROM empleado";
        stmt.execute(2);
        var result:SQLResult = stmt.getResult();
        acEmpleados = new ArrayCollection(result.data);
    private function selectResult(event:SQLEvent):void
        var stmt:SQLStatement = new SQLStatement();
        stmt.sqlConnection = sqlConn;
        var result:SQLResult = stmt.getResult();
        if (result.data != null)
            if (!result.complete)
                stmt.next(2);
            else
                stmt.removeEventListener(SQLEvent.RESULT, selectResult);
    What do i have to do?

    I solved the issue by getting rid of the creationCompleteHandler event handlers for the KPI charts. But, since I am just days into flex development, I would be indebted if someone could explain to me why that was creating problems.

  • PopUpManager.centerPopUp gives Cannot access a property or method of a null object reference

    Hello all,
    The PopUpManager.centerPopUp(this); in my code gives out the following error:
    Main Thread (Suspended: TypeError: Error #1009: Cannot access a property or method of a null object reference.)   
        mx.managers::PopUpManagerImpl/findPopupInfoByOwner   
        mx.managers::PopUpManagerImpl/centerPopUp   
        mx.managers::PopUpManager$/centerPopUp   
        com.mycom.view::LoginView/doInit   
        com.mycom.view::LoginView/___LoginView_TitleWindow1_creationComplete   
        flash.events::EventDispatcher/dispatchEventFunction [no source]   
        flash.events::EventDispatcher/dispatchEvent [no source]   
        mx.core::UIComponent/dispatchEvent   
        mx.core::UIComponent/set initialized   
        mx.managers::LayoutManager/doPhasedInstantiation   
        Function/http://adobe.com/AS3/2006/builtin::apply [no source]   
        mx.core::UIComponent/callLaterDispatcher2   
        mx.core::UIComponent/callLaterDispatcher
    MyAppl.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
        xmlns:view="com.mycom.view.*">
        <mx:Panel id="applPanel" height="100%" width="100%" backgroundColor="#3CACCC">
            <view:LoginView />
        </mx:Panel>
    </mx:Application>
    LoginView.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="absolute" width="400" height="300" creationComplete="doInit()">
        <mx:Script>
            <![CDATA[
                import mx.managers.PopUpManager;
                private function doInit():void {               
                    PopUpManager.centerPopUp(this);               
                private function login():void{
                    trace("login clicked");
            ]]>
        </mx:Script>
        <mx:Form id="loginForm" defaultButton="{loginBtn}">               
            <mx:HBox>
                <mx:Button id="loginBtn" label="OK" click="login()" />           
            </mx:HBox>
        </mx:Form>
    </mx:TitleWindow>
    Somebody please help me on this.
    Thanks.
    roshni

    Pls find your solution Below.
    MyAppl.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
    creationComplete="onCreationComplete()">
    <mx:Script>
    <![CDATA[
    import com.mycom.view.LoginView;
    import mx.core.IFlexDisplayObject;
    import mx.managers.PopUpManager;
    private var popUp:IFlexDisplayObject;
    private function onCreationComplete():void
    popUp = PopUpManager.createPopUp(this, LoginView, true);
    popUp.move(((this.width/2)-(popUp.width/2)),(((this.height/2)-(popUp.height/2))));
    ]]>
    </mx:Script>
    <mx:Panel id="applPanel" height="100%" width="100%" backgroundColor="#3CACCC"/>
    </mx:Application>
    LoginView.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="absolute" width="400" height="300">
    <mx:Script>
    <![CDATA[
    import mx.managers.PopUpManager;
    private function login():void{
    trace("login clicked");
    ]]>
    </mx:Script>
    <mx:Form id="loginForm" defaultButton="{loginBtn}">
    <mx:HBox>
    <mx:Button id="loginBtn" label="OK" click="login()" />
    </mx:HBox>
    </mx:Form>
    </mx:TitleWindow>
    Pls let me know if you have any problem with this one code.
    with Regards,
    Shardul Singh Bartwal

Maybe you are looking for