Tomcat - MySQL - Cannot create resource instance

I keep getting an error when trying to lookup my JNDI name. I know that this name is bound to a Context because I can list the bindings
Context initCtx = new InitialContext();
NamingEnumeration enum = initCtx.listBindings("java:comp/env/jdbc");
while (enum.hasMoreElements()) {
System.out.println(enum.nextElement().toString());
And sure enough the name of my database I added through the console appears. However, I keep getting this error:
javax.naming.NamingException: Cannot create resource instance
on this second line of code
Context ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/ArgonautDB");
My MySQL Connector jar file is in $CATALINA_HOME/common/lib and I believe my server.xml settings are correct because I added this Data Source to the context through the console and the web.xml file should be simple...nevertheless I still get this error.
Any suggestions on where I else I can turn. Pulling my precious few last hairs out here....

Thank you very much. That did the trick. Actually what did the trick was to reinstall tomcat with the standard installation, NOT the LE installation which doesn't include the dbcp jar files needed for connecting to a database - but you were right about missing those.
I was dissapointed in Tomcat's documentation of this issue. I would have thought that something that has to have caused other developers problems like this would have been documented somewhere more pronounced (if at all) on Tomcat's site.
For those other newbies out there who don't want to pull out your hair...here is a summary of the steps I took to remedy this problem.
1) Install the latest version of Tomcat. Do NOT install the LE version, it does not include the neccessary library files to connect to a database (commons-dbcp.jar and commons-pool.jar).
2) Download the latest mysql connector library from http://www.mysql.com/downloads/mysqlcc.html. Once you have extracted the tar file, there will be some directories, a README file, a couple other text files and a jar file named mysql-connector-java-VERSION-stable-bin.jar. Move the mysql-connector-java-VERSION-stable-bin.jar file to $CATALINA_HOME/common/lib.
3) Follow the instructions on http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
to create a test database, a test jsp file and a test class to access the database.

Similar Messages

  • Cannot create resource instance (Works on NetBeans/Tomcat)

    I have a project that works just fine in NetBeans w/ Tomcat but when I deploy it to Sun One Web Server 6.1 SP5 I get the following error:
    StandardWrapperValve[jsp]: WEB2792: Servlet.service() for servlet jsp threw exception
    javax.servlet.ServletException: Cannot create resource instance
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:536)
         at jsps.index_jsp._jspService(_index_jsp.java:91)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:687)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:459)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:375)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:580)
    ----- Root Cause -----
    javax.naming.NamingException: Cannot create resource instance
         at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:167)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:834)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
         at org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at jsps.index_jsp._jspService(_index_jsp.java:79)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:687)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:459)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:375)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:580)
    I have the following in my in context.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/BOEnterpriseTest1">
    <Resource name="jdbc/dev10g" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@10.10.10.10:1521:dev" username="userid" password="pwd" maxActive="20" maxIdle="10" maxWait="-1"/>
    </Context>
    I have the following in my web.xml:
    <resource-ref>
    <description>jdbc:oracle:thin:@10..10.10.10:1521:dev</description>
    <res-ref-name>jdbc/dev10g</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    What�s missing on the Sun One server?

    I am trying to do a refresh of a Crystal Reports report in a JSP.
    Using the web.xml looking like:
    <resource-ref>
    <description>jdbc:oracle:thin:@10.10.
    10.10:1521:dev10g</description>
    <res-ref-name>jdbc/dev10g</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Application</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    and code in my JSP:
    <%
    InitialContext initContext = new InitialContext();
    DataSource source = (DataSource) initContext.lookup("java:comp/env/jdbc/dev10g");
    Context initCtx = new InitialContext();
    Context envCtx = (Context) initCtx.lookup("java:comp/env");
    try{
    DataSource ds = (DataSource)initCtx.lookup("Data");
    catch ( NamingException e ){
    DataSource ds = (DataSource) initContext.lookup("java:comp/env/jdbc/dev10g");
    initCtx.bind("Data", ds);     
    I get the following error:
    WEB2720: Error initializing naming context for context /BOEnterpriseTest1
         javax.naming.NameNotFoundException: WEB3885: Name Data is not bound in this Context
              at org.apache.naming.NamingContext.lookup(NamingContext.java:811)
              at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
              at com.iplanet.ias.web.WebModule.verifyResType(WebModule.java:510)
              at com.iplanet.ias.web.WebModule.bindResources(WebModule.java:410)
              at com.iplanet.ias.web.WebModule.bindGlobalResourceRefs(WebModule.java:352)
              at com.iplanet.ias.web.WebModule.createNamingContext(WebModule.java:323)
              at org.apache.catalina.core.StandardContext.start(StandardContext.java:3718)
              at com.iplanet.ias.web.WebModule.start(WebModule.java:251)
              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
              at org.apache.catalina.core.StandardHost.start(StandardHost.java:652)
              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
              at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:355)
              at org.apache.catalina.startup.Embedded.start(Embedded.java:995)
              at com.iplanet.ias.web.WebContainer.start(WebContainer.java:431)
              at com.iplanet.ias.web.WebContainer.startInstance(WebContainer.java:500)
              at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:161)
    What steps do I need to do on the Server side or in my code?

  • Javax.naming.NamingException: Cannot create resource instance (JOTM )

    Hi all,
    I wanted to create an application with transaction management, first i tired out tyrex but could get a thing out of it now i am trying out JOTM, but i am getting this error "javax.naming.NamingException: Cannot create resource instance ", below is my configuration..
    ===context.xml===
    <Context path="/FYPMS" docBase="FYPMS" debug="1" reloadable="true" crossContext="true" antiResourceLocking="true">
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_crs_log." suffix=".txt"
              timestamp="true"/>
         <Resource name="jdbc/mysql" auth="Container" type="javax.sql.DataSource"
    maxActive="100" maxIdle="30" maxWait="10000"
    username="root" password="password" driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://127.0.0.1:3306/fypms?autoReconnect=true"/>
    <Resource name="UserTransaction" auth="Container"
    type="javax.transaction.UserTransaction"/>
    <ResourceParams name="UserTransaction">
    <parameter>
    <name>factory</name>
    <value>org.objectweb.jotm.UserTransactionFactory</value>
    </parameter>
    <parameter>
    <name>jotm.timeout</name>
    <value>60</value>
    </parameter>
    </ResourceParams>
    </Context>
    ===web.xml===
    <resource-ref>
    <res-ref-name>jdbc/mysql</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    ===insert.java===
    try{
    System.out.println("pass0");
    Context ctx = new InitialContext();
    Context envCtx = (Context)ctx.lookup("java:comp/env");
    DataSource datasource = (javax.sql.DataSource)envCtx.lookup("jdbc/mysql");               
    UserTransaction ut = (UserTransaction)envCtx.lookup("UserTransaction");
    ut.begin();
    the dataSource can be retrieve successfully but when i tired to retrieve the UserTransaction i get a "Cannot create resource instance ". Please help mi out with this.. thx
    fatmond

    we are trying to connect MS Access thru tomcat and it is giving the above exception
    i have changed the server.xml
    <Resource name="jdbc/Mess" auth="Container" scope="Shareable" type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/Mess">
    <parameter>
    <name>maxWait</name>
    <value>5000</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>4</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>admin</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:odbc:Mess</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>sun.jdbc.odbc.JdbcOdbcDriver</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>2</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>admin</value>
    </parameter>
    </ResourceParams>
    web.xml
    <resource-ref>
    <description>Access Datasource example</description>
    <res-ref-name>jdbc/Mess</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    java class
    Context initContext = new InitialContext();
    DataSource ds = (DataSource)initContext.lookup("java:/comp/env/jdbc/Mess");
    con = ds.getConnection();
    Please help.......

  • Cannot create resource instance

    Hi to get a pool connection I use a universal pool connection(ucp.jar). I did this:
    In the server.xml of tomcat i put these:
    <Resource
         name="onconsultas"
         auth="Container"
         description ="Pool for onconsultas"
         type="oracle.jdbc.pool.OracleConnectionPoolDataSource"               
      />In the context.xml of tomcat i put these:
    <Context path="/onconsultas" docBase="onconsultas" debug="0" reloadable="true">
         <ResourceParams name = "onconsultas">
              <parameter>
                   <name>driverClassName</name>
                   <value>oracle.jdbc.driver.OracleDriver</value>
              </parameter>
              <parameter>
                   <name>factory</name>
                   <value>oracle.jdbc.pool.OracleDataSourceFactory</value>
              </parameter>
              <parameter>
                   <name>logAbandoned</name>
                   <value>true</value>
              </parameter>
              <parameter>
                   <name>removeAbandoned</name>
                   <value>true</value>
              </parameter>
              <parameter>
                   <name>removeAbandonedTimeout</name>
                   <value>60</value>
              </parameter>
              <parameter>
                   <name>url</name>
                   <value>jdbc:oracle:thin:@198.198.111.170:1521:asesoras</value>
              </parameter>
              <parameter>
                   <name>user</name>
                   <value>sisope</value>
              </parameter>
              <parameter>
                   <name>password</name>
                   <value>sisope</value>
              </parameter>
         </ResourceParams>  
    </Context>In the web.xml of tomcat( i also tried in the web.xml of mi aplication):
    resource-ref>
            <description>Description pool</description>
            <res-ref-name>onconsultas</res-ref-name>
            <res-type>oracle.jdbc.pool.OracleConnectionPoolDataSource</res-type>
            <res-auth>Container</res-auth>
    </resource-ref>Finally in mi class I code:
    Context ctx = null;
    Context initCtx = new InitialContext();
      ctx = (Context) initCtx.lookup("java:comp/env");
      OracleConnectionPoolDataSource dataSource = ( OracleConnectionPoolDataSource) ctx.lookup("/onconsultas");in the line of the dataSource is the error and said:
    javax.naming.NamingException: Cannot create resource instance
    What is wrong? i don't get it

    I forgot: I 'm using tomcat 6.0.18 that came with the netbeans 6.9 and I `m not using servlets. Almost all the code is in the jsp.

  • HELP-DIALOG POP UP BOX-JAVA Cannot create XMLHTTP instance.

    After going to a Web site with Opera Browser, I get the following dialog box JAVA "Cannot create xmlhttp instance".
    Now it pops up when ever I use Opera, but not Internt Exployer. Can you tell a Newbie how to fix it?
    I uninstalled Java 1.4.2 & installed ( jre 1.5.0.05 ) and I still get the
    same Dialog Box. The Box stops me from using Opera Browser,
    because it reappears all the time. I NEED HELP. My OS is XP Home.
    PM me at( trader_zzzz, yahoo.com ). Thanks in advance, traderzzzz.

    Java is not involved in the error - Javascript is. Javascript is not Java, and except for the similar name, they have nothing in common. The problem is the way that Opera is interacting with Javascript and the webpage you visited. You probably want to look for the solution at Opera's website. This search listing may help:
    http://www.google.com/search?q=Cannot+create+xmlhttp+instance

  • Cannot create an instance of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)"

    Windows Server 2008
    SQL Express 2012
    Tried opening a .csv and a .xls file, without success. File is located on the local server and not somewhere else.
    I know, I know, the forums are full of this error message. But sometimes when you follow all of the rules, stuff still happens, or in this case Doesn't happen.
    I installed the proper ACE drivers (64 bit) and reconfigured SQL Server to allow Ad Hoc Queries. Hell I even rebooted the server after the install.
    I have successfully installed these drivers on several machines (work stations and servers), and all have worked just fine. So, I am at a loss as to why it won't work on this system. I might have forgotten some obscure setting, but I don't think so.
    Ted

    Registry fix was also tried?
    EXEC sp_MSSet_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'AllowInProcess', 1
    GO
    EXEC sp_MSSet_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'DynamicParameters', 1
    GO

  • Cannot create object

    Hi gurus,
    the following code:
    <b><i>DATA: ref_cl_rsd_odso TYPE REF TO cl_rsd_odso,
          ref_if_rsd_dta  type ref to if_rsd_dta,
          e_s_dta TYPE rsd_s_dta,
          wa_e_s_dta TYPE rsd_s_dta.
    START-OF-SELECTION.
    create object ref_cl_rsd_odso.
      CALL METHOD ref_cl_rsd_odso->if_rsd_dta~dta_get_info
        IMPORTING
          e_s_dta = e_s_dta.</i></b>
    return an activation error:
    "You cannot create an instance of the class "CL_RSD_ODSO" outside the class"          
    Could you help me?
    Thanks in advance!
    Bye!
    Ferdinando

    Hi,
    Go through the below code,
    We need to call the factory method to get the instance of this class.
    DATA: ref_cl_rsd_odso TYPE REF TO cl_rsd_odso,
    ref_if_rsd_dta type ref to if_rsd_dta ,
    e_s_dta TYPE rsd_s_dta,
    wa_e_s_dta TYPE rsd_s_dta.
    START-OF-SELECTION.
    CALL METHOD CL_RSD_ODSO=>FACTORY
    EXPORTING
       I_ODSOBJECT   = SPACE
       I_REFNM       =
       I_TXTLG       =
       I_TXTSH       =
       I_INFOAREA    =
       I_BWAPPL      =
      RECEIVING
        R_R_ODSO      = ref_cl_rsd_odso.
    EXCEPTIONS
       INPUT_INVALID = 1
       CANCELLED     = 2
       others        = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL METHOD ref_cl_rsd_odso->if_rsd_dta~dta_get_info
    IMPORTING
    e_s_dta = e_s_dta.
    Regards,
    Azaz Ali.

  • Cannot create DataSource, Exception in Tomcat 4.1

    I am running into a major problem with Tomcat4.1 trying to access a Datasource.
    I referenced about 7 articles one of which has the subject "Cannot create JDBC driver of class '' for connect URL 'null', cause..."
    but he is using Tomcat 5. I even tried to simulate his solution to mine but still no use.
    I tried to connect to the database the old fashion way and it worked... I get connected (JDBC connection w/o Datasource).
    I changed the XML many times but with no luck. I must be doing something stupid that I can't see.
    Any help is greatly appreciated.... I ran out of solutions...
    I initially loaded my app through Tomcat manager and created the DataSource through Tomcat admin screen.
    my CLASSPATH =
    C:\J4Log\logging-log4j-1.2.9\dist\lib\log4j-1.2.9.jar;
    C:\JBoss4-0\jboss-4.0.1sp1;C:\CONNX32\CONNXJDBC\JAVA\JAR\connxjdbc.jar;
    C:\JBuilderX\lib\mysql-connector-java-3.0.15-ga-bin.jar;
    C:\Program Files\Apache Group\Tomcat 4.1\common\lib\commons-dbcp-1.2.1.jar;
    C:\Program Files\Apache Group\Tomcat 4.1\common\lib\commons-pool-1.1.jar;
    C:\Program Files\Apache Group\Tomcat 4.1\common\lib\commons-collections-3.1.jar;
    C:\Program Files\Apache Group\Tomcat 4.1\common\lib\mysql-connector-java-3.1.8-bin.jar
    my web.xml =
    <resource-ref>
        <description>DB connection</description>
        <res-ref-name>jdbc/MyDBASE</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
      </resource-ref>-------------------
    The sample snipet to connect to the database (which works)
    ConnectionHelper contains the following (simplified)...
         Class.forName("com.mysql.jdbc.Driver").newInstance();
         return DriverManager.getConnection("jdbc:mysql://10.0.3.52/MyDBASE?user=Myadmin&password=AdminPWD");
      ConnectionHelper connectionHelper = new ConnectionHelper();
      Statement st = null;
      try {
        Connection conn = connectionHelper.getConnection();
        st = conn.createStatement();
        System.out.println("\n=========== ssuucceessffullllllll=======\n");
      catch (SQLException ex1) {
         System.out.println("error connecting=================");
         ex1.printStackTrace();
    whenever i execute my JSP (which calls my java class .. code follows....
      Context envCtx = (Context) init.lookup("java:comp/env");
           DataSource ds = (DataSource)envCtx.lookup("jdbc/MyDBASE");it breaks on the DataSource giving..
    org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '
    ' for connect URL 'null', cause:
    java.sql.SQLException: No suitable driver
            at java.sql.DriverManager.getDriver(DriverManager.java:243)
            at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
    rce.java:743)
            at org.apache.commons.dbcp.BasicD.........--
    Another error (which is from within the IDE) is
    java.lang.NoClassDefFoundError: tyrex/jdbc/xa/EnabledDataSource     at rg.apache.naming.factory.TyrexDataSourceFactory.getObjectInstance(TyrexDataSourceFactory.java:166)
         at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:164)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:834)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
         at simpleservlet.TestJSPBean.init(TestJSPBean.java:41)
         at org.apache.jsp.testJSP$jsp._jspService(testJSP$jsp.java:115)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)--------------------------
    and finally, Server.XML...
    <?xml version='1.0' encoding='utf-8'?>
    <Server className="org.apache.catalina.core.StandardServer" debug="0" port="8005" shutdown="SHUTDOWN">
      <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"/>
      <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" debug="0" jsr77Names="false"/>
      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" debug="0"/>
      <GlobalNamingResources>
        <Environment name="simpleValue" override="true" type="java.lang.Integer" value="30"/>
        <Resource name="jdbc/MyDBASE" scope="Shareable" type="javax.sql.DataSource"/>
        <ResourceParams name="jdbc/MyDBASE">
          <parameter>
            <name>validationQuery</name>
            <value>select now()</value>
          </parameter>
          <parameter>
            <name>url</name>
            <value>jdbc:mysql://10.0.3.52/MyDBASE?autoReconnect=true</value>
          </parameter>
          <parameter>
            <name>password</name>
            <value>AdminPWD</value>
          </parameter>
          <parameter>
            <name>maxActive</name>
            <value>4</value>
          </parameter>
          <parameter>
            <name>maxWait</name>
            <value>5000</value>
          </parameter>
          <parameter>
            <name>driverClassName</name>
             <value>org.gjt.mm.mysql.Driver</value>
          </parameter>
          <parameter>
            <name>username</name>
            <value>Myadmin</value>
          </parameter>
          <parameter>
            <name>maxIdle</name>
            <value>2</value>
          </parameter>
        </ResourceParams>
      </GlobalNamingResources>
      <Service className="org.apache.catalina.core.StandardService" debug="0" name="Tomcat-Standalone">
        <Engine className="org.apache.catalina.core.StandardEngine"
                   debug="0" defaultHost="localhost"
                   mapperClass="org.apache.catalina.core.StandardEngineMapper"
                   name="Standalone">
          <Host className="org........
            <Context className="org.apache.catalina.core.StandardContext" cachingAllowed="true"
                      charsetMapperClass="org.apache.catalina.util.CharsetMapper"
                      cookies="true" crossContext="false" debug="0"
                      displayName="simpleservlet"
                      docBase="/WebModule1" mapperClass="org.apache.catalina.core.StandardContextMapper"
                      path="/WebModule1" privileged="false" reloadable="false" swallowOutput="false"
                      useNaming="true"
                      workDir="work\Standalone\localhost\WebModule1"
                      wrapperClass="org.apache.catalina.core.StandardWrapper">
                 <Resource auth="Container"
                            description="DB connection"
                            name="jdbc/MyDBASE" scope="Shareable"
                            type="javax.sql.DataSource"/>
           </Context>
        </Engine>
      </Service>
    </Server>Thanks in advance for ANY help.

    I am running into a major problem with Tomcat4.1 trying to access a Datasource.
    I referenced about 7 articles one of which has the subject "Cannot create JDBC driver of class '' for connect URL 'null', cause..."
    but he is using Tomcat 5. I even tried to simulate his solution to mine but still no use.
    I tried to connect to the database the old fashion way and it worked... I get connected (JDBC connection w/o Datasource).
    I changed the XML many times but with no luck. I must be doing something stupid that I can't see.
    Any help is greatly appreciated.... I ran out of solutions...
    I initially loaded my app through Tomcat manager and created the DataSource through Tomcat admin screen.
    my CLASSPATH =
    C:\J4Log\logging-log4j-1.2.9\dist\lib\log4j-1.2.9.jar;
    C:\JBoss4-0\jboss-4.0.1sp1;C:\CONNX32\CONNXJDBC\JAVA\JAR\connxjdbc.jar;
    C:\JBuilderX\lib\mysql-connector-java-3.0.15-ga-bin.jar;
    C:\Program Files\Apache Group\Tomcat 4.1\common\lib\commons-dbcp-1.2.1.jar;
    C:\Program Files\Apache Group\Tomcat 4.1\common\lib\commons-pool-1.1.jar;
    C:\Program Files\Apache Group\Tomcat 4.1\common\lib\commons-collections-3.1.jar;
    C:\Program Files\Apache Group\Tomcat 4.1\common\lib\mysql-connector-java-3.1.8-bin.jar
    my web.xml =
    <resource-ref>
        <description>DB connection</description>
        <res-ref-name>jdbc/MyDBASE</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
      </resource-ref>-------------------
    The sample snipet to connect to the database (which works)
    ConnectionHelper contains the following (simplified)...
         Class.forName("com.mysql.jdbc.Driver").newInstance();
         return DriverManager.getConnection("jdbc:mysql://10.0.3.52/MyDBASE?user=Myadmin&password=AdminPWD");
      ConnectionHelper connectionHelper = new ConnectionHelper();
      Statement st = null;
      try {
        Connection conn = connectionHelper.getConnection();
        st = conn.createStatement();
        System.out.println("\n=========== ssuucceessffullllllll=======\n");
      catch (SQLException ex1) {
         System.out.println("error connecting=================");
         ex1.printStackTrace();
    whenever i execute my JSP (which calls my java class .. code follows....
      Context envCtx = (Context) init.lookup("java:comp/env");
           DataSource ds = (DataSource)envCtx.lookup("jdbc/MyDBASE");it breaks on the DataSource giving..
    org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '
    ' for connect URL 'null', cause:
    java.sql.SQLException: No suitable driver
            at java.sql.DriverManager.getDriver(DriverManager.java:243)
            at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
    rce.java:743)
            at org.apache.commons.dbcp.BasicD.........--
    Another error (which is from within the IDE) is
    java.lang.NoClassDefFoundError: tyrex/jdbc/xa/EnabledDataSource     at rg.apache.naming.factory.TyrexDataSourceFactory.getObjectInstance(TyrexDataSourceFactory.java:166)
         at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:164)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:834)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
         at simpleservlet.TestJSPBean.init(TestJSPBean.java:41)
         at org.apache.jsp.testJSP$jsp._jspService(testJSP$jsp.java:115)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)--------------------------
    and finally, Server.XML...
    <?xml version='1.0' encoding='utf-8'?>
    <Server className="org.apache.catalina.core.StandardServer" debug="0" port="8005" shutdown="SHUTDOWN">
      <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"/>
      <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" debug="0" jsr77Names="false"/>
      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" debug="0"/>
      <GlobalNamingResources>
        <Environment name="simpleValue" override="true" type="java.lang.Integer" value="30"/>
        <Resource name="jdbc/MyDBASE" scope="Shareable" type="javax.sql.DataSource"/>
        <ResourceParams name="jdbc/MyDBASE">
          <parameter>
            <name>validationQuery</name>
            <value>select now()</value>
          </parameter>
          <parameter>
            <name>url</name>
            <value>jdbc:mysql://10.0.3.52/MyDBASE?autoReconnect=true</value>
          </parameter>
          <parameter>
            <name>password</name>
            <value>AdminPWD</value>
          </parameter>
          <parameter>
            <name>maxActive</name>
            <value>4</value>
          </parameter>
          <parameter>
            <name>maxWait</name>
            <value>5000</value>
          </parameter>
          <parameter>
            <name>driverClassName</name>
             <value>org.gjt.mm.mysql.Driver</value>
          </parameter>
          <parameter>
            <name>username</name>
            <value>Myadmin</value>
          </parameter>
          <parameter>
            <name>maxIdle</name>
            <value>2</value>
          </parameter>
        </ResourceParams>
      </GlobalNamingResources>
      <Service className="org.apache.catalina.core.StandardService" debug="0" name="Tomcat-Standalone">
        <Engine className="org.apache.catalina.core.StandardEngine"
                   debug="0" defaultHost="localhost"
                   mapperClass="org.apache.catalina.core.StandardEngineMapper"
                   name="Standalone">
          <Host className="org........
            <Context className="org.apache.catalina.core.StandardContext" cachingAllowed="true"
                      charsetMapperClass="org.apache.catalina.util.CharsetMapper"
                      cookies="true" crossContext="false" debug="0"
                      displayName="simpleservlet"
                      docBase="/WebModule1" mapperClass="org.apache.catalina.core.StandardContextMapper"
                      path="/WebModule1" privileged="false" reloadable="false" swallowOutput="false"
                      useNaming="true"
                      workDir="work\Standalone\localhost\WebModule1"
                      wrapperClass="org.apache.catalina.core.StandardWrapper">
                 <Resource auth="Container"
                            description="DB connection"
                            name="jdbc/MyDBASE" scope="Shareable"
                            type="javax.sql.DataSource"/>
           </Context>
        </Engine>
      </Service>
    </Server>Thanks in advance for ANY help.

  • Tomcat 6.0.18, Cannot create JDBC driver of class '' for connect URL 'null'

    hi,
    I have searched through the web, none of the solution works for me. Hope I could get some suggestion from you.
    I am running tomcat 6.0.18 + eclipse 3.4.1 + jre 1.6 + jsp + jsf + mysql 5.0 on Ubuntu 8.10.
    The <GlobalNamingResources> configuration of TOMCAT_HOME/conf/server.xml
    <GlobalNamingResources>
        <!-- Editable user database that can also be used by
             UserDatabaseRealm to authenticate users
        -->
        <Resource name="UserDatabase" auth="Container"
                  type="org.apache.catalina.UserDatabase"
                  description="User database that can be updated and saved"
                  factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
                  pathname="conf/tomcat-users.xml" />
    <Resource name="jdbc/db" auth="Container"
    type="javax.sql.DataSource"
    factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
    driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/db?autoReconnect=true"
    username="xxx"
    password="xxx"
    maxActive="20"
    maxIdle="10"
    poolPreparedStatements="true" />
      </GlobalNamingResources>TOMCAT_HOME/conf/context.xml
    <Context>
        <!-- Default set of monitored resources -->
        <WatchedResource>WEB-INF/web.xml</WatchedResource>
        <!-- Uncomment this to disable session persistence across Tomcat restarts -->
        <!--
        <Manager pathname="" />
        -->
        <!-- Uncomment this to enable Comet connection tacking (provides events
             on session expiration as well as webapp lifecycle) -->
        <!--
        <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
        -->
    <ResourceLink global="jdbc/db" name="jdbc/db" type="javax.sql.DataSource"/>                
    </Context>An additional context.xml at eclipse'sworkspace/MyApplication/WebContent/META-INF
    <?xml version="1.0" encoding="UTF-8"?>
    <Context>
    <ResourceLink global="jdbc/db" name="jdbc/db" type="javax.sql.DataSource"/>                  
    </Context>web.xml of my application
      <resource-ref>
          <description>DB Connection</description>
          <res-ref-name>jdbc/db</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <res-auth>Container</res-auth>
      </resource-ref>This is the current configuration of the application, before this, I have followed the guidance of:
    [Apache Tomcat 6.0 JNDI Datasource HOW-TO|http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations]
    and all the solutions from
    [Cannot create JDBC driver of class..|http://www.theserverside.com/discussions/thread.tss?thread_id=25459]
    Please advice, what's going wrong?

    hi,
    I have searched through the web, none of the solution works for me. Hope I could get some suggestion from you.
    I am running tomcat 6.0.18 + eclipse 3.4.1 + jre 1.6 + jsp + jsf + mysql 5.0 on Ubuntu 8.10.
    The <GlobalNamingResources> configuration of TOMCAT_HOME/conf/server.xml
    <GlobalNamingResources>
        <!-- Editable user database that can also be used by
             UserDatabaseRealm to authenticate users
        -->
        <Resource name="UserDatabase" auth="Container"
                  type="org.apache.catalina.UserDatabase"
                  description="User database that can be updated and saved"
                  factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
                  pathname="conf/tomcat-users.xml" />
    <Resource name="jdbc/db" auth="Container"
    type="javax.sql.DataSource"
    factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
    driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/db?autoReconnect=true"
    username="xxx"
    password="xxx"
    maxActive="20"
    maxIdle="10"
    poolPreparedStatements="true" />
      </GlobalNamingResources>TOMCAT_HOME/conf/context.xml
    <Context>
        <!-- Default set of monitored resources -->
        <WatchedResource>WEB-INF/web.xml</WatchedResource>
        <!-- Uncomment this to disable session persistence across Tomcat restarts -->
        <!--
        <Manager pathname="" />
        -->
        <!-- Uncomment this to enable Comet connection tacking (provides events
             on session expiration as well as webapp lifecycle) -->
        <!--
        <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
        -->
    <ResourceLink global="jdbc/db" name="jdbc/db" type="javax.sql.DataSource"/>                
    </Context>An additional context.xml at eclipse'sworkspace/MyApplication/WebContent/META-INF
    <?xml version="1.0" encoding="UTF-8"?>
    <Context>
    <ResourceLink global="jdbc/db" name="jdbc/db" type="javax.sql.DataSource"/>                  
    </Context>web.xml of my application
      <resource-ref>
          <description>DB Connection</description>
          <res-ref-name>jdbc/db</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <res-auth>Container</res-auth>
      </resource-ref>This is the current configuration of the application, before this, I have followed the guidance of:
    [Apache Tomcat 6.0 JNDI Datasource HOW-TO|http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations]
    and all the solutions from
    [Cannot create JDBC driver of class..|http://www.theserverside.com/discussions/thread.tss?thread_id=25459]
    Please advice, what's going wrong?

  • Cannot create a session after the response has been committed (Tomcat 6)

    I'm getting a rather annoying error when I try to open a pretty basic JSP page.
    I'm rather new to the whole JSP scene, so I'm following the example found on pages 287 and onwards in "JSF in Action - Manning" in case anyone wanted to check my code against the source.
    I've searched for about 4 hours now, coming back to this site a couple of times, once reading about writeouts and stuff. But I'm not really sure this is the issue in this case and if it is, where exactly the problem lies.
    I've already fixed a number of errors I got (jtsl.jar and standard.jar missing etc...) but this particular problem is driving me (and my co-workers for that matter :-) ) up the wall.
    Anyone willing to help me out here?
    Error:
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Cannot create a session after the response has been committed
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
    root cause
    java.lang.IllegalStateException: Cannot create a session after the response has been committed
         org.apache.catalina.connector.Request.doGetSession(Request.java:2301)
         org.apache.catalina.connector.Request.getSession(Request.java:2075)
         org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
         org.apache.myfaces.context.servlet.SessionMap.setAttribute(SessionMap.java:53)
         org.apache.myfaces.util.AbstractAttributeMap.put(AbstractAttributeMap.java:103)
         org.apache.myfaces.util.AbstractAttributeMap.put(AbstractAttributeMap.java:35)
         org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedViewInServletSession(JspStateManagerImpl.java:523)
         org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedView(JspStateManagerImpl.java:358)
         javax.faces.application.StateManager.saveView(StateManager.java:47)
         org.apache.myfaces.application.jsp.JspViewHandlerImpl$StateMarkerAwareWriter.flushToWriter(JspViewHandlerImpl.java:387)
         org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:322)
         org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
         org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
    Source Code of login.jsp:
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <f:view>
    <html>
    <head>
         <title>
              <h:outputText value="ProjectTrack"/>
         </title>
    </head>
         <body>
              <table>
                   <tr>
                        <td>
                             <h:graphicImage url="/images/logo Skillteam.jpg"
                             alt="Welcome to ProjectTrack"
                             title="Welcome to ProjectTrack"
                             width="435" height="120"/>
                        </td>
                   <td>
                        <font face="Arial, sans-serif"
                        size="6">
                        <h:outputText value="ProjectTrack"/>
                        </font>
                   </td>
                   </tr>
         http://forum.java.sun.com/post!default.jspa?forumID=45#
    Click for bold     </table>
         </body>
    </html>
    </f:view>
    web.xml & faces-config
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
         <display-name>ProjectTrack</display-name>
         <welcome-file-list>
         <welcome-file>faces/login.jsp</welcome-file>
         <welcome-file>index.html</welcome-file>
         </welcome-file-list>
         <servlet>
         <servlet-name>Faces Servlet</servlet-name>
         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
         <load-on-startup>1</load-on-startup>
         </servlet>
         <servlet-mapping>
         <servlet-name>Faces Servlet</servlet-name>
         <url-pattern>/faces/*</url-pattern>
         </servlet-mapping>
    </web-app>
    <?xml version="1.0"?>
    <!DOCTYPE faces-config PUBLIC
    "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
    "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
    <faces-config>
         <navigation-rule>
              <from-view-id>/login.jsp</from-view-id>
              <navigation-case>
                   <from-outcome>success</from-outcome>
                   <to-view-id>/inbox.jsp</to-view-id>
              </navigation-case>
              <navigation-case>
                   <from-outcome>failure</from-outcome>
                   <to-view-id>/login.jsp</to-view-id>
              </navigation-case>
         </navigation-rule>
    </faces-config>Setup:
    Eclipse Europe 3.3.0
    Tomcat 6.0.13
    MyFaces 1.2
    JRE 1.6.0_02

    When searching for this error, this was the first page google gave me. I found the answer and just in case anyone else stumbles in here with the same question I thought I'd share my findings.
    Unfortunately, if your problem is the same as mine, you're going to feel pretty silly. I was navigating to the wrong page. If MyFaces(when running tomcat) tries to resolve to a page that doesn't exist, the error given above is what happens.
    In my case I accidentally put my .jsp page into the wrong directory and ended up banging my head against the wall for an hour figuring that out. Hope this helps someone.

  • Cannot create process to handle workflow instance conversation

    <Nov 18, 2002 1:04:30 PM IST> <Error> <B2B> <000000> <<Process>
    Hi,
    Iam getting following error when iam trying to invoke
    subworkflow.
    can anyone help me in solving this problem.
    regards
    Ananth
    ERROR: Cannot cr
    eate process null.>
    <Nov 18, 2002 1:04:30 PM IST> <Error> <B2B> <000000> <<B2B-BPM-Plugin> ERROR:
    Cannot create process to handle workflow instance conversation
    com.bea.b2b.protocol.ProcessManager$CreateException: ERROR: Cannot create proces
    s null.

    Hi Ajaz,
    Error description is not detailed enough to provide the solution. You need to post the error message what you got in the server log files. This should contain specific details about the issue.
    Not sure but issue may be related to JVM settings. if it is so, server log file will provide the error description.

  • PowerPivot - SP2013 - Cannot create the service instance because the parent Service does not exist

    Unable to setup PowerPivot using PowerPivot configuration tool.
    I have One server which has SQL 2012 SP1 and SP2013.
    The farm is configured with all service applications.
    SQL has default instance with DB Engine and SSAS Tabular. Reporting Services has been configured using SharePoint mode and has a service application.
    The Power Pivot instance is set up with DB Engine and the SSAS.
    I keep getting this error. Ive tried so many times uninstalling, making sure features removed, rebuilding the farm (thank god for autospinstaller..)
    11/07/13 12:06:17:6858 Verbose: CreateSystemServiceInstance.NeedsExecute
    11/07/13 12:06:17:6858 Verbose: Running function IsFarmConfigured to check whether SharePoint is configured regardless of availability
    11/07/13 12:06:17:6858 Verbose: Farm is configured
    11/07/13 12:06:17:6858 Verbose: Entering function GetService(Guid)
    11/07/13 12:06:17:6868 Verbose: Service is not installed.
    11/07/13 12:06:17:6868 Verbose: Service instance not found in local server.
    11/07/13 12:06:17:6868 Verbose: CreateSystemServiceInstance.NeedsExecute(True)
    11/07/13 12:06:17:6868 Verbose: CreateSystemServiceInstance.CanExecute
    11/07/13 12:06:17:6868 Verbose: CreateSystemServiceInstance.CanExecute(True)
    11/07/13 12:07:41:5662 Verbose: CreateSystemServiceInstance.Execute
    11/07/13 12:07:41:5682 Verbose: Entering function GetService(Guid)
    11/07/13 12:07:41:5702 Verbose: Service is not installed.
    11/07/13 12:07:41:5702 Verbose: CreateSystemServiceInstance.Execute(Skipped)
    11/07/13 12:07:41:5702 High: Cannot create the service instance because the parent Service does not exist.
    11/07/13 12:07:41:5702 High: Prerequisites check for execution failed. Farm is not in a valid state.

    Did you install the PowerPivot add-in for SharePoint? There are 2 parts to this - the SQL Server Power Pivot for SharePoint which is the Analysis Services instance running in Tabular Mode and the PowerPivot Add-in. The last line in your error message seems
    to tell you that you have a missing component in the farm, possibly the PowerPivot Add-in
    Edwin Sarmiento SQL Server MVP | Microsoft Certified Master
    Blog |
    Twitter | LinkedIn
    SQL Server High Availability and Disaster Recover Deep Dive Course

  • Cannot create bean of class...using TOMCAT 3.1

    my root is: "notwww.ucsd.edu/somesub/"
    my beans are in .../WEB-INF/classes/aseBeans/
    the error msg:
    Error: 500
    Location: /studentaffairs/aseAppValidate.jsp
    Internal Servlet Error:
    javax.servlet.ServletException: Cannot create bean of class aseBeans.AseApplicationBean
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:386)
         at _0002faseAppValidate_0002ejspaseAppValidate_jsp_0._jspService(_0002faseAppValidate_0002ejspaseAppValidate_jsp_0.java:138)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174)
         at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
         at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
         at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:156)
         at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
         at java.lang.Thread.run(Thread.java:496)
    Root cause:
    javax.servlet.ServletException: Cannot create bean of class aseBeans.AseApplicationBean
         at _0002faseAppValidate_0002ejspaseAppValidate_jsp_0._jspService(_0002faseAppValidate_0002ejspaseAppValidate_jsp_0.java:71)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174)
         at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
         at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
         at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:156)
         at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
         at java.lang.Thread.run(Thread.java:496)
    I think I have all the necessary elements:
    package aseBeans;
    pickled my beans
    <jsp:useBean id="app" scope="session" class="aseBeans.AseApplicationBean" >
    <jsp:setProperty.../>
    </jsp:useBean>
    MANIFEST.MF was created, are the name/attribute pairs necessary?
    Name: AseApplicationBean.class
    Java-Bean: true
    THANK YOU

    hubertn I modified the jsp file and the bean: here's the code:<!--
    Copyright (c) 1999 The Apache Software Foundation. All rights
    reserved.
    Number Guess Game
    Written by Jason Hunter, CTO, K&A Software
    http://www.servlets.com
    -->
    <%@ page import = "num.NumberGuessBean" %>
    <jsp:useBean id="numguess" class="num.NumberGuessBean" scope="session"/>
    <jsp:setProperty name="numguess" property="*"/>
    <html>
    <head><title>Number Guess</title></head>
    <body bgcolor="white">
    <font size=4>
    <% if (numguess.getSuccess()) { %>
    Congratulations! You got it.
    And after just <%= numguess.getNumGuesses() %> tries.<p>
    <% numguess.reset(); %>
    Care to try again?
    <% } else if (numguess.getNumGuesses() == 0) { %>
    Welcome to the Number Guess game.<p>
    Play with default limits ( a number between 0 and 100)<p>
    or enter upper and lower limits.<p>
    <form method=get>
    Play with defaults?: <input type=radio name=default value="yes">Yes
    <input type=radio name=default value="no">No
    </form>
    <% if (numguess.getRadio().equals("no")) { %>
    <form method=get>
    Enter upper limit:<input type=text name=upperLimit>
    Enter lower limit:<input type=text name=lowerLimit>
    </form>
    <% numguess.reset(); %>
    <% } %>
    <form method=get>
    What's your guess? <input type=text name=guess>
    <input type=submit value="Submit">
    </form>
    <% } else { %>
    Good guess, but nope. Try <b><%= numguess.getHint() %></b>.
    You have made <%= numguess.getNumGuesses() %> guesses.<p>
    I'm thinking of a number between <jsp:getProperty name="numguess" property="lowerLimit"/> and <jsp:getProperty name="numguess" property="upperLimit"/>.<p>
    <form method=get>
    What's your guess? <input type=text name=guess>
    <input type=submit value="Submit">
    </form>
    <% } %>
    </font>
    </body>
    </html>
    and the bean:
    * Originally written by Jason Hunter, http://www.servlets.com.
    package num;
    import java.util.*;
    public class NumberGuessBean {
    int answer;
    boolean success;
    String hint;
    int numGuesses;
    String radiochoice;
    int lowerLimit=0;
    int upperLimit=100;
    String error;
    public NumberGuessBean() {
    reset();
    public void setGuess(String guess) {
    numGuesses++;
    int g;
    try {
    g = Integer.parseInt(guess);
    catch (NumberFormatException e) {
    g = -1;
    if (g == answer) {
    success = true;
    else if (g == -1) {
    hint = "a number next time";
    else if (g < answer) {
    hint = "higher";
    else if (g > answer) {
    hint = "lower";
    public void setRadio(String s) {
         radiochoice=s;
    public String getRadio() {
         return radiochoice;
    public void setLowerLimit( int lowerLimit) {
         this.lowerLimit=lowerLimit;
    public int getLowerLimit() {
         return lowerLimit;
    public void setUpperLimit(int upperLimit) {
         this.upperLimit=upperLimit;
    public int getUpperLimit() {
         return upperLimit;
    public boolean getSuccess() {
    return success;
    public String getHint() {
    return "" + hint;
    public String getError() {
         return ""+error;
    public int getNumGuesses() {
    return numGuesses;
    public void reset() {
         if (getRadio().equals("yes")) {
              answer = (int)(Math.random()*100);
         else {
              int i;
              i=(int)(Math.random()*upperLimit);
              if (i<lowerLimit) {
                   i=i+lowerLimit;
              answer=i;
         success = false;
    numGuesses = 0;
    }

  • Cannot Create Instance Error

    I am using 11gR1, I am trying to run an application created out of a project template. I was able to successfully deploy both the composite and UI, When I login as initiator and click on the process link I am getting "cannot create instance error".
    In EM, the Instance shows that its been faulted and has the following message.
    ORABPEL-10513 Cannot get application roles from application identified by "{0}". An error occured while getting application roles from application identified by "OracleBPMProcessRolesApp". The underlying APIs threw an exception. Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable.
    All the organization roles have been created properly. Can anyone please tell me what could be the cause of this error. Thanks
    Venkat

    Hey Venkat,
    Do you have any sample where you work with BPM template (MDS)...?if yes, could you share....those...?
    I am new to 11g..in learning phase....it would be very nice if you could share some samples.....
    Rgds,
    Biltu...

  • BEA-090563 -- Cannot create instance of Hostname Verifier

    I am trying to use custom hostname verifier for my osb project and following are the steps.
    1. Create java class -- given below as reference...
    2. Add the full class name @ Admin server --> ssl --> Advanced --> custom hostname verifier -- also choose custom hostname verifier in the host name verification field above it.
    3. Package the class in the jar file using eclipse export java project and place the file in server-lib folder.
    4. Restart admin and osb server.
    I am facing following error ---
    osb_domain.log00932:####<Aug 3, 2012 12:01:41 PM EST> <Error> <Security> <server host name> <osb_server1> <[ACTIVE] ExecuteThread: '
    1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <6cf4c9e4b2f5468a:-4668cc77:138ea27406f:-8000-000000000000095d> <134
    3959301805> <BEA-090563> <Cannot create instance of Hostname Verifier <package name>:WildcardHostnameVerifier.>
    Can somebody let me know if there are any additional settings required for this to work ?
    JAVA CLASS
    package <package name>;
    import java.io.ByteArrayInputStream;
    import java.security.cert.Certificate;
    import java.security.cert.CertificateEncodingException;
    import java.security.cert.CertificateException;
    import java.security.cert.CertificateFactory;
    import java.security.cert.X509Certificate;
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
    import javax.net.ssl.SSLPeerUnverifiedException;
    import javax.net.ssl.SSLSession;
    import weblogic.security.SSL.HostnameVerifier;
    * @author Ravi_Shah01
    public class WildcardHostnameVerifier implements HostnameVerifier {
         /* (non-Javadoc)
         * @see com.certicom.net.ssl.HostnameVerifier#verify(java.lang.String, javax.net.ssl.SSLSession)
         public WildcardHostnameVerifier() {
              System.out.print("Creating instance of WildcardHostnameVerifier");
         public boolean verify(String hostname, SSLSession session) {
              try {
                   Certificate cert = session.getPeerCertificates()[0];
                   byte [] encoded = cert.getEncoded();
                   CertificateFactory cf = CertificateFactory.getInstance("X.509");
                   ByteArrayInputStream bais = new ByteArrayInputStream(encoded);
                   X509Certificate xcert = (X509Certificate)cf.generateCertificate(bais);
                   String cn = getCanonicalName( xcert.getSubjectDN().getName() );
                   if(cn.equals(hostname))
                        return true;
                   Pattern validHostPattern = Pattern.compile("\\*\\.[^*]*\\.[^*]*");
                   Matcher validHostMatcher = validHostPattern.matcher(cn);
                   if(validHostMatcher.matches())
                        String regexCn = cn.replaceAll("\\*.", "(.)*[\\.\\$]");
                        Pattern pattern = Pattern.compile(regexCn);
                        Matcher matcher = pattern.matcher(hostname);
                        if(matcher.matches())
                             if(matcher.group().equals(hostname))
                                  return true;
                             else
                                  return false;
                        else
                             return false;
                   else
                        return false;
              } catch (SSLPeerUnverifiedException e) {
                   e.printStackTrace();
                   return false;
              } catch (CertificateEncodingException e) {
                   e.printStackTrace();
                   return false;
              } catch (CertificateException e) {
                   e.printStackTrace();
                   return false;
         * Return just the canonical name from the distinguishedName
         * on the certificate.
         * @param subjectDN
         * @return
         private String getCanonicalName(String subjectDN) {
              Pattern pattern = Pattern.compile("CN=([-.*aA-zZ0-9]*)");
              Matcher matcher = pattern.matcher(subjectDN);
              if(matcher.find())
                   return matcher.group(1);
              return subjectDN;
    }

    Hi Ravi,
    3. Package the class in the jar file using eclipse export java project and place the file in server-lib folder.Instead of placing the jar in server-lib, please modify setDomainEnv.cmd/setDomainEnv.sh as below to add jar in the classpath-
    set CLASSPATH=<Your_Jar_PATH>;%CLASSPATH%
    Restart WebLogic Server and re-test.
    From Weblogic 10.3.4 onwards there is a patch available to enhance the existing default BEA hostname verifier to include wildcard certificates and wildcard host name verifier is available in Weblogic 10.3.6
    Regards,
    Anuj

Maybe you are looking for