Regarding Hsqldb ...in Tomact

Hi,
Can any one tell me how to configure HSQLDB database
in tomcat and servlets JDBC path...
Thanks
ranjan

If you haven't any servlets running, I would get that going first before you add a database. If you have questions about html file, classes, etc and where they go, you need to get that straightened out. I use tomcat with the structure TOMCAT_HOME/webapps/ROOT/yourapp/WEB-INF/classes
Put any html and JSP files under 'yourapp', and your servlet classes go in the 'classes' folder. Also add the hsqldb.jar file under WEB-INF/lib.
The 'java org.hsqldb.Server -port 3500 -database dbfile' command is issued from a dos window, from the folder in which you have your hsqldb. Be sure your classpath is also set for this folder.
In your web.xml file, add variables like:    <servlet>
        <servlet-name>YourServlet</servlet-name>
        <servlet-class>YourServlet</servlet-class>
       <init-param>
          <param-name>driver</param-name>
          <param-value>org.hsqldb.jdbcDriver</param-value>
       </init-param>
       <init-param>
          <param-name>url</param-name>
          <param-value>jdbc:hsqldb:hsql://localhost:3500</param-value>
//NOTE: the end of above line is not really a comment, but part of the DB url
       </init-param>
       <init-param>
          <param-name>user</param-name>
          <param-value>sa</param-value>
       </init-param>
       <init-param>
          <param-name>pass</param-name>
          <param-value></param-value>
       </init-param>
    </servlet>To read those in in your servlet, use getInitParameter("driver"), etc.

Similar Messages

  • How to read the TEXT TABLE (or) .CSV in HSQLDB Standalone using Java

    Hi, I like to use the text tables in our application. And like to use the HSQL Database Engine as Standalone. I created the text tables, those are stored in the disk as ".CSV" files. But i am unable to read that text table (.CSV) when i relogin and gave the CSV file path as URL along with "jdbc:hsqldb:file". So can anybody give me the tips how use the text tables.
    Regards,
    Vinay

    You need to make a URLConnection to the page you want, and get the input stream from that page.
    The contents of the input stream (use a reader to get them) will give you the raw HTML code. Use a parser to get the actual content. I dont know of a parser offhand, but you can search for one.

  • How to read the TEXT TABLES (Or) .CSV in HSQLDB using JAVA

    Hi,
    I want to use the HSQLDB instead of mdb in our application. I am using the HSQLDB Engine Standalone mode, and given a file name "TEMP" in URL along with the "jdbc:hsqldb:file:". Then a I created a TEXT TABLE, that table was created as a .CSV file in the Disk. But I am unable to read that CSV, I tried that file in the database URL. But its not working. Can anubody give me the suggestions.
    Thankyou,
    Regards,
    Vinay.

    Hi Rajeshreddy.k,
    To add multiple users to one group, I wouldn't use a .csv file since the only value you need from a list is the users to be added.
    To start create a list of users that should be added to the group, import this list in a variable called $users, the group distinguishedName in a variable called $Group and simply call the ActiveDirectory cmdlet Add-GroupMember.
    $Users = Get-Content -Path 'C:\ListOfUsernames.txt'
    $Group = 'CN=MyGroup,OU=MyOrg,DC=domain,DC=lcl'
    Add-ADGroupMember -Identity $Group -Members $Users

  • Exception in thread "main" java.lang.NoClassDefFoundError: org/hsqldb/Serve

    hi,
    I'm new in hibernate.I am studying hibernate tutorial from http://www.hibernate.org/hib_docs/v3/reference/en/html/tutorial.html
    After few steps When I've to start data base.It doesn't.
    I post whatever at command prompt. Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings\shobhitsingh>cd\
    C:\>cd hibernate*
    C:\hibernateTutorial>java -classpath ../lib/hsqldb.jar org.hsqldb.Server
    Exception in thread "main" java.lang.NoClassDefFoundError: org/hsqldb/Server
    C:\hibernateTutorial>I thing I should copy paste third party libraries in lib folder.
    but still i am confused.
    pl guide for this.
    Regards
    S.Singh

    Put the hsqldb JAR file into your classpath. I suspect Mr Singh was using ".." when he should have been using "." in the classpath string, but even if he wasn't his classpath issue's not that likely to be identical to yours.
    [http://java.sun.com/j2se/1.3/docs/tooldocs/win32/classpath.html|http://java.sun.com/j2se/1.3/docs/tooldocs/win32/classpath.html]

  • Use mssql server in place of hsqldb

    Hi,
    If this is wrong forum then pl tellme.
    I am posting my problem.
    I used hsqldb server(default one,no need to install any server).Now I want to use mssql server 2000.
    I am posting for your convienience.
    Pl. look ::
    hibernate.cfg.xml
    This is one when I used hsqldb server.
    <?xml version='1.0' encoding='utf-8'?>
    <!DOCTYPE hibernate-configuration PUBLIC
            "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
            "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    <hibernate-configuration>
        <session-factory>
            <!-- Database connection settings -->
            <property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
            <property name="connection.url">jdbc:hsqldb:hsql://localhost</property>
            <property name="connection.username">sa</property>
            <property name="connection.password"></property>
            <!-- JDBC connection pool (use the built-in) -->
            <property name="connection.pool_size">1</property>
            <!-- SQL dialect -->
            <property name="dialect">org.hibernate.dialect.HSQLDialect</property>
            <!-- Enable Hibernate's automatic session context management -->
            <property name="current_session_context_class">thread</property>
            <!-- Disable the second-level cache  -->
            <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
            <!-- Echo all executed SQL to stdout -->
            <property name="show_sql">true</property>
            <!-- Drop and re-create the database schema on startup -->
            <property name="hbm2ddl.auto">create</property>
        </session-factory>
    </hibernate-configuration>hibernate.cfg.xml
    This is one I want with mssql server 2000
    I try with following changes
    <?xml version='1.0' encoding='utf-8'?>
    <!DOCTYPE hibernate-configuration PUBLIC
            "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
            "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    <hibernate-configuration>
        <session-factory>
            <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
            <property name="dialect">org.hibernate.Dialect.SqlDialect</property>
            <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
            <property name="connection.connection_string">Server=(local);Initial Catalog=dbname;User Id=sa;Password=</property>
        </session-factory>
    </hibernate-configuration>Whatever i found on command line screen
    D:\myht>ant hbm2ddl
    Buildfile: build.xml
    hbm2ddl:
    [hibernatetool] Executing Hibernate Tool with a Standard Configuration
    [hibernatetool] 1. task: hbm2ddl (Generates database schema)
    [hibernatetool] log4j:WARN No appenders could be found for logger (org.hibernate
    .cfg.Environment).
    [hibernatetool] log4j:WARN Please initialize the log4j system properly.
    [hibernatetool] An exception occurred while running exporter #2:hbm2ddl (Generat
    es database schema)
    [hibernatetool] To get the full stack trace run ant with -verbose
    [hibernatetool] org.hibernate.HibernateException: Dialect class not found: org.h
    ibernate.Dialect.SqlDialect
    BUILD FAILED
    D:\myht\build.xml:81: org.hibernate.HibernateException: Dialect class not found:
    org.hibernate.Dialect.SqlDialect
    Total time: 1 second
    D:\myht>Please give me your suggestion sothat I can use mssql 2000 server.
    Thanks
    Regards
    -Shobhit

    oops!!!!!!!!!!!!!!!
    I got a very little mistake I don't change my config. file to use mysql.
    -S.Singh

  • HSQLDB Problem in Tomcat

    Dear All,
    I'm using HSQLDB as embedded in-process mode for my web application. I
    used
    to schedule every 1 minutes to check on the HSQLDB database. I open the
    db
    when context initialized and close it when context destroyed. But when
    the
    context reloaded I always get Java.lang.NullPointerException when
    trying to
    execute SQL statement.
    What is wrong ?? It looks like everytime the context is destroyed...
    the
    hsqldb gets lock.
    The snippet code like below :
    =======================
    import javax.servlet.ServletContext;
    import javax.servlet.ServletContextListener;
    import javax.servlet.ServletContextEvent;
    import java.nio.channels.ClosedByInterruptException;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.util.Random;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class ContextStartUp implements ServletContextListener {
         private ServletContext context = null;
         MyThread objThread = null;
         ResultSet rs = null;
         Connection conn = null;
         public void openDB()
             try {
                 conn = DriverManager.getConnection("jdbc:hsqldb:file:" +
    context.getRealPath("/data/testdb") + ";ifexists=true;shutdown=true;",
    "sa",
    "phidmspassword");
             } catch (SQLException e) {
                 e.printStackTrace();
             catch(Exception e)
                 e.printStackTrace();
         public void closeDB()
             Statement stmt = null;
             try {
                 if(conn!=null)
                     stmt = conn.createStatement();
                     stmt.execute("SHUTDOWN COMPACT");
                     stmt.close();
                     conn.close();
                     stmt = null;
                     conn = null;
             } catch (SQLException e) {
                 e.printStackTrace();
         public class MyThread implements Runnable {
             int nomor = 0;
             Thread currentthread = null;
             public MyThread() {
                 if (currentthread == null) {
                     currentthread = new Thread(this);
                     currentthread.setPriority(new Random().nextInt(5) + 1);
                     currentthread.start();
             public void run() {
                 Statement stmt = null;
                 String sqltodo = "";
                 Thread myThread = Thread.currentThread();
                 while (myThread == currentthread) {
                     try {
                         stmt = conn.createStatement();
                         if (stmt.execute("A select statement...... "))
                             rs = stmt.getResultSet();
                             if (rs.next()) {
                            sqltodo = Update queries ......;
                             stmt.executeUpdate(sqltodo);
                             stmt.execute("SHUTDOWN");
                             stmt.close();
                         else
                             stmt.close();
                     } catch (SQLException e) {
                         e.printStackTrace();
                     } catch (Exception e) {
                         e.printStackTrace();
                     } finally {
                         stmt = null;
                     try {
                         Thread.sleep(100000);
                     } catch (InterruptedException e) {
         public void initThread() {
             openDB();
             objThread = new MyThread();
         public void stopThread() {
             objThread = null;
             closeDB();
         public void contextDestroyed(ServletContextEvent event) {
             context = null;
             stopThread();
         public void contextInitialized(ServletContextEvent event) {
             try {
                 Class.forName("org.hsqldb.jdbcDriver").newInstance();
             } catch (InstantiationException e) {
                 e.printStackTrace();
             } catch (IllegalAccessException e) {
                 e.printStackTrace();
             } catch (ClassNotFoundException e) {
                 e.printStackTrace();
             context = event.getServletContext();
             initThread();
    } ==============================================================
    Regards,
    Feris

    Try
    openssl s_client -connect localhost:8443
    -Vijay

  • Help me with the HSQLDB and NetBeans.

    Please, did someone there already create an Java aplication using HSQLDB?
    I must configure the NetBeans to use with hsqldb and create a standalone database but I stop in a lot of troubles.
    Let's start:
    Im my NetBeans project I create two folders: "db" and 'lib" ...
    So, inside of the folder "lib" I've put the file "hsqldb.jar".
    So, in the File Menu of my project I select the properties of my project. In the link LIBRARIES of COMPILE option I click Add JAR/Folder. So I select the hsqldb.jar of the lib folder. After this NetBeans recognizes the hsqldb.jar.....
    So, in RUNTIME I select Database/Drives I click Add Driver....
    Again I select the hsqldb.jar from the "lib" folder.
    The new Drive HSQLDB is created... I click on it and select Connect Using... and the DatabaseConnection screen is shown. In database URL I put: jdbc:hsqldb:pathofmydatabase
    pathofmydatabase is the folder "db"
    User I put "sa" and a blank password...
    Remember that I create a standalone database with hsqldb saved inside "db" folder...
    That's my code:
    import javax.swing.*;
    import java.sql.*;
    public class TelaPrincipal {
    JFrame mainTela = new JFrame("Principal.");
    Connection conexao;
    Statement sentenca;
    ResultSet resultadoConsulta;
    String consulta1 = "SELECT id_cliente, nome_cliente, telefone_cliente FROM clientes";
    int clienteId;
    String clienteNome;
    String clienteTelefone;
    JTextField idText = new JTextField(4);
    JTextField nomeText = new JTextField(35);
    JTextField telefoneText = new JTextField(8);
    JPanel camposPanel = new JPanel();
    public TelaPrincipal() {
    mainTela.setExtendedState(JFrame.MAXIMIZED_BOTH);
    mainTela.setVisible(true);
    mainTela.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    camposPanel.add(idText);
    camposPanel.add(nomeText);
    camposPanel.add(telefoneText);
    mainTela.add(camposPanel);
    try {
    Class.forName("hsqldb.org.jdbc.Driver");
    conexao = DriverManager.getConnection("jdbc:hsqldb:file:/database/clientes", "sa", "");
    sentenca = conexao.createStatement();
    resultadoConsulta = sentenca.executeQuery(consulta1);
    while(resultadoConsulta.next()) {
    clienteId = resultadoConsulta.getInt("id_cliente");
    clienteNome = resultadoConsulta.getString("nome_cliente");
    clienteTelefone = resultadoConsulta.getString("telefone_cliente");
    idText.setText(String.valueOf(clienteId));
    nomeText.setText(clienteNome);
    telefoneText.setText(clienteTelefone);
    conexao.close();
    catch(ClassNotFoundException cnfe) { cnfe.printStackTrace(); }
    catch(SQLException e) { e.printStackTrace(); }
    public static void main(String[] args) {
    TelaPrincipal tp = new TelaPrincipal();
    There's a lot of errors like:
    package javax.servlet does not exist
    package javax.servlet.http does not exist
    and a lot of servel.something tha do not exist...
    Why servelets erros if my database is standalone saved in disc?
    Does have anything about the hsqldb.org, packages ?
    Do I need to configure more things on NetBeans, or change configurations I've made so far?
    Something's going terrible wrong and I don't know why...
    I need professional help!
    Anyone?
    Thanks.

    Please refer to Creative Cloud Help | Creative Cloud / Common Questions
    CC is for retail use with 20 GB of storage space, CCT is where number of seats are purchased & assigned by one program admin where each seat gets 100GB of storage space.
    You can not have both the CC & team in one account as it will only provide you added storage space of 120 GB but you can activate the CC any of them or either of them twice as CC is based on Adobe ID.
    Regards
    Rajshree

  • Hsqldb on ibm j9

    Hello All,
    Do anyone know about using hsqldb on j9 vm?
    i copied the hsqldb.jar to hp iPaq 1950 device.
    i wrote a simple program to create a database file on working directory.
    its not working, the program doesnt even deploy..
    Cud u share ur experiances?
    i give my code below
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    public class SimpleDb{
          Label label = new Label("Retrieving Data");
          Frame frame = new Frame();
          Statement st = null;
          Connection con = null;
         public SimpleDb(){
         frame.setTitle("SimpleDb--hsqldb");     
         frame.setBounds(0,0,150,150);
         Panel panel = new Panel();
         panel.setBounds(0,0,150,150);
         panel.setLayout(null);
         label.setBounds(10,10,100,50);
         Button button = new Button("OK");
         button.setBounds(10,70,50,50);
         button.addActionListener(new Listener());
         panel.add(button);
         panel.add(label);
         frame.add(panel);     
         frame.addWindowListener(new Listener());
         frame.setVisible(true);
         try{
              Class.forName("org.hsqldb.jdbcDriver");               
              con = DriverManager.getConnection("jdbc:hsqldb:file:mydb", "sa", "");          
              st = con.createStatement();
              st.executeUpdate("create table test(name varchar(30))");
              st.executeUpdate("insert into test values('Nishan')");
              //System.out.println("Insert OK");
              }catch(Exception ex){label.setText(ex+"");frame.repaint();}     
         public static void main(String a[]){     
              new SimpleDb();     
    class Listener extends WindowAdapter implements ActionListener
              public void windowClosing(WindowEvent e){
                   try{
                        //st.execute("SHUTDOWN");
                        //st.close();
                        //con.close();
                   }catch(Exception e4){}
                   System.exit(0);
              public void actionPerformed(ActionEvent a){
                   try{
              //ResultSet rs = st.executeQuery("select * from test");
              //rs.next();
              //label.setText(rs.getString(1));
              //frame.repaint();
              //System.out.println(rs.getString(1));     
              }catch(Exception exx){label.setText(exx+"");/*System.out.println("Exception :"+exx);*/}
    }     

    Hello,
    got it now,
    should include the file database)enabler.jar in class path...
    Thanks
    Regards
    nishan

  • Does any one do for HSQLDB? Happened to problem.

    There is a "Connection is broken, Transfer corrupted" error when i integrated to hsqldb, any one got this problem or help ?

    Hi,
    Can you describe what are you doing.
    HSQL demo environment have been startted and when you
    run a job, it's closed DB?
    Regards,
    MAI wanna do data integration from Oracle to HSQLDB, but when connect to hsqldb, it had something wrong just like i had described.
    I fixed it by using demo environment of hsqldb 1.7 instead of 1.8.0, it runs ok.
    but still don't know why v1.8.0 is wrong.

  • Problem in HSQLDB schema, while creating SystemUserAttr table

    Hi All,
    After a long struggle i somehow managed to come up to post installation step. After the installer successfully pinged my DB connection and HelloCS url it again failed after trying to create the CS system tables inside HSQLDB 2.2.8.
    It does create ELEMENTCATALOG, SITECATALAOG and SYSTEMINFO tables, but when it is trying to create SystemUserAttr table it failed due to the below reason
    CREATE TABLE SystemUserAttr (id NUMBER(38) NOT NULL, name VARCHAR(32) NOT NULL, value VARCHAR(255) NOT NULL, urlvalue VARCHAR(255) NULL, PRIMARY KEY (id, name, value))
    java.sql.SQLSyntaxErrorException: type not found or user lacks privilege: NUMBER
    The data type Number is not recognized by HSQLDB, instead Numeric is working. But how do i change it in the installer. The installer failed to locate/execute the corresponding load script for HSQLDB. Is different load script available for different data dialect?
    How can i change this load script? Becuase of this, eventhough the application deployed successfully i was not able to login into the URL http://localhost:8080/cas/login using fwadmin/xceladmin
    The url http://localhost:8080/cs/HelloCS is working fine and it is giving the embedded status when i am seeing the source file as
    *<!--FTCS|||result=It worked!|||reason=Success|||err=0|||command=Test CS jar install|||params=test=true|||-->*
    I am in the last step, if it is working i can start my work.
    regards
    Sri
    Edited by: user652523 on Aug 8, 2012 11:58 AM
    Edited by: user652523 on Aug 8, 2012 11:59 AM

    When you choose the database installation type in the installer, the mapping between the Java types and the DB types defaults from the installer based on the db you choose. The HSQLDB defaults are for 1.1.8, not the 2.x version you're using.
    You can override the types. After the first part of the installation, before you get to the pingdb step, you can open up the Property Editor, then open up the futuretense.ini file. Click on the database tab, and change the mapping for cc.numeric to what you want it set to.
    Regards,
    Tony

  • HSqlDb and bit / boolean field

    Hi there,
    I'm using a database schema with a table containing a bit column on
    HSqlDb 1.7.3.
    Using kodo schema tool the column is created as expected. I verified it
    with HSql Database Manager. Unfortunately, I can't commit any data to
    this table (see exception below).
    Maybe this may help: HSqlDb refers to a bit column as BOOLEAN.
    Kodo Version: 3.3.1
    Regards
    M. Stier
    Exception follows:
    kodo.jdbc.meta.MappingInfoNotFoundException: The "column"
    attribute/extension for field "org.test.Workspace.bLocked" names a
    column "Locked" in table "WORKSPACE" whose type (UNKNOWN(16)) is not
    compatible with the type of the field (BIT). [org.test.Workspace.bLocked
    [kodo.jdbc.meta.ValueFieldMapping]]
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:134)
         at
    kodo.jdbc.meta.ColumnFieldMapping.fromMappingInfo(ColumnFieldMapping.java:125)
         at
    kodo.jdbc.meta.ValueFieldMapping.fromMappingInfo(ValueFieldMapping.java:62)
         at
    kodo.jdbc.meta.RuntimeMappingProvider.getFieldMapping(RuntimeMappingProvider.java:198)
         at
    kodo.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.java:470)
         at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:991)
         at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:971)
         at
    kodo.jdbc.meta.AbstractClassMapping.getMappings(AbstractClassMapping.java:934)
         at
    kodo.jdbc.meta.AbstractClassMapping.getDeclaredFieldMappings(AbstractClassMapping.java:654)
         at
    kodo.jdbc.meta.AbstractClassMapping.resolve(AbstractClassMapping.java:796)
         at
    kodo.jdbc.meta.VerticalClassMapping.resolve(VerticalClassMapping.java:337)
         at kodo.jdbc.meta.MappingRepository.resolve(MappingRepository.java:431)
         at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:349)
         at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:177)
         at kodo.jdbc.meta.MappingRepository.getMetaData(MappingRepository.java:165)
         at kodo.runtime.KodoHelper.getSequenceGenerator(KodoHelper.java:341)

    Yes -- Kodo does not yet officially support anything more recent than
    HSQL 1.7.1. You can work around this incompatibility by using a
    different SchemaFactory. The default SchemaFactory asks the database for
    information about column types (which causes the problem); the dynamic
    SchemaFactory just assumes that the schema will meet the needs of your
    object model, and the file-based SchemaFactory consults a file for a
    description of the schema. See
    http://docs.solarmetric.com/ref_guide_schema.html#ref_guide_schema_info_factory
    for details.
    -Patrick
    M. Stier wrote:
    Hi there,
    I'm using a database schema with a table containing a bit column on
    HSqlDb 1.7.3.
    Using kodo schema tool the column is created as expected. I verified it
    with HSql Database Manager. Unfortunately, I can't commit any data to
    this table (see exception below).
    Maybe this may help: HSqlDb refers to a bit column as BOOLEAN.
    Kodo Version: 3.3.1
    Regards
    M. Stier
    Exception follows:
    kodo.jdbc.meta.MappingInfoNotFoundException: The "column"
    attribute/extension for field "org.test.Workspace.bLocked" names a
    column "Locked" in table "WORKSPACE" whose type (UNKNOWN(16)) is not
    compatible with the type of the field (BIT). [org.test.Workspace.bLocked
    [kodo.jdbc.meta.ValueFieldMapping]]
    at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:134)
    at
    kodo.jdbc.meta.ColumnFieldMapping.fromMappingInfo(ColumnFieldMapping.java:125)
    at
    kodo.jdbc.meta.ValueFieldMapping.fromMappingInfo(ValueFieldMapping.java:62)
    at
    kodo.jdbc.meta.RuntimeMappingProvider.getFieldMapping(RuntimeMappingProvider.java:198)
    at
    kodo.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.java:470)
    at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:991)
    at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:971)
    at
    kodo.jdbc.meta.AbstractClassMapping.getMappings(AbstractClassMapping.java:934)
    at
    kodo.jdbc.meta.AbstractClassMapping.getDeclaredFieldMappings(AbstractClassMapping.java:654)
    at
    kodo.jdbc.meta.AbstractClassMapping.resolve(AbstractClassMapping.java:796)
    at
    kodo.jdbc.meta.VerticalClassMapping.resolve(VerticalClassMapping.java:337)
    at kodo.jdbc.meta.MappingRepository.resolve(MappingRepository.java:431)
    at
    kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:349)
    at
    kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:177)
    at
    kodo.jdbc.meta.MappingRepository.getMetaData(MappingRepository.java:165)
    at kodo.runtime.KodoHelper.getSequenceGenerator(KodoHelper.java:341)

  • HSQLDB and Tomcat ServletContextListener

    Dear All,
    I'm using HSQLDB as embedded in-process mode for my web application. I used
    to schedule every 1 minutes to check on the HSQLDB database. I open the db
    when context initialized and close it when context destroyed. But when the
    context reloaded I always get Java.lang.NullPointerException when trying to
    execute SQL statement.
    What is wrong ?? It looks like everytime the context is destroyed... the
    hsqldb gets lock.
    The snippet code like below :
    import javax.servlet.ServletContext;
    import javax.servlet.ServletContextListener;
    import javax.servlet.ServletContextEvent;
    import java.nio.channels.ClosedByInterruptException;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.util.Random;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class ContextStartUp implements ServletContextListener {
         private ServletContext context = null;
         MyThread objThread = null;
         ResultSet rs = null;
         Connection conn = null;
         public void openDB()
             try {
                 conn = DriverManager.getConnection("jdbc:hsqldb:file:" +
    context.getRealPath("/data/testdb") + ";ifexists=true;shutdown=true;", "sa",
    "phidmspassword");
             } catch (SQLException e) {
                 e.printStackTrace();
             catch(Exception e)
                 e.printStackTrace();
         public void closeDB()
             Statement stmt = null;
             try {
                 if(conn!=null)
                     stmt = conn.createStatement();
                     stmt.execute("SHUTDOWN COMPACT");
                     stmt.close();
                     conn.close();
                     stmt = null;
                     conn = null;
             } catch (SQLException e) {
                 e.printStackTrace
         public class MyThread implements Runnable {
             int nomor = 0;
             Thread currentthread = null;
             public MyThread() {
                 if (currentthread == null) {
                     currentthread = new Thread(this);
                     currentthread.setPriority(new Random().nextInt(5) + 1);
                     currentthread.start();
             public void run() {
                 Statement stmt = null;
                 String sqltodo = "";
                 Thread myThread = Thread.currentThread();
                 while (myThread == currentthread) {
                     try {
                         stmt = conn.createStatement();
                         if (stmt.execute("A select statement...... "))
                             rs = stmt.getResultSet();
                             if (rs.next()) {
                            sqltodo = Update queries ......;
                             stmt.executeUpdate(sqltodo);
                             stmt.execute("SHUTDOWN");
                             stmt.close();
                         else
                             stmt.close();
                     } catch (SQLException e) {
                         e.printStackTrace();
                     } catch (Exception e) {
                         e.printStackTrace();
                     } finally {
                         stmt = null;
                     try {
                         Thread.sleep(100000);
                     } catch (InterruptedException e) {
         public void initThread() {
             openDB();
             objThread = new MyThread();
         public void stopThread() {
             objThread = null;
             closeDB();
         public void contextDestroyed(ServletContextEvent event) {
             context = null;
             stopThread();
         public void contextInitialized(ServletContextEvent event) {
             try {
                 Class.forName("org.hsqldb.jdbcDriver").newInstance();
             } catch (InstantiationException e) {
                 e.printStackTrace();
             } catch (IllegalAccessException e) {
                 e.printStackTrace();
             } catch (ClassNotFoundException e) {
                 e.printStackTrace();
             context = event.getServletContext();
             initThread();
    Regards,
    Feris
    PT. Putera Handal Indotama
    JL. KH. Moh. Mansyur No. 11 Blok B.8-12
    Telp. +62-21-631 6688 (Hunting)
    Fax. +62-21-6330211
    Jakarta (10140) - INDONESIA

    Oh, that's probably because, as usual, you're just jumping straight in and writing some code around a new technology you don't understand, without bothering to even glance at any documentation, or thinking about what you're doing, then posting the resultant stack trace here saying ":-( broken magic :-(". It'd be nice if you thanked people for their help now and again, too

  • Regarding sy-index and sy-tabix

    Hi,
    What is the major difference between sy-index and sy-tabix ,
      can you give me one good example with code..
    Regards,
    Reddy.

    Hi,
    SY-TABIX - Current line of an internal table. SY-TABIX is set by the statements below, but only for index tables. The field is either not set or is set to 0 for hashed tables.
    APPEND sets SY-TABIX to the index of the last line of the table, that is, it contains the overall number of entries in the table.
    COLLECT sets SY-TABIX to the index of the existing or inserted line in the table. If the table has the type HASHED TABLE, SY-TABIX is set to 0.
    LOOP AT sets SY-TABIX to the index of the current line at the beginning of each loop lass. At the end of the loop, SY-TABIX is reset to the value that it had before entering the loop. It is set to 0 if the table has the type HASHED TABLE.
    READ TABLE sets SY-TABIX to the index of the table line read. If you use a binary search, and the system does not find a line, SY-TABIX contains the total number of lines, or one more than the total number of lines. SY-INDEX is undefined if a linear search fails to return an entry.
    SEARCH FOR sets SY-TABIX to the index of the table line in which the search string is found.
    SY_INDEX - In a DO or WHILE loop, SY-INDEX contains the number of loop passes including the current pass.
    sy-tabix is the tab index - the index of the record in the internal table you are accessing,
    sy-index is the loop counter.
    If you use a condition in LOOP the sy-index will go from 1 to n, but sy-tabix will refer to the line in the internal table.
    Hope this helps u.
    Thanks,
    Ruthra

  • Regarding Field Missing in Dso Transformation

    Hi
    Folks
    I am facing the issue like
    In Datasouce to DSO transformation i can see the 55 objects in DSO table, and in DSO to Cube Transformation i can see 54 fields in DSO table, one field is missing , the object  0TXTSH(short discription) is mapped to field 0TXZ01in DS to DSO transformation.
    so How can i get the field in DSO to Cube transformation.??
    any settings have to be change???
    waiting for yours Valuable answers
    Regards
    Anand

    Hi,
    Please identify the object and check it whether it is an attribute or a characteristic, if it is attribute only disable that option then check it.
    Regards,
    Srinivas

  • I am having an issue regarding a placed order via customer service department

    I recently relocated to Anchorage Alaska as part of a permanent change of station per the United States Air Force. I was initially located on the East Coast in the lower 48 and at the time of activating my contract I had purchased two separate Iphone 4 devices. I also recently went in to a store in February to purchase a Nexus 7 as well.
    Upon arrival in Anchorage I had multiple issues regarding the Iphone 4 devices including being unable to send and receive text messages & imessages, unable to make phone calls, dropped phone calls, unable to utilize GPS, as well as not being able to access general account information and use anything related to web browsing or data usage. It was determined that because the Iphone 4 operates on the 3g network and Verizon does not have a 3g network in Alaska, as a result I was utilizing an extended service network from another carrier. As a result of this I am only able to use my Iphone 4 devices while connected to my wi-fi network while within my home, which is totally unacceptable.
    I was not made aware that I would be dealing with this when I moved to Alaska and inquired as the the use of the devices I currently owned prior to purchasing the tablet. I was assured by three separate store employees one of which being a manager that all devices would function at 100% efficiency including the Iphone 4s. In fact I was recently billed 350$ for roaming charges last month, which prompted me to speak with a representative via the online chat regarding the significant increase she said that she was unable to process any sort of credit to the account regardless of what I had been told at a local Verizon store where I purchased the tablet.
    As a result of all of these mishaps since arriving here in Alaska I determined I was in need of newer devices that utilize the 4G LTE network currently provided by Verizon in Alaska. I know for a fact that the 4G LTE works great up here because my Nexus 7 tablet runs flawlessly and does not incur roaming charges when utilizing the 4G LTE network.
    Yesterday I attempted to contact Verizon through the live chat feature regarding upgrading two of the devices on my account. The live chat representative immediately asked me when my upgrade date was. Upon telling her my upgrade date 9/29/2014 she told me I should contact the customer service department as I might be eligible for an early upgrade. I then proceeded to contact the customer service department using my Iphone 4.
    My attempt to speak to anyone in the customer service department resulted in a merry-go-round of being put on hold 6 separate times by two different employees, both of which had me wait for more than an hour while they attempted to speak to a manager to gain approval for an early upgrade. The first rep seemed almost sure she would be able to have my devices upgraded early especially considering the issues I was having regarding service.
    The second rep seemed newer and was very dodgy about my questions and was very unwilling to help at first. He even mentioned that I had been a Verizon customer for almost two years, had never missed a single payment and had outstanding account history which should have garnered some sort of importance to the level of my request. But I digress, during this time I was disconnected from the call twice from each separate representative.
    Both reps assured me they would call me back, I never did get a call back from either one of those reps and I was becoming very frustrated having waited four hours trying to find some sort of solution to my current predicament.
    After waiting an hour for the second representative to call back I grew impatient and contacted the customer service department, was put on hold again, and finally reached a third customer service representative who was able to provide a solution for me.
    I explained everything I had been dealing with to Cory ID #  V0PAC61, both regarding the phones, the issue of the level of service I was receiving, the dire need for working devices and the multiple times I had been disconnected. I explained to him as a result of these issues I was certainly considering switching to a different provider, a local provider even who could provide me the adequate service that I require for my mobile devices.
    I explained to Cory that I had been with Verizon for almost two years, and I had been on a relatives account prior to owning my own Verizon account and had never received this kind of treatment when trying to work towards a simple solution. Cory proceeded to tell me he needed to put me on hold to see if there was anything that could be done regarding the upgrades of the device considering all of the trouble I had been dealing with.
    After Cory reconnected with me in the phone call he was able to successfully reach a solution by allowing me to upgrade my devices. We conversed about the options available and I eventually decided to upgrade both Iphone 4 devices to Moto X devices as we determined those would be sufficient for my needs while in Alaska. I also proceeded to add two Otter Box Defender cases to the order so that the devices would have sufficient protection. Cory inquired as to whether or not I would like to purchase insurance for the phones as well and I opted for the $5.00 monthly insurance which including damage and water protection.
    Cory explained to me the grand total for the devices which included an activation fee of $35.00 for each device, $49.99 for each Otter Box case, and an additional $50.00 for each device which would be refunded as a rebate upon receipt of the devices and activation, a rebate that I would be required to submit. Cory explained to me that the devices would most likely arrive Tuesday of 6/17 and no later than Wednesday 6/18.
    Cory took my shipping information and told me everything was all set and the only thing left to do was to transfer me to the automated service so that I could accept the 2 year agreement for both devices. I thanked him very much, took his name and ID# so that I might leave positive feedback about his exemplary customer service and was then transferred to the automated service.
    Once transferred to the automated service I was then prompted to enter both telephone numbers for the devices that would be upgraded, I was then required to accept the new 2 year agreement for both devices and after doing so I was required to end the call. I did so in an orderly fashion and expected a confirmation # to arrive in my email regarding the placed order.
    I have never received a confirmation email. I decided to sleep on it and assumed a confirmation email would be sent sometime tomorrow. Nothing has since been received however. I woke up early this morning around 6AM Alaska time to speak to another live chat representative, Bryan, in the billing department who assured me the order was currently processing and verified the order #. I asked him whether or not it was typical for a customer to not receive a confirmation email for an order placed and he said it can sometimes take up to 2-3 business days. He then stated that he had taken note of the issues I was experiencing and told me he would transfer me to the sales department as they would be able to provide more information regarding the shipment of both devices and a confirmation email, as he stated he did not want me to have to wait any longer than necessary to receive said devices.
    I was then transferred to Devon in the sales department via the live chat service where I was then required to repeat everything I had said to both Bryan and the other representatives I had spoken too. After a lengthy discussion and repeating everything I have just wrote he told me the order was indeed processing and that he would send a confirmation email in the next 30 minutes.
    That was 2 hours ago. It is now 8am Alaska time and I still have not received a confirmation email regarding my order. I was sent an email by Verizon an hour ago stating I had a device to "discover". The email contained no information regarding the shipment of my device, the order confirmation number, or anything regarding my account. The email I received was a typical spam email asking an individual to check out the current available phones and sign up for a new contract.
    All I want is a confirmation email to assure that the devices are being sent. I need my phone for work and to communicate with my family in the lower 48. I desperately need to make sure that the device is in fact being sent to the proper address, this is why a confirmation email of the order is so important. I do not care about the shipping speed I just want what I ask to be taken care of for a change. I would hate to sit here unable to determine what the status of my devices are only for the order to be stuck in "processing" limbo and be unable to receive the devices when I was told they would be sent.
    I feel I have been given the run around treatment way more than is typically given with any company when an individual is trying to work towards a solution. I have been patient and cordial with everyone I have spoken with, I have not raised my voice or shown stress or anger towards the situation I have only tried my best to work towards a solution with anyone I have spoken too but I am becoming increasingly frustrated with this situation.
    Any help regarding this matter would be greatly appreciated. This situation has left a sour taste in my mouth and if the devices were indeed not actually processed in an order, or they were not shipped correctly, or in fact if the order had never existed at all it will only deter me from keeping my Verizon account active and affect my decision to switch to another provider.

        Hello APVzW, we absolutely want the best path to resolution. My apologies for multiple attempts of replacing the device. We'd like to verify the order information and see if we can locate the tracking number. Please send a direct message with the order number so we can dive deeper. Here's steps to send a direct message: http://vz.to/1b8XnPy We look forward to hearing from you soon.
    WiltonA_VZW
    VZW Support
    Follow us on twitter @VZWSupport

Maybe you are looking for