Error while creating, Jetty Connection pool (Illegeal State Exception).

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Error while creating, Jetty Connection pool (Illegeal State Exception).

This post was updated on .
hi everybody,
   I want to create a jetty connection pool. So for that,
   i have created a new Java web app.
   In this,
     i created one jsp file to list the table content which is stored in derby database.
     code snippets of my index.jsp are:
       javax.naming.Context initContext = new javax.naming.InitialContext();
       javax.naming.Context envContext = (Context) initContext.lookup("java:/comp/env");
       javax.sql.DataSource ds = (DataSource) envContext.lookup("jdbc/TestDB");
       java.sql.Connection conn = ds.getConnection();
       java.sql.Statement stmt = conn.createStatement();
       java.sql.ResultSet resultset = stmt.executeQuery("select * from tbl_user");

     And my xml files under "web" package, of my project are attached with this post:
       i) web.xml:
       ii) jetty-web.xml:
      iii) jetty-env.xml:
    I got an error as IllegalStateException.... Error log is attached below.
Error Logs :-

        So, anybody please help to resolve this...
   Note, i am using Jetty-6.1.3 - this package downloaded from,
   " "

I dont know, the way, which i going is correct or not ??
So, Please guide and give me a solution to solve this problem..
Thanks in advance.