Servlets/JDBC vs. servlets/EJB performance comparison/benchmark

I have a PHB who believes that EJB has no ___performance___ benefit
against straightforward servlets/JSP/JDBC. Personally, I believe that
using EJB is more scalable instead of using servlets/JDBC with
connection pooling.
However, I am at a lost on how to prove it. There is all the theory, but
I would appreciate it if anyone has benchmarks or comparison of
servlets/JSP/JDBC and servlets/JSP/EJB performance, assuming that they
were tasked to do the same thing ( e.g. performance the same SQL
statement, on the same set of tables, etc. ).
Or some guide on how to setup such a benchmark and prove it internally.
In other words, the PHB needs numbers, showing performance and
scalability. In particular, I would like this to be in WLS 6.0.
Any help appreciated.

First off, whether you use servlets + JDBC or servlets + EJB, you'll
most likely spend much of your time in the database.
I would strongly suggest that you avoid the servlets + JDBC
architecture. If you want to do straight JDBC code, then it's
preferable to use a stateless session EJB between the presentation layer
and the persistence layer.
So, you should definitely consider an architecture where you have:
servlets/jsp --> stateless session ejb --> JDBC code
Your servlet / jsp layer handles presentation.
The stateless session EJB layer abstracts the persistence layer and
handles transaction demarcation.
Modularity is important here. There's no reason that your presentation
layer should be concerned with your persistence logic. Your application
might be re-used or later enhanced with an Entity EJB, or JCA Connector,
or a JMS queue providing the persistence layer.
Also, you will usually have web or graphic designers who are modifying
the web pages. Generally, they should not be exposed to transactions
and jdbc code.
We optimize the RMI calls so they are just local method calls. The
stateless session ejb instances are pooled. You won't see much if any
performance overhead.
-- Rob
jms wrote:
>
I have a PHB who believes that EJB has no ___performance___ benefit
against straightforward servlets/JSP/JDBC. Personally, I believe that
using EJB is more scalable instead of using servlets/JDBC with
connection pooling.
However, I am at a lost on how to prove it. There is all the theory, but
I would appreciate it if anyone has benchmarks or comparison of
servlets/JSP/JDBC and servlets/JSP/EJB performance, assuming that they
were tasked to do the same thing ( e.g. performance the same SQL
statement, on the same set of tables, etc. ).
Or some guide on how to setup such a benchmark and prove it internally.
In other words, the PHB needs numbers, showing performance and
scalability. In particular, I would like this to be in WLS 6.0.
Any help appreciated.--
Coming Soon: Building J2EE Applications & BEA WebLogic Server
by Michael Girdley, Rob Woollen, and Sandra Emerson
http://learnweblogic.com

Similar Messages

  • Looking for Performance Comparisons Between JRockit 6 and Sun Java SE 6

    Hello,
    Can someone point me to some performance comparisons (benchmarks, etc.) between the JRockit and Sun JVMs?
    Thanks in advance.

    Hi Ben.
    Before I send to to the SPEC sites (which can be a tad hard to parse) I must ask - What application or type of application are you interested in? The answer will vary a bit depending on what you need.

  • Ias support for EJB, JSP/servlets,JDBC, connection pooling, XML, SOAP, load balancing etc

    Please let me know where I can find more information regarding iPlanet usage/deployment/configuring/tuning etc for support of technologies - like EJB, JSP/servlets, JDBC, connection pooling, XML, load balancing, JDBC & Transactions
    (I have already read the 'Getting Started with the iPlanet Application Server' part five and six - http://developer.iplanet.com/appserver/testdrive/partfive.jsp and partsix.jsp)(I am using the ias testdrive version).

    Hi,
    It's difficult to explain unless the J2EE architecture is understood. Also, explaining things like load balancing, Transactions, tuning, are bit vague and could blow the disk space of this site.
    To get started, the best way is to test the sample applications and the best part is you don't require internet connection to follow each steps. Install iWS and iAS, open browser, type in http://hostname:port/ias-samples/index.html. You can find links to the sample applications bundled. Please follow the steps given on deploying the application. This will enable you to a higher level.
    Regards
    Ganesh .R
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support

  • PageNotFound when using servlets as clients for EJB

    Can anyone help me? I have a container managed EJB. I'm using servlets as my client. I placed my EJB's in a jar file and my servlets and html pages in a WAR file. I deployed them using J2EE's deploytool. I can access my html files but not my servlet files. It always says file not found or a 405 error (resource not allowed) I access my servlet this way...
    http://localhost:8000/ReservationContextRoot/ReservationAlias
    my web.xml file looks like the following:
    <?xml version="1.0" encoding="Cp1252"?>
    <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN' 'http://java.sun.com/j2ee/dtds/web-app_2.2.dtd'>
    <web-app>
    <display-name>ReservationWAR</display-name>
    <description>no description</description>
    <servlet> <servlet-name>ReservationServlet</servlet-name>
    <display-name>ReservationServlet</display-name>
    <description>no description</description>
    <servlet-class>ReservationServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>ReservationServlet</servlet-name>
    <url-pattern>ReservationAlias</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <resource-ref>
    <description>no description</description>
    <res-ref-name>jdbc/ReservationDB</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <ejb-ref> <description>no description</description>
    <ejb-ref-name>ejb/Reservation</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <home>ReservationHome</home>
    <remote>Reservation</remote>
    </ejb-ref>
    </web-app>

    Are you sure your servlet class itself can run without problem? Try debug in the these steps:
    1. Change your servlet to simply output some HTML text, so you can be sure tomcat can get to your servlet. If this is OK, it means the servlet itself has problem, probably the EJB stuff.
    2. Make sure the EJB container is running.
    3. Make your servlet a standalone client (not a servlet) and see if it can run. Pay attention to how you do JNDI lookup of the EJB.
    Yi

  • Servlet JDBC

    Can anyone please help me with pointing to the right direction on webapplications.
    I have a table in the database that returns 50K rows when running a query. I have been reading through some books and forums, SDN including that a correct way to access the database is through the Business tier EJB session beans and JPA and access these objects from Servlets. I understand that and I have an example that works using paging so I do not need to send all 50K records at once. My question is, the resultset retrieves entity objects and I have to create data transfer objects for each one of them to send to the GWT client? Doesn't it mean I have twice as much objects in the memory at a time to compare with accessing database through JDBC from Servlets directly? In the later case I wouldn't have any entity objects and occupy less memory? Is it completely wrong idea?
    Thanks

    mambo_jumbo wrote:
    Without their superpowers some of them are still not serializable for GWT.
    Never mind,
    Thanks for answer.I don't understand what the problem is here.
    Dod you have a problem with making them Serializable? They have to be Serializable if you want to make them arguments to remote methods anyway.

  • 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.

  • Which tutorials may you suggest for JDBC and servlets?

    Hello, i would to learn about JDBC and servlets.
    May you please suggest me a good tutorial(e.g.post me a link) in order to study for JDBC and servlets?
    e.g. How to make a servlet etc.
    Thanks, in advance!

    I agree with PhHein, it's best to learn one technology and then the other. (Just my two cents, but start with JDBC from a simple standalone application, then when that is working, try to tackle Servlets, since you will need to also learn how to get them working in a container like Tomcat).
    Here is a tutorial that has both concepts in it at the same time. Site is down now, but is usually up. http://www.roseindia.net/jdbc/jdbcconnectivity.shtml
    Also, you will eventually want to download a J2EE container such as Tomcat or Jboss.
    - Saish

  • JDBC on Servlets

    The following worked on my machine as a java console, but tomcat does not seem to like ir. It excepts on classnotfound
    com.mysql.jdbc.Driver
    help?
    try
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    catch (Exception e)
    System.out.println(e.toString());
    // localhost192.168.1.101
    Connection conn =
    DriverManager.getConnection("jdbc:mysql://localhost:3306?" +
    "user=root&password=secret");

    JDBC on Servlets ...is undesirable for most (professional) projects.
    try to keep db access code out of your web app if
    possible. It's just good conventionAt best that statement is confusing.
    I can only guess that you were suggesting that a database layer should be used rather than putting the JDBC code directly in the servlet code.

  • My servlet can not access  ejb

    hi all
    i write a simple helloword EJB
    i deloy it ok in weblogic7
    when i want to write a servlet to access ejb
    it failed
    should i setting the web.xml or weblogic.xml
    anyone can give me a sample
    thanks a lot
    the error message is
    ####<Sep 21, 2003 11:36:35 PM GMT+08:00> <Error> <HTTP> <kingson> <myserver> <ExecuteThread:
    '9' for queue: 'default'> <kernel identity> <> <101017> <[ServletContext(id=7157216,name=servletCode,context-path=/servletCode)]
    Root cause of ServletException>
    java.lang.NoClassDefFoundError
    at javax.rmi.PortableRemoteObject.createDelegateIfSpecified(PortableRemoteObject.java:182)
    at javax.rmi.PortableRemoteObject.<clinit>(PortableRemoteObject.java:61)
    at ejbtoServlet.doGet(ejbtoServlet.java:83)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:945)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:332)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:242)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5363)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:721)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3043)
    6650,1-8 99%

    still error!!!!
    i deloy the ejb as a jar file
    [root@kingson applications]# jar tf helloWorldBean.jar
    META-INF/MANIFEST.MF
    META-INF/
    META-INF/weblogic-ejb-jar.xml
    META-INF/ejb-jar.xml
    hello/
    hello/HelloWorldHome.class
    hello/HelloWorldBean.class
    hello/HelloWorld.class
    hello/HelloWorldBean_nru4ls_HomeImplRTD.xml
    hello/HelloWorldBean_nru4ls_EOImplRTD.xml
    hello/HelloWorldBean_nru4ls_EOImpl.class
    hello/HelloWorldBean_nru4ls_Impl.class
    hello/HelloWorldBean_nru4ls_HomeImpl.class
    WLGENERATED
    i also copy the helloClient.jar to the <web>/WEB-INF/classes
    and the <web>/WEB-INF/lib
    but it still not works
    maybe i should know what should be included in the helloClient.jar
    i just copy the
    helloWorld.class
    helloWorldBean.class
    helloWorldHome.class
    and the ejb-jar.xml.weblogic-ejb-jar.xml
    into the helloClient.jar
    also i set the EJB path into the bea system classpath
    so anything error???
    why the servlet not works
    my Swing client can access the EJB
    but the servlet not
    i am exhausted
    "Deepak Vohra" <[email protected]> wrote:
    >
    Copy the HelloWorld.class serlvet to the DefaultWebApp/WEB-INF/classes
    directory.
    In web.xml
    <servlet>
    <servlet-name>
    HelloWorld
    </servlet-name>
    <servlet-class>
    examples.servlets.HelloWorld
    </servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>
    HelloWorld
    </servlet-name>
    <url-pattern>
    HelloWorld
    </url-pattern>
    </servlet-mapping>
    "kingson" <[email protected]> wrote:
    hi all
    i write a simple helloword EJB
    i deloy it ok in weblogic7
    when i want to write a servlet to access ejb
    it failed
    should i setting the web.xml or weblogic.xml
    anyone can give me a sample
    thanks a lot
    the error message is
    ####<Sep 21, 2003 11:36:35 PM GMT+08:00> <Error> <HTTP> <kingson> <myserver>
    <ExecuteThread:
    '9' for queue: 'default'> <kernel identity> <> <101017> <[ServletContext(id=7157216,name=servletCode,context-path=/servletCode)]
    Root cause of ServletException>
    java.lang.NoClassDefFoundError
    at javax.rmi.PortableRemoteObject.createDelegateIfSpecified(PortableRemoteObject.java:182)
    at javax.rmi.PortableRemoteObject.<clinit>(PortableRemoteObject.java:61)
    at ejbtoServlet.doGet(ejbtoServlet.java:83)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:945)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:332)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:242)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5363)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:721)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3043)
    6650,1-8
    99%

  • Can not catch in servlet exception thrown by EJB

    Hello everybody.
    I created an exception class InvalidDataException derived from Exception. This exception is thrown in an EJB session.
    In my servlet I wrote two catch blocks. The first one is :
    catch(InvalidDataException ex) and the second one is catch(Exception ex).
    The InvalidDataException is not catched in the InvalidDataException block but in the Exception block. And in the Exception block I display the class of the catched exception, the class is the class of my InvalidDataException.
    I hope my explanation is clear...
    Any ideas ??
    Thank you for your help
    Here is the stacktrace, there are french words, dont be afraid :-)
    10:20:48,261 INFO  [STDOUT] avant lancement exception invalidData
    10:20:48,264 ERROR [[BookServlet]] Servlet.service() for servlet BookServlet threw exception
    pipeline.MyExceptions.InvalidDataException: La date de d\uffffbut doit \ufffftre ant\uffffrieure \uf
    fff la date de fin du projet
            at pipeline.ejb.FacadeBean.verifDates(FacadeBean.java:169)
            at pipeline.ejb.FacadeBean.reserverRess(FacadeBean.java:125)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
            at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionConta
    iner.java:228)
            at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI
    nterceptor.java:158)
            at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance
    Interceptor.java:169)
            at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.
    java:71)
            at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
            at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
            at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
            at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
            at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
            at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:206)
            at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.
    java:136)
            at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:643)
            at org.jboss.ejb.Container.invoke(Container.java:917)
            at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
            at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
            at $Proxy110.reserverRess(Unknown Source)
            at pipeline.web.BookServlet.doPost(BookServlet.java:235)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
    ava:252)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
    ava: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:54)
            at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.ja
    va:174)
            at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
            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:868)
            at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Htt
    p11BaseProtocol.java:663)
            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:595)

    Hello,
    I fix my problem. I included the class InvalidDataException in the *.war and in the *.jar so there were 2 definitions of InvalidDataException. Thats why my exception was not catched.
    Bye

  • Having Two different Servlet applications on one EJB applciation

    Hi,
    I am running two web applications on tomcat servlet engine
    and one on orion servlet Engine both Access EJBs deployed on Orion application server which has the web app also.
    what are the consequences of having two different webapps
    accessing same EJB app in Real Time
    Thanks
    Jay

    It's one of the expected usage models. You often see people doing wireless this way, as a separate webapp pointing to the same set of EJBs.

  • Help With Servlet+JDBC Example?

    hi there
    i've made my first jsp page
    that contain two textfields name&description
    and i want that when the user presses the add button
    the information is sent to the servlet and the servlet add the information in the database
    how that can be done in the servlet?
    thank you

    You can extends the httpservlet, then implements the method of the doGet,and you can do what you want to do&#12290;
    it is easy&#65292; u had better find some book to read&#12290;

  • Desperate, help please Servlet.service() for servlet jsp threw exception

    Hi,
    I have completed 99.99% of project development, when I am about to deploy JSC throws "Servlet.service() for servlet jsp threw exception javax.faces.el.EvaluationException: java.lang.NullPointerException" I can't understand why.
    My application was working absolutely fine, I can't understand why its throwing exception now.
    I tried debuging, but i can't understand where exactly its throwing exception and whats the error.
    I would really appreciate your help, I have spent almost a day trying to figure out but din't get anywhere.
    here is my server.log
    Starting Sun Java System Application Server Platform Edition 8.0.0_01 (build b08-fcs) ...
    [#|2005-08-23T11:44:39.221+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|CORE5076: Using [Java HotSpot(TM) Client VM, Version 1.4.2_06] from [Sun Microsystems Inc.]|#]
    [#|2005-08-23T11:44:42.025+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.admin|_ThreadID=10;|ADM0020:Following is the information about the JMX MBeanServer used:|#]
    [#|2005-08-23T11:44:42.327+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.admin|_ThreadID=10;|ADM0001:MBeanServer initialized successfully|#]
    [#|2005-08-23T11:44:44.572+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|Creating virtual server server|#]
    [#|2005-08-23T11:44:44.598+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|S1AS AVK Instrumentation disabled|#]
    [#|2005-08-23T11:44:44.616+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.security|_ThreadID=10;|SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.|#]
    [#|2005-08-23T11:44:51.061+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.transaction|_ThreadID=10;|JTS5014: Recoverable JTS instance, serverId = [100]|#]
    [#|2005-08-23T11:44:53.917+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|Satisfying Optional Packages dependencies...|#]
    [#|2005-08-23T11:44:54.400+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=10;|RAR7008 : Initialized monitoring registry and listeners|#]
    [#|2005-08-23T11:44:56.346+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|CORE5100:Loading system apps|#]
    [#|2005-08-23T11:44:58.494+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.ejb|_ThreadID=10;|EJB5109:EJB Timer Service started successfully for datasource [jdbc/__TimerPool]|#]
    [#|2005-08-23T11:44:58.494+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.classloading|_ThreadID=10;|LDR5010: All ejb(s) of [__ejb_container_timer_app] loaded successfully!|#]
    [#|2005-08-23T11:44:59.954+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.classloading|_ThreadID=10;|LDR5010: All ejb(s) of [MEjbApp] loaded successfully!|#]
    [#|2005-08-23T11:45:01.401+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.classloading|_ThreadID=10;|LDR5010: All ejb(s) of [ConverterApp] loaded successfully!|#]
    [#|2005-08-23T11:45:01.407+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|WEB0100: Loading web module [ConverterApp:war-ic.war] in virtual server [server] at [converter]|#]
    [#|2005-08-23T11:45:02.500+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.classloading|_ThreadID=10;|LDR5010: All ejb(s) of [travelApp] loaded successfully!|#]
    [#|2005-08-23T11:45:02.792+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.classloading|_ThreadID=10;|LDR5010: All ejb(s) of [HelloWorldApp] loaded successfully!|#]
    [#|2005-08-23T11:45:02.798+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|WEB0302: Starting Tomcat.|#]
    [#|2005-08-23T11:45:03.281+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|WEB0100: Loading web module [adminapp] in virtual server [server] at [web1]|#]
    [#|2005-08-23T11:45:03.335+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|WEB0100: Loading web module [admingui] in virtual server [server] at [asadmin]|#]
    [#|2005-08-23T11:45:03.338+0100|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|WEB0500: default-locale attribute of locale-charset-info element has been deprecated and is being ignored. Use default-charset attribute of parameter-encoding element instead|#]
    [#|2005-08-23T11:45:03.351+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|WEB0100: Loading web module [com_sun_web_ui] in virtual server [server] at [com_sun_web_ui]|#]
    [#|2005-08-23T11:45:03.371+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|WEB0100: Loading web module [jTravellerService] in virtual server [server] at [jTravellerService]|#]
    [#|2005-08-23T11:45:03.399+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|WEB0100: Loading web module [hello-jaxrpc] in virtual server [server] at [hello-jaxrpc]|#]
    [#|2005-08-23T11:45:03.427+0100|INFO|sun-appserver-pe8.0.0_01|org.apache.catalina.startup.Embedded|_ThreadID=10;|Starting tomcat server|#]
    [#|2005-08-23T11:45:03.428+0100|INFO|sun-appserver-pe8.0.0_01|org.apache.catalina.startup.Embedded|_ThreadID=10;|Catalina naming disabled|#]
    [#|2005-08-23T11:45:03.637+0100|INFO|sun-appserver-pe8.0.0_01|org.apache.catalina.core.StandardEngine|_ThreadID=10;|Starting Servlet Engine: Sun-Java-System/Application-Server-PE-8.0|#]
    [#|2005-08-23T11:45:13.214+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.resource.webservices.rpc.server.http|_ThreadID=10;|JAXRPC.JAXRPCSERVLET.12: JAX-RPC context listener initializing|#]
    [#|2005-08-23T11:45:14.087+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.resource.webservices.rpc.server.http|_ThreadID=10;|JAXRPC.JAXRPCSERVLET.14: JAX-RPC servlet initializing|#]
    [#|2005-08-23T11:45:14.268+0100|INFO|sun-appserver-pe8.0.0_01|org.apache.catalina.startup.ContextConfig|_ThreadID=10;|Missing application web.xml, using defaults only StandardEngine[server].StandardHost[server].StandardContext[]|#]
    [#|2005-08-23T11:45:18.600+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.resource.webservices.rpc.server.http|_ThreadID=10;|JAXRPC.JAXRPCSERVLET.12: JAX-RPC context listener initializing|#]
    [#|2005-08-23T11:45:18.657+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.resource.webservices.rpc.server.http|_ThreadID=10;|JAXRPC.JAXRPCSERVLET.14: JAX-RPC servlet initializing|#]
    [#|2005-08-23T11:45:20.710+0100|INFO|sun-appserver-pe8.0.0_01|org.apache.coyote.http11.Http11Protocol|_ThreadID=10;|Initializing Coyote HTTP/1.1 on port 18080|#]
    [#|2005-08-23T11:45:20.790+0100|INFO|sun-appserver-pe8.0.0_01|org.apache.coyote.http11.Http11Protocol|_ThreadID=10;|Starting Coyote HTTP/1.1 on port 18080|#]
    [#|2005-08-23T11:45:21.125+0100|INFO|sun-appserver-pe8.0.0_01|org.apache.coyote.http11.Http11Protocol|_ThreadID=10;|Initializing Coyote HTTP/1.1 on port 11043|#]
    [#|2005-08-23T11:45:21.144+0100|INFO|sun-appserver-pe8.0.0_01|org.apache.coyote.http11.Http11Protocol|_ThreadID=10;|Starting Coyote HTTP/1.1 on port 11043|#]
    [#|2005-08-23T11:45:21.503+0100|INFO|sun-appserver-pe8.0.0_01|org.apache.coyote.http11.Http11Protocol|_ThreadID=10;|Initializing Coyote HTTP/1.1 on port 14848|#]
    [#|2005-08-23T11:45:21.537+0100|INFO|sun-appserver-pe8.0.0_01|org.apache.coyote.http11.Http11Protocol|_ThreadID=10;|Starting Coyote HTTP/1.1 on port 14848|#]
    [#|2005-08-23T11:45:21.989+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.resource.jms|_ThreadID=10;|JMS5023: JMS service successfully started. Instance Name = imqbroker, Home = [/opt/Creator/SunAppServer8/imq/bin].|#]
    [#|2005-08-23T11:45:22.003+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.admin|_ThreadID=10;|[AutoDeploy] Enabling AutoDeployment service at :1124793922003|#]
    [#|2005-08-23T11:45:22.009+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|CORE5053: Application onReady complete.|#]
    [#|2005-08-23T11:45:22.012+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|Application server startup complete.|#]
    [#|2005-08-23T11:45:27.303+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.admin|_ThreadID=11;|ADM1041:Sent the event to instance:[ResourceDeployEvent -- deploy jcp/RaveGenerated_1124793926_NFDBPool]|#]
    [#|2005-08-23T11:45:28.918+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=11;|CORE5004: Resource Deployed: [jcp:RaveGenerated_1124793926_NFDBPool].|#]
    [#|2005-08-23T11:45:29.169+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.admin|_ThreadID=11;|ADM1041:Sent the event to instance:[ResourceDeployEvent -- deploy jdbc/jdbc/NFDB]|#]
    [#|2005-08-23T11:45:29.365+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=11;|CORE5004: Resource Deployed: [jdbc:jdbc/NFDB].|#]
    [#|2005-08-23T11:45:31.996+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.deployment|_ThreadID=11;|DPL5109: EJBC - START of EJBC for [_linnfdb]|#]
    [#|2005-08-23T11:45:31.999+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.deployment|_ThreadID=11;|Processing beans ...|#]
    [#|2005-08-23T11:45:32.032+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.deployment|_ThreadID=11;|DPL5110: EJBC - END of EJBC for [_linnfdb]|#]
    [#|2005-08-23T11:45:32.915+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.deployment|_ThreadID=11;|Total Deployment Time: 2082 msec, Total EJB Compiler Module Time: 37 msec, Portion spent EJB Compiling: 1%
    Breakdown of EJBC Module Time: Total Time for EJBC: 37 msec, CMP Generation: 0 msec (0%), Java Compilation: 0 msec (0%), RMI Compilation: 0 msec (0%), JAX-RPC Generation: 19 msec (51%),
    |#]
    [#|2005-08-23T11:45:32.928+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.deployment|_ThreadID=11;|deployed with moduleid = _linnfdb|#]
    [#|2005-08-23T11:45:32.990+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.admin|_ThreadID=11;|ADM1041:Sent the event to instance:[ModuleDeployEvent -- deploy web/_linnfdb]|#]
    [#|2005-08-23T11:45:33.275+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.admin|_ThreadID=11;|ADM1041:Sent the event to instance:[ModuleDeployEvent -- enable web/_linnfdb]|#]
    [#|2005-08-23T11:45:33.352+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=11;|WEB0100: Loading web module [_linnfdb] in virtual server [server] at [linnfdb]|#]
    [#|2005-08-23T11:45:34.837+0100|WARNING|sun-appserver-pe8.0.0_01|org.apache.commons.beanutils.MethodUtils|_ThreadID=11;|Cannot use JVM pre-1.4 access bug workaround die to restrictive security manager.|#]
    [#|2005-08-23T11:45:35.346+0100|WARNING|sun-appserver-pe8.0.0_01|org.apache.commons.digester.Digester|_ThreadID=11;|[ConverterRule]{faces-config/converter} Merge(null,java.math.BigDecimal)|#]
    [#|2005-08-23T11:45:35.364+0100|WARNING|sun-appserver-pe8.0.0_01|org.apache.commons.digester.Digester|_ThreadID=11;|[ConverterRule]{faces-config/converter} Merge(null,java.math.BigInteger)|#]
    [#|2005-08-23T11:45:37.265+0100|INFO|sun-appserver-pe8.0.0_01|com.sun.faces.config.ConfigureListener|_ThreadID=11;|Application object verification completed successfully|#]
    [#|2005-08-23T11:45:37.396+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.admin|_ThreadID=11;|ADM1042:Status of dynamic reconfiguration event processing:[success]|#]
    [#|2005-08-23T11:46:28.167+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.stream.out|_ThreadID=12;|login successfull145|#]
    [#|2005-08-23T11:46:28.961+0100|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.stream.out|_ThreadID=12;|
    assigned to user query|#]
    [#|2005-08-23T11:46:34.715+0100|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=12;|ApplicationDispatcher[/linnfdb] Servlet.service() for servlet jsp threw exception
    javax.faces.el.EvaluationException: java.lang.NullPointerException      
    at
    com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)
         at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
         at javax.faces.component.UISelectItems.getValue(UISelectItems.java:110)
         at com.sun.faces.util.Util.getSelectItems(Util.java:602)
         at com.sun.faces.renderkit.html_basic.MenuRenderer.getOptionNumber(MenuRenderer.java:488)
         at com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRenderer.java:465)
         at com.sun.faces.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:430)
         at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:720)
         at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:443)
         at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:130)
         at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
         at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:435)
         at com.sun.faces.renderkit.html_basic.TableRenderer.encodeBegin(TableRenderer.java:113)
         at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:683)
         at javax.faces.component.UIData.encodeBegin(UIData.java:681)
         at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:591)
         at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:543)
         at com.sun.faces.taglib.html_basic.DataTableTag.doEndTag(DataTableTag.java:491)
         at org.apache.jsp.NationalFaultsDataBase_jsp._jspx_meth_h_dataTable_0(NationalFaultsDataBase_jsp.java:581)
         at org.apache.jsp.NationalFaultsDataBase_jsp._jspx_meth_h_form_0(NationalFaultsDataBase_jsp.java:331)
         at org.apache.jsp.NationalFaultsDataBase_jsp._jspx_meth_f_view_0(NationalFaultsDataBase_jsp.java:291)
         at org.apache.jsp.NationalFaultsDataBase_jsp._jspService(NationalFaultsDataBase_jsp.java:182)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:102)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:282)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:263)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:210)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         at sun.reflect.GeneratedMethodAccessor84.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:236)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:141)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:718)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:478)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:413)
         at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:77)
         at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:92)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:319)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
         at com.sun.jsfcl.app.ViewHandlerImpl.renderView(ViewHandlerImpl.java:181)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:236)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:141)
         at linnfdb.data.SecurityCheckFilter.doFilter(SecurityCheckFilter.java:102)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:218)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:188)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:141)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:214)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:168)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:133)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:539)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:254)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:114)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
         at com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:166)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:936)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:165)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:683)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:604)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:542)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:647)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: java.lang.NullPointerException
         at com.sun.jsfcl.data.ResultSetPropertyResolver$ColumnData.getSelectItems(ResultSetPropertyResolver.java:303)
         at com.sun.jsfcl.data.ResultSetPropertyResolver.getValue(ResultSetPropertyResolver.java:61)
         at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:167)
         at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:151)
         at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
         at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
         ... 115 more
    |#]
    any help will be greatly appreciated. Pleaseeeeeeeeeeeeee can some get back to me.
    Cheers
    kumar

    hi,
    I just found that this exception is thrown from function
    public UIViewRoot createView(FacesContext context, String viewId) {
    UIViewRoot viewRoot = handler.createView(context, viewId);
    context.getExternalContext().getRequestMap().put(CREATED_VIEW, viewId);
    setupPageBean(context, viewRoot);
    return viewRoot;
    in viewHandlerImpl.java.
    Has anyone got ideas about this???
    Any help will be greatly appreciated.
    cheers
    kush

  • EJB Performance Test

    How do i test MY EJB performance from a Desktop client or JSP or Servlet, I don't have any testing tools

    Hi ,
    If u don't have any tool as such , then you can try testing your EJBs from more than one macines at least.
    I think, the real performance of any distributed components won't be really tested unless and until they are tested for many requests. This is specificaly true with the EJB transactions for dead-locks.
    If u don't have any tool , then u can write a program that sends many requests in a loop , for JNDI look-ups .
    Hope this helps .
    -amit

  • JDBC, JMS and EJB transactions - possible problem?

    Hello,
              I am using Oracle 9, Weblogic 8.1 SP 4, MyEclipse and
              XDoclet.
              In my current project I have the following piece of code
              in one of my message driven beans (code cited as pseudocode
              without unnecessary details):
              * @ejb.bean name="MyMessageProcessor"
              * display-name="Display name for a MyMessageProcessor"
              * jndi-name="ejb/MyMessageProcessor"
              * description="Bean MyMessageProcessor"
              * destination-type="javax.jms.Queue"
              * transaction-type="Container"
              * acknowledge-mode="Auto-acknowledge"
              * subscription-durability="Durable"
              * generate="false"
              * @ejb.transaction type="Required"
              public class MyMessageProcessor implements MessageDrivenBean, MessageListener {
              public void onMessage(Message msg) {
                   try {
                        //obtaining connections to two different databases via JNDi
                        java.sql.Connection connOne =
                        ((DataSource)ctx.lookup("DataSourceOne")).getConnection();          
                        java.sql.Connection connTwo =
                             ((DataSource)ctx.lookup("DataSourceTwo")).getConnection();
                        // performing some UPDATEs and INSERTs on connOne and connTwo
                        // calling some other methods of this bean
                        //creating the reply JMS message and sending it to another JMS queue
                        Message msgTwo = this.createReplyMessage(msg)
                        this.queueSender.send(msgTwo);
                        //commiting everything
                        this.queueSession.commit();          
                   } catch (Exception ex) {
                   try {
                        if (this.queueSession!=null) this.queueSession.rollback();
                   } catch (JMSException JMSEx) {};     
                   this.context.setRollbackOnly();
              Some days ago (before the final remarks from my client) there used to be only one DataSource configurated on the basis of the
              connection pool with non-XA jdbc driver. Everything worked fine
              including the transactions (if anything wrong happend not only wasn't the replymessage sent, but also no changes were written
              to database and the incomming message was thrown back to the my bean's
              queue).
              When I deployed the second DataSource I was informed by an error message, that only one non-transactional resource may
              participate in a global transaction. When I changed both datasources
              to depend on underlying datasources with transatcional (XA) jdbc drivers, everything stopped working. Even if
              EJB transaction was theoretically successfully rolledbacked, the changed were written to the database
              and the JMS message wasn't resent to the JMS queue.
              So here are my questions:
                   1. How to configure connection pools to work in such situations? What JDBC drivers should I choose?
                   Are there any global server configurations, which may influence this situation?
                   2. Which jdbc drivers should I choose so that the container was able to rollback the database transactions
                   (of course, if necessary)?
                   3. Are there any JMS Queue settings, which would disable the container to send message back to the
                   queue in case of setRollbackOnly()? How should be the Queue configurated?
              As I am new to the topic and the deadline for the project seems to be too close I would be grateful
              for any help.
              This message was sent to EJB list and JDBC list.
              Sincerely yours,
              Marcin Zakidalski

    Hi,
              I found these information extremely useful and helpful.
              The seperate transaction for sending messages was, of course, unintentional. Thanks a lot.
              Anyway, I still have some problems. I have made some changes to the
              code cited in my previous mail. These changes included changing QueueSessions
              to non-transactional. I also set the "Honorate global transactions" to true.
              I am using XA JDBC driver. After setting "Enable local transactions" to false
              (I did it, because I assume that JDBC transactions should be part on the global
              EJB transaction) I got the following error:
              java.sql.SQLException: SQL operations are not allowed with no global transaction by default for XA drivers. If the XA
              driver supports performing SQL operations with no global transaction, explicitly allow it by setting
              "SupportsLocalTransaction" JDBC connection pool property to true. In this case, also remember to complete the local
              transaction before using the connection again for global transaction, else a XAER_OUTSIDE XAException may result. To
              complete a local transaction, you can either set auto commit to true or call Connection.commit() or Connection.rollback().
              I have also inspected the calls of methods of bean inside of onMessage() method just to check, whether
              the transactions are correctly initialized (using the weblogic.transaction.Transaction class).
              My questions are as follows:
              1. Any suggestions how to solve it? I have gone through the google answers on that problem and only
              thing I managed to realize that JDBC must start its own transaction. Is there any way to prohibit it
              from doing that? Can using setAutocommit(true/false) change the situation for better?
              2. How to encourage the JDBC driver to be a part of EJB transaction?
              3. As I have noticed each of ejb method has its own transactions (transactions have different
              Xid). Each method of the bean has "required" transaction attribute. Shouldn't it work in such
              way that if already started transaction exists it is used by the called method?
              4. The DataSources are obtained in my application via JNDI and in the destination environment I will have slight
              impact on the configuration of WebLogic. What is least problematic and most common WebLogic configuration which would
              enable JDBC driver to participate in the EJB transaction? Is it the WebLogic configuration problem or can it be
              solved programmically?
              Currently my module works quite fine when "enable local transactions" for DataSources is set to true, but this way
              I am loosing the ability to perform all actions in one transaction.
              Any suggestions / hints are more than welcomed. This message was posted to jdbc list and ejb list.
              Marcin

Maybe you are looking for

  • Interactive report code plz

    need an  interactive report to list the purchase orders details for a vendor that has interactive drill down options to give the detail of vendor from vendor master.

  • Terrible dl speeds

    Kind of getting fed up now, I either have really slow speeds or inconsistent connection. I am a heavy user, with playing games online and streaming movies and tv, so I pay for unlimited up to 20mb bb. Its not like I expect 20mb bb, but a little bit o

  • Adobe premier pro cc always crashes at startup

    adobe premier pro cc always crashes at startup

  • How to start a background engine

    When I use wfbkg.sql to start a background engine, it says wf_engine.Background has not been identified. What should I do? And is it necessary to use background engines? thanks, Alice

  • I can't get Imovie to import video edited with quicktime...any suggestions

    I use imovie often. I edited some video with quicktime (basically just shortening clips). Imovie will not import the files. Any help with this would be really appreciated since there's a heap of it. Thanks Windsor