Pls. help me out..Accessing ejb through jsp

hi all,
I am running my ejb on the j2sdkee.1.2.1 and jdk1.3 on Windows 2000. I am facing a problem while accessing the ejb from the jsp page. Its running fine when accessing through a client application. The following is the error when I try to access it using:
http://localhost:8000/first/FirstEJB.jsp
Error: 500
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to compile class for JSP
     at org.apache.jasper.runtime.JspLoader.loadJSP(JspLoader.java:287)
     at org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:137)
     at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:148)
     at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:247)
     at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:352)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
     at org.apache.tomcat.core.ServiceInvocationHandler.method(ServletWrapper.java:626)
     at org.apache.tomcat.core.ServletWrapper.handleInvocation(ServletWrapper.java:534)
     at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:378)
     at org.apache.tomcat.core.Context.handleRequest(Context.java:644)
     at org.apache.tomcat.core.ContextManager.service(ContextManager.java:440)
     at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:144)
     at org.apache.tomcat.service.TcpConnectionThread.run(TcpEndpoint.java:310)
     at java.lang.Thread.run(Thread.java:484)
Root cause:
java.lang.NullPointerException
     at java.io.File.(File.java:181)
     at org.apache.jasper.compiler.JspCompiler.computeClassFileData(JspCompiler.java:285)
     at org.apache.jasper.compiler.JspCompiler.getClassName(JspCompiler.java:103)
     at org.apache.jasper.compiler.Compiler.compile(Compiler.java:105)
     at org.apache.jasper.runtime.JspLoader$2.run(JspLoader.java:273)
     at java.security.AccessController.doPrivileged(Native Method)
     at org.apache.jasper.runtime.JspLoader.loadJSP(JspLoader.java:270)
     at org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:137)
     at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:148)
     at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:247)
     at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:352)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
     at org.apache.tomcat.core.ServiceInvocationHandler.method(ServletWrapper.java:626)
     at org.apache.tomcat.core.ServletWrapper.handleInvocation(ServletWrapper.java:534)
     at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:378)
     at org.apache.tomcat.core.Context.handleRequest(Context.java:644)
     at org.apache.tomcat.core.ContextManager.service(ContextManager.java:440)
     at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:144)
     at org.apache.tomcat.service.TcpConnectionThread.run(TcpEndpoint.java:310)
     at java.lang.Thread.run(Thread.java:484)
The name of the jsp file is FirstEJB.jsp
The name of the ear file is FirstEJB - Stateless Session Bean
The name of the WAR File is FirstWAR
I have created a Web Component named first
Can anyone tell me how to access the ejb using jsp?
Thanks,
ajit

Hello all,
Sorry for the trouble. I got the mistake..I had not given the context in the deploytool..
Thanks,
ajit

Similar Messages

  • Re: Accessing EJB through JSP

              Can anyone guide me to a tuorial thru which I can learn how to invoke EJBs thru
              JSP pages.
              Thanks..Kevin
              

    EJB to JSP Integration
              http://edocs.bea.com/wls/docs61/jsp/ejb2jsp.html
              Kevin wrote:
              > Can anyone guide me to a tuorial thru which I can learn how to invoke EJBs thru
              > JSP pages.
              >
              > Thanks..Kevin
              

  • Hi guys (very urgent pls help me out)

    i have an doubt that iam using JBoss AS, my scienraio is
    inital when start my Application Server it will connects to mysql DB datasource, i will retrieve some values those are DB Names like oracle,sql server,db2 etc in my JSP page iam placed at combo box upto this i am very much successful but now my problem is after gettinh those values in html select box.
    if user selects Oracle and in the same screen user can enter connection config details and after submitting the request. At runtime App Server want to connect for that particular Database.
    for ex Oracle and its connection parameters then it want to connect that particular Database without restarting the server.
    so mysql is internal DB and Oracle is external db. how to manage this scienraio
    please anyone knows solution, pls help me out......
    regards
    Yadav

    hi
    the message is very clear that the sold to party ur refering is not from the same sales area. if u have the customer already then extend the same to the said sales area, by common division and distribution channel
    <b>reward points</b>
    Regards

  • How can I access EJB  through executable jar file?

    Hello buddies!!
    I wonder if anyone could give me an explanation of how accessing EJB through executable jar file?Thanks!!

    Hi there,
    You'll need to install the J2EE SDK on the client and include the <j2ee install dir>\lib\j2ee.jar file in your CLASSPATH along with the Client Jar file that was generated by the deploytool when you deployed the application.
    In your client code the Context properties are as follows:
    Properties p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
    p.put(Context.PROVIDER_URL, "iiop://hostname:portnumber");
    Context cntx = new InitialContext(p).Hope this helps
    Amanda
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers

  • Hi.can u pls help me out I'm stuck and don't know what to do..

    pls help me out...can i activate my iPhone 4s without knowing the previous owners iCloud password???i bought the phone and have no clue on where to find him.

    TJ Junior wrote:
    pls help me out...can i activate my iPhone 4s without knowing the previous owners iCloud password???i bought the phone and have no clue on where to find him.
    Sorry no.  If you don't know the previous owners info or can't get a hold of them, then you now own an ibrick.
    Find My iPhone Activation Lock: Removing a device from a previous owner’s account - Apple Support
    Apple can't help you either.

  • Hey there, whenever i try to start iTunes in my laptop amsg coming up saying : data execution prevention prevented iTunes from starting (Dep), would you Pls help me out.I have windows vista installed.

    hey there, whenever i try to start iTunes in my laptop amsg coming up saying : data execution prevention prevented iTunes from starting (Dep), would you Pls help me out.I have windows vista installed.

    No, i do not have quickTime player.
    I have tried to close dep off for iTunes but failed to do so as i got a msg that iTunes can't work without Dep in execution data prevention.

  • Problem with Sales Order BAPI  Update...Very Very Urgent....Pls Help me out

    I am trying to update the sales order text using "BAPI_SALESORDER_CHANGE" But i am getting an error as " Sold-to party E455 not maintained for sales area E901 C1"
        I passed the sales order no, and the text to be upated and the Update flag is set to "U".
        When i try giving the same values in se37 it updates the sales order text successfully but when i use the same BAPI in the report i am getting the above error. Can anyone pls help me out.

    hi
    the message is very clear that the sold to party ur refering is not from the same sales area. if u have the customer already then extend the same to the said sales area, by common division and distribution channel
    <b>reward points</b>
    Regards

  • Urgent :: FRM-40654 || pls help me out

    Hello forum
    Pls i need an immediate help. so suggestions invited...
    i have a block having 1 db item and 1 non db item . i m shoving LOV for filling those..
    these 2 are displayed multiple times on the canvas.
    i want that whn user select one from LOV then in ssecond entry it will not appear in the LOV so i write a query in the LOV.
    select a,b from <table1> where a not in (select a from table2 where <primary key condtions>
    for getting data from table 2 i have to post the data which is in the canvas so i write post on button- press
    so it's giving me error
    FRM-40654 other user updated the table so need to requery
    so pls help me out in resloving this prob'

    hello forum
    pls help me out ... i m in urgent need .
    thanking u

  • HT1267 I lost my Iphone3G. I don't have any tracking app. in cell.How can I find my phone. Pls. help me out..

    I lost my Iphone3G. I don't have any tracking app. in cell.How can I find my phone. Pls. help me out..

    In your situation as you describe it, all you can do is physically look for it.  There is no other way to locate it.  Sorry.
    Hope this helps

  • Hi i m using 4s and its updated but i cant configure with microsoft exchange for my gmail account. Anytime i tried to configure it the message comes connection to the server failed. Pls help me out.

    Hi i m using 4s and its updated but i cant configure with microsoft exchange for my gmail account. Anytime i tried to configure it the message comes connection to the server failed. Pls help me out.
    <Email Edited by Host>

    Discontinued by Google. Read here:
    http://googlesystem.blogspot.com/2012/12/google-sync-discontinued-for-gmail.html

  • Column Not found error while trying to access databse through JSP+Java Bean

    I am trying to acees MS Access 2003 db through JSP using Tomcat 5.0.28.The code for accessing the databse is incorporated in the bean.The jsp only calls the particular method of the bean .
    Code for Java Bean:
    package ActiveViewer;
    import java.sql.*;
    import java.util.*;
    public class CompanyBean
    Connection con;
    ResultSet rs=null;
    Statement st;
         public CompanyBean(){}
         public void connect()
         try
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("Here4");
    con=DriverManager.getConnection("jdbc:odbc:activeviewer","","");
         System.out.println("Here1");
         catch (ClassNotFoundException e)
         System.out.println("Could not locate driver.");
    catch (SQLException e)
    System.out.println("An SQL Exception has occured :: "+e);
         e.printStackTrace();
         catch (Exception e)
    System.out.println("An unknown Exception has occured :: "+e);
         e.printStackTrace();
    public void disconnect()
         try
         if (con!=null)
    con.close();
         catch (SQLException e)
    System.out.println("An SQL Exception has occured :: "+e);
         e.printStackTrace();
    public ResultSet select(String username)
    if(con!=null)
         try
    st=con.createStatement();
         rs=st.executeQuery("select * from company where username='" + username + "'");
    catch (SQLException e)
    System.out.println("An SQL Exception has occured :: "+e);
         e.printStackTrace();
    catch (Exception e)
    System.out.println("An Exception has occured while retrieving :: "+e);
    e.printStackTrace();
    else
    System.out.println("Connection to database was lost.");
    return rs;
    The code for JSP that uses the above bean is:
    <%@ page language="java" import="java.sql.*,ActiveViewer.* " contentType="text/html"%>
    <jsp:useBean id="conn" scope="session" class="ActiveViewer.CompanyBean" />
    <html>
    <body>
    <% String username=request.getParameter("username");
    String password=request.getParameter("password");
    System.out.println("username:"+username);
    System.out.println("password:"+password);
    conn.connect();
    ResultSet rs=conn.select(username);
    System.out.println("Below select ");
    while (rs.next())
    String dbusername=rs.getString("username");
         String dbpassword=rs.getString("password");
         if(dbusername.equals(username) && dbpassword.equals (password))
    { %> out.println("OK");
              <% }
    else { %>Invalid Username and / or Password.
    <br>Clickhere to go back to Login Page.
    <% }
    } %>
    </body>
    </html>
    I get the following error:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Column not found
    though the database is not int he same folder as the jsp, the DSN is set correctly to pint to the db location.The jsp does print in stdout file:
    Here4 (from connect method above)
    Here 1 (from connect method above)
    Below Select (from jsp)
    This means that the jsp does connect to db but it gives the above error.Also the field name also matches that in the database and data is present in the db too.
    All other things like creating package for bean,incorporating the packakage are done.
    Can someone please help me with their precious advice?

    U're getting this error because there is no field called 'password' in ur database, the field in ur database is named 'cpassword' and not 'password'. So change the statement rs.getString("password"); to rs.getString("cpassword");

  • Column Not found error while trying to access database through JSP+Java Bea

    I am trying to access MS Access 2003 db through JSP using Tomcat 5.0.28.The code for accessing the database is incorporated in the bean.The JSP only calls the particular method of the bean .
    Code for Java Bean:
    package ActiveViewer;
    import java.sql.*;
    import java.util.*;
    public class CompanyBean
    Connection con;
    ResultSet rs=null;
    Statement st;
    public CompanyBean(){}
    public void connect()
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("Here4");
    con=DriverManager.getConnection("jdbc:odbc:activeviewer","","");
    System.out.println("Here1");
    catch (ClassNotFoundException e)
    System.out.println("Could not locate driver.");
    catch (SQLException e)
    System.out.println("An SQL Exception has occured :: "+e);
    e.printStackTrace();
    catch (Exception e)
    System.out.println("An unknown Exception has occured :: "+e);
    e.printStackTrace();
    public void disconnect()
    try
    if (con!=null)
    con.close();
    catch (SQLException e)
    System.out.println("An SQL Exception has occured :: "+e);
    e.printStackTrace();
    public ResultSet select(String username)
    if(con!=null)
    try
    st=con.createStatement();
    rs=st.executeQuery("select * from company where username='" + username + "'");
    catch (SQLException e)
    System.out.println("An SQL Exception has occured :: "+e);
    e.printStackTrace();
    catch (Exception e)
    System.out.println("An Exception has occured while retrieving :: "+e);
    e.printStackTrace();
    else
    System.out.println("Connection to database was lost.");
    return rs;
    The code for JSP that uses the above bean is:
    <%@ page language="java" import="java.sql.*,ActiveViewer.* " contentType="text/html"%>
    <jsp:useBean id="conn" scope="session" class="ActiveViewer.CompanyBean" />
    <html>
    <body>
    <% String username=request.getParameter("username");
    String password=request.getParameter("password");
    System.out.println("username:"+username);
    System.out.println("password:"+password);
    conn.connect();
    ResultSet rs=conn.select(username);
    System.out.println("Below select ");
    while (rs.next())
    String dbusername=rs.getString("username");
    String dbpassword=rs.getString("password");
    if(dbusername.equals(username) && dbpassword.equals (password))
    { %> out.println("OK");
    <% }
    else { %>Invalid Username and / or Password.
    <br>Clickhere to go back to Login Page.
    <% }
    } %>
    </body>
    </html>
    I get the following error:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Column not found
    though the database is not int he same folder as the jsp, the DSN is set correctly to pint to the db location.The jsp does print in stdout file:
    Here4 (from connect method above)
    Here 1 (from connect method above)
    Below Select (from jsp)
    This means that the jsp does connect to db but it gives the above error.Also the field name also matches that in the database and data is present in the db too.
    All other things like creating package for bean in WEB-INF/classes,incorporating the packakage are done.
    Can someone please help me with their precious advice?

    Hi, I too have a problem with an SQL exception, the message is Column not found.
    I'm using the sun jdbc odbc driver with access.
    the first few lines of the stack trace are
    sun.jdbc.odbc.JdbcOdbcResultSet.findColumn(JdbcOdbcResultSet.java:1852)
    sun.jdbc.odbc.JdbcOdbcResultSet.getInt(JdbcOdbcResultSet.java:603)
    net.homeip.sdaniels.MemberBean.ejbFindByUnamePwd(MemberBean.java:127)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    I am of course sure that the column does infact exist. I can insert into the column no problems. the sql looks like this:
    SELECT * FROM Members WHERE uName ='Stewart' AND encPwd='�F2C�3����h�1Y�'
    Can any one tell me if there is a common cause to this problem?
    Thanks

  • How to access dataprovider through jsp syntax

    I am creating an image gallery but here's my issue...
    I have a database table that contains links to images on my file system. I created a dataprovider for this database table on my page so the dataprovider now returns all the image links.
    Now what I need to do is create a row of thumbnails so I add a scriptlet in my jsp code where I want the thumbnail to appear. This scriptlet loops through the dataprovider and for each row it will create a standard html image tag populating the src attribute with the link from the dataprovider.
    I figure creating dynamic html img tags is much easier than creating dynamic image components in the backing bean. Doing the former allows me to output the row of thumbnails exactly where I want them on the page (ie where i put my scriptlet code) and is easier to manage.
    The problem is i don't know how to access the dataprovider through jsp tags and syntax. I'm sure there must be a way, can anyone help?
    Thanks.

    I've done this sometimes using scriplets:
    <%
        request.setAttribute("SOME_CONST", Constants.SOME_CONST);
    %>
    <c:out value="${SOME_CONST}" />But I would also be interested if anyone knows a way without those ugly scriplet..
    O

  • How can I call remote ejb through jsp?(null)

     

    Trying the code:
              <%@ page import="si3.*,javax.ejb.*,javax.naming.*,java.util.*,java.rmi.RemoteException" %>
              <%
              int h=8;
              int w=8;
              Hashtable p = new Hashtable ();
              p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
              p.put(Context.PROVIDER_URL,"t3://192.168.0.203:7001");
              Context ctx= new InitialContext(p);
              Object homeref = ctx.lookup("si3.test");
              addHome home = (addHome) PortableRemoteObject.narrow(homeref, addHome.class);
              add the_ejb = home.create();
              out.println(the_ejb.add(h,w));
              out.println("adf");
              the_ejb.remove();
              %>
              yzj wrote:
              > I have two server running weblogic5.1.
              > If the jsp and ejb locate the same server running weblogic 5.1 ,works well .But one deploys the ejb (jndi name si3.test),the other runs the jsp.I use jsp call the remote ejb ,catch exception :
              >
              > GMT+08:00 2000:<E> <ServletContext-General> Root
              > > cause of ServletException
              > > javax.naming.NameNotFoundException: 'si3.test'; remaining name 'si3.test'
              > > at
              > > weblogic.jndi.toolkit.BasicWLContext.resolveName(BasicWLContext.java,
              > > Compiled Code)
              > > at
              > > weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:133)
              > > at
              > > weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:574)
              > > at javax.naming.InitialContext.lookup(InitialContext.java:349)
              > > at jsp_servlet.client._jspService(client.java:90)
              > > at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              > > at
              > > weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              > > :124)
              > > at
              > > weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              > > l.java:744)
              > > at
              > > weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              > > l.java:692)
              > > at
              > > weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
              > > Manager.java:
              > > 251)
              > > at
              > > weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
              > > at
              > > weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
              > > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
              > > Code)
              >
              > Why? Can you help me? Thanks.
              > The jsp's source(Client.jsp ):
              > <%@ page import="si3.*,javax.ejb.*,javax.naming.*,java.util.*,java.rmi.RemoteException" %>
              > <%
              > int h=8;
              > int w=8;
              > Hashtable p = new Hashtable ();
              > p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
              > p.put(Context.PROVIDER_URL,"t3://192.168.0.203:7001");
              > Context ctx= new InitialContext(p);
              > addHome home = (addHome) ctx.lookup("si3.test");
              > add the_ejb = home.create();
              > out.println(the_ejb.add(h,w));
              > out.println("adf");
              > the_ejb.remove();
              > %>
              >
              >
              [att1.html]
              

  • I have an iPhone 5 16gb white color and i did not get any of the services from apple pls help[ me out

    I have one iphone 5 16 gb white colour with me and its in still under warranty and my phone was fallen down by chance and it got turned off totally and not even switched on also then i went to apple authorised service center for regarding the same . then service center people said that sir you need to submit your phone , after that i left my phone to service center and after two days i have got one call from service center that sir your phone is under phisical damaged condition so u will not be abel to get warranty from apple this will cover under paid replacement and you need to talk to apple customer care also regarding this .same .
    Then i called up to apple customer care and they said sir  we have got some images from the service center regarding your phone and we found that your logic board is damaged from inside and you would not be abel to get the paid replacement also you need to buy a new phone on stock price i was shocked on that time why would i pay 40 to 50 thouasnd again on iphone if its not that much stronger to take bit of imapcts like this
    I had talked numbers of time to service center also but they all are denied against the complainst
    if any body is there how can help me out regarding this so pls register my complaint and help me out from this highly dissatisfied service from apple .
    Thnaks
    karan

    Warranties do not cover damage

Maybe you are looking for

  • Windows 8 file explorer not recognizing my ipod touch

    when I connect my ipod to my new laptop ( windows 8 ), it shows up in itunes but not on my file explorer. If i go to control panel it shows up in devices. any ideas ?

  • In-house apps distribution

    Hi, I have read the relevant Apple iPad deployment documents and tried to understand them (within my level of pertinent technical knowledge). One thing is still not clear: Let's say a company has developed an in-house iPad app. Can the company's IT d

  • DVD player not playing DVDs

    I can't seem to get my DVD player to play any of my movies. When I insert the dvd it doesn't show up on my desktop. The DVD Player doesn't start up until I start it(I have the option to 'open DVD Player) when I insert a DVD). I've tried several DVDs,

  • Event ID 1 VDS Basic Provider

    Unexpected failure. Error code: 490@01010004 this occurs in both win 7/vista 32/x64 whenever you click on diskmanagement in computer management. you think the brilliant over paid coders at microsoft would have fixed this by now but nah. the error its

  • Adobe Reader XI crashes after signature input

    We recently upgraded to Adobe Reader XI (from Adobe Reader X) and had a PDF crash after inputting a signature in a signature field on the form. This is the error that we received: Problem signature:   Problem Event Name: APPCRASH   Application Name: