Calling a method of servlet

How to call a method of servlets like we do in struts like "get.do?method=getData". I know servlets are called defacult method either dopost or doget are called but can i call any other in the servlet and if yes how can i do that?

May be your servlet is not able to lookup the EJB. You can use some print statements and see whether lookup ok or not.
Just a guess.
Plese get back, if any queries.
Thanks,
Rakesh.

Similar Messages

  • Who calls doget() method of servlet

    hello all,
    i have typical customized webserver.
    the problem i have with that is when i configure it with IP address and when i send a request through browser using HOST NAME ,its not recognizing.
    the same happens vice versa
    that is : set up host name in the http server, and when try a request through IP Address using a web browser.
    can any body clear me who calls the doGet() method of servlet. if it is USER AGENT of web browser, is there any operation executes between
    USER AGENT - DoGet() method of servlet?
    regards
    R
    Message was edited by:
    LoveOpensource

    The servlet is on the server, the browser is on the client, so, do it think it possible (unless the browser is written in Java and does it's browsing with RMI, which is patently absurd) that the browser call doGet()?
    It is rather obvious, that the browser sends an HTTP request to the Application Container (or a web server such as apache which then uses some module to communicate with the Application Container, but the end effect is the same), and that Application Container calls the doGet() method.
    Edit: And man am I slow and "wordy".

  • Serialization of DOM Tree+calling POST method in servlet

    Hi all,
    I am trying to serialize a DOM tree and send it from an applet to a servlet..I am having difficulty in calling the post method of the servlet..can anyone please tell me how the POST method in the servlet is called from the applet...I am using the code as seen on the forum for calling the POST method as below:
    URL url = new URL("http://localhost:8080/3awebapp/updateservlet");
    HttpURLConnection con = (HttpURLConnection)url.openConnection();
    con.setUseCaches(false);
    con.setRequestProperty("Content-Type","application/octet-stream");
    System.out.println("Connected");
    con.setDoOutput(true);
    con.setRequestMethod("POST");
    System.out.println("do output called");
    con.setDoInput(true);
    System.out.println("do Input called");
    ObjectOutputStream objout = new ObjectOutputStream(con.getOutputStream());
    yet the post method in the servlet does not seem to be called....
    another problem I had was trying to serialize a DOM document and send it to the servlet. I am using the following code to write the DOM document on an output stream..would this work:
    OutputFormat format = new OutputFormat(document);
    XMLSerializer serializer = new XMLSerializer( objout, format );
    System.out.println("XML Serializer Started");
    DOMSerializer newSerializer=serializer.asDOMSerializer();
    newSerializer.serialize( document );
    objout.flush();
    objout.close();
    ...since the doPost method of the servlet is not being called I do not whether the above code would be sent to the servlet..
    Any advice on the above two matters would be highly appreciated..
    Fenil

    perhaps my piece of code may help You - relevant parts marked //<--,
    but I have a problem when reading my object - which is a serialized DomTree :
    Variant 1 : sending XML-data as string will arrive as should be, but parser says org.xml.sax.SAXParseException (missing root-element)
    Variant 2 : readObject says java.io.OptionalDataException, but the DomTree will be parsed and displayed
    -- snipp --
    import java.io.InputStream;
    import org.w3c.dom.Document;
    import java.net.*;
    import com.oreilly.servlet.HttpMessage; //<--
    import java.util.*;
    import java.io.ObjectInputStream;
    myApplet :
    try {
         URL url = new URL(getCodeBase(),"../../xml/FetchDocument");
         HttpMessage msg = new HttpMessage(url);
         Properties props = new Properties();
         props.put("InputFeldName","FeldWert");
         InputStream in = msg.sendGetMessage(props);
    //<-- alt : sendPostMessage
         ObjectInputStream result = new ObjectInputStream(in);
         try {
         Object obj = result.readObject();
    myServlet :
    public void doGet(HttpServletRequest req,HttpServletResponse res)
         throws ServletException, IOException {
    TreeCreator currentTree = new TreeCreator();
    ObjectOutputStream out = new ObjectOutputStream(res.getOutputStream());
    -- variant 1 :
    out.writeObject(currentTree.skillOutputString());
    out.flush();
    out.close();
    -- variant 2 :          
    OutputFormat( TreeCreator.cdi ); //Serialize DOM
    OutputFormat format = new OutputFormat( currentTree.getCDI() ); format.setEncoding("ISO-8859-1");
    XMLSerializer serial = new XMLSerializer( out, format );
    serial.asDOMSerializer(); // As a DOM Serializer
    serial.serialize( currentTree.getCDI().getDocumentElement() );
    serial.endDocument();
    out.flush();
    out.close();

  • Is it possible to call a method in a servlet from  a java script ?

    I need to do a dynamic html page . In the page i select some things and then these things must communicate whit a servlet because the servlet will do some DB querys and update the same webpage.
    So is it possible to actually call a method of a servlet from a java script? i want to do something that looks like this page:
    http://www.hebdo.net/v5/search/search.asp?rubno=4000&cregion=1011&sid=69DHOTQ30307151
    So when u select something in the first list the secodn list automaticly updates.
    thank you very much

    You can
    1. load all the options when loading the page and
    set second selection options when user selected
    the first; or
    2. reload the page when user select first selection
    by 'onChange' event; or
    3. using iframe so you only need to reload part of
    the page.

  • Problem calling a method in a servlet witch returns remote ejb

    Hi, I have a problem combining servlets ands ejbs, I expose my problem :
    What I have :
    1 . I have a User table into a SGBD with two attributes login and pass.
    2 . I have a UserBean linked to User table with a remote interface
    3 . I have a stateless UserSessionBean with a remote interface
    4 . I have a UserServlet linked to a jsp page which allows me to add users
    5 . I use Jboss
    What is working ?
    1 - I have a method newUser implemented in my UserSessionBean :
    public class UserSessionBean implements SessionBean {
      private SessionContext sessionContext;
      private UserRemoteHome userRemoteHome;
      public void ejbCreate() throws CreateException {
      // Initialize UserRemoteHome
      // Method to add a new user
      public UserRemote newUser(String login, String password) {
            UserRemote newUser = null;
            try {
                newUser = userRemoteHome.create(login, password);
            } catch (RemoteException ex) {
                System.err.println("Error: " + ex);
            } catch (CreateException ex) {
                System.err.println("Error: " + ex);
            return newUser;
    }2 - When I test this method with a simple client it works perfectly :
    public class TestEJB {
        public static void main(String[] args) {
            Context initialCtx;
            try {
                // Create JNDI context
                // Context initialization
                // Narrow UserSessionHome
                // Create UserSession
                UserSession session = sessionHome.create();
                // Test create
                UserRemote newUser = session.newUser("pierre", "hemici");
                if (newUser != null) {
                    System.out.println(newUser.printMe());
            } catch (Exception e) {
                System.err.println("Error: " + e);
                e.printStackTrace();
    Result : I got the newUser printed on STDOUT and I check in the User table (in the SGBD) if the new user has been created.
    What I want ?
    I want to call the newUser method from the UserServlet and use the RemoteUser returned by the method.
    What I do ?
    The jsp :
    1 - I have a jsp page where a get information about the new user to create
    2 - I put the login parameter and the password parameter into the request
    3 - I call the UserServlet when the button "add" is pressed on the jsp page.
    The Servlet :
    1 - I have a method doInsert which call the newUser method :
    public class UserServlet extends HttpServlet {
        private static final String CONTENT_TYPE = "text/html";
        // EJB Context
        InitialContext ejbCtx;
        // Session bean
        UserSession userSession;
        public void init() throws ServletException {
            try {
                // Open JNDI context (the same as TestClient context)
                // Get UserSession Home
                // Create UserSession
                userSession = userSessionHome.create();
            } catch (NamingException ex) {
                System.out.println("Error: " + ex);
            } catch (RemoteException ex) {
                System.out.println("Error: " + ex);
            } catch (CreateException ex) {
                System.out.println("Error: " + ex);
        protected void service(HttpServletRequest req, HttpServletResponse resp) throws
                ServletException, IOException {
         * Does insertion of the new user in the database.
        public void doInsert(HttpServletRequest req, HttpServletResponse resp) throws
                ServletException, IOException {
            try {
                // Get parameters to create the newUser
                String login = req.getParameter("login");
                String password = req.getParameter("password");
               // Create the newUser
                System.out.println("Calling newUser before");
                UserRemote user = userSession.newUser(login, password);
                System.out.println("Calling newUser after");
            } catch (Exception e) {
        // Clean up resources
        public void destroy() {
    Result :
    When I run my jsp page and click on the "add" button, I got the message "Calling newUser before" printed in STDOUT and the error message :
    ERROR [[userservlet]] Servlet.service() for servlet userservlet threw exception
    javax.servlet.ServletException: loader constraints violated when linking javax/ejb/Handle class
         at noumea.user.UserServlet.service(UserServlet.java:112)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
         at java.lang.Thread.run(Thread.java:534)
    Constat :
    I checked into my SGBD and the new user has been created.
    The error appears only when the method return Remote ejbs, if I return simples objects (Strings, int..) it works.
    What can I do to resolve this problem ?
    Thank you.

    "Why do you want to servlet to gain access to another EJB through the stateless session bean. Why cant the servlet call it directly ?"
    Because I want to access to the informations included in the entity bean UserBean (which is remote).
    You said that it is a bad design, but how can I access to my UserBean ejbs from the session bean if I don't do that ?
    For example I want a List of all users to be seen in a jsp page :
    1 - I call the method getUserList which returnsan ArrayList of UserRemote.
    2 - I iterate over the ArrayList to get the users parameters to be seen.
    As the other example (newUser), when I do
    ArrayList users = (ArrayList) userSession.getUserList(); with the simple client it works, but in the servlet I got the same error.
    But, if I call directly the findAll method (as you'are saying) in the servlet
    ArrayList users = (ArrayList) userRemoteHome.findAll(); it works...
    I think that if my servlet calls directly entity ejbs, I don't need UserSession bean anymore. Is that right ?
    I precise that my design is this :
    jsp -> servlet -> session bean -> entity bean -> sgbd
    Is that a bad design ? Do I need the session bean anymore ?
    Thank you.

  • Calling a method from another servlet? very beginner

    I am going to try to explain what I want to do so just be patient please.
    I want to call a method in a seperate servlet to connect and release my connection pool - How do I do this?
    This is what I have been trying... help
    dbPOOL.class
    package DATABASE;
    import javax.naming.*;
    import javax.sql.*;
    import java.sql.*;
    import java.util.*;
    public class dbPOOL {
      Connection con;
      private boolean conFree = true;
      private String dbName = "java:comp/env/jdbc/connectDB";
      public dbPOOL() throws Exception {
           try  {              
                    InitialContext ic = new InitialContext();
                    DataSource ds = (DataSource) ic.lookup(dbName);
                    con =  ds.getConnection();    
         } catch (Exception ex) { throw new Exception("Couldn't open connection to database: " + ex.getMessage());
      public void remove () {
             try {
                 con.close();
            } catch (SQLException ex) { System.out.println(ex.getMessage());}
      protected synchronized Connection getConnection() {
             while (conFree == false) {
                     try {
                             wait();
                     } catch (InterruptedException e) {
                  conFree = false;
                  notify();
                  return con;
        protected synchronized void releaseConnection() {
            while (conFree == true) {
                     try {
                        wait();
                     } catch (InterruptedException e) {
                  conFree = true;
                  notify();
    }and my worker servlet connTest
    package DATABASE;
    import javax.naming.*;
    import javax.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    public class connTest extends HttpServlet {  
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, SQLException, IOException {
             try {
                    String selectStatement = "select * " + "from mt.Evendale_Web_Groups";
                    getConnection();
                    PreparedStatement prepStmt = con.prepareStatement(selectStatement);
                    ResultSet rs = prepStmt.executeQuery();
                    while (rs.next()) {
                       groupList gl = new groupList(rs.getString(1), rs.getString(2), rs.getString(3));
                    prepStmt.close();
            } catch (SQLException ex) { throw Exception(ex.getMessage());}
                releaseConnection();
    }When I try to compile the connTest servlet - I keep getting cannot find symbols errors on the methods. How do I fix this?

    Which errors exactly?
    Try something like this:
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    dbPOOL db = null;     
    try {               
    String selectStatement = "select * " + "from mt.Evendale_Web_Groups";
    db = new dbPOOL();        
    Connection con = db.getConnection();               
    PreparedStatement prepStmt = con.prepareStatement(selectStatement);               
    ResultSet rs = prepStmt.executeQuery();               
    while (rs.next()) {                                    
       // process your rs                      
    prepStmt.close();           
    } catch (Exception ex) {
    } finally {
        if (db != null)
             db.releaseConnection();             
    }Simply change the package name to something else. But don't forget to import your dbPOOL class since it is now located in a diff package. Also be aware of coding standards when naming your classes and packages.

  • Getting error while calling ejb business methods from servlet

    Hi
    Iam getting error when i try to call a ejb method from servlet.Error is
    "com.netscape.server.eb.UncheckedException: unchecked exception nested exception is:java.lang.NullPointerException".
    I build the application and deployed it successfully.Iam using IAS 6.O with windows NT 4.0.
    This is just a method which takes values from database and return as an array of bean to servlet.
    Any help on this.Thanks Shank

    Hi
    I was using the session bean.Your suggestion helped me a lot.Perfect.
    I debug my program and found that from ejbCreate()exception is getting.
    I was getting the datasource object thro ejb create() initialisation.
    Somehow the look up jndi which i mentioned was not interpretting from ejb-jar.xml ias-ejb-jar.xml and datasource ref .Due to this iam getting jndi Namenotfound exception which in turns to null pointer as datasource is getting null.
    when i hardcoded in the ejb the the jndi name for datasource it is working fine.Bit worried all the existing ejbs working with the xml referenced datasource and jndi,but when i added a new ejb with same properties it is failing to get the jndi name.
    Piece of code from ias-ejb-jar.xml
    <resource-ref>
              <res-ref-name>myDataSource</res-ref-name>
              <jndi-name>jdbc/nb/myData</jndi-name>
    </resource-ref>
    Piece of code from ejb-jar.xml
    <resource-ref>
              <res-ref-name>myDataSource</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
    </resource-ref>
    Thanks a lot meka

  • Is it possible to call a java method from servlet

    Hi All,
    I am trying to import a java class to my servlet and call a method of that class, is this possible. I am getting an error while importing the class.
    I am using tomcat, have put my class files in th path
    \WEB-INF\classes\com\kiran
    My java goes like this
    package com.kiran;
    import java.sql.*;
    import javax.sql.*;
    public class DbCon
    { Connection con=null;
    public Connection getCon()
    -----return con;
    catch(Exception e){ return con; }
    and my aim is to call getCon() from my servlet. which is as follows
    package com.kiran;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import com.kiran.DbCon;
    public class check extends HttpServlet
    DbCon db;
    i am not able to compile my servlet, err is --> cannot find symbol DbCon..
    How can i import the class, do i require any entries in web.xml ?
    expecting your advice..
    Thanks in advance
    Best Regards,
    Kiran

    Ok, first off, if you are testing in tomcat (and as you said you are placing the class files in the path), you already compiled this classes, right? Otherwise I don't see how you placed your classes in /WEB-INF/classes/. Note that you will need two class files (based on your code. If not, then I'm missing part of the question. Typically, your IDE will help you with this problem a lot. The only thing that seems confusing is the catch (Exception e) statement which needs to be as part of a method (I assume this is a typo on your part).
    If your problem is at runtime, don't forget to configure your web.xml to see your servlet.

  • Calling method from servlet

    hi,
    I want to call a method of an object that is available in a program already running, with parameters passed from the servlet.
    How to do it .
    Thanks.

    Pls be patient with me. I tried my best and couldn't achieve what I want.
    I provide the skeleton of what I have done and what I want to do.
    I have my core part in /home/raja/Service/Core.java, the only java file in Service folder. When I compile it I get some four class files(which are used in Core.java file internally). I don't compile it as a package but as a single file.
    I run the program in the same folder and in main method I use an infinite loop to keep the program running infinitely.
    And I have a html as, usr/local/jakartaTomcat../webapps/servlets-examples/input.html. which simply gets an input string and submits to /servlet/Insert servlet class which is in ../servlets-examples/classes/Insert.class.
    It put the string in DB which works fine. Also I made a package in ...servlet-examples/classes/Service in which I uploaded Core.java and compiled it and got the class files in it as a package.
    In Insert class file I imported Service.*. In Insert class file I put a line like this. Core.putInPool(submittedString) which is a static method.
    When I submit input.html , the string is put in DB, but it is not submitting to the program already running.
    What I want to do is, I want to submit the string to the program that is running in /home/raja/Service/.
    This is the program running in /home/raja/Service.
    public class Core {
         static ThreadPool bc= new ThreadPool(10);
         public static void putString(String someStr) {
              bc.putInPool(someStr);
         public static void main(String args[]) throws InterruptedException {
              BufferedReader dataIn = new BufferedReader(new InputStreamReader( System.in) );
              while(true) {
                   System.out.println("\f 1.Insert\n2.option2Enter Ur choice:");
                   try{
                        ch = Integer.parseInt(dataIn.readLine());
                                   String string="";
                        switch(ch) {
                             case 1: System.out.println("\nEnter the String:");
                                  string = dataIn.readLine();
                                  bc.putInPool(string);
                                 .....In Insert.class servlet,
                                    string = req.getParameter("userInputString");
                                    out.println("Submitted");
                        Core.putInPool(string);

  • How to call a method in the servlet from an applet

    I want to get the data for the applet from the servlet.
    How to call a method that exits in the servlet from the applet? I want to use http protocol to do this.
    Any suggestions? Please help.
    thanks

    Now that Web Services is around, I'd look at possibly implement a Web Service call in your applet, which can then be given back any object(s) on return. Set up your server side to handle Web Service calls. In this way, you can break the applet out into an application should you want to (with very little work) and it will still function the same

  • How to call the EJB methods from servlet/jsp

    Hello ,
    i have write one ejb signOn having the method validateUser(username,password).i can able to call this function from client.java class.i want to know whether i can call this function from servlet.if yes then where to write that servlet and web.xml file.
    At present i m using weblogic server 8.1and i create directory call c:\ejb\demo and put the ejb files(home ,remote,ejb class ,client.java) then i have created .jar file and put in application file.
    Now i want to create a servlet for that i have to create a new directory and put the servlet,web.xml,weblogin-web.xml file and then create one .war file and put in application directory or do some thing extra.Please help me.
    Thanks In Advance
    [email protected]

    I think this might not be the most appropriate forum for your question. You might try a forum about ejb, or weblogic, or jndi.

  • Can an applet call one of the methods of servlet??

    hi everyone...
    i m very new servlet and applet programming and i have come accross a problem....
    i m using a applet which establishes connection with the servlet(residing on server)..i want to use few of the methods of the servlet....
    now is it possible tfor me to call the methods of this servlet using its object.???
    please help me..
    thanx in advance

    first of all thanx a lot for the reply...
    but i wanted to know can an applet call any other
    function of servlet other than get and post....as i
    hacve defined some more functions in servlet..
    please reply...I did this a while back (2003/4?) and unless it's changed you cannot do it directly, it must be GETor POST, then you could just use conditional logic to invoke another method.

  • Why Do We Have To Call super.init(config); in init() method of servlet?

    Hi, everyone..
    I wonder why we call super.init(config) in init method of servlet... If i dont call it ; when i try to get servletcontext in service method it throws java.lang.NullPointerException...when we call super.init() , what is happening behind the scene? If anybody has a technical explanation for my question , i will be very pleased...
    THX FOR YOUR FUTURE REPLIES IN ADVANCE....

    I am sorry about the uppercases and i dont want to seem smart on java forums... Anyway, m8 this is the thing that i know... i meant; for instance when we override doGet or doPost method ; we dont need to override init method; but the server loads the servlet and we can get the context of the servlet in these methods easily by calling getServletContext() method; however when we want to call service method implicitly by jndi, servlet needs to be loaded and init method must call its parent...(i also write down in web.xml <load-on-startup>.... for that servlet).
    thx for your replies in advance....

  • Call method on servlet by clicking command_button

    To all Jdever's 11g guru's
    i usually use jdev 10g, but now i try to exercise with jdev 11g and i have an question [newbie on 11g]
    i have command_button in browseGoods page and in that button i have a method "onSearch" on "browseGoodsAction.java"
    my onSearch method
    public void onSearch (DataActionContext ctx) throws Exception{
    String nama = ctx.getHttpServletRequest().getParameter("nama");
    String dateStart = ctx.getHttpServletRequest().getParameter("dateStart").toString().toUpperCase();
    String dateEnd = ctx.getHttpServletRequest().getParameter("dateEnd").toString().toUpperCase();
    String status ="A";
    if (nama.length()==0 || nama == null){
    nama = "%%";
    if (nama.equalsIgnoreCase("all")){
    nama = "ALL";
    SimpleDateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
    if (dateStart.length()==0 || dateStart == null){
    and if i double click the command_button the generic method is
    public String Search() {
    // Add event code here...
    return null;
    not
    public void Search(){
    that i was made.
    How to call that method when i click the commnad_button,..and bean that servlet???
    cauze i'm not so understand when i follow the "*cue card*" on OTN
    thanks for all guru's response and help
    Edited by: kang dadang on Jan 5, 2010 8:39 PM

    Hi Frank, thanks for u'r answer and response
    I usual use jdev 10.1.2 UIX & JSP version, and i know that "*DataActionContext*" is depricated on Jdev11g.
    If i have message textInput / inputText on 11g for search input, and inputText parameter name is for ex : goodsName : in properties inputText name field
    how to put inputText parameter name ? is in the Property Inspector, Common section, the Value field ?
    and how to get parameter name in inputText on jdev11g ?
    I usual use this for UIX or JSP on Jdev 10.1.2
    public void onSearch (DataActionContext ctx) throws Exception{
    String nama = ctx.getHttpServletRequest().getParameter("nama");
    String dateStart = ctx.getHttpServletRequest().getParameter("dateStart").toString().toUpperCase();
    String dateEnd = ctx.getHttpServletRequest().getParameter("dateEnd").toString().toUpperCase();
    thanks Frank for your answer

  • AutomationException while calling a method

    Hi all,
    I've got a problem accessing a COM/DCOM component in a Win2k box (Advanced Server)
    with jcom. I configured the server and client described in the "JSP to COM" example.
    The only difference: I don't want to access the excel sheet and I don't use a jsp
    to execute.
    I used the java2com.exe to create the proxies from my dll ScriptableUniversalTransAgt.dll.
    But when I try to call a method on the dll via Java, I get the exception:
    AutomationException: 0x80070005 - General access denied error in 'Invoke'
         at com.bea.jcom.Rpc.a(Rpc.java)
         at com.bea.jcom.be.a(be.java)
         at com.bea.jcom.StdObjRef.a(StdObjRef.java)
         at com.bea.jcom.Dispatch.vtblInvoke(Dispatch.java)
         at de.conet.galileo.suta.IScriptableUniversalTransAgentProxy.setHcmName(IScriptableUniversalTransAgentProxy.java:271)
         at de.conet.galileo.suta.ScriptableUniversalTransAgent.setHcmName(ScriptableUniversalTransAgent.java:336)
         at de.conet.galileo.SUTATest.start(SUTATest.java:33)
         at de.conet.galileo.SUTATest.main(SUTATest.java:27)
    I checked everything on the server, the user has all rights he needs but it doesn't
    work. In the eventlog of the server I can see that the login was successful.
    The attachment contains some log files and my program with the dll.
    Maybe someone can help me?
    Thanks
    Michael
    [src.zip]

    "Jeff Muller" <[email protected]> wrote in message
    news:[email protected]...
    Yeah, now I'm getting this error on code that worked two days ago.
    javax.servlet.ServletException: Unable to initialize servlet:
    AutomationExceptio
    n: 0x80070005 - General access denied error, status: Getting instance, and
    calli
    ng initialize.
    at com.teloquent.MyApp.MyServlet.initCOMObj(MyServlet.
    java:308)
    at com.teloquent.MyApp.MyServlet.init(MyServlet.java:8
    1)
    at
    weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubIm
    pl.java:700)
    at
    weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStub
    Impl.java:643)
    at
    weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
    mpl.java:588)
    at
    weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
    java:368)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:242)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:200)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:2495)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:2204)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    >
    ... but then again, I don't expect any response here.
    "Michael" <[email protected]> wrote in message
    news:[email protected]...
    Hi all,
    I've got a problem accessing a COM/DCOM component in a Win2k box
    (Advanced
    Server)
    with jcom. I configured the server and client described in the "JSP toCOM" example.
    The only difference: I don't want to access the excel sheet and I don'tuse a jsp
    to execute.
    I used the java2com.exe to create the proxies from my dllScriptableUniversalTransAgt.dll.
    But when I try to call a method on the dll via Java, I get the
    exception:
    >>
    AutomationException: 0x80070005 - General access denied error in'Invoke'
    at com.bea.jcom.Rpc.a(Rpc.java)
    at com.bea.jcom.be.a(be.java)
    at com.bea.jcom.StdObjRef.a(StdObjRef.java)
    at com.bea.jcom.Dispatch.vtblInvoke(Dispatch.java)
    atde.conet.galileo.suta.IScriptableUniversalTransAgentProxy.setHcmName(IScript
    ableUniversalTransAgentProxy.java:271)
    at
    de.conet.galileo.suta.ScriptableUniversalTransAgent.setHcmName(ScriptableUni
    versalTransAgent.java:336)
    at de.conet.galileo.SUTATest.start(SUTATest.java:33)
    at de.conet.galileo.SUTATest.main(SUTATest.java:27)
    I checked everything on the server, the user has all rights he needs butit doesn't
    work. In the eventlog of the server I can see that the login wassuccessful.
    The attachment contains some log files and my program with the dll.
    Maybe someone can help me?
    Thanks
    Michael

Maybe you are looking for

  • How to play dvd on tv

    Have the correct adaptor and lead and can play commercially produced dvd on Mac but tv only shows Mac start-up screen. How do I get the dvd to play on tv please?

  • What is the efficient way to migrate the large DB (over 1TB) from 9i to 11g

    Can any body give a suggestion for migrate the large DB (Over 1TB) from 9i to 11g?

  • Enquiry(SAP SCRIPTS)

    hi experts ! can any one tell me the wat is form name, driver program & t.code for ENQUIRY ? (sap scripts ) or list of form names and their respective driver programs , Tcodes ? Regards, Rajsh Edited by: rajesh  k on Mar 4, 2008 10:59 AM

  • Inserting/manipulating PDF in Flex 3 AIR project?

    I've read as much as I can find about dropping a PDF into my Flex 3 AIR project, but the information is scarce and I understand it's a very new (not fully baked) feature. Can anyone describe what component to use to drop a PDF into my AIR project? I

  • Refresh graph properties (colors...) when front panel not opened

    I have a problem with setting the plot properties of a multiple xy-graph. I first pass the data (n plots, number variable) to the graph control, THEN I set the according properties like color, line style etc. by a property node beginning with "active