[b][u]JSP/mySQL CREATE DATABASE problem[/u][/b]

I am trying to create a mySQL DB through JSP program (query).
The Query :
stmt.executeUpdate("CREATE DATABASE employee;");
is not working. PLEASE HELP ME.................
The program is as follows.
try
Connection con =null;
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/bedrock","Dude","");
System.out.println("Connection Established");
try {
System.out.println("Entered Try Block");
stmt=con.createStatement();
stmt.executeUpdate("CREATE DATABASE employee;");
System.out.println("Query Executed");
catch(Exception e){ 
System.out.println("Entered Catch Block");
System.out.println("Query Skipped");
catch (SQLException ex)
while (ex != null){
System.out.println("sql exception"+ex);
ex = ex.getNextException ();
Message was edited by:
sam_john

con=DriverManager.getConnection("jdbc:mysql://localhost:3306/bedrock","Dude","");
Access denied for user: '[email protected]' (Using password: NO)
You must provide a password for your connection.
Your code should have been as follows:
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/bedrock","Dude","YOUR_PASSWORD_HERE");Anyway, to create a database or a table in a db server like MySQL, you must have the good privileges to.
Go to <MySQL_INSTALL_DIR>/Docs/ directory, you'll find there the MySQL manual.chm. Take a look at the the Tutorial section.
In order to know how to use jdbc Connector/J, take a look at the documentation shipped with: /mysql-connector-java-X.X.X/docs/connector-j.html
Here a typical code:
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
public class TestMySQL {
     public static void main(String[] args) {
          Connection con = null;
          Statement stmt = null;
          try {
               Class.forName("org.gjt.mm.mysql.Driver").newInstance();
               con = DriverManager.getConnection("jdbc:mysql://localhost:3306/bedrock", "Dude", "YOUR_PASSWORD_HERE");////// put the right password here
               System.out.println("Connection Established");
               System.out.println("Entered Try Block");
               stmt = con.createStatement();
               stmt.executeUpdate("CREATE DATABASE employee");
               System.out.println("Query Executed");
          } catch (Exception e) {
               e.printStackTrace();
          } finally {
               if (stmt != null) {
                    try {
                         stmt.close();
                    } catch (Exception e) {
               if (con != null) {
                    try {
                         con.close();
                    } catch (Exception e) {
}Hope That Helps

Similar Messages

  • Creating Database Problem On WinME

    I have installed Oracle8i Personal Edition on WinME. Its successful. Now When I am trying to create database I have problem. When I am creating a database with Typical Option and then copy existing files from CD there is no problem. But trying to create new database files then its taking too much time. It comes at 6% and I think it stuck... Anybody knows how much time it is taking in Creating new Database files? If this is the problem and by making any modification it can be solved, please guide me.
    Thanks in Advance
    -Jignesh
    null

    dear friend
    thans for replying
    in fact i ddi not work
    i did the following:
    1 CREATE OR REPLACE TRIGGER t_CREATE_SYN
    2 AFTER CREATE ON SCHEMA
    3 BEGIN
    4 DECLARE
    5 vCUR INTEGER;
    6 vEXE NUMBER;
    7 CURSOR TAB_CUR IS
    8 SELECT TABLE_NAME FROM USER_TABLES;
    9 BEGIN
    10 vCUR := DBMS_SQL.OPEN_CURSOR;
    11 FOR I IN TAB_CUR LOOP
    12 DBMS_SQL.PARSE (vCUR,'CREATE PUBLIC SYNONYM '||' '||I.TABLE_NAME||' '||' FOR '||' '||' '||user||'.'||i.table_name,DBMS_SQL.NATIVE);
    13 vEXE := DBMS_SQL.EXECUTE(vCUR);
    14 END LOOP;
    15 DBMS_SQL.CLOSE_CURSOR(vCUR);
    16 END;
    17 NULL;
    18* END;
    SQL> /
    Trigger created.
    SQL> CREATE TABLE TAR_TAB ( ID NUMBER);
    CREATE TABLE TAR_TAB ( ID NUMBER)
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-30511: invalid DDL operation in system triggers
    ORA-06512: at "SYS.DBMS_SYS_SQL", line 824
    ORA-06512: at "SYS.DBMS_SQL", line 32
    ORA-06512: at line 10
    i woder is it possible to write a DDL command in database trigger?
    and how can i achive my task

  • Creating database problem with ORA-01519: error while processing file '' ne

    Dear all,
    I am having rough time with creating database manually. can anyone help me with the following errors.
    ALERT LOGFILE:-
    Sun May 31 12:00:39 2009
    Errors in file d:\oracle\product\10.1.0\admin\oracle5\udump\oracle5_ora_3444.trc:
    ORA-01501: CREATE DATABASE failed
    ORA-01519: error while processing file '%ORACLE_HOME%\RDBMS\ADMIN\SQL.BSQ' near line 5744
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01119: error in creating database file 'D:\oracle\product\10.1.0\oradata\ORACLE5 \datafile\undotbs1.dbf'
    ORA-27040: file create error, unable to create file
    OSD-04002: unable to open file
    O/S-Error: (OS 3) The system cannot find the path specified.
    Error 1519 happened during db open, shutting down database
    USER: terminating instance due to error 1519
    Sun May 31 12:00:39 2009
    Errors in file d:\oracle\product\10.1.0\admin\oracle5\bdump\oracle5_reco_3416.trc:
    ORA-01519: error while processing file '' near line
    CREATE DATABASE SCRIPT:-
    create database ORACLE5
    user sys identified by bala
    user system identified by bala
    logfile
    group 1 ('D:\oracle\product\10.1.0\oradata\ORACLE5\logfile\redo01.log') SIZE 50M,
    group 2 ('D:\oracle\product\10.1.0\oradata\ORACLE5\logfile\redo02.log') SIZE 50M,
    group 3 ('D:\oracle\product\10.1.0\oradata\ORACLE5\logfile\redo03.log') SIZE 50M
    maxlogfiles 5
    maxlogmembers 5
    maxloghistory 1
    maxdatafiles 50
    maxinstances 1
    datafile 'D:\oracle\product\10.1.0\oradata\ORACLE5\datafile\system01.dbf' size 200m autoextend on maxsize unlimited extent management local
    undo tablespace UNDOTBS1 datafile 'D:\oracle\product\10.1.0\oradata\ORACLE5 \datafile\undotbs1.dbf' size 10m autoextend on maxsize unlimited
    sysaux datafile 'D:\oracle\product\10.1.0\oradata\ORACLE5\datafile\sysaux01.dbf' size 100m autoextend on maxsize unlimited
    default temporary tablespace temp tempfile 'D:\oracle\product\10.1.0\oradata\ORACLE5 \datafile\temp01.dbf' size 10m autoextend on maxsize unlimited
    character set US7ASCII
    NATIONAL CHARACTER SET AL16UTF16
    INIT.ORA FILE:-
    # Copyright (c) 1991, 2001, 2002 by Oracle Corporation
    # Archive
    log_archive_format=ARC%S_%R.%T
    # Cache and I/O
    db_block_size=8192
    db_cache_size=25165824
    db_file_multiblock_read_count=16
    # Cursors and Library Cache
    open_cursors=300
    # Database Identification
    db_domain=""
    db_name=oracle5
    # Diagnostics and Statistics
    background_dump_dest=D:\oracle\product\10.1.0\admin\oracle5\bdump
    core_dump_dest=D:\oracle\product\10.1.0\admin\oracle5\cdump
    user_dump_dest=D:\oracle\product\10.1.0\admin\oracle5\udump
    # File Configuration
    #db_create_file_dest=D:\oracle\product\10.1.0\oradata
    db_recovery_file_dest=D:\oracle\product\10.1.0\flash_recovery_area
    db_recovery_file_dest_size=2147483648
    # Job Queues
    job_queue_processes=10
    # Miscellaneous
    compatible=10.1.0.2.0
    # Pools
    java_pool_size=50331648
    large_pool_size=8388608
    shared_pool_size=83886080
    # Processes and Sessions
    processes=150
    # Security and Auditing
    remote_login_passwordfile=EXCLUSIVE
    # Shared Server
    dispatchers="(PROTOCOL=TCP) (SERVICE=oracle5XDB)"
    # Sort, Hash Joins, Bitmap Indexes
    pga_aggregate_target=25165824
    sort_area_size=65536
    # System Managed Undo and Rollback Segments
    undo_management=AUTO
    undo_tablespace=UNDOTBS1
    control_files=("D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORACLE5\CONTROLFILE\control01.CTL", "D:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\ORACLE5\CONTROLFILE\control02.CTL")

    Hi,
    undo tablespace UNDOTBS1 datafile 'D:\oracle\product\10.1.0\oradata\ORACLE5 \datafile\undotbs1.dbf' size 10m autoextend on maxsize unlimited
    After ORACLE5 there is a space character. Typo? Create proper directory or delete this character.
    Bartek

  • JSP & Crystal Reports Database Problem

    Hi all,
    I hava problem with refreshing the crystal report web viewer if the report retrieves data from DB.
    If I don't refresh the report, it shows the report with default parameters. But when I refresh the report (I mean viewer.refresh()) it gives an error which says it could not found the JNDI.
    Do you have any idea about it ???
    Thanks in advance.
    Ismail TURK.

    So it can't find the JNDI name.
    What JNDI name is it looking for?
    How are you connecting to the database in the Crystal Reports developer.
    How It works on my machine. [long spiel]
    For some reason I was never able to get a JNDI connection throught the CR10 developer. It kept giving me error messages. But I DID manage to connect to Oracle via the standard Oracle TNSNames interface.
    When I tried loading the report in the browser, it looked for a JNDI name the same as the TNSName. Dunno why.
    The issue is that Tomcat stores the JNDI datasources under java:/comp/env/.
    And I couldn't configure the report to look in that initial context.
    My hack of a solution: load the JNDI datasource myself, and then bind it into the place where Crystal Reports looked:
    So I had
    1 - a TNS Name entry called REPORT_DB which the report designer connected to
    2 - a JNDI entry REPORT_DB defined in Tomcat
    <%
    Context initContext = new InitialContext();
    System.out.println("binding");
    try{
    Object obj = initContext.lookup("REPORT_DB");
    catch(NamingException e){
      System.out.println("Naming exception " + e);
      Context envContext  = (Context)initContext.lookup("java:/comp/env");
      DataSource ds = (DataSource)envContext.lookup("REPORT_DB");
      initContext.bind("REPORT_DB", ds);
    System.out.println("bound");
    %>Maybe this might help you, maybe not.
    Cheers,
    evnafets

  • 9i DBCA create database problem

    I'm running dbca on a redhat 9 box. I have been able to successfully install oracle, but want to alter the db_block_size to be 8k rather than the 4k default.
    I can set this as an initialization parameter and save it to a dbca template, but when I attempt to actually create the database, when it get to the instance start step, I get this error:
    ORA-01503: CREATE CONTROLFILE failed
    ORA-00058: DB_BLOCK_SIZE must be 4096 to mount this database (not 8192)
    There is no init.ora file anywhere, no control files or persistent database files of any type created at this juncture. Any ideas?

    Check the permission of dbca.rsp file in /home/oracle by
    #ls -l /home/oracle/dbca.rsp
    From the error its very clear that oracle user is not having sufficient privilege on this file.

  • [b][u]JSP create mysql DataBase problem[/u][/b]

    While i try to create mysql database through JSP program using query,
    the qurey statement doesn't work
    stmt.executeUpdate("create database employee;"); is not executing.
    The code is as follows : Please Help Me......
    try {
    Connection con = null;
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    con=DriverManager.getConnection("jdbc:mysql://localhost:3306/bedrock","Dude1","");
    try {
    Statement stmt=con.createStatement();
    stmt.executeUpdate("create database employee;");
    System.out.println("Statement Executed");
    catch(Exception e) {
    System.out.println("Statement not Executed");
    catch (SQLException ex) {
    while (ex != null) {
    System.out.println("sql exception"+ex);
    ex = ex.getNextException ();
    " THANKS IN ADVANCE "

    It's not common to create databases with Java. I'd say this is especially true of JSPs. You'll have to GRANT permission to access and create tables to every single user that comes in? Are those tables cleaned up when users are done, or does the number of tables grow as the number of users grows? One table per customer? Sounds more like session or cookies to me. Do you validate users to make sure that only authorized users can create tables? Lots of problems, and it doesn't appear that you've addressed any of this from the code you've posted.
    It's a bad idea to have code like this in a JSP. Those are for view only. Better to put database code on the server side where it belongs.
    %

  • JSP and Java Beans with Database Problem

    hellow, this is my first posting and i hope to help me as fast as you can...
    my problem is simplly i cant get any data from the database (whatever the database it is, i test it with MS Access and MySQL server) when i use a bean, But if i put my connection statement in the JSP file thair is no problem... ???? !!!!
    for example i have a class "Authentication" that have a method to test if the username and password is correct or not and return 1 if true, 0 if false, -1 if thair are some problem in connecting DB.
    now if i create a normal java application that uses this method, it's work and no problems, BUT if i used a JSP page to use this method it's return allways -1

    T1 class:
    package VX;
    import java.sql.*;
    import java.util.*;
    import javax.swing.*;
    public class T1
    //public MBJDBConnection(String driver,String url)
    public T1()
    JDBC_DRIVER = "com.mysql.jdbc.Driver";//driver;
    DATABASE_URL = "jdbc:mysql://localhost:3306/rawafed?user=root;password=0000";//url;
    //=======DB CONNECTION===========================================
    private static String JDBC_DRIVER;
    private static String DATABASE_URL;
    protected Connection connection;
    protected Statement statement;
    //===========End DBC==============================================
    public int update(String sqlUpdate)
         int i=0;
              //connectDB();
              try{
                   i=statement.executeUpdate(""+sqlUpdate);
                   catch(Exception e)
                        System.out.println("Error Inserting Statement Or Connection Not Opened");
              //disconnectDB();
         return i;
    public ResultSet select(String sqlQuery)
              //connectDB();
              ResultSet rs;
              try
              {//open try
              rs=statement.executeQuery(""+sqlQuery);
                   return rs;
              }//end try
              catch(Exception e2)
                   //System.out.println("Error Selecting Statement Or Connection Not Opened");
              }//end catch
              //add to array list
         //return resultList;
         return null;
    //------Methods-------
    public void connectDB()
    //===========================Connection===================
    try
    Class.forName(JDBC_DRIVER);
    catch(Exception e)
    System.out.println("Error : FOR NAME");
    try
    connection = DriverManager.getConnection(DATABASE_URL, "root", "0000");
    catch(Exception e)
    System.out.println("Error : DB URL");
    try
    statement = connection.createStatement();
    catch(Exception e)
    System.out.println("Error : CREATE STATEMENT ERROR");
    public void disconnectDB()
    try
    statement.close();
    connection.close();
    catch(Exception e2)
    System.out.println("Error : CAN'T CLOSE DB");
    T2 Class
    package VX;
    // class Person.
    //Required Class : EDC.EDCDB
    import java.sql.*;
    public class T2
         public T2()
              //initialization
         //........................ Attributes .........................
         private String user;
         private String password;
         private T1 db=new T1();
         private ResultSet rs;
         //......................... Methods .........................
         public String getAdmin(String u,String p)// 0: Failure, 1:Success and he is Administrator, 2: success and he is a regular employee 3: SUCCESS AND HE IS agent
              try
              user=u;
              password=p;
              rs=db.select("SELECT emp_id,password FROM Employee WHERE emp_id="+user+" AND password="+password+" AND Rank_ID=1");
              if(rs.next())
                   return ""+1;
              else
                   rs=db.select("SELECT emp_id,password FROM Employee WHERE emp_id="+user+" AND password="+password+" AND Rank_ID=2");
                   if(rs.next())
                        return ""+2;
                   else
                        rs=db.select("SELECT emp_id,password FROM Employee WHERE emp_id="+user+" AND password="+password+" AND Rank_ID=3");
                        if(rs.next())
                             return ""+3;
                        else return ""+0;
              catch(Exception e){System.out.println("Error \n"+e.getMessage());return ""+e.getMessage()+"\n"+(-1);}
         public int getCard(String u,String p)// 0: Failure, 1:Success and he is Administrator, 2: success
              user=u;
              password=p;
              try
              db.connectDB();
              rs=db.select("SELECT Card_ID,password FROM Card WHERE Card_ID='"+user+"' AND password='"+password+"'");
              if(rs.next())
                   return 1;
              return 0;
              catch(Exception w)
                   return -1;
              finally
                   //System.out.println("Done");
                   db.disconnectDB();
         public int getAny()
              return 1;
    }//end class
    This is a tested class and it's work OK
    import VX.T2;
    public class T3
         public static void main(String [] args)
              System.out.println("System Started...");
              try
                   T2 t2=new T2();
                   System.out.println(t2.getCard("1","a"));
              catch(Exception e)
                   System.out.println("Opsssss ...");
    Now this is the JSP Code that OK and Run without any problems
    <%@ page contentType="text/html; charset=windows-1256" language="java" import="java.sql.*" errorPage="" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1256" />
    <title>test</title>
    </head>
    <body>
    <%
    //Mazin B. Jabarin 20210464
    //Testing JSP - MySQL Server Driver
    String connectionURL = "jdbc:mysql://localhost:3306/EDCDB?user=root;password=0000";
    Connection connection = null;
    Statement statement = null;
    ResultSet rs = null;
    %>
    <%
    try{
    Class.forName("com.mysql.jdbc.Driver");
    connection = DriverManager.getConnection(connectionURL, "root", "0000");
    statement = connection.createStatement();
    rs = statement.executeQuery("SELECT * FROM a");
    while (rs.next()) {
    out.println(rs.getString("id")+"<br>");
    rs.close();
    catch(Exception e)
    out.print("Error : "+e.getMessage());
    %>
    </body>
    </html>
    Now this JSP File always returns (-1) ???? !!!!!!!
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" import="VX.T2" import="java.util.*" errorPage="" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body>
    <%
    try
    T2 t2=new T2();
    out.println("Result Still : "+t2.getCard("1","a"));
    catch(Exception w)
    out.println("<BR> Error In Execution ??? "+w.getMessage());
    %>
    </body>
    </html>
    ++++++++++++++++++++++++++++
    any one can help me please :(
    i use tomcat as web-application
    and i install jdk 1.5
    also JBulder 7
    (now i supposed that the JBulder make some conflict, so i uninstalled it but still Not Working) ...
    before one year i was working just like this way and it was working
    but now i dont know what is the problem
    i am really need help.

  • Problem: JSP, MySQL, UTF-8

    Hello!
    I use Netbeans 6.5, MySQL 5.0.67, Apache Tomcat 6.0.18, MySQL Connector J 5.1.6 to write simple web database application in JSP. Now I have problem with encoding of non-latin character strings returned from database.
    Database was created by query:
    CREATE DATABASE mydb DEFAULT CHARACTER SET = utf8Resource was defined in context.xml as follows:
        <Resource name="jdbc/ipdbDatasource"
            auth="Container"
            type="javax.sql.DataSource"
            driverClassName="com.mysql.jdbc.Driver"
            url="jdbc:mysql://localhost:3306/ipdb_10?autoReconnect=true&characterSetResults=UTF-8"
            username="root"
            password=""
            maxActive="100"
            maxIdle="30"
            maxWait="10000"/>Test page source is:
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%@taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <sql:query var="rooms" dataSource="jdbc/ipdbDatasource" >
        SELECT address, descr FROM room
    </sql:query>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
        </head>
        <body>
            <h1>&#1058;&#1077;&#1089;&#1090;&#1086;&#1074;&#1072;&#1103; &#1089;&#1090;&#1088;&#1072;&#1085;&#1080;&#1094;&#1072;</h1>
            <c:forEach var="room" items="${rooms.rows}">
                <p>${room.address}</p>
            </c:forEach>
        </body>
    </html>Page header <h1> content is OK, but ${room.address} appears in wrong encoding. What can cause this problem?

    I would suggest that you start by looking a jdbc only. JSP is not JDBC. XML is not JDBC.
    Moreover the ONLY way to determine what is actually being extracted from the database in a text value is to print the characters as integers. If you attempt to display them using ANYTHING (System.out, swing, xml, file io) then they will be mapped. And mapped data is not the same as what you got from the database.

  • Problem while Creating Database in 10g

    Its very urgent.. Please Help..!!
    After installing 10g (Standard Edition) on Windows 2000 Server, I started creating database through Database Configuration Assistant.
    Instead of Oracle Home path, different path is specified for Database files.
    In 'Step 11 of 12' of the 'Database Configuration Assistant' I specified the 4 new table spaces to create with respective memory sizes.
    In 'Step 12' I selected 'Create a Database' and clicked 'Finish' button.
    After 7% of the Database creation progress bar, it is giving the following error:
    "ORA: 01092 ORACLE instance terminated. Disconnection forced"
    And asking for Abort..
    What could be the problem. Is it problem with installation or any other services to be started.
    After 10g installation I restarted my system.
    If required I'll provide some more information.
    Its very urgent...
    Thanks & Regards

    hi satish,
    this is not the right forum for database questions. please use the following (database) forums:
    http://forums.oracle.com/forums/index.jsp?cat=18
    regards,
    christian

  • Cloudscape - JSP - Unable to create database CloudscapeDB

    I created a Cloudscape database in a Java program:
    try { 
    Class.forName(COM.cloudscape.core.JDBCDriver).newInstance();
         connection = DriverManager.getConnection(jdbc:cloudscape:CloudscapeDB;create=true);
    A CloudscapeDB directory is automatically created in the same directory as my
    Java program. I then ran cloudview -start from the DOS prompt, opened my database, created my tables and added data.
    In another Java program, I display the list of customers:
    public void displayCustomers(){
    try { 
    Class.forName("COM.cloudscape.core.JDBCDriver").newInstance();
    connection = DriverManager.getConnection(jdbc:cloudscape:CloudscapeDB;create=true);
         Statement s = connection.createStatement();
         ResultSet rs = s.executeQuery("SELECT * FROM customer");
    This Java program works fine, displays the data from the customer table.
    I then take this same code and put in into a JSP to display the list of customers to a web page and deploy my application using the Deployment tool:
    <%
    try {     
    Class.forName(COM.cloudscape.core.JDBCDriver);
         connection = DriverManager.getConnection(jdbc:cloudscape:CloudscapeDB;create=true);
    My getConnection() method throws the following SQL Error:
    SqlException Error Thrown Failed to create database 'CloudscapeDB'
    I am able to access the CloudscapeDB using the same driver and URL in the Database Tool but I don't know what I am doing wrong in my JSP.
    In the Deployment Tool, I have configured the Driver Class as COM.cloudscape.core.JDBCDriver and the JNDI Name as jdbc/CloudscapeDB and the JDBC URL as jdbc:cloudscape:CloudscapeDB;create=true. I am not sure I even needed to do this.
    Any idea why my JSP cannot create the CloudscapeDB? I believe the CLASSPATH is configured correctly because I am able to get access to the Cloudscape database in my Java program.
    Any help would be greatly appreciated.

    Hi, I saw your message in sun's forum. I am wondering how you g ot this issue resloved because I have a similar problem using Tomcat4.0 and cludscape 3.6. Would you please drop me a few lines and let me know your solution? I think it may be Tomcat configuration issue but just don't know how to fix it.
    Thanks in advance
    please reply to [email protected]
    I created a Cloudscape database in a Java program:
    try { 
    Class.forName(COM.cloudscape.core.JDBCDriver).newInsta
    ce();
    connection =
    =
    DriverManager.getConnection(jdbc:cloudscape:Cloudscape
    B;create=true);
    A CloudscapeDB directory is automatically created in
    the same directory as my
    Java program. I then ran cloudview -start from the
    DOS prompt, opened my database, created my tables and
    added data.
    In another Java program, I display the list of
    customers:
    public void displayCustomers(){
    try { 
    Class.forName("COM.cloudscape.core.JDBCDriver").newIns
    ance();
    connection =
    DriverManager.getConnection(jdbc:cloudscape:CloudscapeD
    ;create=true);
         Statement s = connection.createStatement();
    ResultSet rs = s.executeQuery("SELECT * FROM
    OM customer");
    This Java program works fine, displays the data from
    the customer table.
    I then take this same code and put in into a JSP to
    display the list of customers to a web page and deploy
    my application using the Deployment tool:
    <%
    try {     
    Class.forName(COM.cloudscape.core.JDBCDriver);
    connection =
    n =
    DriverManager.getConnection(jdbc:cloudscape:CloudscapeD
    ;create=true);
    My getConnection() method throws the following SQL
    Error:
    SqlException Error Thrown Failed to create database
    'CloudscapeDB'
    I am able to access the CloudscapeDB using the same
    driver and URL in the Database Tool but I don't know
    what I am doing wrong in my JSP.
    In the Deployment Tool, I have configured the Driver
    Class as COM.cloudscape.core.JDBCDriver and the JNDI
    Name as jdbc/CloudscapeDB and the JDBC URL as
    jdbc:cloudscape:CloudscapeDB;create=true. I am not
    sure I even needed to do this.
    Any idea why my JSP cannot create the CloudscapeDB? I
    believe the CLASSPATH is configured correctly because
    I am able to get access to the Cloudscape database in
    my Java program.
    Any help would be greatly appreciated.

  • Problem when creating Database (Database, OS and hardware Configuraiton included)

    Problem when creating Database:
    Below are the problems, which I faced during creation of database. I have mentioned both the problem separately. Plus the log file maintained by Oracle during installation. It might help in diagnosing the error. Plus a little conclusion with I turned up to.
    There are two problems, when creating database with Oracle Database Assistant. One when creating pre tuned database from CD. And second when creating customized database giving options your self.
    Problem # 1:
    When creating pre tuned database from CD. The process of creating Database is 90 % complete and is at step # 3 Initializing Database. It gives error ORA-03113: end-of-file on communication channel.
    I searched following oracle help for this problem.
    ORA-03113: end-of-file on communication channel
    Cause: An unexpected end-of-file was processed on the communication channel. The problem could not be handled by the Net8, two-task software. This message could occur if the shadow two-task process associated with a Net8 connect has terminated abnormally, or if there is a physical failure of the interprocess communication vehicle, that is, the network or server machine went down.
    Action: If this message occurs during a connection attempt, check the setup files for the appropriate Net8 driver and confirm Net8 software is correctly installed on the server. If the message occurs after a connection is well established, and the error is not due to a physical failure, check if a trace file was generated on the server at failure time. Existence of a trace file may suggest an Oracle internal error that requires the assistance of customer support.
    Conclusion:
    What I conceive from this problem and the help available is that, I have to install NET8 again. But I am not sure about the solution, please tell me whether I am rite or not.
    Problem # 2:
    When creating database with custom option. The process of creating Database is 2 % complete and is at step # 2 Creating Database Files. It gives error ORA-12571: TNS:packet writer failure.
    I searched following oracle help for this problem.
    ORA-12571: TNS:packet writer failure
    Cause: An error occurred during a data send.
    Action: Not normally visible to the user. For further details, turn on tracing and re-execute the operation. If error persists, contact Worldwide Customer Support.
    Conclusion:
    What I conceive from this problem and the help available is that, I have to install NET8 again. But I am not sure about the solution, please tell me whether I am rite or not.
    Log File Showing Error :
    Result code for launching of configuration tool is 0
    Launched configuration tool Oracle Database Configuration Assistant
    Command which is being spawned is C:\Program Files\Oracle\jre\1.1.7\bin/jrew.exe -Duser.dir=d:\oracle\ora81\assistants\dbca\jlib -classpath ";C:\Program Files\Oracle\jre\1.1.7\lib\rt.jar;C:\Program Files\Oracle\jre\1.1.7\lib\i18n.jar;d:\oracle\ora81\jlib\ewt-3_3_6.jar;d:\oracle\ora81\jlib\share-1_0_8.jar;d:\oracle\ora81\jlib\swingall-1_1_1.jar;d:\oracle\ora81\assistants\dbca\jlib\dbassist.jar;d:\oracle\ora81\assistants\jlib\jnls.jar;d:\oracle\ora81\assistants\jlib\acc.jar;d:\oracle\ora81\jlib\help-3_1_8.jar;d:\oracle\ora81\jlib\ice-4_06_6.jar;d:\oracle\ora81\jlib\netcfg.jar;" DBCreateWizard -progress_only -responseFile NO_VALUE -createtype seed -numusers NO_VALUE -apptype NO_VALUE -cartridges NO_VALUE -options NO_VALUE -demos NO_VALUE -seedloc d:\oracle\ora81\starterdb -sid ora8i -orabase d:\oracle -clususer NO_VALUE -cluspswd Protected value, not to be logged -nodeinfo NO_VALUE -gdbName ora8i
    Invalid Exit Code. The following result code will be used for configuration tool: 1
    Configuration tool Oracle Database Configuration Assistant failed
    The datafiles will be copied from the CD to d:\oracle\oradata\ora8i. The Oracle Database Configuration Assistant will begin creating the database.
    An Oracle database will be created for you. The database name will be ora8i. The system identifier for the database will be ora8i. The password for the INTERNAL account will be ******, the SYS account will be change_on_install and the SYSTEM account will be manager.
    Log File of Installation:
    The above code is a part of the log file, which is generated by Oracle installer at C:\Program Files\Oracle\Inventory\Log\..
    I just pasted the part of code, highlighted is the code showing error with Oracle Database Configuration Assistant.
    Software & Hardware Configuration are as follow:
    Software:
    Database
    Oracle 8.1.7.0.0 (Oracle8i)
    Operating System
    Microsoft Windows 2000
    5.00.2195
    Service Pack 2
    Hardware:
    x86 Family 6 Model 8 stepping
    10
    AT/AT COMPITABLE
    260,400 KB RAM

    Dont't worry about that. Before you
    create a table(or view), it is wise to
    drop the table(or view) with the same name.
    If the name doesn't exist, of course there
    is an error message. See the following script:
    -------------------begin-----------
    drop table students cascade constraints;
    create table students (
    sid varchar2(5),
    fname varchar2(20),
    lname varchar2(20) not null,
    minit char,
    primary key (sid));
    --------------end-----------------
    Good day!
    null

  • Problem faced while creating database in oracle 10g

    SQL> get C:\Oracle_Docs\ex\dbcreation_script\DBCREATIONSCRIPT
    1 create database db_test
    2 logfile group 1 ('C:\oracle\product\10.1.0\oradata\orcl\testdb\REDO01.rdo','C:\oracle\product\10.1.0\oradata\orcl\testdb\REDO02.rdo') size 100 m,
    3 group 2 ('C:\oracle\product\10.1.0\oradata\orcl\testdb\REDO03.rdo','C:\oracle\product\10.1.0\oradata\orcl\testdb\REDO04.rdo') size 100 m
    4 datafile 'C:\oracle\product\10.1.0\oradata\orcl\testdb\system01.dbf' size 32m
    5 SYSAUX DATAFILE 'C:\oracle\product\10.1.0\oradata\orcl\testdb\SYSAUX.DBF' SIZE 325M
    6 undo tablespace testundotbs
    7 datafile 'C:\oracle\product\10.1.0\oradata\orcl\testdb\undo01.dbf' size 40 m
    8 default temporary tablespace test_temptbls
    9 tempfile 'C:\oracledb\testdb\tempo1.dbf' size 40 m
    10 character set WE8MSWIN1252
    11* national character set AL16UTF16
    12 /
    create database db_test
    ERROR at line 1:
    ORA-01501: CREATE DATABASE failed
    ORA-01504: database name 'DB_TEST' does not match parameter db_name 'orcl'
    create spfile = 'C:\oracle\product\10.1.0\db_1\database\spfiledb_test.ora' from pfile = 'C:\oracle\product\10.1.0\admin\orcl\pfile\init.ora'
    ERROR at line 1:
    ORA-01078: failure in processing system parameters
    LRM-00109: could not open parameter file
    'C:\ORACLE\PRODUCT\10.1.0\ADMIN\ORCL\PFILE\INIT.ORA'
    Message was edited by:
    user525645

    i have the init file which contains my database name.i have tries asking one sir regarding this. he checked out my problem but couldnt get the solution.he told he'll check it out and tell...he 's telling ther is 25% chance in installation problem.
    my init.ora file
    # Copyright (c) 1991, 2001, 2002 by Oracle Corporation
    # Cache and I/O
    db_block_size=8192
    db_cache_size=25165824
    db_file_multiblock_read_count=16
    # Cursors and Library Cache
    open_cursors=300
    # Database Identification
    db_domain=""
    db_name=db_test
    # Diagnostics and Statistics
    background_dump_dest=C:\oracle\product\10.1.0\admin\orcl\bdump
    core_dump_dest=C:\oracle\product\10.1.0\admin\orcl\cdump
    user_dump_dest=C:\oracle\product\10.1.0\admin\orcl\udump
    # File Configuration
    control_files=("C:\oracle\product\10.1.0\oradata\orcl\testdb\control01.ctl", "C:\oracle\product\10.1.0\oradata\orcl\testdb\control02.ctl", "C:\oracle\product\10.1.0\oradata\orcl\testdb\control03.ctl")
    db_recovery_file_dest=C:\oracle\product\10.1.0\flash_recovery_area
    db_recovery_file_dest_size=2147483648
    # Job Queues
    job_queue_processes=10
    # Miscellaneous
    compatible=10.1.0.2.0
    # Pools
    java_pool_size=50331648
    large_pool_size=8388608
    shared_pool_size=83886080
    # Processes and Sessions
    processes=150
    # Security and Auditing
    remote_login_passwordfile=EXCLUSIVE
    # Shared Server
    dispatchers="(PROTOCOL=TCP) (SERVICE=orclXDB)"
    # Sort, Hash Joins, Bitmap Indexes
    pga_aggregate_target=25165824
    sort_area_size=65536
    # System Managed Undo and Rollback Segments
    undo_management=AUTO
    undo_tablespace=UNDOTBS1
    Message was edited by:
    user525645

  • Problem when creating Database:

    There are two problems, which I faced during creation of database. When creating database with Oracle Database Assistant. One when creating pre tuned database from CD. And second when creating customized database giving options your self.
    Problem # 1:
    When creating pre tuned database from CD. The process of creating Database is 90 % complete and is at step # 3 Initializing Database. It gives error ORA-03113: end-of-file on communication channel.
    I searched following oracle help for this problem.
    ORA-03113: end-of-file on communication channel
    Cause: An unexpected end-of-file was processed on the communication channel. The problem could not be handled by the Net8, two-task software. This message could occur if the shadow two-task process associated with a Net8 connect has terminated abnormally, or if there is a physical failure of the interprocess communication vehicle, that is, the network or server machine went down.
    Action: If this message occurs during a connection attempt, check the setup files for the appropriate Net8 driver and confirm Net8 software is correctly installed on the server. If the message occurs after a connection is well established, and the error is not due to a physical failure, check if a trace file was generated on the server at failure time. Existence of a trace file may suggest an Oracle internal error that requires the assistance of customer support.
    Conclusion:
    What I conceive from this problem and the help available is that, I have to install NET8 again. But I am not sure about the solution, please tell me whether I am rite or not.
    Problem # 2:
    When creating database with custom option. The process of creating Database is 2 % complete and is at step # 2 Creating Database Files. It gives error ORA-12571: TNS:packet writer failure.
    I searched following oracle help for this problem.
    ORA-12571: TNS:packet writer failure
    Cause: An error occurred during a data send.
    Action: Not normally visible to the user. For further details, turn on tracing and re-execute the operation. If error persists, contact Worldwide Customer Support.
    Conclusion:
    What I conceive from this problem and the help available is that, I have to install NET8 again. But I am not sure about the solution, please tell me whether I am rite or not.

    user563502 wrote:
    I am working on Solaris 8. What is Alert_SID.log? where can I find it?
    ThanksFor the responsible of the upgrade of Oracle database, not even know what Alert log is?
    to be honest with you, this is not your work.

  • Problem when creating Database with Database, OS and hardware Configuraiton

    Problem when creating Database:
    There are two problems, which I faced during creation of database. When creating database with Oracle Database Assistant. One when creating pre tuned database from CD. And second when creating customized database giving options your self.
    Problem # 1:
    When creating pre tuned database from CD. The process of creating Database is 90 % complete and is at step # 3 Initializing Database. It gives error ORA-03113: end-of-file on communication channel.
    I searched following oracle help for this problem.
    ORA-03113: end-of-file on communication channel
    Cause: An unexpected end-of-file was processed on the communication channel. The problem could not be handled by the Net8, two-task software. This message could occur if the shadow two-task process associated with a Net8 connect has terminated abnormally, or if there is a physical failure of the interprocess communication vehicle, that is, the network or server machine went down.
    Action: If this message occurs during a connection attempt, check the setup files for the appropriate Net8 driver and confirm Net8 software is correctly installed on the server. If the message occurs after a connection is well established, and the error is not due to a physical failure, check if a trace file was generated on the server at failure time. Existence of a trace file may suggest an Oracle internal error that requires the assistance of customer support.
    Conclusion:
    What I conceive from this problem and the help available is that, I have to install NET8 again. But I am not sure about the solution, please tell me whether I am rite or not.
    Problem # 2:
    When creating database with custom option. The process of creating Database is 2 % complete and is at step # 2 Creating Database Files. It gives error ORA-12571: TNS:packet writer failure.
    I searched following oracle help for this problem.
    ORA-12571: TNS:packet writer failure
    Cause: An error occurred during a data send.
    Action: Not normally visible to the user. For further details, turn on tracing and re-execute the operation. If error persists, contact Worldwide Customer Support.
    Conclusion:
    What I conceive from this problem and the help available is that, I have to install NET8 again. But I am not sure about the solution, please tell me whether I am rite or not.
    Software & Hardware Configuration are as follow:
    Software:
    Database
    Oracle 8.1.7.0.0 (Oracle8i)
    Operating System
    Microsoft Windows 2000
    5.00.2195
    Service Pack 2
    Hardware:
    x86 Family 6 Model 8 stepping
    10
    AT/AT COMPITABLE
    260,400 KB RAM

    user563502 wrote:
    I am working on Solaris 8. What is Alert_SID.log? where can I find it?
    ThanksFor the responsible of the upgrade of Oracle database, not even know what Alert log is?
    to be honest with you, this is not your work.

  • Problem when creating Database (Database, OS and hardware Configuraiton)

    Problem when creating Database:
    There are two problems, which I faced during creation of database. When creating database with Oracle Database Assistant. One when creating pre tuned database from CD. And second when creating customized database giving options your self.
    Problem # 1:
    When creating pre tuned database from CD. The process of creating Database is 90 % complete and is at step # 3 Initializing Database. It gives error ORA-03113: end-of-file on communication channel.
    I searched following oracle help for this problem.
    ORA-03113: end-of-file on communication channel
    Cause: An unexpected end-of-file was processed on the communication channel. The problem could not be handled by the Net8, two-task software. This message could occur if the shadow two-task process associated with a Net8 connect has terminated abnormally, or if there is a physical failure of the interprocess communication vehicle, that is, the network or server machine went down.
    Action: If this message occurs during a connection attempt, check the setup files for the appropriate Net8 driver and confirm Net8 software is correctly installed on the server. If the message occurs after a connection is well established, and the error is not due to a physical failure, check if a trace file was generated on the server at failure time. Existence of a trace file may suggest an Oracle internal error that requires the assistance of customer support.
    Conclusion:
    What I conceive from this problem and the help available is that, I have to install NET8 again. But I am not sure about the solution, please tell me whether I am rite or not.
    Problem # 2:
    When creating database with custom option. The process of creating Database is 2 % complete and is at step # 2 Creating Database Files. It gives error ORA-12571: TNS:packet writer failure.
    I searched following oracle help for this problem.
    ORA-12571: TNS:packet writer failure
    Cause: An error occurred during a data send.
    Action: Not normally visible to the user. For further details, turn on tracing and re-execute the operation. If error persists, contact Worldwide Customer Support.
    Conclusion:
    What I conceive from this problem and the help available is that, I have to install NET8 again. But I am not sure about the solution, please tell me whether I am rite or not.
    Software & Hardware Configuration are as follow:
    Software:
    Database
    Oracle 8.1.7.0.0 (Oracle8i)
    Operating System
    Microsoft Windows 2000
    5.00.2195
    Service Pack 2
    Hardware:
    x86 Family 6 Model 8 stepping
    10
    AT/AT COMPITABLE
    260,400 KB RAM

    user563502 wrote:
    I am working on Solaris 8. What is Alert_SID.log? where can I find it?
    ThanksFor the responsible of the upgrade of Oracle database, not even know what Alert log is?
    to be honest with you, this is not your work.

Maybe you are looking for

  • Wifi on Surface Pro - installed with ndiswrapper but not working

    Hi there guys. I have installed Arch on a Surface Pro and most things work well. The biggest problem so far is wifi - it comes with a 88w8797 Marvell Avastar chipset. I managed to find the drivers and used ndiswrapper to install them. $ ndiswrapper -

  • [SOLVED] NAT gateway and bridge

    Hello. I'm having hard time trying to setup a  small nat gateway. The whole point of me doing this is to learn more. Here is brief idea of what I'm trying to achieve. I have done it in the past with netcfg and it worked well but then I left my projec

  • Does any one know of a way to sync movies from my itunes to old Ipod Photo

    I have a 60GB Ipod Photo (the old brick type) and I want to use it to view movies that I have on my itunes. I tried to get my movies to sync to ipod photo but it just is not visible on my ipod although there is a playlist called movies in my Ipod Pho

  • Error -1309 when copying a file from internal to external HD

    I am trying to copy a disk image of an iDVD project over to an external hard drive. I want to transfer the file to my laptop which burns DVDs at 8x as opposed to the 2x of my iMac 20. During repeated attempts, near the very end of the copying process

  • Regarding creation of dynamic deep structure

    Hi all, I have to construct the dynamic deep structure. for example, With the help of information about address and t_table, i have to create the deep structure on runtime. In one case i need to create the deep strcuture with address alone and in ano