Cannot create bean of class

Dear Friends
My tomcat server 3.2.4 is giving following error when i am going to run my jsp.
javax.servlet.ServletException: Cannot create bean of class dts.query.ProjectSearchResultsPage
     at jspprojects._0002fjspprojects_0002fprojectsearchresults_0002ejspprojectsearchresults_jsp_12._jspService(_0002fjspprojects_0002fprojectsearchresults_0002ejspprojectsearchresults_jsp_12.java:111)
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
     at org.apache.tomcat.core.Handler.service(Handler.java:287)
     at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
     at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)
     at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
     at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
     at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
     at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
     at java.lang.Thread.run(Thread.java:484)
=====================
Please help me, Thanx in advance

i am not sure but maybe an explicit constructor ( with no parameters ) for the bean will solve the problem ?

Similar Messages

  • Error: 500    Cannot create bean of class Simulation

    Hello, I was working with J2ee 1.2 and suddenly I got this error. Any one has an idea about it?, I can't continue working.
    Thanks...
    Error: 500
    Internal Servlet Error:
    javax.servlet.ServletException: Cannot create bean of class Simulation
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:384)
         at _0005csimulation_0002ejspsimulation_jsp_325._jspService(_0005csimulation_0002ejspsimulation_jsp_325.java:215)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
         at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:161)
         at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:247)
         at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:352)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
         at org.apache.tomcat.core.ServiceInvocationHandler.method(ServletWrapper.java:626)
         at org.apache.tomcat.core.ServletWrapper.handleInvocation(ServletWrapper.java:534)
         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:378)
         at org.apache.tomcat.core.Context.handleRequest(Context.java:644)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:440)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:144)
         at org.apache.tomcat.service.TcpConnectionThread.run(TcpEndpoint.java:310)
         at java.lang.Thread.run(Thread.java:484)
    Root cause:
    javax.servlet.ServletException: Cannot create bean of class Simulation
         at _0005csimulation_0002ejspsimulation_jsp_325._jspService(_0005csimulation_0002ejspsimulation_jsp_325.java:79)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
         at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:161)
         at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:247)
         at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:352)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
         at org.apache.tomcat.core.ServiceInvocationHandler.method(ServletWrapper.java:626)
         at org.apache.tomcat.core.ServletWrapper.handleInvocation(ServletWrapper.java:534)
         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:378)
         at org.apache.tomcat.core.Context.handleRequest(Context.java:644)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:440)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:144)
         at org.apache.tomcat.service.TcpConnectionThread.run(TcpEndpoint.java:310)
         at java.lang.Thread.run(Thread.java:484)

    This is the code for the simulatin class.
    I think nothing special.
    Begin --- Simulation.java
    import java.io.*;
    import java.util.*;
    public class Simulation
    private int lastMessage;
    private int transactions;
    private int transaction_prospere;
    /* Creation des variables du system */
         private String Quantite_acheteurs;
         private String Quantite_vendeurs;
         private String Argent_initiale;
         private String Articles_initiales;
         private String Prix_initial;
         private String Mechants_acheteurs;
         private String Mechants_vendeurs;
         private String Cycles_simulation;
         private String Choisir_strategie;
         private String Choisir_formule;
         private String Afficher_resultats;
    int iAfficher_resultats = (new Integer(Afficher_resultats)).intValue();
         /* Section de declaration des constants */
         private int OFFRE_DE_VENTE = 0;
         private int DEMANDE_ACHAT = 1;
         private int BROADCAST = -1;
    private int TRICHEUR = -1;
         private int PROSPERE = 1;
         private int VRAI = 1;
         private int FAUX = 0;
    private int ACHETEUR = 0;
    private int VENDEUR = 1;
         private int GENTIL = 0;
         private int MECHANT = 1;
         private double SEUIL_MECHANT = 0.87;
    Messages message_anterieur= null;
    /*** PADOVAN ********************************/
         public String Padovan_alpha;
    Begin --- Creation des agents...
    Pour la creation des agents il y a une generation des chiffres aleatoires
         pour repartir les vendeurs et les acheteurs, ainsi que les gentils et les
         mechants dans le vecteur d'agents
         public Vector Creation_des_agents(){
    System.out.println ("<<<<<<<<<<Executing...Creation_des_agents>>>>>>>>");
    /* Le vector avec des agents....*/
              Vector agents = new Vector();
    lastMessage = 0; /* Le derni�re message ajout� au tableau */
              transactions = 0; /* Compteur pour les transactions */
              transaction_prospere = 0; /* Compteur pour les transaction prosp�res*/
              /* Conversion de variables de string a int */
    int iQuantite_acheteurs = (new Integer(Quantite_acheteurs)).intValue();
    int iQuantite_vendeurs = (new Integer(Quantite_vendeurs)).intValue();
    int iArgent_initiale = (new Integer(Argent_initiale)).intValue();
    int iArticles_initiales = (new Integer(Articles_initiales)).intValue();
    int iPrix_initial = (new Integer(Prix_initial)).intValue();
    int iMechants_acheteurs = (new Integer(Mechants_acheteurs)).intValue();
    int iMechants_vendeurs = (new Integer(Mechants_vendeurs)).intValue();
    int i; /* Compteur pour la generation des agents */
              double agent_type; /* Pour generation aleatoire et savoir si est acheteur ou vendeur */
              int iagent_type; /* Type d'agent acheteur=0, vendeur=1 */
              double agent_comportement; /* Pour generation aleatoire et savoir si est gentil ou mechant */
              int iagent_comportement; /* Comportement de l'agent 0=gentil, 1=mechant, gentil par default */
    int total=iQuantite_acheteurs+iQuantite_vendeurs;
              /* Pour les agents......... */
              int j=0;
              for (i=0;i<total;)
                   iagent_comportement = 0;
    j++;
                   agent_type=Math.random(); /* Pour repartir les agentes vendeurs et acheteurs aleatoirement. */
    iagent_type=(agent_type<0.5?0:1); /* 0-> acheteur, 1-> vendeur */
                   if (iagent_type==0){   /*Creation des acheteurs.... */
    if(iQuantite_acheteurs>0)
    iQuantite_acheteurs--; /* un acheteur de moins */
    /* Generation du comportement */
                             if (iMechants_acheteurs>0) /* Faltan generar agentes mechantes */
                             if ((iQuantite_acheteurs > iMechants_acheteurs))
    agent_comportement = Math.random(); /* Pour repartir les comportement de l'agent */
    iagent_comportement=(agent_comportement<0.5?0:1);     /* 0->gentil, 1->mechant */
                             else
                                  iagent_comportement=1;
                             if (iagent_comportement==1) /* S'il est mechante... */
    iMechants_acheteurs --;
                             Agents agent = new Agents(i,ACHETEUR,0,0,iArgent_initiale,iagent_comportement, total);
                             agent.setPadovan_alpha(Padovan_alpha);
                   i++;
    agents.addElement(agent);
                   else{                  /* Creation des vendeurs... */
    if(iQuantite_vendeurs>0)
                             iQuantite_vendeurs--; /* un vendeur de moins */
    /* Generation du comportement */
                             if (iMechants_vendeurs>0) /*Faltan generar agentes mechantes */
                             if ((iQuantite_vendeurs > iMechants_vendeurs))
    agent_comportement = Math.random(); /* Pour repartir les comportement de l'agent */
    iagent_comportement=(agent_comportement<0.5?0:1);     /* 0->gentil, 1->mechant */
                             else
                                  iagent_comportement=1;
                             if (iagent_comportement==1) /* S'il est mechante... */
    iMechants_vendeurs --;
    Agents agent = new Agents(i,VENDEUR,iArticles_initiales,iPrix_initial,0,iagent_comportement,total);
                             agent.setPadovan_alpha(Padovan_alpha);
                   i++;
    agents.addElement(agent);
         }/* End for */
    System.out.println ("<<<<<<<<<<Ending...Creation_des_agents>>>>>>>>>>");
    return agents;
         } /* End Creation_des_agents */
    End --- Creation des agents...
    Begin --- Setters and getters.........
    public void     setQuantite_acheteurs(String Quantite_acheteurs) {
              this.Quantite_acheteurs= Quantite_acheteurs;
    public void     setQuantite_vendeurs(String Quantite_vendeurs) {
              this.Quantite_vendeurs= Quantite_vendeurs;
    public void     setArgent_initiale(String Argent_initiale) {
              this.Argent_initiale= Argent_initiale;
    public void     setArticles_initiales(String Articles_initiales) {
              this.Articles_initiales= Articles_initiales;
    public void     setPrix_initial(String Prix_initial) {
              this.Prix_initial= Prix_initial;
    public void     setMechants_acheteurs(String Mechants_acheteurs) {
              this.Mechants_acheteurs= Mechants_acheteurs;
    public void     setMechants_vendeurs(String Mechants_vendeurs) {
              this.Mechants_vendeurs= Mechants_vendeurs;
    public void     setCycles_simulation(String Cycles_simulation) {
              this.Cycles_simulation= Cycles_simulation;
    public void     setChoisir_strategie(String Choisir_strategie) {
              this.Choisir_strategie= Choisir_strategie;
    public void     setChoisir_formule(String Choisir_formule) {
              this.Choisir_formule= Choisir_formule;
    public void     setPadovan_alpha(String Padovan_alpha) {
              this.Padovan_alpha= Padovan_alpha;
    public void     setAfficher_resultats(String Afficher_resultats) {
              this.Afficher_resultats= Afficher_resultats;
    public String getPadovan_alpha( ){
    return this.Padovan_alpha;
    } // End of the class Simulation
    End --- Simulation

  • Javax.servlet.ServletException: Cannot create bean of class

    People,
    HELP!! I am getting desperate!!!
    I am a newbie when it comes to TOMCAT, but i have been using Blazix before.
    My current system is using APACHE/TOMCAT on a Solaris machine and I keep hitting the same problem. I have gone through the archives but the only thing it states is to check the directory which i have done.
    I keep getting:
    Error 500
    Internal Error
    javax.servlet.ServletException: Cannot create bean of class MyClass
    The code used to work on the Blazix server so i am assuming it is something to do with a config parameter somewhere - but i do not know where. I have checked the directory/package structure and they seem to work. It even serves it when they are html pages not jsp, but obviously wont use the bean. :(
    I can post code if necessary.
    Please help
    Steve

    The FormData.class file is in examples/WEB-INF/classes/ directory.
    Is this wrong? then should it be in a package called examples.steve???
    <TITLE> Poc </TITLE>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <META NAME="Generator" CONTENT="Mozilla/4.61 [en] (WinNT; I) [Netscape]">
    <META NAME="Author" CONTENT="Steve Brodie">
    <META NAME="Proof of Concept order entry system" CONTENT="">
    <META NAME="PROOF OF CONCEPT ORDER ENTRY SYSTEM " CONTENT="">
    </HEAD>
    <%@ page import="steve.FormData" %>
    <jsp:useBean id="user" class="steve.FormData"/>
    <jsp:setProperty name="user" property="*"/>
    <FORM METHOD=POST ACTION="SaveDetails.jsp">
    <CENTER>
    <H1>     
    POC CNS demo <BR>
    POC Order Entry System <BR></H1>
    <H2><CENTER>PROOF OF CONCEPT ORDER ENTRY SYSTEM <BR>
    in order to illustrate the use of an new product<BR></H1>
    </CENTER>
    <BODY>
    Please enter the following details: <BR>
    Second name <INPUT TYPE=TEXT NAME=secondName SIZE=20><BR>
    First name <INPUT TYPE=TEXT NAME=firstName SIZE=20><BR>
    Address <INPUT TYPE=TEXT NAME=address1 SIZE=20><BR>
    Address <INPUT TYPE=TEXT NAME=address2 SIZE=20><BR>
    Post Code <INPUT TYPE=TEXT NAME=postCode SIZE=10><BR>
    Phone NO. <INPUT TYPE=TEXT NAME=phone SIZE=10><BR>
    <BR>
    Credit Card<INPUT TYPE=TEXT NAME=credit SIZE=15><BR>
    <BR>
    Quality of Service:
    <SELECT TYPE=TEXT NAME="QoS">
    <OPTION SELECTED TYPE=TEXT NAME=Gold>Gold <BR>
    <OPTION TYPE=TEXT NAME=Silver>Silver <BR>
    <OPTION TYPE=TEXT NAME=Bronze>Bronze <BR>
    </SELECT>
    <BR>
    <BR>
    <INPUT TYPE=RESET>
    <P><INPUT TYPE=SUBMIT>
    <BR>
    <BR>
    <IMG SRC=../images/Cisco.gif>
    </FORM>
    </BODY>
    </HTML>
    package steve;
    * @author Steven Brodie
    * @date
    * @version 0.0
    import java.io.*;
    import java.lang.*;
    import java.util.*;
    public class FormData {
         String secondName = null;
         String firstName = null;
         String address1 = null;
         String address2 = null;
         String postCode = null;
         int credit = 0;
         int phone = 0;
         String qos = null;
         String file = "out";
         String filex = "xout";
         PrintWriter pout = null;
         PrintWriter xout = null;
         FormData() {
              try {
                   pout = new PrintWriter(new BufferedWriter(new FileWriter(file + ".txt")));
                   xout = new PrintWriter(new BufferedWriter(new FileWriter(filex + ".xml")));
              xout.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
              xout.println("<OrderEntry xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"");
              xout.println("xsi:noNamespaceSchemaLocation=\"http://machine2.com:8080/xml/xsd/OrderEntry.xsd\">");
              } catch (IOException ioe) {
                   System.err.println("DataFileWriter error ioe on init");
                   ioe.printStackTrace();
                   System.exit(1);
    public void setFirstName( String value ) {
    firstName = value;
              System.out.println(firstName);
              pout.println(firstName);
              xout.println("<firstname value= \"" + firstName + "\"/>");
    public void setSecondName( String value ) {
    secondName = value;
              System.out.println(secondName);
              pout.println(secondName);
              xout.println("<secondname value= \"" + secondName + "\"/>");
    public void setAddress1( String value ) {
    address1 = value;
              System.out.println(address1);
         pout.println(address1);
              xout.println("<address1 value= \"" + address1 + "\"/>");
    public void setAddress2( String value ) {
    address2 = value;
              System.out.println(address2);
              pout.println(address2);
              xout.println("<address2 value= \"" + address2 + "\"/>");
    public void setPostCode( String value ) {
    postCode = value;
              System.out.println(postCode);
              pout.println(postCode);
              xout.println("<postCode value= \"" + postCode + "\"/>");
    public void setCredit( int value ) {
    credit = value;
              System.out.println(credit);
              pout.println(credit);
              xout.println("<creditCard value= \"" + credit + "\"/>");
         public void setPhone( int value) {
              phone = value;
              System.out.println("0" + phone);
              pout.println("0" + phone);
              xout.println("<phoneNo value= \"0" + phone + "\"/>");
    public void setQoS( String value ) {
    qos = value;
              System.out.println(qos);
              pout.println(qos);
              xout.println("<QoS value= \"" + qos + "\"/>");
              xout.println("</OrderEntry>");
              pout.flush();
              pout.close();
              xout.flush();
              xout.close();
    public String getFirstName() {
              return firstName;
    public String getSecondName() {
              return secondName;
    public String getAddress1() {
              return address1;
    public String getAddress2() {
              return address2;
    public String getPostCode() {
              return postCode;
    public int getCredit() {
              return credit;
         public int getPhone() {
              return phone;
         public String getQoS() {
              return qos;

  • Cannot create bean of class Error

    Ok first off I realize several people have post messages similar to this - but the replys to those messages didn't help me:
    Today the webserver I had my code on crashed - and was restarted.
    Everything is working except for 1 page.
    When I load it I get this error:
    Error: 500
    Location: /dynamic/VOTE_chart.jsp
    Internal Servlet Error:
    javax.servlet.ServletException: Cannot create bean of class update.VoteBean
         at _0002fVOTE_0005fchart_0002ejspVOTE_0005fchart_jsp_6._jspService(_0002fVOTE_0005fchart_0002ejspVOTE_0005fchart_jsp_6.java:71)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
         at org.apache.tomcat.core.Handler.service(Handler.java:286)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
         at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
         at java.lang.Thread.run(Thread.java:484)
    This tells my sod all what's actually wrong - I've tried renaming the jsp, I've tried renaming and recompiling the bean but that didn't help either (yes I redirected towards page to the new bean).
    No-one here has a clue what the hell has gone wrong with this - especially cos I have at least 15 other beans in exactly the same place and they all work fine.
    If you wish I'll post the code of the relevant jsp here.
    Any suggestions?

    most of this is irrelevent but you should be able to find what you need
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta Http-Equiv="Cache-Control" Content="no-cache">
    <meta Http-Equiv="Pragma" Content="no-cache">
    <script language="JavaScript">
    <!--
    function MM_swapImgRestore() { //v3.0
    var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
    function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_findObj(n, d) { //v3.0
    var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
    function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    //-->
    </script>
    </head>
    <body bgcolor="#000066" onLoad="MM_preloadImages('images/previousOver.jpg','images/backOver.jpg')" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <jsp:useBean id="myBean" class= "update.VoteBean" scope="page" /> <jsp:setProperty name="myBean" property="*" />
    <%
    if (!myBean.isDone())
    {%>
    <form method="post">
    <table width="422" border="0" cellspacing="0" cellpadding="0" align="center" height="225">
    <tr>
    <td colspan="3" height="32"><img src="images/vote.jpg" width="480" height="42"></td>
    </tr>
    <tr bgcolor="#000066">
    <td colspan="3" height="32">
    <div align="left"><b><font face="Arial, Helvetica, sans-serif" size="4" color="#cc0033">previous
    results </font></b></div>
    </td>
    </tr>
    <tr>
    <td colspan="3" height="69">
    <div align="center"><img name="Image9" border="0" src="images/previous.jpg" width="160" height="23"></div>
    </td>
    </tr>
    <tr>
    <td colspan="3" height="32"><b><font face="Arial, Helvetica, sans-serif" size="4" color="#cc0033">this
    months vote</font></b></td>
    </tr>
    <tr>
    <td colspan="3" height="54">
    <div align="left"> <font face="Arial, Helvetica, sans-serif" size="2" color="ffcc00"><%=myBean.getQuestion()%>
    </font></div>
    </td>
    </tr>
    </table>
    <table width="474" border="0" cellspacing="1" cellpadding="1" align="center" height="68">
    <tr>
    <td width="206">
    <div align="left"> <font face="Arial, Helvetica, sans-serif" size="1" color="#FFFFFF">
    <input type="radio" name="radiobutton" value="ONE">
    <%=myBean.getOption1()%></font> </div>
    </td>
    <% double thisVote=Double.parseDouble(myBean.getVotes1());
              double overall=myBean.getTotalVotes();
              double ans=(thisVote/overall)*100*3;
                   int intAns=(int)Math.round(ans);
              %>
    <td width="253"><font face="Arial, Helvetica, sans-serif" size="1" color="#FFFFFF"><img src="images/bar_white.jpg" width="<%=intAns%>" height="10">
    <%=intAns/3%>%</font> </td>
    </tr>
    <tr>
    <td width="206" height="2">
    <div align="left"> <font face="Arial, Helvetica, sans-serif" size="1" color="#FFFFFF">
    <input type="radio" name="radiobutton" value="TWO">
    <%=myBean.getOption2()%></font> </div>
    </td>
    <% thisVote=Double.parseDouble(myBean.getVotes2());
              overall=myBean.getTotalVotes();
              ans=(thisVote/overall)*100*3;
                   intAns=(int)Math.round(ans);
              %>
    <td width="253" height="2"><font face="Arial, Helvetica, sans-serif" size="1" color="#FFFFFF"><img src="images/bar_white.jpg" width="<%=intAns%>" height="10">
    <%=intAns/3%>%</font> </td>
    </tr>
    <tr>
    <td width="206" height="2">
    <div align="left"> <font face="Arial, Helvetica, sans-serif" size="1" color="#FFFFFF">
    <input type="radio" name="radiobutton" value="THREE">
    <%=myBean.getOption3()%></font> </div>
    </td>
    <% thisVote=Double.parseDouble(myBean.getVotes3());
              overall=myBean.getTotalVotes();
              ans=(thisVote/overall)*100*3;
                   intAns=(int)Math.round(ans);
              %>
    <td width="253" height="2"><font face="Arial, Helvetica, sans-serif" size="1" color="#FFFFFF"><img src="images/bar_white.jpg" width="<%=intAns%>" height="10">
    <%=intAns/3%>%</font> </td>
    </tr>
    <tr>
    <td width="206" height="2">
    <div align="left"> <font face="Arial, Helvetica, sans-serif" size="1" color="#FFFFFF">
    <input type="radio" name="radiobutton" value="FOUR">
    <%=myBean.getOption4()%></font> </div>
    </td>
    <% thisVote=Double.parseDouble(myBean.getVotes4());
              overall=myBean.getTotalVotes();
              ans=(thisVote/overall)*100*3;
                   intAns=(int)Math.round(ans);
              %>
    <td width="253" height="2"><font face="Arial, Helvetica, sans-serif" size="1" color="#FFFFFF"><img src="images/bar_white.jpg" width="<%=intAns%>" height="10">
    <%=intAns/3%>%</font> </td>
    </tr>
    <tr>
    <td width="206" height="2">
    <div align="left"> <font face="Arial, Helvetica, sans-serif" size="1" color="#FFFFFF">
    <input type="radio" name="radiobutton" value="FIVE">
    <%=myBean.getOption5()%></font> </div>
    </td>
    <% thisVote=Double.parseDouble(myBean.getVotes5());
              overall=myBean.getTotalVotes();
              ans=(thisVote/overall)*100*3;
                   intAns=(int)Math.round(ans);
              %>
    <td width="253"><font face="Arial, Helvetica, sans-serif" size="1" color="#FFFFFF"><img src="images/bar_white.jpg" width="<%=intAns%>" height="10">
    <%=intAns/3%>%</font> </td>
    </tr>
    </table>
    <p align="center">
    <input type="submit" name="Submit" value="Cast a Vote">
    </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    <p align="center"> </p>
    </form>
    <%
    else
    myBean.setDone(false);
    String done=myBean.checkVote();
    if (done.equals("OK"))
    System.out.println("OK");
    %>
    <table width="424" border="0" cellspacing="0" cellpadding="0" align="center" height="103">
    <tr bgcolor="#000066">
    <td height="43" colspan="2"><img src="images/vote.jpg" width="480" height="42"></td>
    </tr>
    <tr bgcolor="#000066">
    <td height="43" colspan="2">
    <div align="left"><b><font face="Arial, Helvetica, sans-serif" size="4" color="#cc0033">complete
    </font></b></div>
    </td>
    </tr>
    </table>
    <table width="463" border="0" cellspacing="3" cellpadding="4" align="center">
    <tr>
    <td width="327"><font face="Arial, Helvetica, sans-serif" size="1" color="#ffcc00">Thank
    you for voting. Your vote will be instantly added to the calculations.</font></td>
    <td width="109"> </td>
    </tr>
    </table>
    <table width="461" border="0" cellspacing="3" cellpadding="4" align="center">
    <tr>
    <td height="53">
    <div align="center"> <img name="Image10" border="0" src="images/back.jpg" width="160" height="23"></div>
    </td>
    </tr>
    <tr>
    <td height="397"> </td>
    </tr>
    </table>
    <%}else{
    System.out.println("Not equal or fell over");%>
    <table width="454" border="0" cellspacing="0" cellpadding="0" align="center" height="103">
    <tr bgcolor="#000066">
    <td height="43" colspan="2"><img src="images/vote.jpg" width="480" height="42"></td>
    </tr>
    <tr bgcolor="#000066">
    <td height="43" colspan="2">
    <div align="left"><b><font face="Arial, Helvetica, sans-serif" size="4" color="#cc0033">sorry
    </font></b></div>
    </td>
    </tr>
    </table>
    <table width="469" border="0" cellspacing="3" cellpadding="4" align="center">
    <tr>
    <td width="327"><font face="Arial, Helvetica, sans-serif" size="1" color="#ffcc00">There
    has been a problem casting your vote. Please try again later.</font></td>
    <td width="115"> </td>
    </tr>
    </table>
    <table width="467" border="0" cellspacing="3" cellpadding="4" align="center">
    <tr>
    <td height="37">
    <div align="center"> <img name="Image101" border="0" src="images/back.jpg" width="160" height="23">
    </div>
    </td>
    </tr>
    <tr>
    <td height="560"> </td>
    </tr>
    </table>
    <%}
    %>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    </body>
    </html>

  • 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;
    }

  • Javax.servlet.jsp.JspException: Exception creating bean of class ProdFormFB

    Hi I am trying to deploy a struts based web application using "DynaActionForms"
    When I am trying to access the jsp page I am getting the following error.
    I am providing as much as details as it can help full to u.
    Thank u.
    FormBean class ProdFormFB.java
    ========================================================================
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import org.apache.struts.action.*;
    public class ProdFormFB extends DynaActionForm
    public void reset(ActionMapping mapping, HttpServletRequest request)
         System.out.println("reset() called. . . . ");
    set("prodId", new Integer(10));
         set("prodName", new String("XYZ"));
         set("price", new Float(22.25));
    public ActionErrors validate(ActionMapping mappings, HttpServletRequest request)
    System.out.println("=== validate() called ===");
    ActionErrors aes=new ActionErrors();
         System.out.println("aes.size() ===> "+aes.size());
         String prodName = (String)get("prodName");
         if( prodName==null || prodName.equals("") )
              System.out.println("Adding prodName.req error . . . . . . .");
              aes.add("prodName",new ActionError ("prodName.req.error"));
    return aes;
    ========================================================================
    Action Class ProdAction.java
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import org.apache.struts.action.*;
    public class ProdAction extends Action
       public ActionForward execute(ActionMapping mapping,ActionForm form, HttpServletRequest request,HttpServletResponse response)throws Exception
          ProdFormFB fb = (ProdFormFB)form;
          System.out.println("fb.get('prodId')==> "+fb.get("prodId"));
          System.out.println("fb.get('prodName')==> "+fb.get("prodName"));
          System.out.println("fb.get('price')==> "+fb.get("price"));
           return mapping.findForward("dres");
    }========================================================================
    jsp page : npform.jsp
    <%@ taglib uri = "/tags/struts-html" prefix="html"%>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <html:html>
      <head>
         <title>Product Form</title>
      </head>
      <body>
              <html:form action="/pAction">
              <center>
                <br><br>
                <center> <font color="green" style="bold" size=5>Product Form using Struts</font></center><br><br>
                <table>
                <tr>
                   <td>
                          <b> Product ID : </b>  <html:text property="prodId"/> </td><td><font color="red" style="bold"><html:errors property="prodId"/> </font>
                 </td>
             </tr>
               <tr>
                   <td>
                          <b> Prod Name : </b> <html:text property="prodName"/>  </td><td> <font color="red" style="bold"> <html:errors property="prodName"/> </font>
                 </td>
              </tr>
    <!--           <tr>
                   <td>
                          <b> Price : </b> <html:text property="price"/>  </td><td> <font color="red" style="bold"> <html:errors property="price"/> </font>
                 </td>
              </tr> -->
               <tr  colspan="2" align="center">
                   <td>
                      <html:submit property="submit" value="Store"/>
                </td>
              </tr>
              </table>
                          </center>
           </html:form>
      </body>
    </html:html>========================================================================
    Configuration in struts-config.jsp
        <form-beans>
             <form-bean name="NewProdForm" type="ProdFormFB">
                  <form-property name="prodId" type="java.land.Integer"/>
                    <form-property name="prodName" type="java.land.String"/>
                  <form-property name="price" type="java.land.Float"/>
            </form-bean>
    </form-beans>
    <action-mappings>
           <action name="NewProdForm" path="/pAction" type="ProdAction" input="/npform.jsp" validate="true" scope="request">
                  <forward name="dres" path="/dres.jsp"/>
           </action>
    </action-mappings>========================================================================
    After deploying successfully I am I am entering the following URL
    http://localhost:7001/oursapp/npform.jsp
    The following Exception on Browser: and also on the server console ......
    javax.servlet.jsp.JspException: Exception creating bean of class ProdFormFB: {1}
         at org.apache.struts.taglib.html.FormTag.initFormBean(FormTag.java:463)
         at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:433)
         at jsp_servlet.__npform._jspService(__npform.java:178)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6718)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)     
    Plz... Help me out is solving the problem .......
    my email :   [email protected]

    I never used DynaActionForm, what I have noticed here is, don't you need to declare the form bean? I may be wrong.
    <form-beans>
    <form-bean name="newProdForm" type="com.package.form.NewProdForm"></form-bean>
    </form-beans>

  • Cannot Create a ReportDocument Class on Win 7/VS 2008/Crystal 2008

    I recently installed Crystal 2008 (CR Developer) on my Win7/64bit dev. PC, then switched all .NET crystal references from v10 to v12. When I try to run a simple project containing a single report and crystal viewer, I am unable to create a ReportDocument Class. ERROR:  "Either the Crystal Reports registry key permissions are insufficient or the Crystal Reports runtime is not installed correctly". The CrystalDecisions.CrystalReports.Engine.ReportDocument exception occurs in the auto generated 'code behind' form of the Crystal report. Stand alone CR 2008 works fine, and the older VS.NET project, with CR10 references, also worked. Please advise. Thanks

    Is this a windows or web app?  Windows app, part of the compiler options is what type of CPU that you are targeting.  If it is web, you have to set this within IIS.

  • Cannot create class in system package

    Hello,
    I wrote a J2ME game for nokia S40 phones. It compiles without any errors, but when I'm trying to run in on the Nokia 7210 phone emulator I receive the following message:
    Cannot create class in system package.
    Howerver running on the Nokia 6230 phone emulator is ok.
    I have obfuscated my applet as I read in previous topics, but still it does not work.
    Can anyone help me?
    Thanks,
    Alexander.

    You get that error when you try to reference a class that is part of the MIDP framework but isn't installed on the phone.
    The 7210 doesn't support MMAPI or WMA or MIDP 2.0, while the 6230 does, so check that you don't have any references (even an import statement), to classes from those packages (like the javax.microedition.media.*, javax.microedition.lcdui.game.*,javax.wireless.messaging.*, etc. packages hierarchies).
    shmoove

  • Cannot create class in system package while Using Sprite class

    Hi i developed a game using Sprite class & imported
    javax.microedition.lcdui.game.*; package. But when i tried to build this project it gave me "Cannot create class in system package" error. Worst thing is that now again if i build, then it displays error "package javax.microedition.lcdui.game.*; does not exist" . Pls help me

    First exception means that you tried to create a class with the package name equaling one from the predefined libraries in midp/cldc.
    For your second error, add all the jars you are using into the project's classpath.
    Mihai

  • Cannot create class of type 'flex.samples.factories.SpringFactory'

    I have an application that is trying to use BlazeDS.  I am using Flash Builder 4 Plug-in on RSA 7.5.5.  Any help would be apprecialted!
    Here is the relevant lines in the services-config.xml:
    <factories>
    <factory id="spring" class="flex.samples.factories.SpringFactory"/>
    </factories> 
    I have the flex.samples.factories.SpringFactory in the web projects src folder and verified that it is getting compiled and the class exists in the WEB-INF/classes folder.
    Here is the full stack trace:
    [5/31/11 8:54:44:530 CDT] 00000018 SystemErr     R **** MessageBrokerServlet failed to initialize due to runtime exception: [1]flex.messaging.MessageException: Cannot create class of type 'flex.samples.factories.SpringFactory'. Type 'flex.samples.factories.SpringFactory' not found.
    at flex.messaging.util.ClassUtil.createClass(ClassUtil.java:65)
    at flex.messaging.util.ClassUtil.createClass(ClassUtil.java:47)
    at flex.messaging.config.FactorySettings.createFactory(FactorySettings.java:55)
    at flex.messaging.config.MessagingConfiguration.createFactories(MessagingConfiguration.java: 114)
    at flex.messaging.config.MessagingConfiguration.configureBroker(MessagingConfiguration.java: 93)
    at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:125)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:220)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:328)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:1252)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:161)
    at com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWrapper(WebExtens ionProcessor.java:99)
    at com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:882)
    at com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:804)
    at com.ibm.ws.webcontainer.webapp.WebApp.initializeTargetMappings(WebApp.java:522)
    at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:359)
    at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:337)
    at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:92)
    at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)
    at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:666)
    at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:619)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:395)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:611)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1304)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedAppl icationImpl.java:1165)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:587)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:8 32)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java: 950)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.jav a:2131)
    at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.ja va:342)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
    [0]flex.messaging.config.ConfigurationException: An error occurred trying to construct FlexFactory 'flex.samples.factories.SpringFactory'.   The underlying cause is: 'flex.messaging.MessageException: Cannot create class of type 'flex.samples.factories.SpringFactory'. Type 'flex.samples.factories.SpringFactory' not found.'.
    at flex.messaging.config.FactorySettings.createFactory(FactorySettings.java:72)
    at flex.messaging.config.MessagingConfiguration.createFactories(MessagingConfiguration.java: 114)
    at flex.messaging.config.MessagingConfiguration.configureBroker(MessagingConfiguration.java: 93)
    at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:125)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:220)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:328)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:1252)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:161)
    at com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWrapper(WebExtens ionProcessor.java:99)
    at com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:882)
    at com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:804)
    at com.ibm.ws.webcontainer.webapp.WebApp.initializeTargetMappings(WebApp.java:522)
    at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:359)
    at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:337)
    at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:92)
    at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)
    at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:666)
    at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:619)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:395)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:611)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1304)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedAppl icationImpl.java:1165)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:587)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:8 32)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java: 950)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.jav a:2131)
    at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.ja va:342)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
    Caused by: flex.messaging.MessageException: Cannot create class of type 'flex.samples.factories.SpringFactory'. Type 'flex.samples.factories.SpringFactory' not found.
    at flex.messaging.util.ClassUtil.createClass(ClassUtil.java:65)
    at flex.messaging.util.ClassUtil.createClass(ClassUtil.java:47)
    at flex.messaging.config.FactorySettings.createFactory(FactorySettings.java:55)
    ... 27 more

    You can download it here:
    http://code.google.com/p/rapid-framework/source/browse/trunk/rapid-framework/src/rapid_fra mework_common/cn/org/rapid_framework/flex/messaging/factories/SpringFactory.java
    Am 16.08.2010 um 21:42 schrieb ZéSóZé:
    Sorry http://forums.adobe.com/people/PHANTOMIASA,
    >
    but I need to write what?
    >
    Where is the attached file?
    >
    Thanks for quick answer...
    >
    Best regards..
    >
    José.
    >

  • "cannot create jbcd driver of class " for connect URL 'null'" error

    I am trying to get an application that is currently working fine on a Windows platform to work in a Linux environment.
    One thing that is different from my setup in Windows, and also one that I have no experience with, is the Linux-Ubuntu default install of Apache uses Virtual Hosts and Tomcat's equivalent multiple sessions.
    I'm running the app out of the usr/share/tomcat6/webapps/msgboard instance of Tomcat vs var/lib/tomcat6.
    I am calling the application from Apache Virtual Host port 80 using mod_jk. The application cannot run under native Tomcat because of the extensive use of PHP. Everything else in the application is working correctly including a DWR (Ajax) servlet. However I also tried a simple test app from native Tomcat and got the same results.
    I also tried connecting with jdbc:mysql://localhost:3306/msgboard?autoreconnect=true&user=root&password=password at the terminal prompt and got
    bash: jdbc:mysql://localhost/msgboard?autoreconnect=true: No such file or directory
    [1]7074
    [2] 7048
    [1] Exit 127 jdbc:mysql://localhost/msgboard?autoreconnect=true
    [2]+ Donesyslog error is
    Feb 23, 2009 3:01:51 PM org.directwebremoting.util.CommonsLoggingOutput info INFO: Exec: Online.getPosts()
    Feb 23 15:01:51 ubuntu jsvc.exec[6779]: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Feb 23 15:01:51 ubuntu jsvc.exec[6779]: Caused by: java.sql.SQLException: No suitable driverFollowing is all the pertinent setup info for reference and critique. Any suggestions would be greatly appreciated.
    Apache2.2
    Tomcat6
    JDBC
    mod_jk
    Java (not sure what ver, it's the default Ubuntu install ver.)
    PHP
    Currently I am pointing to mysql-connector-java.jar in my CLASSPATH at /usr/share/java/mysql-connector-java.jar added symlinks commons-dbcp.jar, commons-logging.jar to usr/share/tomcat6/lib
    Application is deployed from usr/share/tomcat6/webapps/msgboard
    The basic code snippet in class calling the jdbc
    WEB-INF/classes/dbLink.class
    Context ctx = new InitialContext();
    DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/msgboardDB");
    WEB-INF/web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app id="msgboard">
    <display-name>Message Board</display-name>
    <resource-ref>
    <description>DB Connection</description>
    <res-ref-name>jdbc/msgboardDB</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    META-INF/context.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <Context path="/msgboard" docBase="msgboard"
    debug="5" reloadable="true" crossContext="true">
    <Resource name="jdbc/msgboardDB"
    auth="Container"
    type="javax.sql.DataSource"
    maxActive="100"
    maxIdle="30"
    maxWait="10000"
    username="root"
    password="thePassword"
    driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/msgboard?autoReconnect=true"/>
    </Context>
    I also included a symlink to this in var/lib/tomcat6/config named msgboard.xml
    per instruction at http://ubuntuforums.org/showthread.php?t=430133 and have since removed it.
    my.cnf
    [client]
    port = 3306
    bind-address = 127.0.0.1
    permissions set in /etc/tomcat6/policy.d/04webapps.policy
    permission java.net.SocketPermission "127.0.0.1:3306", "connect,resolve,listen,accept";
    per instruction at http://ubuntuforums.org/showthread.php?t=430133
    other permiissions set /etc/tomcat6/policy.d/50local.policy
    grant codeBase "file:/usr/share/tomcat6/webapps/msgboard/-" {
    permission java.net.SocketPermission "127.0.0.1:3306", "connect,resolve,listen,accept";
    grant codeBase "file:/usr/share/tomcat6/webapps/msgboard/WEB-INF/classes/-" {
    permission java.io.FilePermission "/usr/share/tomcat6/webapps/msgboard/WEB-INF/classes/logging.properties", "read";
    grant codeBase "jar:file:/usr/share/tomcat6/webapps/msgboard/WEB-INF/lib/mysql-connector-java-5.1.6.jar!/-" {
    permission java.net.SocketPermission "127.0.0.1:3306", "connect,resolve,listen,accept";
    I even tried setting Tomcat Security to "no" per instruction at
    http://webui.sourcelabs.com/ubuntu/mail/user/threads/Tomcat_connecting_to_MySQL_-Ubuntu8.10_Server.meta
    http://ubuntuforums.org/showthread.php?t=1034957&highlight=apache+tomcat+jdbc
    http://ubuntuforums.org/showthread.php?t=66615
    http://ubuntuforums.org/showthread.php?t=33601&highlight=java+mysql
    http://ubuntuforums.org/showthread.php?t=430133
    http://programminglinuxblog.blogspot.com/2008/03/connection-pooling-with-java-all.html
    http://webui.sourcelabs.com/ubuntu/mail/user/threads/Tomcat_connecting_to_MySQL_-Ubuntu8.10_Server.meta

    SOLUTION
    I had to add
    <Resource name="jdbc/webappDB"
         auth="Container"
         type="javax.sql.DataSource"
            maxActive="100"
         maxIdle="30"
         maxWait="10000"
            username="root"
         password="password"
         driverClassName="com.mysql.jdbc.Driver"
            url="jdbc:mysql://localhost:3306/webapp?autoReconnect=true"/>into /var/lib/tomcat6/conf/Catalina/localhost/ webapp.xml
    Note: the above context file was created automatically after deploying the webapp. I had to add the <resource> to it.
    The context I created in usr/share/tomcat_home/webapp/META_INF/context.xml is still there and has the same <resource>.defined in it. I did not verify whether or not it still needs to be there.
    After that I had to add two policies
    /var/lib/tomcat6/conf/policy.d/03catalina.policy
    grant {
    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.dbcp.*";
    and 04webapps.policy
    permission java.net.SocketPermission "127.0.0.1:3306", "connect,resolve,listen,accept";
    That did the trick!
    Other things that were done but have not been verified as to have any bearing on this issue.
    I changed the active java from openjdk to java-sun
    I added $tomcat_home/lib:$tomcat_home/lib/mysql-connector.jar:$tomcat_home/lib/commons-dbcp.jar to PATH
    Changed CLASSPATH=usr/share/classpath:usr/share/java/commons-dbcp.jar:usr/share/java/mysql-connector.jar
    Edited by: wlbragg on Feb 25, 2009 12:58 AM
    Edited by: wlbragg on Feb 25, 2009 12:59 AM
    Edited by: wlbragg on Feb 25, 2009 1:11 AM

  • Yet another ALERT: Cannot create class in system package

    I've searched on the forums and seen several postings and none that really explained a solution, just the initial poster replying they fixed the problem. I am new to J2ME and java in general, I'm going off a book and my first test worked fine but this one gives me the the ALERT: Cannot create class in system package, when I select the GO command. The error occurs in the commandAction method where command == go trying to create an alert message. I am using MIDP 2.0 and as I stated new to this whole thing so a detail response would be greatly appreciated and what I need to do to resolve this for now and the future.
    Source code for TextBoxTest.java :
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    public class TextBoxTest extends MIDlet implements CommandListener
       private TextBox textBox;
       private Alert alert;
       private Command quit;
       private Command go;
       public TextBoxTest()
          // Setup the UI
          textBox = new TextBox("Enter Name", "", 20, TextField.ANY);
          go = new Command("Go", Command.SCREEN, 1);
          quit = new Command("Quit", Command.EXIT, 2);
          textBox.addCommand(go);
          textBox.addCommand(quit);
          textBox.setCommandListener(this);
       protected void startApp() throws MIDletStateChangeException
          Display.getDisplay(this).setCurrent(textBox);
       protected void pauseApp()
       protected void destroyApp(boolean unconditional)
            throws MIDletStateChangeException
       public void commandAction(Command command, Displayable displayable)
          try
             if (command == quit)
                destroyApp(true);
                notifyDestroyed();
             if (command == go)
                alert = new Alert("", "Greetings " + textBox.getString(), null,
    AlertType.CONFIRMATION);
                Display.getDisplay(this).setCurrent(alert);
          catch (MIDletStateChangeException me)
             System.out.println(me + " caught.");
    }

    Ok so my problem isn't with the code it's with the build order. I guess I needed to state that I was following a book and trying to compile and preverify through command line and not using the toolkit or an IDE. So if I use NetBeans 5.0 or the Wireless Toolkit 2.5 I can compile fine.
    So my new question is, can someone show me the steps to build through command line? This is MIDP 2.0.

  • Jsr 180 cannot create class in system package.

    Hi,
    I am trying to run the jsr 180 api sip-example midlets from jbuilder. The project buildes fien but when I run it I get the following:
    C:\JBuilderX\j2mewtk2.0\bin\emulator.exe -Xdevice:DefaultColorPhone -Xdescriptor:"C:\Documents and Settings\aishling\jbproject\aisling\lib\sip-examples.jad"
    Running with storage root DefaultColorPhone
    ALERT: Cannot create class in system package
    Execution completed successfully
    398951 bytecodes executed
    8 thread switches
    434 classes in the system (including system classes)
    2473 dynamic objects allocated (82448 bytes)
    3 garbage collections (58908 bytes collected)
    From going through the archives, I thought I should change the name of the package. So I renamed the directory containing the midlet files from /src/examples to /src/aisexamples and updated each file to include package aisexamples. However this just results in another error (22 + 14) unable to create MIDlet aisexamples.
    Please, please can someone let me know whats going on?
    Thanks,
    Aisling.

    i m also facing the same prob can any body help us

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

    HI,
    Can any one help why i am getting the below error:
    Cannot create JDBC driver of class '' for connect URL 'null'
    The Error Stack Trace is:
    Cannot create JDBC driver of class '' for connect URL 'null'
    java.lang.NullPointerException
        at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(Unknown Source)
        at java.sql.DriverManager.getDriver(Unknown Source)
        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1437)
        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
        at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCConnection.Open(Unknown Source)
        at com.crystaldecisions.reports.queryengine.JDBConnectionWrapper.Open(SourceFile:123)
        at com.crystaldecisions.reports.queryengine.Connection.br(SourceFile:1786)
        at com.crystaldecisions.reports.queryengine.Connection.bs(SourceFile:505)
        at com.crystaldecisions.reports.queryengine.Connection.t4(SourceFile:3020)
        at com.crystaldecisions.reports.dataengine.dfadapter.DFAdapter.a(SourceFile:697)
        at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.a(SourceFile:309)
        at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.long(SourceFile:264)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1150)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:660)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:166)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:528)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:526)
        at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:524)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:423)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:351)
        at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)
        at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)
        at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716)
        at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125)
        at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)
        at com.crystaldecisions.sdk.occa.report.application.ds.a(SourceFile:186)
        at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:878)
        at com.crystaldecisions.sdk.occa.report.application.ReportSource.getPromptDatabaseLogOnInfos(SourceFile:815)
        at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.getPromptDatabaseLogOnInfos(SourceFile:338)
        at com.businessobjects.report.web.a.e.a(SourceFile:174)
        at com.businessobjects.report.web.a.e.a(SourceFile:97)
        at com.businessobjects.report.web.a.e.a(SourceFile:343)
        at com.businessobjects.report.web.a.t.a(SourceFile:1726)
        at com.businessobjects.report.web.event.bw.broadcast(SourceFile:97)
        at com.businessobjects.report.web.event.am.a(SourceFile:53)
        at com.businessobjects.report.web.a.t.if(SourceFile:2104)
        at com.businessobjects.report.web.e.a(SourceFile:300)
        at com.businessobjects.report.web.e.a(SourceFile:202)
        at com.businessobjects.report.web.e.a(SourceFile:135)
        at com.crystaldecisions.report.web.ServerControl.a(SourceFile:607)
        at com.crystaldecisions.report.web.ServerControl.processHttpRequest(SourceFile:342)
        at org.apache.jsp.CrystalReport_jsp._jspService(CrystalReport_jsp.java:205)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
    Cannot create JDBC driver of class '' for connect URL 'null'
    java.lang.NullPointerException
        at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(Unknown Source)
        at java.sql.DriverManager.getDriver(Unknown Source)
        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1437)
        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
        at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCConnection.Open(Unknown Source)
        at com.crystaldecisions.reports.queryengine.JDBConnectionWrapper.Open(SourceFile:123)
        at com.crystaldecisions.reports.queryengine.Connection.br(SourceFile:1786)
        at com.crystaldecisions.reports.queryengine.Connection.
    Thanks
    Penchal

    HI Shailendra,
    I think your expecting code. The Code is as follows. and also for few reports i am getting Unexpected Database Error help me in this also
    if(reportName != null && !"".equals(reportName) && reportSource==null){
            //Initializing report
            ReportClientDocument boReportClientDocument = new ReportClientDocument();
            boReportClientDocument.open(reportName, 0);
              Fields<IParameterField> parameterFields = boReportClientDocument.getDataDefController().getDataDefinition().getParameterFields();
              System.out.println("Param Fields Size:"+parameterFields.size());
         if (parameterFields.size() > 0) {
            ParameterFieldController paramController = boReportClientDocument.getDataDefController().getParameterFieldController();
            for (int i = 0; i < parameterFields.size(); i++) {
                String paramName = parameterFields.getField(i).getName().trim();
                System.out.println("                    -          "+paramName);
                if(request.getParameter(paramName) != null) {
                    paramController.setCurrentValue("", paramName, request.getParameter(paramName));
                    System.out.println(paramName+":"+request.getParameter(paramName));
                }else {
                    System.out.println("Param is Null:"+paramName+":"+request.getParameter(paramName));
                    paramController.setCurrentValue("", paramName, "");
        reportSource = boReportClientDocument.getReportSource();
        //session.setAttribute("ReportSource", reportSource);
        boReportClientDocument.close();
        CrystalReportViewer crystalReportViewer = new CrystalReportViewer();
        crystalReportViewer.setName(reportName);
        crystalReportViewer.setOwnPage(true);
        crystalReportViewer.setBestFitPage(true);
        crystalReportViewer.setToolPanelWidth(0);
        crystalReportViewer.setHasToggleParameterPanelButton(false);
        crystalReportViewer.setHasToggleGroupTreeButton(false);
        crystalReportViewer.setReportSource(reportSource);
        crystalReportViewer.setEnableDrillDown(false);
                crystalReportViewer.processHttpRequest(request, response,getServletConfig().getServletContext(),null);
    Thanks
    Penchal

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

Maybe you are looking for

  • A wallet needs to be configured for this instance of Application Express

    hi I m very new to APEX. I could create web service client with wsdl. But when service is on https i get message "a wallet needs to be configured for this instance of Application Express". I have created wallet using OWM (10.2.0.1.0) at location c:\d

  • How to modify an existing xml file from java code.

    Hi I have worked on creating a new xml file from java code using xmlbeans.But if i try to modify an already existing file using java code I am unable to get errorfree xmlfile. For example if xml file(studlist.xml) is as below: <?xml version="1.0" enc

  • Party & Service without Party

    Hi all,          We have a Party and service without party options in Integration Directory.What is the differece between those two options. In which situation we can use those options. Thanks & Regards, sekhar

  • Disabling the 'reset' function in Safari

    I wish to disable the "Reset Sarfari" function (in the pull down menu under Safari Version 2.0.4). Is this possible?? G5   Mac OS X (10.4.7)  

  • Working with ActionListener

    i am working with a complex structured application where i have to invoke the ActionListener.processAction() before the PROCESS_VALIDATIONS phase. i have a set of code which is public class MyActionListener implements ActionListener{ public PhaseId g