Connection mysql java 2 me

When i try to connect with the server, it is open a htlm page http://localhost:number of port(server)/Servlet/
in this page there is written: JSP Page
it show me this error:
Could not access the URL through the external browser...open Server and External Tool Settings node and choose a valid browser....
i tried to do it.... but i didn't resolve my problem!
Can samebody help me?
THANKS!
Ps. it is the code:
import java.io.*;
import java.util.*;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.io.*;
public class connessioneDB extends MIDlet implements CommandListener {
private String username;
private String url =
"http://localhost:3308/Servlet/servletCon/getConnection";
private Display display;
private Command exit = new Command("EXIT", Command.EXIT, 1);;
private Command connect = new Command("Connect", Command.SCREEN, 1);
private TextField tb;
private Form menu;
private TextField tb1;
private TextField tb2;
DB db;
public connessioneDB() throws Exception {
display = Display.getDisplay(this);
public void startApp() {
displayMenu();
public void displayMenu() {
menu = new Form("Connect");
tb = new TextField("Please input database: ","",30,
TextField.ANY );
tb1 = new TextField("Please input username: ","",30,
TextField.ANY);
tb2 = new TextField("Please input password: ","",30,
TextField.PASSWORD);
menu.append(tb);
menu.append(tb1);
menu.append(tb2);
menu.addCommand(exit);
menu.addCommand(connect);
menu.setCommandListener(this);
display.setCurrent(menu);
public void pauseApp() {}
public void destroyApp(boolean unconditional) {}
public void commandAction(Command command, Displayable screen) {
if (command == exit) {
destroyApp(false);
notifyDestroyed();
} else if (command == connect) {
db = new DB(this);
db.start();
db.connectDb(tb.getString(),tb1.getString(),tb2.getString());
public class DB implements Runnable {
connessioneDB midlet;
private Display display;
String db;
String user;
String pwd;
public DB(connessioneDB midlet) {
this.midlet = midlet;
display = Display.getDisplay(midlet);
public void start() {
Thread t = new Thread(this);
t.start();
public void run() {
StringBuffer sb = new StringBuffer();
try {
HttpConnection c = (HttpConnection) Connector.open(url);
c.setRequestProperty(
"User-Agent","Profile/MIDP-1.0, Configuration/CLDC-1.0");
c.setRequestProperty("Content-Language","en-US");
c.setRequestMethod(HttpConnection.POST);
DataOutputStream os =
(DataOutputStream)c.openDataOutputStream();
os.writeUTF(db.trim());
os.writeUTF(user.trim());
os.writeUTF(pwd.trim());
os.flush();
os.close();
// Get the response from the servlet page.
DataInputStream is =(DataInputStream)c.openDataInputStream();
//is = c.openInputStream();
int ch;
sb = new StringBuffer();
while ((ch = is.read()) != -1) {
sb.append((char)ch);
showAlert(sb.toString());
is.close();
c.close();
} catch (Exception e) {
showAlert(e.getMessage());
/* This method takes input from user like db,user and pwd and pass
to servlet */
public void connectDb(String db,String user,String pwd) {
this.db = db;
this.user = user;
this.pwd = pwd;
/* Display Error On screen*/
private void showAlert(String err) {
Alert a = new Alert("");
a.setString(err);
a.setTimeout(Alert.FOREVER);
display.setCurrent(a);
import java.io.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
public class getConnection extends HttpServlet {
public void init() {
public void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
DataInputStream in = new DataInputStream(
(InputStream)request.getInputStream());
String db = in.readUTF();
String user = in.readUTF();
String pwd = in.readUTF();
String message ="jdbc:mysql://localhost:3308/"+db+","+user+","+pwd;
try {
connect(db.toLowerCase().trim(),user.toLowerCase().trim(),
pwd.toLowerCase().trim());
message += "100 ok";
} catch (Throwable t) {
message += "200 " + t.toString();
response.setContentType("text/plain");
response.setContentLength(message.length());
PrintWriter out = response.getWriter();
out.println(message);
in.close();
out.close();
out.flush();
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
doPost(request,response);
/* This method connects to MYSQL database*/
private void connect(String db, String user,String pwd)
throws Exception {
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection conn = DriverManager.getConnection(
"jdbc:mysql://localhost:3308/"+db,user,pwd);
}

Looks like it's a know bug of Sun ONE Studio:
http://www.netbeans.org/issues/show_bug.cgi?id=19506
Don't know if you use it, or have te browser they are refering too...
Also: where do get this error? From the midlet?

Similar Messages

  • Java fails to connect  mysql

    HELP!! What have i done wrong here?
    Ive downloaded a mysql driver and the adress is c:\mm.mysql.jdbc-1.2c
    iv'e set a classpath in autoexec.bat CLASSPATH=C:\mm.mysql.jdbc-1.2c\;%CLASSPATH%
    And my connection source is
    import java.sql.*;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class CreateCoffees {
    public static final String dbdriver = "org.gjt.mm.mysql.Driver";
    private static Connection con;
    public static void main(String args[]) { 
         try{
              String url = "jdbc:mysql:/shop";
    con= DriverManager.getConnection(url + "?user=xxx&password=xxx"); ;
         } catch (SQLException ex) {
    // handle any errors
    System.out.println("SQLException: " + ex.getMessage());
    System.out.println("SQLState: " + ex.getSQLState());
    System.out.println("VendorError: " + ex.getErrorCode());
         String sqlinsert;
         sqlinsert = "create table Person " +
         "(Namn varchar(32), " +
         "Pnr int, " +
         "Lon int, " +
         "Vikt int)";
         Statement stmt;
         try {
         Class.forName("dbdriver");
         } catch(java.lang.ClassNotFoundException e) {
         System.err.print("ClassNotFoundException: ");
         System.err.println(e.getMessage());
         try {
         stmt = con.createStatement();
         stmt.executeUpdate(sqlinsert);
         stmt.close();
         con.close();
         } catch(SQLException ex) {
         System.err.println("SQLException: " + ex.getMessage());
    }

    HELP!! What have i done wrong here?What, specifically, is the error message you are receiving?
    Ive downloaded a mysql driver and the adress is
    c:\mm.mysql.jdbc-1.2c
    iv'e set a classpath in autoexec.bat
    CLASSPATH=C:\mm.mysql.jdbc-1.2c\;%CLASSPATH%I'm assuming you have the .class files for the JDBC driver under C:\mm.mysql.jdbc-1.2c. Obviously, if .class files for the driver are in a .jar file in that directory, you'll need to add the .jar file to the CLASSPATH.
    And my connection source is
    import java.sql.*;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class CreateCoffees {
    public static final String dbdriver =
    = "org.gjt.mm.mysql.Driver";
    private static Connection con;
    public static void main(String args[]) { 
         try{
              String url = "jdbc:mysql:/shop";
    con= DriverManager.getConnection(url +
    l + "?user=xxx&password=xxx"); ;
         } catch (SQLException ex) {
    // handle any errors
    System.out.println("SQLException: " +
    eption: " + ex.getMessage());
    System.out.println("SQLState: " +
    LState: " + ex.getSQLState());
    System.out.println("VendorError: " +
    rError: " + ex.getErrorCode());
         String sqlinsert;
         sqlinsert = "create table Person " +
         "(Namn varchar(32), " +
         "Pnr int, " +
         "Lon int, " +
         "Vikt int)";
         Statement stmt;***********************************************           
         try {
         Class.forName("dbdriver");
         } catch(java.lang.ClassNotFoundException e) {
         System.err.print("ClassNotFoundException: ");
         System.err.println(e.getMessage());
    I believe (someone correct me if I'm wrong), that this block of code has to be done before you do the code that you have above this block. The Class.forName call makes the DriverManager aware of the class to use as a driver to the database. The DriverManager can't make the connection to the database, because it doesn't know the driver class.
    Also, you have defined a variable dbdriver, BUT, when you are calling Class.forName, you're not using that variable. Why? Because you have "dbdriver", not dbdriver.
         try {
         stmt = con.createStatement();
         stmt.executeUpdate(sqlinsert);
         stmt.close();
         con.close();
         } catch(SQLException ex) {
    System.err.println("SQLException: " +
    " + ex.getMessage());
    }I would assume your code should look something like this (this might not be 100% right, but it's probably fairly close):
    import java.sql.*;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class CreateCoffees
       public static final String dbdriver = "org.gjt.mm.mysql.Driver";
       public static void main(String args[])
          Connection con=null;
          Statement stmt=null;
          try
             Class.forName(CreateCoffees.dbdriver);
             String url = "jdbc:mysql:/shop";           
             con= DriverManager.getConnection(url + "?user=xxx&password=xxx");  ;
             String sqlinsert = "create table Person " +
                "(Namn varchar(32), " +
                "Pnr int, " +
                "Lon int, " +
                "Vikt int)";
             Statement stmt = con.createStatement();
             stmt.executeUpdate(sqlinsert);
          catch(java.lang.ClassNotFoundException e)
          {  System.err.print("ClassNotFoundException: ");
             System.err.println(e.getMessage());
          catch (SQLException ex)
             // handle any errors
             System.out.println("SQLException: " + ex.toString());
             System.out.println("SQLState: " + ex.getSQLState());
             System.out.println("VendorError: " + ex.getErrorCode());
          finally
             try
             {  stmt.close();
                conn.close();
             catch(SQLException ex)
                System.out.println("SQLException: " + ex.toString());
                System.out.println("SQLState: " + ex.getSQLState());
                System.out.println("VendorError: " + ex.getErrorCode());
          }  // finally          
       }  // main
    }Hope that helps.
    Kevin

  • MySQL trying to connect my java program

    I am trying to write a java program that I can connect to a MySQL database on my compter. I have typed out this example that is in a text book I have and I am trying to connect my java program to a MySQL database. The version of MySQL is 4.1 which I have recently downloaded onto my computer and is working fine. The problem I am having is in ther places where it says "WHAT DO I ENTER HERE", basically the 'database.properties' , the 'jdbc.drivers' and the 'jdbc.url' string names. I do not know what I am supposed to enter. If you could give me some help with what I am supposed to enter or an example of a java program that already works with MySQL that would be of great help to me. A working example would be the greatest help to me .
    Thank-you.
    import java.sql.*;
    import java.io.*;
    import java.util.*;
    class TestDB
    public static void main (String args[])
      try
        Connection conn = getConnection();
        Statement stat = conn.createStatement();
        stat.execute("CREATE TABLE Greetings (Name CHAR(20))");
        stat.execute("INSERT INTO Greetings VALUES ('Hello World!')");
        ResultSet result = stat.executeQuery("Select * From Greetings");
        result.next();
        System.out.println(result.getString(1));
        result.close();
        stat.execute("DROP TABLE Greetings");
        stat.close();
        conn.close();
      catch (SQLException ex)
       while (ex != null)
         ex.printStackTrace();
         ex = ex.getNextException();
      catch (IOException ex)
       ex.printStackTrace();   
    public static Connection getConnection() throws SQLException, IOException
       Properties props = new Properties();
       FileInputStream in = new FileInputStream("WHAT DO I ENTER HERE");
       props.load(in);
       in.close();
       String drivers = props.getProperty("WHAT DO I ENTER HERE");
       if(drivers != null)
         System.setProperty("WHAT DO I ENTER HERE", drivers);
       String url = props.getProperty("WHAT DO I ENTER HERE");
       String username = props.getProperty("jdbc.username");
       String password = props.getProperty("jdbc.password");
       return
         DriverManager.getConnection(url, username, password);
    }

    public static Connection getConnection() throws SQLException, IOException {
       Properties props = new Properties();
       // It could be absolute or relative path.
       // If the properties file is in the same dir, use the name as shown below.
       FileInputStream in = new FileInputStream("database.properties");
       props.load(in);
       in.close();
       // It will load the driver String from properties
       String drivers = props.getProperty("jdbc.drivers");
       if(drivers != null)
         System.setProperty("jdbc.drivers", drivers);
         // If drivers are not set in properties, set them now.
       String url = props.getProperty("jdbc.url");
       String username = props.getProperty("jdbc.username");
       String password = props.getProperty("jdbc.password");
       return DriverManager.getConnection(url, username, password);
      }Have a look at the comments I inserted. :)

  • MySQL + Java doesn't work

    I've been trying to get a connection using MySQL and Java without luck, I've been messing with every solution I have found in google without luck. It worked the last time I used mysql + java a few months ago (in Ubuntu) but now I can't even get a connection.
    MySQL works with PHP, MySQL Administrator and CLI but I just can't get it to work with Java.
    Has anybody been able to run Java applications that use JDBC + MySQL in Arch?
    The stack trace I get is like the following and it changes a little bit if I use different versions of the Connector
    java.sql.SQLException: Server connection failure during transaction.
    Due to underlying exception: 'com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.io.EOFException
    STACKTRACE:
    java.io.EOFException
    at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1934)
    at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:483)
    at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:992)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2709)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:185)
    at MySQLConnectTest.main(MySQLConnectTest.java:12)
    Last edited by karmapolice (2007-05-22 20:48:25)

    http://bugs.archlinux.org/task/7256
    Added a bug report

  • How to Connect MySQL Database Through JTable?

    Hi,
    How to Connect MySQL Database Through JTable? anyone of u knows these concept please send me coding of that Part..
    Thanks,
    Guru..

    Start by reading the tutorials. There's a section on Swing which shows you how to use tables and a section on JDBC which shows you how to use SQL.
    And you can always search the forum as well since there are working examples of both posted on the forum.
    If you need further help with a specific problem then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
    Don't forget to use the [Code Formatting Tags|http://forum.java.sun.com/help.jspa?sec=formatting], so the posted code retains its original formatting.

  • How to connect Mysql to J2EE server exactly?

    Hi,there
    I would like thank you for offering me your precious opinion in advance.
    I got a problem with installing Mysql database into J2EE server. All I have done is:
    1.Install Mysql and put the Mysql driver,mm.mysql-2.0.4-bin.jar into the directory of J2EE which is j2ee1.3.1/lib.
    2. Set the environment variable for invoking the Mysql driver like
    this,CLASSPATH=.;%JAVA_HOME%\lib\mysql-connector-java-2.0.14-bin;%
    J2EE_HOME%\lib\mysql-connector-java-2.0.14-bin;%JAVA_HOME%\bin;
    3.Modify the content of Server.xml file located in J2EE directory like this:
    <DefaultContext>
    <Resource name="jdbc/mysql" auth="Container"
    type="javax.sql.DataSource" />
    <ResourceParams name="jdbc/mysql">
    <parameter>
    <name>driverClassName</name>
    <value>org.gjt.mm.mysql.Driver</value>
    </parameter>
    <parameter>
    <name>drivername</name>
    <value>jdbc:mysql:localhost:3306:mobiledb</value>
    </parameter>
    </ResourceParams>
    </DefaultContext>
    So far,I have no success in connect Mysql to J2EE server. What am I doing wrong?
    Thank you for your kind help.

    hi, sameer
    Thank you for reply. Could you tell me exactly the documents that you see? Do you mean "J2EE tutorial documents"?
    Thanks for advice.
    Revon

  • Connect MySQL to Coldfusion MX 7

    Hi,
    When I try to connect MySQL to Coldfusion MX 7, I get the
    following message:
    "Connection verification failed for data source:
    ColdFusion_conncn
    java.sql.SQLException: Communication failure during
    handshake. Is there a server running on localhost:3306?
    The root cause was that: java.sql.SQLException: Communication
    failure during handshake. Is there a server running on
    localhost:3306?"
    Is this because I downloaded MySQL via apache2Triad that came
    with bunch of stuff including apache and MySQL.
    What are the steps I have to take to ensure that the
    connection with MySQL works fine?
    Thanks for the help.
    K

    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6ef0253

  • Query from mySQL java.lang.NullPointerException

    I have compile and run the following code but it was an error (java.lang.NullPointerException) when I click the loginButton. Please help me, I don't know how to solve the problem.
    /* * Main.java * * Created on February 19, 2008, 2:50 AM */ package dataprotect; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import javax.swing.*; import javax.swing.JOptionPane; import dataprotect.SecretQuest; public class Main extends javax.swing.JFrame {         /** Creates new form Main */     private Connection connection;     private Statement statement;     private ResultSet rs; /** * * @author  Aiman */     public void connectToDB() {         try {             connection= DriverManager.getConnection("jdbc:mysql://localhost/data_protect?user=root&password=password");             statement = connection.createStatement();                     } catch (SQLException connectException) {             System.out.println(connectException.getMessage());             System.out.println(connectException.getSQLState());             System.out.println(connectException.getErrorCode());             System.exit(1);         }     }     private void init() {         connectToDB();     }             /** Creates new form Main */     public Main() {         initComponents();     }         /** This method is called from within the constructor to     * initialize the form.     * WARNING: Do NOT modify this code. The content of this method is     * always regenerated by the Form Editor.     */     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">                              private void initComponents() {         loginPanel = new javax.swing.JPanel();         userField = new javax.swing.JTextField();         passLabel = new javax.swing.JLabel();         passField = new javax.swing.JPasswordField();         loginButton = new javax.swing.JButton();         userLabel = new javax.swing.JLabel();         jLabel1 = new javax.swing.JLabel();         registerPanel = new javax.swing.JPanel();         regLabel = new javax.swing.JLabel();         registerButton = new javax.swing.JButton();         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);         setTitle("Data Protector");         loginPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));         passLabel.setText("Password:");         loginButton.setText("Login");         loginButton.addActionListener(new java.awt.event.ActionListener() {             public void actionPerformed(java.awt.event.ActionEvent evt) {                 loginButtonActionPerformed(evt);             }         });         userLabel.setText("Username:");         javax.swing.GroupLayout loginPanelLayout = new javax.swing.GroupLayout(loginPanel);         loginPanel.setLayout(loginPanelLayout);         loginPanelLayout.setHorizontalGroup(             loginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, loginPanelLayout.createSequentialGroup()                 .addContainerGap()                 .addGroup(loginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)                     .addComponent(userLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)                     .addComponent(passLabel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE))                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)                 .addGroup(loginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)                     .addComponent(loginButton)                     .addComponent(passField, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE)                     .addComponent(userField, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE))                 .addContainerGap())         );         loginPanelLayout.setVerticalGroup(             loginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)             .addGroup(loginPanelLayout.createSequentialGroup()                 .addContainerGap()                 .addGroup(loginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)                     .addComponent(userField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)                     .addComponent(userLabel))                 .addGap(16, 16, 16)                 .addGroup(loginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)                     .addComponent(passLabel)                     .addComponent(passField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 21, Short.MAX_VALUE)                 .addComponent(loginButton)                 .addContainerGap())         );         jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18));         jLabel1.setText("Data Protector");         registerPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());         regLabel.setText("If you are first user? Please register first.");         registerButton.setText("Register");         registerButton.addActionListener(new java.awt.event.ActionListener() {             public void actionPerformed(java.awt.event.ActionEvent evt) {                 registerButtonActionPerformed(evt);             }         });         javax.swing.GroupLayout registerPanelLayout = new javax.swing.GroupLayout(registerPanel);         registerPanel.setLayout(registerPanelLayout);         registerPanelLayout.setHorizontalGroup(             registerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)             .addGroup(registerPanelLayout.createSequentialGroup()                 .addGroup(registerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)                     .addGroup(registerPanelLayout.createSequentialGroup()                         .addGap(93, 93, 93)                         .addComponent(registerButton))                     .addGroup(registerPanelLayout.createSequentialGroup()                         .addGap(28, 28, 28)                         .addComponent(regLabel)))                 .addContainerGap(18, Short.MAX_VALUE))         );         registerPanelLayout.setVerticalGroup(             registerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, registerPanelLayout.createSequentialGroup()                 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)                 .addComponent(regLabel)                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)                 .addComponent(registerButton)                 .addContainerGap())         );         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());         getContentPane().setLayout(layout);         layout.setHorizontalGroup(             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)             .addGroup(layout.createSequentialGroup()                 .addContainerGap(72, Short.MAX_VALUE)                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)                     .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)                             .addComponent(registerPanel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)                             .addComponent(loginPanel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))                         .addGap(67, 67, 67))                     .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()                         .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)                         .addGap(114, 114, 114))))         );         layout.setVerticalGroup(             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)             .addGroup(layout.createSequentialGroup()                 .addContainerGap()                 .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)                 .addGap(15, 15, 15)                 .addComponent(loginPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)                 .addGap(25, 25, 25)                 .addComponent(registerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)                 .addGap(27, 27, 27))         );         pack();     }// </editor-fold>                            private void registerButtonActionPerformed(java.awt.event.ActionEvent evt) {                                              // TODO add your handling code here:   //      registerPanel a = new MainFrame();       //      a.show();                        this.setVisible(false);     }                                                  private void loginButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                            Connection conn = null;         Statement stmt = null;         ResultSet rs = null;           try {         Statement statement = connection.createStatement();         rs = statement.executeQuery("select username, password from system");                         // create a statement             stmt = conn.createStatement();             // extract data from the ResultSet                 String username = userField.getText();         String password = new String(passField.getPassword());         if(username.equalsIgnoreCase(password)) {             JOptionPane.showMessageDialog(this, "Login Successful");             SecretQuest a = new SecretQuest();             a.show();                        this.setVisible(false);   }         else{     JOptionPane.showMessageDialog(this, "Incorrect username/password combination.", "Login Error", JOptionPane.ERROR_MESSAGE);                 } } catch (Exception e) {             e.printStackTrace();             System.exit(1);         }     /*  try {                 java.sql.Statement s = conn.createStatement();                 java.sql.ResultSet r = s.executeQuery                 ("SELECT username, password FROM system");                 while(r.next()) {                         System.out.println (                                 r.getString("username") + " " +                                 r.getString("password") );                         }         }         catch (Exception e) {                 System.out.println(e);                 System.exit(0);                 } */     }                                                  /**     * @param args the command line arguments     */     public static void main(String args[]) {         java.awt.EventQueue.invokeLater(new Runnable() {             public void run() {                 new Main().setVisible(true);             }         });     }         // Variables declaration - do not modify                        private javax.swing.JLabel jLabel1;     private javax.swing.JButton loginButton;     private javax.swing.JPanel loginPanel;     private javax.swing.JPasswordField passField;     private javax.swing.JLabel passLabel;     private javax.swing.JLabel regLabel;     private javax.swing.JButton registerButton;     private javax.swing.JPanel registerPanel;     private javax.swing.JTextField userField;     private javax.swing.JLabel userLabel;     // End of variables declaration                      }
    I'm using mysql-connector-java-5.0.8 and mysql version 5.0...Any ideas?
    Thanks a lot for your help =)

    Its look can't solve the error..I try to change from:
    // create a statement
            stmt = conn.createStatement();
            // extract data from the ResultSetto this one as you said:
    // create a statement
            stmt = connection.createStatement();
            // extract data from the ResultSetBut the same problem was happen.
    After the error it appear this on output windows of NetBean 5.5:
    at dataprotect.Main.loginButtonActionPerformed(Main.java:198)
            at dataprotect.Main.access$000(Main.java:17)
            at dataprotect.Main$1.actionPerformed(Main.java:76)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
            at java.awt.Component.processMouseEvent(Component.java:6038)
            at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
            at java.awt.Component.processEvent(Component.java:5803)
            at java.awt.Container.processEvent(Container.java:2058)
            at java.awt.Component.dispatchEventImpl(Component.java:4410)
            at java.awt.Container.dispatchEventImpl(Container.java:2116)
            at java.awt.Component.dispatchEvent(Component.java:4240)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
            at java.awt.Container.dispatchEventImpl(Container.java:2102)
            at java.awt.Window.dispatchEventImpl(Window.java:2429)
            at java.awt.Component.dispatchEvent(Component.java:4240)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)Edited by: Aiman on Feb 25, 2008 5:43 AM

  • Connect MySQL with d2k

    Please help me to connect MySQL with Oracle developer 2000.

    i try to make a servlet which make the connection with
    mysql by jdbc. the compilation is good but when i
    execute i have :
    [root@ classes]# java FoncConnexion
    java.lang.NoSuchMethodError: main
    at
    at
    at
    t
    java.lang.Throwable.fillInStackTrace(Throwable.java:nat
    ve)
    at
    at java.lang.Throwable.<init>(Throwable.java:38)
    at java.lang.Error.<init>(Error.java:21)
    at
    at
    at
    t java.lang.LinkageError.<init>(LinkageError.java:21)
    at
    at
    at
    t
    java.lang.IncompatibleClassChangeError.<init>(Incompati
    leClassChangeError.java:21)
    at
    at
    at
    t
    java.lang.NoSuchMethodError.<init>(NoSuchMethodError.ja
    a:21)
    What does it mean?
    what can i do?
    ThanksIt means there is no main() method in your class. If you want to execute it, u have to create a main method first.

  • Live Connect and Java

    Hi All,
    I am a student working on my thesis which is is a Firefox exntension in which users can annotate(i.e. highlight) web content on any web site. I am using Liveconnect to connect javascript and java. All my methods work well, however I noticed an issue that crops up when I create a new instance of something.
    The error I get is in the Java console:
    Ignored exception: java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException
    the above only occurs for example:
    In my jar file I created a method to send an email:
    Part of the method contains the following:
    public static void main(String[] args) {
           smtp.connect();
           // login using gmail account details
           smtp.login(username,password);
           // create new email message
           EmailMessage message = new EmailMessage();
           message.setTo(to);
           message.setFrom(username);
    } If I comment out EmailMessage message = new EmailMessage() everything works fine, however if not, nothing in the jar file seems to work.
    could you please shed some light on this?
    It is pretty urgent and any input is greatly appreciated
    Kind regards
    Chris

    What is the best way to connect a Java application to
    a remote MySQL server?JDBC.
    I've tried JDBC already. It works great when the
    MySQL server is running on the same machine that the
    application is running on. However, when I specify
    the IP and port of the remote database, I can't
    connect.This usually happens because you haven't configured the security properly, or haven't understood how MySQL security works. It could be something else, though, based on the details you provided.
    I suppose I could have specified the wrong port. How
    can I get the port which the server is running on?Ask the person who set up the server. Or run netstat on the server if it's an orphaned system.
    If I am able to do this connection, are there any
    major security risks? Is there a better way to link
    an application to a remote database?Security risks? For the server or your program?

  • Problem create servlet connecting mysql

    Hello,
    I'm trying to create a servlet with JBuilder foundation.
    I've a java file, not included in the package of the JBuilder project and i want to deploi it on the Tomcat server (version 5.0). I 'Make' it and i deploy the .class.
    When i execute it I've the following driver error :
    java.sql.SQLException: No suitable driver
    I don't know what to do... :-(
    Thank you........
    My code:
    import java.io.*;
    import java.util.*;
    import java.net.*;
    import sun.beans.editors.IntEditor;
    import net.homeip.trv.util.*;
    import com.mysql.jdbc.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import com.mysql.jdbc.Statement;
    import com.mysql.jdbc.ResultSet;
    import java.util.Locale;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloWorldExample extends HttpServlet
    public void doGet(HttpServletRequest request,
    HttpServletResponse response) throws IOException, ServletException
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    //-------------------------------start MySQL connection-----------------------------
    ResultSet rs = null;
    String queryString = "";
    String url = "jdbc:mysql://localhost:3306/db_client";
    String user = "root";
    String password = "root";
    try
    Class.forName("com.mysql.jdbc.Driver");//.newInstance();
    catch (ClassNotFoundException ex2)
    String msg = "";
    Connection con = null;
    try
    con = (Connection) DriverManager.getConnection(url, user, password);
    catch (SQLException ex1)
    msg += ex1;
    }

    I've to deploy it in the same place of .class ?No, you should create a war (or ear) file, and place the driver jar in the correct location of that file.
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/WebComponents3.html
    Kaj

  • XLetview mysql java.lang.notFoundException

    I am programming for TV, I made a basic program that connects to my local database, but when run with the xLetView I get this error when running this line Class.forName ("org.gjt.mm.mysql.Driver ");
    mysql java.lang.notFoundException
    Place the mysql driver in the folder 'jars' of xLetview but nothing works.
    I work with a basic but not with the xLetView.
    Helpme!!!

    There is no such exception. What does the error message really* say? No guessing.

  • Error while connecting for Java to SAP

    Hi All,
    I am encountering the following error while connecting from Java to SAP through JCO:
    RFC_ERROR_LOGON_FAILURE: You are not authorized to logon to the target system
    I have checked the connection string and everything appears to be fine.
    Please let me know what the problem is.
    Regards,
    Rupesh.

    Hi rupesh,
    See this thread:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f3f93ee7-0c01-0010-2593-d7c28b5377c2
    Regards, Suresh KB

  • Oracle to connect MySQL

    Dear All,
    from couple of days I am trying to connect mysql from my oracle database.
    I have studied so many documentations and have created one of my own. I am just struck at one point.
    My oracle database is 11gR1 and CentOS 5.1 32-bit is the operating system.
    MySQL is on a windows based machine and version is 5.1.
    What I can do:
    I can connect MySQL from Linux using the command: isql –v bssdata <user> <password> [Connected]
    I can tnsping the listener using command: tnsping bssdata [OK]
    But after setting up what i did in the documentation below when I try to connect mysql using a DB link. It gives the following error:
    select * from bssdata.sta_mis_std_marks@bssdata
    Error at Command Line:1 Column:40
    Error report:
    SQL Error: ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    ORA-02063: preceding line from BSSDATA
    28500. 00000 - "connection from ORACLE to a non-Oracle system returned this message:"
    *Cause:    The cause is explained in the forwarded message.
    *Action:   See the non-Oracle system's documentation of the forwarded
    message.
    Please help me get out of this. Thank you very much
    Here are the details what i did:
    Install required packages
    Yum install mysql-connector-odbc
    Yum install unixODBC
    vi /etc/odbc.ini
    [bssdata]
    # myodbc3 = MySQL ODBC 3.51 Driver DSN
    # [myodbc3]
    Driver = /usr/lib/libmyodbc3.so
    Description = MySQL ODBC 3.51 Driver DSN
    SERVER = 192.168.0.68
    PORT = 3306
    USER = ******
    Password = ******
    Database = bssdata
    OPTION = 3
    SOCKET =
    vi /etc/odbcinst.ini
    # Example driver definitinions
    # Included in the unixODBC package
    #[PostgreSQL]
    #Description = ODBC for PostgreSQL
    #Driver = /usr/lib/libodbcpsql.so
    #Setup = /usr/lib/libodbcpsqlS.so
    #FileUsage = 1
    # Driver from the MyODBC package
    # Setup from the unixODBC package
    [MySQL]
    Description = ODBC for MySQL
    Driver = /usr/lib/libmyodbc3.so
    Setup = /usr/lib/libodbcmyS.so
    FileUsage = 1
    Test Connection
    isql –v bssdata ****** ******
    Editing listener.ora file to add entry
    # listener.ora Network Configuration File: /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = blissglb.abc.edu.pk)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /u01/app/oracle/product/11.1.0/db_1)
    (PROGRAM = extproc)
    (SID_DESC =
    (PROGRAM = dg4odbc)
    (ORACLE_HOME = /u01/app/oracle/product/11.1.0/db_1)
    (SID_NAME = bssdata)
    (ENVS=LD_LIBRARY_PATH = /usr/local/lib:/u01/app/oracle/product/11.1.0/db_1/odbc)
    Restart listener
    Lsnrctl> stop
    Lsnrctl> start
    Test listener
    tnsping bssdata
    Editing tnsnames.ora file in network directory of oracle
    # tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.
    BLISSGLB =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = blissglb.abc.pk)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = blissglb.abc.edu.pk)
    BSSGLB, BSSGLB.abc.EDU.PK =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.24)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = bssglb.abc.edu.pk)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
         (ADDRESS_LIST =
              (ADDRESS =
                   (PROTOCOL = IPC)
                   (KEY = EXTPROC1521)
         (CONNECT_DATA =
              (SID = PLSExtProc)
              (PRESENTATION = RO)
    bssdata =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.66)(PORT = 1521))
    (CONNECT_DATA =
    (SID = bssdata)
    (HS = OK)
    Edit Oracle’s bash_profile
    # .bash_profile
    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
    . ~/.bashrc
    fi
    # User specific environment and startup programs
    ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
    export ORACLE_HOME
    ORACLE_SID=blissglb
    export ORACLE_SID
    ORACLE_BASE=/u01/app/oracle
    export ORACLE_BASE
    LD_LIBRARY_PATH=/usr/local/lib:/u01/app/oracle/product/11.1.0/db_1/lib
    export LD_LIBRARY_PATH
    ODBCINI=/etc/odbc.ini
    export ODBCINI
    ODBCSYSINI=/etc
    export ODBCSYSINI
    PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
    export PATH
    unset USERNAME
    Configure file db_1/hs/admin/inithsodbc.ora
    # This is a sample agent init file that contains the HS parameters that are
    # needed for the Database Gateway for ODBC
    # HS init parameters
    #HS_FDS_CONNECT_INFO = <odbc data_source_name>
    #HS_FDS_TRACE_LEVEL = <trace_level>
    #HS_FDS_SHAREABLE_NAME = <full path name of odbc driver manager or driver>
    HS_FDS_CONNECT_INFO = bssdata
    HS_FDS_TRACE_LEVEL = off
    HS_FDS_SHAREABLE_NAME = /usr/lib/libmyodbc3.so
    # ODBC specific environment variables
    #set ODBCINI=<full path name of the odbc initilization file>
    set ODBCINI=/etc/odbc.ini
    # Environment variables required for the non-Oracle system
    set <envvar>=<value>
    Create Database Link
    Create database link bssdata connect to ****** identified by ******** using ‘bssdata’
    Using selection query
    Select * from bssdata.sta_mis_std_marks@bssdata {Here comes the error described above}
    Regards,
    Imran

    Hi ,
    i am facing the same issue.
    These are my findings at this moment.
    By looking at http://www.pythian.com/news/1554/how-to-access-mysql-from-oracle-with-odbc-and-sql/ we can see that :
    "Connector ODBC 5.1. The Oracle Gateway for ODBC checks/relies on some features, such as the ODBC descriptor, that are not available in 3.51. You can check the associated documentation and bug 32692 for some details about SQLSetDescRec"
    So we have a bug related to SQLSetDescRec missing from the libmyodbc3.so library.
    We can check this as follows :
    [oracle@log]$ nm -D /usr/lib64/libmyodbc3.so | fgrep SQLMoreResults
    0000000000017c70 T SQLMoreResults
    [oracle@log]$ nm -D /usr/lib64/libmyodbc3.so | fgrep SQLSetEnvAttr
    0000000000016c40 T SQLSetEnvAttr
    [oracle@log]$ nm -D /usr/lib64/libmyodbc3.so | fgrep SQLSetDescRec
    No output for SQLSetDescRec.
    Now i have to see how can i get over this bug.
    Regards,
    George

  • Crystal Reports data connection using Java beans

    Hi
    My name is Bach Ong, i'm currently perform re-configuring Crystal reports 2008 to connect via
    Java bean to Jboss server, this uses look up service on JBoss server. The connection is using Connect
    look up using the properties:
    java.naming.provider.url=jnp://emgsydapp121:10499
    java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
    java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
    for file CRConfig.xml i put as follows:
    <JDBCURL></JDBCURL>
    <JDBCClassName></JDBCClassName>
    <JDBCUserName></JDBCUserName>
    <JNDIURL>jnp://emgsydapp121:10499</JNDIURL>
    <JNDIConnectionFactory>org.jnp.interfaces.NamingContextFactor
    y</JNDIConnectionFactory>
    <JNDIInitContext>/</JNDIInitContext>
    <JNDIUserName></JNDIUserName>
    Can you advise us if this step is correct, and is there any
    documentation that can guide us to right direction.
    for Java testing in Eclipse using remote call class it is working suing the following code:
            Properties p = new Properties();
            p.put(Context.INITIAL_CONTEXT_FACTORY,
            "org.jnp.interfaces.NamingContextFactory");
            p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
            p.put(Context.PROVIDER_URL, "jnp://emgsydapp121:10499");
             InitialContext ctx = new InitialContext(p);
      Date asAtDate = CrystalUtils.convertToDate("2014-01-01", CrystalUtils.relativeToToday(0), false);
         String asxCode = "BHP";
         ClosingPricesReportRequest criteria = new ClosingPricesReportRequest(asAtDate, asxCode);
         InitialContext context = new InitialContext(p);
         ClosingPricesReportService ejb = (ClosingPricesReportService) context.lookup(ClosingPricesReportService.REMOTE_JNDI);
         ClosingPricesReport report = ejb.createMTMClosingPriceReport(criteria);
         System.out.println(report.getClosingPrices()[0].getClosingPrice());
         testval = report.getClosingPrices()[0].getClosingPrice().toString();
         System.out.println(testval);
    when i run the tes code the results as follow:
    10:49:45,244 DEBUG [SecurityAssociation ] Using ThreadLocal: false
    10:49:45,338 DEBUG [MicroSocketClientInvoker ] SocketClientInvoker[709446e4, socket://emgsydapp121:10473] constructed
    10:49:45,338 DEBUG [MicroRemoteClientInvoker ] SocketClientInvoker[709446e4, socket://emgsydapp121:10473] connecting
    10:49:45,338 DEBUG [MicroSocketClientInvoker ] Creating semaphore with size 50
    10:49:45,338 DEBUG [MicroRemoteClientInvoker ] SocketClientInvoker[709446e4, socket://emgsydapp121:10473] connected
    10:49:45,369 DEBUG [ClientSocketWrapper ] reset timeout: 0
    10:49:45,650 DEBUG [InvokerRegistry ] removed SocketClientInvoker[709446e4, socket://emgsydapp121:10473] from registry
    10:49:45,650 DEBUG [MicroSocketClientInvoker ] SocketClientInvoker[709446e4, socket://emgsydapp121:10473] disconnecting ...
    10:49:45,650 DEBUG [SocketWrapper ] ClientSocketWrapper[Socket[addr=/10.137.2.40,port=10473,localport=64150].2cba5bdb] closing
    37.99000000000000198951966012828052043914794921875
    37.99000000000000198951966012828052043914794921875
    Can anyone assist me in convert the above settings to get access by Crystal reports.
    My attemp current are below:
    public class CFDClosingPricesRpt extends CrystalReport {    
        //Constructor
        public CFDClosingPricesRpt(){
            super(ClosingPriceBean.INSTANCE);
         * Returns the ResultSet for this report to Crystal.
         * @param asxCode
         * @param asAtDateString
         * @return
    public ResultSet getNewReport(String asxCode, String asAtDateString) {                     
         try {
             Properties p = new Properties();
             p.put(Context.INITIAL_CONTEXT_FACTORY,
             "org.jnp.interfaces.NamingContextFactory");
             p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
             p.put(Context.PROVIDER_URL, "jnp://emgsydapp121:10499");
             //InitialContext ctx = new InitialContext(p);
             clearCachedReportBeans();     
       Date asAtDate = CrystalUtils.convertToDate("2013-01-01", CrystalUtils.relativeToToday(0), false);
          asxCode = "BHP";
          ClosingPricesReportRequest criteria = new ClosingPricesReportRequest(asAtDate, asxCode);
          //ClosingPricesReportService ejb = (ClosingPricesReportService) ctx.lookup(ClosingPricesReportService.REMOTE_JNDI);
          ClosingPricesReportService ejb = (ClosingPricesReportService) ServiceLocator.getInstance().getService(ClosingPricesReportService.REMOTE_JNDI);           
          ClosingPricesReport report = ejb.createClosingPriceReport(criteria);
          // assemble Crystal-friendly DTO
          Collection closingPrices = Arrays.asList(report.getClosingPrices());
          for (Iterator iter = closingPrices.iterator(); iter.hasNext();) {
                    MBLXClosingPrice cp = (MBLXClosingPrice) iter.next();               
                    if (cp==null) continue;               
                    addReportBean(new ClosingPriceBean( report.getSuppliedDate(),
                                cp.getClosingPrice(),
                                cp.getAsxCode()));
      } catch (Throwable x) {     
          saveErrorMessage(x);
      return getAsResultSet();             
    Thanks
    Bach Ong

    Hi Don Thanks for the reply.
    I've was able to connect via Java beans and JNDI. But this one is going the JNDI of JBoss sever, which the JNDI already configure and working for Crystal reports v10.
    Bach

Maybe you are looking for

  • Can anyone share with me how you  write Javadoc?

    Can anyone share with me how their companies write Javadoc? Are your developers solely responsible for it? Do your technical writers own it or review it? How do you make sure it's good? Right now, my software developers are mostly responsible for wri

  • Signing a Document using Custom PKCS#11 and Hardware Token

    I am using a custom PKCS#11 dynamic library and a hardware token to sign a document in Adobe Acrobat 10. I encountered this error when I used the Standard Text as the Appearance of the Signature. Creation of this signature could not be completed. Unk

  • Asking to continue my "Trial" every time I open a new file.

    I am a Adobe Crfeative cloud member.  Since I updated my Acrobat XI pro  am asked to continue my "trial" period everytime I open a file!  What happened.  It use to work great.  Thanks.

  • File to RFC/IDOC with a set of business rules applied on every record

    Hi experts, i have a scenario where the following happens checks need to be performed 1. Technical validations on the file picked up (Can be done through java programs) 2. Business rules to be applied on every record (Am not sure if this can be done

  • Fail to restor

    Hello, I'm a newbie here... Maybe someone could help me out with my problem for the ipod shuffle. I tried to restor it to factory but getting error message. I just download the new ipod software update 2006-01-10. Im able to bring up the software fin