SQL strange behaviour

Hi
I have created two tables temp_n and temp_c
1) DESC TEMP_N
Name    Null    Type     
COL2         NUMBER
2) DESC TEMP_C
Name    Null    Type     
COL3             NUMBER(1)
3)  SELECT * FROM TEMP_C
COL3
       1
       2
SELECT * FROM TEMP_N
COL2
       4
       5
       6
SELECT * FROM  TEMP_N WHERE COL2 IN (SELECT COL2 FROM TEMP_C);
When i ran the above query, i see the below output instead of throwing error "ORA-00904: "COL2": invalid identifier"
COL2
       4
       5
       6
can anyone explain why i am seeing the above output, instead of throwing error.
When i created the tables with  test and test_1 using same definition instead of using temp_n and temp_c, and ran below query, i am seeing below error
SELECT * FROM  TEST WHERE COL2 IN (SELECT COL2 FROM TEST1);
ORA-00904: "COL2": invalid identifier
00904. 00000 -  "%s: invalid identifier"
*Cause:   
*Action:
Error at Line: 12 Column: 27
select banner from v$version
Banner:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
PL/SQL Release 10.2.0.1.0 - Production
"CORE     10.2.0.1.0     Production"
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - ProductionThanks,
Niranjan
Edited by: 874799 on Nov 26, 2012 9:22 AM

Hi I tried once again with below test cases and same problem is coming :
Working SQL's:
CREATE TABLE TEM_C(COL1 NUMBER(1));
table TEM_C created.
CREATE TABLE TEM_P(COL2 NUMBER(1));
table TEM_P created.
INSERT INTO TEM_C VALUES(1);
1 rows inserted.
INSERT INTO TEM_C VALUES(2);
1 rows inserted.
INSERT INTO TEM_P VALUES(3);
1 rows inserted.
INSERT INTO TEM_P VALUES(4);
1 rows inserted.
INSERT INTO TEM_P VALUES(5);
1 rows inserted.
SELECT * FROM TEM_P
      COL2
         3
         4
         5
SELECT * FROM TEM_C
      COL1
         1
SELECT * FROM TEM_C WHERE COL1 IN (SELECT COL1 FROM TEM_P);
ORA-00904: "COL1": invalid identifier
00904. 00000 -  "%s: invalid identifier"
*Cause:   
*Action:
Error at Line: 22 Column: 27
Not working SQL
CREATE TABLE TEMP1(COL1 NUMBER(1));
table TEMP1 created.
CREATE TABLE TEMP2(COL1 NUMBER(1));
table TEMP2 created.
INSERT INTO TEMP1 VALUES(1);
1 rows inserted.
INSERT INTO TEMP1 VALUES(2);
1 rows inserted.
INSERT INTO TEMP2 VALUES(3);
1 rows inserted.
INSERT INTO TEMP2 VALUES(4);
1 rows inserted.
INSERT INTO TEMP2 VALUES(5);
1 rows inserted.
SELECT * FROM TEMP2
      COL2
         3
         4
         5
SELECT * FROM TEMP1
      COL1
         1
         2
SELECT * FROM TEMP1 WHERE COL1 IN (SELECT COL1 FROM TEMP2);
      COL1
         1
         2
Oracle Version
select banner from v$version
Banner:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
PL/SQL Release 10.2.0.1.0 - Production
"CORE     10.2.0.1.0     Production"
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - ProductionEdited by: 874799 on Nov 26, 2012 11:33 AM

Similar Messages

  • How to delete duplicates in oracle 10g ( strange behaviour)

    Recently we migrated from oracel 8i to oralce 10g and we face this problem.
    When we try to delete duplicates using rowid ( analytical functions row_number()/
    or normal delete ) and commit the same , still we find some duplicates to be existing because of which we are not able to enable costriants and resulting in process failure.
    When we run the same delete statement next time it removes more duplicates than the required or sometimes required duplicates resulting in abnormal behaviour.
    I don not understand this strange behaviour after upgrading to oracle 10g.
    It'd be great if some one who has idea on this can throw light on the same.
    thanks

    Gasparotto,
    Thanks a lot for letting me know a new procedure to delete duplicates sing lead function.
    I've tried this code on a temp table and it worked, let me use the same query on the prodn side and test the same.
    Procedure for deletion of duplicates using lead analytical function.
    create table temp ( col1 number(2) , col2 number(2) , col3 number(2));
    insert into temp values ( 1,2,10);
    insert into temp values ( 1,2,20);
    insert into temp values ( 1,2,30);
    insert into temp values ( 3,2,10);
    insert into temp values ( 3,4,12);
    insert into temp values ( 3,4,45);
    commit;
    COL1 COL2 COL3
    1 2 10
    1 2 20
    1 2 30
    3 2 10
    3 4 12
    3 4 45
    select col1,col2 , col3, LEAD(rowid) OVER (PARTITION BY col1,col2 order by null) from temp;
    COL1 COL2 COL3 LEAD(ROWID)OVER(PA
    1 2 10 AAAVBjAApAAAFyGAAB
    1 2 20 AAAVBjAApAAAFyGAAC
    1 2 30
    3 2 10
    3 4 12 AAAVBjAApAAAFyGAAF
    3 4 45
    6 rows selected.
    select rowid , temp.* from temp ;
    ROWID COL1 COL2 COL3
    AAAVBjAApAAAFyGAAA 1 2 10
    AAAVBjAApAAAFyGAAB 1 2 20
    AAAVBjAApAAAFyGAAC 1 2 30
    AAAVBjAApAAAFyGAAD 3 2 10
    AAAVBjAApAAAFyGAAE 3 4 12
    AAAVBjAApAAAFyGAAF 3 4 45
    SQL> DELETE temp
    WHERE rowid IN
    ( SELECT LEAD(rowid) OVER (PARTITION BY col1, col2 ORDER BY null)
    FROM temp ); 2 3 4
    3 rows deleted.
    SQL> select rowid , temp.* from temp ;
    ROWID COL1 COL2 COL3
    AAAVBjAApAAAFyGAAA 1 2 10
    AAAVBjAApAAAFyGAAD 3 2 10
    AAAVBjAApAAAFyGAAE 3 4 12
    Thanks for the reply

  • Strange behaviour when using connection pooling with proxy authentication

    All
    I have developed an ASP.NET 1.1 Web application that uses ODP.NET 9.2.0.4 accessing Oracle Database 8i (which is to be upgraded to 10g in the coming months). I have enabled connection pooling and implemented proxy authentication.
    I am observing a strange behaviour in the live environment. If two users (User 1 and User 2) are executing SQL statements at the same time (concurrent threads in IIS), the following is occurring:
    * User 1 opens a new connection, executes a SELECT statement, and closes this connection. The audit log, which uses the USER function, shows User 1 executed this statement.
    * User 2 opens the same connection (before it is released to the connection pool?), excutes an INSERT statement, and closes this connection. The audit log shows User 1, not User 2, executed this statement.
    Is this a known issue when using connection pooling with proxy authentication? I appreciate your help.
    Regards,
    Chris

    Hi Chris,
    I tried to reproduce your complaint, but was unable to. I didnt use auditting however, just a series of "select user from dual" with proxy authentication. You might want to see if you can put together a small complete testcase for this and open a sr with support.
    Cheers
    Greg

  • Strange behaviour in web cartographic application

    Hi group,
    I have noticed a strange behaviour with the overview tool of my web application with MapInfo data uploaded in Oracle 10g with EasyLoader. When I put the cursor near the limit of some polygons but outside of its surface, the overview tool shows the info of this polygon when it should show the info of the neighbor polygon. It's like if the boundary of the polygon is outside of its limit but visually the borders are looking good.
    After many tests, I think the problem may be related with the tolerance precision and the table bounds in sdo_metadata. The table is in lat/long (8307) and the tolerance setted by Easyloader is X: 7.9013E-6 and Y:1.01201E-5
    In MapInfo I gave this bounds to the table: min x: -82.0483359 min y: 43.2322719 max x: -54.6521931 max y: 64.3415211 but when loaded in Oracle the bounds are automatically set to -180/180 and -90/90
    I tried to change the tolerance and the bounds in Oracle and create a new spatial index without success. Changing the bounds in MapInfo prior uploading to Oracle was unsuccessfull as well.
    Anything else could be tryed?
    Thank you
    Maxime D.

    Maxime,
    Didn't you contact me privately about something like this? No matter.
    the tolerance setted by Easyloader is X: 7.9013E-6 and Y:1.01201E-5These tolerances are not what Oracle says should be set for geodetic (8307) data. From the documentation...
    The tolerance value for geodetic data should not be smaller than 0.05 (5 centimeters)You can do one of two things:
    1. If you have SQL Developer, install GeoRaptor and then right mouse click on the table in the connect pane and select Metadata Manager. Then calculate XY values and if GeoRaptor doesn't set the tolerances to 0.05 do it manually. Then press Update.
    2. Using SQLPlus or SQL Developer's SQL Worksheet, do this:
    update user_sdo_geom_metadata
    set diminfo = SDO_DIM_ARRAY(SDO_DIM_ELEMENT(-82.0483359,-54.6521931,0.05),
                                SDO_DIM_ELEMENT(43.2322719,64.3415211,0.05)),
           SRID = 8307
    where table_name = YOUR TABLE
      and column_name = YOUR SDO_GEOMETRY COLUMN NAME;
    commit;NOTE: It is OK to have ordinate ranges different from -180..180, -90..90.
    Drop your index and rebuild.
    Should now be OK.
    If it starts to misbehave again (and the metadata has been changed) then all one could say is that perhaps the MapInfo software is modifying the metadata some how. Perhaps this is related to the MAPINFO_MAPCATALOG?
    Any MapInfo gurus know?
    regards
    Simon

  • Strange behaviour in a select

    Hi experts,
    i'd like you help to understand a strange behaviour on a 10.2.0.4 db.
    i use a select instruction in a plsql cursor with a where condition like the following:
    select fields
    from table1, table2, table3
    where
    field1 = parameter 1 and
    field2 = parameter 2 and
    field3 = parameter 3 and
    function(field1, field2) = 0
    usually this instruction works without problems.
    Sometimes (i think depending on the parameter) it stucks.
    I have moved the last row of the where condition right after the where instruction:
    select fields
    from table1, table2, table3
    where
    function(field1, field2) = 0 and
    field1 = parameter 1 and
    field2 = parameter 2 and
    field3 = parameter 3
    and it works with the usual performances (with the parameters that does not work on the first select).
    The function returns quickly it's result regardless the parameter used.
    I've compared (by toad) the execuption plan of the two selects and they are the same.
    Could you please explain this behaviour ?
    i can leave on the package the release 2 select but i'm not sure it fixes the problem.
    I'd like to understand something more ?
    thanks in advance
    best regards
    Stefano

    You can verify that the predicates evaluation orders are different in the two queries looking at the "Predicate Information" that follows the execution plan:
    SQL> create function f(a number,b number) return number is
      2  begin
      3  return a+b;
      4  end;
      5  /
    Function created.
    SQL> select * from t;
                       A                    B
                       2                    5
                       3                    7
                       4                    5
                       3                    4
                       6                    6
                       5                    7
                       3                    8
                       5                    9
    8 rows selected.
    SQL> set autot on exp
    SQL> select /*+ ORDERED_PREDICATES */ *
      2    from t
      3  where f(a,b)=7
      4  and a=3
      5  and b=4;
                       A                    B
                       3                    4
    1 row selected.
    Execution Plan
    Plan hash value: 1601196873
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |     1 |    26 |     3   (0)| 00:00:01 |
    |*  1 |  TABLE ACCESS FULL| T    |     1 |    26 |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter("F"("A","B")=7 AND "A"=3 AND "B"=4)
    Note
       - dynamic sampling used for this statement
    SQL> select /*+ ORDERED_PREDICATES */ *
      2    from t
      3  where a=3
      4  and b=4
      5  and f(a,b)=7;
                       A                    B
                       3                    4
    1 row selected.
    Execution Plan
    Plan hash value: 1601196873
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |     1 |    26 |     3   (0)| 00:00:01 |
    |*  1 |  TABLE ACCESS FULL| T    |     1 |    26 |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter("A"=3 AND "B"=4 AND "F"("A","B")=7)
    Note
       - dynamic sampling used for this statementAs you can see, despite the two plans are identical, the predicate information row shows exacly the predicate evaluation order.
    If toad doesn't show predicate information (I don't use it) run your queries in sqlplus.
    Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/01/17/supporto-di-xml-schema-in-oracle-xmldb/]

  • FOR i IN (statement) LOOP - very strange behaviour

    Hello, I'm experiencing very strange behaviour in my 9i Development Environment:
    If I run this select from SQL Plus a I get six month with number of days:
    select to_char(add_months(trunc(sysdate,'month'),rownum-1),'Month-YYYY') tmp_date, add_months(trunc(sysdate,'month'),rownum)-add_months(trunc(sysdate,'month'),rownum-1) colspan from dual a connect by level <=6
    But if I try to cycle through it in PL/SQL I only get the first row.
    FOR i in (
    select to_char(add_months(trunc(sysdate,'month'),rownum-1),'Month-YYYY') tmp_date, add_months(trunc(sysdate,'month'),rownum)-add_months(trunc(sysdate,'month'),rownum-1) colspan
    from dual a
    connect by level <=6 )
    loop
    -- print something out
    end loop;
    Any ideas why does this happen this way? If I use a query that does not contain CONNECT BY it works ok.

    Hi
    Just change as given below:
    FOR i in (
    select * from (select to_char(add_months(trunc(sysdate,'month'),rownum-1),'Month-YYYY') tmp_date, add_months(trunc(sysdate,'month'),rownum)-add_months(trunc(sysdate,'month'),rownum-1) colspan
    from dual a
    connect by level <=6 ))
    loop
    -- print something out
    end loop;
    Regards
    RK

  • APEX Listener and EPG - strange behaviour

    Hi
    For some years, I've used EPG for APEX but have struggled with performance particularly as I can have up to 150 student developers using at any one time.
    I do a fair amount of work using ORDImage and have successfully developed APEX applications to upload image files and display full-size and thumbnail images.
    After upgrading to APEX 4.1 (from 4.0), I decided to install APEX Listener standalone.
    Before I did so I checked that my applications still worked in 4.1 and they did.
    However, just installing APEX Listener but not configuring it (yet) has meant that my image display in a report using a procedure based on wpg_docload.download_file( l_ordimage_image.source.localData ) no longer works in EPG - the images are not displayed.
    Configuring APEX Listener and running the same application through that DOES display the images.
    So this part of the application works under APEX Listener but not under EPG.
    My application also allows users to upload images from APEX_APPLICATION_FILES using standard code. Under APEX Listener after uploading, I'm left with a blank page with a wwv_flow.accept URL although the image does indeed upload. Under EPG it works as expected and I get a success confirmation.
    So this part of the application works under EPG but not under APEX Listener.
    Has anyone else come across different behaviour depending on the mode of connection?
    Thanks
    Brian
    [Oracle EE 11gR2, Windows Server 2008R2, APEX 4.1, APEX Listener 1.1.3]

    Hi Brian,
    it sounds like you have both EPG and APEX Listener running on the same machine, so your problem might result from a port conflict. Note that both services use TCP port 8080 as default.
    At least a port conflict would explain the strange behaviour in your case, some things working on one web server and some on the other.
    Some parts of your initial post hint to that direction, e.g.
    However, just installing APEX Listener but not configuring it (yet) has meant that my image display in a report using a procedure based on >wpg_docload.download_file( l_ordimage_image.source.localData ) no longer works in EPG - the images are not displayed.... because the APEX Listener only interfere with the EPG if it is at least running on the same machine as your database and furthermore, if it is unconfigured in terms of ist database connection, a port conflict might be the only way it could cause anything like that.
    However, if you are sure that's not the issue, please check if you see any error in the APEX Listener's log for the following action you performed:
    My application also allows users to upload images from APEX_APPLICATION_FILES using standard code. Under APEX Listener after uploading, I'm left with a blank >page with a wwv_flow.accept URL although the image does indeed uploadIf you actually see just a blank screen, something very bad must have happened and you should see some kind of stack trace there.
    For further investigations, if necessary, it would be helpful to know how you deployed or started your APEX Listener and which JDK version you use.
    For the moment, I still think the port conflict is my best guess.
    You could avoid it by either changing the port for EPG (I'd not recommend that if you have other users still using it) or by changing the port for your APEX Listener.
    -Udo

  • Strange behaviour of Runtime.getRuntime().exec(command)

    hello guys,
    i wrote a program which executes some commands in commandline (actually tried multiple stuff.)
    what did i try?
    open "cmd.exe" manually (administrator)
    type "echo %PROCESSOR_ARCHITECTURE%" and hit enter, which returns me
    "AMD64"
    type "java -version" and hit enter, which returns me:
    "java version "1.6.0_10-beta"
    Java(TM) SE Runtime Environment (build 1.6.0_10-beta-b25)
    Java HotSpot(TM) 64-Bit Server VM (build 11.0-b12, mixed mode)"
    type "reg query "HKLM\SOFTWARE\7-zip"" returns me:
    HKEY_LOCAL_MACHINE\SOFTWARE\7-zip
    Path REG_SZ C:\Program Files\7-Zip\
    i wrote two functions to execute an command
    1) simply calls exec and reads errin and stdout from the process started:
    public static String execute(String command) {
              String result = "";
              try {
                   // Execute a command
                   Process child = Runtime.getRuntime().exec(command);
                   // Read from an input stream
                   InputStream in = child.getInputStream();
                   int c;
                   while ((c = in.read()) != -1) {
                        result += ((char) c);
                   in.close();
                   in = child.getErrorStream();
                   while ((c = in.read()) != -1) {
                        result += ((char) c);
                   in.close();
              } catch (IOException e) {
              return result;
         }the second function allows me to send multiple commands to the cmd
    public static String exec(String[] commands) {
              String line;
              String result = "";
              OutputStream stdin = null;
              InputStream stderr = null;
              InputStream stdout = null;
              // launch EXE and grab stdin/stdout and stderr
              try {
                   Process process;
                   process = Runtime.getRuntime().exec("cmd.exe");
                   stdin = process.getOutputStream();
                   stderr = process.getErrorStream();
                   stdout = process.getInputStream();
                   // "write" the parms into stdin
                   for (int i = 0; i < commands.length; i++) {
                        line = commands[i] + "\n";
                        stdin.write(line.getBytes());
                        stdin.flush();
                   stdin.close();
                   // clean up if any output in stdout
                   BufferedReader brCleanUp = new BufferedReader(
                             new InputStreamReader(stdout));
                   while ((line = brCleanUp.readLine()) != null) {
                        result += line + "\n";
                   brCleanUp.close();
                   // clean up if any output in stderr
                   brCleanUp = new BufferedReader(new InputStreamReader(stderr));
                   while ((line = brCleanUp.readLine()) != null) {
                        result += "ERR: " + line + "\n";
                   brCleanUp.close();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              return result;
         }so i try to execute the commands from above (yes, i am using \\ and \" in java)
    (1) "echo %PROCESSOR_ARCHITECTURE%"
    (2) "java -version"
    (3) "reg query "HKLM\SOFTWARE\7-zip""
    the first function returns me (note that ALL results are different from the stuff above!):
    (1) "" <-- empty ?!
    (2) java version "1.6.0_11"
    Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
    Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)
    (3) ERROR: The system was unable to find the specified registry key or value.
    the second function returns me:
    (1) x86 <-- huh? i have AMD64
    (2) java version "1.6.0_11"
    Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
    Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)
    (3) ERROR: The system was unable to find the specified registry key or value.
    horray! in this version the java version is correct! processor architecture is not empty but totally incorrect and the reg query is still err.
    any help is wellcome
    note: i only put stuff here, which returns me strange behaviour, most things are working correct with my functions (using the Runtime.getRuntime().exec(command); code)
    note2: "reg query "HKLM\HARDWARE\DESCRIPTION\System\CentralProcessor\0" /t REG_SZ" IS working, so why are "some" queries result in ERR, while they are working if typed by hand in cmd.exe?

    ok, i exported a jar file and execute it from cmd:
    java -jar myjar.jar
    now the output is:
    (1) "" if called by version 1, possible to retrieve by version 2 (no clue why!)
    (2) "java version "1.6.0_10-beta"
    Java(TM) SE Runtime Environment (build 1.6.0_10-beta-b25)
    Java HotSpot(TM) 64-Bit Server VM (build 11.0-b12, mixed mode)"
    (3) C:\Program Files\7-Zip\
    so all three problems are gone! (but its a hard way, as i need both functions and parse a lot of text... :/ )
    thanks for the tip, that eclipse changes variables (i really did not knew this one...)

  • Report S_ALR_87013542 strange behaviour

    Hi All,
    Report S_ALR_87013542 - Actual/Comm/Total/Plan in COAr crcy -  is showing up cross signs in some of the columns.When the cross sign (like any other column value) is clicked the line item detail are sown correctly.
    Has anybody encountered this kind of issue before ?
    I googled and searched various forums but all in vain.
    Please provide inputs to correct this strange behaviour of Report S_ALR_87013542. Thanks!
    Regards
    Dev

    Hello Dev,
    Did you execute report RKACOR04 for the affected object number and checked if this still happens ?
    Suresh Jayanthi.

  • View Master mode strange behaviour with jpg files

    Hy all,
    I'm using Aperture, and I'm tweakin a lot the SW to discover all secrets ....
    I'm really concerned about a strange behaviour of the SW in view mode.
    If I open a jpg file, do not apply ANY modification, and apply the "show master" command (pressing M), there's a subtle behaviour :
    *the images get sharper !!!!*
    It behaves as if an "edge sharpening" was applied !!!!!!
    With _RAW files this thing doesn't happen at all._
    Even stranger, if I zoom to full definition (by pressing Z), and toggle between normal view and "show master" view, the immage remains the same !
    The effect is not so evident with all images, but sometimes it is !!
    Anyway, I expect not to have such kind of things with a professional SW.
    With professional cameras and good quality files it's really annoying not to beeing sure what's the REAL content of the jpg image.
    Has anyone noted this thing ? Is there a reasonable explanation ?
    The only one I tried to figure out is the following : may be Aperture applies some kind of resampling algorithm with jpg files (bicubic, bilinear, etc).
    May be this resampling is not applied with 100% magnification, as weel as with raw files.
    But it's only my guessing. Now, I'm tweaking other viewers and other SW to understand what's the real jpg image stored in the file : the blurer one form normal view or the sharper one with "show master" mode.
    I stress once again : of course, the jpg file I'm talking about have no settings at all, just imported and toggled with M button.
    Thanks in advance.
    Regards,
    Enzo

    Hy,
    I'm afraid I'm not been clear.
    The problem is this :
    1) jpg image opened in normal view mode, no zoom, (no quick preview, of course) : image with a certain amount of blour
    2) jpg image opened in show master mode, no zoom, (no quick previre, of course) : image SHARPER with respect with the previous.
    No edit applied from import, so "show master" command shouln't apply any change in rendering, should it ?
    The only thing I said on 100% view is that such difference (between normal mode e show mastermode) is not present with 100% magnification.
    That was the issue.
    Enzo

  • Strange behaviour: two servers on the same port

    Hi!
    I hope this is the right section for this post. I need help about a strange behaviour involving a ServerSocket.
    For my thesis I need to write a program that receives data from a pre-existing DSMS client, filters them and then sends them to a pre-existing DSMS server. And here is my problem: if I try to create a ServerSocket on the same port of the DSMS server, my program throws no exception, and the servers seem running on the same port. This is a behaviour that I'd like to avoid, but I cannot understand what the problem is. Can you help me?
    The source code of the DSMS server can be found here (it's written in C++): http://infolab.stanford.edu/stream/code/stream-0.6.0.tar.gz
    The source code of my server class, instead, is this one:
    import java.io.*;
    import java.net.*;
    public class ThreadGenerator {
         private ServerSocket server;
         public void connect(String servPort, String cHost, String cPort) {
              try {
                   server = new ServerSocket(servPort);
                   System.out.println("SERVER running on port "+servPort);
              } catch (BindException e) {
                   System.out.println("Address already in use!");
              } catch (Exception e) {
                   System.err.println(e);
              try {
                   while(true){
                        Socket client = server.accept();
                        StreamThread T = new StreamThread(client, cHost, cPort);
                        T.start();
              } catch (EOFException e) {
                   System.out.println("Server closed connection!");
              } catch (Exception e) {
                   System.err.println(e);
    }I'm programming on Mac OSX Tiger, with Java 1.5.0.
    Thanks in advance for your help.

    The problem is still happening to me, I tried in this very moment. The code I'm using is the one I posted, and the second server is the one that I linked. I don't think there's anything else to add.
    If you're sure that the problem is not in my code, then it means that it is in the linked server, which partially solves the problem. But I'd like to know, if it's possibile, if there is any other way to check if the port is already in use.

  • Cursor shows strange behaviour in 10.9.5

    HI,
    I'm using a 15" MBPr late 2013, i7, 16 GB RAM, 1 TB SSD, running on 10.9.5. Lately I registered a very strange behaviour of the cursor when using the built in trackpad. If hovering over one of the symbols in the bar at the upper right corner of the screen and then moving the cursor downward, the menu of the symbol on the right of the cursor pops up (not the one the cursor ist pointing on).
    For example: the symbol for WiFi is located left from the one regulating the volume. When hovering over WiFi and moving downwards to activate/deactivate it, the volume-controle pops up ! If I want to use the WiFi, I have to hover over the symbol for bluetooth-connectivity instead....
    Any idea whats happening here ?
    Help is very much appreciated !
    MIchael

    OK, found the solution by myself. The reason seemed to be related to the resolution of the display. Changed it to another one (no matter which one), waited for the display to change and the changed the res back to optimal for display.
    The cursor now works fine and exactly....
    Really weird.

  • Windows 8.1 Enterprise Evaluation- Strange behaviour of network adapter

    Hello there are discussions and questions around this community about network adapter dropping connection while system is running. But I have found unique problem with my network adapter driver.
    I have tried to state my problem as clearly as possible. Please ask if any detail is required.
    My network status shows no access on following occasions:
    1. On alternate system wakeups.
        eg:  
    a. System boots up 
    Internet accessible
    no problem
    b. I put system to sleep(first time) and wake it up
    No access to internet !!!
    When I check in network and sharing center not even adapter shows in disabled status.(See video from the link given below).
    c. Without restarting system or without installing network adapter again,  I put system to sleep again and wake it up (2nd time).
    Internet accessible
    d. I put system to sleep for (3rd time) and wakes it up.
    No access to internet!!
    If I put system to sleep again and wake it up definitly I get network access.
    2. If I switch off the modem before windows shutdown completely or in the process of shutdown, next time when I boot system, even though the modem is switched on before booting the system, No internet access tooltip will be shown on network
    sysbol.
    Another strange behaviour is on no internet access status, I start installing adapter, and it loads required files and prompt me to click "next" and "click" install.
    But the thing is before I go to "next" button, I will get network access as shown in this link
    http://youtu.be/sPlXVEiYBeo. Ignore virtualbox adapter. Same behaviour was there when there is no vbox adapter. Same was happening in Windows 8 Pro, but not in windows 7, so that there is no H/W problem I think. 
    Any idea on how to fix this or any alternate solution ? 

    Hi,
    Firstly, access your network adapter official website to get the proper driver applied to your system.
    Then going to Control Panel > Device Manager, right click your adapter > Properties. Under the Power Management tab, make sure "Allow the computer to turn off this device to save power" checkbox unchecked.
    If it still persists, try to disable "fast startup" as below steps:
    1.In Control Panel, open the Power Options item.
    2.Click the Choose what the power buttons do link.
    3.Clear the Turn on fast startup (recommended) check box.
    4.Click Save Settings.
    Karen Hu
    TechNet Community Support

  • Strange behaviour from new 2012R2 in old domain

    Hi all,
    At work (education level), I'm starting to take charge of windows admin, so beiing a noob admin I'm finding strange behaviours that I hope you can help me solve them all :-)
    We've one (big) domain with about 5000 computers (workers and students all together), and around 50000 users (again, workers and students all together) setup like this:
    DC-DOMAIN-1:
    Windows Server 2008R2
    Shares NETLOGON and SYSVOL
    DC-DOMAIN-2:
    Windows Server 2003 R2 x64
    Shares CertEnroll, NETLOGON, SMSLOGON, SYSVOL
    Checking RootDSE, I see 'domainControllerFunctionaly is Windows 2003' (DC-DOMAIN-2)
    So, with this setup, I've noticed these strange behaviours, hope list isn't too big  (guess there will be more behaviours but these seemed too odd):
    1) On DC-DOMAIN-2, WinServer 2003 eventlog, inside 'Directory Service', I found this warning event ID 1083 (Source NTDS Replication):
    Active Directory could not update the following object with changes received from the domain controller at the following network address because Active Directory was busy processing information.
    Object:CN=<an user name>, CN=Users, DC=DOMAIN
    Usually followed by an information event (eventid 1955) which says:
    ctive Directory encountered a write conflict when applying replicated changes to the following object.
    Object:
    <SAME USER OBJECT THAN PREVIOUS EVENT ID>
    Time in seconds:
    0
    Event log entries preceding this entry will indicate whether or not the update was accepted.
    A write conflict can be caused by simultaneous changes to the same object or simultaneous changes to other objects that have attributes referencing this object. This commonly occurs when the object represents a large group with many members, and the functional level of the forest is set to Windows 2000. This conflict triggered additional retries of the update. If the system appears slow, it could be because replication of these changes is occurring.
    User Action
    Use smaller groups for this operation or raise the functional level to Windows Server 2003.
    And having as result that user being blocked in domain.
    2) I've added a new print server based on Windows Server 2012R2 (running inside an updated ESX 5.5 with VMXNET3 ethernet adapter as recommended by vmware), and seen in the event viewer these warnings/errors:
    At System log:
    Error Event ID 5783, Source NETLOGON:
    The session setup to the Windows NT or Windows 2000 Domain Controller \\DC-DOMAIN-2.fulldns.name for the domain DOMAIN is not responsive. The current RPC call from Netlogon on \\PRINTSERVER to \\DC-DOMAIN-2.fulldns.name has been cancelled.
    I've seen Event ID 5783 with DC-DOMAIN-1 too....
    Error Event ID 5719, Source NETLOGON:
    This computer was not able to set up a secure session with a domain controller in domain DOMAIN due to the following:
    The remote procedure call failed and did not execute.
    This may lead to authentication problems. Make sure that
    this computer is connected to the network. If the problem persists, please contact your domain administrator.
    ADDITIONAL INFO:
    If this computer is a domain controller for the specified domain, it sets up the secure session to the primary domain controller emulator in the specified domain. Otherwise, this computer sets up the secure session to any domain controller in the specified domain.
    At Microsoft-Windows-TerminalServices-RemoteConnectinoManager/Admin found also this warning:
    Warning Event ID 20499 Source TerminalServices-RemoteConnectionManager:
    Remote Desktop Services has taken too long to load the user configuration from server \\DC-DOMAIN-2.fulldns.name for user administrator
    3) If I try Group Policy Modeling on DC-DOMAIN-1 (server 2008R2), everything works fine, no matter if I try it against DC-DOMAIN-1 or DC-DOMAIN-2, but if I try this from the Server 2012R2 (the one from point 2), I get this:
    Simulation against DC-DOMAIN-2: Gets executed, but all GPO show as inaccessible, empty or disabled.
    Simulation against DC-DOMAIN-1: Sometimes it gets executed as DC-DOMAIN-2, sometimes I get an error saying query can't be executed.
    4) From server 2012R2, I usually manage printing GPO. If I click on the domain root (GPMC, forest, Domains, DOMAIN-NAME-ROOT) right pane, I get a pop up saying: 
    'A processing error ocurred collecting data using this base domain controller. Please change the base domain controller and try again'
    After closing popup, right pane says something like 'DC-DOMAIN-2.fulldns.name' is the baseline domain controller for this domain.
    No infrastructure Status information exists for this domain.
    Click the Detect Now button below to gather infrastructure status from all of the domain controllers in this domain.
    Pressing 'Detect Now' does nothing, and trying to select New Baseline DC shows again same pop up than before.
    5) Last, but not least, I've feeling that GPO takes too much to apply. I've found scenarios in which even after executing 'gpupdate /force' correctly on client computer either local or domain admin, I can't see the new changes (gpresult says it has been
    updated though). But couldn't find anything on eventlog that informs about problems with GPOs...
    For all these strange behaviours I've noticed in last month that I started checking things as sys admin, I believe domain is damaged, or something is wrong there (not just my new server 2012R2, even if it's running inside an ESX, blehh), so please, any hint
    on what to check, what to change, what to fix, would be highly appreciated.
    Thanks in advance.

    Hi Paul,
    Honestly, I'm still trying to figure out all broken things reported by tests :( Guess Jesper's suggestion about adding a new 2008 DC to get rid of 2003 and start checking again after that may be best option.
    I'll try to summarize list of things I believe are wrong:
    running
    DCDIAG /V /C /D /E /s:yourdcname > c:\dcdiag.log  for every DC, shows different errors. They show things such as:
    another domain running here (not administered by us, only relationship is that our users are shared with that domain, nothing else) appear when Printing out pDsInfo (as if they were DC of our domain too, but they do not even share RootDomain). Guess it
    may be for a bug old sys admin had when clonning from his 2008R2 template, that forgot to change SID... I already noticed 1 year ago our print server shared SID with those DC, guess there may be more servers sharing SID too :-(
    Within Starting test: Replications, I see few messages at Replication Latency Check, such as the one for CN=Schema, CN=Configuration, DC=<ourdomain>: 
    Latency information for 35 entries in the vector were ignored.
                      35 were retired Invocations.  0 were either: read-only replicas and are not verifiably latent, or dc's no longer replicating this nc.  0 had no latency information (Win2K DC)
    On Services test, I see an 
       Invalid service type: RpcSs on DC-DOMAIN-3, current value
                WIN32_OWN_PROCESS, expected value WIN32_SHARE_PROCESS
    On SystemLog, I see LOTS of warnings/errors such as:
    A warning event occurred.  EventID: 0x80000002
                Time Generated: 07/28/2014   08:21:54
                (Event String (event log = System) could not be retrieved, error
                0x503)
             An error event occurred.  EventID: 0xC0000003
                Time Generated: 07/28/2014   08:22:18
                (Event String (event log = System) could not be retrieved, error
                0x3afc)
    Missing entries on DNS (we've a static DNS)
    netdiag.exe /v > c:\netdiag.log Showed again DNS problems such as our primary DNS pointing to all DC, secondary
    DNS pointing just to DC with FSMO roles,...
    repadmin.exe /showrepl * /verbose /all /intersite > c:\repl.txt  Gave no errors, now I must check in detail
    if every replica is correct
    And finally,
    dnslint /ad /s "ip address of your dc"  gave more DNS problems:
    One or more DNS servers may not be authoritative for the domain
    One or more DNS servers did not respond to UDP queries
    One or more zone files may have expired
    SOA record data was unavailable and/or missing on one or more DNS servers
    Sumarizing, guess it will be better to fix DNS problems, promote new 2008R2 DC to get rid of 2003 one, promote domain to 2008 too, check again for messages and relationship with other domain, and then come back here for support if needed 
    EDIT: Almost forgot to talk about SYSVOL folder. As said before, there are 426 GPO folders inside Policies. Of them, 375 have an inetres.adm files in it (smallest one 1398 KB, almost all of them 2307 or 2707 kb).... 

  • Strange behaviour in Mail

    I have ongoing strange behaviour with Mail in Mountain Lion on a MacBook Pro.
    As well as randomly and intermitttently dropping connections to my various mail servers, I also, randomly and intermittently, fail to get to Print, or to create a new Mailbox, or to Quit. I just get a beep.
    Have to quit Mail - sometimes forcibly, and restart it.
    Mail will not automatically reconnect to servers after a Sleep , or moving to a differnt location.
    None of this was happenning on an older MacBook, but I was running 10.7 on that machine.
    Had to upgrade machine to allow upgrade to Mountain Lion.  Not sure which is responsible - new MB PRo , or 10.8?!
    Do I really have to re-install OSX  just to reinstall Mail?
    Any other pointers/hints very welcome.
    Thanks

    Please follow these directions to delete the Mail "sandbox" folder.
    Back up all data.
    Triple-click the line below on this page to select it:
    ~/Library/Containers/com.apple.mail
    Right-click or control-click the highlighted line and select
    Services ▹ Reveal
    from the contextual menu.* A Finder window should open with a folder named "com.apple.mail" selected. If it does, move the selected folder — not just its contents — to the Desktop. Leave the Finder window open for now.
    Log out and log back in. Launch Mail and test. If the problem is resolved, you may have to recreate some of your Mail settings. You can then delete the folder you moved and close the Finder window. If you still have the problem, quit Mail again and put the folder back where it was, overwriting the one that may have been created in its place. Post your results.
    Caution: If you change any of the contents of the sandbox, but leave the folder itself in place, Mail may crash or not launch at all. Deleting the whole sandbox will cause it to be rebuilt automatically.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard (command-C). In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar, paste into the box that opens (command-V). You won't see what you pasted because a line break is included. Press return.

Maybe you are looking for

  • I can't find a single photo from iPhoto?

    Firstly I am not technically minded at all. But I do back up my Mac from time to time for the obvious reasons.... But when i entre time machine I cannot browse my photos from my iPhoto libary and therefore cannot restore single lost photos? What am I

  • How to produce a list of URLs and page numbers from large website pdf file.

    Adobe Acrobat Pro version 10.1.4. I created a pdf file from an entire website which has 1062 pages. I was asked to produce a list of pages which should be updated or deleted. There is a URL on every page. What is the best way to mark the pages for up

  • HTDM: HOW? PLZ HELP

    hi, I got the installers for HTDM and EPIC, but when i go to open protools.....its giving me a dongle error, what do i do? mike

  • PC to Mac mini, help please

    Hi, I'm still new to Mac and even newer to things like networking. I have a PC that has over 800 songs that I want to transfer into my Mac mini before my iPod Shuffle arrives through the mail. The reason is the many problems that the Shuffle has when

  • My Top up voucher won't work.

    I recently bought a second hand iPhone 5 because I had lost my other phone on a night out. It turns out it was locked to EE which is a network I have never used before. I was unsure whether to choose tmobile or orange as the network to top my phone u