Problam using RMI with JDBC

hi all
I have build a server & client that work on RMI
when i try to retrive the data from a DB using JDBC:ODBC i have a premission Error
can any one help me with it
one Eyed willy

When you start Remote object, you need to provide codebase and policy like below:
java -Djava.rmiserver.codebase=http://myhost/..../ -Djava.security.policy=policy RemoteObject
your policy file is like
grant
// Allow everything for now
permission java.security.AllPermission;
// allows anyone to listen on un-privileged ports
permission java.net.SocketPermission "*:1024-65535", "listen,accept,connect";
please refer to www.java.sun.com/j2se/1.4.2/docs/guide/rmi/codebase.html
Hope help you.
Aung.

Similar Messages

  • RMI with JDBC

    Hello,
    this is the first time that I work with RMI.
    In fact it isn't so hard.
    But I've made an interface that do the operations on my database.
    Do I also have to program a locking mechanism?
    Does anybody made such a system, or what do you recommand.
    I want to make a simpel program that uses a database on another pc.
    tnx

    Hi Twims
    Im asking if you could make me a favor... As I can see you know RMI with JDBC... And at this moment I need a client and server programs to connect to a database, execute SQL commands and retrieve information to client.
    If you could send me those programs please do it to [email protected] or [email protected]
    Thanks in advance
    ANDRES GONZALEZ

  • RMI with  JDBC program

    i want a program RMI with JDBC code included.

    Java RMI programs for implementing Author Registration.
    /* File Name : AuthorServerint.java
    Java Remote Interface for implementing Author Registration
    import java.rmi.*;
    public interface AuthorServerint extends java.rmi.Remote
              public void Update_Details(String autid, String name,String
                   title,String street, String city, String state, int pin)
                   throws java.rmi.RemoteException;
    File Name : AuthorServerimpl.java
    Java Interface implementation and Server program for implementing
    Author Registration
    import java.rmi.*;
    import java.sql.*;
    import javax.swing.*;
    public class AuthorServerimpl extends java.rmi.server.UnicastRemoteObject
              implements AuthorServerint
              static Connection con;
              static PreparedStatement ps;
              static ResultSet rs;
              static Statement st;
              int in;
              public AuthorServerimpl() throws java.rmi.RemoteException
                   super();
              public static void main(String args[])throws Exception
                   try{
                        AuthorServerint As=new AuthorServerimpl();
                        Naming.rebind("rmi://localhost/As",As);
                        System.out.println("Server ready");
              catch(Exception e){
                   System.out.println(e);
         public void Update_Details(String autid, String name,String
                   title,String street, String city, String state, int pin)
                   throws java.rmi.RemoteException
                   try{
                        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                        con=DriverManager.getConnection("Jdbc:Odbc:data");
                        st=con.createStatement();
                        if(autid.equals("") || name.equals("") || title.equals("") ||
                             street.equals("") || city.equals("") || state.equals(""))
                             JOptionPane.showMessageDialog(null,"Fill all the entries");
                        else{
                             in=st.executeUpdate("insert into Author values ('" autid
                                  "','"+name+"','"+title+"','"+street+"','"+ city+
                                  "','"+state+"','"+pin+"')");
                             if(in>0){          
                                  JOptionPane.showMessageDialog(null,"Data Updated");
                   catch(Exception e){}
    File Name : Authorclient.java
    Java Client program for implementing Author Registration
    import java.rmi.*;
    import java.io.*;
    import java.rmi.Naming;
    import java.sql.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    public class Authorclient extends JFrame implements ActionListener
              static JTextField tautid,tname,ttitle,tstreet,tcity,tstate,tpin;
              JLabel lautid,lname,ltitle,lstreet,lcity,lstate,lpin;
              static JButton Badd,Exit,Bclear;
              String autid,name,title,street,city,state;
              int pin;
              Authorclient()
                   Container C=getContentPane();
                   C.setLayout(new GridLayout(9,2));
                   lautid=new JLabel("Author Id");
                   lname=new JLabel("Author Name");
                   ltitle=new JLabel("Title");
                   lstreet=new JLabel("Street");
                   lcity=new JLabel("City");
                   lstate=new JLabel("State");
                   lpin=new JLabel("Pincode");
                   tautid=new JTextField(10);
                   tname=new JTextField(10);
                   ttitle=new JTextField(10);
                   tstreet=new JTextField(10);
                   tcity=new JTextField(10);
                   tstate=new JTextField(10);
                   tpin=new JTextField(10);
                   Badd=new JButton("SUBMIT");
                   Exit=new JButton("EXIT");
                   Bclear=new JButton("CLEAR");
                   Badd.addActionListener(this);
                   Exit.addActionListener(this);
                   Bclear.addActionListener(this);
                   C.add(lautid);
                   C.add(tautid);
                   C.add(lname);
                   C.add(tname);
                   C.add(ltitle);
                   C.add(ttitle);
                   C.add(lstreet);
                   C.add(tstreet);
                   C.add(lcity);
                   C.add(tcity);
                   C.add(lstate);
                   C.add(tstate);
                   C.add(lpin);
                   C.add(tpin);
                   C.add(Bclear);
                   C.add(Badd);
                   C.add(Exit);
                   setVisible(true);
                   resize(300,300);
         public void actionPerformed(ActionEvent ae)
                   if(ae.getActionCommand().equals("SUBMIT"))
                        try{
                             AuthorServerint A=(AuthorServerint)Naming.lookup ("rmi://
                                  localhost/As");
                             autid=tautid.getText();
                             name=tname.getText();
                             title=ttitle.getText();
                             street=tstreet.getText();
                             city=tcity.getText();
                             state=tstate.getText();
                             pin=Integer.parseInt(tpin.getText());
                             A.Update_Details(autid,name,title,street,city,state,pin);
                        catch(Exception E){}
                   else if(ae.getActionCommand().equals("EXIT"))
                        System.exit(0);
                   else if(ae.getActionCommand().equals("CLEAR"))
                        tautid.setText("");
                        tname.setText("");
                        ttitle.setText("");
                        tstreet.setText("");
                        tcity.setText("");
                        tstate.setText("");
                        tpin.setText("");
         public static void main(String args[])
                   new Authorclient();
    note: this program is done using swing components and need a database to run. The fields of the table("Author") database("data") are the same as the variable used in "Update_Details" function.
    Edited by: Amar on Oct 30, 2007 12:11 PM

  • ORA-03115 Error using CLOB with JDBC

    When I try to access CLOB field data with JDBC driver, I gets following error:
    ORA-03115: unsupported network datatype or representation.
    I am using JDBC 8.1.6(Thin), Oracle 8.0.5
    on Linux OS.
    what's the problem ?
    Thank you for any help.
    Taesoo.
    null

    if it is a bug, then its better to upgrade the database to 10.2.0.4. it is the stable verion in 10g.

  • Using OS_ROLES with JDBC Driver

    I can't get my JDBC connections to pick-up the OS ROLES I have configured. Does the OCI driver support OS Roles?
    I'm using 10gR2 with latest JDBC drivers, running on Windows XP.
    If I connect locally with sqlplus then the roles are established correctly. However, establishing the 'equivalent' connection from Java yields a user with no ROLEs defined, i.e. they are not being picked-up from the OS.
    Is there a trick or is it not supported?
    I believe I have the database and the OS groups setup correctly and, as I say, it works fine with a sqlplus connection.
    If anyone either knows how to do, or knows that its not supported then please let me know.
    Thanks,
    Richard.

    to my knowledge this is not supported in jdbc specification2.0 and 3.0 and jdbc drivers are complied to this standards.
    connecting with sql client is entirely different with the connection using java thin drivers.
    thanks,
    Ruchir

  • Can we use SQLScripts with jdbc?

    can we use the SQLScripts with jdbc?
    if possible please give some information on that.

    no, Its not possible
    prem

  • Running/ Using RMI  with JDevelope 9.0.4

    I am trying to learn to use RMI (Remote Method Invocation), have used the example found in Deitel and Deitel, only I've come to run them and the examples on running the application suggests one method.
    I'm wondering if JDeveloper has a quick, easy way to run or use RMI within applications

    OC4J provides the proprietary Remote Method Invocation (RMI)/Oracle RMI (ORMI) protocol.
    http://www.comp.hkbu.edu.hk/docs/o/dl/web/B10326_01/ormi.htm#1030532

  • How to use setCLOB with JDBC.

    Hi,
    from oracle jdbc document, i know how to use getClob method. but i wonder how to insert a new record included a clob field (setClob). but clob is an interface.
    it seem that it can not be successful to use setclob directly.
    my friend has a way : insert an empty clob into database, then seek this record, and update it with full info again.
    please help me!
    thank in advance.
    wu jianhua.

    A few ways:
    1. Use the LOBs got from a ResultSet, for example,
    Clob x = rs.getClob(1); //you get an oracle.sql.CLOB object
    pstmt.setClob(1, x);
    2. use oracle.sql.CLOB
    public static CLOB empty_lob() throws SQLException;
    creates an empty lob.
    public static BLOB createTemporary(Connection conn, boolean isCached, int
    duration);
    creates temp lob.
    Those methods create object of type oracle.sql.CLOB.
    refer to Oracle jdbc doc for this.

  • Using Applets with JDBC

    I am developing a Java app that requires access to a RDBMS. I'm having good success connecting to the DB as a Java app but when I try to run it as an applet, I'm getting the following SQLException error:
    "No suitable driver"
    I have created a policy file that grants me the required RuntimePermission and PropertyPermission. Any idea what else I'm missing?
    Thanks,
    PjR

    Cannot get a connection to the database. <-- my code
    No suitable driver <-- SQLException.getMessage()
    Exception occurred during event dispatching: <-- stackTrace
    java.lang.NullPointerException
    at DbaApplet.actionPerformed(DbaApplet.java:76)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:14
    50)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
    ctButton.java:1504)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
    .java:378)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
    istener.java:216)
    at java.awt.Component.processMouseEvent(Component.java:3717)
    at java.awt.Component.processEvent(Component.java:3546)
    at java.awt.Container.processEvent(Container.java:1164)
    at java.awt.Component.dispatchEventImpl(Component.java:2595)
    at java.awt.Container.dispatchEventImpl(Container.java:1213)
    at java.awt.Component.dispatchEvent(Component.java:2499)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
    at java.awt.Container.dispatchEventImpl(Container.java:1200)
    at java.awt.Component.dispatchEvent(Component.java:2499)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:319)
    at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:10
    3)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)

  • How can i Use SERVLET with RMI to avoid trust certificate

    I know that for begining RMI, you must launch the server and the client.
    for the server i use :
    java -Djavax.net.ssl.trustStore=server.keystore -Djavax.net.ssl.keyStore=server.keystore -Djavax.net.ssl.keyStorePassword=server TestServer
    for the client I use :
    java -Djavax.net.ssl.trustStore=client.keystore -Djavax.net.ssl.keyStore=client.keystore -Djavax.net.ssl.keyStorePassword=client TestClient
    and all work fine.
    but i want to use a servlet for rmi client and i wrote this:
    public class AppelServlet extends HttpServlet
         public void doPost(HttpServletRequest request, HttpServletResponse response)
         throws ServletException, IOException
              try
                   System.out.println("Registering secure RMI socket factory ...");
                   java.rmi.server.RMISocketFactory.setSocketFactory(new SecureRMISocketFactory());
              TestRemote test = (TestRemote) Naming.lookup("rmi://127.0.0.1:7123/TestClient");
    String reponse=test.toLowerCase("HELLO WORLD");
                   System.out.println("la reponse est : "+reponse);
         catch (Exception e)
              System.out.println("test client exception: " +e);
    PrintWriter out = response.getWriter();
              response.setContentType("text/html");
    and i have the following error on tomcat:
    Registering secure RMI socket factory ...
    test client exception: java.rmi.ConnectIOException: error during JRMP connection
    establishment; nested exception is:
    javax.net.ssl.SSLHandshakeException: Couldn't find trusted certificate
    i think i must precise how to indicate the truststore like in the first case.
    help me please.
    hamdi

    Hi,
    Try doing the following steps.
    Assuming you have a certificate obtained
    Export the certificate into a .cer file.
    On IE, goto tools->internet options->content->certificates, and export to a .cer file.
    Using keytool of java import the certificate to the store that can be used doing the following command.
    keytool -import -alias <ailas> -file < .cer filename> -keystore <storename here>
    set the javax.net.ssl.trustStore and javax.net.ssl.trustStorePassword properties at the command prompt using the command below.
    java -Djavax.net.ssl.trustStore=<storename> -Djavax.net.ssl.trustStorePassword=<password> <classname>
    Let me know if this helped.
    Also take a look at this link for using RMI with SSL
    http://java.sun.com/products/jdk/1.2/docs/guide/rmi/SSLInfo.html
    Regards,
    Roopasri Vittal
    Developer Technical Support
    Sun Microsystems
    http://sun.com/developers/support

  • Using JCheckBox/JComboBox with JDBC

    hello.
    i was just wondering does any of you have links to web pages that include tutorials (and source code) on using JCheckBox with JDBC. would any of you who have experience with using JCheckBox and JDBC together be able to give me a few tips on how to select certain data from a table using JCheckBox and JButton? (examples of such data could be CD/DVD/Game data - i want users of my video library system to be able to view CD/DVD/Game information by name, age category, type and year)
    thank you very much for your help.

    hello.
    Thanks for the replies. I�m wondering do any of you
    have links to web pages that include tutorials and
    source code on using JCheckBox, JButton and JTextArea
    with JDBC. Wow, another person who's never heard of Google. Amazing!
    would any of you who have experience with
    using JCheckBox, JButton, JTextArea and JDBC together
    be able to give me a few tips on how to select
    certain data from a table using JCheckBox + JButton
    and display the data in a JTextArea? examples of such
    data could be CD/DVD/Game data - i want users of my
    video library system to be able to view CD/DVD/Game
    information by name, age category, type and year.
    Users should be able to click on a check box (e.g.
    view by name, age category, type or year) and press a
    button. What would happen then is that data would
    appear in the text area (which could be placed
    beneath the check box + button inside a frame).
    thanks for the help.Find the tutorials, go through them, then come back here when you have a specific problem you need help with. Yes we have experience in these areas, but we're not going to post links and code here just because you're too lazy to use Google and find it yourself.

  • A problem in RMI with JSP..pls help

    RMI with Java is working fine,but...
    1. I am facing a problem when i use RMI with JSP..its throwing an exception during "Naming.lookup"..here is my code snippet:
    // i have stored the ServerInf and other classes in a package and i have imported it in the jsp code....object ref is getting created but lookup is throwing an exception...thoguh RMI registry is working(started)
    <%
    try {
    ServerInf ref = (ServerInf)Naming.lookup("rmi://localhost:1098/Server_bind");
    catch (Exception ex) {
    ex.printStackTrace();
    %>
    Pls tel me the cause.
    2. If i try to use RMI with Servlet and JSP, then wen the JSP runs then, it simply calls the servlet file and displayes a lonk to it instead of executing the servlet class. pls help me with this too...below is the invoking statement:
    <form method=post action='http://localhost:8080/servlet/MyRMIservlet'>
    hello <input type=submit value=submit>

    And the exception and error message is.....

  • RMI with SSL problem (cross post under RMI too)

    Hi,
    I'm having problems using RMI with SSL. I posted in the RMI forum originally but now realise the problems are with the SSL really.
    Perhaps someone who follows this forum could help.
    See post:
    http://forum.java.sun.com/thread.jsp?forum=58&thread=409347
    Thanks.

    There's more dukes in the other thread too.

  • Help needed with JDBC - please help! (newbie)

    hi all
    i m new to jdbc
    i have installed MySQL server on my winxp machine
    i used the command:
    mysql -p -u root
    Enter password: ****now when writing a prog i m getting a prob at this piece of code:
    Connection con=DriverManager.getConnection("jdbc:odbc:books","root","root");wot is wrong wid this code?
    please help......
    thanks in advance

    There are about 20 different things that could be wrong a this point; I'm not going to list them all. If you want specific help, you need to post specific information. This is usually done by posting either a stack trace from an exception, or a more complete section of code and a description of the problem and ALL the symptoms. You have all the information on what you've done, we have none of it.
    Instead of trying to diagnose whats wrong with your ODBC setup, I'm going to give you some strong advice; don't use ODBC with JDBC if you can avoid it, and with MySQL you can avoid it. It makes things simpler, less can go wrong, and you don't have to configure a DSN on every machine that you install the program on.
    To use "pure" JDBC without ODBC for MySQl:
    1) download the JDBC driver (you might already have this)
    http://dev.mysql.com/downloads/connector/j/3.1.html
    2) follow the installation instructions
    http://dev.mysql.com/doc/refman/5.0/en/java-connector.html
    In particular, make sure your classpath is set correctly
    3) Here's an example of loading the driver and establishing a connection
    http://dev.mysql.com/doc/refman/5.0/en/cj-connect-with-drivermanager.html
    Note the form of the connection URL,
    "jdbc:mysql://localhost/test?user=monty&password=greatsqldb"
    This is what an URL without ODBC looks like; there is no DSN, which means no DSN has to be configured.
    4) The MySQL database has some built-in security, to prevent malicious connections from outside computers. Solutions to that and other common problems are here:
    http://dev.mysql.com/doc/refman/5.0/en/cj-faq.html

  • Issues while configuring java application using JDO with MS JDBC Driver 1.0

    We are in the process of configuring our java application with the production version of SQL Server 2005 Java Database Connectivity (JDBC) Driver 1.0. We are facing issues getting it to work with Sun App Server using JDO concept.
    After creating the data store, adding the JDBC driver to the application server classpath through console and also copying the driver into the lib directory, we are still getting the below error.
    Following is the stack trace encountered while running the application
    [#|2006-02-15T10:21:25.493+0530|WARNING|sun-appserver-pe8.1_02|javax.enterprise.system.container.ejb.entity.finder|_ThreadID=30;|JDO74010: Bean 'InventoryEJB' method ejbFindAllInventoryItems: problems running JDOQL query.
    com.sun.jdo.api.persistence.support.JDOFatalInternalException: JDO76519: Failed to identify vendor type for the data store.
    NestedException: java.sql.SQLException: Error in allocating a connection. Cause: javax.transaction.SystemException
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManagerFactory.initializeSQLStoreManager(SQLPersistenceManagerFactory.java:870)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManagerFactory.getFromPool(SQLPersistenceManagerFactory.java:786)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManagerFactory.getPersistenceManager(SQLPersistenceManagerFactory.java:673)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:849)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:681)
         at com.sun.j2ee.blueprints.supplier.inventory.ejb.InventoryEJB1142755294_ConcreteImpl.jdoGetPersistenceManager(InventoryEJB1142755294_ConcreteImpl.java:530)
         at com.sun.j2ee.blueprints.supplier.inventory.ejb.InventoryEJB1142755294_ConcreteImpl.ejbFindAllInventoryItems(InventoryEJB1142755294_ConcreteImpl.java:146)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:147)
         at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:185)
         at $Proxy164.findAllInventoryItems(Unknown Source)
         at com.sun.j2ee.blueprints.supplier.inventory.web.DisplayInventoryBean.getInventory(Unknown Source)
         at org.apache.jsp.displayinventory_jsp._jspService(displayinventory_jsp.java:119)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:482)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:417)
         at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:80)
         at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:95)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:313)
         at com.sun.j2ee.blueprints.supplier.inventory.web.RcvrRequestProcessor.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:185)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
    Can anyone help me on this issue?
    Regards,
    Bindu

    I have already tried this before and this not work too, but strange that even if I use JDBC:ODBC bridge driver, the return value for output parameters are not correct, that is, only return the value that I input but not the value after executed in the procedure....
    The code that I used with JDBC:ODBC bridge is as follow:
    public static void main(String[] args) {
    String url = "jdbc:odbc:;DRIVER=SQL Server;Persist Security Info=False;database=db;Server=sql;uid=sa;pwd=pwd";
              Connection con;
              ResultSet rs = null;
    CallableStatement callS = null;
              try {
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              } catch(java.lang.ClassNotFoundException e) {
                   System.err.print("ClassNotFoundException: ");
                   System.err.println(e.getMessage());
              try {
                   con=DriverManager.getConnection(url);
    callS = con.prepareCall("{ call dbo.CpJavaTest (?)}");
    callS.registerOutParameter(1, Types.INTEGER);
    callS.execute();
    rs=callS.getResultSet();
    int ret = callS.getInt(1);
    System.out.println("return value : " + ret);
                   while (rs.next()) {
                        String f1 = rs.getString(4);
                        String f2 = rs.getString(5);
                        System.out.println(f1 + " " + f2);
              } catch(SQLException ex) {
                   System.out.println("SQLException: " + ex.getMessage());
    The value of the output parameter is same as what I inputed! Hope any one can teach me how to correct it...
    Thank you very much!

Maybe you are looking for

  • How can I display the descriptor column from a view in my BR message

    I have a table, Memberships, that contains a column for staff id. The staff data is on a remote database and I have created a view to access the required data. I have set the descriptor sequence for the name column of the staff view but the BR still

  • MSI GD65 - Win7 64 Prof. Random freezes

    Edit: Setting DRAM Voltage to 1.65V instead of 1.5V seems to help a lot! Edit: BIOS 1.6 is giving hopeful results for automatic OC (Genie) too. In an attempt to aggregate the information on this, topics that seem to be related (to me): https://forum-

  • I don't need the full package. Is there an easy way to change from the full to photographer's package?

    I'm trying to save money and realize that I don't need the full package. I wanted to just change over to photographer's pack with just Lightroom and Photoshop but I seem to be missing the way to do that through my account. Is there an easier way?

  • Database Link and error ORA-02019

    Oracle 9.2.0.6 on Windows 2003 Has anybody encountered this before and been able to resolve. SQL> connect SchemaA/password@NSN1 SQL> create database link MyLink1 2 connect to REMDB identified okm135 3 using 'STAF' 4 / Database link created. SQL> crea

  • FB70 - Invoice posting - COKA buffer not found

    Dear all Due to unknown reason, while posting customer invoice in a specific company code for all revenue GL accounts we are getting Error message by "Internal error: Entry in COKA-Buffer not found". We are unable to trace the source of this problem