Trying to create object of a class within servlet - help!!

I have created and compiled the following classes within
C:\bea\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\classes
1)LoginServlet
2)LoginManager
3)I have LoginServlet trying to create an object of type LoginManager, very simple,
but I get the following errors:
Cannot resolve symbol: LoginManager lm = new LoginManager();
^
Cannot resolve symbol: LoginManager lm = new LoginManager();
^
4)I have the .java and .class files located within the same directory, so I don't
see what's wrong here??? HELP!
LoginManager looks like:
public class LoginManager {
public boolean authenticateUser(String username, String password){
          boolean status = false;
//simple code for string matching
          return status;
LoginServlet looks like:
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class LoginServlet extends HttpServlet {
     // Constructors
     // Variables
     public static final String CONTENT_TYPE = "text/html";
     public boolean LOGIN_STATUS;
     // Methods
     public void service (HttpServletRequest req, HttpServletResponse res)
          throws IOException {
          String username = "";
          String password = "";
          LoginManager lm = new LoginManager();
          username = req.getParameter("username");
          password = req.getParameter("password");
          LOGIN_STATUS = lm.authenticateUser(username, password);
          res.setContentType(CONTENT_TYPE);
          PrintWriter out = res.getWriter();
          out.println("<html><head><title>Hello World</title></head>" +
                         "<body>Hello! Your login status is " + LOGIN_STATUS +
                         "</body>" +
                         "</html>");
     public void init (ServletConfig config) throws ServletException {
          super.init(config);

Do you have . in the CLASSPATH when compiling your servlet?
ron <[email protected]> wrote:
I have created and compiled the following classes within
C:\bea\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\classes
1)LoginServlet
2)LoginManager
3)I have LoginServlet trying to create an object of type LoginManager, very simple,
but I get the following errors:
Cannot resolve symbol: LoginManager lm = new LoginManager();
^
Cannot resolve symbol: LoginManager lm = new LoginManager();
^
4)I have the .java and .class files located within the same directory, so I don't
see what's wrong here??? HELP!
LoginManager looks like:
public class LoginManager {
public boolean authenticateUser(String username, String password){
          boolean status = false;
//simple code for string matching
          return status;
LoginServlet looks like:
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class LoginServlet extends HttpServlet {
     // Constructors
     // Variables
     public static final String CONTENT_TYPE = "text/html";
     public boolean LOGIN_STATUS;
     // Methods
     public void service (HttpServletRequest req, HttpServletResponse res)
          throws IOException {
          String username = "";
          String password = "";
          LoginManager lm = new LoginManager();
          username = req.getParameter("username");
          password = req.getParameter("password");
          LOGIN_STATUS = lm.authenticateUser(username, password);
          res.setContentType(CONTENT_TYPE);
          PrintWriter out = res.getWriter();
          out.println("<html><head><title>Hello World</title></head>" +
                         "<body>Hello! Your login status is " + LOGIN_STATUS +
                         "</body>" +
                         "</html>");
     public void init (ServletConfig config) throws ServletException {
          super.init(config);
Dimitri

Similar Messages

  • Create Object of "ObjectName" Class by giving only Domain Name.

    Hie,
    I want to create Object of "ObjectName" class without specifying its key value properties, but i want to only specify the domain name.
    For eg:
    ObjectName on=new ObjectName("jboss.ws4ee:*"); here jboss.ws4ee is the domain name and after colon(:) will come the key value properties.. i dont want to specify that because i want the list of all mbeans coming under this domain i.e. jboss.ws4ee
    So anyone can plzzz help me..
    Regards.

    Hi,
    What were you trying to do with that name?
    ObjectName on=new ObjectName("jboss.ws4ee:*");
    You cannot create an MBean with such an ObjectName. You can only
    use it as first argument to queryNames() and queryMBeans();
    If you want to get the attributes of all jboss MBeans then you will need to
    do something like that:
    final ObjectName pattern=new ObjectName("jboss.ws4ee:*");
    for (ObjectName o : server.queryNames(pattern,null)) {
        System.out.println("MBean:  " + o);
        for (MBeanAttributeInfo info : server.getMBeanInfo(o).getAttributes()) {
             final String attrname = info.getName();
             System.out.println("\t"+attrname+"="+server.getAttribute(o,attrname));
    }(disclaimer: this code was eyed-compiled)
    hope this helps,
    -- daniel
    JMX, SNMP, Java, etc...
    http://blogs.sun.com/jmxetc

  • How to create object by getting class name as input

    hi
    i need to create object for the existing classes by getting class name as input from the user at run time.
    how can i do it.
    for exapmle ExpnEvaluation is a class, i will get this class name as input and store it in a string
    String classname = "ExpnEvaluation";
    now how can i create object for the class ExpnEvaluation by using the string classname in which the class name is storted
    Thanks in advance

    i think we have to cast it, can u help me how to cast
    the obj to the classname that i get as inputThat's exactly the point why you shouldn't be doing this. You can't have a dynamic cast at compile time already. It doesn't make sense. Which is also the reason why class.forName().newInstance() is a very nice but also often very useless tool, unless the classes loaded all share a mutual interface.

  • Error trying to create object of Class IUSer

    I am trying to put in a code that is based on Rle assignment for the user on the portal.
    i am trying to put this code
    IWDClientUser user = WDClientUser.getCurrentUser();
    IUser userID = user.getSAPUser();
    String Userrole=new String();
    for (Iterator iter = userID.getRoles(true); iter.hasNext();) {
    IRole role = UMFactory.getRoleFactory().getRole((String) iter.next());
    Userrole=role.getUniqueName();
    But there is an error in line IUser userID = user.getSAPUser();.
    when i say add imports it is not adding the packages required to cretae an object of this class.
    When i try to manually import
    com.sap.security.api.sda
    but am not able to.. any ideas how to acheive this and assist me if i am doing anything worng?
    regards
    Sam

    Austin,
    Sorry for asking the basic questions.This is what i am doing. I went to DC, right clicked on it and selected properties. Then select JAva build path opition and then select Libraries. There i click on Add External JARs and select com.sap.security.api.jar.
    and click ok.
    do i need to do anything else here.
    And when ever i come back after a while i see that the external
    Jar is missing. IT looks weird. I have to keep on importing the external JAr after every few operations.
    Not sure what the problem could be
    thanks a lto for your patience in helping me ou ton this issue
    Below is the erro rmessage i get when trying to activate
    Build number assigned: 165853
    Change request state from QUEUED to PROCESSING
    ACTIVATION request in Build Space "DJI_EMXSSTR_D" at Node ID: 37,961,750
         [id: 165,817; parentID: 0; type: 4]
         [options: FORCE ACTIVATE PREDECESSORS]
    REQUEST PROCESSING started at 2007-04-17 22:13:46.500 GMT
    ===== Pre-Processing =====
    Waiting 19 ms
    List of activities to be activated:
         1 activity in compartment "sap.com_SAP_ESS_1"
              ESS_lea_1005
                   [seq. no 272][created by RJOGAM at 2007-04-17 18:14:26.0][ID 06c9c16aed2511dbafd000306e5ddf50]
    Analyse dependencies to predecessor activities... started at 2007-04-17 22:13:47.253 GMT
    Analysing predecessors in compartment "sap.com_SAP_ESS_1"
         The following predecessor has to be added to request 165817:
              "XSS_lea_selectionlistview_1003"   [seq. no 271][created by RJOGAM at 4/17/07 1:34 PM][ID 53225486ec4c11db812200306e5ddf50]
    Analyse dependencies to predecessor activities... finished at 2007-04-17 22:13:47.434 GMT and took 181 ms
    Analyse activities... started at 2007-04-17 22:13:47.434 GMT
    Development line state verification started at 2007-04-17 22:13:47.509 GMT
    Verification of the development line [ws/EMXSSTR/sap.com_SAP_ESS/dev/active/] SUCCEEDED
    Development line state verification finished at 2007-04-17 22:13:47.540 GMT and took 31 ms
    Cache verification, level 2 (Comparison of attributes) started at 2007-04-17 22:13:47.540 GMT
    Verification of the following object:
         [DC: sap.com/ess/lea, group: 0] SUCCEEDED
    Cache verification finished at 2007-04-17 22:13:47.617 GMT and took 77 ms
    Analyse dependencies to predecessor activities... finished at 2007-04-17 22:13:47.629 GMT and took 144 ms
              SKIP  : Development Component "sap.com/ess/lea"
         1 component to be build in compartment "sap.com_SAP_ESS_1"
    Analyse activities... finished at 2007-04-17 22:13:47.680 GMT and took 246 ms
    Calculate all combinations of components and variants to be built...
         "sap.com/ess/lea" variant "default"
    Prepare build environment in the file system... started at 2007-04-17 22:13:47.852 GMT
         Synchronize development configuration... finished at 2007-04-17 22:13:47.862 GMT and took 10 ms
         Synchronize component definitions... finished at 2007-04-17 22:13:47.883 GMT and took 20 ms
         Synchronize sources...
    Development line state verification started at 2007-04-17 22:13:47.970 GMT
    Verification of the development line [ws/EMXSSTR/sap.com_SAP_ESS/dev/active/] SUCCEEDED
    Development line state verification finished at 2007-04-17 22:13:48.011 GMT and took 41 ms
    Cache verification, level 2 (Comparison of attributes) started at 2007-04-17 22:13:48.011 GMT
    Verification of the following object:
         [DC: sap.com/ess/lea, group: 1] FAILED
    Comparison of cache items on the paths:
         [/usr/sap/DJI/JC03/j2ee/cluster/server0/temp/CBS/33/.CACHE/1195/DCs/sap.com/ess/lea/_comp/src/packages/com/sap/xss/hr/lea/selectionlist/SelectionListView.wdcontroller]
         [ws/EMXSSTR/sap.com_SAP_ESS/dev/active/DCs/sap.com/ess/lea/_comp/src/packages/com/sap/xss/hr/lea/selectionlist/SelectionListView.wdcontroller]
    on verification level 2 FAILED due to the following reason:
    Difference in attribute 'Timestamp' [Thu Mar 01 16:49:43 EST 2007][Thu Mar 01 16:49:44 EST 2007]
    Comparison of cache items on the paths:
         [/usr/sap/DJI/JC03/j2ee/cluster/server0/temp/CBS/33/.CACHE/1195/DCs/sap.com/ess/lea/_comp/src/packages/com/sap/xss/hr/lea/selectionlist/SelectionListView.wdcontroller.xlf]
         [ws/EMXSSTR/sap.com_SAP_ESS/dev/active/DCs/sap.com/ess/lea/_comp/src/packages/com/sap/xss/hr/lea/selectionlist/SelectionListView.wdcontroller.xlf]
    on verification level 2 FAILED due to the following reason:
    Difference in attribute 'Timestamp' [Thu Mar 01 16:49:43 EST 2007][Thu Mar 01 16:49:44 EST 2007]
    Comparison of cache items on the paths:
         [/usr/sap/DJI/JC03/j2ee/cluster/server0/temp/CBS/33/.CACHE/1195/DCs/sap.com/ess/lea/_comp/src/packages/com/sap/xss/hr/lea/selectionlist/SelectionListView.wdview]
         [ws/EMXSSTR/sap.com_SAP_ESS/dev/active/DCs/sap.com/ess/lea/_comp/src/packages/com/sap/xss/hr/lea/selectionlist/SelectionListView.wdview]
    on verification level 2 FAILED due to the following reason:
    Difference in attribute 'Timestamp' [Thu Mar 01 16:49:43 EST 2007][Thu Mar 01 16:49:44 EST 2007]
    Comparison of cache items on the paths:
         [/usr/sap/DJI/JC03/j2ee/cluster/server0/temp/CBS/33/.CACHE/1195/DCs/sap.com/ess/lea/_comp/src/packages/com/sap/xss/hr/lea/selectionlist/SelectionListView.wdview.xlf]
         [ws/EMXSSTR/sap.com_SAP_ESS/dev/active/DCs/sap.com/ess/lea/_comp/src/packages/com/sap/xss/hr/lea/selectionlist/SelectionListView.wdview.xlf]
    on verification level 2 FAILED due to the following reason:
    Difference in attribute 'Timestamp' [Thu Mar 01 16:49:43 EST 2007][Thu Mar 01 16:49:44 EST 2007]
    Cache verification finished at 2007-04-17 22:13:54.824 GMT and took 6 s 813 ms
         Synchronize sources... finished at 2007-04-17 22:14:02.175 GMT and took 14 s 292 ms
         Synchronize used libraries...
              public part "default" of component "sap.com/tc/col/api" ... OK
                   [PP "default" of DC 226 variant "default"][SC 1196][last successful build: 162348]
              public part "default" of component "sap.com/tc/cmi" ... OK
                   [PP "default" of DC 217 variant "default"][SC 1196][last successful build: 164158]
              public part "default" of component "sap.com/tc/ddic/ddicruntime" ... OK
                   [PP "default" of DC 218 variant "default"][SC 1196][last successful build: 164158]
              public part "default" of component "sap.com/tc/wd/webdynpro" ... OK
                   [PP "default" of DC 196 variant "default"][SC 1192][last successful build: 162348]
              public part "default" of component "sap.com/tc/logging" ... OK
                   [PP "default" of DC 184 variant "default"][SC 1192][last successful build: 162348]
              public part "default" of component "sap.com/com.sap.aii.proxy.framework" ... OK
                   [PP "default" of DC 221 variant "default"][SC 1196][last successful build: 164158]
              public part "default" of component "sap.com/com.sap.aii.util.misc" ... OK
                   [PP "default" of DC 222 variant "default"][SC 1196][last successful build: 162348]
              public part "default" of component "sap.com/com.sap.mw.jco" ... OK
                   [PP "default" of DC 126 variant "default"][SC 1192][last successful build: 162348]
              public part "FloorplanManager" of component "sap.com/pcui_gp/xssfpm" ... OK
                   [PP "FloorplanManager" of DC 223 variant "default"][SC 1193][last successful build: 162556]
              public part "FloorplanManager" of component "sap.com/pcui_gp/xssfpm" ... OK
                   [PP "FloorplanManager" of DC 223 variant "default"][SC 1193][last successful build: 162556]
              public part "FloorplanManager" of component "sap.com/pcui_gp/xssfpm" ... OK
                   [PP "FloorplanManager" of DC 223 variant "default"][SC 1193][last successful build: 162556]
              public part "FloorplanManager" of component "sap.com/pcui_gp/xssfpm" ... OK
                   [PP "FloorplanManager" of DC 223 variant "default"][SC 1193][last successful build: 162556]
              public part "FPMUtils" of component "sap.com/pcui_gp/xssutils" ... OK
                   [PP "FPMUtils" of DC 224 variant "default"][SC 1193][last successful build: 162556]
              public part "FPMUtils" of component "sap.com/pcui_gp/xssutils" ... OK
                   [PP "FPMUtils" of DC 224 variant "default"][SC 1193][last successful build: 162556]
              public part "FPMUtils" of component "sap.com/pcui_gp/xssutils" ... OK
                   [PP "FPMUtils" of DC 224 variant "default"][SC 1193][last successful build: 162556]
              public part "FPMUtils" of component "sap.com/pcui_gp/xssutils" ... OK
                   [PP "FPMUtils" of DC 224 variant "default"][SC 1193][last successful build: 162556]
              public part "default" of component "sap.com/tc/ddic/metamodel/content" ... OK
                   [PP "default" of DC 219 variant "default"][SC 1196][last successful build: 162348]
              public part "default" of component "sap.com/tc/wdp/metamodel/content" ... OK
                   [PP "default" of DC 220 variant "default"][SC 1196][last successful build: 162348]
              public part "default" of component "sap.com/com.sap.exception" ... OK
                   [PP "default" of DC 123 variant "default"][SC 1192][last successful build: 162348]
              public part "default" of component "sap.com/com.sap.exception" ... OK
                   [PP "default" of DC 123 variant "default"][SC 1192][last successful build: 162348]
              public part "FcTmDataExchange" of component "sap.com/pcui_gp/tecl" ... OK
                   [PP "FcTmDataExchange" of DC 230 variant "default"][SC 1193][last successful build: 162556]
              public part "FcTmDataExchange" of component "sap.com/pcui_gp/tecl" ... OK
                   [PP "FcTmDataExchange" of DC 230 variant "default"][SC 1193][last successful build: 162556]
              public part "FcTmDataExchange" of component "sap.com/pcui_gp/tecl" ... OK
                   [PP "FcTmDataExchange" of DC 230 variant "default"][SC 1193][last successful build: 162556]
         Synchronize used libraries... finished at 2007-04-17 22:14:06.635 GMT and took 4 s 459 ms
    The source cache is in INCONSISTENT state for at least one of the request DCs. The build might produce incorrect results.
    Prepare build environment in the file system... finished at 2007-04-17 22:14:06.635 GMT and took 18 s 783 ms
    ===== Pre-Processing =====  finished at 2007-04-17 22:14:06.636 GMT and took 20 s 117 ms
    Waiting 33 ms
    ===== Processing =====
    BUILD DCs
         "sap.com/ess/lea" in variant "default"
              .. FAILURE: The build failed due to compilation errors. See build log for details. [result code: 202]
    ===== Processing =====  finished at 2007-04-17 22:16:01.800 GMT and took 1 m 55 s 131 ms
    ===== Post-Processing =====
    Waiting 12 ms
    Check whether build was successful for all required variants...
         "sap.com/ess/lea" in variant "default"   FAILED
    ===== Post-Processing =====  finished at 2007-04-17 22:16:01.815 GMT and took 3 ms
    Change request state from PROCESSING to FAILED
    ERROR! The following problem(s) occurred  during request processing:
    ERROR! The following error occurred during request processing:Activation FAILED due to build problems. See build logs for details.
    REQUEST PROCESSING finished at 2007-04-17 22:16:01.824 GMT and took 2 m 15 s 324 ms
    sam
    Message was edited by:
            sameer chilama
    Message was edited by:
            sameer chilama

  • Create  object for a class in jar file

    Hi
    I am using Oracle JDeveloper 10g. I have created a main application using Swing/JClient technologies. I am facing a problem for the past one week. I let u all people know my problem and I kindly request you to send a solution if known possibly confirmed.
    Problem: I have created a main application using swing that class extends JFrame. This main application consists of two parts. One left side panel and one right side panel. Left side panel contains JTree component. Each item in that tree refers to a class file located in a separate jar file.i.e that acts as a separate application. If we are executing separately that jar file class, I am able to see that small application running. If I am selecting an item in JTree during runtime, I should place that small application from the respective jar file in the right side panel of the main application. I can locate the jar file and even I can create object to that particular class file. But I cannot execute the application even separately and also not able to place in the right side panel of the main application.
    Note: The small application from the jar file contains one class file containing main method. That class file extends JPanel and implements JUPanel. i.e., with data binding. I am trying to create an object for this class file with data binding from my main application. Navigation bar is used in the main class file.
    If possible can any provide me solution at the earliest. Waiting eagerly for the positive reply.
    Regards,
    s.senthilkumar

    Can you sure that there is only a A class in the classpath of Tomcat, I advise you to add
    some statements into the A class so that you can be sure which classloader is used
    to load the A class.

  • How do i create objects of ordinary Classes from a javabean

    I want to create a class Person below that I want to create an object from in my javabeans.
    Look below Person class definition for continuation.
    package data;
    public class Person
    private String name;
    public Person()
    name = "No name yet.";
    public Person(String initialName)
    name = initialName;
    public void setName(String newName)
    name = newName;
    public String getName()
    return name;
    public void writeOutput()
    System.out.println("Name: " + name);
    public boolean sameName(Person otherPerson)
    return (this.name.equalsIgnoreCase(otherPerson.name));
    I run this bean class in the WEB-INF/classes/data folder creating a Person object in the deal() method below
    When I compile the class it seems to fail. It does not recognise the Person class. Can you help me with a description of what to do to call
    ordinary class objects from javabean class definitions.
    What directories should the simple classes be put and what should I include in the javabean to be able to access them?
    package data;
    import java.sql.*;
    import data.*;
    public class Bean
    { private Connection databaseConnection ;
    // private Person p;
    public Bean()
    super();
    public boolean connect() throws ClassNotFoundException, SQLException
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String sourceURL = "jdbc:odbc:robjsp";
    databaseConnection = DriverManager.getConnection(sourceURL);
    return true;
    public ResultSet execquery(String restrict) throws SQLException
    Statement statement = databaseConnection.createStatement();
    String full = "SELECT customerid,CITY,Address from customers " + restrict;
    ResultSet authorNames = statement.executeQuery(full);
    return (authorNames ==null ) ? null : authorNames;
    public String deal() throws SQLException
    {  Person p = new Person();
    p.setName("Roberto");
    return p.getName();
    }

    There is no "Copy File" function in Lightroom.
    Lightroom was designed to eliminate the need to make duplicate copies of files. The organizational tools in Lightroom allow you to have one file categorized in many ways, you can assign multiple keywords to the photos (for example: Winery, Finger Lakes, Fall Foliage, Jessica). Similarly, you can have a file categorized in multiple Lightroom collections at the same time, all without making a copy of the photo. The benefit of this is that you don't need to make multiple copies of each photo, one copy suffices, and thus disk space is saved; and furthermore if you should edit a photo or add metadata, you only need to do this once, and the photo's appearance, or the photo's metadata is changed, and visible to you no matter how you choose to access the photo (pick any keyword or any collection and you will see the change)

  • Dinamically create objects of distinct classes

    I need to create a method that return and object of the class that indicated in a parameter.
    I'm not sure if this topic is related to factory pattern.
    I've a class: Parent
    I've some classes: Child1, Child2, ... ChildN that extends class Parent.
    And I want something like this:
    public object CreateChild(String typeofclass)
    { // string typeofclass can contains "child1", "child2" ...
    typeofclass c;
    (typeofclass) c = new typeofclass();
    return c:
    I don't want to make something like:
    public object CreateClild(Strint typeofclass)
    { if typeofclass.equals ("Clild1");
    c = new Clild1();
    if typeofclass.equals ("Clild2");
    c = new Clild2();
    if typeofclass.equals ("ClildN");
    c = new ClildN();
    return c:
    Thanks in advance.
    Julio Pe�uela Gil
    Barcelona University
    ********************

    Extending this a little bit... i have a similiar thing I want to do.
    I have my class Item, and i have a few classes that extend it. I need to be able to read a list of Item's from a Vector and get the datafield 'type' from the Item class. Based on what this 'type' is, i would make the Item from the Vector the child class of 'type'. I would like to know if this is possible, and if i can do the reverse.
    Thanks,
    CoW

  • Create objects of distinct classes dinamically

    I need to create a method that return and object of the class that indicated in a parameter.
    I'm not sure if this topic is related to factory pattern.
    I've a class: Parent
    I've some classes: Child1, Child2, ... ChildN that extends class Parent.
    And I want something like this:
    public object CreateChild(String typeofclass)
    { // string typeofclass can contains "child1", "child2" ...
    typeofclass c;
    (typeofclass) c = new typeofclass();
    return c:
    I don't want to make something like:
    public object CreateClild(Strint typeofclass)
    { if typeofclass.equals ("Clild1");
    c = new Clild1();
    if typeofclass.equals ("Clild2");
    c = new Clild2();
    if typeofclass.equals ("ClildN");
    c = new ClildN();
    return c:
    Thanks in advance.
    Julio Pe�uela Gil
    Barcelona University

    public Parent createChild (String typeOfClass) throws Exception
      Class c = Class.forName(typeOfClass);
      return (Parent)c.newInstance();
    }have a look at [url http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Class.html]java.lang.Class and the [url http://java.sun.com/j2se/1.4.1/docs/api/java/lang/reflect/package-summary.html]java.lang.reflect package in the API

  • POWL- Create object for feeder class not found

    Hi,
    I have developed a Webdynpro application and tried to integrate to POWL, but the application dumps saying cretae object of feeder class is not found.
    I am new to POWL, can anybody help me in this regard.
    Thanks,
    Shailaja Ainala.

    - in se80 you need this kind of code
        AUTHORITY-CHECK OBJECT 'Z:CPRO_RAP'
        ID 'ZZ_MARKDIV_test' FIELD record-string+0(3)
        ID 'ACTVT'      FIELD '02'.                                         "change access
        IF sy-subrc <> 0.
          AUTHORITY-CHECK OBJECT 'Z:CPRO_RAP'
          ID 'ZZ_MARKDIV_test' FIELD record-string+0(3)
          ID 'ACTVT'      FIELD '03'.                                      "read only access
          IF sy-subrc = 0.
            is_allowed = abap_true.
          ENDIF.
        ELSE.
          is_allowed = abap_true.
        ENDIF.
    security team should setup the POWL
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/44/36ca0563df660ee10000000a1553f6/content.htm
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/42/d6652b755c1630e10000000a1553f7/content.htm
    so if you see the code above there is a ID and filed associated with each object.

  • Can't create new instance of class in servlet.

    I'm running Tomcat 5.5 and am trying to create a new instance of a class in a servlet. The class is an Apache Axis (1.4) proxy for a Web Service.
    Is there any particular reason this is happening, and any way to fix it?
    The stack trace is as follows:
    WARNING: Method execution failed:
    java.lang.ExceptionInInitializerError
         at org.apache.axis.utils.Messages.<clinit>(Messages.java:36)
         at org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:184)
         at org.apache.axis.configuration.EngineConfigurationFactoryFinder.access$200(EngineConfigurationFactoryFinder.java:46)
         at org.apache.axis.configuration.EngineConfigurationFactoryFinder$1.run(EngineConfigurationFactoryFinder.java:128)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:113)
         at org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:160)
         at org.apache.axis.client.Service.getEngineConfiguration(Service.java:813)
         at org.apache.axis.client.Service.getAxisClient(Service.java:104)
         at org.apache.axis.client.Service.<init>(Service.java:113)
         at server.proxies.webservicex.net.stockquote.StockQuoteLocator.<init>(StockQuoteLocator.java:12)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)

    Of course there's a particular reason it's happening. Nothing in a computer happens unless it's for a particular reason. You question ought to be what is that reason.
    Well, I don't know what it is. The class org.apache.axis.utils.Messages threw some kind of exception when it was being loaded, because <clinit> means "class initialization" in a stack trace. That would most likely be in a static initializer block in that class. I expect it is because of some mis-configuration in your system, but you'd have to read and understand the apache code to find out what. Or maybe ask over at the Axis site, where there might be a forum or a mailing list.

  • Trying to create a Invoice based on Order need help Error -5002

    the dreaded -5002 error is haunting me too! and I could not find a matching solution for this in the forum....
    I need help quickly on this. I am trying to create invoices for some orders so the Base - Target relationship is retained. The orders I pick are all Open (DocStatus   = O and the lines are all Open LineStatus = O)
    here is my code
    oInvoice.Lines.BaseEntry = 48
    oInvoice.Lines.BaseLine = 0
    oInvoice.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oOrders
    oInvoice.Lines.ItemCode = "A00001"
    oInvoice.Lines.ItemDescription = "IBM Infoprint 1312"
    'adding Line
    oInvoice.Lines.Add
    oInvoice.Lines.BaseEntry = 48
    oInvoice.Lines.BaseLine = 1
    oInvoice.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oOrders
    oInvoice.Lines.ItemCode = "A00002"
    oInvoice.Lines.ItemDescription = "IBM Inforprint 1222"
    'adding Line
    oInvoice.Lines.Add
    lRetCode = oInvoice.Add
    If lRetCode <> 0 Then
        gObjCompany.GetLastError lErrCode, sErrMsg
        MsgBox (lErrCode & " " & sErrMsg)
    End If

    Indika,
    Only set your base types...
    (not items & description)
    oInvoice.Lines.BaseEntry = 48
    oInvoice.Lines.BaseLine = 0
    oInvoice.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oOrders
    oInvoice.Lines.ItemCode = "A00001"
    oInvoice.Lines.ItemDescription = "IBM Infoprint 1312"
    'adding Line (to fill the second item line)
    ' the 1st line item is there by default
    oInvoice.Lines.Add
    oInvoice.Lines.BaseEntry = 48
    oInvoice.Lines.BaseLine = 1
    oInvoice.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oOrders
    oInvoice.Lines.ItemCode = "A00002"
    oInvoice.Lines.ItemDescription = "IBM Inforprint 1222"
    'DO NOT Add THIS line
    ' (only if you want to add a 3rd line item)
    '''oInvoice.Lines.Add -> Don't add this
    lRetCode = oInvoice.Add
    If lRetCode <> 0 Then
        gObjCompany.GetLastError lErrCode, sErrMsg
        MsgBox (lErrCode & " " & sErrMsg)
    End If
    remember to add :
    oInvoice.CardCode = "your BP"
    oInvoice.DocDueDate = Now
    oInvoiceDoc.CardCode = txtDOCBPCode.Text

  • Errors while trying to create object Tables,kindly help.Anyone,please

    Oracle 10.2g
    This is what Iam trying to do
    Creating the School Type
    CREATE TYPE type_school AS OBJECT
    (      SCHOOL               VARCHAR2(30)
    ,      VA                    NUMBER(4)
    ,      ID                    NUMBER(4)
    ,      SN                    VARCHAR2(30)) ; /Creating the School Information Type
    CREATE TYPE type_schoolInfo As OBJECT
    (      SCHOOLID               REF type_school
    ,      SCHOOLNAME          VARCHAR2(50)
    ,      PHONELIST               VARCHAR2(50)
    ,      ADDRESS ROW     ( STREETNAME VARCHAR2(30),
                          POSTCODE VARCHAR2(30))
    ,      HEADTEACHERNAME     VARCHAR2(30)
    ,      LEAPASSWORD          VARCHAR2(30)) ;
    Warning: Type created with compilation errors.
    SQL> show errors type type_schoolInfo;
    Errors for TYPE TYPE_SCHOOLINFO:
    LINE/COL ERROR
    5/29     PLS-00103: Encountered the symbol "VARCHAR2" when expecting one
             of the following:
             . ( ) , * @ % & | = - + < / > at in is mod remainder not
             range rem => .. <an exponent (**)> <> or != or ~= >= <= <>
             and or like LIKE2_ LIKE4_ LIKEC_ between || multiset member
             SUBMULTISET_
             The symbol "." was substituted for "VARCHAR2" to continue.
    6/16     PLS-00103: Encountered the symbol "VARCHAR2" when expecting one
             of the following:
             . ( ) , * @ % & | = - + < / > at in is mod remainder not
    LINE/COL ERROR
             range rem => .. <an exponent (**)> <> or != or ~= >= <= <>
             and or like LIKE2_ LIKE4_ LIKEC_ between || multiset member
             SUBMULTISET_
             The symbol "." was substituted for "VARCHAR2" to continue.Thank you.
    Edited by: Trooper on Jan 13, 2009 5:59 PM

    The problem is here
    ADDRESS ROW     ( STREETNAME VARCHAR2(30),
                          POSTCODE VARCHAR2(30))Solution
    écrit file afiedt.buf
      1  CREATE TYPE address_objtyp AS OBJECT (
      2    streetname       VARCHAR2(30),
      3*   postcode         VARCHAR2(30));
    SQL> /
    Type créé.
    SQL> edit
    écrit file afiedt.buf
      1  CREATE TYPE type_schoolInfo As OBJECT
      2  (  SCHOOLID                        REF type_school
      3  ,  SCHOOLNAME              VARCHAR2(50)
      4  ,  PHONELIST                       VARCHAR2(50)
      5  ,  ADDRESS                address_objtyp
      6  ,  HEADTEACHERNAME VARCHAR2(30)
      7* ,  LEAPASSWORD             VARCHAR2(30)) ;
    SQL> /
    Type créé.[http://www.stanford.edu/dept/itss/docs/oracle/10g/appdev.101/b10799/adobjdes.htm]
    Edited by: Salim Chelabi on 2009-01-13 13:14

  • Trying to create a football field class

    The following code is my feeble attempt to create a class to represent a football field. I want to use it in an applet. Any suggestions on how to draw it using the drawField() method? Here is the code:
    class Field
         private int length;
         private int width;
         private int endZoneDepth;
         Field()
              length = 100;
              width = 50;
              endZoneDepth = 10;
         public int getWidth()
              return width;
         public int getLength()
              return length;
         public int getEndZoneDepth()
              return endZoneDepth;
         private int getTotalLength()
              return (2 * endZoneDepth) + length;
         public void drawField()
              // Some way to draw my field to the applet screen
                    // I know this doesn't work but.....
                    g.drawRect(0, 0, getTotalLength(), width);
    }

    Well.. you need to have the Graphics object inorder to draw something,
    so why not insert a Graphics g parameter
    public void drawField(Graphics g)
    And in your applet's paint method you can simply call:
    field.drawField(g);
    So as to pass the Graphics object over to your drawField to use

  • How i create object of this class

    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.print.PrinterException;
    import java.text.MessageFormat;
    import javax.swing.JButton;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    public class vendor extends JDialog // probably best to use a JDialog, not a JFrame here
    // make some instance variables
    private String rows[][] =
    {"A", "a"},
    {"B", "b"},
    {"E", "e"}
    private String headers[] =
    "Upper", "Lower"
    private JTable table = new JTable(rows, headers);
    // here's the constructor.
    public MainClass(JFrame frame, String title, boolean modal)
    super(frame, title, modal);
    //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    JScrollPane scrollPane = new JScrollPane(table);
    add(scrollPane, BorderLayout.CENTER);
    JButton button = new JButton("Print");
    ActionListener printAction = new ActionListener()
    public void actionPerformed(ActionEvent e)
    printActionPerformed(e);
    button.addActionListener(printAction);
    add(button, BorderLayout.SOUTH);
    setPreferredSize(new Dimension(300, 150));
    //frame.setSize(300, 150);
    //frame.setVisible(true);
    private void printActionPerformed(ActionEvent e)
    try
    MessageFormat headerFormat = new MessageFormat("Page {0}");
    MessageFormat footerFormat = new MessageFormat("- {0} -");
    table.print(JTable.PrintMode.FIT_WIDTH, headerFormat,
    footerFormat);
    catch (PrinterException pe)
    System.err.println("Error printing: " + pe.getMessage());
         public static void main(String x[])
    {new vendor();}
    }

    You have to call it from a JFrame or other root container:
    import java.awt.Dimension;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    public class UseDialog extends JPanel
        private JFrame frame = null;
        private MainClass myDialog = null;
        public UseDialog(JFrame frame)
            setPreferredSize(new Dimension(300, 200));
            this.frame = frame;
            JButton showDialogBtn = new JButton("Show Dialog");
            add(showDialogBtn);
            showDialogBtn.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent e)
                    showDialogBtnAction(e);
        private void showDialogBtnAction(ActionEvent e)
            //*********** here is where it is called **************
            myDialog = new MainClass(frame, "My Dialog", true);
            myDialog.pack();
            myDialog.setVisible(true);
        private static void createAndShowGUI()
            JFrame frame = new JFrame("UseDialog Application");
            frame.getContentPane().add(new UseDialog(frame));
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.pack();
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
        public static void main(String[] args)
            SwingUtilities.invokeLater(new Runnable()
                public void run()
                    createAndShowGUI();
    }Also, when posting your code, please use code tags so that your code will be well-formatted and readable. To do this, place the tag &#91;code&#93; at the top of your block of code and the tag &#91;/code&#93; at the bottom, like so:
    &#91;code&#93;
      // your code block goes here.
    &#91;/code&#93;good luck

  • Trying to create install script in PackageMaker...help for newbie

    Hello,
    I am trying to deploy a solution as an install package. Currently, there are 3 items inside the folder that needs to be installed in the /Applications folder. This in itself is easy. However, when I create upgrades to the solution, I want to carry over one file from the previous installation to the new one. Is there a way to have this upgraded version install and instead of removing all of the earlier files, can it install the new files (which are 3) and carry over 1 of the other files.
    I hope this makes sense. Thanks for any input or sample scripts that I may be able to modify to accomplish this.
    Thanks,
    Stephen

    Thanks for your time!
    Perhaps it would help if I explain a little further my situation and what I am trying to accomplish.
    I have a database runtime solution that I want to distribute. I have all of the necessary files in a single folder, let's say, named "Progam 1.2". Since whenever I upgrade this version, I need to have the old data file from the previous version on hand to import into the new file, I create a new folder called "Program 1.3" So after the installation, I would have both folders. The user then opens the new version and the program then will import the previous versions data. At that point the user may delete the previous version folder entirely.
    My question is how can accomplish an install so that the new version will not overwrite the previous folder "Program 1.2" when installing the upgrade to "Program 1.3" since I need the data file for updating the data. Ideally, I would love to have the new folder installed and the single data file in the previous version folder be copied to the new versions folder and be renamed to "Previous Data" so that the new version can update the data.
    Again, I am a complete newbie in this arena and have simply been doing DMG files where the user copies the new version to the applications folder. But if there was a way to automate this installation more, I would like to do that.
    Thanks again for your help!
    Stephen

Maybe you are looking for

  • Customer Party Account Not displayed

    Dear All, After Saving the billing document, If I see the accounting document, The customer party account is not displayed. Instead I see a G/L account in place of my customer account. Calculations are correct but cant see the customer account. Need

  • I own more than 5 computers

    In each room in my household I have a computer hooked up to the screen to watch video and play music. With 3 computers hooked into my tv's 2 laptops and one desktop thats 6 computers and the itunes store only allows 5. Currently I have to deauthorize

  • DbgHelp fails in a Windows service

    I am trying to download debugging symbols from a .NET Windows service. The service calls a helper dll that does the actual calls into dbghelp.dll. I've found that the call to SymGetTypeFromNameW fails but GetLastError returns 0.  If I run the exact s

  • Adf Tree with checkboxes beside..

    Hi All.... I have a requirement to make an application in adf (in j dev) where in i want a tree structure, beside each node in my tree,there should be 6 coloumns with checkboxes(the checked or unchecked values should get reflected in a DB table).Is i

  • ITunes causes my Mac to restart

    Hi: Any help on this would definitely be appreciated. I am running iTunes and playing a group of songs. After some variable length of time (at least 30 min but it varies and can go for as long as a few hours), my Mac just powers down. When I restart


HashFlare