Searching with Java

Hi all,
Do you know any program written in Java that go on the internet
and search for data that we specify. What kinda of java package
am I supposed to look at if I want to write one.
Thanks,
TC

Let's boil this down to the requirements:
> Do you know any program written in Java that go on the
internet
1) So you need some way to access the internet from Java.
> and search for data that we specify.
2) and you need to be able to search for data specified.
Okay, well I'll assume you already know how to write a simple Java command line program that lets you input data (say, as an argument). If not, you're going to want to tackle that before you go on to do internet-based programming.
The two requirements are that you can access the internet, and that you can search for certain data. Well, to search for certain data, you are going to need to write a spider/crawler that traverses across the web and records the information it finds, reporting back when it finds the target data. Why bother doing all of this when there are plenty of search engines already that will do this for you. One of the best search engines is Google, and Google is accessible via HTTP (world wide web).
So, really all you need to be able to do is access the internet and talk to Google. This isn't too hard. To access the internet through HTTP (letting you get in touch with Google), you may wish to investigate the java.net package as well as the org.apache.commons.HttpClient package.
http://java.sun.com/j2se/1.4.1/docs/api/java/net/package-summary.html
http://jakarta.apache.org/commons/httpclient/

Similar Messages

  • Create Named Search with Java API

    Hi,
    is it possible to create or modify a named search with the Java API?
    Best regards,
    Roman

    Hi Olof,
    You can use the below code for searching a value in lookup table:
                   ResultDefinition objResultDefinition = new ResultDefinition(Lookup Table Id);
                   objResultDefinition.addSelectField(Lookup Field ID);
                   StringValue [] objStringValue = new StringValue[1];
                   objStringValue[0] = new StringValue("Value to search");
                   RetrieveRecordsByValueCommand objRetrieveRecordsByValueCommand = new RetrieveRecordsByValueCommand(objConnectionAccessor);
                   objRetrieveRecordsByValueCommand.setSession(strUserSessionID);
                   objRetrieveRecordsByValueCommand.setResultDefinition(objResultDefinition);
                   objRetrieveRecordsByValueCommand.setFieldId(lookup field id);
                   objRetrieveRecordsByValueCommand.setFieldValues(objStringValue);
                   objRetrieveRecordsByValueCommand.execute();
                   RecordResultSet objRecordResultSet = objRetrieveRecordsByValueCommand.getRecords();
    Now using the objRecordResultset in a loop you can get the record id by calling the getRecord(i).getId() method.
    Hope this helps!!
    Cheers,
    Arafat

  • How to search with multiple constraints in the new java API?

    I'm having a problem using the new MDM API to do searches with multiple constraints.  Here are the classes I'm trying to use, and the scenario I'm trying to implement:
    Classes:
    SearchItem: Interface
    SearchGroup: implements SearchItem, empty constructor,
                 addSearchItem (requires SearchDimension and SearchConstraint, or just a SearchItem),
                 setComparisonOperator
    SearchParameter: implements SearchItem, constructor requires SearchDimension and SearchConstraint objects
    Search: extends SearchGroup, constructor requires TableId object
    RetrieveLimitedRecordsCommand: setSearch method requires Search object
    FieldDimension: constructor requires FieldId object or FieldIds[] fieldPath
    TextSearchConstraint: constructor requires string value and int comparisonOperator(enum)
    BooleanSearchConstraint: constructor requires boolean value
    Scenario:
    Okay, so say we have a main table, Products.  We want to search the table for the following:
    field IsActive = true
    field ProductColor = red or blue or green
    So the question is how to build this search with the above classes?  Everything I've tried so far results in the following error:
    Exception in thread "main" java.lang.UnsupportedOperationException: Search group nesting is currently not supported.
         at com.sap.mdm.search.SearchGroup.addSearchItem(Unknown Source)
    I can do just the ProductColor search like this:
    Search mySearch = new Search(<Products TableId>);
    mySearch.setComparisonOperator(Search.OR_OPERATOR);
    FieldDimension myColorFieldDim = new FieldDimension(<ProductColor FieldId>);
    TextSearchConstraint myTextConRed = new TextSearchConstraint("red",TextSearchConstraint.EQUALS);
    TextSearchConstraint myTextConBlue = new TextSearchConstraint("blue",TextSearchConstraint.EQUALS);
    TextSearchConstraint myTextConGreen = new TextSearchConstraint("green",TextSearchConstraint.EQUALS);
    mySearch.addSearchItem(myColorFieldDim,myTextConRed);
    mySearch.addSearchItem(myColorFieldDim,myTextConBlue);
    mySearch.addSearchItem(myColorFieldDim,myTextConGreen);
    the question is how do I add the AND of the BooleanSearchConstraint?
    FieldDimension myActiveFieldDim = new FieldDimension(<IsActive FieldId>);
    BooleanSearchConstraint myBoolCon = new BooleanSearchConstraint(true);
    I can't just add it to mySearch because mySearch is using OR operator, so it would return ALL of the Products records that match IsActive = true.  I tried creating a higher level Search object like this:
    Search topSearch = new Search(<Products TableId>);
    topSearch.setComparisonOperator(Search.AND_OPERATOR);
    topSearch.addSearchItem(mySearch);
    topSearch.addSearchItem(myActiveFieldDim,myBoolCon);
    But when I do this I get the above "Search group nesting is currently not supported" error.  Does that mean this kind of search cannot be done with the new MDM API?

    I'm actually testing a pre-release of SP05 right now, and it still is not functional.  The best that can be done is to use a PickListSearchConstraint to act as an OR within a field.  But PickList is limited to lookup Id values, text attribute values, numeric attribute values and coupled attribute values.  It works for me in some cases where I have lookup Id values, but not in other cases where the users want to search on multiple text values within a single field.

  • Sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loop

    sir i have given lot of effort but i am not able to solve my problem either with notifiers or with occurence fn,probably i do not know how to use these synchronisation tools.

    sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loopHi Sam,
    I want to pass along a couple of tips that will get you more and better response on this list.
    1) There is an un-written rule that says more "stars" is better than just one star. Giving a one star rating will probably eliminate that responder from individuals that are willing to anser your question.
    2) If someone gives you an answer that meets your needs, reply to that answer and say that it worked.
    3) If someone suggests that you look at an example, DO IT! LV comes with a wonderful set of examples that demonstate almost all of the core functionality of LV. Familiarity with all of the LV examples will get you through about 80% of the Certified LabVIEW Developer exam.
    4) If you have a question first search the examples for something tha
    t may help you. If you can not find an example that is exactly what you want, find one that is close and post a question along the lines of "I want to do something similar to example X, how can I modify it to do Y".
    5) Some of the greatest LabVIEW minds offer there services and advice for free on this exchange. If you treat them good, they can get you through almost every challenge that can be encountered in LV.
    6) If English is not your native language, post your question in the language you favor. There is probably someone around that can help. "We're big, we're bad, we're international!"
    Trying to help,
    Welcome to the forum!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Is there a way to create/edit registry keys with Java?

    I'm writing a console app and I'd like to have it so the users can change values in the registry. I'm not just talking about app keys I want any key. Is there a way to do this with Java?

    Maybe a forum search on "Windows registry" would turn up some useful things. You're not the first to ask this. You might save yourself and everyone else some time if you'd simply do that.

  • XSLT Enhancement with Java, Tokenize Functionality

    I tried the following requirement using EXSLT with no luck. Is there any other alternative to tokenize in XSLT 1.0.
    The syntax i have here is  
    <xsl:for-each select="tokenize($this/Field1,',')">
           <xsl:variable name="f1v" select="."/>
         <xsl:for-each select="tokenize($this/Field2,'\|')">
              <xsl:variable name="f2v" select="."/>
              <xsl:for-each select="tokenize($this/Field3,'\|')">
                        <xsl:variable name="f3v" select="."/>
    There are multiple for-each based on tokens
    I am leaning towards to Enhancing XSLT with Java Function. As i have less experience with Java, can anybody help me with the code that can be used by XSLT for Tokenize functionality.
    I have written something like following. I still have errors to fix. But i am not sure about having resultSet or return at the end, to make sure all the tokens were sent to XSLT.
    public class MyStringToken
         public static void main(String [] args)
              String str = "sssd;wwer;ssswwwwdwwwwwwwwwww;wwwwe";
              String delimiter = ";";
              MyStringToken my = new MyStringToken();
              my.getTokens(str,delimiter);
         public void getTokens(String str,String delimiter)
              StringTokenizer st = new StringTokenizer(str,delimiter);
              while(st.hasMoreElements())
                   try
                        String delString = new String(st.nextElement().toString());
                        return (delString);
                   catch(Exception e)
                        e.printStackTrace();
    Any help is appreciated

    Hi,
    I have been searching about, and I have found the next example that maybe can help you, It's a template to tokenize in XSLT 1.0 from the web [http://stackoverflow.com/questions/1018974/tokenizing-and-sorting-with-xslt-1-0]
    <xsl:template name="tokenize">
      <xsl:param name="string" />
      <xsl:param name="delimiter" select="' '" />
      <xsl:choose>
        <xsl:when test="$delimiter and contains($string, $delimiter)">
          <token>
            <xsl:value-of select="substring-before($string, $delimiter)" />
          </token>
          <xsl:text> </xsl:text>
          <xsl:call-template name="tokenize">
            <xsl:with-param name="string"
                            select="substring-after($string, $delimiter)" />
            <xsl:with-param name="delimiter" select="$delimiter" />
          </xsl:call-template>
        </xsl:when>
        <xsl:otherwise>
          <token><xsl:value-of select="$string" /></token>
          <xsl:text> </xsl:text>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:template>
    Also I have found the next example of use tokenize in EXSLT from [http://exslt.org/str/functions/tokenize/index.html] It can be that inI your tests you are not using "str:tokenize", no?
    <xsl:template match="a">
       <xsl:apply-templates />
    </xsl:template>
    <xsl:template match="*">
       <xsl:value-of select="." />
          <xsl:value-of select="str:tokenize(string(.), ' ')" />
       <xsl:value-of select="str:tokenize(string(.), '')" />
       <xsl:for-each select="str:tokenize(string(.), ' ')">
          <xsl:value-of select="." />
       </xsl:for-each>
       <xsl:apply-templates select="*" />
    </xsl:template>
    I hope that helps you.
    Best.
    Jorge

  • SQL Reporting Services with Java EE

    I have developed a Java application for calling the SQL Reports. A couple of reports are made in the server. This SQL Reporting server is deployed and the client is made in the java using Werb services. Whenever a search is done from the Java application, reports are displayed on the JSP page using the web service methods. But the problem is the entire report is displayed. Is there any way to display the report based on the particular item search. Suppose, if search is made on "Australia" in the coulumn Country, the report should contain only Australian related data. Currently the search is based on the report name itself.

    bobz wrote:
    jschell wrote:
    bobz wrote:
    Is there any book on SQL Reporting services with Java
    [http://www.javaworld.com/javaworld/jw-01-2005/jw-0110-sqlrs.html]
    This looks hopeful.I have already developed a java EE for calling reports with the help of ---"MSDN Virtual Lab: Implementing SQL Server Reporting Services with a Java Enterprise Edition (EE) Application (ID:1032315323)". Now I need to find out the parametrized reports(passing parameters to the report calls and more customization using java). In .NET, reportviewer controller is available for this purpose. I want to achieve the same type of thing using java.The protocol of controlling the Report Server is a feature of the Report Server.
    To control it you learn the protocol. To use it you program it in java.
    The first has nothing to do with java. The second obviously does.

  • Create Word document with Java

    I want to create a Word Document with Java. But I don't know how can I insert text in a Word document.

    I searched and found JXWord (probably limited to Windows): http://www.geocities.com/picmapicma/
    I'm interrested to know if it works fine...:)

  • Wrong XML parsing in Java  6.0 , the same code works fine with Java 5.0

    I have the following xml data in a file ( C:\_rf\jrebug.xml ) :
    <?xml version="1.0" encoding="UTF-8"?>
    <rs>
         <data
              input3='aa[1]'
              input4='bb[1]'
              input6='cc[2]'
              input8='dd[7]'
              output2='ee[7]'
              output4='ff[511]'
              output6='gg[15]'
              output7='hh[1]'
         />
    </rs>
    I have the following code to parse this XML data :
    import java.io.IOException;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Node;
    import org.xml.sax.SAXException;
    import org.xml.sax.ErrorHandler;
    import org.xml.sax.SAXParseException;
    public class DomParserBug {
         Document dom;
         public void runExample() {
    parseXmlFile("C:\\_rf\\jrebug.xml");
              parseDocument();
         private void parseXmlFile(String filename){
              //get the factory
              DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
              //dbf.setValidating(true);
    dbf.setValidating(false);
              try {
                   //Using factory get an instance of document builder
                   DocumentBuilder db = dbf.newDocumentBuilder();
                   db.setErrorHandler(new MyErrorHandler());
                   //parse using builder to get DOM representation of the XML file
                   dom = db.parse(filename);
              }catch(ParserConfigurationException pce) {
                   pce.printStackTrace();
              catch(SAXParseException spe) {
                   spe.printStackTrace();
              catch(IOException ioe) {
                   ioe.printStackTrace();
              catch(SAXException se) {
                   se.printStackTrace();
    private void parseDocument()
    Element docEle = dom.getDocumentElement();
    NodeList nl = docEle.getElementsByTagName("data");
    if(nl != null && nl.getLength() > 0)
    for(int i = 0 ; i < nl.getLength();i++)
    Element el = (Element)nl.item(i);
    NamedNodeMap attrsssss = el.getAttributes();
    for (int ii=0; ii<attrsssss.getLength(); ++ii)
    Node attr = attrsssss.item(ii);
    System.out.println("Attribute name is =" attr.getNodeName() " AND Attribute value is ="+attr.getNodeValue());
         public static void main(String[] args){
              DomParserBug dpe = new DomParserBug();
              dpe.runExample();
         class MyErrorHandler implements ErrorHandler {
              public void error(SAXParseException e) {
              System.out.println("error : " +e.toString());
         // This method is called in the event of a non-recoverable error
         public void fatalError(SAXParseException e) {
         System.out.println("fatalError : " +e.toString());
         // This method is called in the event of a warning
         public void warning(SAXParseException e) {
         System.out.println("warning : " +e.toString());
    The parsed output is :
    Attribute name is =input3 AND Attribute value is =aa[1]
    Attribute name is =input4 AND Attribute value is =bb[1]
    Attribute name is =input6 AND Attribute value is =cc[2]
    Attribute name is =input8 AND Attribute value is =dd[7]
    Attribute name is =output2 AND Attribute value is =ee[7]
    Attribute name is =output4 AND Attribute value is =ff[511]
    Attribute name   is  =output6 AND Attribute value  is =hh[1]]
    Attribute name   is  =output7 AND Attribute value  is =hh[1]
    THE LAST TWO LINES ARE SIMPLY WRONG.
    With java 5.0 the last two lines are parsed correctly :
    Attribute name   is  =output6 AND Attribute value  is =gg[15]
    Attribute name   is  =output7 AND Attribute value  is =hh[1]
    I have seen this issue only after I upgraded to java 6.0. I have searched the java 6.0 bug database but there is nothing there.
    I have also submitted a bug to the bugdatabase last month but have not heared anything.
    Anybody have any clue about this ???
    Thanks
    Edited by: skaushik on Jan 4, 2008 12:40 AM
    Edited by: skaushik on Jan 4, 2008 6:38 PM

    I have seen similar issue. I found that if you remove the square brackets from the first line in teh XML file, the last two lines are parsed correctly.
    Replace the follwing line : :
    Attribute name is =input3 AND Attribute value is =aa[1]
    with :
    Attribute name is =input3 AND Attribute value is =aa
    and the output is CORRECT :
    Attribute name is =input3 AND Attribute value is =aa
    Attribute name is =input4 AND Attribute value is =bb[1]
    Attribute name is =input6 AND Attribute value is =cc[2]
    Attribute name is =input8 AND Attribute value is =dd[7]
    Attribute name is =output2 AND Attribute value is =ee[7]
    Attribute name is =output4 AND Attribute value is =ff[511]
    Attribute name   is  =output6 AND Attribute value  is =gg[15]
    Attribute name   is  =output7 AND Attribute value  is =hh[1]

  • Issue with Java applet

    I am having issues with an "inactive plug-in" message in Safari when I want to do something using a Java plug-in.  I searched the communities and sure enough, when I opened Java preferences the box next to "enable applet plug-in and Web Start applications" the box was unchecked so I checked it.   Unfortunately, when I go back into preferences, the box is once again unchecked.  I did find out that I had a Trojan in the user.jar file associated with java but despite taking care of that issue (which for all I know is not related), this issue persists.  All of my software is up to date and from what I gather uninstalling and reinstalling Java is not an option and should not need to be fone.  I'd very much appreciate any input!

    Repairing the permissions of a home folder in Lion is a complicated procedure. I don’t know of a simpler one that always works.
    Back up all data now. Before proceeding, you must be sure you can restore your system to its present state
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the page that opens.
    Drag or copy — do not type — the following line into the Terminal window, then press return:
    chmod -R -N ~
    The command will take a noticeable amount of time to run. When a new line ending in a dollar sign ($) appears below what you entered, it’s done. You may see a few error messages about an “invalid argument” while the command is running. You can ignore those. If you get an error message with the words “Permission denied,” enter this:
    sudo !!
    You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up.
    Next, boot from your recovery partition by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the recovery desktop appears, select Utilities ▹ Terminal from the menu bar.
    In the Terminal window, enter “resetpassword” (without the quotes) and press return. A Reset Password window opens. You’re not going to reset the password.
    Select your boot volume if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select  ▹ Restart from the menu bar.

  • Unable to map actionscripting with java nested objects

    Hi Experts...,
    Im a newbie in flex and actionscripting.....
    Im unable to map nested java classes and objects with my front end flex application using actionscript....I have searched everywhere almost to my knowledge on the net but failed to find a fix...,
    im having serious trouble reffereing to attributes of an object using another object( which by the way happens to be the parent object).
    Im using hibernate and springs to do the DB transactions....,
    Please help me out with this issue.....
    Thanks for all the help and support in advance....

    Again, I don't work with Java and you should ask Java-related question in Flex (or Java) forum.
    Java or not - you need to package your server side language specific object into something that AS understands (text, XML, AMF object) and load this data into AS via, perhaps, URLLoader. Or you can open socket. Then you parse this data with AS3 code in SWF.

  • Flex with Java - DB data access

    Hello, folks,
    I am developing a Java application and realized that I need
    some advice. My application is simple:
    I have a MSSQL server, tomcat 5.5 ,flex data services.
    In my application , i have two combo boxes.. country, town..
    i have populated the country combobox with the values from
    DB(country table) obtained using the fill(List ListArgs) in
    Assembler Class.
    Now, based on the country selected in have to populate my
    town combobox from (town table)
    How can i populate the town combobox from the DB based on the
    country code?
    Is there any function to pass the selected index and populate
    the town combo box..????
    My code is as below:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" >
    <mx:DataService id="ds" destination="quick-search-country"
    autoCommit="false" autoSyncEnabled="false"/>
    <mx:DataService id="tds" destination="quick-search-town"
    autoCommit="false" autoSyncEnabled="false"/>
    <mx:ArrayCollection id="cntry_list"/>
    <mx:ArrayCollection id="town_list"/>
    mx:Panel layout="absolute" backgroundColor="#c6daf5"
    verticalCenter="0" horizontalCenter="0">
    <mx:Form id="SearchForm">
    <mx:TabNavigator >
    <mx:Canvas label="Hotel" width="339" height="234"
    backgroundColor="#ffffff">
    <mx:Label x="10" y="91" text="Country :" alpha="0.12"
    />
    <mx:ComboBox x="93" y="89" fontSize="10" id="Country"
    dataProvider="{cntry_list}"
    labelField="countryName"
    creationComplete="ds.fill(cntry_list)"
    change="tds.getItem(Country.selectedItem)" prompt="United
    Kingdom" >
    </mx:ComboBox>
    <mx:Label x="10" y="126" text="Town / City :"
    fontFamily="Georgia" alpha="0.12"/>
    <mx:ComboBox id="town" x="94" y="124" fontSize="10"
    dataProvider="{town_list}"
    labelField="townName" prompt="London WC1" >
    </mx:ComboBox>
    </mx:Canvas>
    </mx:TabNavigator>
    </mx:Form>
    </mx:Panel>
    </mx:Application>
    this is my main.mxml . I have CountryAssembler to fill the
    country combo and a DAO class . Have a Town assembler..
    Please advice me on how to populate the town combo based on
    country selected from the DB...
    I am really stuck up... and also dont have any documentation
    on Flex data services with Java support..
    please give me some suggestions on this.
    Thanks in Advance,
    Ambili

    Hi Mete,
    Thanks for ur reply , Mete. Your reply helped me a lot. Am
    using FDS 2.0.
    I have a doubt in combo box area itself.
    I have two tables by name country_list and town_list
    country_list consists of identity column , country_name and
    country_code
    town_list has identity column, country_code, town_code and
    town_name
    Normally while we use combobox in jsp, we have key value
    pairs for combo box..
    For eg:- if we have a Country combo , we have the country
    name(United States) as text displayed and its country code (US) as
    key.
    So if i select the United States , i will be returned with
    the value 'US' so that i can use it in query directly as
    Select town_name, town_code from town_list where country_code
    ='US'
    But while using flex , am not able to retieve the
    country_code from country combo. its only returning the text and
    the id.
    Here am forced to write a nested query as follows
    Select town_name, town_code from town_list where country_code
    =( Select country_code from country_list where country_name='United
    States')
    Is there any way to get the country_code as key while i
    select the country from country combo .
    And also how to keep 'United States' as selected during the
    intial load of the page.
    <mx:ArrayCollection id="cntry_list"/>
    <mx:ComboBox x="93" y="89" fontSize="10" id="Country"
    dataProvider="{cntry_list}"
    labelField="countryName"
    creationComplete="ds.fill(cntry_list)"
    prompt="Select Country" />
    please give me some suggestions on this.
    Thanks in Advance,
    Ambili

  • Web site with java benchmarks for various cpus?

    Is there a web site that shows java benchmarks run on various P4 and AMD cpus, so that it is possible to see the relatively speed at which java runs on these cpus?

    You'll find a few if you search around, but none will be meaningful. The problem with Java, or any other Virtual Machine type runtime language is you can not design a benchmark that really has meaning, in any context but the benchmark itself. First off, you're not benchmarking "Java" you're benchmarking the "JVM". I try to convince people to not waste so much time on these speed issues. Your time would be better learning how to write better code, which would give a much bigger speed increase then switching from a P4 to an Athlon. Developers often make mistakes and oversites in their work that slows a program down by an order of magnitude. You're never going to see that kind of performance difference in CPUs. So get a good deal on machine, the most "bang-for-your-buck" if you will, and go to town, and stop worrying, hotspot is fast.
    Sparc Chips are different story because a little thing called register coloring... but you didn't mention sparc chips, so I won't tell the story.
    Spinoza

  • How to create a ms-access table with java?

    hi all
    i've my application and i want to add the capability to creat an access file (.mdb) and then, via SQL , create a table, with many columns of many types, and with a primary key too.
    i know that it's also an SQL problem, but i'm searching for it everywhere
    thanx for your reply
    sandro

    Hi,
    It would have been much better if you had specified your development environment- the database driver class depends on which environment you are working with. Forexample, if you are working with vj++6 you can make use of the com.ms.jdbc.odbc.JdbcOdbcDriver class. If you are using IBM's Visual Age for Java3.5 you can find the sun.jdbc.odbc.JdbcOdbcDriver. Oneway or another you should have the .class for jdbc-odbc(usu they have the form: xxx:jdbc:odbc:JdbcOdbcDriver). Check all the packages that are available in your development environment that have the form xxx.jdbc.odbc.JdbcOdbcDriver.(And not clear what you know and what you don't - so I start from the very elementary steps)
    Anyways, What you have to know is that it is not possible to create databases (e.g. .mdb) directly from a Java application(as far as I know). What is possible is to create new tables inside an already created database and process queries based on those tables.In short what I am saying is : you need to have a DSN before writing applications that create tables.
    Follow the following steps to create DSN(for win2000):
    1)Go to the control panel and click the 'administrative tools'
    2)In the 'administrative tools' click to open ODBC(data sources)
    3)Click the 'add' button and choose 'Microsoft Access driver'
    4)In the DSN text field enter the dsn (e.g., Test)
    5)If you want to create a table in an already existing database choose select and select one. However, if you want to create a new database click 'create' and enter a name for your database(e.g. ExampleDB.mdb). If you do this successfully it will issue a successfull operation message.
    6)Click advanced and enter the login name(e.g. Albert) and password(e.g. mxvdk) for the database
    7)Click 'ok's to finish the operation.
    After the above three operations what you will have is an empty database(with no tables) named "ExampleDB.mdb" in the directory you specified.
    Now, you can write a java application that creates a table inside the database "ExampleDB.mdb".
    Check this out:
    import java.sql.*;
    public class Class1{
    public Class1(){
    String userName = "Albert";
    String password = "mxvdk";
    String dsn = "Test";
    String databaseURL = "jdbc:odbc:"+dsn;
    //This is just an sql table creating statement- have nothing to do with java
    String sqlCreateStmt = "CREATE TABLE StudentTable" +
    "(StudentID varchar(32) PRIMARY KEY," +
    "name varchar(30)," +
    "age int)";
         try{
         Class.forName("com.ms.jdbc.odbc.JdbcOdbcDriver");
         }catch(ClassNotFoundException eCNF){
              System.err.println("ClassNotFoundException:");
              System.err.println(eCNF.getMessage());
         try{
         con = DriverManager.getConnection(databaseURL,userName,password);
         stmt = con.createStatement();
         stmt.executeUpdate(sqlCreateStmt);
         }catch(SQLException e){
    System.err.println("SQLException:");
    e.printStackTrace();
         //insert one sample data
    insertSampleData();
    private void insertSampleData(){
         String sampleStudentID = "scr-342-tch";
         String sampleStudentName = "Tom James";
         int sampleStudentAge = 24;
    //This is just an sql table updating statement- have nothing to do with java
         String sqlUpdateStmt = "INSERT INTO StudentTable VALUES ('"+
                             sampleStudentID+"','"+
                             sampleStudentName+"',"+
                             sampleStudentAge+")";
         try{
              stmt.executeUpdate(sqlUpdateStmt);
              }catch(SQLException e){
              System.err.println("SQLException:");
              e.printStackTrace();
    public static void main(String[] args){
    new Class1();
    private Connection con;
    private Statement stmt;
    //This program runs perfectly in my VJ++6.0 (console application mode) and also in my IBM's
    //visual Age for Java3.5 (with sun.jdbc.odbc.JdbcOdbcDriver as my database driver)
    //If you are developing in another development environment, what you need to change is the
    //"com.ms.jdbc.odbc.JdbcOdbcDriver" in Class.forName("com...") stmt.
    //If you run this program more than once, it will issue 'tableAlreadyExists' message
    If you still experience the problem, pls be specific and repost!

  • How to upgrade Forms 11gR2 to use JAVA 7 after it was installed with JAVA 6

    I recently installed Forms 11gR2 on a development server.  We are trying to have the latest versions of everything to migrate from Forms 10g and assure we have support for the next few years.
    Our platform has the following software configuration:
    Solaris 10 (Update 19) SPARC 64 bits
    Weblogic 11g (10.3.6) that was installed with Java JDK 1.6.0_38
    Forms 11g R2 (11.1.2.1) that was also installed with
    Java JDK 1.6.0_38
    I tried to install Weblogic and Forms using the latest Java 7 JDK (1.7.0_25) but I got an error in the final steps of Forms setup, when I was configuring the domain.  I searched online and found a couple of tips but nothing worked.  The installation was stuck at the
    Creating Weblogic Domain step.  So I decided to try the installation process with the Java 6 JDK that we are using right now for Forms 10g, and it worked perfectly.  I have now two options but I don't know which one might be the better path:
    Uninstall Weblogic and Forms 11g completely, and try to re-install them again with Java 7, trying to fix the error that I got at the end of the configuration process.
    Try to upgrade the current Forms 11g installation from Java 6 to Java 7.  I found a blog that might suggest it is possible, but I don't know if it may cause additional issues along the road. http://pitss.com/us/2013/02/20/how-to-use-java-7-with-oracle-forms-11g-in-an-oracle-supported-environment/
    Thanks in advance for any suggestions you might have, or if any of you has experience installing Forms 11gR2 with Java 7 it might be great to know how to fix this error.  It might be worth mentioning that when I installed Forms and Weblogic with Java 6 I used exactly the same values, ports, options and paths.  The error appears like this in the installation logs and the process hangs there:
    XXX: adding task: oracle.as.install.classic.ca.standard.DomainProvisioningTask
      AdminServer port is 7001
      trying to connect to admuxas09.adminsrvad.sa.gov.au 7001
      Creating Weblogic Domain.
    oracle.as.provisioning.exception.ASProvWorkflowException
            at oracle.as.provisioning.weblogic.ASDomain._createDomain(ASDomain.java:2958)
            at oracle.as.provisioning.weblogic.ASDomain.createDomain(ASDomain.java:2476)
            at oracle.as.provisioning.engine.WorkFlowExecutor._createDomain(WorkFlowExecutor.java:633)
            at oracle.as.provisioning.engine.WorkFlowExecutor.executeWLSWorkFlow(WorkFlowExecutor.java:391)
            at oracle.as.provisioning.engine.Config.executeConfigWorkflow_WLS(Config.java:866)
            at oracle.as.install.classic.ca.standard.StandardWorkFlowExecutor.execute(StandardWorkFlowExecutor.java:65)
            at oracle.as.install.classic.ca.standard.AbstractProvisioningTask.execute(AbstractProvisioningTask.java:26)
            at oracle.as.install.classic.ca.standard.StandardProvisionTaskList.execute(StandardProvisionTaskList.java:61)
            at oracle.as.install.classic.ca.ClassicConfigMain.doExecute(ClassicConfigMain.java:124)
            at oracle.as.install.engine.modules.configuration.client.ConfigAction.execute(ConfigAction.java:371)
            at oracle.as.install.engine.modules.configuration.action.TaskPerformer.run(TaskPerformer.java:88)
            at oracle.as.install.engine.modules.configuration.action.TaskPerformer.startConfigAction(TaskPerformer.java:105)
            at oracle.as.install.engine.modules.configuration.action.ActionRequest.perform(ActionRequest.java:15)
            at oracle.as.install.engine.modules.configuration.action.RequestQueue.perform(RequestQueue.java:64)
            at oracle.as.install.engine.modules.configuration.standard.StandardConfigActionManager.start(StandardConfigActionManager.java:160)
            at oracle.as.install.engine.modules.configuration.boot.ConfigurationExtension.kickstart(ConfigurationExtension.java:81)
            at oracle.as.install.engine.modules.configuration.ConfigurationModule.run(ConfigurationModule.java:86)
            at java.lang.Thread.run(Thread.java:662)
    oracle.as.provisioning.exception.ASProvisioningException
            at oracle.as.provisioning.engine.Config.executeConfigWorkflow_WLS(Config.java:872)
            at oracle.as.install.classic.ca.standard.StandardWorkFlowExecutor.execute(StandardWorkFlowExecutor.java:65)
            at oracle.as.install.classic.ca.standard.AbstractProvisioningTask.execute(AbstractProvisioningTask.java:26)
            at oracle.as.install.classic.ca.standard.StandardProvisionTaskList.execute(StandardProvisionTaskList.java:61)
            at oracle.as.install.classic.ca.ClassicConfigMain.doExecute(ClassicConfigMain.java:124)
            at oracle.as.install.engine.modules.configuration.client.ConfigAction.execute(ConfigAction.java:371)
            at oracle.as.install.engine.modules.configuration.action.TaskPerformer.run(TaskPerformer.java:88)
            at oracle.as.install.engine.modules.configuration.action.TaskPerformer.startConfigAction(TaskPerformer.java:105)
            at oracle.as.install.engine.modules.configuration.action.ActionRequest.perform(ActionRequest.java:15)
            at oracle.as.install.engine.modules.configuration.action.RequestQueue.perform(RequestQueue.java:64)
            at oracle.as.install.engine.modules.configuration.standard.StandardConfigActionManager.start(StandardConfigActionManager.java:160)
            at oracle.as.install.engine.modules.configuration.boot.ConfigurationExtension.kickstart(ConfigurationExtension.java:81)
            at oracle.as.install.engine.modules.configuration.ConfigurationModule.run(ConfigurationModule.java:86)
            at java.lang.Thread.run(Thread.java:662)
    Caused by: oracle.as.provisioning.exception.ASProvWorkflowException: Error Executing workflow.
            at oracle.as.provisioning.engine.WorkFlowExecutor._createDomain(WorkFlowExecutor.java:686)
            at oracle.as.provisioning.engine.WorkFlowExecutor.executeWLSWorkFlow(WorkFlowExecutor.java:391)
            at oracle.as.provisioning.engine.Config.executeConfigWorkflow_WLS(Config.java:866)
            ... 13 more
    Cheers,
    Ivan Neva
    Oracle DBA

    Well if I got it to work with java 6 I'd leave it alone, to say the least. The elephant in the room is the certification matrix.
    http://www.oracle.com/technetwork/developer-tools/forms/overview/index.html
    there's 2 issues, what jdk does forms on the server want? Bigger question, what JRE is acceptable on the client?
    You would surely want the jre to be 7 on the client. Regarding the jdk on the server, you could leave it as is IMHO.
    Note that there was a patch to 11gr2. In conclusion, be sure to check the cert matrix regarding what is certified for the jdk for the server.
    I think the matrices are saying that if you have forms 11.1.2.1.0 that you can use the jdk 7. but like I said the big issue is what can the client use?
    As I read the matrix I think it is saying you have to have 11.1.2.1.0 to use the jre 7 on the client.
    So I would say if you have 11.1.2.1.0 on the server you are good because it's not a problem to have the jdk 6 on the server, if not you have to apply the patch in order to enable the jre 7 on the client.

Maybe you are looking for

  • System asking for storage location in case of Asset GR,

    dear all, In our case  system is asking for Storage Location in case of Asset GR, though PO was account assigned. I checked for the screen setting, but not getting any clue where to find that entry to make depressed. Pls guide, Regards.

  • Problem using c:forEach

    I'm having a problem using c:forEach. Eclipse is telling me the problem is with the items parameter, and for the life of me, I cannot see why, since I could swear forEach uses an items parameter. Here is my code and the exception report. Can anyone p

  • Downloaded iOS 7 and now cant sync to iTunes

    I just downloaded iOS7 via wifi because I use iTunes is 10.6.3. I cannot get iTunes 11 becuase my macbook  is OS X 10.5.8. Now that my phone is the current version, I can not connect it to iTunes. Any suggestions aside from getting a new computer?

  • SAP XI scenarios

    Hi! I succesfully implemented RFC to File, File to RFC via BPM scenario. I have one SAP ECC 6.0 system with 2 clients and SAP XI 7.0. What could be the next useful scenario to implement? What is the most useful scenario in SAP XI? Where can I find th

  • Mail not sorting folders alphabetlicaly

    Does lion not support this.  Has this issue been fixed???