Re: a question for  a JDBC guru  (dynamic dsn with runtime exec)

as usual just as i give up and decide to post for help, I solve my problem.
instead of:
r.exec( copy );
use:
try{
Process p = r.exec(copy);
p.waitFor();
}catch(interuptedexception i){
System.out.println("doh");

Mike,
Good evening. Thank you for your recognition. I like more practical examples - you can
get the point faster. This is the reason I decided to invest some of my time in maintaining
this application online and answering the questions related to it.
Regarding your question. I think this is what you are looking for:
http://htmldb.oracle.com/pls/otn/f?p=31517:90
Denes Kubicek

Similar Messages

  • I have a question for anyone that can help me with ACER mini laptop!!

    I am thinking of buying this laptop, i really just need it for internet, storing photos, and simple tasks...I dont really need a whole lot of bells and whistles.  I would like to be able to watch movies on it when i'm traveling, and i'm assuming i would have to buy a attachable DVD drive for it correct?  If anyone has this computer, or knows anything about it I would appreciate a response before I decide to buy it
    Thank you in advance.

    I have a 9" Aspire One and love it, although I wish I'd known about the 10" one coming out, it's less than what I paid for my 9" in December!  (I also have a fullsized laptop for gaming and such, but many times I just bring the tiny AAO along - superportable and great battery life)
    As previously mentioned, you can't legally save DVDs to the hard drive of a computer to watch on a plane (or whatever) even if you own the DVD.  No real technical barriers, but it is not legal.
    I do routinely take TV recordings from my MythTV (Computer-based PVR, kind of like TiVo on steroids) system and recompress them with Handbrake (http://handbrake.fr/) for my Aspire One.  Recompressing broadcast TV recordings is legal.
    FYI - The netbooks Best Buy sells are usually the same price as from other sources but frequently include a smaller 3-cell battery instead of a 6-cell battery, a fact which is not mentioned on Best Buy's online ordering systems, or at least wasn't a few weeks ago.
    *disclaimer* I am not now, nor have I ever been, an employee of Best Buy, Geek Squad, nor of any of their affiliate, parent, or subsidiary companies.

  • Question for Pondini....TC with WDE?

    Pondini's guide recommends PGP WDE as file valut does not work well with the TC/TM combination---cannot access individual files and must restore entire drive or back up set to restore one lost or missing file. I think I am clear but want to make sure that the PGP WDE product will secure one's data but also allows access to individual files and back up sets(dates) in the TM software with the TC HD. is there a special way to configure this? Is it difficult to configure? Looks like the TC can also be set with WDE? For that matter any USB drive can be secured with WDE? Finally if you transfer a file (from home to office) is the file encrypted or is it accessible on the second computer which may not have the WDE. Just trying to understand how it works.
    Thank you.

    Harryash wrote:
    Pondini's guide recommends PGP WDE
    No, it says it's an alternative, and mentions that a few users have found it to be a good fit. There is a link to a positive review, which seems to indicate it will work well with Time Machine.
    I've not used it, so don't recommend for or against. I have asked a couple of folks who said they were going to try it to post back with their findings, but they haven't.
    I think I am clear but want to make sure that the PGP WDE product will secure one's data but also allows access to individual files and back up sets(dates) in the TM software with the TC HD.
    That's my understanding, but I cannot be sure. Check with PGP, or search for folks who've used it, via Google.
    If you do try it, PLEASE post back with your results!

  • Question for Anyone Using CS4 Production Premium with Windows 7

    I'm testing Windows 7 at home with CS3 Production Premium and have not had any issues. Of course CS4 is quite a bit different.
    Anyone using CS4 Production Premium on Windows 7 regularly? Any issues to report?
    Thanks

    Thanks for replying to my post:
    mark_m wrote:
    "I notice that when I open an old CS4 project and PPro asks you to locate the file, that the "show only exact file name" tick box seems to have no effect.
    This is on Windows 7 RC 64bit."
    On our systems at work that have XP and Vista + CS4 Production Premium.  I've noticed this with preview files in particular and possibly some others, I don't remember. The "show only exact file" checkbox is greyed out. This is somewhat annoying because projects can have a huge number of preview files with long  cryptic names making it a pain to locate the correct one manually to get the ball rolling. If I don't think it'll take too long to re-render, I just select "skip preview files".
    We bought 3 licenses for Windows 7 and I'm encouraged by the performance, reliability and features on my home test system (RC 64) that has CS3 installed. Can't wait to get rid of XP and Vista.

  • Question for get information from https site with socket.

    I had tried to send a HTTP request with socket like :
    POST http://xxx.xxx..xxx/bbs/bbsadd.php?blockid=119&title=Hello&content=Hello&clid=101&Ok=OK&s_no=0&mood=1 HTTP/1.0\r\n\r\n"
    Just like this way , I could get some information or submit any message to http site like that .
    But that was not success to get some information for visited https ( like Yahoo ) use the same way .
    I had read some document about the https protocl I knew that had to need SSL for validate .
    But what should I do as a socket program ?
    package sailing;
    import java.net.*;
    import javax.net.ssl.*;
    import java.io.*;
    public class ReceiveMail
         //private Socket toYahoo;
         private SSLSocket toYahoo;
         private SSLSocketFactory factory;
         private BufferedReader read;
         private DataOutputStream write;
         private String login;
         public ReceiveMail(String userName,String userPassword)
              try
                        //this.toYahoo=new Socket("202.43.216.165",80);
                        this.factory=(SSLSocketFactory)SSLSocketFactory.getDefault();
                        this.toYahoo=(SSLSocket)this.factory.createSocket("202.43.216.165",443);
                        //this.login="POST https://edit.bjs.yahoo.com/config/login?.src=ym&login="+userName+"&passwd="+userPassword+" HTTP/1.0\r\n\r\n";
                        this.login="POST https://edit.bjs.yahoo.com/config/login?.src=ym&login="+userName+"&passwd="+userPassword+" HTTP/1.0\r\n\r\n";
                        byte[] makeBytes=this.login.getBytes();
                        this.write=new DataOutputStream(this.toYahoo.getOutputStream());
                        this.write.write(makeBytes,0,makeBytes.length);
                        this.write.flush();
                        this.read=new BufferedReader(new InputStreamReader(this.toYahoo.getInputStream()));
                        String readRes="";
                        String webFileCode="";
                        while((readRes=this.read.readLine())!=null)
                             webFileCode+=readRes;
                        System.out.println(webFileCode);     
              catch(IOException e)
                   System.out.println(e);
         public static void main(String args[])
              new ReceiveMail("sailing","sailing");
    }================================
    If this program perform successful , I think it will print code that login Yahoo Mail success .
    But I just could get an error code .................
    Why?

    Hi,
    According to your post, my understanding is that you wanted to get information from multiple lists once a user was selected.
    There is no out of the box way to accomplish this with SharePoint.
    As a workaround, I recommend to create a list to store the user names. Then you can create relationships between lists using the browser UI. Once you select the user name in the parent list, the associated items will be displayed in the child lists.
    Here are two great articles for you to take a look at:
    http://office.microsoft.com/en-in/sharepoint-server-help/create-list-relationships-by-using-unique-and-lookup-columns-HA101729901.aspx#_Toc270607416
    http://msdn.microsoft.com/en-us/library/ff394632.aspx
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Make can't recursively call Make when run from Runtime.exec (for some user)

    This one is a little complicated. The afflicted platform is Mac OS X. It works fine on Linux, it seems, and even then, it does work for some Mac OS X users...
    First, the setup. I have a Java program that has to call GNU Make. Then, GNU Make will recursively call Make in some subdirectories. This results in the following Java code:
    String make = "make"; //on windows, I have this swapped with "mingw32-make"
    String workDir = ...; //this is programmatically detected to be the same folder that the parent Makefile is in
    Runtime.getRuntime().exec(make,null,workDir);This calls make on a Makefile which has the following line early on to be executed (this is only a snippet from the makefile):
    cd subdirectory && $(MAKE)When I fetch the output from the make command, I usually get what I expect: It cd's to the directory and it recursively calls make and everything goes smoothly.
    However, for one particular user, using Mac OS X, he has reported the following output:
    cd subdirectory && make
    /bin/sh: make: command not found
    make: *** [PROJNAME] Error 127Which is like, kinda hurts my head... make can't find make, apparently.
    I've gotten some suggestions that it might be due to the "cd" command acting wonky. I've gotten other suggestions that it may be some strange setup with the env variables (My Mac developer is implementing a fix/workaround for 'environ', which is apparently posix standard, but Mac (Mr. Posix Compliance...) doesn't implement it. When he finishes that, I'll know whether it worked or not, but I get the feeling it won't fix this problem, since it's intended for another area of code entirely...
    Also worth mentioning, when the user calls "make" from the terminal in said directory, it recurses fine, getting past that particular line. (Later on down the road he hits errors with environ, which is what my aforementioned Mac dev is working on). Although calling "make" by hand is not an ideal solution here.
    Anyways, I'm looking for someone who's fairly knowledgeable with Runtime.exec() to suggest some way to work around this, or at least to find out that perhaps one of the User's settings are wonked up and they can just fix it and have this working... that'd be great too.
    -IsmAvatar

    YoungWinston
    YoungWinston wrote:
    IsmAvatar wrote:
    However, for one particular user, using Mac OS X, he has reported the following output:One particular user, or all users on Mac OS?In this case, I have two mac users. One is reporting that all works fine. The other is reporting this problem.
    cd subdirectory && make
    /bin/sh: make: command not found
    make: *** [PROJNAME] Error 127Which is like, kinda hurts my head... make can't find make, apparently.If that is being reported on the command line, then I'd say that make wasn't being found at all.If make isn't being found, then who's interpreting the Makefile?
    It's also just possible that the make script on Mac isn't correctly exporting its PATH variable, though it seems unlikely, since this would surely have been reported as a bug long ago.
    I've gotten some suggestions that it might be due to the "cd" command acting wonky...Also seems unlikely. 'cd' has been around since shortly after the K-T extinction event.
    WinstonBy "acting wonky", I mean being given a bad work directory or some such, such that it's not changing to the intended directory.
    Andrew Thompson
    Andrew Thompson wrote:
    (shudder) Read and implement all the recommendations of "When Runtime.exec() won't" (http://www.javaworld.com/jw-12-2000/jw-1229-traps.html).
    Already read it. I already know the dreadful wonders of Runtime.exec. But in this case, it's been working fine for us up until one Mac user reported that make can't find make.
    Also, why are you still coding for Java 1.4? If you are not, use a ProcessBuilder, which takes a small part of the pain out of dealing with processes.Usually I do use a ProcessBuilder. I noticed that it usually delegates to Runtime.exec() anyways, and seeing as I didn't need any of the additional functionality, I decided to just use Runtime.exec() in this particular case.
    jschell
    jschell wrote:
    So print thos env vars, in your app and when the user does it.I'll look into that. It's a good start.
    -IsmAvatar

  • Dynamic Table with XML Schema

    Hi, I am new to livecycle and wondering if there is any sample for setting up the dynamic table with XML schema so I can access the data through workbench's xpath. thanks.

    Ivor,
    Take a look at the samples shipped with Designer. For 8.2.1 release take a look at
    C:\Program Files\Adobe\LiveCycle Designer ES\8.2\EN\Samples\Forms\Purchase Order\Schema\Schema\Purchase Order.xsd
    and the form samples.
    Otherwise, forward a request to [email protected] I would be happy to send you a sample XDP with a dynamic table and a schema.
    Steve

  • Dynamic Linking with text

    Can text created in Pr Titler be sent from a Pr Timeline
    to an Ae comp via Dynamic Link in the upcoming version?
    http://forums.adobe.com/message/5274695#5274695

    I'll file a feature request here:
    http://www.adobe.com/go/wish
    Feature Request:
    Brief title for your desired feature:
    Dynamic Linking with text
    How would you like the feature to work?
    The ability for text created in Premiere Titler
    to be sent from a Premiere Timeline to an
    After Effects Composition via Dynamic Link.
    Why is this feature important to you?
    I do all of my finished titling in Ae, and would like to
    be able to transfer rough-cut text from Pr for compositing
    Filed.

  • A question for Guru kglad!

    Im trying to break up some fla files to use reusable .as
    files. I have created a UTIL file with static methods. One example
    is a method used to load in external files and open a Progress bar.
    The issue is how do I get the Progress bar into this .as
    file?
    I do not want to pass a MC into the method that already
    contains the Progress bar. I'd rather on the fly create a new
    instance (or maybe global instance) of the Progress bar from within
    the .as file.
    How can this be done?

    Ok, I feel like a needy person here. How?
    Where?
    Heres a question for the imports of Flash stuff you have
    import statments such as
    import mx.something
    Where the heck is the mx folder?
    How am I to see where to include files from?
    How do I import the Progress bar component?
    I cant find what Im looking for, partially because I dont
    know what Im looking for.
    >>>>><<<<<

  • Can somebody give some real time questions for alv report

    hi guru
    can somebody give some real time questions for alv report.
    answers also.
    regards
    subhasis.

    hi,
    The ALV is a set of function modules and classes and their methods which are added to program code. Developers can use the functionality of the ALV in creating new reports,  saving time which might otherwise have been spent on report enhancement
    The common features of report are column    alignment, sorting, filtering, subtotals, totals etc. <b>To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV).</b>
    Using ALV, we can have three types of reports:
       1. Simple Report
       2. Block Report
       3. Hierarchical Sequential Report
    <b>Reward useful points</b>
    Siva

  • LDAP design question for multiple sites

    LDAP design question for multiple sites
    I'm planning to implement the Sun Java System Directory Server 5.2 2005Q1 for replacing the NIS.
    Currently we have 3 sites with different NIS domains.
    Since the NFS over the WAN connection is very unreliable, I would like to implement as follows:
    1. 3 LDAP servers + replica for each sites.
    2. Single username and password for every end user cross those 3 sites.
    3. Different auto_master, auto_home and auto_local maps for three sites. So when user login to different site, the password is the same but the home directory is different (local).
    So the questions are
    1. Should I need to have 3 domains for LDAP?
    2. If yes for question 1, then how can I keep the username password sync for three domains? If no for question 1, then what is the DIT (Directory Infrastructure Tree) or directory structure I should use?
    3. How to make auto map work on LDAP as well as mount local home directory?
    I really appreciate that some LDAP experta can light me up on this project.

    Thanks for your information.
    My current environment has 3 sites with 3 different NIS domainname: SiteA: A.com, SiteB:B.A.com, SiteC:C.A.com (A.com is our company domainname).
    So everytime I add a new user account and I need to create on three NIS domains separately. Also, the password is out of sync if user change the password on one site.
    I would like to migrate NIS to LDAP.
    I want to have single username and password for each user on 3 sites. However, the home directory is on local NFS filer.
    Say for userA, his home directory is /user/userA in passwd file/map. On location X, his home directory will mount FilerX:/vol/user/userA,
    On location Y, userA's home directory will mount FilerY:/vol/user/userA.
    So the mount drive is determined by auto_user map in NIS.
    In other words, there will be 3 different auto_user maps in 3 different LDAP servers.
    So userA login hostX in location X will mount home directory on local FilerX, and login hostY in location Y will mount home directory on local FilerY.
    But the username and password will be the same on three sites.
    That'd my goal.
    Some LDAP expert suggest me the MMR (Multiple-Master-Replication). But I still no quite sure how to do MMR.
    It would be appreciated if some LDAP guru can give me some guideline at start point.
    Best wishes

  • Load JDBC-Driver dynamically with JarClassLoader

    Hey!
    I have a problem loading JDBC drivers dynamically with a JarClassLoader:
    Code:
    public class URLLoaderTest {
      public static void main(String[] args) {
      try {
        URL[] urlList = {new File("D:\\jbuilder5\\SQLServerJDBC\\lib\\mssqlserver.jar").toURL(),
                         new File("D:\\jbuilder5\\SQLServerJDBC\\lib\\msbase.jar").toURL(),
                         new File("D:\\jbuilder5\\SQLServerJDBC\\lib\\msutil.jar").toURL()};
        ClassLoader classLoader = new URLClassLoader(urlList);
        Class c = Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver",true,classLoader);
        Object d = c.newInstance();
        DriverManager.registerDriver((Driver)d);
        // DriverManager.getDrivers()    Enumeration is empty
        Connection conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://Server:1433","test","test");
        DatabaseMetaData meta = conn.getMetaData();
        System.out.println("JDBC driver version is " + meta.getDriverVersion());
      catch (Exception e) {System.out.println(e.getMessage());}
    }Problem:
    Till the DriverManager registraton everything is ok.
    The registerDriver Method throws no exception but if I call DriverManager.getDrivers() after calling the registerDriver Method an empty Enumeration is returned.
    So the driver is not loaded and DriverManager.getConnection throws an Exception (no suitable driver).
    If I include the driver jars into the Classpath everything is running (but that isn't what I want to do).
    Is there a solution for this problem? Maybe it is possible to load the data into the AppClassLoader??!!
    Thanx in advance.

    Found a solution!
    For everyone who is interested:
    public class URLLoaderTest {
      public static void main(String[] args) {
      try {
        URL[] urlList = {new File("D:\\jbuilder5\\SQLServerJDBC\\lib\\mssqlserver.jar").toURL(),
                         new File("D:\\jbuilder5\\SQLServerJDBC\\lib\\msbase.jar").toURL(),
                         new File("D:\\jbuilder5\\SQLServerJDBC\\lib\\msutil.jar").toURL()};
        ClassLoader classLoader = new URLClassLoader(urlList);
        Class c = Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver",true,classLoader);
        Object d = c.newInstance();
        Driver driver = (Driver)d;
        Properties prop = new Properties();
        prop.setProperty("user","test");
        prop.setProperty("password" ,"test");
        Connection conn = driver.connect("jdbc:microsoft:sqlserver://test:1433",prop);
        System.out.println("JDBC driver version is " + meta.getDriverVersion());
      catch (Exception e) {System.out.println(e.getMessage());}
    }

  • Connection sharing for embedded JDBC and DatabaseController

    <p> </p><p>I would like to share an existing JDBC connection with the DatabaseController (i.e. same session in database).  Basically I need to call a stored proc in the JSP page then use the same (already established and open) connection for the DatabaseController to run the report.</p><p>Is that possible?  If so, can you give me a brief example.  I&#39;m well versed in Java, but not at all in CR.  I&#39;m trying to help evaluate the effort to merge existing web application code with CR reports.  The company has many existing CR files that I would like to "take to the web", but the underlying database uses session information and VPD for security.</p><p>For reference I&#39;m using an Oracle 10g database.  I would also welcome an answer that uses connection pooling and I could simply hand out pooled connections to the DatabaseController.</p><p>Thanks! <br /></p><p> </p><p> </p>

    <p>Hi, </p><p>      Unfortunately there currently is no way to pass a JDBC connection to the report at runtime (this would be a great idea to track under the enhancement requests forum section). That being said there are other options you can do to get connection pooling functionality within your application. Probably the easiest way is to use JNDI. This will allow the application server to handle the Connection Pool. There is an optional property of the database connection of a report which allows the report designer to specify a JNDI lookup name. At runtime the report will look for this lookup name first prior to attempting to make the JDBC connection.</p><p>You can look at this comment on another question for instructions on how to set the JNDI optional name:</p><p><u><strong><a href="/node/483#comment-79">http://diamond.businessobjects.com/node/483#comment-79</a></strong></u>  </p><p>Another option is for you to pass in a java.sql.ResultSet at runtime to the report. It sounds like you are already making a JDBC connection at runtime so it shouldn&#39;t be too difficult for you to add the SQL query statement to populate a ResultSet. Once you have the ResultSet populated you can pass it into the report. In fact the wizard which is outlined on the comment listed above has a screenshot of the wizard which will generate the code at runtime to view a report. If you select the option in the wizard to "<strong>Populate the report with a java.sql.ResultSet"</strong> it will generate the necessary code stub to demonstrate how this will work.</p><p>The only downside to passing in the resultset at runtime is that it requires the entire dataset to be populated prior to passing it to the report. If the dataset is relatively small the performance impact will likely be acceptable, however if you start getting in to the tens of thousands of records then you may start seeing some performance implications. </p><p>Hope this helps. Let me know if you have any follow-up questions. </p><p>Regards,<br />Sean Johnson (CR4E Product Manager) </p>

  • JDBC Adapter - Dynamic database address

    Hi,
    For a JDBC recevier adapter, is it possible to specify the address of the database dynamically.
    Thanks
    Martin

    Hi,
    I dont think this is possible.
    Regards,
    Bhavesh

  • Changing the custom XML for a flash chart dynamically

    Hello
    I am wondering if anyone has found a way to change the custom XML
    for a flash chart dynamically.
    For instance.
    On the www.anychart.com website their is a gallery with charts.
    I have studied one called "2Dlinetimechart. It has hours on the X-axis.
    When I view the XML for this chart.
    I found this enrty
    - <block color="0x0080C0" border_color="0x0080C0" name="Sales dept.">
    <set value="0" argument="0" name="00:00" />
    <set value="1" argument="0" name="01:00" />
    It uses the tag value to set the position on the X-axis. But the tag name to set the labels on the X-axis.
    I have not found a way to do this in application express 3.0.
    Therefore I wonder if I can change to XML dynamically, and build my own block based on the input I have.
    Or even build a chart, based on a xml that I create first then sends to the object that renders the chart.
    Hope this makes sence ?
    Ulf
    PS this is related to my question about
    http://forums.oracle.com/forums/thread.jspa?messageID=1887210?
    using dates on the x-axis.
    But would by nice to know a general method to rebuild the xml-file dynamically so I can change the chart within the limits of the xml-definition.

    String value = ResultSet.getObject("myfield").toString();
    String opvalue = "15";
    <OPTION Value=15 <%=((opvalue.equals(value))?"selected":"")%>>

Maybe you are looking for

  • Mac Pro - 50% of the time, it does not turn on properly.

    Hello all, I got my 8-core Mac Pro in september - very new - very happy - and all the rest of it! Two days ago however, my Mac starts playing up... It now boots with a car-like rev and roughly 50%-70% of the time I switch on the Mac it thinks for abo

  • Worst case scenario backup?

    I have a general question about backing up my files. I currently have an external hard drive connected to my iMac. I keep my work files on my internal hard drive and time machine backs them up to my external hard drive which is always connected. If I

  • Simulate PO pricing

    Hello all, I am facing a bit of a challenge in finding a FM that would allow me to get the current price of a PO item (simulate pricing) that fits my requirements.  I have tried BAPI_PO_CREATE1 in test mode and ME_PO_PRICE_SIMULATION, which do what I

  • Question on process integrator

    Sir i need to merge two tables from heterogeneous data sources and apply multiple join conditions. The tables contain very large data volumes. What is the recommended method to maximize performance and reduce system resources pls reply back soon sir

  • Bringing pdf documents together?

    Hello my name is Ian. I have a number of documents (from different sources) I have printed to pdf. Can I bring them all together in one pdf document to make it easy for my recipient to read and ensure they view in the right order? Many thanks