MySQL and JDBC

Hey all. I looked around and saw many similar messages like mine will be, but I could not fix it.
I have an account over on some webhost and I want to connect to my Database over there. However, I keep getting:
Exception: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection timed out: connectHere is the code:
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    String connectionURL = "jdbc:mysql://www.mydomain.com/mydatabase";
    java.sql.Connection connection = DriverManager.getConnection(connectionURL, "myuser", "mypass");
    java.sql.Statement statement = connection.createStatement();
    java.sql.ResultSet rs = statement.executeQuery("Select * from mytable");Thanks for the help, all!

Hi,
Can you provide the port number where mySQL is runnuing in your "connctionURL" like "jdbc:mysql://www.mydomain.com:3306/mydatabase";
default port is 3306, check your luck.
Class.forName("com.mysql.jdbc.Driver").newInstance(); String >connectionURL = "jdbc:mysql://www.mydomain.com/mydatabase"; >java.sql.Connection connection = DriverManager.getConnection(connectionURL, "myuser", "mypass"); java.sql.Statement statement = >connection.createStatement(); java.sql.ResultSet rs = >statement.executeQuery("Select * from mytable");Raju

Similar Messages

  • MySQL and JDBC Classpath errors

    I am new to Java and installed MySql and also installed mysql-connectorJ driver. I can compile the code below, but when I go to run it, I get "Exception in thread "main" java.lang.NoClassDefFoundError: JDBCDemo/class" error. I can't figure out what I am doing wrong.
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class JDBCDemo {
         public static void main(String[] args) {
              try{  
    Class.forName("com.mysql.jdbc.Driver");
              catch (Exception e)
                   e.printStackTrace();
    I have a the following environment variable called MySQL_Driver located at "C:\Program Files\Java\jdk1.5.0_06\lib".
    Path = "%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared;%JAVA_HOME%;%JAVA_HOME%\lib;%JAVA_VM%\bin;%JAVA_VM%\lib;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\QuickTime\QTSystem\;%MySQL_Driver%"

    What is your CLASSPATH set to as you need to make sure that the driver is in the path as well as the directory/jar where the JDBCDemo app lives.
    Try explictly specifying everything via the -classpath option on your java command line

  • Update of MySQL and SQL Server JDBC Driver does not work in 1.2.1

    Hi,
    always after the update process is started i got the MySQL and SQL Server JDBC driver
    update notification.
    But all the time after i install the update i got the notification again but no errormessage
    that the update was maybe not successful ???
    Frank

    Ok
    then my subject was false
    i always try to update the extensions and now i can see that they are updated on the filesystem but the IDE does not recognize them as updated
    ....\sqldeveloper\sqldeveloper\extensions\oracle.sqldeveloper.thirdparty.drivers.mysql
    is available and new after the update process
    and under
    ...\sqldeveloper\sqldeveloper\tmp\update\oracle.sqldeveloper.thirdparty.drivers.mysql.5239.zip
    the downloaded zip file is also available.
    In the update window the message is that the extension with version 5206 is available
    Maybe that is the problem cause the downloaded files are version 11.1.1.5239
    if you look at the bundle.xml file inside the META-INF directory
    Frank

  • How to handle blob data with java and mysql and hibernate

    Dear all,
    I am using java 1.6 and mysql 5.5 and hibernate 3.0 . Some time i use blob data type . Earlier my project's data base was oracle 10g but now i am converting it to Mysql and now i am facing problem to save and fetch blob data to mysql database . Can anybody give me the source code for blob handling with java+Mysql+Hibernate
    now my code is :--
    ==================================================
    *.hbm.xml :--
    <property name="image" column="IMAGE" type="com.shrisure.server.usertype.BinaryBlobType" insert="true" update="true" lazy="false"/>
    ===================================================
    *.java :--
    package com.shrisure.server.usertype;
    import java.io.OutputStream;
    import java.io.Serializable;
    import java.sql.Blob;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Types;
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    import oracle.sql.BLOB;
    import org.hibernate.HibernateException;
    import org.hibernate.usertype.UserType;
    import org.jboss.resource.adapter.jdbc.WrappedConnection;
    import com.google.gwt.user.client.rpc.IsSerializable;
    public class BinaryBlobType implements UserType, java.io.Serializable, IsSerializable {
    private static final long serialVersionUID = 1111222233331231L;
    public int[] sqlTypes() {
    return new int[] { Types.BLOB };
    public Class returnedClass() {
    return byte[].class;
    public boolean equals(Object x, Object y) {
    return (x == y) || (x != null && y != null && java.util.Arrays.equals((byte[]) x, (byte[]) y));
    public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException {
    BLOB tempBlob = null;
    WrappedConnection wc = null;
    try {
    if (value != null) {
    Connection oracleConnection = st.getConnection();
    if (oracleConnection instanceof oracle.jdbc.driver.OracleConnection) {
    tempBlob = BLOB.createTemporary(oracleConnection, true, BLOB.DURATION_SESSION);
    if (oracleConnection instanceof org.jboss.resource.adapter.jdbc.WrappedConnection) {
    InitialContext ctx = new InitialContext();
    DataSource dataSource = (DataSource) ctx.lookup("java:/DefaultDS");
    Connection dsConn = dataSource.getConnection();
    wc = (WrappedConnection) dsConn;
    // with getUnderlying connection method , cast it to Oracle
    // Connection
    oracleConnection = wc.getUnderlyingConnection();
    tempBlob = BLOB.createTemporary(oracleConnection, true, BLOB.DURATION_SESSION);
    tempBlob.open(BLOB.MODE_READWRITE);
    OutputStream tempBlobWriter = tempBlob.getBinaryOutputStream();// setBinaryStream(1);
    tempBlobWriter.write((byte[]) value);
    tempBlobWriter.flush();
    tempBlobWriter.close();
    tempBlob.close();
    st.setBlob(index, tempBlob);
    } else {
    st.setBlob(index, BLOB.empty_lob());
    } catch (Exception exp) {
    if (tempBlob != null) {
    tempBlob.freeTemporary();
    exp.printStackTrace();
    st.setBlob(index, BLOB.empty_lob());
    // throw new RuntimeException();
    } finally {
    if (wc != null) {
    wc.close();
    public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException {
    final Blob blob = rs.getBlob(names[0]);
    return blob != null ? blob.getBytes(1, (int) blob.length()) : null;
    public Object deepCopy(Object value) {
    if (value == null)
    return null;
    byte[] bytes = (byte[]) value;
    byte[] result = new byte[bytes.length];
    System.arraycopy(bytes, 0, result, 0, bytes.length);
    return result;
    public boolean isMutable() {
    return true;
    public Object assemble(Serializable arg0, Object arg1) throws HibernateException {
    return assemble(arg0, arg1);
    public Serializable disassemble(Object arg0) throws HibernateException {
    return disassemble(arg0);
    public int hashCode(Object arg0) throws HibernateException {
    return hashCode();
    public Object replace(Object arg0, Object arg1, Object arg2) throws HibernateException {
    return replace(arg0, arg1, arg2);
    =================================================================
    can anyone give me the source code for this BinaryBlobType.java according to mysql blob handling ..

    Moderator action: crosspost deleted.

  • "jdbc:mysql:///test" - "jdbc:mysql:test" what is the difference

    "jdbc:mysql:///test" -> "jdbc:mysql:test" what is the difference:
    I used both of them in my url but only "jdbc:mysql:///test" worked only
    what is the difference what /// means?

    JDBC URLs have the format
    jdbc:<subprotocol>://<data source identifier>
    jdbc indicates a JDBC data source. subprotocol identifies which JDBC Driver to use.
    For com.mysql.jdbc.Driver and localhost server, database name as 'test':
    it's jdbc:mysql://localhost/test
    or jdbc:mysql://127.0.0.1:3306/test
    you would select another server and database name.
    For sun.jdbc.odbc.JdbcOdbcDriver with MS Access or SQLServer database, it's jdbc:odbc:DSNname
    HTH

  • MySQL and J2EE 1.4 AppServer

    Hi I was wondering if anyone has gotten MySQL to work with CMP EJB's on the J2EE 1.4 AppServer? This is my story so far. Using the admin console I created a new Connection Pool named MySQL, it uses the com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource class as the Datasource Classname, all other settings I left as default. I added three properties which the MySQL driver expects to be passed: username, password, and databaseName. Once this is done I can ping the MySQL server successfully. Next I add a new JDBC Resource named jdbc/MySQL. Then using deploytool I change the Sun-specific Settings CMP Resource JNDI Name to jdbc/MySQL. When I try to deploy my EJB, this is when the problem occurs. I get the following error from the server:
    -- Fatal Error from EJB Compiler -- JDO74030: JDOCodeGenerator: Caught an IOException initializing CMP code generation for application 'vwcm' module '/opt/sunappserver/domains/versaqual/applications/j2ee-modules/': JDO7001: Cannot find resource com/sun/jdo/spi/persistence/generator/database/MYSQL.properties.
    Would anyone know what to do to fix this situation?

    I am using Sun App Server 7 and I believe the same concept can be applied to J2EE 1.4. In the CMP EJBs you have create the persistence manager to persist the data with the database. The JDBC resources are for making connection to the database, not for persistence. And the cmp jdbc resource should be named as jdo/MySql rather jdbc/MySql.
    Here is how you have to provide in the sun-ejb-jar file for the CMP beans.
    <cmp-resource>
    <jndi-name>jdo/MySql</jndi-name>
    </cmp-resource>
    You should find another option in the app server configuration console for "persistence managers".
    In the persistence manager console create a new persistence manager called jdo/MySql. It will ask you the following information. (As per App server 7)
    JNDI ----- jdo/MySql
    Description ------ Provide desc
    Factory Class ------- com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl
    Connection Pool ------- Provide your connection pool from the combo box.
    A JDBC resource will be automatically created to associate the Persistence Manager run-time with the specified Connection Pool.
    Persistence Manager Enabled: (Check the check box)
    Once you submit this information, it will create a JDBC resource in the name "jdo/MySqlPM". You can check whether it is created or not under the JDBC resource link in the app server configuration console. If it is created, then you should not have any other problem.
    After performing the above steps try to deploy, which I believe you should have any problem.
    Thanks

  • Applet and jdbc problem

    hi all
    I have problem when I connect the applet to mysql
    and code inside init() is
    try{
    String userName = "root";
    String password = "";
    String url = "jdbc:mysql://localhost/test";
    Class.forName ("com.mysql.jdbc.Driver").newInstance ();
    conn = DriverManager.getConnection (url, userName, password);
              }catch(Exception e){
    and I get a SQLException when
    I run appletviewer
    I am not sure what is the problem ....... driver .....or permission
    because all ok when it is convert to un applet program
    hope someone help

    I'm getting a similar problem with almost exactly the same code. With appletviewer, I get
    java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused
    and loading the webpage from a browser I get
    java.sql.SQLException: Unable to connect to any hosts due to exception: java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:3306 connect,resolve)
    Lots of the information I've looked up says to sign the applet; how does this work?
    Brian.

  • Configuring MySQL and Connector/J server

    I now have a working Applet that, when run from the compiler, will retrieve and update a MySQL database. Unfortunately, when I run the same Applet in a web brower (on an Apache server), the Applet does not pass values to/from the MySQL database.
    Is this a problem with my Applet or server? Any idea how to correctly set the server to utilize Connector/J and JDBC? Why is it working with the java console and JBuilder but not web browsers?
    in case it helps:
    Apache server
    MySQL database
    JBuilder compiler (applet works when run from here)
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import javax.swing.*;
    import java.sql.*;
    public class score
        extends JApplet {
      Container cp = getContentPane();
      JTextField fright = new JTextField(3);
      JTextField fleft = new JTextField(3);
      JButton refresh = new JButton("CheckDB");
      JButton left1 = new JButton("1");
      JButton left2 = new JButton("2");
      JButton left3 = new JButton("3");
      JButton left1m = new JButton("-1");
      JButton left2m = new JButton("-2");
      JButton left3m = new JButton("-3");
      JButton right1 = new JButton("1");
      JButton right2 = new JButton("2");
      JButton right3 = new JButton("3");
      JButton right1m = new JButton("-1");
      JButton right2m = new JButton("-2");
      JButton right3m = new JButton("-3");
      int lscore;
      int rscore;
      String l = ("");
      String r = ("");
      String updateString;
      Connection con = null;
      Statement st = null;
      ResultSet rs = null;
      public void init() {
        JPanel top = new JPanel();
        top.add(fleft);
        top.add(fright);
        top.add(refresh);
        JPanel right = new JPanel();
        right.add(right1);
        right.add(right2);
        right.add(right3);
        right.add(right1m);
        right.add(right2m);
        right.add(right3m);
        JPanel left = new JPanel();
        left.add(left1);
        left.add(left2);
        left.add(left3);
        left.add(left1m);
        left.add(left2m);
        left.add(left3m);
        top.setLayout(new FlowLayout());
        left.setLayout(new GridLayout(6, 1));
        right.setLayout(new GridLayout(6, 1));
        cp.setLayout(new BorderLayout());
        cp.add(top, BorderLayout.CENTER);
        cp.add(right, BorderLayout.EAST);
        cp.add(left, BorderLayout.WEST);
        right1.addActionListener(new ButtonListener());
        right2.addActionListener(new ButtonListener());
        right3.addActionListener(new ButtonListener());
        right1m.addActionListener(new ButtonListener());
        right2m.addActionListener(new ButtonListener());
        right3m.addActionListener(new ButtonListener());
        left1.addActionListener(new ButtonListener());
        left2.addActionListener(new ButtonListener());
        left3.addActionListener(new ButtonListener());
        left1m.addActionListener(new ButtonListener());
        left2m.addActionListener(new ButtonListener());
        left3m.addActionListener(new ButtonListener());
        refresh.addActionListener(new ButtonListener());
    //                    LISTENERS/FUNCTIONS
      class ButtonListener
          implements ActionListener {
        public void actionPerformed(ActionEvent e) {
          if (e.getSource() == refresh) {
            try {
          Class.forName("com.mysql.jdbc.Driver").newInstance();
          con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
            "root", "");
          st = con.createStatement();
          rs = st.executeQuery("SELECT score FROM score");
          int count = 0;
          while(rs.next()) {
            int g = rs.getInt(1);
            if (count == 0) {lscore = g;}
            if (count == 1) {rscore = g;}
            count++;
        } catch (Exception d) {
          System.err.println("Exception: " + d.getMessage());
        } finally {
          try {
            if(rs != null)
              rs.close();
            if(st != null)
              st.close();
            if(con != null)
              con.close();
          } catch (SQLException d) {
        l = String.valueOf(lscore);
        fleft.setText(l);
        r = String.valueOf(rscore);
        fright.setText(r);
          if (e.getSource() == left1) {
            lscore = lscore + 1;
            l = String.valueOf(lscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + l + " WHERE SIDE = 1";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fleft.setText(l);
          if (e.getSource() == left2) {
            lscore = lscore + 2;
            l = String.valueOf(lscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + l + " WHERE SIDE = 1";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fleft.setText(l);
          if (e.getSource() == left3) {
            lscore = lscore + 3;
            l = String.valueOf(lscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + l + " WHERE SIDE = 1";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fleft.setText(l);
          if (e.getSource() == left1m) {
            lscore = lscore - 1;
            l = String.valueOf(lscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + l + " WHERE SIDE = 1";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fleft.setText(l);
          if (e.getSource() == left2m) {
            lscore = lscore - 2;
            l = String.valueOf(lscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + l + " WHERE SIDE = 1";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fleft.setText(l);
          if (e.getSource() == left3m) {
            lscore = lscore - 3;
            l = String.valueOf(lscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + l + " WHERE SIDE = 1";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fleft.setText(l);
          if (e.getSource() == right1) {
            rscore = rscore + 1;
            r = String.valueOf(rscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + r + " WHERE SIDE = 2";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fright.setText(r);
          if (e.getSource() == right2) {
            rscore = rscore + 2;
            r = String.valueOf(rscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + r + " WHERE SIDE = 2";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fright.setText(r);
          if (e.getSource() == right3) {
            rscore = rscore + 3;
            r = String.valueOf(rscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + r + " WHERE SIDE = 2";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fright.setText(r);
          if (e.getSource() == right1m) {
            rscore = rscore - 1;
            r = String.valueOf(rscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + r + " WHERE SIDE = 2";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fright.setText(r);
          if (e.getSource() == right2m) {
            rscore = rscore - 2;
            r = String.valueOf(rscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + r + " WHERE SIDE = 2";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fright.setText(r);
          if (e.getSource() == right3m) {
            rscore = rscore - 3;
            r = String.valueOf(rscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + r + " WHERE SIDE = 2";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fright.setText(r);
    }

    Thanks for the info! Though I'm still confused about this:
    There are two ways to deal
    with this: (1) make sure your database is running on
    the same server as Apache, or (2) sign your applet so
    that the user can allow it to perform insecure
    actions.The Apache and MySQL are running on the same machine so I don't see a problem with server access. How could I sign the applet to perform insecure actions?
    Also, does the Connector/J installation method have anything to do with it? All I did was copied the .jar file to the dirctory in JBuilder and jsdk (ie: "C:\j2sdk1.4.1_02\jre\lib\ext\mysql-connector-java-3.0.15-ga-bin.jar") and set the CLASSPATH. I don't see a JDBC service running in my Apache monitor- could Apache not be configued to handle JDBC?
    Thanks again!
    PS: Oh yeah- heh- sorry about not using methods- this is just a quick weekend hack job ;-)

  • Jbuilder, MySQL, and me

    Hi,
    I'm having a bit of a strange problem, I made a test app that connected java to mysql and got some info out of it and it worked fine, so I switched over to Jbuilder because I like that program better, I made an application and added a database object to it. It opened up a window for the connection and I put in the exact same information as my test program then I tested the connection but it failed.
    Heres the driver I used: com.mysql.jdbc.Driver
    Heres the URL: jdbc:mysql://localhost/Money?user=go&password=go
    Heres the error I get: com.borland.dx.dataset.DataSetException: The driver: com.mysql.jdbc.Driver could not be loaded. This could be a problem with the driver itself, or that the driver is not found on the classpath.
    It works fine on my test program that I built using JGRASP but in JBuilder I can't get it to connect and I'm not entirely sure why. Thanks for any help you can give me.

    If you're running this application inside JBuilder, I think it's telling you that the JDBC driver JAR for MySQL is not in the CLASSPATH.
    You realize, of course, that JBuilder ignores any system CLASSPATH that you have set. (That might be the reason for the mystery.) JBuilder, like all other IDEs, expects you to set CLASSPATH for your projects inside the IDE itself. Consult your JBuilder docs to see how they want you to do it.

  • I downloaded mySQL and mySQL driver NOW  WHAT ?

    I downloaded the mySQL and the mySQL driver. What do I do now ?
    I saw a book "mySQL and PHP for Dummies" . What is PHP ?
    Can you give me direction ?
    (without the "go read the archives" type of non-helpful help ?)
    Thank you in advance
    Stan

    If it's PHP and MySQL you're interested in, why are you posting to a Java forum?
    PHP is a Web scripting language:
    http://www.php.net/
    If you want to use MySQL with Java, you'll have to learn enough about SQL and relational databases to be able to get into MySQL, create some tables and users, and add some data. Then you'll use the MySQL JDBC driver to let your Java app access those database tables and do CRUD operations on them (Create/Read/Update/Delete).
    There's a JDBC tutorial under the Tutorials link to the left on this page.
    Here's a Java app that will let you run any valid SQL statement you wish against any database:
    import java.sql.*;
    import java.util.*;
    public class DataConnection
        public static final String DEFAULT_DRIVER   = "sun.jdbc.odbc.JdbcOdbcDriver";
        public static final String DEFAULT_URL      = "jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\\Edu\\Java\\Forum\\DataConnection.mdb";
        public static final String DEFAULT_USERNAME = "admin";
        public static final String DEFAULT_PASSWORD = "";
        /** Database connection */
        private Connection connection;
         * Driver for the DataConnection
         * @param command line arguments
         * <ol start='0'>
         * <li>SQL query string</li>
         * <li>JDBC driver class</li>
         * <li>database URL</li>
         * <li>username</li>
         * <li>password</li>
         * </ol>
        public static void main(String [] args)
            DataConnection db = null;
            try
                if (args.length > 0)
                    String sql      = args[0];
                    String driver   = ((args.length > 1) ? args[1] : DEFAULT_DRIVER);
                    String url      = ((args.length > 2) ? args[2] : DEFAULT_URL);
                    String username = ((args.length > 3) ? args[3] : DEFAULT_USERNAME);
                    String password = ((args.length > 4) ? args[4] : DEFAULT_PASSWORD);
                    db = new DataConnection(driver, url, username, password);
                    Object result = db.executeSQL(sql);
                    System.out.println(result);
                else
                    System.out.println("Usage: db.DataConnection <sql> <driver> <url> <username> <password>");
            catch (SQLException e)
                System.err.println("SQL error: " + e.getErrorCode());
                System.err.println("SQL state: " + e.getSQLState());
                e.printStackTrace(System.err);
            catch (Exception e)
                e.printStackTrace(System.err);
            finally
                if (db != null)
                    db.close();
                db = null;
         * Create a DataConnection
         * @throws SQLException if the database connection fails
         * @throws ClassNotFoundException if the driver class can't be loaded
        public DataConnection() throws SQLException,ClassNotFoundException
            this(DEFAULT_DRIVER, DEFAULT_URL, DEFAULT_USERNAME, DEFAULT_PASSWORD);
         * Create a DataConnection
         * @throws SQLException if the database connection fails
         * @throws ClassNotFoundException if the driver class can't be loaded
        public DataConnection(final String driver,
                              final String url,
                              final String username,
                              final String password)
            throws SQLException,ClassNotFoundException
            Class.forName(driver);
            this.connection = DriverManager.getConnection(url, username, password);
         * Clean up the connection
        public void close()
            try
                this.connection.close();
            catch (Exception e)
                ; // do nothing; you've done your best
         * Execute ANY SQL statement
         * @param SQL statement to execute
         * @returns list of row values if a ResultSet is returned,
         * OR an altered row count object if not
         * @throws SQLException if the query fails
        public Object executeSQL(final String sql) throws SQLException
            Object returnValue      = null;
            Statement statement     = this.connection.createStatement();
            boolean hasResultSet    = statement.execute(sql);
            if (hasResultSet)
                ResultSet rs            = statement.getResultSet();
                ResultSetMetaData meta  = rs.getMetaData();
                int numColumns          = meta.getColumnCount();
                List rows               = new ArrayList();
                while (rs.next())
                    Map thisRow = new LinkedHashMap();
                    for (int i = 1; i <= numColumns; ++i)
                        String columnName   = meta.getColumnName(i);
                        Object value        = rs.getObject(columnName);
                        thisRow.put(columnName, value);
                    rows.add(thisRow);
                rs.close();
                statement.close();
                returnValue = rows;
            else
                int updateCount = statement.getUpdateCount();
                returnValue     = new Integer(updateCount);
            return returnValue;
    }Maybe it'll help get you started with Java and JDBC. You're on your own with PHP. - MOD

  • Issue in bringing up CRS on ATG 10.1.1 with MySQL and Weblogic 10.3

    Hello,
    I am trying to bring up Commerce Reference Store as part of my evaluation using MySQL (bundled with ATG) and WebLogic 10.3.
    I followed the ATG Documentation on CRS with WebLogic and MySQL and I could not proceed because of the below error log. I keep getting error in OnlineCreateServerInstanceTask of CIM. I believe it should be some configuration problem, but could not think of any.
    As part of the installation, I use C:\jdk1.6.0_25. I verified my weblogic server is up through the admin console. I started MySQL before running the eval batch. Apart from starting MySQL server, I did not make any datasource/database configuration changes for ATG. I have not run any other scripts to configure MySQL too.
    Please guide me to resolve the problem.
    C:\ATG\ATG10.1.1\CommerceReferenceStore\Store\eval>configureEval.bat
    Do you wish to run the CRS evaluation installation? [Y/N]: y
    Do you wish to use an existing database for the CRS evaluation? [Y/N]: n
    The CRS evaluation install will attempt to create the database. Press [Return] t
    o continue or any other key to quit:
    Enter mysql database connection details
    Enter user name: admin
    Enter user password: admin
    Enter database name: crsprod
    Enter 'root' user password:
    Creating database...
    Finished database creation
    Enter weblogic admin server URL: http://localhost:7001
    Enter weblogic admin server username: weblogic
    Enter weblogic admin server password: weblogic123
    Buildfile: C:\ATG\ATG10.1.1\CommerceReferenceStore\Store\eval\evalbuild.xml
    all:
    [copy] Copying 1 file to C:\ATG\ATG10.1.1\CommerceReferenceStore\Store\eval
    [delete] Deleting: C:\ATG\ATG10.1.1\CommerceReferenceStore\Store\eval\cimOut.
    cim.tmp
    BUILD SUCCESSFUL
    Total time: 0 seconds
    Application Server: weblogic
    The following installed ATG components are being used to launch:
    ATGPlatform version 10.1.1 installed at C:\ATG\ATG10.1.1
    Created "C:\ATG\ATG10.1.1\home\CIM\startDynamo.jar" in 15,273ms.
    Nucleus running
    atg.cim.productconfig.productselector.ProductSelectionContextTask starting...
    (Searching for products... done.)
    atg.cim.productconfig.productselector.ProductSelectionContextTask finished.
    atg.cim.productconfig.appserver.AppServerSelectTask starting...
    atg.cim.productconfig.appserver.AppServerSelectTask finished.
    atg.cim.productconfig.appserver.AppServerPathTask starting...
    atg.cim.productconfig.appserver.AppServerPathTask finished.
    atg.cim.productconfig.appserver.DomainPathTask starting...
    atg.cim.productconfig.appserver.DomainPathTask finished.
    atg.cim.productconfig.appserver.UrlTask starting...
    atg.cim.productconfig.appserver.UrlTask finished.
    atg.cim.productconfig.appserver.UsernameTask starting...
    atg.cim.productconfig.appserver.UsernameTask finished.
    atg.cim.productconfig.appserver.PasswordTask starting...
    atg.cim.productconfig.appserver.PasswordTask finished.
    atg.cim.productconfig.appserver.AppServerSelectionPersistenceTask starting...
    atg.cim.productconfig.appserver.AppServerSelectionPersistenceTask finished.
    atg.cim.database.CreateSchemaTask starting...
    atg.cim.database.CreateSchemaTask finished.
    atg.cim.database.ImportDataTask starting...
    Combining template tasks...Success
    Importing (1 of 1) /CIM/tmp/import/nonswitchingCore-import1.xml:
    /CommerceReferenceStore/Store/Storefront/data/pricelists.xml to /atg/commerce/pr
    icing/priceLists/PriceLists
    /CommerceReferenceStore/Store/Storefront/data/stores.xml to /atg/store/stores/St
    oreRepository
    /CommerceReferenceStore/Store/Storefront/data/catalog-i18n.xml to /atg/commerce/
    catalog/ProductCatalog
    /CommerceReferenceStore/Store/Storefront/data/pricelists-i18n.xml to /atg/commer
    ce/pricing/priceLists/PriceLists
    /CommerceReferenceStore/Store/Storefront/data/sites.xml to /atg/multisite/SiteRe
    pository
    /CommerceReferenceStore/Store/Storefront/data/sites-i18n.xml to /atg/multisite/S
    iteRepository
    /CommerceReferenceStore/Store/Storefront/data/promos-i18n.xml to /atg/commerce/c
    atalog/ProductCatalog
    /CommerceReferenceStore/Store/Storefront/data/seotags-i18n.xml to /atg/seo/SEORe
    pository
    /CommerceReferenceStore/Store/Storefront/data/wishlists.xml to /atg/commerce/gif
    ts/Giftlists
    /CommerceReferenceStore/Store/Storefront/data/inventory.xml to /atg/commerce/inv
    entory/InventoryRepository
    /CommerceReferenceStore/Store/Storefront/data/users.xml to /atg/userprofiling/Pr
    ofileAdapterRepository
    /CommerceReferenceStore/Store/Storefront/data/orders.xml to /atg/commerce/order/
    OrderRepository
    /CommerceReferenceStore/Store/Storefront/data/orders-i18n.xml to /atg/commerce/o
    rder/OrderRepository
    /CommerceReferenceStore/Store/Storefront/data/storetext-i18n.xml to /atg/store/s
    tores/StoreRepository
    /CommerceReferenceStore/Store/Storefront/data/claimable-i18n.xml to /atg/commerc
    e/claimable/ClaimableRepository
    ... > Success
    All Imports Completed Successfully
    atg.cim.database.ImportDataTask finished.
    atg.cim.worker.common.PropertyFileClearPersistanceTask starting...
    atg.cim.worker.common.PropertyFileClearPersistanceTask finished.
    atg.cim.productconfig.serverinstance.ServerInstanceNameTask starting...
    atg.cim.productconfig.serverinstance.ServerInstanceNameTask finished.
    atg.cim.productconfig.serverinstance.PortBindingsSelectTask starting...
    atg.cim.productconfig.serverinstance.PortBindingsSelectTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.worker.common.MapPropertyFileCreatorTask starting...
    atg.cim.worker.common.MapPropertyFileCreatorTask finished.
    atg.cim.productconfig.serverinstance.MakeServerInstanceFromPatternTask starting.
    atg.cim.productconfig.serverinstance.MakeServerInstanceFromPatternTask finished.
    atg.cim.productconfig.appassembly.EarFileNameTask starting...
    atg.cim.productconfig.appassembly.EarFileNameTask finished.
    atg.cim.productconfig.deploy.weblogic.OnlineCreateServerInstanceTask starting...
    Error Executing Batch File
    atg.cim.worker.TaskException: Error deploying to weblogic
    atg.cim.worker.TaskException: Error exececuting batch file
    at atg.cim.flow.CimFlowCreator.startHeadlessCimFlow(CimFlowCreator.java:
    130)
    at atg.cim.Launcher.startCimFlow(Launcher.java:278)
    at atg.cim.Launcher.main(Launcher.java:99)
    Caused by: atg.cim.worker.TaskException: Error deploying to weblogic
    at atg.cim.worker.Task.handleException(Task.java:72)
    at atg.cim.productconfig.deploy.weblogic.OnlineCreateServerInstanceTask.
    execute(OnlineCreateServerInstanceTask.java:159)
    at atg.cim.headless.HeadlessExecutorImpl.executeTasks(HeadlessExecutorIm
    pl.java:150)
    at atg.cim.headless.HeadlessExecutorImpl.populateAndExecuteHeadlessTasks
    (HeadlessExecutorImpl.java:140)
    at atg.cim.batch.BatchChooserExecutor.populateAndExecuteHeadlessTasks(Ba
    tchChooserExecutor.java:169)
    at atg.cim.flow.CimFlow.headlessFlow(CimFlow.java:116)
    at atg.cim.flow.CimFlowCreator.startHeadlessCimFlow(CimFlowCreator.java:
    120)
    ... 2 more
    Caused by: C:\ATG\ATG10.1.1\CIM\plugins\Base\ant\cim-ant.xml:348: The following
    error occurred while executing this line:
    C:\ATG\ATG10.1.1\CIM\plugins\Base\ant\cim-ant.xml:254: The following error occur
    red while executing this line:
    C:\ATG\ATG10.1.1\CIM\plugins\Base\ant\cim-ant.xml:214: exec returned: 1
    at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(Projec
    tHelper.java:541)
    at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
    a:394)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor132.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
    a:105)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
    at atg.cim.task.ant.utility.AntExecutionWrapper.executeAntTarget(AntExec
    utionWrapper.java:167)
    at atg.cim.worker.AntTask.executeAntTarget(AntTask.java:115)
    at atg.cim.productconfig.deploy.weblogic.OnlineCreateServerInstanceTask.
    execute(OnlineCreateServerInstanceTask.java:155)
    ... 7 more
    Caused by: C:\ATG\ATG10.1.1\CIM\plugins\Base\ant\cim-ant.xml:254: The following
    error occurred while executing this line:
    C:\ATG\ATG10.1.1\CIM\plugins\Base\ant\cim-ant.xml:214: exec returned: 1
    at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(Projec
    tHelper.java:541)
    at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
    a:394)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor132.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
    a:105)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor132.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
    a:105)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
    a:391)
    ... 20 more
    Caused by: C:\ATG\ATG10.1.1\CIM\plugins\Base\ant\cim-ant.xml:214: exec returned:
    1
    at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:636)
    at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:662)
    at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:487)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor132.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
    a:105)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor132.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
    a:105)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
    a:391)
    ... 34 more
    Nucleus shutting down
    Nucleus shutdown complete
    Thanks.

    This error is resolved after following the logs in C:\ATG\ATG10.1.1\CIM\log\cim.log. The root cause is I used http as protocol instead of t3 while specifying weblogic admin url.
    http://localhost:7001 instead of t3://localhost:7001
    Thanks.

  • Performance with MySQL and Database connectivity toolbox

    Hi!
    I'm having quite some problems with the performance of MySQL and Database connectivity toolbox. However, I'm very happy with the ease of using database connectivity toolbox. The background is:
    I have 61 variables (ints and floats) which I would like to save in the MySQL-database. This is no problem, however, the loop time increases from 8ms to 50ms when using the database. I have concluded that it has to do with the DB Tools Insert Data.vi and I think that I have some kind of performance issue with this VI. The CPU never reach more the 15% of its maximum performance. I use a default setup and connect through ODBC.
    My questions are:
    1. I would like to save 61 variables each 8-10ms, is this impossible using this solution?
    2. Is there any way of increasing the performance of the DB Tools Insert Data.vi or use any other VI?
    3. Is there any way of adjusting the MySQL setup to achieve better performance?
    Thank you very much for your time.
    Regards,
    Mattias

    First of all, thank you very much for your time. All of you have been really good support to me.
    >> Is your database on a different computer?  Does your loop execute 61 times? 
    Database is on the same computer as the MySQL server.
    The loop saves 61 values at once to the database, in one SQL-statement.
    I have now added the front panel and block diagram for my test-VI. I have implemented the queue system and separate loops for producer and consumer. However, since the queue is building up faster then the consumer loop consumes values, the queue is building up quite fast and the disc starts working.
    The test database table that I add data to is created by a simple:
    create table test(aa int, bb char(15));
    ...I'm sure that this can be improved in some way.
    I always open and close the connection to the database "outside the loop". However, it still takes some 40-50 ms to save the data to the database table - so, unfortunatly no progress to far. I currently just want to save the data.
    Any more advise will be gratefully accepted.
    Regards,
    Mattias
    Message Edited by mattias@hv on 10-23-2007 07:50 AM
    Attachments:
    front panel 2.JPG ‏101 KB
    block diagram.JPG ‏135 KB

  • Help on RFC to JDBC and JDBC to RFC

    Help on RFC to JDBC and JDBC to RFC
    Hi Gurus
    I have the scenario where an RFC will be triggered in SAP , to write to a DB2 database and insert new records in a table
    and vice versa the JDBC has to read som data from a table based on a primary key, mark them as read for not be read next time and send the data to an RFC where a table in SAP will be updated.
    I have never worked with JDBC before , pls advice.
    is there any new issue to consider in PI 7.0 regarding JDBC
    Thanks.

    The requirement looks standard,
    SEARCH IN SDN FOR JDBC scenarios,you will find many docs for sender as well as Receiver.
    >
    > is there any new issue to consider in PI 7.0 regarding JDBC
    >
    no issue with PI7.0.
    Regards,
    Raj

  • Creating a service ; What needs to be added to tnsnames.ora and JDBC url?

    DB version: 11.2.0.2
    OS platform : Solaris 10
    We have a 2 node RAC.
    DB name   = mbsprd
    Instance1  = mbsprd1
    Instance2  = mbsprd2I want Instance 1 (mbsprd1) to be used for our OLTP application and Instance 2 (mbsprd2) to be used for another application of DSS nature.
    Based on the syntax
    srvctl add service -d <dbname> -s <ServiceName> -r <Preferred Instance> -a <Available Instance>I am going to create 2 services
    -- Creating a service called OLTP
    srvctl add service -d mbsprd -s OLTP  -r mbsprd1 -a mbsprd2-- Creating a service called DSS
    srvctl add service -d mbsprd -s DSS  -r mbsprd2 -a mbsprd1-- Starting the services
    srvctl start service -d mbsprd -s OLTP
    srvctl start service -d mbsprd -s DSSI guess the above steps are enough to configure a service at the server side.
    I would like to know what needs to be done at the client side.
    Currently the tnsnames.ora file and JDBC url used by our clients are shown below. What needs to be added to tnsnames.ora file and jdbc URL to start using services configured above?
    -- SCAN based TNS entry
    mbsprd =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (COMMUNITY = tcp.world)
            (PROTOCOL = TCP)(Host = p148149-scan.tpam.net) (Port = 36964))
        (CONNECT_DATA =
          (SERVER       = DEDICATED)
          (SERVICE_NAME = mbsprd)
          (FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC))
    -- TNS entry based on local listener
    -- Instance 1
    mbsprd1 =
    (DESCRIPTION =
       (ADDRESS_LIST =
       (ADDRESS =(PROTOCOL = TCP)(HOST = hsolarp148-vip)(PORT = 36973))
       (CONNECT_DATA =
             (SERVICE_NAME = mbsprd)
             (INSTANCE_NAME = mbsprd1)
    -- Instance 2
    -- TNS entry based on local listener
    mbsprd2 =
    (DESCRIPTION =
       (ADDRESS_LIST =
       (ADDRESS =(PROTOCOL = TCP)(HOST = hsolarp149-vip)(PORT = 36973))
       (CONNECT_DATA =
             (SERVICE_NAME = mbsprd)
             (INSTANCE_NAME = mbsprd2)
    )JDBC entry for RAC
    jdbc:oracle:thin:@p148149-scan.tpam.net:36964:mbsprd -- Alternative version used by some clients because the above had 'some issues'
    jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=TCP)(HOST=p148149-scan.tpam.net) (PORT=36964))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=mbsprd)(FAILOVER_MODE =(TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY = 10))))

    OLTP =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = p148149-scan.tpam.net)(PORT = your_port_number))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = OLTP)
    DSS =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = p148149-scan.tpam.net)(PORT = your_port_number))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = DSS)
      )JDBC entry for RAC
    jdbc:oracle:thin:@p148149-scan.tpam.net:36964:service_name
    jdbc:oracle:thin:@new_tns_entry_description(if you would like to connect the database with particular service)
    try this and let us know any issues,

  • IDoc to JDBC  and JDBC to IDoc Scenario

    Dear All,
    I am working on IDoc to JDBC and JDBC to IDoc Scenario.
    I have to send Idoc from SAP to Non SAP system(.NET application) i almost configured in XI but still i don't know when my INTEGRATION will INVOKE how my data will proceed from IDOC to Oracle database(Through JDBC) and in case of revese how and when Data flow will start.
    Does anyone have completed STEP by STEP scenario document for this?
    How my Idoc will sent to XI?
    How XI will pick up data from IDoc?
    How XI will Convert data to JDBC and UPDATE in Oracle Database?
    And i reverse case(JDBC to IDoc) when my INTEGRATION will INVOKE?
    Where and When i can watch my process and data?
    How can i test the whole integration?
    I AM GETTING ERROR WHILE TESTING CONFIGURATION IN Integration Directory "Error while refreshing the XI runtime cache" and when i check this in SXI_CACHE  it gives me error
    "Unable to refresh cache "NO_BUSINESS_SYSTEM"
    "Error during last refresh to cache"LCR_GET_OWN_BUSINESS_SYSTEM - NO_BUSINESS_SYSTEM"
    Please solve all the above problems i will reward u points
    thanks,
    RP

    Hi,
    While we working on IDOC to JDBC interface..
    We have to deploy JDBC Drivers?
    Go through this links,
    /people/varadharajan.krishnasamy/blog/2007/02/27/configuring-jdbc-connector-service-to-perform-database-lookups
    http://searchsap.techtarget.com/tip/0,289483,sid21_gci1246926,00.html
    To install JDBC driver follow the how to guide.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-how-to-guides/how%20to%20install%20and%20configure%20external%20drivers%20for%20jdbc%20and%20jms%20adapters.pdf
    Configuration of JDBC Adapter for SQL Server
    JDBC Driver = com.microsoft.jdbc.sqlserver.SQLServerDriver
    Connection = jdbc:microsoft:sqlserver://hostname:<port>;DatabaseName=<DBName>
    UserID and Password.
    If the connection is not working find the correct port number.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40b92770-db81-2a10-8e91-f747188d8033
    JDBC- X I -  R/3 Scenario
    /people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
    Please check the driver path as mentioned below.
    JDBC Driver : sun.jdbc.odbc.JdbcOdbcDriver
    Connection:jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=//location of DB table.mdb;
    No JDBC driver required.
    Receiver JDBC scenario MS access - /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn
    follow this thread
    Re: Problem when connecting to MS Access through JDBC Adapter.
    SAP Note 850116 has details
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
    Configuring the Sender JDBC Adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/1d/756b3c0d592c7fe10000000a11405a/content.htm
    Configuring the Receiver JDBC Adapter
    http://help.sap.com/saphelp_nw2004s/helpdata/en/b0/676b3c255b1475e10000000a114084/content.htm
    Idoc Reveiver adapter..
    http://help.sap.com/saphelp_erp2004/helpdata/en/b9/c5b13bbeb0cb37e10000000a11402f/content.htm
    Thanks,
    Satya Kumar
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
    Edited by: SATYA KUMAR AKKARABOYANA on May 8, 2008 5:51 PM

Maybe you are looking for

  • Login Issue in Safari since 5.1 update

    Since updating to 5.1 on my iPhone, I cannot login to some websites. I don't get an error message. It just brings up the same login page again with all the fields cleared. I already checked on other devices to make sure I had the right user name and

  • To include po and pr action history

    hi i have created this query as i need report with the followiing columns po#          description           line_num           pr_Action_history(ie action date ,action_code)            po#              po_action_history(po_actioncode,po_action_date)

  • Notes folder disappeared from mail icloud in browser

    It just disappeared from icloud in browser but it shows in my devise. "Sync notes" is swich on. It always works till tooday. I did nothing to get this I need to appeare the notes folder in my mail icloud (browser) just like it was

  • The print button with Win8.1 in any pages don't work, only empty papers

    Many web pages contain a print button to print content. Since the upgrade to win 8.1 these buttons no longer work. in other browsers work the same pages properly.

  • After installing planning my essbase server just blinks and goes off

    Dear All, Till yesterday,everything was working fine. After installing planning my essbase server just blinks and goes off. I am using win xp ,system9.3.1. ARBORPATH: D:\Hyperion\AnalyticServices;D:\Hyperion/common/EssbaseRTC/9.3.1 HYPERION_HOME: D:\