Database Access via a Servlet

Hello
I have the following Servlet code:
package server;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;
import java.io.BufferedReader;
import java.io.IOException;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Connection;
import java.sql.Statement;
import java.sql.SQLException;
import javax.sql.DataSource;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class ServletDB extends HttpServlet {
   private static String URL= "jdbc:microsoft:sqlserver://localhost:90;" +
     "DatabaseName=Filme;User=sa;Password=";     
  // GET handles the 'read' action
  protected void doGet(HttpServletRequest request,
                       HttpServletResponse response) throws IOException {
    PrintWriter out = response.getWriter();
    String action = request.getParameter("action");
    if (action == null) {
      out
        .println("You need to specify 'create' as the action parameter in GET.");
      return;
    if (action.equals("read")) {
      readDB(request, response, out);
    } else {
      out.println(action + " is not a valid action parameter.");
    return;
  public void doPost(HttpServletRequest request,
                     HttpServletResponse response) throws ServletException,
                     IOException {
    doGet(request, response);
  private void readDB(HttpServletRequest request,
                      HttpServletResponse response,
                      PrintWriter out) throws IOException {
    Statement stmt = null;
    ResultSet rs = null;
    Connection con = null;
    try {
      Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
      con= DriverManager.getConnection(URL);       
      stmt = con.createStatement();
      rs = stmt.executeQuery("SELECT * FROM Voturi");
      // Read the data, a line at a time
      boolean hasEntries = false;
      while (rs.next()) {
        hasEntries = true;
        out.println(rs.getString("nume_film") + "," + rs.getString("nr_voturi")
                    + "," + rs.getString("an_de_productie"));
      if (!hasEntries) {
        out.println("database is empty");
      stmt.close();
      con.close();
    }catch (SQLException sqle) {
      out.println("Data not fetched. Check the stack trace!");
      sqle.printStackTrace();
    }catch (ClassNotFoundException cnfe) {
      cnfe.printStackTrace();
    }catch (InstantiationException instantiationException) {
      instantiationException.printStackTrace();
    }catch (IllegalAccessException illegalAccessException) {
      illegalAccessException.printStackTrace();
  // Get Servlet information
  public String getServletInfo() {
    return "server.ServletDB Information";
}When I run this servlet I get a blank page instead of the requested information and I can't figure why?My database connection part of this program works because I tried it with a J2SE application. I have just started working with servlets so the answer might be simple but I just can't see it.
Please help
Regards,
Michael

Hello jSweep.
Thank you for the reply.
I put the jar files in the lib directory and run the servlet again. I got the following message: 'Data not fetched. Check the stack trace!'. I have no clue how to check the stack trace. Please help if you know how.
Regards,
Michael

Similar Messages

  • Database Access via ODBC

    Hi,
    Since recent (LMS3.2) Cisco released the Open Database Schema support. In the guidelines I find info/procedures to access the database remotely via ODBC. However only Solaris/Solaris Windows/Windows is described. Is there any info how I can access the Database (LMS installed on Sol10) remotely via a Windows system ?
    Jan

    The instructions for Windows/Windows apply, but you'll need to first get the necessary DLLs to allow for database access. The easiest way to do this would be to install Common Services from the LMS 3.2 DVD on a Windows 2003 or 2008 machine. Then extract the DLLs, and uninstall Common Services.
    It may also be possible to start the installer, have it extract the install bits to the TEMP location, then you can pull the DLLS from there. However, I have not tried this for obtaining database DLLs (only device packages).

  • Palm Database access via Midlet application

    Hi.
    I'm trying to access a Palm database from within a Midlet application for the Palm.
    Is there a Java API that I can upload onto my Palm which will give me access to the Palm database ?
    Regards,
    Matt
    P.S. Here's what I've tried already.
    I cannot get hold of the KVMUtil.prc, nor it's associated SDK. It seems like it has been replaced by the MIDP SDK.
    RMS is the only database access provided in the MIDP suite, described in the following article :
    http://developer.java.sun.com/developer/technicalArticles/wireless/midpdatabase/
    This is too generic for me - as it should be - midlets are supposed to run on more than just Palm devices.

    Hi Matt:
    I'll address your 5 major areas 1 at a time. This is only my opinion, only you can decide what will work best for you.
    Sun may have stated the Kjava API is not officially supported. However, Sun has enhanced the Kjava API since its initial release.
    1. I'm trying to access a Palm database from within a Midlet application for the Palm.
    What I'm doing is treating the com.sum.kjava classes as an add on package, using the JAR tool to include these classes prior to building the .PRC.
    2. Is there a Java API that I can upload onto my Palm which will give me access to the Palm database ?
    Yes, it is part of the j2me_cldc installation, see below. It will allow you access to any PDB on the Palm. Like Palm address, memo etc.
    3. I cannot get hold of the KVMUtil.prc, nor it's associated SDK. It seems like it has been replaced by the MIDP SDK.
    When a developer downloads and unZips the most recent versions of the two j2me files:
    j2me_cldc-1_0_2-fcs-winunix.zip
    j2me_cldc-1_0_2-fcs-kjava_overlay.zip
    the following directory structure is created
    c:\j2me_cldc\bin\common\api\classes;
    -- j2me_cldc
    -- bin
    -- common
    -- api
    -- classes
    -- com
    -- java
    -- util
    -- javax
    -- microedition
    -- io
    etc.
    As of 05/01/2001 the KVM.prc and KVMUtil.prc existed here: c:\j2me_cldc\bin\kjava\palm\
    When a developer downloads and unZips the most recent version the file:
    j2me_cldc-1_0-fcs-bin-b10-win-15_sep_2000.zip
    the following directory structure is created
    c:\midp-fcs
    -- classes
    -- java
    -- util
    -- javax
    -- microedition
    -- io
    -- lcdui
    etc.
    When a developer downloads and installs the most recent version the file:
    j2me_wireless_toolkit-1_0_2-ea-win.exe
    the following directory structure is created:
    c:\J2MEWTK
    --bin
    midpapi.zip
    etc.
    Three places to get the MIDlet classes each class has a different creation date too. I've installed the classes oldest to newest in my development environment.
    Check you classpath. I've created a setup.bat to configure the classpath.
    4. RMS is the only database access provided in the MIDP suite, described in the following article:
    No. It is one of two options, RMS and Kjava Database. However, it may not be a option for a Palm if the RMS Database cannot be created on a server and then HotSync'ed to a Palm. A Palm app would be pretty useless if we cannot instantiate its databases with data.
    5. This is too generic for me - as it should be - midlets are supposed to run on more than just Palm devices.
    I agree, that is why I have not stopped using the Kjava Database objects. I've written a server-side Palm Database API the will convert data from any source into Palm PDB's. These PDBs are then HotSync'ed to the Palm. A Palm app would be pretty useless if we cannot instantiate its databases with data.
    Matt, let me know if this helps.

  • Command Window Database Access via a DataSource

    Hi.
    I've succeeded in accessing a MySQL database via a DataSource from a servlet that makes use of a DAO. However, I would now like to use the same DAO to access the database from a standalone, command window program.
    The error that I am getting is "javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial". This error is generated by the second of the following two lines in the DAO:
    Context initialContext = new InitialContext();
    Context context = (Context)initialContext.lookup("java:comp/env");
    Is there any way in which I can get a standalone program to make use of my server.xml and web.xml DataSource mappings to access the database??
    Any help would be most appreciated.
    Thanks in anticipation.
    Jan

    The error that I am getting is
    "javax.naming.NoInitialContextException: Need to
    specify class name in environment or system property,
    or as an applet parameter, or in an application
    resource file: java.naming.factory.initial". This
    error is generated by the second of the following two
    lines in the DAO:
    Context initialContext = new InitialContext();
    Context context =
    (Context)initialContext.lookup("java:comp/env");
    The error itself suggests some solution to you. You need to specify the environment variables in the parameter to the InitialContext constructor. something like this...
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL, "t3://localhost:7001");
    Context context = new InitialContext(env);Cheers!
    ***Annie***

  • Command Window Database Access via a DataSource (Pt 2)

    Hi.
    For those of you (especially duffymo) who were good enough to make suggestions concerning my problems when attempting to access an Oracle 10g database via a DataSource from a servlet the week before last, I'm pleased to say that I got that working on my return from holiday!
    Now to return to an earlier problem...
    I'd like to access the same database from a standalone, command window program and have tried setting the INITIAL_CONTEXT_FACTORY and PROVIDER_URL properties as shown below.
    Hashtable envt = new Hashtable();
    envt.put(Context.INITIAL_CONTEXT_FACTORY,
    "org.apache.commons.dbcp.BasicDataSourceFactory");
    envt.put(Context.PROVIDER_URL, "http://localhost:8080");
    Context initialContext = new InitialContext(envt);
    Context context =(Context)initialContext.lookup("java:comp/env");
    DataSource dataSource =(DataSource)context.lookup("jdbc/Oracle_Finances");
    connection = dataSource.getConnection();
    However, this generates error messages with root exception "java.lang.ClassNotFoundException: org.apache.comons.dbcp.BasicDataSourceFactory".
    If I copy the JAR file containing BasicDataSourceFactory (viz. commons-dbcp-1.2.1.jar) from Tomcat's common\lib folder into Java's jre\lib\ext folder, then I get a similar set of error messages, but the root exception changes from ClassNotFoundException to "java.lang.ClassCastException: org.apache.comons.dbcp.BasicDataSourceFactory".
    Does anybody know where the problem lies??
    Any help most appreciated.
    Cheers.
    Jan

    I'd like to access the same database from a
    standalone, command window program and have tried
    setting the INITIAL_CONTEXT_FACTORY and PROVIDER_URL
    properties as shown below.I've never done this. I'm not sure if it can or should be done.
    The problem is that the standalone app isn't part of any Tomcat context.
    It also ties your standalong app to Tomcat. I don't think you want to do that.
    There's got to be a way to manage this without resorting to Tomcat. I'd look at the Commons docs to see.
    If I copy the JAR file containing
    BasicDataSourceFactory (viz. commons-dbcp-1.2.1.jar)
    from Tomcat's common\lib folder into Java's
    jre\lib\ext folder, This is a terrible idea. You shouldn't be putting anything in jre/lib/ext - it'll cause more problems than it's worth.
    Create a /lib directory for your project and put the 3rd party JARs in there. Disk space is cheap, and keeping all the artifacts that you need to create your app in one place is a good idea.
    %

  • Remote database access via JDBC?

    Hello,
    Can anyone give me info on accessing remote databases (i.e. Microsoft
    Access, etc) from Java programs (Servlets, JSP's, Classes) residing on the
    iSeries (AS400) or perhaps any platform?
    I currently have a couple of web applications set up on the Websphere App server that access DB2/400 database and I also have some Java Classes on PC's that access MS Access datafiles. I would like to begin writing the majority of my applications that run on the iSeries (or host system) that can remotely access other databases on our network.
    Any info would be of great help to me.
    Thank you
    Don

    I don't know of any existing Access JDBC drivers that support remote access, after all, the Access database itself is not remote access capable except via file sharing. One possibility is to look for a Type 3 JDBC driver that supports reuse of other Type 1 (ODBC bridge), Type 2 (Java/Native Mix) and Type 4 (pure Java)JDBC drivers on the server side.
    If you were using WebLogic Server, I suppose you could use its remote JDBC facilities, but that won't help you.
    One problem you will have to face is that Access JDBC drivers are not (if I recall) meant to be used in a multithreaded fashion. Good luck. By the way, it might be far simpler to port the Access database to DB2/400.
    Chuck

  • Database Access via WLS Datasource

    I need to access a database resource by JNDI Datasource lookup and not by JDBC Direct Connection. This is needed because the underlying database is an Oracle RAC with several machines and my intention is to use WLS MultiDatasource Feature to round-robin and failover all the database needs.
    Could someone help me ??
    Thanks in advance

    I'd like to access the same database from a
    standalone, command window program and have tried
    setting the INITIAL_CONTEXT_FACTORY and PROVIDER_URL
    properties as shown below.I've never done this. I'm not sure if it can or should be done.
    The problem is that the standalone app isn't part of any Tomcat context.
    It also ties your standalong app to Tomcat. I don't think you want to do that.
    There's got to be a way to manage this without resorting to Tomcat. I'd look at the Commons docs to see.
    If I copy the JAR file containing
    BasicDataSourceFactory (viz. commons-dbcp-1.2.1.jar)
    from Tomcat's common\lib folder into Java's
    jre\lib\ext folder, This is a terrible idea. You shouldn't be putting anything in jre/lib/ext - it'll cause more problems than it's worth.
    Create a /lib directory for your project and put the 3rd party JARs in there. Disk space is cheap, and keeping all the artifacts that you need to create your app in one place is a good idea.
    %

  • Database access via Jdbc  in JSP

    Hey guys,
    Need a help here..I want to compare a data to existing data in a table sequencially.
    1)re is the example, if i have a user login prog,i want to compare the user already exists in that data table.
    if so how can print the user id's to compare?
    and 2)at if the user id is a wave file(binary data) in SQl? since its immposible to compare the binary data?
    keep me posting,thanks

    1. Well, perform a query.
    2. Who says you can't compare "binary" data?

  • Database Access NullPointer Exception in Tomcat

    Hi
    I have got a problem with database access in my servlet i have folowed all steps of installing and configuring tomcat and i have a DNS that i use to connect to my access database but i get a NullPointerException when i try to create a statement.
    please help

    Please show the code.

  • Servlet with Database Access!!!

    Hi !!!!
    I have deployed HelloServlet with Oracle Application Server 4.0.8.1.
    Now I want to connect from Servlet to Oracle8i 8.1.5.
    But, when I try to deploy a Servlet with Database Access, I receive the next:
    "Get operation not allowed"
    The URL used is:
    http://host.domain:port/virtual_path/class_name
    The servlet was compiled using the Sun's jdk from command line. There wasn't compilation errors.
    I run a simple application with database access from command line without problems.
    The drivers and JDBC libraries are operating for this simple application.
    Any help will be appreciated.
    Many thanks
    Sergio

    If you are running OAS 4.0.8.1 and Oracle 8.1.5 on the same machine then this could be the problem. These products are not certified to run on the same machine as they give a path conflict.
    Hope this helps.

  • Regarding Provisioning a user to Database Access Tables

    Hi,
    I've just completed with the installation of OIM 9101 and upgradation of 9101 to 9102. I'm facing a bit wierd. When I try to create a GTC for the Database Access Tables, I'm not able to see Database Access Tables option, in the drop down list for the Transport Provider.
    I'm a bit confused if I've wrongly upgraded the system or if at all i've missed out some step. Though OIM seems to be ok and working fine.
    Any suggestions as to how to solve this ?
    Regards
    Nikhil

    Thanks Prakash,
    The issue has been resolved.
    I'd like a bit more of your help. I'm facing an error as follows :
    2011-04-14 12:21:52,074 ERROR [XELLERATE.GC.PROVIDER.TRANSFORMATION] Could not transform the data
    java.lang.NullPointerException
         at com.thortech.xl.gc.util.TransformationEngine.doTransformation(Unknown Source)
         at com.thortech.xl.gc.util.TransformationEngine.transform(Unknown Source)
         at com.thortech.xl.gc.runtime.GCAdapterLibrary.executeFunctionality(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpDBAT_PROVISIONING1_GTC.GENERICADAPTER(adpDBAT_PROVISIONING1_GTC.java:125)
         at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpDBAT_PROVISIONING1_GTC.implementation(adpDBAT_PROVISIONING1_GTC.java:70)
         at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.runMilestoneEvent(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcORC.insertNonConditionalMilestones(Unknown Source)
         at com.thortech.xl.dataobj.tcORC.completeSystemValidationMilestone(Unknown Source)
         at com.thortech.xl.dataobj.tcOrderItemInfo.completeCarrierBaseMilestone(Unknown Source)
         at com.thortech.xl.dataobj.tcOrderItemInfo.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcUDProcess.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcFormInstanceOperationsBean.setProcessFormData(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcFormInstanceOperationsBean.setProcessFormData(Unknown Source)
         at com.thortech.xl.ejb.beans.tcFormInstanceOperationsSession.setProcessFormData(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
         at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
         at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
         at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
         at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
         at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
         at org.jboss.ejb.Container.invoke(Container.java:960)
         at sun.reflect.GeneratedMethodAccessor128.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
         at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
         at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
         at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
         at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
         at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
         at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
         at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
         at $Proxy769.setProcessFormData(Unknown Source)
         at Thor.API.Operations.tcFormInstanceOperationsClient.setProcessFormData(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
         at Thor.API.Security.LoginHandler.jbossLoginSession.runAs(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
         at $Proxy813.setProcessFormData(Unknown Source)
         at com.thortech.xl.webclient.actions.DirectProvisionUserAction.handleVerifyProcessData(Unknown Source)
         at com.thortech.xl.webclient.actions.DirectProvisionUserAction.goNext(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
         at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
         at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
         at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
         at java.lang.Thread.run(Thread.java:619)
    2011-04-14 12:21:52,074 ERROR [XELLERATE.GC.PROVIDER.TRANSFORMATION] Could not transform the data
    com.thortech.xl.gc.exception.ProviderException: GCPROV.ADAPTER_INPUTSTR_MISSING
         at com.thortech.xl.gc.util.TransformationEngine.doTransformation(Unknown Source)
         at com.thortech.xl.gc.util.TransformationEngine.transform(Unknown Source)
         at com.thortech.xl.gc.runtime.GCAdapterLibrary.executeFunctionality(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpDBAT_PROVISIONING1_GTC.GENERICADAPTER(adpDBAT_PROVISIONING1_GTC.java:125)
         at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpDBAT_PROVISIONING1_GTC.implementation(adpDBAT_PROVISIONING1_GTC.java:70)
         at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.runMilestoneEvent(Unknown Source)
         at com.thortech.xl.dataobj.tcScheduleItem.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcORC.insertNonConditionalMilestones(Unknown Source)
         at com.thortech.xl.dataobj.tcORC.completeSystemValidationMilestone(Unknown Source)
         at com.thortech.xl.dataobj.tcOrderItemInfo.completeCarrierBaseMilestone(Unknown Source)
         at com.thortech.xl.dataobj.tcOrderItemInfo.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcUDProcess.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcFormInstanceOperationsBean.setProcessFormData(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcFormInstanceOperationsBean.setProcessFormData(Unknown Source)
         at com.thortech.xl.ejb.beans.tcFormInstanceOperationsSession.setProcessFormData(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
         at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
         at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
         at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
         at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
         at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
         at org.jboss.ejb.Container.invoke(Container.java:960)
         at sun.reflect.GeneratedMethodAccessor128.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
         at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
         at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
         at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
         at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
         at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
         at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
         at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
         at $Proxy769.setProcessFormData(Unknown Source)
         at Thor.API.Operations.tcFormInstanceOperationsClient.setProcessFormData(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
         at Thor.API.Security.LoginHandler.jbossLoginSession.runAs(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
         at $Proxy813.setProcessFormData(Unknown Source)
         at com.thortech.xl.webclient.actions.DirectProvisionUserAction.handleVerifyProcessData(Unknown Source)
         at com.thortech.xl.webclient.actions.DirectProvisionUserAction.goNext(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
         at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
         at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
         at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.NullPointerException
    This Error seems to occur because I was trying to attach certain pre-prop adapters within the default process form that is created while installing the connector. Roaming around the threads here, I came to know that this might be the problem as pre-props don't work fine when applied to the GTC's default form.
    To overcome this problem, I've thought of a solution wherein I should create a new Custom Process Form and then apply my pre-props. But for this approach, I'm stuck into the middle. How can I apply a new Custom Form to an existing Provisioning Process ? Is this fesiable ? If yes, where should the changes be made ?
    I tried changing the Table Name inside the GTC's provisioning process so that GTC can pick up the my new process form instead of its default process form, but that again gives an error saying :
    com.thortech.xl.orb.dataaccess.tcDataAccessException: DB_READ_FAILEDDetail: SQL: select err_key, err_code, err_desc, err_rowver, err_remedy, err_count, err_last_occurance, err_action, err_help_url, err_severity from err where err_code='DOBJ.UPDATE_FAILED'Description: Got a null connectionSQL State: Vendor Code: 0Additional Debug Info:com.thortech.xl.orb.dataaccess.tcDataAccessException
    I hope the scenario is clear to you and i'm able to explain upto the mark .. :(
    Kindly help me out..
    Regards
    Nikhil

  • How to handle and manage a multi Database access in runtime with LCDS?

    Hello there
    I got several customer working with the same application and I wonder how,  with LCDS,  to manage  in a runtime a multi dataBase access; without creating a configuration "mxl" file in
    the folder catalina for each database.
    Indeed, each customer have their own dataBase, and so far, I did not find out how to avoid creating a config xml file in catalina for every single database; which force me to create as well for each customer a  folder application, since the name of the config file in catalina require a folder application to be ran under tomcat....
    Thus, my question is :
    Is there anyway to create only one configuration mxl file in catalina (in the server side) and then from the client side (application) let the user select its environment (meaning its database) to run the application.... this technic can be also used for multi database environment such as : Dev / Test / Prod   environment (or database) where the same application can access to.
    Please if any one have an idea or already delt with; just let me know, because I'm entering in a bootle neck and the situation is getting serioulsy critical....
    Regards

    Hello Ulrich,
    with compact and repair I mean the MSAccess function "Compact and Repair".
    Please follow the link below for more details:
    http://office.microsoft.com/en-us/access-help/compact-and-repair-an-access-file-HP005187449.aspx
    Normally you can execute this function directly in Access or with the Windows ODBC Data Sources Administrator  => "Control Panel" => "Administrative Tools" => "Data Sources (ODBC)"...
     I want to execute this function via cvi code and not by hand ;-).
    Thank you for your support.
    Frank

  • Database access in a MVC architecture

    Hi!
    I'm a bit confused with regards to where the database access code should be put in a MVC architecture. From reading various articles and posts on this forum, there seem to be a lot of different opinions.
    Some seem to put the database access code in the controller servlet(or JSP), while some seem to use helper classes from the JavaBeans, while a few people even seem to access the database directly from the JavaBean.
    My questions is: What is the best place to put the database stuff in a MVC architecture? An explanation as to why a particular solution is the best would be great..
    Thanks!
    regards,
    Vidar

    Let's say I have a class called Department that contains methods like getName(), getId(), setName(), etc... The Department class is my business object. To save and load Departments from a database, I have a class called DepartmentManager. The DepartmentManager saves and loads the departments to the database, and has methods like saveDepartment(), saveDepartments(), loadDepartment(), getDepartments(), etc... In some cases, my manager classes also caches the results so they don't have to load from the database each time. Often times, the manager class is a singleton. My Department class has no idea how it is persisted, or that it is part of a cache. It just knows about itself. The DepartmentManager is resonsible for managing all the persistance and lookup functionality for Departments.
    Therefore, if I have a JSP page that needs to display Departments, my code might look like:
    DepartmentManager dm = DepartmentManager.getManager();
    ArrayList listDepartments = dm.getDepartmentList();
    for (int i = 0; listDepartments != null && i < listDepartments.size(); i++) {
         Department dept = (Department)listDepartments.get(i);
         out.println("<option value=\"" + dept.getId() + "\">" + dept.getName());
    }If I had a specific Department I needed, I would get it as follows:
    DepartmentManager dm = DepartmentManager.getManager();
    Department dept = dm.getDepartment(nId);

  • How to handle and Manage Multi DataBase access with LCDS in runtime ?

    Hello there
    I got several customer working with the same application and I wonder how,  with LCDS,  to manage  in a runtime a multi dataBase access; without creating a configuration "mxl" file in
    the folder catalina for each database.
    Indeed, each customer have their own dataBase, and so far, I did not find out how to avoid creating a config xml file in catalina for every single database; which force me to create as well for each customer a  folder application, since the name of the config file in catalina require a folder application to be ran under tomcat....
    Thus, my question is :
    Is there anyway to create only one configuration mxl file in catalina (in the server side) and then from the client side (application) let the user select its environment (meaning its database) to run the application.... this technic can be also used for multi database environment such as : Dev / Test / Prod   environment (or database) where the same application can access to.
    Please if any one have an idea or already delt with; just let me know, because I'm entering in a bootle neck and the situation is getting serioulsy critical....
    Regards

    Hello Ulrich,
    with compact and repair I mean the MSAccess function "Compact and Repair".
    Please follow the link below for more details:
    http://office.microsoft.com/en-us/access-help/compact-and-repair-an-access-file-HP005187449.aspx
    Normally you can execute this function directly in Access or with the Windows ODBC Data Sources Administrator  => "Control Panel" => "Administrative Tools" => "Data Sources (ODBC)"...
     I want to execute this function via cvi code and not by hand ;-).
    Thank you for your support.
    Frank

  • How to Connect to Oracle 9i database server via Oracle 10g XE

    I have installed Oracle 10g eXpress Edition and uninstalled Oracle 9i client database. I used Oracle 9i client to connect to another Database server on a local LAN. Is it possible to create a database link to the old Oracle 9i database server via Oracle 10g XE? If yes, do I need to add ODBC drivers?
    I want to achieve the following:
    1) Create a connection to the Oracle 9i database server using Ora101040 odbc drivers.
    2) Use a similar 9i tool (Enterprise Management Console) within Oracle 10g XE to access Oracle 9i Database tables on a LAN network.
    3) Create data access to Oracle 10g XE via some ODBC connection from a C++ runtime application.
    Hope to receive help from Oracle professionals.
    Thanks.

    I have installed Oracle 10g eXpress Edition and
    uninstalled Oracle 9i client database. I used OraclePlease clarify - you uninstalled the 9i database or the 9i client.
    9i client to connect to another Database server on a
    local LAN. Is it possible to create a database link
    to the old Oracle 9i database server via Oracle 10g
    XE? If yes, do I need to add ODBC drivers?
    Database links between Oracle databases do not require ODBC. They do require Oracle Networking (included with both Oracle9i Database and Oracle Database 10g XE) to be configured correctly.
    It is also possible to connect ot the 9i database using the 10g Instant Client (separate download)
    I want to achieve the following:
    1) Create a connection to the Oracle 9i database
    server using Ora101040 odbc drivers.Please clarify - what client do you wish to run that needs ODBC?
    2) Use a similar 9i tool (Enterprise Management
    Console) within Oracle 10g XE to access Oracle 9i
    Database tables on a LAN network.XE does not have an equivalent to Oracle Enterprise Manager. XE does come with HTMLdb preinstalled and configured, and HTMLdb provides a subset of the administration capabilities of Enterprise Manager.
    3) Create data access to Oracle 10g XE via some ODBC
    connection from a C++ runtime application.You can download ODBC drivers from the same location on OTN you downloaded XE. I do not know whether XE includes ODBC drivers. ODBC drivers will usually still require you to configure the Oracle Networking.
    There are a number of items that make me believe you do not have a good grasp of Oracle architecture and basics. If true, I encoureage you to start reading the Concepts manual found for the database at http://docs.oracle.com, or at least the O'Reilly book 'Oracle Essentials' found at http://oracle.oreilly.com

Maybe you are looking for

  • Daughter's MacBook Pro Hard Drive Full

    My daughter's MacBook Pro running Snow Leopard 250GB hard drive is full. I emptied the trash which made 7 GB available. I bought a 1TB external to move files to. I cannot get anything to move. Cannot drag. Cannot copy and paste. Need help quick pleas

  • HT4236 duplicate photos in photo library

    I have multiple copies of some photos in my photo library and also in individual albums the on my 4S.  How do I get rid of the extra copies?  Are the pictures just going back and forth from my phone to my computer each time in syncs and therefore mak

  • Viewing photos from EXT drive in iPhoto, please help!

    Is there any way to view my photos in iPhoto if I store some of them on an external drive (without having to copy them into the iPhoto library on the internal drive)? There's a lot more room on my external drives and my computer is full; this would s

  • Add 'Copy' to document while archiving it

    Hi experts, we want to store outgoing documents using ArchiveLink. Caused by legal requirements we must ensure that there is no option of creating multiple original documents. Therefore we want to add a 'Copy' on the documents which gets stored via A

  • Can I have 2 java runtime environments at the same time?

    Hi all! I wonder if i can have 2 java runtime environments at the same time installed and functional.For example 1.3.1 & 1.5.0. And if i can, how can i tell to application1 to use 1.3.1 and application2 to use 1.5.0? Thanx in advance Costas