Startup OracleDB with JDBC

Hello,
I'm trying to shutdown/startup the database server using JDBC, following the the steps from here http://download.oracle.com/docs/cd/B28359_01/java.111/b31224/dbmgmnt.htm
Shutting down works perfectly, but if I try the startup after it, it won't work
Error: Exception in thread "main" java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
After the shutdown, if I run a "lsnrctl status", there is no service listed, so I guess is normal to get this error.
The DB version that i'm using: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
The jdbc jar file: ojdbc6.jar
The java code:
public class DbStart { static final String DB_URL =                         "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))" + "(CONNECT_DATA=(SERVICE_NAME=ORCL)))"; // static final String DB_URL = "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=" + // "(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SID=ORCL)))"; public static void main(String[] argv) throws Exception { shutdown(); start(); mount(); } private static void mount() throws SQLException { // Mounting and opening the database OracleDataSource ds1 = new OracleDataSource(); Properties prop1 = getConnProp(); ds1.setConnectionProperties(prop1); ds1.setURL(DB_URL); OracleConnection conn1 = (OracleConnection) ds1.getConnection(); Statement stmt = conn1.createStatement(); stmt.executeUpdate("ALTER DATABASE MOUNT"); stmt.executeUpdate("ALTER DATABASE OPEN"); stmt.close(); conn1.close(); } private static void start() throws SQLException { // Starting up the database: OracleDataSource ds = new OracleDataSource(); Properties prop = getConnProp(); prop.setProperty("prelim_auth", "true"); ds.setConnectionProperties(prop); ds.setURL(DB_URL); OracleConnection conn = (OracleConnection) ds.getConnection(); conn.startup(OracleConnection.DatabaseStartupMode.NO_RESTRICTION); conn.close(); } private static void shutdown() throws SQLException { // Shutting down the database OracleDataSource ds2 = new OracleDataSource(); Properties prop3 = getConnProp(); ds2.setConnectionProperties(prop3); ds2.setURL(DB_URL); OracleConnection conn2 = (OracleConnection) ds2.getConnection(); conn2.shutdown(OracleConnection.DatabaseShutdownMode.IMMEDIATE); Statement stmt1 = conn2.createStatement(); stmt1.executeUpdate("ALTER DATABASE CLOSE NORMAL"); stmt1.executeUpdate("ALTER DATABASE DISMOUNT"); stmt1.close(); conn2.shutdown(OracleConnection.DatabaseShutdownMode.FINAL); conn2.close(); } private static Properties getConnProp() { Properties prop = new Properties(); prop.setProperty("user", "system"); prop.setProperty("password", "manager"); prop.setProperty("internal_logon", "sysdba"); return prop; } }
Do you have any suggestion on how to change this code in order to work?

864811 wrote:
I love your comparison, but still, do you think Oracle was joking arround when they've inserted the OracleConnection.startup() method? See the link to the article from my first post.
After I shutdown the database using the code below, when i connect from the command line with "sqlplus / as sysdba" i get a "Connected to an idle instance." With the sqlplus "startup" command I can get the db switched back on.
I was thinking that maybe my shutdown code needs some changes, or maybe i miss some configuration on the server.Depends on what one means by "shut down the database" but in general what you are suggesting is impossible.
For me to 'start' any application on any server using any programming language I must in fact run something on that server. And that is only possible if something else is already running on that server which accepts my remote commands and acts on them.
Thus for example I can use ssh to log in to a server and run all the admin commands I like associated with Oracle (and other stuff.) That works because there is a ssh server running on the target box. If the ssh server wasn't running then there would be no way for me to start it.

Similar Messages

  • I have a problem with JDBC Realm in Tomcat/Oracle/Win XP

    I have a problem with JDBC Realm in Tomcat.
    I have attached my server.xml file located in the
    C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\server.xml
    The Problem is that when I login I get the user name and password prompt but it does not resolve.
    When I enter in the tomcat-users.xml password with memory realm uncommented it works fine.
    C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\tomcat-users.xml
    Is there a cache or something I need to reset for the JDBC Realm to work?
    I have attached my tables and contents as well...
    Did I miss something????
    Thanks
    Phil
    server.xml
    <Server port="8005" shutdown="SHUTDOWN">
    <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
    <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
    <!-- Global JNDI resources -->
    <GlobalNamingResources>
    <!-- Test entry for demonstration purposes -->
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
    </GlobalNamingResources>
    <!-- Define the Tomcat Stand-Alone Service -->
    <Service name="Catalina">
    <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
    <Connector
    port="8080" maxHttpHeaderSize="8192"
    maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
    enableLookups="false" redirectPort="8443" acceptCount="100"
    connectionTimeout="20000" disableUploadTimeout="true" />
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009"
    enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
    <!-- Define the top level container in our container hierarchy -->
    <Engine name="Catalina" defaultHost="localhost">
    <!--
    <Realm className="org.apache.catalina.realm.MemoryRealm" />
    -->
    <Realm className="org.apache.catalina.realm.JDBCRealm"
    driverName="oracle.jdbc.driver.OracleDriver"
    connectionURL="jdbc:oracle:thin:@localhost:1521:orcl"
    connectionName="testName" connectionPassword="testPass"
    userTable="users"
    userNameCol="user_name"
    userCredCol="user_pass"
    userRoleTable="user_roles"
    roleNameCol="role_name" />
    <!-- Define the default virtual host
    Note: XML Schema validation will not work with Xerces 2.2.
    -->
    <Host name="localhost" appBase="webapps"
    unpackWARs="true" autoDeploy="true"
    xmlValidation="false" xmlNamespaceAware="false">
    </Host>
    </Engine>
    </Service>
    </Server>
    Tables
    create table users
    user_name varchar(15) not null primary key,
    user_pass varchar(15) not null
    create table roles
    role_name varchar(15) not null primary key
    create table user_roles
    user_name varchar(15) not null,
    role_name varchar(15) not null,
    primary key( user_name, role_name )
    select * from users;
    ----------------------+
    | user_name | user_pass |
    ----------------------+
    | tomcat | tomcat |
    | user1 | tomcat |
    | user2 | tomcat |
    | user3 | tomcat |
    ----------------------+
    select * from roles;
    | role_name |
    | tomcat |
    | role1 |
    select * from user_roles;
    -----------------------+
    | role_name | user_name |
    -----------------------+
    | tomcat | user1 |
    | role1 | user2 |
    | tomcat | tomcat |
    | role1 | tomcat |
    -----------------------+

    Jan 2, 2008 11:49:35 AM org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8080
    Jan 2, 2008 11:49:35 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 734 ms
    Jan 2, 2008 11:49:35 AM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Jan 2, 2008 11:49:35 AM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
    Jan 2, 2008 11:49:35 AM org.apache.catalina.realm.JDBCRealm start
    SEVERE: Exception opening database connection
    java.sql.SQLException: oracle.jdbc.driver.OracleDriver
         at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:684)
         at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:758)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1004)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
         at org.apache.catalina.core.StandardService.start(StandardService.java:450)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
         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:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
    Jan 2, 2008 11:49:35 AM org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    Jan 2, 2008 11:49:36 AM org.apache.catalina.core.StandardContext resourcesStart

  • Cannot assign an empty string to a parameter with JDBC type VARCHAR

    Hi,
    I am seeing the aforementioned error in the logs. I am guessing its happening whenever I am starting an agent instance in PCo. Can somebody explain whats going on?
    Regards,
    Chanti.
    Heres the complete detail from logs -
    Log Record Details   
    Message: Unable to retreive path for , com.sap.sql.log.OpenSQLException: Failed to set the parameter 1 of the statement >>SELECT ID, PARENTID, FULLPATH, CREATED, CREATEDBY, MODIFIED, MODIFIEDBY, REMOTEPATH, CHECKEDOUTBY FROM XMII_PATHS WHERE FULLPATH =  ?  <<: Cannot assign an empty string to a parameter with JDBC type >>VARCHAR<<.
    Date: 2010-03-12
    Time: 11:32:37:435
    Category: com.sap.xmii.system.FileManager
    Location: com.sap.xmii.system.FileManager
    Application: sap.com/xappsxmiiear

    Sounds like a UI browsing bug (when no path is selected from a catalog tree folder browser) - I would suggest logging a support ticket so that it can be addressed.

  • How do I get the startup page with tabs like "tools" etc.?

    == Issue
    ==
    I have another kind of problem with Firefox
    == Description
    ==
    I have re-installed Firefox but how can I get a normal startup page with a normal toolbar (tabs like "Tools", slot for writing web address etc.)?
    == Firefox version
    ==
    3.6.6
    == Operating system
    ==
    Windows Vista
    == User Agent
    ==
    Mozilla/5.0 (Windows; U; Windows NT 6.0; sv-SE; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 ( .NET CLR 3.5.30729)
    == Plugins installed
    ==
    *-np-mswmp
    *The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.
    *NPRuntime Script Plug-in Library for Java(TM) Deploy
    *Adobe PDF Plug-In For Firefox and Netscape "9.3.3"
    *Default Plug-in
    *Shockwave Flash 10.0 r45
    *iTunes Detector Plug-in
    *CANON iMAGE GATEWAY Album Plugin Utility Module
    *Picasa plugin
    *4.0.50524.0
    *Office Live Update v1.5
    *Virtual Earth 3D 4.00090316005 plugin for Mozilla
    *NPWLPG
    *Windows Presentation Foundation (WPF) plug-in for Mozilla browsers
    *Nexus Personal Plug-Ins
    *Voddler Web Plugin
    *Next Generation Java Plug-in 1.6.0_18 for Mozilla browsers

    In Firefox 3.6 and later on Windows you can hide the menu bar via "View > Toolbars" or via the right click context menu on a toolbar.
    Press F10 or press and hold the Alt key down to bring up the menu bar temporarily.
    Go to "View > Toolbars" or right-click the menu bar or press Alt+V T to select which toolbars to show or hide (click on an entry to toggle the state).
    See also [[Menu bar is missing]] and http://kb.mozillazine.org/Toolbar_customization

  • Problem with JDBC and Tomcat

    I don't know where the problem originate, the only thing in my memory is that the program worked very well on my PC yesterday, but today, without even slightest change, it doesn't work anymore. As to debug it, I simplified the codes to the least, but it still refuse to work. I was beaten down by this problem totally, and cannot make out any solution for it, so, I come here, hoping to find a warrior to kill this damned bug for me.
    My program is a Servlet, but for the purpose of debugging, I have recode it to an Application/Servlet. When run as a application, I can get the result expected, but as a Servlet, :-(, maybe you should see it by yourself. My server software is Tomcat 4.1.15, and the JDK version is 1.4.0. To excute this program, you should add Data Source "Test" to ODBC.
    ///////////////////////code begins/////////////////////////
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    public class Ex extends HttpServlet
         int ErrorType = 0;
         String err = new String("");
         public static void main(String args[]) throws Exception{
              Ex cEx = new Ex();
              cEx.init();     
              System.out.println(cEx.ErrorType);     
         public void init() {
              String url = "jdbc:odbc:Test";
              ErrorType = 3;     //passed
              try{
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              } catch (ClassNotFoundException e) {
                   e.printStackTrace();
                   ErrorType = 1; //trapped in Class.forName
              try{
                   Connection c = DriverManager.getConnection(url);
              } catch (SQLException e) {
                   e.printStackTrace();
                   ErrorType = 2; //trapped in DriverManager.getConnection
                   err = e.getMessage();
         public void service(HttpServletRequest req, HttpServletResponse res)
                   throws IOException {
              res.setContentType("text/html; charset=GB2312");
              PrintWriter out = res.getWriter();
              out.println("Success " + "<p>" + ErrorType + "<p>" +err);
              out.close();
    //////////////////////////code ends///////////////////////////////
    The result from the Servlet tell me that the problem occurred within the connection process, I don't know who should be responsible to this - Tomcat or JDBC?

    If you could print the exception that you got then that would help :) In the mean time, I could make a guess. It is unlikely that your application server (in this case, Tomcat) is blocking connections from your servlet. So the problem is either with JDBC directly or with the underlying datasource. It seems unlikely that it is JDBC given that you have stated that the code has not changed and it works in application form.
    My guess would be that you are coming up against some sort of security constraint (eg: your DBMS is letting you log in from one IP but not another?, your Java plug-in security policy is disallowing the connection?). It's hard to say.
    But if it works as an application but not via a servlet then you could try putting this in your java.policy file, which is located in the directory where your plug-ins are installed (eg: "C:\Program Files\Java\<version>\lib\security\") on Windows systems;
    permission java.net.SocketPermission "bend xp:1099", "listen,connect,accept";
    Try that, see if it works :)
    Ben

  • How to set a sql query time out with jdbc:oracle:thin

    should i change the JDBC driver with jdbc:oralce:XA:thin or other driver with XA?

    SQL query timeout may be set with setQueryTimeout.
    http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Statement.html#setQueryTimeout(int)
    A query timeout bug is fixed in Oracle JDBC Drivers release
    10.1.0.2.0 (10g)
    FIXED BUG-2249191
    In the Server Internal Driver, setting the query timeout does not
    +(and likely will never) work. The query execution will not be+
    canceled when the timeout expires, even if the query runs forever.
    Further, after the query returns, the execution of your code
    may pause for the length of the timeout.
    http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_readme101020.html

  • ORA-00444 & ORA-07446 while startup nomount with pfile(DB installation)

    Hi
    I am trying to create a single instance 10g database in a rac machine (SOLARIS) I had setuped the pfile and create DB scripts too. When I try startup nomount with pfile its throwing below error.
    $
    $ sqlplus
    SQL*Plus: Release 10.2.0.4.0 - Production on Mon Jan 7 21:45:19 2013
    Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
    Enter user-name: /as sysdba
    Connected to an idle instance.
    SQL> startup nomount pfile='/oracle/app/oracle/product/10.2.0/db/dbs/initdrc.ora';
    ORA-00444: background process "LMD0" failed while starting
    ORA-07446: sdnfy: bad value '' for parameter .
    SQL>
    Please find the init file contents.
    *.audit_file_dest='/oracle/app/oracle/admin/drc/adump'
    *.background_dump_dest='/oracle/app/admin/drc/bdump'
    *.compatible='10.2.0.4.0'
    *.control_files='+DATA/DRC/control01.ctl','+DATA/DRC/control02.ctl','+DATA/DRC/control03.ctl'
    *.core_dump_dest='/oracle/app/oracle/admin/drc/cdump'
    *.db_block_size=8192
    *.db_domain=''
    *.db_file_multiblock_read_count=16
    *.db_name='drc'
    *.sga_target=1184M
    *.sga_max_size=1184M
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=drcXDB)'
    *.job_queue_processes=10
    *.open_cursors=300
    *.pga_aggregate_target=411041792
    *.processes=150
    *.remote_login_passwordfile='EXCLUSIVE'
    *.undo_management='AUTO'
    *.undo_tablespace='UNDOTBS1'
    *.user_dump_dest='/oracle/app/oracle/admin/drc/udump'
    Already another rac database is running successfully on this machine through ASM. We are trying to use the same ASM instance for this single instance database. When I tried using dbca it was not reading the current ASM instance. Instead it was trying to create new instance. Thats y I was forced to create new DB manually.
    Kindly help in resolving this issue.
    Thanks
    SHIYAS M

    965652 wrote:
    Hi
    I am trying to create a single instance 10g database in a rac machine (SOLARIS) I had setuped the pfile and create DB scripts too. When I try startup nomount with pfile its throwing below error.
    $
    $ sqlplus
    SQL*Plus: Release 10.2.0.4.0 - Production on Mon Jan 7 21:45:19 2013
    Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
    Enter user-name: /as sysdba
    Connected to an idle instance.
    SQL> startup nomount pfile='/oracle/app/oracle/product/10.2.0/db/dbs/initdrc.ora';
    ORA-00444: background process "LMD0" failed while starting
    ORA-07446: sdnfy: bad value '' for parameter .
    SQL>
    07446, 00000, "sdnfy: bad value '%s' for parameter %s."
    // *Cause:  The directory specified as the value for the stated parameter could
    //          not be used.
    // *Action: Make sure the directory you have specified is a valid
    //          directory/file specification.post results from OS command below
    ls -l /oracle/app/oracle/product/10.2.0/db/dbs/initdrc.ora

  • MacBook Pro 17" with Intel Core 2 Duo startup freeze with 10.6.8?

    With my MacBook Pro 17" with Intel Core 2 Duo, 2.33 GHz startup freeze with 10.6.8 - I had problems after several SW upgrades. Startup ends every time in a freeze or a crash, nothing is running, i am not able to type in the password. it starts in beginning with thin colored disrupting lines on the display and this get more and more and than freeze the system.
    "Save Boot", startup with shift shows no problems, display is ok, no freeze. So something must new in the video-driver. Is there any driver what I can delete or any new software to help in this issue?

    try to boot off the cd installazzione, when the screen appears to follow thePACKING screen viewing. If you've already looked in the manual are your problem?

  • After a startup problem with my macbook pro i put it as slave and formatted the internal Hard drive. Now i want to install OS X Mavericks from USB

    After a startup problem with my macbook pro i put it as slave and formatted the internal Hard drive. Now i want to install OS X Mavericks from USB
    How can i do that?

    What did you "put as slave?" What Mac model do you have, exactly?

  • Can't connect to external Oracle DB with JDBC connector

    Hello guys,
    I had failed to connect to connect external Oracle  via JDBC connector .
    Could you please help me to resolve the problem ?
    Backgroud:
    We need to connect the external Oracle DB with JDBC connector, because BI need to connect to the target Oracle. If the JDBC connector suceed, BI will create a UD which use the datasource
    we create in Visual admin to connect to the external Oracle DB.
    Environment:
    Our EP version is NW04S SP17 , OS is AIX .
    The target Oracle DB version is 10g(10.1.0.2.0, 64bi).
    Configuration procedure :
    1. Import Oracle driver "ojdbc14.jar" and create new driver which named "Oracle "  under
    JDBC Connector ->Run time ->Driver  in Visual Admin.
    2. Create datasource "Mydatasource" under JDBC Connector ->Run time ->Data Source,
    Name : Mydatasource
    Driver Name : Oracle
    JDBC version: 2.0(with XA support)
    JDBC compliant:
    Object Factory :oracle.jdbc.pool.OracleDataSourceFactory
    DataSource Type: ConnectionPoolDataSource
    *CPDS class name :oracle.jdbc.pool.OracleConnectionPoolDataSource
    Additional:
    Additional Properties:
    DatabaseName:LPAR8TEST
    DriverName:oracle.jdbc.OracleDriver
    Password: *****
    PortNumber:1521
    ServerName: 10.1.16.208
    URL :jdbc:oracel:[email protected]:1521:LPAR8TEST
    User:IMPL
    Connectoin Pool:
    Initial Connectons: 1                                         Expiration:  (check)
    Maximum Connections: 25                                  Connection Lifetime :600
    Maximum time wait of connection : 60                  Cleanup Thread : 200
    Default Connectoin Isolaton :Default
    SQL Engine:
    Open SQL
    3.Create Connector :
       Copy the standard connector :SDK_JDBC to SDK_JDBC_Oracle,
      Resource Adopter:
      Loader References:
      Add "libray:Oracle" .
    Managed Connection Factory:
    Configuration Property:
    DriverName:oracle.jdbc.OracleDriver
    Password: ****
    User:IMPL
    URL: jdbc:oracle:[email protected]:1521:LPAR8TEST
    All fo my configuration had been listed.
    And I had created JCO RFC : JT-BIDEV_PORTAL_BD1 , and created RFC connection with SM59 in BI.
    Please give me some suggesiton.
    Thanks.
    Louis

    When I try to start datasoure "Mydatasource" , it display error, error detail:
    java.rmi.RemoteException: com.sap.engine.services.dbpool.exceptions.BaseRemoteException: Error during start of application "sap.com/Mydatasource". [id = StartupError]
         at com.sap.engine.services.dbpool.deploy.DataSourceManagerImpl.startApplication(DataSourceManagerImpl.java:608)
    Caused by: java.rmi.RemoteException: Error occurred while starting application in whole cluster and wait.; nested exception is:
         com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Clusterwide exception: server ID 3128050:com.sap.engine.services.dbpool.exceptions.BaseDeploymentException: Cannot start DataSource "CGNPC".
         at com.sap.engine.services.dbpool.deploy.ContainerImpl.startDataSource(ContainerImpl.java:1549)
    Caused by: com.sap.engine.services.dbpool.exceptions.BaseResourceException: SQLException thrown by the physical connection: java.sql.SQLException: Invalid Oracle URL specified: OracleDataSource.makeURL
         at com.sap.engine.services.dbpool.spi.CPManagedConnectionFactoryImpl.createManagedConnection(CPManagedConnectionFactoryImpl.java:198)
    Caused by: java.sql.SQLException: Invalid Oracle URL specified: OracleDataSource.makeURL
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
    Caused by: com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Clusterwide exception: server ID 3128050:com.sap.engine.services.dbpool.exceptions.BaseDeploymentException: Cannot start DataSource "Mydatasource".
         at com.sap.engine.services.dbpool.deploy.ContainerImpl.startDataSource(ContainerImpl.java:1549)
    Caused by: com.sap.engine.services.dbpool.exceptions.BaseResourceException: SQLException thrown by the physical connection: java.sql.SQLException: Invalid Oracle URL specified: OracleDataSource.makeURL
         at com.sap.engine.services.dbpool.spi.CPManagedConnectionFactoryImpl.createManagedConnection(CPManagedConnectionFactoryImpl.java:198)
    Caused by: java.sql.SQLException: Invalid Oracle URL specified: OracleDataSource.makeURL
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
              u2026.
    When I try to test JDBC with URL : http://jt-pldev:50000/TestJDBC_Web/TestJDBCPage.jsp,
    First I choose connection name "SDK_JDBC_Oracle" .
    If I click "Check Connectons", it display :
    500   Internal Server Error
    SAP J2EE Engine/7.00
      Application error occurred during request processing.
      Details:
      java.lang.NoClassDefFoundError: com.sap.ip.bi.sdk.dac.connector.odbo.impl.Connection (initialization failure)
    Exception id: [001A64A86F2C006B000004C40010302A000469C74E86A096]
    If I click "Slecton Connection", it display:
    500   Internal Server Error
    SAP J2EE Engine/7.00
      Application error occurred during request processing.
      Details:
      com.sap.engine.frame.core.load.SAPNoClassDefFoundError: javax.resource.Referenceable
    Exception id: [001A64A86F2C0063000004C00010302A000469C74FA2BB59]

  • Startup problem with Lion OS 10.7.3

    Just recently, I've been experiencing a startup problem with Lion. I don't usually have any issues running my Mac, so I'm at a loss why this is happening now.
    I have an Intel Mac Pro running 10.7.3. I usually leaving my Mac running all the time and only restart when the need arises. In addition to being my main computer, this mac alsocontrols a MacMini that serves as a music server thru screen sharing.
    This past weekend, I restarted my Mac and could not get past the grey screen. The mac chimes, the apple logo appears with the spinning gear, the blue screen briefly appears, but instead of progressing to the desktop it reverts to the grey screen with a repeating cycle of the spinning gear appearing (spins for a while, stops, disappears, reppears spinning, stops, disappears, over and over) - never progressing beyond that stage.
    I decided to reinstall the system and things have been fine for the past few days. Today, restarting again resulting in the same problem.
    I've tried several things without success. I disconnected all peripherals, reset the PRAM/SMC, ran Disk Utility from a install volume and ran repair and permissions (no problems reported). Tried safe mode startup - a progress bar appeared but never fully progressed and could not get to the desktop.
    Recent changes included updating the OS to 10.7.3 and Adobe Photoshop CS5.5 - no recent hardware changes. No bluetooth devices connected.
    Any thoughts? Thanks -

    Thanks -
    I've reinstalled the OS today and am back up and running.
    But, since this is twice this has happened within the past week, I'm worried about might be causing this issue - besides bad luck. My Mac is usually rock solid - can't remember the last time I've had to reinstall the OS in the past few generations of OS X.

  • Interface program with JDBC

    I created three database tables in PostgreSQL database and interfaced it with JDBC.
    In the interface program, I queried the program to retrieve data from two tables. I got results from the first table, but did not get any result from the second table. Rather, the system sent the following error message: Exception in thread "main" java.sql.SQLException: ERROR: parser: parse error at or
    near "mdas_ar_coments"
    at org.postgresql.core.QueryExecutor.executeV2(QueryExecutor.java:289)
    Mdas_ar_coments is the name of the second table. I have checked the names, there is no spelling mistake in both the database tables and interface program.
    Please, let me know how to query two or more tables in a JDBC interface program.
    Thanks.

    Please show me how you are attempting to query two tables using JDBC.

  • Why can't i use "INNER JOIN" in a query for SQL Server with JDBC??????

    Hi,
    I'm trying to execute some SQL queries and I just don't understand what's wrong.
    I�m using Tomcat and SQL Server in order to do this, but when I�m try to execute a query with a INNER JOIN statements Tomcat raise a SQL exception... at the very first time I thought there was a problem with database connection but I realize that a simple query to a table works pretty well. then I found out some problems with JDBC:ODBC.... so I install JDBC for SQL Server 2000 and test with the same simple query and works..... so, I come to a conclusion.... INNER JOIN or JOIN statements can't be used in JDBC..... please... somebody tell I�m wrong and give me a hand...
    I'm using TOMCAT 4 and JDK 1.4 SQL Server 2000
    Error occurs when executeQuery() is called.... not prepareStatement().... ??????
    Driver DriverRecResult = (Driver)Class.forName(driver).newInstance();
    Connection ConnRecResult = DriverManager.getConnection(DSN,user,password);
    PreparedStatement StatementRecResult = ConnRecResult.prepareStatement(query);
    ResultSet RecResult = StatementRecResult.executeQuery(); <---- Exception raise here
    So much tahnks in advance,

    That's exactly what I think, driver it's raising the exception, but I don't know why.... i test the same query with INNER JOIN directly from SQL Query Analyser and it's works perfectly, my problem ain't SQL, but JSP and JDBC 'cause i'm a newbie about these issues.
    Common sense tell me possible problems lie in SQLServer drivers 'cause i run the same pages on JRUN through jdbc:odbc and do works well, but by now i just depend on Tomcat.....
    I've installed SQL Server drivers for JDBC but i just find it doesn't work fully... could be the version of JDK i've installed? what version do i need?
    ( I'm running Tomcat 4 with JDK 1.4 & SQL Server 2000 W2K )
    thanks for reply.

  • Problem with jdbc:odbc returning incorrect number of rows.

    Hello,
    Am sure i have done something stupid, but i have an issue with jdbc:odbc ....
    It is a simple sceanrio that i have coded umpteen times before ...
    I have the following ....
    1. Connection to DB2 on an IBM i5 (I apologise for not using native drivers from jt400.jar, but i had an ODBC code example and was in a rush - no excuse i know)
    2. Statement object created from connection above
    3. A string with my SQL in it
    4. A result set for the results.
    These are created as follows:
    Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection(ODBCSource, userID, password);
    if (con == null) {
    // error handling not relevant here
    } else {
    Statement s = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
    String SQL = "select * from table";
    ResultSet rs = s.executeQuery(SQL);
    i then try to loop ....
    while (rs.next() )
    // stuff
    however, i only ever get one result .... if i stick in the check for isLast, the first loop hits this check, i get my little status message, and the loop ends.
    while (rs.next() )
    if (rs.isLast() )
    System.out.println("I am on last record");
    BUT if i run the SQL
    "select count(*) from table" ... i get a count of 148 !!
    I tried setting the FetchSize through setFetchSize(), but made no difference.
    This is running on a JBoss server 4.2.1GA, JDK is "jdk1.6.0_02" .... i have a suspicion that this may be a JBoss specfic issue, as this exact code runs just fine on the Domino platform that it was originally on, if this is the case, i apologise for wasting everyones time .... but would still appreciate any pointers you can give me.
    Cheers

    Hello,
    Thanks for the reply, I am not sure i follow what you are saying.
    I only mentioned JBoss as it is the application server that we have deployed to and because the orignal code ran fine on a Domino server, I will take your advice and try to run it through in debug rather than running actually on the application server.
    Am i incorrect in my assumption that if "select count(*) from table" gives a count of 148, i should expect 148 records in a result set created from "select * from table" ? This is all rather new to me so i apologise if this is incorrect, I'd love to know why this is incorrect so i dont make similar mistakes in future.
    Also, If i run this same code on the previous platform, i get 148 iterations of the code contained within
    while (rs.next() ) { ... }
    When the war file is deployed to JBoss, the same SQL statement gives a result set that only iterates once for
    while (rs.next() ) { ... }
    The previous platform as I say was domino, but it was running as a lotus notes java agent (despite not using any notes documents etc) as it happened to be where the web pages that call this process were located. It is possible that some of the main code has changed as I had cut and paste the code into a servlet using MyEclipse, but i have double checked the bit that does this SQL request and it is identical
    To complete the picture, the new servelt is then called from the action tag on the submit form on a JSP, when it ends the servlet redirects via the requestdispacher to success or failure jsp pages depending on the outcome of the processing.
    Thank you again for your help.

  • How to get the field's type in the database with jdbc?

    How to get the one filed's type(varchar,int,long...etc) with jdbc??
    Can u help me??
    It's best that giving a sample code..

    Thx for your reply,BheegaChicken! But i use it with
    oracle9i jdbc..It doesn't return to my the fields
    type correctly..
    This is problem is caused by oracle jdbc??
    Can u tell me??It depends on the driver classes you are using... some of them don't have an implementation for those methods and you won''t get anything useful. Check the driver documentation.
    ***Annie***

Maybe you are looking for

  • Opportunity Product Revenue

    Hello, I can`t find a report called Opportunity Product Revenue, the near report is Opportunity Product. My problem is when I go to second Step called Create Layout i can't see the item Accumulated Revenue related to Revenue? Could someone help me? T

  • Error message when opening iTunes and Mail

    I'm running OS X 10.6.8 on a Mac Book. Since the recent 'hack' reports, I subsequently changed my Apple Password. Since then, when I open iTunes I get the error message: "You are signed in with a different Apple ID than previously used with podcsts.

  • Help me choose a graphics card.

    Hi everybody! I´m in the process of picking parts for a new computer, but I got stuck when it comes to choosing a graphics card. I want a hd7850, and the msi brand seems to be a preferred brand when I read many forums. But there are currently three d

  • Crysis on 2.8 Octo with 8800 GT

    I wanted to let you know that I get 32FPS with Crysis maxed out running at 1280x720 under XP SP3. I edited the config files to get the DX10 Very High settings under XP. I hope the MAC 8800 GT runs as nice and cool as this PC version.

  • USING MAC MINI, IPHOTO PICTURES TRANSFER TO EXTERNAL HD

    im using mac mini, how to transfer iphoto pictures to external hard drive?