Conn Method Access - Calling from method

Hi I am trying to create a method in another class to call another method that checks for userid in DB? What is the best way to set this up? I.e. calling method?
//calling method below line
private boolean setuserExist(String username) {
     else return false;
public String getserExist() {
          return userexist;
// Method being called below this line
public boolean userExist(String username){
          boolean exist = false;
          System.out.println("in LoginDBAccess: username is " + username);
          try{
Connection conn = dbc.getConnection();
Statement statement = conn.createStatement();
String query =      "SELECT User.UserID " +
                    "FROM User " +
                    "WHERE User.UserID = '" + username + "'";
ResultSet resultSet = statement.executeQuery(query);
System.out.println("1.1");
ArrayList result = new ArrayList();
while(resultSet.next()){
     //System.out.println("In While:");
ArrayList item = new ArrayList();
item.add(resultSet.getString("UserID"));
result.add(item);
System.out.println("LoginDBAccess Count: " + result.size());
conn.close();
if (result.size() == 1){
     exist = true;
          }catch(Exception e){
     e.printStackTrace();
          return exist;
     }

http://forum.java.sun.com/thread.jspa?threadID=603496
Cross-post.

Similar Messages

  • Object synchronization method was called from an unsynchronized block of co

    I have installed DotNETWebControlConsumer_3.0_sp1
    in my machine I am very much new to Plumtree
    I am building the application in vs 2005 or .Net 2.0 environment and plumtree 6.0
    here is my web.config file code
    <httpModules>
    <add type="Com.Plumtree.Remote.Loader.TransformerProxy, Plumtree.WCLoader, Version=3.0.0.0, Culture=neutral, PublicKeyToken=d0e882dd51ca12c5" name="PTWCFilterHttpModule"/>
    </httpModules>
    and I get the error Object synchronization method was called from an unsynchronized block of code
    I just removed the html format for posting purpose i mean all the less than and greater than sign
    please I need it so badly

    Regarding your first issue (because it looks as if you removed the <httpModules> node from your web.config to move on from that issue), I changed 'Aqualogic.WCLoader' to 'Plumtree.WCLoader' in <httpModules ../>, added a reference to Plumtree.WCLoader in my project , then added another <add assembly="Plumtree.WCLoaderyadayada...> accordingly to the <assemblies> node in the web.config and then it worked. Well, almost, now I'm seeing a new error:
    [NullReferenceException: Object reference not set to an instance of an object.]
    Com.Plumtree.Remote.Transformer.PTTransformer.HandleRequest(HttpContext ctx) in e:\buildroot\Release\wcfilter\3.0.x\filter\src\Com\Plumtree\Remote\Transformer\PTTransformer.cs:60
    Com.Plumtree.Remote.Transformer.PTTransformer.BeginRequestHandler(Object sender, EventArgs e) in e:\buildroot\Release\wcfilter\3.0.x\filter\src\Com\Plumtree\Remote\Transformer\PTTransformer.cs:54
    System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
    Mine is a .net 2.0 portlet that will work if I don't try to use the WCC 3.0SP1 (by pulling the <httpModules> node. But then I'm guaranteed no inline refresh. I have no fix yet, but when I do, I'll post it. I've contacted Plumtree Support in the meantime because others must be having the same problem.
    p.s. Also using edk 5.3 signed, though I'm going to upgrade to 5.4 and see if that does anything.

  • Difference between Session method and Call transaction method

    Hi,
    Difference between Session method and Call transaction method in BDC

    Hi,
    SESSION method:
    Is a standard procedure for transferring large amount of data into the R/3 system.
    Data consistency is ensured because batch input uses all thje checks conducted on the normal screen.
    It is a two step procedure:
    1.  Progarm: creates batch input session. This session is the data file that includes everything to begin the transaction.
    2. Process session: Which then actually transfers the data to database table.
    In this method an ABAP/4 program reads the external data that is to be entered in the SAP system and stores the data in a session.
    A session stores the actions that are required to enter your data using normal SAP transactions i.e. data is transferred to session which inturn transfers data to database table. Session is an intermediate step between internal table and database table.
    Data along with it's actions are stored in session. i.e. data for screen fields, to which screen it is passed, the program name behind it and how next screen is processed.
    When the program has finished generating the session, u can run the session to execute the SAP transactions in it.
    BDC_OPEN_GROUP
              You create the session through program by BDC_OPEN_GROUP function.
    1) User Name: User Name.
    2) Group       : Name of the session
    3) Lock Date : The date when you want to process the session.
    4) Keep        : This parameter is passed as 'X' when you want to retain session even       after processing it.                    
    BDC_INSERT
         Data is transferred to session by BDC_INSERT.
    BDC_CLOSE_GROUP.
         With this function the session will be closed.
    CALL TRANSACTION method.
    Syntax: call transaction <tr code> using <bdctab>
                                 mode <A/N/E>
                                 update <S/A>
                                 messages into <internal table>.
    <tr code>   : transaction code
    <bdctab>   : Name of the BDC table
    mode: mode in which you execute the transaction.      
    A   : all screen mode ( all the screens of the transaction are displayed )
    N   : no screen mode ( no screen will be displayed when you execute the transaction )
    E   : error screen ( only those screens are displayed where in you have error record )
    Update type:
    S: synchronous update in which if you change data of one table then all the related tables gets updated and SY_SUBRC is returned for once and all.
    A: asynchronous update in which if you change data of one table, the sy-subrc is returned and then updation of other affected tables takes place. So if system fails to update other tables still sy-subrc returned is zero.(that is when first table gets updated ).
    messages: if you update database table, operation is either successful or unsuccessful. These messages are stored in internal table. This internal table structure is like BDCMSGCOLL.
           TCODE:  transaction code.
           DYNAME: batch input module name.
           DYNNUMB: batch input dyn no.
           MSGTYP:  batch input message type.
           MSGSPRA: batch input language id of message.
           MSGID:    message id.
           MSGV1….MSGV5: message variables
    For each entry which is updated in the database table message is available in BDCMSGCOLL.
    Reward if useful
    Regards
    Srinu

  • Lookup the name of class where a methode is called from?

    Hi
    i have an object A and an object B. From A i call a methode in B and within that methode i need to find out ot which type the object is that called the methode.
    Is there any methode to find out which object is calling the methode and to find out of which class type that object is (resulting in a String containing the name of that class)?
    Thanks for your help.

    I can think of two ways to do this. First, you could get the current StackTrace and parse it up. You'd be looking for the stack trace element immediately before the current method is called if I understand your post correctly. If you are using JDK 1.3.1 or below, you'd have to print the StackTrace to a String. If you are using JDK 1.4, there is a new Object called StackTraceElement. You can get an array of them from an Exception object.
    Second, you could use AspectJ to crosscut code into your application. AspectJ is complicated so I will just point you to their website for more information: http://www.aspectj.org.
    Dave.

  • Error accessing class from method

    I am trying to write a method that accesses a class called circle where the user inputs the radius of a circle and the program prints the area, radius and circumference.
    My class is as follows.
    public class Circle
    private double Radius;
    private double PI = 3.14159;
    public void setRadius(double rad)
    Radius = rad;
    public void setPI(double pi)
    PI = pi;
    public double getRadius()
    return Radius;
    public double getPI()
    return PI;
    public double getArea()
    return PI * Radius * Radius;
    public double getDiameter()
    return Radius * Radius;
    public double getCircumferance()
    return 2 * PI * Radius;
    I am not having any areas when compiling the class.
    The method is as follows.
    //IS 115
    //DED01
    //Method for Circle class
    //Larry Piatt
    public class CircleStats
    public static void main(String[] args)
    double number;
    Scanner keyboard = new Scanner(System.in);
    Circle Radius = new Circle();
    Circle Area = new Circle();
    Circle Diameter = new Circle();
    Circle Circumference = new Circle();
    System.out.println("What is the radius of the circle? ");
    number = keyboard.nextDouble();
    number.setRadius(number);
    System.out.println("The area of the circle is "
    + Area);
    System.out.println("The diamter of the circle is "
    + Diameter);
    System.out.println("The circumference of the circle is "
    + Circumference);
    The error that I am seeing are as follows
    ^
    CircleStats.java:28: double cannot be dereferenced
    number.setRadius(number);
    ^
    1 errors
    This is my first attempt at writting a method that calls a class. I am not understanding it very well yet. Any assistance would be greatly appreciated.
    Edited by: tooned on Mar 30, 2008 1:10 PM

    1) your error: You're trying to call a method, setRadius, on the variable, number, which is nothing more than a lowly double primative variable. Better to call the method on your Circle object which here you call "Radius" (please note the Java naming convention: objects should begin with a lower-case letter).
    Also, when posting your code, please use code tags so that your code will retain its formatting and be readable. To do this, either use the "code" button at the top of the forum Message editor or place the tag &#91;code] at the top of your block of code and the tag &#91;/code] at the bottom, like so:
    &#91;code]
      // your code block goes here.
      // note the differences between the tag at the top vs the bottom.
    &#91;/code]or
    {&#99;ode}
      // your code block goes here.
      // note here that the tags are the same.
    {&#99;ode}Your formatted code would look something like so:
    public class Circle
        private double Radius;
        private double PI = 3.14159;
        public void setRadius(double rad)
            Radius = rad;
        public void setPI(double pi)
            PI = pi;
        public double getRadius()
            return Radius;
        public double getPI()
            return PI;
        public double getArea()
            return PI * Radius * Radius;
        public double getDiameter()
            return Radius * Radius;
        public double getCircumferance()
            return 2 * PI * Radius;
    import java.util.Scanner;
    class CircleStats
        public static void main(String[] args)
            double number;
            Scanner keyboard = new Scanner(System.in);
            Circle Radius = new Circle();
            Circle Area = new Circle();
            Circle Diameter = new Circle();
            Circle Circumference = new Circle();
            System.out.println("What is the radius of the circle? ");
            number = keyboard.nextDouble();
            // number.setRadius(number);
            Radius.setRadius(number);
            System.out.println("The area of the circle is " + Area);
            System.out.println("The diamter of the circle is " + Diameter);
            System.out.println("The circumference of the circle is "
                    + Circumference);
    }

  • Determining which method to call from an array of Objects

    Hi All,
    Lets suppose I have an interface, a string method name, and an array of Objects indicating the parameters which should be passed to the method.
    What Im trying to work out is a way to quickly determine which method should be invoked.
    I can see that Class has getDeclaredMethod(String, Class[]), but that wont help me as I dont know the formal class types (the method may take X, but I might get passed Y which extends X in the array of objects).
    Does anyone know of a quick way I can determine this?
    All I can think of at the moment is going thru each method of the class one by one, and seeing if the arg is assignable, then, after getting all my matched methods, determining if there are any more 'specific' matches.
    Any ideas?
    Much appreciated,
    Dave

    you might want to take a look at the dynamic proxy apiCheers for the suggestion, but Im actually already using the dynamic proxy API.
    What I have is a MockObjectValidator which allows mock objects to be configuered with expected calls, exceptions to throw etc etc.
    I thought developers on my project would get tired using an interface like this:
    myValidator.setExpectedCall("someMethod", new Class[] { typeA, typeB }, new Object[] { valueA, valueB} );
    I.e, I wanted to cut out having to pass the class array, so they could just use:
    myValidator.setExpectedCall("someMethod", new Object[] { valueA, valueB} );
    The problem there is that I then need to pick the best Method from the class given the object arguments.
    When the mock object is in use, its no problem as the InvocationHandler interface provides the Method. The problem I have is selecting what method a user is talking about from an array of Objects.
    Ive written a simple one now, it just does primitive type class -> wrapper substitution, and then finds ** A ** match. If there is more than one match (ie, all params are assignable to a class' method params), I dont let that method be used.
    Shortly I'll update it to actually make the correct selection in those cases.
    cheers
    Dave

  • I want to know why it's happening me this error: Object synchronization method was called from an unsynchronized block of code.

    I'm developing a Smart Array (it's a request I cannot use a List of int that I know it's easier because I made both codes). I have done this class and below is the example of how I use it. The error is often in this line (153 from class):
    // Ensure that the lock is released.
    Monitor.Exit(array);
    If I use a List nothing wrong happens just when I translate to an array. Thanks for your help.
    SmartArray3.cs
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading;
    using System.Threading.Tasks;
    namespace SmartArray
    class SmartArray3
    private int[] array;
    private int size = 0;
    private int count = 0;
    public SmartArray3()
    Resize(1);
    public SmartArray3(int size)
    this.size = size;
    array = new int[this.size];
    public bool Resize(int size)
    try
    if (array == null)
    array = new int[size];
    else
    Array.Resize(ref array, size);
    this.size++;
    return true;
    catch
    return false;
    private void add(int value)
    try
    if (array == null)
    this.size = 1;
    Resize(this.size);
    array[0] = value;
    this.count++;
    else
    if (this.count == (this.size - 1))
    this.size *= 2;
    this.Resize(this.size);
    if ((this.count - 1) < 0)
    array[0] = value;
    else
    array[this.count - 1] = value;
    this.count++;
    catch (Exception ex)
    Console.Write(ex.ToString());
    throw new System.IndexOutOfRangeException("Index out of Range.");
    // Lock the array and add an element.
    public void Add(int value)
    // Request the lock, and block until it is obtained.
    Monitor.Enter(array);
    try
    if (array == null)
    this.size = 1;
    Resize(this.size);
    array[0] = value;
    this.count++;
    else
    if (this.count == (this.size - 1))
    this.size *= 2;
    this.Resize(this.size);
    if ((this.count - 1) < 0)
    array[0] = value;
    else
    array[this.count - 1] = value;
    this.count++;
    finally
    // Ensure that the lock is released.
    Monitor.Exit(array);
    // Try to add an element to the List: Add the element to the List
    // only if the lock is immediately available.
    public bool TryAdd(int value)
    // Request the lock.
    if (Monitor.TryEnter(array))
    try
    if (array == null)
    this.size = 1;
    Resize(this.size);
    array[0] = value;
    this.count++;
    else
    if (this.count == (this.size - 1))
    this.size *= 2;
    this.Resize(this.size);
    if ((this.count - 1) < 0)
    array[0] = value;
    else
    array[this.count - 1] = value;
    this.count++;
    finally
    // Ensure that the lock is released.
    Monitor.Exit(array);
    return true;
    else
    return false;
    public int Get(int index)
    try
    return array[index];
    catch (IndexOutOfRangeException ex)
    throw new System.IndexOutOfRangeException("Index out of range");
    Code for called the Class:
    private static int threadsRunning = 0;
    private SmartArray3 sa = new SmartArray3();
    private List<double> times;
    private static string[] titles ={
    "Add ", "Add failed ", "TryAdd succeeded ", "TryAdd failed "};
    private static int[][] results = new int[3][];
    //Event to Create Threads
    private void newTest()
    for (int i = 0; i < 3; i++)
    Thread t = new Thread(ThreadProc);
    t.Start(i);
    Interlocked.Increment(ref threadsRunning);
    private void ThreadProc(object state)
    times = new List<double>();
    DateTime finish = DateTime.Now.AddSeconds(10);
    Random rand = new Random();
    int[] result = { 0, 0, 0, 0};
    int threadNum = (int)state;
    while (DateTime.Now < finish)
    Stopwatch sw = Stopwatch.StartNew();
    int what = rand.Next(250);
    int how = rand.Next(25);
    if (how < 16)
    try
    sa.Add(what);
    result[(int)ThreadResultIndex.AddCt] += 1;
    times.Add(sw.Elapsed.TotalMilliseconds);
    catch
    result[(int)ThreadResultIndex.AddFailCt] += 1;
    else
    if (sa.TryAdd(what))
    result[(int)ThreadResultIndex.TryAddSucceedCt] += 1;
    else
    result[(int)ThreadResultIndex.TryAddFailCt] += 1;
    sw.Stop();
    results[threadNum] = result;
    if (0 == Interlocked.Decrement(ref threadsRunning))
    StringBuilder sb = new StringBuilder(
    " Thread 1 Thread 2 Thread 3 Total\n");
    for (int row = 0; row < 4; row++)
    int total = 0;
    sb.Append(titles[row]);
    for (int col = 0; col < 3; col++)
    sb.Append(String.Format("{0,4} ", results[col][row]));
    total += results[col][row];
    sb.AppendLine(String.Format("{0,4} ", total));
    Console.WriteLine(sb.ToString());
    private enum ThreadResultIndex
    AddCt,
    AddFailCt,
    TryAddSucceedCt,
    TryAddFailCt
    Federico Navarrete

    The array that you're calling Monitor.Enter under is not always the same array that you call Monitor.Exit on. When you resize an array using Array.Resize, you pass the variable in as a reference parameter (ref). The method then creates a
    new array object and assigns it to the array variable. Then, when you leave the synchronization block after resizing the array, your Monitor.Exit uses the new array rather than the one it originally entered
    and... boom.
    Instead of locking on the array itself, create a new private readonly field of type Object called "lock" within the SmartArray class and use that to lock on. It doesn't
    need to be readonly, but the keyword will prevent you from accidentally introducing this issue again.

  • How to get string which is return from a method and method is called from a filter

    Can anyone please guide me how i will get a string on a template, this string value is return by method which is called through 'ValidateStandered' filter.
    My problem is when i CheckIn a document, i am implementing some validation of duplicated document and duplicated document is identified by some metadata value.
    if metadata value of CheckIn document(current document) is same with existing document then filter will return ddocname and ddoctitle of existing document on a template(user can see the ddocname of existing item).

    please find error logs also:
    intradoc.data.DataException: !csDbCouldNotBind,getValueOfDuplicateDocument
            at intradoc.jdbc.JdbcQueryUtils.buildQuery(JdbcQueryUtils.java:107)
            at intradoc.jdbc.JdbcWorkspace.buildQuery(JdbcWorkspace.java:736)
            at intradoc.jdbc.JdbcWorkspace.createResultSet(JdbcWorkspace.java:639)
            at CheckInRestrictionFilter.CheckInRestrictionFilter.getResultSet(CheckInRestrictionFilter.java:108)
            at CheckInRestrictionFilter.CheckInRestrictionFilter.doFilter(CheckInRestrictionFilter.java:57)
            at intradoc.shared.PluginFilters.filterWithAction(PluginFilters.java:114)
            at intradoc.shared.PluginFilters.filter(PluginFilters.java:68)
            at intradoc.server.DocServiceHandler.validateStandard(DocServiceHandler.java:1251)
            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:597)
            at intradoc.common.IdcMethodHolder.invokeMethod(IdcMethodHolder.java:86)
            at intradoc.common.ClassHelperUtils.executeMethodReportStatus(ClassHelperUtils.java:324)
            at intradoc.server.ServiceHandler.executeAction(ServiceHandler.java:79)
            at intradoc.server.Service.doCodeEx(Service.java:620)
            at intradoc.server.Service.doCode(Service.java:592)
            at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1693)
            at intradoc.server.Service.doAction(Service.java:564)
            at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1483)
            at intradoc.server.Service.doActions(Service.java:559)
            at intradoc.server.ServiceRequestImplementor.executeSubServiceCode(ServiceRequestImplementor.java:1346)
            at intradoc.server.Service.executeSubServiceCode(Service.java:4109)
            at intradoc.server.ServiceRequestImplementor.executeServiceEx(ServiceRequestImplementor.java:1222)
            at intradoc.server.Service.executeServiceEx(Service.java:4104)
            at intradoc.server.Service.executeService(Service.java:4088)
            at intradoc.server.Service.doSubService(Service.java:3998)
            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:597)
            at intradoc.common.IdcMethodHolder.invokeMethod(IdcMethodHolder.java:86)
            at intradoc.common.ClassHelperUtils.executeMethodEx(ClassHelperUtils.java:310)
            at intradoc.common.ClassHelperUtils.executeMethod(ClassHelperUtils.java:295)
            at intradoc.server.Service.doCodeEx(Service.java:637)
            at intradoc.server.Service.doCode(Service.java:592)
            at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1693)
            at intradoc.server.Service.doAction(Service.java:564)
            at intradoc.server.Service.doScriptableAction(Service.java:4050)
            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:597)
            at intradoc.common.IdcMethodHolder.invokeMethod(IdcMethodHolder.java:86)
            at intradoc.common.ClassHelperUtils.executeMethodEx(ClassHelperUtils.java:310)
            at intradoc.common.ClassHelperUtils.executeMethod(ClassHelperUtils.java:295)
            at intradoc.server.Service.doCodeEx(Service.java:637)
            at intradoc.server.Service.doCode(Service.java:592)
            at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1693)
            at intradoc.server.Service.doAction(Service.java:564)
            at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1483)
            at intradoc.server.Service.doActions(Service.java:559)
            at intradoc.server.ServiceRequestImplementor.executeActions(ServiceRequestImplementor.java:1415)
            at intradoc.server.Service.executeActions(Service.java:545)
            at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:751)
            at intradoc.server.Service.doRequest(Service.java:1974)
            at intradoc.server.ServiceManager.processCommand(ServiceManager.java:486)
            at intradoc.server.IdcServerThread.processRequest(IdcServerThread.java:265)
            at intradoc.idcwls.IdcServletRequestUtils.doRequest(IdcServletRequestUtils.java:1355)
            at intradoc.idcwls.IdcServletRequestUtils.processFilterEvent(IdcServletRequestUtils.java:1732)
            at intradoc.idcwls.IdcIntegrateWrapper.processFilterEvent(IdcIntegrateWrapper.java:223)
            at sun.reflect.GeneratedMethodAccessor130.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at idcservlet.common.IdcMethodHolder.invokeMethod(IdcMethodHolder.java:87)
            at idcservlet.common.ClassHelperUtils.executeMethodEx(ClassHelperUtils.java:305)
            at idcservlet.common.ClassHelperUtils.executeMethodWithArgs(ClassHelperUtils.java:278)
            at idcservlet.ServletUtils.executeContentServerIntegrateMethodOnConfig(ServletUtils.java:1680)
            at idcservlet.IdcFilter.doFilter(IdcFilter.java:457)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
            at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
            at java.security.AccessController.doPrivileged(Native Method)
            at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
            at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
            at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
            at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
            at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
            at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
            at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
            at java.security.AccessController.doPrivileged(Native Method)
            at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
            at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
            at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
            at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
            at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3739)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3705)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
            at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2282)
            at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2181)
            at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1491)
            at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
            at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

  • Is knowing of Class Name, which called current method, possible?

    Hallo everyone,
    My method is called from inside some method of some class. Can I know which class called my method.
    In other words I would like to know is that possible to have a name of class from which my current method is called? It's sometrhing like I need an access to the call stack.
    thanks!

    You can do the same thing before 1.4 as well:
          Throwable t;
          PrintStream ps;
          PrintWriter pw;
          String str;
          StringBuffer sb;
          StringWriter st;
          t = new Throwable();
          st = new StringWriter();
          pw = new PrintWriter(st);
          t.printStackTrace(pw);
          sb = st.getBuffer();
          str = sb.toString();You now have the stack as a String in the variable str.
    The problem is that you have to parse the String to separate methods from classes and so on. And different platform may produce slightly different string representations of the stack.
    So, it is easier in Java 1.4

  • Facing problem in creating socket in a method from an already deployed application exe while same method is working from another exe from same environment from same location.

    Dll Created In: - MFC VC
    6.0
    Application Exe Developed In:
    - VC 6.0, C# and VB.net (Applications which are using dll)
    OS: - Windows XP sp2 32bit
    / Windows Server 2008 64 bit
    Problem: - Facing problem in creating socket
    in a method from an already deployed application exe while same method is working from another exe from same environment from same location.
    Description: - We have product component which
    has an exe component and from exe we invoke a method, which is defining in dll, and that dll is developed in MFC VC6.0. In the dll we have a method which downloads images from another system after making socket connection. But every time we are getting Error
    code 7, it is not giving desire result while same method is working from another exe from same environment from same location. And also me dll is deployed on many systems and giving proper output from same application.
    Already Attempt: - Because error is coming on
    client side so what we did, we created a driver in C# which invokes same method from same environment(on client machine) using same dll and we are astonished because it worked fine there.
    Kindly Suggest: -
    We are not able to figure out root cause because nothing is coming in windows event logs but what I did, for finding the problem line, I wrote logs on each line and found the exact line in application exe which is not working,
    actually  it is not executing Create () method,
    I will give snippet of the code for understanding the problem because we are not finding any kind solution for it.
    Kindly assist us in understanding and fixing this problem.
    Code Snippet: -
    Int Initialize (LPTSTR SiteAddress, short PortId)
    try
    CClientTSSocket *m_pJtsSockto;
    m_pJtsSockto = new CClientTSSocket;
    LONG lErr = m_pJtsSockto->ConnectTS(csIPAddress,PortId);
    ErrorLog (0, 0, "--------ConnectTS has been called ------------","" );
    catch(...)
    DWORD errorCode = GetLastError();
    CString errorMessage ;
    errorMessage.Format("%lu",errorCode);
    ErrorLog (0, 0, "Image System", (LPTSTR)(LPCTSTR)errorMessage);
    return  IS_ERR_WINDOWS;
    Note: -
    CClientTSSocket extends CAsyncSocket
     IS_ERR_WINDOWS is a macro error code which value I found 7.
    LONG ConnectTS(CString strIP, UINT n_Port)
    ErrorLog(0,0,"ConnectTS is calling Create [is going to call]","");
    if(!Create())
    ErrorLog(0,0,"ConnectTS is calling [Create not called successfully] ","");
     n_Err = GetLastError();
     ErrorLog(n_Err,0,"ConnectTS is calling1111111111111111Erorrrrrrrrrrrrr","");
    return NET_INIT;
    ErrorLog(0,0,"ConnectTS is calling2222222222222222222","");
    if(!AsyncSelect(0))
    n_Err = GetLastError();
    return NET_INIT;
    if(!Connect(strIP,n_Port))
    n_Err = GetLastError();
    ErrorLog(n_Err,0,"ConnectTS","");
    return SERVER_NOT_CONNECTED;
    Code description: -
    From
    int GETImage_MT() method we call Initialize() method and pass client machine IP and Port and there we call
    ConnectTS() method, In this method we Create() method and finally it returns the error code as mention in macro 7.
    Logs after running the program: -
    --------ConnectTS has been called ------------
    ConnectTS is calling Create [is going to call]
    Image System 
    0
    Note: - According to logs, problem is coming in Create method().
    Here 0 is errorMessage received in catch block. And from catch block it returns macro value 7. And when we run same method individually from same machine, same environment through same dll
    from different exe, it is working fine and we are facing any kind of problem. While same problem application was working properly earlier but now continuously it showing problem.
     Kindly assist us to resolve the issue.

    Pointer variable was already initialized; I have mention in code; kindly assist us.
    Dll Created In: - MFC VC 6.0
    Application Exe Developed In: - VC 6.0, C# and VB.net (Applications which are using dll)
    OS: - Windows XP sp2 32bit / Windows Server 2008 64 bit
    Problem: - Facing problem in creating socket
    in a method from an already deployed application exe while same method is working from another exe from same environment from same location.
    Description: - We have product component
    which has an exe component and from exe we invoke a method, which is defining in dll, and that dll is developed in MFC VC6.0. In the dll we have a method which downloads images from another system after making socket connection. But every time we are getting
    Error code 7, it is not giving desire result while same method is working from another exe from same environment from same location. And also me dll is deployed on many systems and giving proper output from same application.
    Already Attempt: - Because error is coming
    on client side so what we did, we created a driver in C# which invokes same method from same environment (on client machine) using same dll and we are astonished because it worked fine there.
    Kindly Suggest:
    - We are not able to figure out root cause because nothing is coming in windows event logs but what I did, for finding the problem line, I wrote logs on each line and found the exact line in application exe which is not
    working, actually it is not executing Create () method, I will give snippet of the code for understanding
    the problem because we are not finding any kind solution for it. Kindly assist us in understanding and fixing this problem.
    Code Snippet: -
    Int Initialize (LPTSTR SiteAddress, short PortId)
    try
    CClientTSSocket *m_pJtsSockto;
    m_pJtsSockto = new CClientTSSocket;
    LONG lErr = m_pJtsSockto->ConnectTS(csIPAddress,PortId);
    ErrorLog (0, 0, "--------ConnectTS has been called ------------","" );
    catch(...)
                       DWORD errorCode = GetLastError();
                       CString errorMessage ;
                       errorMessage.Format("%lu",errorCode);
                       ErrorLog (0, 0, "Image System", (LPTSTR)(LPCTSTR)errorMessage);
                       return  IS_ERR_WINDOWS;
    Note: - CClientTSSocket extends CAsyncSocket
     IS_ERR_WINDOWS is a macro error code which value I found 7.
    LONG ConnectTS(CString strIP, UINT n_Port)
              ErrorLog(0,0,"ConnectTS is calling Create [is going to call]","");
              if(!Create())
                       ErrorLog(0,0,"ConnectTS is calling [Create not called successfully] ","");
              n_Err = GetLastError();
              ErrorLog(n_Err,0,"ConnectTS is calling1111111111111111Erorrrrrrrrrrrrr","");
                      return NET_INIT;
              ErrorLog(0,0,"ConnectTS is calling2222222222222222222","");
              if(!AsyncSelect(0))
                       n_Err = GetLastError();
                       return NET_INIT;
              if(!Connect(strIP,n_Port))
                       n_Err = GetLastError();
                       ErrorLog(n_Err,0,"ConnectTS","");
                       return SERVER_NOT_CONNECTED;
    Code description: - From int GETImage_MT() method
    we call Initialize() method and pass client machine IP and Port and there we call ConnectTS() method, In
    this method we Create() method and finally it returns the error code as mention in macro 7.
    Logs after running the program: -
    --------ConnectTS has been called ------------
    ConnectTS is calling Create [is going to call]
    Image System  0
    Note: - According to logs, problem is coming in Create method(). Here
    0 is errorMessage received in catch block. And from catch block it returns macro value 7. And when we run same method individually from same machine, same environment through same dll from different exe, it is working fine and we are facing any kind of problem.
    While same problem application was working properly earlier but now continuously it showing problem.
     Kindly assist us to resolve the issue.

  • Error while updating data using session and call transaction method

    Hi all,
        i have to update data using MM01 transaction from flat file to database.i have used both session method and call transaction method to do that.in both the methods data has been transferred from internal tables to screens but while updating the data that is by clicking the ok-code at the end of the transaction iam getting a dialogue box stating
       SAP EXPRESS DOCUMENT "UPDATE WAS TERMINATED" RECEIVED FROM AUTHOR "SAP".
      please tell whether the problem lies and solution for that.
                                       thanks and regards.

    hi,
    check your recording.check whether u saved your material no in recording or not.
    once again record the transacton mm01.
           MATNR LIKE RMMG1-MATNR,
           MBRSH LIKE RMMG1-MBRSH,
           MTART LIKE RMMG1-MTART,
           MAKTX LIKE MAKT-MAKTX,
           MEINS LIKE MARA-MEINS,
           MATKL LIKE MARA-MATKL,
           BISMT LIKE MARA-BISMT,
           EXTWG LIKE MARA-EXTWG,
    these are the fields which u have to take in internal table.
    this is the record which i took in my flatfile.use filetype as asc and hasfieldseperator as 'X'.
    SUDHU-6     R     ROH     MATSUDHU     "     001     7890     AA
    i did the same.but i didn't get any error.

  • How to call a Method in a Program?

    Hello,
    I am very new to the ABAP world.  I have been given a task to call a method if_hrbas_plain_infotype_access~read_single from the class CL_HRBAS_PLAIN_INFOTYPE_ACCESS in a program to see if we can use it to display some employee information.  I don't know how to call a method in a program.  Can somebody please provide me some pseudo code or instructions?
    Thanks.

    Hi Shan,
    here is the code to call a method. while calling the method Instance as 'r_info' which is the type reference to class as specified.
    pass the values to exporting parameters plvar,otype,objid...etc  according  to the requirement
    infotypes: 0002.   " creates an internal table p0002.
    data:
    r_info type ref to CL_HRBAS_PLAIN_INFOTYPE_ACCESS.
    TRY.
    CALL METHOD r_info->if_hrbas_plain_infotype_access~read
       EXPORTING
         plvar           = 
         otype           =
         objid           =
         istat           =
         infty           =
    *     SUBTY           =
         begda           =
         endda           =
         no_auth_check   =  'X'
         message_handler =
       IMPORTING
         PNNNN_TAB       = P0002
    *     HRTNNNN_TAB     =
    *     IS_OK           =
      CATCH CX_HRBAS_VIOLATED_ASSERTION .
    ENDTRY.
    LOOP AT P0002.
          WRITE:/
            P0002-VORNA,
            P0002-NCHMC,
            P0002-NACHN.
        ENDLOOP.
    Regards

  • Calling applet methods in forms - Problem

    I have an applet method wich creates a modal dialogue to retrieve user pin. This method is called from a form button. When the user is finished entering PIN, and the dialogue is supposed to close, it hangs. When using a button in an applet frame, this works fine, but apparently it doesent when I use my form button. Anybody have a workaround or solution to my problem?

    i guess the problem is that you can't do anything in the applet outside the dialog if it is modal and visible.
    Propably you should not make your dialog modal and just let it set a boolean variable when it is finished and keep the rest of the applet waiting for an answer with domething like:
    while(dialogstillopen)
    boolean dummy=false;

  • Returning arrays from methods

    Hello,
    I'm trying to write a program that is structured like this;
    - The first method gets the user to enter 20 integers, which are stored in an array.
    - This method is then supposed to return this array.
    - The main method calls the first method (the one with the array).
    - The main method then calls another method which finds the highest value in the array passed to it (from the initial method) and then prints this value.
    I've tried for about 2 hours now though, and can't get it to return the array.
    Bear in mind I'm a novice at Java. I'll put my code below. Any help on this would be really appreciated because I'm totally stumped.
    public class part1
         static int counter=20;
         public static void enterMarks()
                   int classMarks[] = new int[20];
                   for (int i=0; i<20; i++)
                             classMarks[i] = getScannerInput.anInt("Please enter an integer value between 0 and 20 for each mark :");
                             System.out.println();
                             System.out.print("The marks entered were ");
                             for (int j=0; j<counter; j++)
                                       System.out.print(classMarks[j]+", ");
         public static void max()
    //               int[] classMarks2=classMarks;
         public static void main(String args[])
                   int[] marks=enterMarks();
    }Can someone tell me how I need to alter this so that the first method will return the array? Thanks in advance.

    Thanks for all the help so far everyone, I'm finally getting somewhere, but I've another problem. Here's my current code:
         static int counter=20;
         public static int[] enterMarks()
                   int classMarks[]= new int[counter];
                   for (int i=0; i<counter; i++)
                             classMarks[i] = getScannerInput.anInt("Please enter an integer value between 0 and 20 for each mark :");
                             System.out.println();
                             System.out.print("The marks entered were ");
                             for (int j=0; j<counter; j++)
                                       System.out.print(classMarks[j]+", ");
                                  return classMarks;     
         public static int max(int arr[])
                   int[] marks = classMarks;
                   int tempStore=0;
                   for (int k=0;k<counter;k++)
                        if(marks[k]>marks[k+1])
                        tempStore=marks[k];
                   return tempStore;
         public static void main(String args[])
                   int[] marks = enterMarks();
    }When I try to compile that, I'm told that the variable classMarks may not have been initialised. Surely it should be getting classMarks from the first method now that the first method is set up to return the array?

  • Mappimg and updation in bdc 'session ' and 'call transaction' methods

    What will happen if error record comes while updating in session method and call transaction method.

    Hi,
    If any error comes in Session method U can find that error in SM35->Log
    and updste again database for those enteries
    In cll transaction Method U have to handel error manually . for this u have to use structure BDCMSGCOL and Table T100.
    Regards
    Gaurav

Maybe you are looking for

  • Only the first page of a document shows in the iphone app

    The Creative Cloud shows the documents I've saved, but when I open them, I can only look at the first page.  If I scroll down, there's nothing more there.  If I scroll left/right, it moves between documents.  I'm probably missing something very basic

  • Does appleTV support HD 1080p ?

    hello is 1080p supported by the AppleTv? thx

  • Information about Smartform

    Hi All, We are presently working with SRM 4.0 with extended classic scenario . I want to know the following things about PO output smartforms. 1)Regarding PO output smartform :  in u2018smartformsu2019 transciation system is showing many  smartforms

  • "time" dimension modeling quandary

    hello folks, I am looking at a solution to build a model around a date & time dimension that would be scalable, for a tabular model, for a 24/7 business.  From a scalability standpoint and number of records (in the hundreds of millions), splitting th

  • Nao sei mas mina senha para redefinir meu iPad oque fazer ?

    Perdí a senha de redefiniçao do meu iPad com procedimiento a se fazer ?