Help Understanding desupported method in 10.1.3

Can someone explain this from the list of things desupported in 10.1.3 @
http://www.oracle.com/technology/products/jdev/htdocs/10.1.3.0.3/desupport1013g.html
Data Web Beans and HTML Web Beans (JSP Pages)
The recommended approach for developing new databound JSP pages is to use ADF data binding with JavaServer
Faces (JSF) components. Regular (non-JSF) JSP pages using ADF databinding with the JSTL tag library and
standard EL expressions are also fully supported. If you add components to a new JSP page using ADF
databinding and the Data Control Palette, you are automatically using the new, recommended approach.
Note that you cannot mix deprecated and new-style tags in a single JSP page.
So if you're not using JSF or ADF Databinding but you are creating the data beans yourself (via some handwritten JDBC) and displaying them with JSTL is this saying you can't do that or am I missing the point?
The reason I ask is that i've got an existing app that does the above (i.e. no JSF or ADF) but now won't work with JDeveloper 10.1.3.0.3. I get a compile error 'Error(25): Expression Language not supported in compile time attribute items' on the JSTL ForEach. Works fine with 10.1.2.
Before anyone says that there's better ways to do this I know (hence ADF etc) - i just want to understand why it won't work with 10.1.3.
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@ page contentType="text/html;charset=windows-1252"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>untitled</title>
<script language="JavaScript">
function submitForm(val) {
document.results.brokerId.value = val;
document.results.submit();
</script>
</head>
<body>
<P>The search has returned multiple results. Please select the appropriate record :</P>
<table cellspacing="2" cellpadding="3" border="1" width="100%">
<c:forEach items="${brokers.brokersList}" var="broker">
<tr>
<td>
<a href="javascript:submitForm(<c:out value='${broker[brokerId"}'/>)">Select</a>
</td>
<td>
<c:out value='${broker["brokerId"]}'/>
</td>
<td>
<c:out value='${broker["parentName"]}'/>
</td>
</tr>
</c:forEach>
</table>
<P>
<form name="results" method="POST" action="/myApp/getBrokerAction.do">
<input type="hidden" name="brokerId"/>
</form>
</P>
</body>

Hello,
have you installed the database 10.1.2 AFTER developer suite 10.1.2. ?
In this case, the problem may be the PATH
You can use a BAT file to set the PATH :
example:
title ODS 10.1.2
set ORACLE_HOME=e:\oracle\ods1012
set CLASSPATH=%ORACLE_HOME%\jlib\bigraphbean.jar;%ORACLE_HOME%\jlib\LW_PfjBean.jar;%ORACLE_HOME%\jlib\bigraphbean-nls.zip;%ORACLE_HOME%\reports\jlib\rwrun.jar
set PATH=e:\oracle\ods1012\bin;e:\oracle\ods1012\jdk\jre\bin;e:\oracle\ods1012\jdk\jre\bin\classic;e:\oracle\ods1012\jdk\jre\bin\classic;e:\oracle\ods1012\jlib;e:\oracle\ods1012\jdk\bin;c:\winnt;c:\winnt\system32
E:
cd \oracle\ods1012\bin
For the standalone OC4J , you can add a line:
set PATH=..
in the bat file startinst.bat
Regards

Similar Messages

  • Dont understand Synchronized method to complete program

    I'm trying to finish theis program but i don't understand synchronized methods. I checked the java tutorial and i am still confused. Can someone help me approach finishing this program. Here is the spec and the first part of the program i have done.
    ===================================================================================
    When the above is working, create a class called Food. The objective here is to demonstrate the behavior of threads that share data, and use synchronized methods.
    Simulating an animal eating, simply means that the thread will sleep for some length of time.
    There is one instance of the Food class that is shared by both of the animals. Pass it to the constructor of the Animal class.
    There is a method in the Food class called eat(). This method is synchronized, i.e., only one Animal can be eating at a time.
    The rabbit eats the food (the thread will sleep) for a longer time than the turtle, thus giving an advantage to the rabbit.
    But, the turtle must wait until the rabbit is done eating until it can eat, so the advantage is reduced. Print out a message in the eat method when the animal begins to eat, and when it is done eating. Indicate which animal it is that starts to eat.
    Try making the eat method not synchronized, and observe the different behavior if the eat method allows the rabbit to begin eating before the turtle is done eating
       import java.util.Random;
        public class Animal extends Thread implements Runnable{
          private String name;
          private int position;
          private int speed;
          private int restMax;
          public static boolean winner = false;
          Random random = new Random();
           public Animal (String name, int position, int speed,int restMax){
             this.name = name;
             this.position = position;
             this.speed = speed;
             this.restMax = restMax;
           public void run(){
             try{
                while( winner == false){
                   if(position < 100){
                      Thread.sleep(random.nextInt(restMax));
                      position += speed ;
                      System.out.println(name+" is in "+ position+" position ");
                   if (position >= 100){
                      winner = true;
                      System.out.println(name+" is the winner");
                      System.exit(0);
                 catch(InterruptedException e){
           public static void main(String[] args){
             Animal rabbit = new Animal("trix", 0, 5, 150);
             Animal turtle = new Animal("maury",0, 3, 100);
             rabbit.start();
             turtle.start();
       }

    Example:class Donkeyphile implements Runnable {       
        private Donkey donkey;
        private long time;
        Donkeyphile(Donkey donkey, long time) {
            this.donkey = donkey;
            this.time = time;
        public void run() {
            for (int i = 0; i < 10; i++) {
                donkey.love(time);
        public static void main(String[] args) {
            Donkey donkey = new Donkey();
            Donkeyphile jverd = new Donkeyphile(donkey, 500);
            Donkeyphile yawmark = new Donkeyphile(donkey, 100);
            Thread j = new Thread(jverd, "Jverd");
            Thread y = new Thread(yawmark, "Yawmark");
            j.start();
            y.start();
    class Donkey {
        synchronized void love(long time) {
            String name = Thread.currentThread().getName();
            System.out.println(name + " hugs the donkey.");
            try { Thread.sleep(time); } catch (InterruptedException e) { }
            System.out.println(name + " releases the donkey.");
    }

  • I need help understanding how the Apple components integrate to create a system across all my devices?

    I need help understanding how the Apple components connect to create a whole system across all my devices?
    Is there a resource that describes current system and associated functionality?
    For example:
    Buy A, B, C to achieve "X" 
    You will need:
    an internet provider which supports <specs>
    add D to achieve "Y"
    You will need:
    an internet provider which supports <specs>
    add "E" to achieve "Z"
    You will need:
    an internet provider which supports <specs>
    For example, I am looking at the Gen 6 Airport extreme.  For intended performance do I need broadband? if so what are the specs, or will basic internet service suffice?  Do I need the internet provider's modem or does the Airport extreme replace that?  And then I think, if I am doing this, I should also look at Apple TV....What do I need and Why?  Then I look at the New Desk top coming out in the fall, and I think well, if I wait and get this, what does this component do for the system, and what becomes redundant? What does this awesome desktop do for my ability to sit and use a new macbook air when I travel  or sit on the couch in my PJs?
    If there was a place that plainly stated "if you buy the new dektop you can configure a system including only these components and achieve <this result> and by adding <additional components> you will achieve this result.
    I have been to the genius store a few times, but I come out of there more confused unless I have SPECIFIC questions or already know what to buy. 
    A "System Configuration App" would be a really great sales tool--Just saying.

    I have no idea what "fully optimized" means.
    No Apple device will let you watch broadcast TV. The Apple TV is a good option for watching streaming TV from iTunes, NetFlix and Hulu. If you want to watch from other sources, you may need to look at other devices.
    Any Mac computer or iPad will allow you to surf the web.
    What business software?
    Time Capsule is a good option for back ups.
    Update what across all devices?
    For accessing documents from all devices, a service like Dropbox is your best bet.
    I have no idea what "step as far away from an internet provider as possible" means. If you want Internet access, you need an Internet provider.
    Lighting fast speed for what? Processor? The specs are listed for all devices in the Online Store. Internet? We're back to the service provider.
    Technology changes. The only way to keep pace with it beyond a couple of years is to buy new stuff.
    The bottom line is you need to look at the specs for devices availble and at your budget and decide what best meets your needs. If you are unable to do that on your own, there are lot of technology consultants out there who will, for a fee, look at your exact situation, make recommendations and even handle the purchase and set up. Perhaps that would be the best route for you.
    Best of luck.

  • Import finished with few errors...Help understanding it!

    Hi all,
    Yesterday, I finished to do an import in oracle. I used the impdp command and got few errors after the import was done. Here are some bits from my log. It was very long but I shortened it with the most common errors. I would appreciate your help understanding what does each error mean, and whether there's a solution available.
    Thanks!
    El sql que falla es:
    CREATE TABLESPACE "SYSAUX" DATAFILE SIZE 125829120 LOGGING ONLINE PERMANENT BLOCKSIZE 16384 EXTENT MANAGEMENT LOCAL AUTOALLOCATE DEFAULT NOCOMPRESS SEGMENT SPACE MANAGEMENT AUTO
    ORA-39083: Fallo de creación del tipo de objeto TABLESPACE con el error:
    ORA-02236: nombre de archivo no válido
    El sql que falla es:
    CREATE TABLESPACE "IN_SGC_BD" DATAFILE '+DISKGROUP_BD/sgtc/datafile/rsgtc_in_sgt_bd1' SIZE 132120576 LOGGING ONLINE PERMANENT BLOCKSIZE 16384 EXTENT MANAGEMENT LOCAL AUTOALLOCATE DEFAULT NOCOMPRESS SEGMENT SPACE MANAGEMENT MANUAL
    Procesando el tipo de objeto DATABASE_EXPORT/PASSWORD_VERIFY_FUNCTION
    ORA-31684: El tipo de objeto PASSWORD_VERIFY_FUNCTION ya existe
    Procesando el tipo de objeto DATABASE_EXPORT/SCHEMA/SEQUENCE/GRANT/OWNER_GRANT/OBJECT_GRANT
    ORA-39111: Se ha saltado el tipo de objeto dependiente OBJECT_GRANT:"SYSTEM", ya existe el tipo de objeto base SEQUENCE:"SYSTEM"."SDE_LOGFILE_LID_GEN"
    ORA-39083: Fallo de creación del tipo de objeto SYNONYM con el error:
    ORA-00995: falta el identificador de sinónimos o no es válido
    BEGIN
    dbms_resource_manager.create_consumer_group('AUTO_TASK_CONSUMER_GROUP','System maintenance task consumer group','ROUND-ROBIN');COMMIT; END;
    Procesando el tipo de objeto DATABASE_EXPORT/SYSTEM_PROCOBJACT/POST_SYSTEM_ACTIONS/PROCACT_SYSTEM
    ORA-39083: Fallo de creación del tipo de objeto PROCACT_SYSTEM con el error:
    ORA-29393: el usuario JAIMESP no existe o no está conectado
    El sql que falla es:
    BEGIN
    dbms_resource_manager.create_plan_directive('PLAN_DIA','SGTC_USR','',30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,30,600,5,'SGTC_SWITCH',NULL,TRUE,NULL,10240,1800,900,1800);
    dbms_resource_manager.create_plan_directive('PLAN_DIA','SGTC_EDITOR','',40,NULL,NULL,NULL,NULL,NULL,NULL,NULL,10,600,10,'SGTC_SWITCH',NULL,TRUE,NULL,512000,1800,600,3600);
    dbms_r
    ORA-39083: Fallo de creación del tipo de objeto PROCACT_SYSTEM con el error:
    ORA-06550: línea 2, columna 72:
    PLS-00103: Se ha encontrado el símbolo "CHECK" cuando se esperaba uno de los siguientes:
    in like like2 like4 likec between member submultiset
    Procesando el tipo de objeto DATABASE_EXPORT/SCHEMA/TABLE/TABLE
    ORA-39151: La tabla "OUTLN"."OL$" existe. Todos los metadados dependientes y los datos se saltarán debido table_exists_action de saltar
    Procesando el tipo de objeto DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA
    . . "SIGELEC"."SDE_BLK_37" 4.976 KB 0 filas importadas
    . . "SIGELEC"."SDE_BLK_38" 4.968 KB 0 filas importadas
    . . "SGC_BD"."BDE_CRECOBJE" 5.234 KB 0 filas importadas
    . . "SIGELEC"."D418" 4.851 KB 0 filas importadas
    . . "SYSTEM"."DBM_TOPSQL" 6.125 KB 0 filas importadas
    . . "SIGELEC"."F100" 5.562 KB 0 filas importadas
    . . "SIGELEC"."F101" 5.593 KB 0 filas importadas
    . . "SIGELEC"."F102" 14.77 KB 11 filas importadas
    Procesando el tipo de objeto DATABASE_EXPORT/SCHEMA/PROCEDURE/ALTER_PROCEDURE
    ORA-39082: El tipo de objeto ALTER_PROCEDURE:"SYSTEM"."GEN_ROLE_SGTC" se ha creado con advertencias de compilación
    ORA-39083: Fallo de creación del tipo de objeto PACKAGE_BODY con el error:
    ORA-04052: se ha producido un error al consultar el objeto remoto ENLACE.ELPQ_DATOPROY@CRE
    ORA-00604: se ha producido un error a nivel 4 de SQL recursivo
    ORA-12154: TNS:no se ha podido resolver el identificador de conexión especificado
    ORA-39082: El tipo de objeto TRIGGER:"SIGERED"."TR_CTRL_ENERGIZA" se ha creado con advertencias de compilación
    ORA-39083: Fallo de creación del tipo de objeto TRIGGER con el error:
    ORA-04052: se ha producido un error al consultar el objeto remoto ENLACE.ELPQ_DATOCONS@CRE
    ORA-00604: se ha producido un error a nivel 4 de SQL recursivo
    ORA-12154: TNS:no se ha podido resolver el identificador de conexión especificado
    El sql que falla es:
    ALTER TRIGGER "SIGERED"."TR_CTRL_ENERGIZA" COMPILE PLSQL_OPTIMIZE_LEVEL= 2 PLSQL_CODE_TYPE= INTERPRETED PLSCOPE_SETTINGS= 'IDENTIFIERS:NONE'
    ORA-39082: El tipo de objeto TRIGGER:"SIGERED"."TR_CTRL_CONCLUYE" se ha creado con advertencias de compilación
    El sql que falla es:
    BEGIN SYS.DBMS_IJOB.SUBMIT( JOB=> 165, LUSER=> 'SYSTEM', PUSER=> 'SYSTEM', CUSER=> 'SYSTEM', NEXT_DATE=> TO_DATE('2012-05-02 01:00:00', 'YYYY-MM-DD:HH24:MI:SS'), INTERVAL=> 'TRUNC(SYSDATE+1)+1/24', BROKEN=> FALSE, WHAT=> 'dbms_stats.gather_schema_stats(ownname => ''SIGERED'',options => ''GATHER'',estimate_percent => null,method_opt => ''FOR ALL COLUMNS SIZE 1'',cas
    ORA-39083: Fallo de creación del tipo de objeto JOB con el error:
    ORA-00001: restricción única (SYS.I_JOB_JOB) violada
    El sql que falla es:
    BEGIN SYS.DBMS_IJOB.SUBMIT( JOB=> 47, LUSER=> 'SIGERED', PUSER=> 'SIGERED', CUSER=> 'SIGERED', NEXT_DATE=> TO_DATE('2012-05-02 01:00:00', 'YYYY-MM-DD:HH24:MI:SS'), INTERVAL=> 'TRUNC(SYSDATE+1)+01/24', BROKEN=> FALSE, WHAT=> 'SIGERED.RDPQ_PROYECTOS.PR_PROCESAR;', NLSENV=> 'NLS_LANGUAGE=''AMERICAN'' NLS_TERRITORY=''AMERICA'' NLS_CURRENCY=''$'' NLS_ISO_CURRENCY=''AMERI
    Procesando el tipo de objeto DATABASE_EXPORT/SCHEMA/POST_SCHEMA/PROCACT_SCHEMA
    Procesando el tipo de objeto DATABASE_EXPORT/SCHEMA/PASSWORD_HISTORY
    ORA-39083: Fallo de creación del tipo de objeto PASSWORD_HISTORY con el error:
    ORA-01858: se ha encontrado un carácter no numérico donde se esperaba uno numérico
    El trabajo "SYS"."SYS_IMPORT_FULL_01" ha terminado con 2249 error(es) en 17:21:02

    Hello people,
    I just run for the second time a full import, and it said it finished correctly.
    The first time I run it, there was a message which said that the import had finished with 2249 errors (I checked my log and not all of them were errors but messages). I checked each single message and only had to solve a couple of things.
    I first created a user in response to an ora-29393: user string does not exist or is not logged on.
    The second thing I did was to run the utlrp.sql file in response to an ORA-39082. I did this according to this blog.
    I know oracle is taking precedence each time I run an import. I don’t know if what I have done is okay or perhaps not all data was imported after all. This is the thread which I posted initially when errors came out.
    Any reply is a supply.
    Thanks loads

  • Help understand how this works

    Hows everyone doing, i need some help understand this. This is my first time using Lulu. From the reviews i'v read about it they tell me this is the #1 place to come to to get my books printed. Here the question,  i have all 3 of my books ready to be uploaded do i just sent that in, then they send me the prints ? or so they self them for me. Sorry if this seems like a dumb question, but its my first time using this particular site.

    Here's a quick overview:
    You start the new book wizard. Click "Create," pick a book type and size (hardcover, paperback, etc.; 6x9, 8.5 x 11, etc.), and click "Make this book."
    Hint: If you want the widest distribution for your book, pick a size / type that has a green checkmark next to it.
    The wizard will guide you to name your book, apply an ISBN (or get a free one), upload your contents, and upload your cover or design a cover. It will guide you to set pricing and distribution, and many other options.
    When you've done all that, your book will be available to order. You will see two prices: the one you pay, and the one other people pay. The one you pay is the printing cost per book. It may be anywhere from $2.50 to $20.00 or more, depending on options you pick -- probably coser to the low end.
    On that first page, where it says "Create," there is a calculator that will figure roughly what your book will cost (printing costs), so you can plan your options around that calculator.
    So you order as many books as you want, pick shipping, pay with a credit card, and in a few days, the books are on your doorstep.
    I hope that helps.

  • Help understanding ABAP Proxies

    Can someone point me to documentation to help understand ABAP proxies?  What they are, why I would use them and what are the considerations in using them over BAPI's or IDOCS?  I had a recent discussion with someone who is choosing to not use them because of security considerations.

    Hi Rick,
    For ABAP proxy documentation refer...
    http://help.sap.com/saphelp_nw04/helpdata/en/ab/585f3c482a7331e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/14/555f3c482a7331e10000000a114084/content.htm
    For considerations in using proxy over BAPI's or IDOCS Refer...
    /people/ravikumar.allampallam/blog/2005/08/14/choose-the-right-adapter-to-integrate-with-sap-systems
    Regards
    Anand

  • Need some help understanding the way materialized views are applied through

    Hi, I need some help understanding the way materialized views are applied through adpatch.
    In patch 1, we have a mv with build mode immediate. When applying it PTS hang due to pool performance of mv refresh.
    So we provide patch 2, with that mv build mode deferred, hoping it'll go through. But patch 2 hang too on the same mv.
    How does this work? Is that because mv already exists in the database with build immediate, patch 2 will force it to refresh first before changing build mode? How to get over this?
    Thanks,
    Wei

    Hi Hussein,
    Thank you for the response.
    Application release is 11.5.10.
    Patch 1 is MSC11510: 8639586 ASCP ENGINE RUP#38 PATCH FOR 11.5.10 BRANCH
    Patch 2 is MSC11510: 9001833 APCC MSC_PHUB_CUSTOMERS_MV WORKER IS STUCK ON "DB FILE SEQUENTIAL READ" 12 HOURS
    The MV is APPS.MSC_PHUB_CUSTOMERS_MV
    This happens at customer environment but not reproducable in our internal environment, as our testing data is much smaller.
    Taking closer look in the logs, I saw actually when applying both patch 1 and patch 2, MV doesn't exist in the database. So seems my previous assumption is wrong. Still, strange that patch 2 contains only one file which is the MV.xdf, it took 7 hours and finally got killed.
    -- patch 1 log
    Materialized View Name is MSC_PHUB_CUSTOMERS_MV
    Materialized View does not exist in the target database
    Executing create Statement
    Create Statement is
    CREATE MATERIALIZED VIEW "APPS"."MSC_PHUB_CUSTOMERS_MV"
    ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 10 MAXTRANS 255 LOGGING
    STORAGE(INITIAL 4096 NEXT 131072 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 4 FREELIST GROUPS 4 BUFFER_POOL DEFAULT)
    TABLESPACE "APPS_TS_SUMMARY"
    BUILD IMMEDIATE
    USING INDEX
    REFRESH FORCE ON DEMAND
    WITH ROWID USING DEFAULT LOCAL ROLLBACK SEGMENT
    DISABLE QUERY REWRITE
    AS select distinct
    from
    dual
    AD Worker error:
    The above program failed. See the error messages listed
    above, if any, or see the log and output files for the program.
    Time when worker failed: Tue Feb 02 2010 10:01:46
    Manager says to quit.
    -- patch 2 log
    Materialized View Name is MSC_PHUB_CUSTOMERS_MV
    Materialized View does not exist in the target database
    Executing create Statement
    Create Statement is
    CREATE MATERIALIZED VIEW "APPS"."MSC_PHUB_CUSTOMERS_MV"
    ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 10 MAXTRANS 255 LOGGING
    STORAGE(INITIAL 4096 NEXT 131072 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 4 FREELIST GROUPS 4 BUFFER_POOL DEFAULT)
    TABLESPACE "APPS_TS_SUMMARY"
    BUILD DEFERRED
    USING INDEX
    REFRESH COMPLETE ON DEMAND
    WITH ROWID USING DEFAULT LOCAL ROLLBACK SEGMENT
    DISABLE QUERY REWRITE
    AS select distinct
    from dual
    Start time for statement above is Tue Feb 02 10:05:06 GMT 2010
    Exception occured ORA-00028: your session has been killed
    ORA-00028: your session has been killed
    ORA-06512: at "APPS.AD_MV", line 116
    ORA-06512: at "APPS.AD_MV", line 258
    ORA-06512: at line 1
    java.sql.SQLException: ORA-00028: your session has been killed
    ORA-00028: your session has been killed
    ORA-06512: at "APPS.AD_MV", line 116
    ORA-06512: at "APPS.AD_MV", line 258
    ORA-06512: at line 1
    Exception occured :No more data to read from socket
    AD Run Java Command is complete.
    Copyright (c) 2002 Oracle Corporation
    Redwood Shores, California, USA
    AD Java
    Version 11.5.0
    NOTE: You may not use this utility for custom development
    unless you have written permission from Oracle Corporation.
    AD Worker error:
    The above program failed. See the error messages listed
    above, if any, or see the log and output files for the program.
    Time when worker failed: Tue Feb 02 2010 19:51:27
    Start time for statement above is Tue Feb 02 12:44:52 GMT 2010
    End time for statement above is Tue Feb 02 19:51:29 GMT 2010
    Thanks,
    Wei

  • Need help with Sound Methods

    Hi, I am new to java and need help with sound methods.
    q: create a new method that will halve the volume of the positive values and double the volume of the negative values.
    Message was edited by:
    Apaula30

    duplicate message #2

  • Trying to understand Static methods

    Hi all,
    I am trying to learn a little bit about static methods and hope that someone here can help me understand it better. My understanding of static methods is that they exist only once (More like global methods). This tells me that usage of static methods should be used with care as they are likely to cause problems in cases where multiple users try to access a static object at the same time.
    I am looking at a piece of code that had me thinking for a bit. I cant post the code itself but here is an example of how the code is structured
    The first class declares a couple of non static arrays and makes them available via the getters and setters. It also has one method that calls a static method in another class.
    package com.tests.statictest;
    import java.util.ArrayList;
    public class ClassA{
         ArrayList arrayList1 = new ArrayList();
         ArrayList arrayList2 = new ArrayList();
         public ClassA(){
              arrayList1.add("TEST1");
              arrayList1.add("TEST2");
              arrayList2.add("Test3");
              arrayList2.add("Test4");
         ArrayList getArrayList1(){
              return arrayList1;
         ArrayList getArrayList2(){
              return arrayList2;
         ArrayList getJoinedArrayList(){
              return ClassB.joinArrays(arrayList1,arrayList2);
    }The second class contains the static method that is called by the above class to join the two arrays. This class is used by many other classes
    package com.tests.statictest;
    import java.util.ArrayList;
    public class ClassB{
         public static ArrayList joinArrays(ArrayList list1, ArrayList list2){
              ArrayList list3 = new ArrayList();
              list1.addAll(list2);
              return list1;
    }And here is my test class
    package com.tests.statictest;
    public class ClassC{
          public static void main(String args[]){
               ClassA classA = new ClassA();
              System.out.println(classA.getArrayList1());
              System.out.println(classA.getArrayList2());
              System.out.println(classA.getJoinedArrayList());
         }The output to the above program is shown below
    [TEST1, TEST2]
    [Test3, Test4]
    [TEST1, TEST2, Test3, Test4]My question for the above is that i am wondering if the above is safe. Can you think of situations where the above is not recommended. What exactly would happen if ten instances of ClassA threads are executed at the same time? Woulnt the static method in ClassB corrupt the data?

    ziggy wrote:
    Hi all,
    I am trying to learn a little bit about static methods and hope that someone here can help me understand it better. My understanding of static methods is that they exist only once (More like global methods). This tells me that usage of static methods should be used with care as they are likely to cause problems in cases where multiple users try to access a static object at the same time. There is no such thing as a "static object" in Java. The word "static" simply means "belonging to a class as a whole, rather than an individual instance."
    My question for the above is that i am wondering if the above is safe. Can you think of situations where the above is not recommended. What exactly would happen if ten instances of ClassA threads are executed at the same time?ClassA isn't a thread, so it can't be "executed", per se.
    Woulnt the static method in ClassB corrupt the data?"Staticness" doesn't have anything to do with it; the issue at hand is operations on a shared data structure, which is a concern whether you're dealing with static or non-static members. There is nothing inherent in ClassB that will "corrupt" anything, however.
    ~

  • Help: understand my db read performaces (with the diagnosis of db- stat())

    Can someone help me to understand if my db read performances should be low?
    I'm interested in sequential read with cursor performances.
    (I've tried to read the entire file and it requred ~55seconds)
    I've a Btree file of 1.90 GB.
    The record's key are made of an integer value (4 bytes)
    The record's data contain variable size data
    The db->stat() method returned the following result:
    - bt_magic = 340322
    - bt_version = 9
    - bt_metaflags = 1
    - bt_nkeys = 83839
    - bt_ndata = 83839
    - bt_pagesize = 8192
    - bt_minkey = 2
    - bt_re_len = 0
    - bt_re_pad = 32
    - bt_levels = 2
    - bt_int_pg = 1
    - bt_leaf_pg = 258
    - bt_dup_pg = 0
    - bt_over_pg = 248854
    - bt_empty_pg = 0
    - bt_free = 0
    - bt_int_pgfree = 3526
    - bt_leaf_pgfree = 13092
    - bt_dup_pgfree = 0
    - bt_over_pgfree = 153658297
    How it's possible to understand if there is something wrong reading the db stat?
    I hope someone can help me.
    Thanks

    36MB/s seems a decent performance for a normal harddisk.

  • Need help understanding an example in Flex 4 Language Reference: flash.data.sqlstatement

    I don't understand how to use the example in Flash Builder. I read the link concerning this, but it's still unclear.
    1) Is this example a single file, or should the class definition be separate? I ask because I don't see any import statements at all, which makes me wonder how it would work.
    2) does init() act as the automatic entry point for this code, or is this function called from some unseen event?
    3) does dbStatement.itemClass = Employee represent the link between the main app and the class file?
    I've been looking all over for a solution to my problem in that I have 8 or 10 querries to a sqlite db in my main application and I would really like to move each to their own file, but I don't understand how to reference them from the main app, or how to share the results with the main app. I was hoping this was what I'm looking for.
    // Employee class definition
    package
        public class Employee
            public var name:String;
            public var ssn:String;
            public var id:uint;
            public override function toString():String
                return "id: "+ id.toString() + " name: " + name + " ssn: " + ssn;
    // using the Employee class as SQLStatement.itemClass
    var conn:SQLConnection;
    var dbStatement:SQLStatement;
    function init():void
        conn = new SQLConnection();
        conn.addEventListener(SQLEvent.OPEN, connOpenHandler);
        dbStatement = new SQLStatement();
        dbStatement.sqlConnection = conn;
        dbStatement.text = "SELECT id, name, ssn FROM employees";
        dbStatement.itemClass = Employee;
        var dbFile:File = new File(File.separator + "employee.db");
        conn.open(dbFile);
    function connOpenHandler(event:SQLEvent):void
        dbStatement.addEventListener(SQLEvent.RESULT, resultHandler);
        dbStatement.execute();
    function resultHandler(event:SQLEvent):void
        var result:SQLResult = dbStatement.getResult();
        if (result != null)
            var emp:Employee;
            var numRows:int = result.data.length;
            for (var i:int = 0; i < numRows; i++)
                emp = result.data[i];
                trace(emp.toString());
    Thanks
    Kristin

    Hi Kristin,
    1020: Method marked override must override another method.
    -overridesObject.toString
    There is popular misconception among ActionScripters about toString() method - if one want to provide custom implementation method of super class "override" keyword is needed.
    But in case of Object "toString" is dynamic and it is attached at runtime negating the need of overriding - instead implementation is to be provided by developer so one is not created at runtime. So one needs to just write her own: toString():String method.
    Methods of the Object class are dynamically created on Object's prototype. To redefine this method in a subclass of Object, do not use the override keyword. For example, a subclass of Object implements function toString():String instead of using an override of the base class.
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Object.html#toString()
    hth,
    kind regards,
    Peter

  • Please help understand this error...

    I am developing a small Hash Calculator that calculates MD5/ SHA Hash.
    It has 2 modes,
    1. Text mode in which i have a JTextField - userText where i can enter the text and then when i click on calculate the corresponding hash of the text is evaluated.
    2. File mode in which then the JTextField gets disabled (locked or non editable) and i have button that gets visible through which i can then select a file (through JFileChooser) and when i select a file, i put it's absolute path in the JTextField - userText. and then when i click on calculate this code is run...
    FileInputStream in=new FileInputStream(userText.getText());
                             int length=0;
                             while((length=in.read(buffer))!=-1)
                                  md5.update(buffer,0,length);
                             digest=md5.digest();
                             hex="";
                             for (int i = 0; i < digest.length; i++)
                                  int b = digest[i] & 0xff;
                                  if (Integer.toHexString(b).length() == 1) hex = hex + "0";
                                  hex  = hex + Integer.toHexString(b);                                                  
                             hash.setText(algorithm.getSelectedItem().toString()+" Hash: "+hex);
                             copyString(hex);
                             status.setText(algorithm.getSelectedItem().toString()+" Hash copied to ClipBoard",Color.RED);
                             in.close();Now what i am getting is that in case i calculate a hash of a text (default starting mode is text mode) and then change the mode to File then it is working absolutely fine, but if right in the beginning, at the starting i go and select the File Mode, then when i click on calculate i get a strange error.
    I have the stack trace of it :
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
         at java.io.FileInputStream.read(Unknown Source)
         at MD5HashCalculator.calculate(MD5HashCalculator.java:371)
         at MD5HashCalculator.access$3(MD5HashCalculator.java:338)
         at MD5HashCalculator$12.actionPerformed(MD5HashCalculator.java:280)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)This weird thing is happening only the first time and it is happening in the line of the while loop basically
    while((length=in.read(buffer))!=-1)I am unable to understand the error, please help.
    What exactly is happening , and more specifically , why is it happening only if i did the mode change right in the beginning for the first time...??

    this buffer since it had a null value was giving the
    error. I replaced the thing by
    byte buffer[]="".getBytes();
    I'm not sure that's the best thing to do.
    I was reluctant at first to initialise the buffer
    with some bytes as i thought it might effect the md5
    value if it had some value in the beginning, You're supposed to create an empty byte array, e.g. like so:
    byte[] buffer = new byte[1024];In this case, the read method will read at most 1024 bytes into the buffer. The number of bytes it actually reads is returned to you. If it returns 12, say, you should only use the 12 first bytes in the array since those are the bytes that were actually read in. Whatever was in those 12 slots in the array before you called read is overwritten. Then you call read again to see if there are more bytes available, until it returns -1 to signal that there is nothing more to read.
    but i
    have re-checked it accurately, the code is now
    working fine and the MD5 has is coming perfectly.
    This seems strange, as
    "".getBytes();returns a byte array of zero length, which to me suggests you would end up in an infinite loop. But if you say so...

  • Need help understanding a project please

    Hi, i just finished reading through this lab that i'm supposed to do, but have no idea what i am supposed to do. Could anyone here possibly help me understand it in an easier fashion? I would really appreciate it.
    Assignment:
    For this assignment, we will create a number class that can help us create classes for objects like clocks or angles. The number class will have to be general enough so that we can define different bases for it. Clocks need numbers of base 24 (or 12) and 60. Angles need numbers of base 360 and 60. For now, we are going to simplify things and only define constructors, a toString method, and an increment method. Of course, a complete number class would have many other methods, such as adding, subtracting, multiplying, comparing, and negating the numbers. Since a number is made up of digits, we will also define a digit class. The number and digit classes appear very similar because they have nearly the same methods. The differences are in the implementations of the methods.
    Write a number class that represents a number with a given base. The number class has two constructors. The default constructor sets the base at 10 and the value to 0. The other constructor accepts a decimal value and a base. The constructors will have to create all of the digits (as objects of the digit class) and store them in some kind of list. Create a toString method and an increment method. These two methods will use the corresponding methods of the digit class to do most of the work for them.
    Write a digit class that represents a single digit with a given base. The digit class has two constructors. The default constructor sets the base at 10 and the value to 0. The other constructor accepts a decimal value and a base. Create a toString method and an increment method. The increment method should return a boolean: true if there is a carry and false if not.
    For both classes, you can assume that the bases are restricted to binary, octal, decimal or hexadecimal and the values are non-negative.
    Instructions:
    Write a test driver that proves that your classes work.

    Myrdwin wrote:
    It's not that i didn't bother to ask him earlierSo, your teacher gave you the assignment, without giving you any opportunity to talk to him between when he assigned it and when it's due?
    I just finished the polymorphism lab with a bunch of farm animals last night. WHOAH! TMI!!! ;-)
    Am i just reading into the lesson to much and making it way more complicated than it actually is?Like I said, I'm not going to try to interpret the whole thing for you but a) It tells you what to do with the c'tors, and b) I would always assume that "create a method" or "define a method" or whatever he says means "create a *fully functional, correct* method", unless he explicitly states to leave it empty for now.
    My advice is to use your best judgment as to what's expected, and get started on that basis. At your first opportunity to speak to your teacher, explain your uncertainty and the assumptions you made.
    If you have specific questions along the way, post them here, along with your code or an SSCCE.
    When you post code, use the CODE button or [code] and [/code] tags to preserve formatting and make your code readable.
    Edited by: jverd on Oct 3, 2008 11:57 AM

  • Help understand Command in SIP Profile

    Hi all,
    Recently we're deploying the CUBE SIP service but there is one command for SIP profile cannot be understood by us. This is one command requested by the service provider but we would like to understand the meaning of this command.
    voice class sip-profiles 1
    request CANCEL sip-header Max-Forwards modify ".*" "User-Agent: CUBE"
    We thought Max-Forwards should be modified to some number.
    Please kindly help. Thank you.
    Regards,
    Gary

    Garry,
    In the CANCEL request, your ITSP wants to  modify the max forwards header from a number to the string user0agent:CUBE. I am not sure why they want to do this since maximum forwards should be a numerical value. The sample trace below is an example of a a CANCEL method. You can see the max forwards header..this is what they are trying to modify
    Sent:
    CANCEL sip:[email protected]:5081 SIP/2.0
    Via: SIP/2.0/UDP 10.105.40.74:5060;branch=z9hG4bK38996EB1EC
    From: <sip:[email protected]>;tag=259B0918-3C6
    To: <sip:[email protected]>
    Date: Mon, 22 Sep 2014 10:29:55 GMT
    Call-ID: [email protected]
    CSeq: 101 CANCEL
    Max-Forwards: 70
    Timestamp: 1411381796
    Reason: Q.850;cause=16
    Content-Length: 0
    According to the RFC 3261, your ITSP is wrong in attempting to change this to a value other than a number.
    8.1.1.6 Max-Forwards
    The Max-Forwards header field serves to limit the number of hops a request can transit on the way to its destination. It consists of an integer that is decremented by one at each hop. If the Max-Forwards value reaches 0 before the request reaches its destination, it will be rejected with a 483(Too Many Hops) error response. A UAC MUST insert a Max-Forwards header field into each request it originates with a value that SHOULD be 70. This number was chosen to be sufficiently large to guarantee that a request would not be dropped in any SIP network when there were no loops, but not so large as to consume proxy resources when a loop does occur. Lower values should be used with caution and only in networks where topologies are known by the UA.

  • Help understanding OO concepts.

    Hi all,
    I'm really struggling to get my head around OO programming. I am wanting to make a few simple programs to try and figure it out.
    If I am wanting to have 2 classes and a main method class, say player and team class. It is obvious that the team class will have attributes and methods, as will a player.
    Team:
    Name - simple string.
    Stadium - forget for now
    Capacity - an int
    Players - this is where my problem lies
    Coach - forget for now
    Manager - forget for now
    Player:
    Name - string
    age - int
    shooting - int
    tackiling - int
    passing - int
    Now I can create a new object in my main method that will create a Player object with the above attributes. I am stuck with how to get a player object to be 'part of' the team.
    I assume that I need to put the Player class into the Team constructor but am unsure how to do this. I treid looking up on the internet but am not sure what the process is called. If someone could either show me a good link on how to do something similar, or post up some sample code to demonstrate, or even better both, then I can read up on it and understand with an example.
    What I really want is for the players to be held in an array within the team class, but not sure how easy this is to do for a beginner.
    Thanks
    Andrew

    Hi thanks for the help. I think i will look into the
    set, although it does seem a bit confusing for a
    beginner. First though, regarding inheritance:
    If in the Player class that extends TeamMember, if I
    want to add extra attributes, how do I add these into
    the constructor?
    public class Player extends TeamMember
    int speed;
    int shooting;
    int tackling;
    int passing;
    public Player (String name, String position, int
    speed, int shooting, int tackling, int passing)
    this.speed = speed;
    this.shooting = shooting;
    this.tackling = tackling;
    this.passing = passing;
    Is this how I would do it? Unfortunately at the
    moment I do not have a comiler so cannot test - I am
    a little confused as to how the super word was used.
    Thanks
    Andrewis Player really a TeamMember? I mean, it is, clearly, but is this relationship correct? I'd say that Player is a role that TeamMembers can have. what if you have a Player/Manager for instance? good OO principle: favour composition over inheritance.
    using inheritance, Player would be a class, Manager would be a class, and then you'd need another class PlayerManager. not ideal. if members were composed of roles, you could simply give your Player/Manager both roles, and not need to worry about which class it extended. probably a tricky concept for you to grasp at the moment, granted, but something for you to investigate at your leisure :-)

Maybe you are looking for

  • How to configure number of importing mail?

    hi guys,    I'm adding my yahoo mail account into Mac Mail recently, and I have got around 5000 mails in my yahoo account. When I succesffuly added the yahoo account in Mac Mail, the system imports all mails to Mac (starting from very beginining) It

  • How Do I remove all File Info after completeing image?

    After completing all work on a Photoshop Image - then saving as a jpeg - all the file info still remains (XMP).  How do I delete it?

  • Not able to see business area in some fi doc

    hi , In some FI doc for inventory g/l account in which direct posting is not allowed does not display business area  however we can able to see business area in corresponding  migo document . how to avoid this . Thanks and Regards , Shikha

  • The performance of synchronous scenarios?

    Hi gurus, We are planing to implement the integration between SAP and WMS(Warehouse management system) . The customer wants all the scenarios (Purchase Order, goods received,...) to be synchronous. Although it's good from the functional point, I thin

  • Using different JREs to compile and run JNI program

    Hi, Is it possible to use a JRE to compile a JNI program and then use another JRE to run it? For example, I'm compiling my program linking with Sun's libjvm.so and libjava.so. But at run time, I'll change my LD_LIBRARY_PATH to point to IBM's libjvm.s