Connecting a servlet in tomcat with a database

Hello i have this problem, i have an aplication that connects to a database, but when a servlet in tomcat use it, i get the problem that the connection is null and you can't connect to it. Anyone know something about this? i have to change any parameter in tomcat to get access to a database??
Thanks

Hello i have this problem, i have an aplication that
connects to a database, but when a servlet in tomcat
use it, i get the problem that the connection is null
and you can't connect to it. Anyone know something
about this? i have to change any parameter in tomcat
to get access to a database??First of all, you should post the relevant portion of your code to explain what your problem is.
Second, I am dead against writing JDBC code within servlets. But that's something you would be reading in subsequent posts.

Similar Messages

  • How to Connect Forms or any version with Oracle Databases 8/6i/9i/10i/11i

    I want to know that how can i cannect Developer Forms / Reports with Oracle Databases with various versions and say developer 2000 to Oracel 6i/9i/10i/11i etc

    Using the appropriate setting in tnsnames.ora file located in your [Forms_Home]\network\admin directory.
    Sim

  • Servlets Not Working with PointBase Database

    Hello All,
    Background (This is more of a PointBase Question): I am developing a web application and am attempting to integrate a PointBase database with the app to capture my data.
    Issue: While attempting to start and populate my database, I receive an error which reads (Class Not Found: JBDC driver com.pointbase.jdbc.jdbcUniversalDriver could not be loaded)
    Question: Has anyone ever encountered this issue and resolved it?...or have any ideas about what could be the problem. Thanks for any assistance. RodneyM
    Detail: I have the pbclient.jar file in the tomcat\common\lib directory.
    My ant build.xml script is below....as well as my db schema.
    <!-- =================== Web.xml DATABASE TARGETS =============================== -->
    <target name="createUserData">
    <input message="Please enter username for table: "
    addproperty="table.username" />
    <copy file="db/data_template.sql" tofile="db/data.sql">
    <filterset>
    <filter token="username" value="${table.username}"/>
    </filterset>
    </copy>
    </target>
    <target name="createSchema">
    <sql
    driver="com.pointbase.jdbc.jdbcUniversalDriver"
    url="jdbc:pointbase://localhost/dvdlibrary,new"
    userid="PBPUBLIC"
    password="PBPUBLIC"
    classpath="${pointbase.home}/lib/pbclient.jar"
    onerror="continue"
    src="db/schema.sql"
    />
    </target>
    <target name="populateDatabase" depends="createSchema,createUserData">
    <sql
    driver="com.pointbase.jdbc.jdbcUniversalDriver"
    url="jdbc:pointbase://localhost/dvdlibrary"
    userid="PBPUBLIC"
    password="PBPUBLIC"
    classpath="${pointbase.home}/lib/pbclient.jar"
    onerror="continue"
    autocommit="true"
    print="true"
    src="db/data.sql"
    />
    </target>
    <!-- =================== END DATABASE TARGETS =============================== -->
    <!-- =================== SCHEMA =============================== -->
    -- This is the Database Schema for the DVD Library Application.
    -- Clear out the old table.
    DROP TABLE ObjectIDs;
    DROP TABLE Item;
    -- This table represents the "next" object_ID for a given table.
    CREATE TABLE ObjectIDs (
    -- PRIMARY KEY --
    table_name VARCHAR(30) PRIMARY KEY,
    -- DATA FIELDS --
    id INTEGER NOT NULL
    -- This table represents the DVD Items
    CREATE TABLE Item (
    -- PRIMARY KEY --
    id INTEGER PRIMARY KEY,
    -- DATA FIELDS --
    username VARCHAR(20) NOT NULL,
    title VARCHAR(100) NOT NULL,
    year CHAR(4) NOT NULL,
    genre VARCHAR(20) NOT NULL
    COMMIT;

    Yeah. Millions of Java programmers have had the problem where something isn't in their classpath, and gone on to resolve it. In fact it's a rare Java programmer who hasn't had that problem.
    Perhaps there's a conflict between this statement:"I have the pbclient.jar file in the tomcat\common\lib directory."And this configuration option:classpath="${pointbase.home}/lib/pbclient.jar"

  • Using tomcat with Oracle database?

    I am having some difficulty setting up Tomcat 6.0.16 with JDeveloper 10 and Oracle - I have with the kind help of people here found this:
    ADF-BC4J + MySQL 5 + Tomcat 6
    Which helps me some of the way, but it is for MySQL, not Oracle, and I don't know things well enough to change the XML in a meaningful way.
    I did try to install MySQL, but not extremely hard - I would prefer to use Oracle, anyway. Are there any instructions about how to do this for an Oracle database?

    Please refer
    http://www.microdeveloper.com/html/JNDI_Orcl_Tomcat1p.html
    http://www.akadia.com/download/soug/tomcat/html/tomcat_apache.html#Deploying%20Servlets
    http://www.hansbergsten.com/contrib/solaris-oracle-howto.html

  • Connect oracle application server 10g with oracle database 9i

    Hello, I am doing a project with Oracle Application Server and application server can not connect with my Oracle 9i database, how do my version of Oracle Application Server is the 10g, thanks for the help and excuse my English

    Well, now it depends how do you want to access your 9i database from Application Server via J2EE application deployed at Application Server or via Portal.
    For J2EE application, you can use connect string for your 9i database in datasources.xml of J2EE app.
    For Portal application, again it depends what you want to do - create an data entry application or just want to fetch a report based on 9i database.
    Hope I have provided answer to your question.
    Regards.

  • Connectivity Problems Forms 10g Builder with 11g Database Release 1

    Hello All,
    I am trying to connect 11g Database (Version 11.1.0.7.0 mounted on Linux) from my Oracle Forms 10g Builder 10.1.2.0.2 in my client PC Windodws XP. But its just hanging and doesnt connects at all.
    Strange is that from the same Oracle home i am able to connect to same 11g user through the reports builder 10g and
    , sqlplusw and sqlplus from 10g home.
    But i am not able to connect to 11g R1 database from my Forms Builder alone. Why is this? Can the PROs get me out of this problem please.
    Thanks in advance.

    Hi
    For your issue i suggest close your thread here as changing thread status to answered and move it to Forum Home » Development Tools which you can get more quick response
    Regard
    Helios

  • How to use JDBC to connect Tomcat with database server?(Urgent!)

    I try to deploy the tomcat and make it connect with databaser server.
    I am using mysql connector J 3.0. I added the CLASSPATH of mysql-connector-java-3.0.7-stable-bin.jar in the tomcat.sh .
    I also add the web application in server.xml.
    When I start tomcat, I can see using Classpath including mysql-connector-java-3.0.7-stable-bin.jar .
    But when i browse my jsp including the jdbc, wait for a while, I get a message as following: Timeout on server localhost. My web server and database server is same computer.
    Could you tell me what's wrong?

    Did you check to see that the MySQL database was indeed up and running, and accepting connections when you started Tomcat? Did you make sure that your firewall permits connections to the database?
    Timeout errors generally occur when you send a request to a server and the server does nothing with it - i.e., it doesn't respond to it in any way. Most firewalls are configured this way. If I telnet to your machine and I get "connection refused", I know your machine exists and I can try hacking into it. If I telnet and get nothing at all, then I will either assume either there's no actual machine at that address or it's unresponsive.

  • Can't connect a servlet to a mysql database (jdbc)

    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    public class LoginServletJDBC extends HttpServlet{
         public void doGet(HttpServletRequest request,HttpServletResponse response)
         throws ServletException,IOException{
              sendLoginForm(response,false);     }
         public void sendLoginForm(HttpServletResponse response,boolean error)
         throws ServletException,IOException{
              response.setContentType("text/html");
              PrintWriter out = response.getWriter();
              out.println("<html><head>");
              out.println("<title>Login</title>");
              out.println("</head>");
              out.println("<body>");
              out.println("<center>");
              if(error)
                   out.println("<b>Failed login. Please try again</b>");
              out.println("<br><br>");
              out.println("<h2>Login page</h2>");
              out.println("<br>Please enter your username and password");
              out.println("<br><br>");
              out.println("<form method=post>");
              out.println("<table>");
              out.println("<tr>");
              out.println("<td>Username : </td>");
              out.println("<td><input type=text name=userName></td>");
              out.println("</tr>");
              out.println("<tr>");
              out.println("<td>Password : </td>");
              out.println("<td><input type=password name=password></td>");
              out.println("</tr>");
              out.println("<tr>");
              out.println("<td align=right colspan=3>");
              out.println("<input type=submit value=Login></td>");
              out.println("</tr>");
              out.println("</table>");
              out.println("</form>");
              out.println("</center>");
              out.println("</body></html>");
    public void doPost(HttpServletRequest request,HttpServletResponse response)
         throws ServletException,IOException{
              String userName = request.getParameter("userName");
              String password = request.getParameter("password");
              if(login(userName,password)){
                   RequestDispatcher rd = request.getRequestDispatcher("AnotherServlet");
                   rd.forward(request,response);
              else{
                   sendLoginForm(response,true);
         boolean login(String userName,String password){
              try{
                   String url = "jdbc:mysql://localhost:3306/Users";
                   Class.forName("com.mysql.jdbc.Driver");
                   Connection con = DriverManager.getConnection(url,"root","");
                   //System.out.println("got connection");
                   Statement s = con.createStatement();
                   String sql = "select userName from Users where userName='"+userName+"and password='"+password+"';";
                   ResultSet rs = s.executeQuery(sql);
                   if(rs.next()){
                        rs.close();
                        s.close();
                        con.close();
                        return true;
                   rs.close();
                   s.close();
                   con.close();
              catch(ClassNotFoundException e){
                   System.out.println(e.toString());
              catch(SQLException e){
                   System.out.println(e.toString());
              catch(Exception e){
                   System.out.println(e.toString());
              return false;
    }so ...
    here i'm trying to connect to Users mysql database (i use Tomcat 4.1 and mysql servers and clients 4.0.1-alpha)
    where is the problem ? when i run this servlet (http://localhost:8080/example/servlet/LoginServletJDBC ) it works ;
    BUT when i type an username and a password (any user&pass) my servlet doesn't connect to the database (become a infinite loop without output ; i mean no any errors and exceptions)
    i try other think : i changed the database with unexisting database and the result was that i was expected (Unknow database 'unexistingdatabase' )
    what i miss ?
    please... can anyone help me...
    thank`s in advance

    The wireless security setting that the Actiontec modem/router is using may be different...and not compatible....than the setting that the Comcast product was using.
    If you think that might the case, and you have the time to troubleshoot......
    Temporarily, turn off the wireless security on the Actiontec modem/router
    Reset an AirPort Express back to default settings, then see if it will connect using no security and allow an Internet connection when you do the Ethernet port test in the post above again.
    If the AirPort Express cannot connect correctly using no security on the wireless network.....then it is a no brainer to know that it will never connect when security is enabled.  So, if the AirPort will not connect using no security, you may have an incompatibility issue between the Actiontec and Apple products.
    However, if the AirPort Express connects OK with no security, then this tells you that you will need to use a different setting for security on the Actiontec...the same that the Comcast router was using before.....so the Express will have a better chance of connecting.
    That setting would be something like WPA/WPA2 Personal, or the same setting stated another way would be WPA-PSK-TKIP.

  • Servlets.. with a database

    I've tried creating a Java Servlet that should connect to a access database. This is done via an html form which sends the form data to the servlet, uses the method via doGet (which works) ... HOWEVER, as soon as I try connecting to a access database within my doGet method, it doesn't work.
    Please let me know if maybe I'm not doing this properly
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.sql.*;
    import java.net.*;
    public class JavaForm1 extends HttpServlet {
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String title = "Reading Three Request Parameters";
    String theCity = request.getParameter("city");
    String theName = request.getParameter("name");
    String theAddress = request.getParameter("address");
    String theSize = request.getParameter("size");
    //String[] topping;
    String toppings = "";
    String test;
    //topping = new String[5];
    for (int i = 1;i < 6 ; i++ )
    toppings = toppings + request.getParameter("topping" + i);
    if (i != 5)
    toppings = toppings + ", ";
    // ------------------------ done retrieving data ---------------------
    try
    //System.out.println("Connection Successful");
    Statement st = con.createStatement();
    //Order Name Address City Size Toppings
    // --- checking order number --
    int i = 0;
    boolean blnOrderFound = true;
    boolean blnisLast = false;
    /*while (blnisLast == false) // loops through all orders to find the last one
    i++; // increments the 'order' counter
    ResultSet rs = st.executeQuery("SELECT * FROM PizzaOrder Where Order = '" + i + "'" );
    if (rs.next() == false) // false if the order is not in DB
    //blnOrderFound = false; // no order was found
    blnisLast = false;
    rs.close();
    //  i = the nextOrderNumber (from above)
    //------------------------- starting to enter data ---------------
    String sql = "INSERT INTO PizzaOrder "
              + "(Order, Name)"
              + " VALUES( "
              + "'" + "5" + "',"
              + "'" + "man" + "')";
              String sql = "INSERT INTO PizzaOrder "
              + "(Order, Name, Address, City, Size, Toppings)"
              + " VALUES( "
              + "'" + 5 + "',"
              + "'" + theName + "',"
              + "'" + theAddress + "',"
              + "'" + theSize + "',"
              + "'" + theCity + "',"
              + "'" + toppings + "')"; */
         int rows = st.executeUpdate(sql);          
    catch (ClassNotFoundException e)
    catch (SQLException e)
    System.out.println("Unable to connect");
    System.out.println("SQL error: " + e);
    out.println("<HTML><BODY>" + e + "<br/><br/></BODY></HTML>");
    catch (Exception ex)
    //FileOutputStream outfile = new file("debug.txt");
    //outfile.write(ex.printStackTrace());
    //out.println("<HTML><BODY>" + ex.printStackTrace() + "</BODY></HTML>");
    out.println("<HTML><BODY>" + theName + theAddress + theCity + theSize + toppings + "</HTML></HTML>");
    }I've heard that there's an init() method which I could use aswell, but I'm really not sure what the point of it would be if just place everything within the doGET method.
    I'm so frustrated with the database connection error (stated error within the sql statement).. any help would be really appreciated.
    Edited by: ManRed on Nov 20, 2007 8:30 PM

    Try youd db access from a simple standalone code without a Web context, i.e. without servlets.
    When you finish the debug of the code, use it in your servlet.

  • Can not connect Fusion Web Application with MySQL database

    Hello to everybody, I have installed jDeveloper since 3 days ago and I am still not able to run a simple web application just to try! I have worked previously with Eclipse and NetBeans but none of them had sooo much errors related to everything. I pasted the JDBC driver everywhere in the jdeveloper folders, to JDK and JRE. To be clear, I created a Fusion Web Application, created an AppModule, tested the conncection with the database and it was fine, created a simple jsf page and added one DataView from the AppModuleDataControl to the jsf file. Everything is ok and when I want to run the jsf file I receive this error:
    <May 2, 2013 12:13:18 PM CEST> <Notice> <Diagnostics> <BEA-320068> <Watch 'UncheckedException' with severity 'Notice' on server 'DefaultServer' has triggered at May 2, 2013 12:13:18 PM CEST. Notification details:
    WatchRuleType: Log
    WatchRule: (SEVERITY = 'Error') AND ((MSGID = 'WL-101020') OR (MSGID = 'WL-101017') OR (MSGID = 'WL-000802') OR (MSGID = 'BEA-101020') OR (MSGID = 'BEA-101017') OR (MSGID = 'BEA-000802'))
    WatchData: DATE = May 2, 2013 12:13:18 PM CEST SERVER = DefaultServer MESSAGE = [ServletContext@16349538[app:test2 module:test2-ViewController-context-root path:/test2-ViewController-context-root spec-version:2.5]] Servlet failed with Exception
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.NoClassDefFoundError, msg=com/mysql/jdbc/DatabaseMetaData
         at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4739)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2536)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2346)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:3245)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:571)
         at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:234)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:504)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:499)
         at oracle.adf.model.bc4j.DCJboDataControl.initializeApplicationModule(DCJboDataControl.java:517)
         at oracle.adf.model.bc4j.DCJboDataControl.getApplicationModule(DCJboDataControl.java:867)
         at oracle.adf.model.binding.DCDataControl.setErrorHandler(DCDataControl.java:487)
         at oracle.jbo.uicli.binding.JUApplication.setErrorHandler(JUApplication.java:261)
         at oracle.adf.model.BindingContext.put(BindingContext.java:1318)
         at oracle.adf.model.binding.DCDataControlReference.getDataControl(DCDataControlReference.java:247)
         at oracle.adf.model.BindingContext.instantiateDataControl(BindingContext.java:1020)
         at oracle.adf.model.dcframe.DataControlFrameImpl.doFindDataControl(DataControlFrameImpl.java:1645)
         at oracle.adf.model.dcframe.DataControlFrameImpl.internalFindDataControl(DataControlFrameImpl.java:1514)
         at oracle.adf.model.dcframe.DataControlFrameImpl.findDataControl(DataControlFrameImpl.java:1474)
         at oracle.adf.model.BindingContext.internalFindDataControl(BindingContext.java:1150)
         at oracle.adf.model.BindingContext.get(BindingContext.java:1103)
         at oracle.adf.model.binding.DCParameter.evaluateValue(DCParameter.java:82)
         at oracle.adf.model.binding.DCParameter.getValue(DCParameter.java:111)
         at oracle.adf.model.binding.DCBindingContainer.getChildByName(DCBindingContainer.java:2743)
         at oracle.adf.model.binding.DCBindingContainer.internalGet(DCBindingContainer.java:2791)
         at oracle.adf.model.binding.DCExecutableBinding.get(DCExecutableBinding.java:115)
         at oracle.adf.model.binding.DCUtil.findSpelObject(DCUtil.java:329)
         at oracle.adf.model.binding.DCBindingContainer.evaluateParameterWithElCheck(DCBindingContainer.java:1473)
         at oracle.adf.model.binding.DCBindingContainer.findDataControl(DCBindingContainer.java:1603)
         at oracle.adf.model.binding.DCIteratorBinding.initDataControl(DCIteratorBinding.java:2542)
         at oracle.adf.model.binding.DCIteratorBinding.getDataControl(DCIteratorBinding.java:2477)
         at oracle.adf.model.binding.DCIteratorBinding.refresh(DCIteratorBinding.java:4444)
         at oracle.adf.model.binding.DCExecutableBinding.refreshIfNeeded(DCExecutableBinding.java:341)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.isAttributeUpdateable(JUCtrlValueBinding.java:1707)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.isAttributeUpdateable(JUCtrlValueBinding.java:1826)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.isUpdateable(JUCtrlValueBinding.java:2722)
         at oracle.adfinternal.view.faces.model.AdfELResolver._isReadOnly(AdfELResolver.java:130)
         at oracle.adfinternal.view.faces.model.AdfELResolver.isReadOnly(AdfELResolver.java:147)
         at oracle.adfinternal.view.faces.model.AdfELResolverProxy.isReadOnly(AdfELResolverProxy.java:78)
         at com.sun.faces.el.DemuxCompositeELResolver._isReadOnly(DemuxCompositeELResolver.java:293)
         at com.sun.faces.el.DemuxCompositeELResolver.isReadOnly(DemuxCompositeELResolver.java:322)
         at com.sun.el.parser.AstValue.isReadOnly(Unknown Source)
         at com.sun.el.ValueExpressionImpl.isReadOnly(Unknown Source)
         at com.sun.faces.facelets.el.TagValueExpression.isReadOnly(TagValueExpression.java:120)
         at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer._getUncachedReadOnly(EditableValueRenderer.java:476)
         at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.cacheReadOnly(EditableValueRenderer.java:406)
         at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.beforeEncode(LabeledInputRenderer.java:128)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:510)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1681)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer._encodeFormItem(PanelFormLayoutRenderer.java:1088)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer.access$100(PanelFormLayoutRenderer.java:50)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer$FormColumnEncoder.processComponent(PanelFormLayoutRenderer.java:1604)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer$FormColumnEncoder.processComponent(PanelFormLayoutRenderer.java:1523)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:187)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:318)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:283)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer._encodeChildren(PanelFormLayoutRenderer.java:420)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer.encodeAll(PanelFormLayoutRenderer.java:208)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at oracle.adfinternal.view.faces.component.AdfViewRoot.encodeAll(AdfViewRoot.java:91)
         at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:399)
         at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.renderView(ViewDeclarationLanguageFactoryImpl.java:350)
         at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
         at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:273)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:165)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1035)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:342)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:236)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:509)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused By: java.lang.NoClassDefFoundError: com/mysql/jdbc/DatabaseMetaData
         at weblogic.jdbc.wrapper.DatabaseMetaData_com_mysql_jdbc_DatabaseMetaData.getDatabaseProductVersion(Unknown Source)
         at oracle.jbo.server.DBTransactionImpl.initTransaction(DBTransactionImpl.java:1198)
         at oracle.jbo.server.DBTransactionImpl.initTxn(DBTransactionImpl.java:6838)
         at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:298)
         at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:329)
         at oracle.jbo.common.ampool.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:203)
         at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolConnect(ApplicationPoolMessageHandler.java:600)
         at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:417)
         at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:9053)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4606)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2536)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2346)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:3245)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:571)
         at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:234)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:504)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:499)
         at oracle.adf.model.bc4j.DCJboDataControl.initializeApplicationModule(DCJboDataControl.java:517)
         at oracle.adf.model.bc4j.DCJboDataControl.getApplicationModule(DCJboDataControl.java:867)
         at oracle.adf.model.binding.DCDataControl.setErrorHandler(DCDataControl.java:487)
         at oracle.jbo.uicli.binding.JUApplication.setErrorHandler(JUApplication.java:261)
         at oracle.adf.model.BindingContext.put(BindingContext.java:1318)
         at oracle.adf.model.binding.DCDataControlReference.getDataControl(DCDataControlReference.java:247)
         at oracle.adf.model.BindingContext.instantiateDataControl(BindingContext.java:1020)
         at oracle.adf.model.dcframe.DataControlFrameImpl.doFindDataControl(DataControlFrameImpl.java:1645)
         at oracle.adf.model.dcframe.DataControlFrameImpl.internalFindDataControl(DataControlFrameImpl.java:1514)
         at oracle.adf.model.dcframe.DataControlFrameImpl.findDataControl(DataControlFrameImpl.java:1474)
         at oracle.adf.model.BindingContext.internalFindDataControl(BindingContext.java:1150)
         at oracle.adf.model.BindingContext.get(BindingContext.java:1103)
         at oracle.adf.model.binding.DCParameter.evaluateValue(DCParameter.java:82)
         at oracle.adf.model.binding.DCParameter.getValue(DCParameter.java:111)
         at oracle.adf.model.binding.DCBindingContainer.getChildByName(DCBindingContainer.java:2743)
         at oracle.adf.model.binding.DCBindingContainer.internalGet(DCBindingContainer.java:2791)
         at oracle.adf.model.binding.DCExecutableBinding.get(DCExecutableBinding.java:115)
         at oracle.adf.model.binding.DCUtil.findSpelObject(DCUtil.java:329)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer._encodeFormItem(PanelFormLayoutRenderer.java:1088)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer.access$100(PanelFormLayoutRenderer.java:50)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer$FormColumnEncoder.processComponent(PanelFormLayoutRenderer.java:1604)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer$FormColumnEncoder.processComponent(PanelFormLayoutRenderer.java:1523)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:187)
         at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
         at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:274)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1681)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
         at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
         at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1275)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1681)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1677)
         at oracle.adfinternal.view.faces.component.AdfViewRoot.encodeAll(AdfViewRoot.java:91)
         at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:399)
         at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.renderView(ViewDeclarationLanguageFactoryImpl.java:350)
         at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused By: java.lang.ClassNotFoundException: com.mysql.jdbc.DatabaseMetaData
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
         at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
         at weblogic.jdbc.wrapper.DatabaseMetaData_com_mysql_jdbc_DatabaseMetaData.getDatabaseProductVersion(Unknown Source)
         at oracle.jbo.server.DBTransactionImpl.initTransaction(DBTransactionImpl.java:1198)
         at oracle.jbo.server.DBTransactionImpl.initTxn(DBTransactionImpl.java:6838)
         at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:298)
         at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:329)
         at oracle.jbo.common.ampool.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:203)
         at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolConnect(ApplicationPoolMessageHandler.java:600)
         at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:417)
         at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:9053)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4606)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2536)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2346)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:3245)
         at oracle.adf.model.BindingContext.get(BindingContext.java:1103)
         at oracle.adf.model.binding.DCParameter.evaluateValue(DCParameter.java:82)
         at oracle.adf.model.binding.DCParameter.getValue(DCParameter.java:111)
         at oracle.adf.model.binding.DCBindingContainer.getChildByName(DCBindingContainer.java:2743)
         at oracle.adf.model.binding.DCBindingContainer.internalGet(DCBindingContainer.java:2791)
         at oracle.adf.model.binding.DCExecutableBinding.get(DCExecutableBinding.java:115)
         at oracle.adf.model.binding.DCUtil.findSpelObject(DCUtil.java:329)
         at com.sun.faces.el.DemuxCompositeELResolver.isReadOnly(DemuxCompositeELResolver.java:322)
         at com.sun.el.parser.AstValue.isReadOnly(Unknown Source)
         at com.sun.el.ValueExpressionImpl.isReadOnly(Unknown Source)
         at com.sun.faces.facelets.el.TagValueExpression.isReadOnly(TagValueExpression.java:120)
         at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer._getUncachedReadOnly(EditableValueRenderer.java:476)
         at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.cacheReadOnly(EditableValueRenderer.java:406)
         at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.beforeEncode(LabeledInputRenderer.java:128)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:510)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1681)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer._encodeFormItem(PanelFormLayoutRenderer.java:1088)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer.access$100(PanelFormLayoutRenderer.java:50)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer$FormColumnEncoder.processComponent(PanelFormLayoutRenderer.java:1604)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer$FormColumnEncoder.processComponent(PanelFormLayoutRenderer.java:1523)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:187)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:318)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:283)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer._encodeChildren(PanelFormLayoutRenderer.java:420)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer.encodeAll(PanelFormLayoutRenderer.java:208)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1681)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
         at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
         at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:274)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1681)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
         at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
         at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1275)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1681)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1677)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Please help me if you can! Thank you in advance
    Edited by: 1003357 on May 2, 2013 3:23 AM

    I pasted the JDBC driver everywhere in the jdeveloper folders, to JDK and JRE.
    The MySQL Connector Java JAR files are not found in the runtime class of the web application as indicated by the error message java.lang.NoClassDefFoundError, msg=com/mysql/jdbc/DatabaseMetaData
    Please refer
    http://docs.oracle.com/cd/E15523_01/web.1111/e13737/third_party_drivers.htm#autoId1

  • Error in Tomcat with Servlet

    Hi,
    I made a webapplication in JBuilder. When I run the project it runs just fine, even when I type the URL http://localhost:8080/webshop/file.shtml in explorer. Very simple.
    I installed the project war file in tomcat with the manager and tomcat made a webshop dir in web-app. This dir contains all the files needed for Tomcat to run a web-app
    I configured the web.xml, it looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <!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>
    <servlet>
    <servlet-name>dbservlet</servlet-name>
    <servlet-class>webwinkel.DBServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>dbservlet</servlet-name>
    <url-pattern>/dbservlet</url-pattern>
    </servlet-mapping>
    </web-app>
    But the web-app doens't run online. When I try to reach the servlet I get a 404. Tomcat can't find the servlet. Am I forgetting something here, if it runs local in JBuilder shouldn't it just as easy run on a webserver?
    please help I'm desperate
    Susan

    looks like you should be pointing to the following url to get to your servlet:
    http ://localhost:8080/webshop/dbservlet
    Is this what you or your form is pointing to? Are you able to get to /file.shtml but not the servlet?

  • Help! I can't do anything with my database even though i've connected!

    Hello,
    I think I have properly connected to my MS SQL Server 2000 database, cause I'm not throwing any exceptions when I connect, but I can't insert or update any data, it displays error messages when i try to do either..i haven't tested delete cause its a database with empty tables. I think something has to be wrong iwth my database, cause this code works fine when i use jdbc-odbc with MS ACCESS 2000. I'll post my code here, just in case.
    <code>
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.sql.*;
    import java.rmi.*;
    import javax.swing.text.*;
    import java.net.InetAddress;
    public class mygui extends JPanel implements ActionListener, DocumentListener
    //creates a frame object to add the application GUI components to.
    private JFrame mgframe;
    //text fields and text areas for user input
    // private JTextField file;
    private JTextField function;
    private JTextArea description;
    private JTextField context;
    private JTextField actions;
    private JTextArea name;
    private JTextArea type;
    private JTextArea arguments;
    private JTextArea rvalues;
    private JTextArea rvdescrip;
    private JTextArea rvnotes;
    private JTextArea notes;
    private JTextArea funccalled;
    //scrollpanes for text areas
    private JScrollPane sdescription;
    private JScrollPane sname;
    private JScrollPane stype;
    private JScrollPane sarguments;
    private JScrollPane srvalues;
    private JScrollPane srvdescrip;
    private JScrollPane srvnotes;
    private JScrollPane snotes;
    private JScrollPane sfunccalled;
    // private JLabel lfile;
    private JLabel lfunction;
    private JLabel ldescription;
    private JLabel lcontext;
    private JLabel lactions;
    private JLabel lname;
    private JLabel ltype;
    private JLabel larguments;
    private JLabel lrvalues;
    private JLabel lrvdescrip;
    private JLabel lrvnotes;
    private JLabel lnotes;
    private JLabel lfunccalled;
    //buttons
    private JButton load;
    private JButton savenew;
    private JButton newreturncode;
    private JButton update;
    private JButton delete;
    private JButton deletereturncode;
    private JButton prev;
    private JButton next;
    //panels
    private JPanel filep;
    private JPanel mainp;
    private JPanel mainp2;
    //documents
    private Document insource;
    private Document upsource;
    private Document delsource;
    //strings which contain inputted function information
    private String functionname;
    private String descriptionname;
    private String rvvaluesname;
    private String rvdescripname;
    private String notesname;
    //class constructor that builds the necessary labels
    //and text fields, buttons, and panels.
    public mygui()
    JFrame mgframe = new JFrame("Welcome to the U_Fec function database");
    // Closes from title bar
    //and from menu
    mgframe.addWindowListener(new WindowAdapter()
         public void windowClosing(WindowEvent e)
              System.exit(0);
    mgframe.getContentPane().setLayout(new BorderLayout());
    mgframe.setBackground(Color.white);
    mgframe.setSize(800,999);
    mgframe.setVisible(true);
    //intializes text fields
    // file = new JTextField();
    function = new JTextField ();
    description = new JTextArea();
    context = new JTextField();
    actions = new JTextField();
    name = new JTextArea();
    type = new JTextArea();
    arguments = new JTextArea();
    rvalues = new JTextArea();
    rvdescrip = new JTextArea();
    rvnotes = new JTextArea();
    notes = new JTextArea();
    funccalled = new JTextArea();
    //scrollpanes for each text area
    sdescription = new JScrollPane(description);
    sname = new JScrollPane(name);
    stype = new JScrollPane(type);
    sarguments = new JScrollPane(arguments);
    srvalues = new JScrollPane(rvalues);
    srvdescrip = new JScrollPane(rvdescrip);
    srvnotes = new JScrollPane(rvnotes);
    snotes = new JScrollPane(notes);
    sfunccalled = new JScrollPane(funccalled);
    //initializes labels for text fields
    // lfile = new JLabel("File: ");
    lfunction = new JLabel("Function: ");
    ldescription = new JLabel ("Description: ");
    lcontext = new JLabel ("Context: ");
    lactions = new JLabel ("Actions: ");
    lname = new JLabel ("Name: ");
    ltype = new JLabel ("Type: ");
    larguments = new JLabel ("Arguments: ");
    lrvalues = new JLabel ("Return Values: ");
    lrvdescrip = new JLabel ("Description: ");
    lrvnotes = new JLabel ("Notes: ");
    lnotes = new JLabel ("Notes: ");
    lfunccalled = new JLabel ("Functions called: ");
    //initialize buttons
    load = new JButton("Load");
    update = new JButton ("Update");
    savenew = new JButton ("Insert new function");
    newreturncode = new JButton ("Insert new return code for existing function");
    delete = new JButton ("Del");
    deletereturncode = new JButton ("Delete return code");
    prev = new JButton ("Prev");
    next = new JButton ("Next");
    //calls methods to build each panel
    buildFilePanel();
    buildMainPanel();
    //places panel info into correct border location
    mgframe.getContentPane().add (filep, BorderLayout.NORTH);
    mgframe.getContentPane().add (mainp, BorderLayout.CENTER);
    mgframe.getContentPane().add (mainp2,BorderLayout.SOUTH);
    private void buildMainPanel()
    //main panel
         mainp = new JPanel();
         //Sets color and layout.
         //Adds text fields and labels for user input
         mainp.setBackground(Color.white);
         mainp.setLayout ( new GridLayout (6, 2, 2, 2));
         //grid of name, type, argument, return values,
    //return values description, and return value
    //notes, which is contained within the main panel
    mainp2 = new JPanel();
    mainp2.setBackground(Color.white);
    mainp2.setLayout( new GridLayout (4, 3, 5, 5));
    mainp2.add(lname);
    mainp2.add(ltype);
    mainp2.add(larguments);
    mainp2.add(sname);
    mainp2.add(stype);
    mainp2.add(sarguments);
    mainp2.add(lrvalues);
    mainp2.add(lrvdescrip);
    mainp2.add(lrvnotes);
    mainp2.add(srvalues);
    mainp2.add(srvdescrip);
    mainp2.add(srvnotes);
    // mainp.add(lfunction);
    //     mainp.add(function);
    mainp.add(lfunction);
    mainp.add(function);
         mainp.add(ldescription);
         mainp.add(sdescription);
         mainp.add(lcontext);
         mainp.add(context);
         mainp.add(lactions);
         mainp.add(actions);
    mainp.add(lnotes);
    mainp.add(snotes);
    mainp.add(lfunccalled);
    mainp.add(sfunccalled);
         //sets border around panel and a title
         mainp.setBorder(BorderFactory.createTitledBorder("function information"));
         //listeners for each text field and text area
    //adds property for eact text area/field
         function.getDocument().addDocumentListener(this);
    function.getDocument().putProperty("name","function");
         description.getDocument().addDocumentListener(this);
    description.getDocument().putProperty("name", "description");
         context.getDocument().addDocumentListener(this);
         context.getDocument().putProperty("name","context");
    actions.getDocument().addDocumentListener(this);
         actions.getDocument().putProperty("name","actions");
    name.getDocument().addDocumentListener(this);
         name.getDocument().putProperty("name","name");
    type.getDocument().addDocumentListener(this);
         type.getDocument().putProperty("name","type");
    arguments.getDocument().addDocumentListener(this);
    arguments.getDocument().putProperty("name","arguments");
         rvalues.getDocument().addDocumentListener(this);
    rvalues.getDocument().putProperty("name","return values");
    rvdescrip.getDocument().addDocumentListener(this);
    rvdescrip.getDocument().putProperty("name","return values description");
    rvnotes.getDocument().addDocumentListener(this);
    rvnotes.getDocument().putProperty("name","return values notes");
    notes.getDocument().addDocumentListener(this);
    notes.getDocument().putProperty("name","notes");
    funccalled.getDocument().addDocumentListener(this);
    funccalled.getDocument().putProperty("name","functions called");
    private void buildFilePanel ()
         filep = new JPanel();
         //Sets color and layout
         //Adds text field and buttons for file input
         filep.setBackground(Color.white);
         filep.setLayout(new GridLayout(2,3,0,5));
         //Adds each component to the panel
         filep.add(load);
         filep.add(update);
         filep.add(savenew);
    filep.add(newreturncode);
    filep.add(delete);
    filep.add(deletereturncode);
         //filep.add(prev);
    //     filep.add(next);
         //sets border around panel
         filep.setBorder(BorderFactory.createTitledBorder("buttons"));
         //adds an actionListener for file name
    //     file.getDocument().addDocumentListener(this);
         //sets border around buttons
         load.setBorder(BorderFactory.createRaisedBevelBorder());
         savenew.setBorder(BorderFactory.createRaisedBevelBorder());
    newreturncode.setBorder(BorderFactory.createRaisedBevelBorder());
         update.setBorder(BorderFactory.createRaisedBevelBorder());
    delete.setBorder(BorderFactory.createRaisedBevelBorder());
    deletereturncode.setBorder(BorderFactory.createRaisedBevelBorder());
    //     prev.setBorder(BorderFactory.createRaisedBevelBorder());
    //     next.setBorder(BorderFactory.createRaisedBevelBorder());
         //listeners for the buttons
         load.addActionListener(this);
         savenew.addActionListener(this);
    newreturncode.addActionListener(this);
    update.addActionListener(this);
         delete.addActionListener(this);
    deletereturncode.addActionListener(this);
    //     prev.addActionListener(this);
    //     next.addActionListener(this);
    public void actionPerformed(java.awt.event.ActionEvent evt)
    String dataSourceName = "db1";
    String dbURL = "jdbc:odbc:" + dataSourceName;
    try{
    DriverManager.registerDriver(new com.microsoft.jdbc.sqlserver.SQLServerDriver() );
    //Driver d = (Driver)Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
    // Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver ");
    } catch (Exception e) {
    System.out.println(e.getMessage());
    // } catch (SQLException e) {
    // System.out.println(e.getMessage());
    try{
    Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://NJ8650MONDAL", "m", "m");
    Statement stmt = con.createStatement();
    if (evt.getSource()==load)
    try{
    ResultSet result = stmt.executeQuery("SELECT * FROM function_description, return_code_description " + "WHERE function_description.Function = return_code_description.Function_Name AND (((Function)='"+ functionname + "'));");
    result.next();
    function.setText(result.getString("Function"));
    description.setText(result.getString("Description"));
    notes.setText(result.getString("Notes"));
    rvalues.setText(result.getString("Return_Codes"));
    rvdescrip.setText(result.getString("Return_Codes_Description"));
    }catch (Exception e) {function.setText("Record not found in database.");}
    if(evt.getSource() == update)
    try{
    con.setAutoCommit(false);
    PreparedStatement updateDesc = con.prepareStatement("UPDATE function_description SET Description = ? WHERE Function LIKE ?");
    updateDesc.setString(1, descriptionname);
    updateDesc.setString(2, functionname);
    updateDesc.executeUpdate();
    PreparedStatement updateNote = con.prepareStatement("UPDATE function_description SET Notes = ? WHERE Function LIKE ?");
    updateNote.setString(1, notesname);
    updateNote.setString(2, functionname);
    updateNote.executeUpdate();
    con.commit();
    con.setAutoCommit(true);
    con.setAutoCommit(false);
    PreparedStatement updateRvalue = con.prepareStatement("UPDATE return_code_description SET Return_Codes = ? WHERE Function_Name LIKE ?");
    updateRvalue.setString(1, rvvaluesname);
    updateRvalue.setString(2, functionname);
    updateRvalue.executeUpdate();
    PreparedStatement updateRvdesc = con.prepareStatement("UPDATE return_code_description SET Return_Codes_Description = ? WHERE Function_Name LIKE ?");
    updateRvdesc.setString(1, rvdescripname);
    updateRvdesc.setString(2, functionname);
    updateRvdesc.executeUpdate();
    con.commit();
    con.setAutoCommit(true);
    }catch (Exception e) {function.setText("Could not update function.  Make sure record is found in database");}
    if(evt.getSource()==savenew)
    try{
    con.setAutoCommit(false);
    // PreparedStatement insertRvalues = con.prepareStatement("INSERT INTO return_code_description VALUES (?,?,?)");
    // insertRvalues.setString(1,functionname);
    // insertRvalues.setString(2,rvvaluesname);
    // insertRvalues.setString(3,rvdescripname);
    // insertRvalues.execute();
    PreparedStatement insertFvalues = con.prepareStatement("INSERT INTO function_description VALUES (?,?,?)");
    insertFvalues.setString(1,functionname);
    insertFvalues.setString(2,descriptionname);
    insertFvalues.setString(3,notesname);
    insertFvalues.execute();
    insertFvalues.close();
    PreparedStatement insertRvalues = con.prepareStatement("INSERT INTO return_code_description (Function_Name, Return_Codes, Return_Codes_Description) VALUES (?,?,?)");
    insertRvalues.setString(1,functionname);
    insertRvalues.setString(2,rvvaluesname);
    insertRvalues.setString(3,rvdescripname);
    insertRvalues.execute();
    con.commit();
    con.setAutoCommit(true);
    insertRvalues.close();
    }catch (Exception e) {function.setText("Could not create new record.  Make sure it is not already there.");}
    insertRvalues.setString(1, functionname);
    insertRvalues.setString(2, rvdescripname);
    insertRvalues.setString(3, rvvaluesname);
    insertRvalues.executeUpdate();
    con.commit();
    con.setAutoCommit(true);
    // stmt.executeUpdate("INSERT INTO function_description" + "(Function, Description, Notes)" +
    // "VALUES (('"+ functionname + "'), ('"+ descriptionname + "'), ('"+ notesname + "'));");
    String sql = "INSERT INTO function_description" +
    " (Function, Description, Notes)" +
    " VALUES (functionnname, descriptionname, notesname)";
                        stmt.executeUpdate(sql);
    String sql2 = "INSERT INTO return_codes_description" +
    "(Function Name, Return Codes, Return Codes Description" +
    " VALUES (functionname, rvaluesname, rvdescripname)";
    stmt.executeUpdate(sql2);
    if (evt.getSource() == newreturncode)
    try{
    PreparedStatement insertnewRvalues = con.prepareStatement("INSERT INTO return_code_description (Function_Name, Return_Codes, Return_Codes_Description) VALUES (?,?,?)");
    insertnewRvalues.setString(1,functionname);
    insertnewRvalues.setString(2,rvvaluesname);
    insertnewRvalues.setString(3,rvdescripname);
    insertnewRvalues.execute();
    }catch (Exception e){function.setText("Could not add new return code.  Make sure function record exists.");}
    if (evt.getSource() == delete)
    int n = JOptionPane.showConfirmDialog(mgframe,"Do you want to delete '"+ functionname + "'",
    "An Important Question",
    JOptionPane.YES_NO_OPTION);
    if(n== JOptionPane.YES_OPTION)
    try{
    con.setAutoCommit(false);
    PreparedStatement rDelete = con.prepareStatement("Delete from return_code_description where Function_Name = ?");
    rDelete.setString(1, functionname);
    int deleteCount2 = rDelete.executeUpdate();
    PreparedStatement fDelete = con.prepareStatement("Delete from function_description where Function =? ");
    fDelete.setString(1, functionname);
    int deleteCount = fDelete.executeUpdate();
    con.commit();
    con.setAutoCommit(true);
    }catch (Exception e) {function.setText("Could not delete record.  Make sure it is in database.");}
    if (evt.getSource()== deletereturncode)
    try{
    PreparedStatement rDelete = con.prepareStatement("Delete from return_code_description where Function_Name = ?");
    rDelete.setString(1, functionname);
    int deleteCount2 = rDelete.executeUpdate();
    }catch (Exception e){function.setText("Could not add new return code.  Make sure function record exists.");}
    if (evt.getSource() == next)
    try{
    ResultSet result = stmt.executeQuery("SELECT * FROM function_description, return_code_description " + "WHERE function_description.Function = return_code_description.Function_Name AND (((Function)='"+ functionname + "'));");
    result.next();
    result.next();
    function.setText(result.getString("Function"));
    description.setText(result.getString("Description"));
    notes.setText(result.getString("Notes"));
    rvalues.setText(result.getString("Return_Codes"));
    rvdescrip.setText(result.getString("Return_Codes_Description"));
    }catch (Exception e) {function.setText("Record not found in database.");}
    */} catch (SQLException e) {System.out.println(e.getMessage());}
    public static void main (String [] args)
    mygui mg = new mygui();
    //The following 3 methods are DocumentListener methods
    public void insertUpdate(javax.swing.event.DocumentEvent evt)
    updateLog (evt, "inserted into");
    public void changedUpdate (javax.swing.event.DocumentEvent evt)
    //not fired by plain text components
    public void removeUpdate(javax.swing.event.DocumentEvent evt)
    updateLog(evt, "removed from");
    public void updateLog(javax.swing.event.DocumentEvent evt, String ac)
    Document doc = evt.getDocument();
    if( doc.getProperty("name") == "function")
    try{
    functionname = doc.getText(0,doc.getLength());
    }catch (BadLocationException ble) {
    // Shouldn't get here
    else if ( doc.getProperty("name") == "description")
    try{
    descriptionname = doc.getText(0,doc.getLength());
    }catch (BadLocationException ble) {
    // Shouldn't get here
    else if ( doc.getProperty("name") == "notes")
    try{
    notesname = doc.getText(0,doc.getLength());
    }catch (BadLocationException ble) {
    // Shouldn't get here
    else if ( doc.getProperty("name") == "return values")
    try{
    rvvaluesname = doc.getText(0,doc.getLength());
    }catch (BadLocationException ble) {
    // Shouldn't get here
    else if ( doc.getProperty("name") == "return values description")
    try{
    rvdescripname = doc.getText(0,doc.getLength());
    }catch (BadLocationException ble) {
    // Shouldn't get here
    //Closes class
    </code>
    Thanks in advance!!!!

    This error message is explained on MSDN site (Article Q313181). Here is an excerpt:
    SYMPTOMS
    While using the Microsoft SQL Server 2000 Driver for JDBC, you may experience the following exception:
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode.
    CAUSE
    This error occurs when you try to execute multiple statements against a SQL Server database with the JDBC driver while in manual transaction mode (AutoCommit=false) and while using the direct (SelectMethod=direct) mode. Direct mode is the default mode for the driver.
    RESOLUTION
    When you use manual transaction mode, you must set the SelectMethod property of the driver to Cursor, or make sure that you use only one active statement on each connection as specified in the "More Information" section of this article.

  • Application crashes with timesten database  over  OCI connection

    Application crashes with timesten database over OCI connection
    #0 0x405e09f8 in kpudsany () from /home/oracle/TimesTen/ratingtt1121/ttoracle_home/instantclient_11_1/libclntsh.so.10.1
    #1 0x405728d0 in OCIDescribeAny () from /home/oracle/TimesTen/ratingtt1121/ttoracle_home/instantclient_11_1/libclntsh.so.10.1
    #2 0x43748a5a in GDBociDriver::StoredProcArgumentList () from /home/omni/library/libgfr_dboci.so
    #3 0x4374e865 in GDBociDriver::StoredProcCallFormat () from /home/omni/library/libgfr_dboci.so
    #4 0x4376ec9a in GDBociDriver::ExecuteStmtBind () from /home/omni/library/libgfr_dboci.so
    #5 0x4376fc69 in GDBociDriver::Execute () from /home/omni/library/libgfr_dboci.so
    #6 0x436ba240 in GDBstatement::Execute () from /home/omni/library/libgfr_dblayer.so
    #7 0x43736106 in GDBociDriver::SetModule () from /home/omni/library/libgfr_dboci.so
    #8 0x4366cb22 in GDBconnectionPool::GetConnection () from /home/omni/library/libgfr_dblayer.so
    #9 0x4367a9db in GDBdriver::LoginConnectionGet () from /home/omni/library/libgfr_dblayer.so
    #10 0x4373dbaa in GDBociDriver::Login () from /home/omni/library/libgfr_dboci.so
    #11 0x4377380f in CreateOCIDriver () from /home/omni/library/libgfr_dboci.so
    #12 0x4367bb2a in GDBdriverLoader::CreateDriver () from /home/omni/library/libgfr_dblayer.so
    #13 0x436d423d in IGDBdriverMgr::GetDriverAndLogin () from /home/omni/library/libgfr_dblayer.so
    #14 0x436d4da1 in IGDBdriverMgr::GetDriver () from /home/omni/library/libgfr_dblayer.so
    #15 0x436a5071 in GDBserverDef::InitialLogin () from /home/omni/library/libgfr_dblayer.so
    #16 0x433247cc in CcapAdbAccess::Init (this=0x9e85a88) at CcapAdbAccess.C:161
    #17 0x43331c44 in CcapMain::Run (this=0x434eeb80, sdpId=2, processName=0x9dae29c "URE61_O2") at CcapMain.C:132
    #18 0x080947d1 in ccap_thread (arg=0x0) at main.C:1588
    #19 0x080e7bd2 in ThreadManager::WrapperRoutine (ipArg=0x9e84fc0) at ThreadManager.C:176
    #20 0x0035f44a in start_thread () from /lib/libpthread.so.0
    Timesten has some limitations and it says:
    Describing objects with OCIDescribeAny() is supported only by name. Describing PL/SQL objects is not supported.
    home/omni/library/libgfr_dblayer.so
    Cloud you please tell us whit might be the reason for this

    Are you able to provide exact details of the OCIDescribeAny call being made by the application (including parameter values)?
    Chris

  • Application deployed on Oracle Java Cloud Service - SaaS Extension is not connecting with cloud database.

    Hello Experts,
    I have deployed an ADF application on Oracle Java Cloud Service - SaaS Extension and also deployed database objects from local environment to cloud using JDeveloper. I can see the cloud database has tables and data which I have deployed but when I access the application it seems it is not able to connect with cloud database.
    I have followed below document and same sample application (HRSystem). 
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/JDeveloperPart1/jdeveloperPart1.html
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/JDeveloperPart2/jdeveloperPart2.html
    Please guide me what can be the issue.
    Regards
    Gulam Dyer

    Hi,
    Can you give us more details about your issue? Any error messages?
    Thanks,
    Bogdan

  • Failed to Establish Connection With SQL Database Server in Essbase studio

    I am using Essbase Studio Release 11.1.2.1.00 for developing XOLAP cubes and deploying them on to Essbase server .
    I am getting the below Error while deploying the cube onto Essbase server.
    error : Failed to deploy Essbase cube.
    Caused by: Failed to build Essbase cube dimension: (TimeHierarchy) .
    Caused by: Cannot get async process state. Essbase Error(1021001): Failed to Establish Connection With SQL Database Server.
    From Essbase Studio -> Datasources tab, I could able to connect to SQL Database server..Please let me know how to resolve this issue.
    Thanks,
    Swathi

    Thanks for the reply.
    There was a problem with my Essbase Server..so now i m pointing to other server.
    now I am getting the below Error:
    Failed to deploy Essbase cube.
    Caused by: Cannot end incremental build. Essbase Error(1025008): Join Specification near [[TIMEID]] is invalid. Please verify the Xolap Schema file.
    Please let me know how can I validate my cube and what changes might require in my Cube definitions?

Maybe you are looking for

  • Exchange mail messages does not load

    After being using sucessfuly IPAD with Exchange Outlook anywhere (owa) for more than 6 months messages headers are downloaded but after click to check the message body, it takes a while and message can not be shown. There is any clue? Activesync or O

  • Oracle 10g 2 - 10.2.0.2 Patch seti without instance

    Hi, I'm installing Oracle 10g 2 - 10.2.0.2. I installed base release 10g 2 and then i have installed the patch set 10.2.0.2 (Linux x86). It's a new installation, so there isn't an instance. When i use dbca to create the DB i receive the error ORA-010

  • Download J2SE v 1.4.2_02

    When is 1.4.2_02 out ? Peter

  • How to add a style name to a text using InDesign plugin

    Hi, I am developing a InDesign CS6 plugin to add a text to a text frame. I used the  textEditSuite->InsertText(WideString("String to Insert")) to insert a String to a text area. Now my requirement is to specify a style to the String while adding it u

  • Starting webstart with parameters?

    Hi all, Just wondering if you can start up webstart with a number of parameters, eg. www.somesite.com/webapp.jnlp&param1=a&param2=b Can this be done? How does webstart treat the extra parameters? Does it pass it on to the main method as arguments? th