OBJECT DESTRUCTION IN JAVA

import java.io.FileWriter;
import java.io.FileReader;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.MalformedURLException;
import java.io.FileOutputStream;
import au.com.bytecode.opencsv.CSVReader;
import au.com.bytecode.opencsv.CSVWriter;
import java.io.IOException;
import java.lang.ArrayIndexOutOfBoundsException;
import java.io.File;
public class Main {
        static void process(File iFile, File oFile) {
        FileReader input_file = null;
        CSVReader buff_input1 = null;
        BufferedReader buff_input2 = null;
        FileWriter osw_output = null;
        String line;
        String inputline;
        String[] input_record;
        String[] input2_record;
        String lat;
        String level;
    String l3;
        String l1;
        String l2;
        String app;
        String lon;
        URL myurl = null;
        int i = 0;
        try {
            input_file = new FileReader(iFile);
            buff_input1 = new CSVReader(input_file);
            osw_output = new FileWriter(oFile);
            input_record =buff_input1.readNext();
            while((input_record =buff_input1.readNext())!=null) {
               try{
                i = i+1;
                //System.out.println();
                String add1 = input_record[39];
                String add2 = input_record[40];
                String address = (add1+add2);
                address = address.replaceAll("#[^ ]*"," ");
                address = address.replaceAll("( ){2,}"," ");
                address = address.replaceAll("P[.| ]?O[.]? BOX [0-9]*"," ");
                address = address.replaceAll(" PH[^A-Z].*"," ");
                address = address.replaceAll(" STE[^A-Z].*"," ");
                address = address.replaceAll(" UNIT [^ ]*"," ");
                address = address.replaceAll(" APT [^ ]*"," ");
                address = address.replaceAll(" SUITE [^ ]*"," ");
                address = address.replaceAll(" [0-9A-Za-z]* FLOOR"," ");
                address = address.replaceAll("^[^0-9]*"," ");
                address = address.replaceAll("-[0-9][0-9]*"," ");
                address = address.replaceAll("( ){2,}"," ");
                String remaining_fields = (input_record[0]+input_record[1]+input_record[2]+input_record[3]+
                        input_record[4]+input_record[5]+input_record[6]+input_record[7]+
                        input_record[8]+input_record[9]+input_record[10]+input_record[11]+input_record[12]+
                        input_record[13]+input_record[14]+input_record[15]+input_record[16]+
                        input_record[17]+input_record[18]+input_record[19]+input_record[20]+input_record[21]+
                        input_record[22]+input_record[23]+input_record[24]+input_record[25]+
                        input_record[26]+input_record[27]+input_record[28]+input_record[29]+input_record[30]+
                        input_record[31]+input_record[32]+input_record[33]+input_record[34]+
                        input_record[35]+input_record[36]+input_record[37]+input_record[38]+input_record[39]+
                        input_record[40]+input_record[41]+input_record[42]+input_record[43]+input_record[44]+
                        input_record[45]+input_record[46]+input_record[47]+input_record[48]+input_record[49]+
                        input_record[50]+input_record[51]+input_record[52]+input_record[53]+input_record[54]+
                        input_record[55]+input_record[56]+input_record[57]+input_record[58]+input_record[59]+
                        input_record[60]+input_record[61]+input_record[62]+input_record[63]+input_record[64]);
                remaining_fields = remaining_fields.replaceAll("[^ -~]"," ");
                //return address;
               // address(address);
                String city = input_record[41];
                String state = input_record[42];
                String zip = input_record[43];
        String complete_address = address+","+city+","+state+" "+zip;
                myurl = new URL("http://stree1.cs.fiu.edu:88/street?street="+address+","+city+","+state+" "+zip); // This is where the problem lies, a new object is instatiated everytime the loop is executed.
                buff_input2 = new BufferedReader(new InputStreamReader(myurl.openStream()));
                inputline = buff_input2.readLine();
                input2_record = inputline.split("\t");
                l1 = input2_record[0];
                lat = l1.substring(2);
                l2 = input2_record[1];
                lon = l2.substring(2);
                //System.out.println("the lat:"+lat);
                //System.out.println("the lon:"+lon);
                inputline = buff_input2.readLine();
                input2_record = inputline.split("\t");
                l3 = input2_record[0];
        level = l3.substring(6);
                app  = input2_record[1];
                //System.out.println(level);
                //System.out.println(app);
                osw_output.append(input_record[0]+"\t"+input_record[1]+"\t"+input_record[2]+"\t"+input_record[3]+"\t"+input_record[4]+
                        "\t"+input_record[5]+"\t"+input_record[6]+"\t"+input_record[7]+
                        "\t"+input_record[8]+"\t"+input_record[9]+"\t"+input_record[10]+"\t"+input_record[11]+"\t"+input_record[12]+
                        "\t"+input_record[13]+"\t"+input_record[14]+"\t"+input_record[15]+"\t"+input_record[16]+
                        "\t"+input_record[17]+"\t"+input_record[18]+"\t"+input_record[19]+"\t"+input_record[20]+"\t"+input_record[21]+
                        "\t"+input_record[22]+"\t"+input_record[23]+"\t"+input_record[24]+"\t"+input_record[25]+
                        "\t"+input_record[26]+"\t"+input_record[27]+"\t"+input_record[28]+"\t"+input_record[29]+"\t"+input_record[30]+
                        "\t"+input_record[31]+"\t"+input_record[32]+"\t"+input_record[33]+"\t"+input_record[34]+
                        "\t"+input_record[35]+"\t"+input_record[36]+"\t"+input_record[37]+"\t"+input_record[38]+"\t"+input_record[39]+
                        "\t"+input_record[40]+"\t"+input_record[41]+"\t"+input_record[42]+"\t"+input_record[43]+"\t"+input_record[44]+
                        "\t"+input_record[45]+"\t"+input_record[46]+"\t"+input_record[47]+"\t"+input_record[48]+"\t"+input_record[49]+
                        "\t"+input_record[50]+"\t"+input_record[51]+"\t"+input_record[52]+"\t"+input_record[53]+"\t"+input_record[54]+
                        "\t"+input_record[55]+"\t"+input_record[56]+"\t"+input_record[57]+"\t"+input_record[58]+"\t"+input_record[59]+
                        "\t"+input_record[60]+"\t"+input_record[61]+"\t"+input_record[62]+"\t"+input_record[63]+"\t"+input_record[64]+
                        "\t"+lat+"\t"+lon+"\t"+level+"\t"+app);
                osw_output.append((char)13);
                osw_output.append((char)10);
                buff_input2.close();
                //System.out.println("Reached end of loop");
               catch(ArrayIndexOutOfBoundsException e)
                   String[] s = input_record;
            System.out.println("Malformed record located at row" + s + "system ignoring record and continuing");
    finally
             myurl = null;
         System.gc();// this is what I am using reluctantly, because when I run multiple instances of this program on different files, some processes are sitting idle. System.gc() helped me solve that problem but has made the system very slow. Is there a more efficient way of doing this?
            osw_output.flush();
            osw_output.close();
            input_file.close();
        } catch(MalformedURLException e) {
            System.out.println("IO ERROR!:"+e.getMessage());
        } catch(IOException ee) {
            System.out.println("URL ERROR!:"+ee.getMessage());
    public static void main(String[] args) {
        File iFile = new File(args[0]);
        File oFile = null;
        oFile =  new File(args[1]);
        process(iFile, oFile);
}In the above program I am supposed to read a file and add certain contants of the file to a URL and read back those results into another file. so in the while loop each record is executed one after the other. to do this I make a new URL object everytime in the while loop. This is ok when I run the program once. but if I multiple instances of the program on different files, some java processes just sit idol. I could determine that the URL objects were creating the problem and therefore I added (the Highly unrecommended) System.gc() in my finally block, which makes the program work like I want it to but has made the system extremely slow. Is there a more efficient way someone can suggest?...thank you.

jdkguy wrote:
In the above program I am supposed to read a file and add certain contants of the file to a URL and read back those results into another file. so in the while loop each record is executed one after the other. to do this I make a new URL object everytime in the while loop. This is ok when I run the program once. but if I multiple instances of the program on different files, some java processes just sit idol. I could determine that the URL objects were creating the problem and therefore I added (the Highly unrecommended) System.gc() in my finally block, which makes the program work like I want it to but has made the system extremely slow. Is there a more efficient way someone can suggest?...thank you.I didn't see anything that would cause other instances to block, other than maybe not closing the CSVReader, but I doubt that's it. How did you determine that some processes were idle? Are you running a profiler?
By the way, this:
                String remaining_fields = (input_record[0]+input_record[1]+input_record[2]+input_record[3]+
                        input_record[4]+input_record[5]+input_record[6]+input_record[7]+
                        input_record[8]+input_record[9]+input_record[10]+input_record[11]+input_record[12]+
                        input_record[13]+input_record[14]+input_record[15]+input_record[16]+
                        input_record[17]+input_record[18]+input_record[19]+input_record[20]+input_record[21]+
                        input_record[22]+input_record[23]+input_record[24]+input_record[25]+
                        input_record[26]+input_record[27]+input_record[28]+input_record[29]+input_record[30]+
                        input_record[31]+input_record[32]+input_record[33]+input_record[34]+
                        input_record[35]+input_record[36]+input_record[37]+input_record[38]+input_record[39]+
                        input_record[40]+input_record[41]+input_record[42]+input_record[43]+input_record[44]+
                        input_record[45]+input_record[46]+input_record[47]+input_record[48]+input_record[49]+
                        input_record[50]+input_record[51]+input_record[52]+input_record[53]+input_record[54]+
                        input_record[55]+input_record[56]+input_record[57]+input_record[58]+input_record[59]+
                        input_record[60]+input_record[61]+input_record[62]+input_record[63]+input_record[64]);is horrible. There's no reason to copy and paste all those elements individually, use a loop:
String remaining_fields = "";
for (int i=0; i<=64; i++) {
    remaining_fields += input_record;
}for (                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • OpenSQLException - object of type java.sql.Date is not normalized

    Hi,
    I am attempting to code an SQL query in an EJB and get the following exception:
    com.sap.sql.log.OpenSQLException: The object of type java.sql.Date with the value '2010-06-04 13:21:09.424' assigned to host variable 1 is not normalized. It must not contain time components in the time zone running the virtual machine. at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85) at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124) at com.sap.sql.jdbc.common.CommonPreparedStatement.setDate(CommonPreparedStatement.java:650) at......
    Below is the code snippet I am using:
                        private static String selWQ  = "Select * from ZZZZ_TABLE " +
                                                                       "where DATEFROM >= ? " +
                                                                  "and DATETO <= ? ";
         public UsageRecord[] getRecords(Date fromDate,Date toDate)
              UsageRecord[] ura = null;
              String q          = null;
              ArrayList al      = new ArrayList();
              try
                   q = selWQ;
                   conn.open();
                   PreparedStatement p = conn.prepareStatement(q);               
                   p.setDate(1, fromDate);
                   p.setDate(2,toDate);                    
                   ResultSet rs = p.executeQuery();
    I have a PreparedStatement and am using setDate to set the values. The fromDate and toDate parameters are of type java.sql.Date
    Can someone please tell me what I am doing wrong and how to fix it?
    thanks
    Brian

    As requested, here is an example of what I used to resolve this:
                   PreparedStatement p = conn.prepareStatement(q);
                   SimpleDateFormat ddf = new SimpleDateFormat("yyyy-MM-dd");
                                               String sFrom = ddf.format(new java.util.Date(fromDate));
                   String sTo   = ddf.format(new java.util.Date(toDate));
                   p.setDate(1, java.sql.Date.valueOf(sFrom));
                   p.setDate(2, java.sql.Date.valueOf(sTo));
                   ResultSet rs = p.executeQuery();
    fromDate and toDate are parameters of type long...
    regards
    Brian

  • Problem with return a ColdFusion query object from a Java class

    Hi!
    I need to return a ColdFusion query object from a Java class
    using a JDBC result set ( java.sql.ResultSet);
    I have tried to pass my JDBC result set in to the constructor
    of the coldfusion.sql.QueryTable class with this code:
    ColdFusion code
    <cfset pra = createObject("java","QueryUtil").init()>
    <cfset newQuery = CreateObject("java",
    "coldfusion.sql.QueryTable")>
    <cfset newQuery.init( pra.getColdFusionQuery () ) >
    My java class execute a query to db and return QueryTable
    Java code (QueryUtil.java)
    import coldfusion.sql.QueryTable; // (CFusion.jar for class
    QueryTable)
    import com.allaire.cfx //(cfx.jar for class Query used from
    QueryTable)
    public class QueryUtil
    public static coldfusion.sql.QueryTable
    getColdFusionQuery(java.sql.ResultSet rs)
    return new coldfusion.sql.QueryTable(rs);
    but when i run cfm page and coldfusion server tries to
    execute : "<cfset pra =
    createObject("java","QueryUtil").init()>" this error appears:
    Object Instantiation Exception.
    An exception occurred when instantiating a java object. The
    cause of this exception was that: coldfusion/sql/QueryTable.
    If i try to execute QueryUtil.java with Eclipse all it works.
    Also I have tried to return java.sql.ResultSet directly to
    coldfusion.sql.QueryTable.init () with failure.
    Do you know some other solution?

    ok
    i print all my code
    pratica.java execute a query to db and return a querytable
    java class
    import java.util.*;
    import java.sql.*;
    import coldfusion.sql.*;
    public class Pratica {
    private HashMap my;
    private String URI,LOGIN,PWD,DRIVER;
    private Connection conn=null;
    //funzione init
    //riceve due strutture converite in hashmap
    // globals
    // dbprop
    public Pratica(HashMap globals,HashMap dbprop) {
    my = new HashMap();
    my.put("GLOBALS",globals);
    my.put("DBPROP",dbprop);
    URI = "jdbc:sqlserver://it-bra-s0016;databaseName=nmobl";
    LOGIN = "usr_dev";
    PWD = "developer";
    DRIVER = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
    try{
    // Carico il driver JDBC per la connessione con il database
    MySQL
    Class.forName(DRIVER);
    /* Connessione alla base di dati */
    conn=DriverManager.getConnection(URI,LOGIN,PWD);
    if(conn!=null) System.out.println("Connection Successful!");
    } catch (ClassNotFoundException e) {
    // Could not find the database driver
    System.out.print("\ndriver non trovato "+e.getMessage());
    System.out.flush();
    catch (SQLException e) {
    // Could not connect to the database
    System.out.print("\nConnessione fallita "+e.getMessage());
    System.out.flush();
    //funzione search
    //riceve un hash map con i filtri di ricerca
    public QueryTable search(/*HashMap arg*/) {
    ResultSet rs=null;
    Statement stmt=null;
    QueryTable ret=null;
    String query="SELECT * FROM TAN100pratiche";
    try{
    stmt = conn.createStatement();// Creo lo Statement per
    l'esecuzione della query
    rs=stmt.executeQuery(query);
    // while (rs.next()) {
    // System.out.println(rs.getString("descrizione"));
    catch (Exception e) {
    e.printStackTrace();
    try {
    ret = Pratica.RsToQueryTable(rs);
    } catch (SQLException e) {
    e.printStackTrace();
    this.close();
    return(ret);
    // ret=this.RsToQuery(rs);
    // this.close(); //chiude le connessioni,recordset e
    statament
    //retstruct CF vede HashMap come struct
    //METODO DI TEST
    public HashMap retstruct(){
    return(my);
    //conversione resultset to querytable
    private static QueryTable RsToQueryTable(ResultSet rs)
    throws SQLException{
    return new QueryTable(rs);
    //chiura resultset statament e connessione
    private void close(){
    try{
    conn.close();
    conn=null;
    catch (Exception e) {
    e.printStackTrace();
    coldfusion code
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
    Transitional//EN">
    <html>
    <head>
    <title>Test JDBC CFML Using CFScript</title>
    </head>
    <body>
    <cftry>
    <cfset glb_map =
    createObject("java","java.util.HashMap")>
    <cfset dbprop_map =
    createObject("java","java.util.HashMap")>
    <cfset glb_map.init(glb)> <!---are passed from
    another page--->
    <cfset dbprop_map.init(glb["DBPROP"])>
    <cfset pra =
    createObject("java","Pratica").init(glb_map,dbprop_map)>
    <cfset ourQuery
    =createObject("java","coldfusion.sql.QueryTable").init(pra.search())>
    <cfcatch>
    <h2>Error - info below</h2>
    <cfdump var="#cfcatch#"><cfabort>
    </cfcatch>
    </cftry>
    <h2>Success - statement dumped below</h2>
    <cfdump var="#ourQuery#">
    </body>
    </html>
    error at line <cfset pra =
    createObject("java","Pratica").init(glb_map,dbprop_map)>
    An exception occurred when instantiating a java object. The
    cause of this exception was that: coldfusion/sql/QueryTable.
    -----------------------------------------------------------------------

  • How to  get the profile object in simple java class  (Property accessor)

    Hi All,
    Please guide me how to get the profile object in simple java class (Property accessor) which is extending the RepositoryPropertyDescriptor.
    I have one requirement where i need the profile object i.e i have store id which is tied to profile .so i need the profile object in the property accessor of the SKU item descriptor property, which is extending RepositoryPropertyDescriptor.
    a.I dont have request object also to do request.resolvename.
    b.It is not a component to create setter and getter.It is simple java class which is extending the RepositoryPropertyDescriptor.
    Advance Thanks.

    Iam afraid you might run into synchronization issues with it. You are trying to get/set value of property of a sku repository item that is shared across various profiles.
    Say one profile A called setPropertyValue("propertyName", value).Now another profile B accesses
    getPropertyValue() {
    super.getPropertyValue() // Chance of getting value set by Profile A.
    // Perform logic
    There is a chance that profile B getting the value set by Profile A and hence inconsistency.
    How about doing this way??
    Create PropertyDescriptor in Profile (i.e user item descriptor), pass the attribute CustomCatalogTools in userProfile.xml to that property.
    <attribute name="catalogTools" value="atg.commerce.catalog.CustomCatalogTools"/>
    getPropertyValue()
    //You have Profile item descriptor and also storeId property value.
    // Use CustomCatalogTools.findSku();
    // Use storeId, profile repository item, sku repository item to perform the logic
    Here user itemdescriptor getPropertyValue/setPropertyValue is always called by same profile and there is consistency.
    -karthik

  • Webutil_file_transfer url_to_client places objects in the Java Cache

    Hi,
    I'm using webutil_file_transfer url_to_client to download a PDF file.
    Once I downloaded the PDF file, it is visible in the Client Java Cache Viewer. When I try to run the download again webutil takes the PDF from the Cache instead taking the newer PDF from the Server where the URL is pointing to.
    So the URL I passing is each time the same, but the PDF file on the Server is getting updated very often.
    I don't usethe WEBCACHE port!
    My question now is. Can I avoid webutil to put does PDF file in the Java Cache on the Client. Or is there any utility to remove selected objects from the Java Cache.
    Does anybody have a Idea how to avoid such a behaviour?
    Fatih

    Hi Craig,
    with the help of Oracle Support, we found the reason and also a workaround for this issue.
    The real cause:
    By default the java applet parameter DefaultUseCaches is true an all files downloaded within an applet is going throug the Java Client Cache.
    WEBUTIL does not touch this parameter, so it keeps staying default (true).
    Solution/workaround:
    With the methode setDefaultUseCaches it possible to disable/enable the default Cache setting.
    So it's possible to disable the cache with a small Java Bean running in Forms, which disable the Cache before WEBUTIL_FILE_TRANSFER and enable it after the successfull download.
    here is an extract of the bean code:
    URL u = new URL( "http:" );
    URLConnection uc = u.openConnection();
    uc.setDefaultUseCaches(false);
    thank you for your time!
    regards,
    Fatih

  • ADF: JBO-25009: Cannot create an object of type:java.math.Bi. Jdev 11.1.2.3

    Hi,
    I have created a tree structure on the left side of the page and a table on the right hand of the page. My requirement is that when I click on the node on the left side, the table on the right needs to be refreshed. For the time being the tree nodes on the left side is just one level. Eveytime I click on the node, I get the following error
    <RichExceptionHandler> <_logUnhandledException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
    javax.el.ELException: oracle.jbo.domain.DataCreationException: JBO-25009: Cannot create an object of type:java.math.BigDecimal from type:java.lang.String with value:Restricted
    at com.sun.el.parser.AstValue.invoke(Unknown Source)
    at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1589)
    at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:237)
    at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:308)
    at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:157)
    at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:244)
    at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:308)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:112)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:106)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1137)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:361)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: oracle.jbo.domain.DataCreationException: JBO-25009: Cannot create an object of type:java.math.BigDecimal from type:java.lang.String with value:Restricted
    at oracle.jbo.common.JboTypeMapEntries$2.convert(JboTypeMapEntries.java:135)
    at oracle.jbo.domain.TypeFactory.get(TypeFactory.java:869)
    at oracle.jbo.domain.TypeFactory.getInstance(TypeFactory.java:116)
    at oracle.jbo.server.AttributeDefImpl.convertToJava(AttributeDefImpl.java:2220)
    at oracle.jbo.server.ViewRowSetImpl.prepKeyForFind(ViewRowSetImpl.java:5377)
    at oracle.jbo.server.ViewRowSetImpl.findByKey(ViewRowSetImpl.java:5394)
    at oracle.jbo.server.ViewRowSetImpl.findByKey(ViewRowSetImpl.java:5296)
    at oracle.jbo.server.ViewRowSetImpl.findByKey(ViewRowSetImpl.java:5290)
    at oracle.jbo.server.ViewObjectImpl.findByKey(ViewObjectImpl.java:11628)
    at oracle.jbo.uicli.binding.JUCtrlHierNodeBinding.syncTargetIter(JUCtrlHierNodeBinding.java:641)
    at oracle.jbo.uicli.binding.JUCtrlHierNodeBinding.internalSetCurrentRow(JUCtrlHierNodeBinding.java:617)
    at oracle.jbo.uicli.binding.JUCtrlHierNodeBinding.syncCurrentRow(JUCtrlHierNodeBinding.java:547)
    at oracle.jbo.uicli.binding.JUCtrlHierNodeBinding.setRowAsCurrentOnTargetIterator(JUCtrlHierNodeBinding.java:561)
    at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierNodeBinding.setRowAsCurrentOnTargetIterator(FacesCtrlHierNodeBinding.java:147)
    at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel.makeCurrent(FacesCtrlHierBinding.java:685)
    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:597)
    ... 58 more
    Caused by: java.lang.NumberFormatException
    at java.math.BigDecimal.<init>(BigDecimal.java:459)
    at java.math.BigDecimal.<init>(BigDecimal.java:728)
    at oracle.jbo.common.JboTypeMapEntries$2.convert(JboTypeMapEntries.java:129)
    ... 76 more
    Please can you let me know how I can resolve this issue.
    Thanks

    Hi, I have rechecked this issue. In the bug they say that Big Integer should be changed to Big Decimal to resolve the issue. I checked my application and saw that there is no Big Interger. Please can you guide me further.

  • Usage of Object Cache for Java in J2EE apps

    Hi,
    we are investigating on whether we can use the Object Cache for Java
    (OCS4J) for our requirements. The question we have come across is:
    What is the designated way of integration for the Object cache to fit
    into the J2EE environment? Unfortunately, although the current manuals
    group OCS4J into the "Oracle Containers for J2EE Services Guide" and the
    suggested package name for the whole thing in JSR 107 seems to be
    javax.util.jcache, there is very little documentation on how the
    designers would like J2EE programmers to use the cache from within a
    J2EE app and all examples given are not from within a J2EE environment.
    We are in particular thinking about a hierarchy of several cache
    "compartments" (Region->Subregion->group) for different topics and using
    the hierarchical name of the cache (region.subregion.group) as the
    primary key for BMP Entity beans, each of them having their own
    CacheAccess object. Then we would have an API of stateless Session beans
    on top of that, which would be determining the cache "compartment", get
    the appropriate Entity Bean with the Cache Access object and then do the
    required operations on the cache.
    But then we immediately run into the question of how the mapping between
    Cache Objects and CacheAccess objects will be done etc.
    So is there anybody that can give us any hints how to use the OCS4J in
    an EJB scenario?
    Thanks in advance for any help!
    Andreas Loew
    [email protected]

    We have Java client requesting over HTTP to application server. We would like to cache some of the objects created by the servlet while serving the request. Can I use the OCS4J for caching the Java objects. Do I require any software or just copying the JAR file and importing the class would serve the purpose?
    Regards
    Arun

  • Access jsp's application object from an .java file?

    Hi,
    I hava a .jsp page and an import statement to a .java file. How can I access the application object in this .java file?
    I want to make an initialization function that I want to be called in every .jsp of the WEB application and to store this function in a .java file.

    The only way to get a hold of the application object would be to pass it to java code as a parameter to a method.
    ie public class Util{
    public void initialiseJSPPage(ServletContext application){
      // do stuff in ServletContext
    }and then in the JSP call it via
    <% Util.initialiseJSPPage(application); %>
    You could manually include this code on every JSP.
    A better alternative is that in web.xml you can configure an automatic include (See JSP.3.3.5)
    What is it you are trying to accomplish by doing this?
    Would a Filter be a more appropriate tool in this case? That would let you run java code before selected requests are handled.
    Cheers,
    evnafets

  • Javax.naming.NameNotFoundException: No object bound for java:comp/env/...

    Help, help! I have a problem:
    javax.naming.NameNotFoundException: No object bound for java:comp/env/configuratorDataSource
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:116)
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:127)
    at javax.naming.InitialContext.lookup(InitialContext.java:355)
    at oracle.toplink.jndi.JNDIConnector.connect(Unknown Source)
    at oracle.toplink.sessions.DatabaseLogin.connect(Unknown Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
    at oracle.toplink.threetier.ConnectionPool.buildConnection(Unknown Source)
    at oracle.toplink.threetier.ConnectionPool.startUp(Unknown Source)
    at oracle.toplink.threetier.ServerSession.connect(Unknown Source)
    at oracle.toplink.publicinterface.DatabaseSession.login(Unknown Source)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
    at com.configurator.datasource.ToplinkClientSessionManager.<init>(ToplinkClientSessionManager.java:18)
    at com.configurator.datasource.ToplinkClientSessionManager.getInstance(ToplinkClientSessionManager.java:33
    at com.configurator.persistence.PersistenceManagerImpl.<init>(PersistenceManagerImpl.java:16)
    at com.configurator.ConfiguratorServiceMediatorImpl.getModelsFromDB(ConfiguratorServiceMediatorImpl.java:3
    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.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:384)
    at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:281)
    at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:450)
    at org.apache.axis.server.AxisServer.invoke(AxisServer.java:285)
    at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:653)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:301)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
    at java.lang.Thread.run(Thread.java:595)
    code:
    initialContext = new InitialContext();
    LocalStatelessREHome localHome = (LocalStatelessREHome)initialContext.lookup("java:comp/env/StatelessREBean");
    in web.xml:
    <ejb-local-ref>
    <ejb-ref-name>StatelessREBean</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>com.re.stateless.ejb.LocalStatelessREHome</local-home>
    <local>com.re.stateless.ejb.LocalStatelessRE</local>
    <ejb-link>StatelessREBean</ejb-link>
    </ejb-local-ref>
    Any help will be appreciated! Thanks in advance.

    Try removing the JNDI fully qualified name (i.e. java:comp\env\) Use the name of your bean to lookup.
    It worked for me when i used to get a similar exception.

  • Looking for answer keys for "Object First with Java"

    Where can I find a book with anwser keys for the book " Object First with Java" Third Edition?

    zxcvbnm wrote:
    Where can I find a book with anwser keys for the book " Object First with Java" Third Edition?This ought to be an interesting thread. :)

  • Trying to pass Oracle array/object type to Java

    I have a Java class with two inner classes that are loaded into Oracle:
    public class PDFJ
        public static class TextObject
            public String font_name;
            public int font_size;
            public String font_style;
            public String text_string;
        public static class ColumnObject
            public int left_pos;
            public int right_pos;
            public int top_pos;
            public int bottom_pos;
            public int leading;
            public TextObject[] column_texts;
    }I have object types in Oracle as such that bind to the Java classes:
    CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_TEXT" AS OBJECT
    EXTERNAL NAME 'PDFJ$TextObject'
    LANGUAGE JAVA
    USING SQLData(
      "FONT_NAME" VARCHAR2(25) EXTERNAL NAME 'font_name',
      "FONT_SIZE" NUMBER EXTERNAL NAME 'font_size',
      "FONT_STYLE" VARCHAR2(1) EXTERNAL NAME 'font_style',
      "TEXT_STRING" VARCHAR2(4000) EXTERNAL NAME 'text_string'
    CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_TEXT_ARRAY" AS
      TABLE OF "PROGRAMMER"."PDFJ_TEXT";
    CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_COLUMN" AS OBJECT
    EXTERNAL NAME 'PDFJ$ColumnObject'
    LANGUAGE JAVA
    USING SQLData(
      "LEFT_POS" NUMBER EXTERNAL NAME 'left_pos',
      "RIGHT_POS" NUMBER EXTERNAL NAME 'right_pos',
      "TOP_POS" NUMBER EXTERNAL NAME 'top_pos',
      "BOTTOM_POS" NUMBER EXTERNAL NAME 'bottom_pos',
      "LEADING" NUMBER EXTERNAL NAME 'leading',
      "COLUMN_TEXTS" "PROGRAMMER"."PDFJ_TEXT_ARRAY" EXTERNAL NAME 'column_texts'
    CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_COLUMN_ARRAY" AS
        TABLE OF "PROGRAMMER"."PDFJ_COLUMN";
    /I successfully (as far as I know) build a PDFJ_COLUMN_ARRAY object in a PL/SQL procedure. The PDFJ_COLUMN_ARRAY contains PDFJ_COLUMN objects; each of those objects contains a PDFJ_TEXT_ARRAY of PDFJ_TEXT objects (Example: pdf_column_array(i).pdf_text_array(i).text_string := 'something';). In this procedure, I pass this PDFJ_COLUMN_ARRAY as a parameter to a Java function. I assume the Java function parameter is supposed to be a oracle.sql.ARRAY object.
    I cannot figure out how to decompose this generic ARRAY object into a ColumnObject[] array. I also tried Googling and searching the forums, but I can't figure out matching search criteria. I was wondering if anyone here knows anything about passing user-defined Oracle type objects to a Java function and retrieving the user-defined Java class equivalents that they are supposedly mapped to--especially a user-defined array type of user-defined object types containing another user-defined array type of user-defined object types.

    Ok. I will try asking on the JDBC forum. So, don't
    flame me for cross-posting. :PWe won't, if over there you just post basically a
    link to this one.
    sigh Guess what, he did it the flame-deserving way. It's crossposted at:
    http://forum.java.sun.com/thread.jspa?threadID=602805
    <flame level="mild">Never ceases to amaze me how people don't think that posting a duplicate rather than a simple link isn't wasteful, as people could end up answering in both of them, not seeing each other's answers</flame>

  • Failed to load value at index 22 with java object of type java.lang.String

    Hi all,
    As i am trying to open the notifications created from Administartor Workflow ,
    It throws a below error::
    oracle.apps.fnd.framework.OAException: oracle.jbo.AttributeLoadException: JBO-27022: Failed to load value at index 22 with java object of type java.lang.String due to java.sql.SQLException. at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:912) at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:886) at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:1009) at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:211) at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:720) at oracle.apps.ap.oie.workflow.apexp.webui.NotifExpLinesCO.processRequest(NotifExpLinesCO.java:116) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:600) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.process
    java.sql.SQLException: Invalid column index
    at oracle.jdbc.driver.OracleResultSetImpl.getObject(OracleResultSetImpl.java:1042) at oracle.jbo.server.OracleSQLBuilderImpl.doLoadFromResultSet(OracleSQLBuilderImpl.java:1198) at oracle.jbo.server.AttributeDefImpl.loadFromResultSet(AttributeDefImpl.java:1633) at oracle.jbo.server.ViewRowImpl.populate(ViewRowImpl.java:2221).
    No extensions done in the page
    Please let me know the cause for this error ASAP
    Thanks
    Kash

    Problem solved. set the datatype as timestamp for that attribute in buissiness object.

  • Casting object refrences in java

    hello
    i am stuck with a problem.i need a solution from you guys out there.i want to know how to cast object references in java.please provide me with a sampe code that does object casting.i need it very urgently.i hope you guys will help me in this matter and do the needful.
    thanks & regards
    vikamgdg

    This may be a bit premature, but I call troll.
    http://forum.java.sun.com/thread.jsp?thread=538948&forum=31
    http://forum.java.sun.com/thread.jsp?thread=538801&forum=31
    http://forum.java.sun.com/thread.jsp?thread=538785&forum=31
    If vikramgdg doesn't actually possess the "Troll-nature"&#153;, it needs to read "How To Ask Questions The Smart Way".

  • Create and bind javafx objects out of java

    hello,
    iam start to learn javafx and cant find the right way to do what i want.
    the goal is: i have written a graph datastructure in java and want to parse a xml file. for every String in the xml file a new node in the graph should be created. this node holds the data and a position (2D). now evertime a node in the graph was created, a visual representation for this node should pop out in my javafx stage. when the position of the node changed the visual rep. should notice this or rather a function on this object is called (observer).
    is javafx an approach to do so? or should i use java2d?
    do you know a tutorial where i can learn how to create an call javafx objects out of java and how to put them into the stage/scene?
    i found this: http://java.sun.com/developer/technicalArticles/scripting/javafx/javafx_and_java/index.html
    but there is not mentioned how to put the object into the stage/scene.
    regards
    peter

    thanks. this is also a good article. [http://blogs.sun.com/michaelheinrichs/entry/binding_java_objects_in_javafx|http://blogs.sun.com/michaelheinrichs/entry/binding_java_objects_in_javafx]
    Edited by: iam_peter on May 23, 2009 4:49 AM

  • Callable object for WD java

    Hi Experts,
    I am new to GP, and i need your help to design my GP.I am a web dynpro developer . I want very basic process to be implemented through GP as follows
    1) Employee gets a UI screen for filling some requisition form (in WD java) which wud hit R3
    2) Employee's supervisor can Approve / Reject requisition . (UI in WD JAVA)
    3) Employee should get a summary of whole process  (Again UI in WD JAVA).
    When i am creating calling object for above process and under UI category there are two different type of callable object for wd java
    1 ) Web dynpro component (GP interface)
    2)  Web dynpro application
    when i am creating ( Web dynpro application ) callable object , its giving me error , maybe some config problem .
    can anyone just guide me how to implement above process or give me some material through GP (WD java UI) and whats diff between two kinds of callable object.Thanks in advance.
    Regards,
    Abhay

    Hi Abhay,
    You can design your process by this way:
    1) Employee gets a UI screen for filling some requisition form (in WD java) which wud hit R3
    If you need to update R3 at this time, you can create a custom WD Java calling a RFC. To do that, you may use WD with GP API (https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/50d74ada-0c01-0010-07a8-8c118d408e59 ) or you may call your RFC directly by External Service Callable Object (https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7c313ada-0c01-0010-dfba-9ac88b353a47). It depends of how you will design your process.
    IE:
    Custom WD Screen that will have input fields and will update R3 -> use GP API
    Standard input screen -> use Data Input Form and to update R3 use External Service CO
    2) Employee's supervisor can Approve / Reject requisition . (UI in WD JAVA)
    You can use Visual Approval standard Callable Object to do that. If you need to update R3 according with approval results, you can insert the External Service CO as next step according with result. To accomplish that you must set Result States.
    3) Employee should get a summary of whole process (Again UI in WD JAVA).
    Data Display Form standard Callable Object give you exactly what you want.
    Scenario 1: WD Custom UI that update R3 -> Visual Approval CO -> Data Display Form
    Scenario 2: Data Input Form -> Visual Approval CO -> External Service CO -> Data Display Form
    Reward points if itu2019s helpful.

Maybe you are looking for

  • None of fact sources are compatible with detail filter

    Hello We have 2 facts and 7 dimensions defined in physical layer and below are the relationships between them D1, D2, D3, D4, D5 are conformed dimensions and all joined to F1 and F2 D6 is joined to F1 D7 is joined to F2. In BMM layer, I combined two

  • Nokia X3 update problem

    Hi,      I've updated my phone and the following has happend: I can't take photos because it says: "please Wait" for a lond period of time; I can't open any photos I pass onto my phone or that I have taken with the camera; also i have lost all of my

  • Grey background in viewer and canvas

    Hi all, I don't know how it happened but the background (on the sides of my viewable clip) is grey. I thought that it used to be black. For some reason, it's annoying me. Any idea's? -Pk

  • Activation question: Lightroom

    If I deactivate LR CC on my computer #1 so that I can activate it on computer #3 Will I be able to reactivate it on #1 whenever I want in the future (even multiple times) as long as I deactivate it on another computer so that I only have it on 2 at a

  • Retreiving email from roadrunner

    My setting are to remove email from server right away. But it leaves a copy on roadrunner service. Only have problem from my mac . Road runner said it a apple problem. How can I fix this ?