J2sdk 1.4.1 Subject.doAs() odd (?) behaviour.

I browsed through the forums and it seems like several other people have noticed the same, but nobody has explained it. See threads:
http://forum.java.sun.com/thread.jsp?forum=61&thread=302862
http://forum.java.sun.com/thread.jsp?forum=61&thread=319049
http://forum.java.sun.com/thread.jsp?forum=61&thread=356383
In my opinion, all these threads discuss the same thing.
The description is following:
i) If I call Subject.doAs(subj, new myaction()) within class "A" with classes "A" and myaction from the same codesource, then the subject IS NOT associated with the call.
ii) If I call Subject.doAs(subj, new myaction()) within class "A" with classes "A" and myaction from DIFFERENT codesources, then the subject IS associated with the call.
Note that the behaviour of the Subject.doAsprivileged is the same in both of the situations, i) and ii).
My opinion is that the subject should be associated with the call also in case i). And, if I understood the explanation of the doAs method in http://java.sun.com/j2se/1.4.1/docs/guide/security/jaas/JAASRefGuide.html, thats the way it should be.
Could someone explain this? I just don't get it.
In the above threads there are discussion about permissions, but actually this problem has nothing to do with them. (Except that when the subject is not associated, then the permissions granted to the principals in the subject are not available.)
Then, another question:
Why doesn't the ProtectionDomain class override the equals() -method?

I made a few tests and it seems like that the reason for this behaviour is in the "combine" and "optimize" -methods of the javax.security.auth.SubjectDomainCombiner.
The situation in my test programs, which I used to create the situations i) and ii) referred in the first post, was such that the AccessControlContext calls the SubjectDomainCombiners combine -method with the first and second argument being the same.
Now, the SubjectDomainCombiners combine -method has an optimization that when these two arguments have common ProtectionDomains (and in this case they both have one ProtectionDomain, which is the same one in both) then the common domain is not constructed with the Subjects Principals.
I think that this conflicts with the API description for SubjectDomainCombiners combine -method although it says that "Note that optimizations such as the removal of duplicate ProtectionDomains may have occurred.".
Could someone confirm this result?
Is this a "feature" or bug or am I just totally lost here?
ps. In order to replicate the result described in the first post, the class "A" should be called directly from main and it should belong to the same protectiondomain as main.

Similar Messages

  • Odd Behaviour with DVDs on IMac G5 20inch 1.8 GHz

    Suddenly the Superdrive DVD/CD (MATSHITA DVD-R UJ-825, Firmware DBN7) shows odd behaviour.
    It still reads CDs. But when a DVD is introduced, it will start "DVD Player" automatically, but then there is no hint of the disk. Neither does it show on the desktop, nore would it play. DVD Player would not eject it, but the eject button on the keyboard would.
    The DVD is ok, as it would play on my Powerbook G4 without problems.
    Any idea what might be causing this? - I had just performed the "Pro update"! Thanks for your help!
    iMac G5 20inch 1.8 GHz   Mac OS X (10.4.9)  

    Hve you checked to see whether a different DVD will play, Bernd?
    You might want to try deleting com.apple.DVDPlayer.plist from your Home/Library/Preferences folder, restarting and then seeing if it works.
    Cheers
    Rod

  • WebDav: some odd behaviour

    I followed the tutorial at Tiger Vittles to set up one of my OS X machines to run as a webdav server. It went smoothly, and was easier than I expected, given I am not a pro or anything when it comes to computers. The amazing thing is it works. I can connect my PowerBook to it both on the local network and via the internet. The un-amazing thing, and probably expected (knowing me) is that it does not work as expected when connecting a Windows XP machine. It connects, mounts as a webfolder in Window's Network Places, however this is where the odd behaviour begins. Inside of the folder, along with the expected contents of that folder, there is a folder by the same name; open this and the contents of the folder are there, along with a folder with the same name. This can go on forever. I have searched high and low and have not been able to find a solution to this. This occurs only when connecting with Windows, otherwise with my PowerBook it works perfectly. I am hoping that someone can point me in the right direction. Additionally the Windows machine has connected to other WebDav folders without this issue. Finally, when there is a folder in a folder of the same name I am not able to map it as a network drive. Both the machine acting as the WebDav server and the Windows machine are running the most current versions of software.
    Regards,
    Ross

    figured it out

  • Nokia 6233 v05.10 odd behaviour

    Hello!
    After thoroughly searching not only this board but the entire Internet, I found no answer to my question so I decided to register and ASK.
    I need to know if any of you owners of a Nokia 6233 observed this odd behaviour of your phone - so please keep reading.
    I purchased the phone 16 days ago. Being my first Nokia, I took time to exploit its every feature, therefore draining the battery quite quickly. I discharged and fully charged the battery at least 3 times in the first 3 days, without leaving it plugged-in overnight (as far as I know this is no longer necessary). The battery life time increased progressively until a maximum of three days of normal use, meaning moderate talking (under 20 minutes per day), little or no use of Java apps, camera, media players or GPRS/EDGE connection. The screen savers are off, power saver is on, sleep mode is on. Packet data connection - when needed and network mode is GSM only because I do not use 3G. All these should get me the best stand-by time possible, right? Well, they did, until...
    I bought a new microSD card, 2.0 GB storage, made by SanDisk. The card works fine, I put my favorite music and video clips on it - all the stuff you do when you have enough space. Since then, the battery life decreased SUBSTANTIALLY to LESS THAN 24 HOURS. And there's more. The battery drains even if the phone is turned off, in roughly the same amount of time. I have never ever seen anything like this. Sometimes the battery is so low that the phone takes a few minutes before displaying the battery charging icon and, when started, it asks for hour/date settings.
    So, I need to know if anybody else noticed battery life decrease with bigger memory card capacity, and what's to be done.

    Have you tried using the in-box memory card(That came with the phone) again? There's something wrong with your phone and battery if the problem still occurs..
    GooD LucKMessage Edited by nj15 on 15-Aug-200704:10 PM

  • Running Secure Code using Subject.doAs

    Hi,
    I would like to call a secure EJB-Method from a servlet.
    So I need to authenticate before making the call. For that I use JAAS´LoginContext.login()
    method.
    the call of the EJB-Methods are dfined in a PrivilegedAction-Class.
    The authentication works.
    But when I call Subject.doAs() I get the following error:
    java.rmi.AccessException: [EJB:010160]Security Violation: User: '<anonymous>'
    has insufficient permission to access EJB: type=<ejb>, application=laifneu, module=laifneu.jar,
    ejb=BatchjobFassadeService , method=create, methodInterface=Home, signature={}.
    at weblogic.ejb20.internal.MethodDescriptor.checkMethodPermissionsRemote(MethodDescriptor.java:465)
    at weblogic.ejb20.internal.StatelessEJBHome.create(StatelessEJBHome.java:151)
    at de.dzbw.laif.sessionfassade.BatchjobFassadeService_suvsky_HomeImpl.create(BatchjobFassadeService_suvsky_HomeImpl.java:74)
    at de.dzbw.laif.batchjobs.LaifEJBInvokerJob$MyAction.run(LaifEJBInvokerJob.java:342)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:319)
    at de.dzbw.laif.batchjobs.LaifEJBInvokerJob.execute(LaifEJBInvokerJob.java:121)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:178)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:477)
    If I however use Bea´s Security.runAs(), everything works fine.
    I would like to use only standard classes. Is it possible to use Subject.doAs()
    Best Regards
    anis

    I just wanted to add that I am using Bea WLS 8.1
    "anis" <[email protected]> wrote:
    >
    Hi,
    I would like to call a secure EJB-Method from a servlet.
    So I need to authenticate before making the call. For that I use JAAS´LoginContext.login()
    method.
    the call of the EJB-Methods are dfined in a PrivilegedAction-Class.
    The authentication works.
    But when I call Subject.doAs() I get the following error:
    java.rmi.AccessException: [EJB:010160]Security Violation: User: '<anonymous>'
    has insufficient permission to access EJB: type=<ejb>, application=laifneu,
    module=laifneu.jar,
    ejb=BatchjobFassadeService , method=create, methodInterface=Home, signature={}.
    at weblogic.ejb20.internal.MethodDescriptor.checkMethodPermissionsRemote(MethodDescriptor.java:465)
    at weblogic.ejb20.internal.StatelessEJBHome.create(StatelessEJBHome.java:151)
    at de.dzbw.laif.sessionfassade.BatchjobFassadeService_suvsky_HomeImpl.create(BatchjobFassadeService_suvsky_HomeImpl.java:74)
    at de.dzbw.laif.batchjobs.LaifEJBInvokerJob$MyAction.run(LaifEJBInvokerJob.java:342)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:319)
    at de.dzbw.laif.batchjobs.LaifEJBInvokerJob.execute(LaifEJBInvokerJob.java:121)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:178)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:477)
    If I however use Bea´s Security.runAs(), everything works fine.
    I would like to use only standard classes. Is it possible to use Subject.doAs()
    Best Regards
    anis

  • Podcast exhibiting odd behaviour with bluetooth

    Ever since updating to iOS6 / iPhone 5 i've been experiencing odd behaviour with music playback. Now that the Podcasts app is a requirement, i'm not sure if this is directly related to the Podcasts app or if it's an iOS 6 quirk.
    My iPhone connects to my car's stereo head unit via bluetooth. When i start my car it automatically connects and music, phone calls, etc, are all forwarded to my car's speakers. When i would switch my car off, music would stop automatically and i'd get out of my car and go about my day.
    Everything worked absolutely perfectly in iOS 5 with the 4S.
    The issue now with iOS6/iP5 is that when i switch off my car and use Siri or make a phone call, after i stop using Siri or if i end my call, the Podcasts app automatically resumes playback of what ever i was listening to when i switched my car off... Essentially it blasts music at me through the internal iPhone speaker for absolutely no reason.
    Here is a step by step,
    1. Start car
    2. Play music
    3. Turn off car
    4. Music automatically stops
    5. (while at the office, away from my car) Use siri or make a phone call
    6. When i end the call or stop using Siri, music automatically resumes via the iPhone internal speaker
    Is there any way to fix this?? It's getting quite annoying to have my iPhone blast me with music in fairly inappropriate situations.

    Disregard, there is a thread about it here: https://discussions.apple.com/thread/4346946?tstart=0
    Can't see any way of deleting my thread unfortunately.

  • Odd behaviour of "+" operator in numbers 09

    Hello there,
    One of the annoying "features" of numbers 08 was that a reference to an empty cell would always show up as a zero - this has been the topic of many posts in the past, and if Apple engineers don't know it by now, they must be living on Mars. Using numbers for accounting purposes, this "zero fill" of cells didn't stand nice and was unacceptable. I worked around this problem by pre-filling all cells with an empty quote formula (="") (instead of using the not-so-easy solution "IF(NOT(ISBLANK(..."). Of course, this filled up all cells in the entire spreadsheet with a small formula, but it worked fine and solved the issue - and I am having 500+ tables and 100+ sheets in my spreadsheet. Now however, in numbers 09, the "+" operator doesn't like these empty quotes, and all formulas involving the operator and an empty quote cell yield an error!! This makes my 79€ recent upgrade to numbers 09 completely useless. And frankly, I am astonished that Apple designers didn't notice this!
    Here is an example:
    Cell A1 contains =""
    Cell A2 contains 3
    In numbers 08, the formula =A1+A2 yields 3
    In numbers 09 however the same formula yields an error!!
    (and yes, all cells are formatted as numbers)
    As far as I now by experimenting a little bit, the only way around is a replacement of the formula =A1+A2 by =SUM(A1;A2), which oddly enough does not give an error!
    Or does anyone else have a better solution?
    Am I perhaps missing a simple checkbox somewhere, at some place, hidden in some menu, that says
    "Check me for numbers 08 + operator behaviour"
    (I don't really expect that one, seriously!)
    Regards,
    Shane

    As I already wrote in an other thread,
    treating an empty cell as zero is correct.
    treating a cell containing an empty string was accepted by Numbers '08 but was not conceptually satisfying.
    So, even if I am annoyed by the change, I understand that the authors decided to the program's behavior.
    I described a workaround based on the IF statement but from my point of view, the use of SUM is a better one because it will be kept if we save as iWork'08.
    About this feature, I discovered an odd behavior.
    You all know that I make a huge use of the short references.
    =B+C for instance.
    The export tool is unaware of that and uses the complete references:
    =B12+C12
    =B13+C13
    what a pity
    Yvan KOENIG (from FRANCE samedi 10 janvier 2009 20:53:08)

  • Odd behaviour appending to System.out PrintStream

    I've run into some unexpected behaviour with the System.out PrintStream object. When I append characters to it I'm expecting the characters to be displayed on screen much like I'd expect the characters to be written to a file using a FileOutputStream. What seems to happen is that the characters are written to the PrintStream but the process continues on and on adding some unseen character (newline?). The following code generates the behaviour I"m talking about. The main method is a bit contrived but does the job. You'll likely have to increase your heap size to run this (-Xmx512m worked for me):
    {code}
    package output.stream.problem;
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.FileReader;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.io.OutputStreamWriter;
    import java.io.Reader;
    import java.io.StringReader;
    import java.util.HashMap;
    import java.util.Random;
    * A class used to introduce transition/transversion errors into DNA sequences. Error types are introduced
    * with equal probability and are mutually exclusive.
    * @author twb
    public class GenomicDNAMutator {
         private HashMap<Integer,Character> mutations=new HashMap<Integer,Character>();
         private Reader sequenceSource;
         private Random rand=new Random();
         private double errorRate=-1;
         public GenomicDNAMutator(String fileName, double errorProbability) {
              try {
                   sequenceSource=new FileReader(fileName);
                   errorRate=errorProbability;
              } catch (FileNotFoundException fnfe) {
                   System.err.println("Could not open file "+fileName);
                   fnfe.printStackTrace();
         public GenomicDNAMutator(File file, double errorProbability) {
              try {
                   sequenceSource=new FileReader(file);
                   errorRate=errorProbability;
              } catch (FileNotFoundException fnfe) {
                   System.err.println("Could not open file "+file);
                   fnfe.printStackTrace();
         public GenomicDNAMutator(Reader is, double errorProbability) {
              sequenceSource=is;
              errorRate=errorProbability;
         public void process() {
              this.process(System.out);
         public void process(OutputStream os) {
              BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(os));
              BufferedReader br=new BufferedReader(this.sequenceSource);
              char nucleotide;
              char[] a=new char[]{'T','C','G'};
              char[] t=new char[]{'A','C','G'};
              char[] c=new char[]{'A','T','G'};
              char[] g=new char[]{'A','T','C'};
              char[][] errorMatrix=new char[][]{a,t,c,g};
              int matrixIndex=-1;
              try {
                   int count=0;
                   int i=0;
                   while((i=br.read())!=-1) {
                        nucleotide=(char)i;
                        count++;
                        double d=rand.nextDouble();
                        if(d<=this.errorRate) {
                             switch(nucleotide) {
                             case 'A':
                                  matrixIndex=0;
                                  break;
                             case 'T':
                                  matrixIndex=1;
                                  break;
                             case 'C':
                                  matrixIndex=2;
                                  break;
                             case 'G':
                                  matrixIndex=3;
                                  break;
                             int pos=rand.nextInt(3);
                             this.mutations.put(count,nucleotide);
                             nucleotide=errorMatrix[matrixIndex][pos];
                        bw.append(nucleotide);
                   bw.flush();
                   bw.close();
              } catch (IOException ioe) {
                   System.err.println("Could not read the input source");
         public Reader getIn() {
              return sequenceSource;
         public void setSequenceSource(Reader in) {
              this.sequenceSource = in;
         public static void main(String[] args) throws Exception {
              StringBuilder sb=new StringBuilder();
              for(int i=0;i<30000000;i++) {
                   sb.append('A');
              System.out.println("Mock sequence built");
              GenomicDNAMutator gdm=new GenomicDNAMutator(new StringReader(sb.toString()),1d/100d);
              * Run the program using one of the process statements
              gdm.process(new FileOutputStream(new File("c:/text.txt")));
    //This one uses the System.out PrintStream object
    //          gdm.process();
              System.out.println("done");
    {code}
    I see this behaviour with java 1.6.0_10-beta and java 1.5.0_11
    Thanks for any insight you can give to this.
    - Travis

    twb wrote:
    I've run into some unexpected behaviour with the System.out PrintStream object. When I append characters to it I'm expecting the characters to be displayed on screen much like I'd expect the characters to be written to a file using a FileOutputStream. What seems to happen is that the characters are written to the PrintStream but the process continues on and on adding some unseen character (newline?). The following code generates the behaviour I"m talking about. The main method is a bit contrived but does the job. You'll likely have to increase your heap size to run this (-Xmx512m worked for me):Yes, this is the case. If you look at the javadoc for PrintStream it talks about the "auto-flush on newline" feature. what is your question?

  • URLClassLoader odd behaviour

    Hi,
    I'm having a bit of a problem loading a jar at runtime using a URLClassLoader. Here's the details:
    1. Trying to load dom4j-1.6.1.jar
    2. Everything works fine if I include the jar in the CLASSPATH but throws an error if I try to load it with URLClassLoader
    3. I am loading a number of jars from the same directory. It's the basic plugin idea. This setup is working for a couple of things I've already written
    4. crtiSoomosPlugin.jar depends on dom4j-1.6.1.jar. On start up I call the following code     
    URL[] urlArray = urls.toArray(new URL[urls.size()]);
    loader=new URLClassLoader(urlArray);
    where urlArray contains the URLs of the jars to be loaded. To load the classes I iterate through the files in the jar that end in .class and call
    Class c=loader.loadClass(className);
    5. if crtiSoomosPlugin.jar is loaded using the URLClassLoader and dom4j is in the CLASSPATH all is fine but if dom4j is loaded by the URLClassLoader along with crtiSoomosPlugin.jar the following error is thrown when I call loader.loadClass() on a .class file that depends on dom4j:
    Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/msv/datatype/SerializationContext
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at ca.aafc.crc.SOOMOS.loadPluginsFromJar(SOOMOS.java:915)
         at ca.aafc.crc.SOOMOS.loadPluginsFromDir(SOOMOS.java:888)
         at ca.aafc.crc.SOOMOS.loadPlugins(SOOMOS.java:856)
         at ca.aafc.crc.SOOMOS.<init>(SOOMOS.java:236)
         at ca.aafc.crc.SOOMOS.main(SOOMOS.java:129)
    The odd thing is, com/sun/msv/datatype/SerializationContext is not in any jar in my classpath!
    Any help would be appreciated. I'm really curious to know what I'm not understanding about all of this. Thanks
    - T

    I'm having a bit of a problem loading a jar at
    runtime using a URLClassLoader. Here's the details:
    1. Trying to load dom4j-1.6.1.jar
    2. Everything works fine if I include the jar in the
    CLASSPATH but throws an error if I try to load it
    with URLClassLoaderThe first works because the system loader loads it.
    The error is pretty clear - it isn't finding the class.
    3. I am loading a number of jars from the same
    directory. The class loader loads classes not jars.
    To load the classes I iterate through the
    files in the jar that end in .class and call
    Class c=loader.loadClass(className);Presumably you are doing this to test? Because it won't have any impact otherwise.
    >
    The odd thing is,
    com/sun/msv/datatype/SerializationContext is not in
    any jar in my classpath!
    Any help would be appreciated. I'm really curious to
    know what I'm not understanding about all of this.com/sun means it is part of the internal Sun VM. And there are only two ways that I can think of that it would show up like that.
    1. You overrode one of the methods in URLClassLoader incorrectly.
    2. The libraries you are loading depend on a specific VM version and you are not running that version.

  • Can anyone explain the odd behaviour of the CVI Operator Interface?

    This is probably really related to CVI in general, but I think people should be aware of this behaviour. If tracing is enabled and a program executing, moving the mouse cursor over the Menu bar area of the Operator Interface program increases the execution of the test program dramatically. Anywhere else slows it down! Could this have any effect during critical test runs? Is there a way to force the fast execution. (i.e. to disable whatever message processing is going on when the mouse cursor is over the rest of the window?)

    Brian,
    You did not mention what is the CVI operator interface that you are using. In the Simple CVI OI, which is located at \Examples\OperatorInterfaces, the behavior you mentioned may occur.
    It is mainly because it uses a CVI timer to poll UIMessages, and the Timer Control runs in the same thread as the User Interface (CVI Panels). Because they both run in the same thread, when you move your mouse Windows handles the mouse move and repaint any window if necessary. While doing this, it stops all the other tasks that is running in the same thread, which means, the timer stops to tick and UIMessages are not handled for some time. In addition, the TestStand Engine executes synchronously with UIMessage handling, so if msg
    s are not handled the Engine pauses the execution.
    Finally, there is an example that ships with CVI under
    \Samples\Toolbox\AsyncDem.prj that shows how to use asynchronous timers. In other words, a timer that runs in a different thread different than User Interface. I also modified the Simple CVI OI to use this asynchronous timer, check the attached zip file.
    Regards,
    Roberto P.
    Applications Engineer
    National Instruments
    www.ni.com/support
    Attachments:
    Simple_CVIAsync.zip ‏176 KB

  • Subject does not show in subscribed ical calender

    I am subscribed to two iCal calanders which are published thru .Mac. Since two weeks one of them does show there is an event with the associated time but there is no subject of the event visible. I checked the original calender and everything seems to be in order. Did a Apple-R (sorry don't know the term in Englisch as I am using the Dutch language in my OS and applications) on both computers but this did not help.
    With the other calender everything is fine. On both new appointments are added regularly.

    G.D. Meijvogel,
    1. Use the iCal>File>Back Up Database... menu selection and save the Back Up to a suitable location.
    2. Try the iCal>Calendar>Unpublish... menu selection.
    3. Choose the iCal>Calendar>Publish... menu selection and check for functionality.
    4. If that is unsuccessful, repeat step (2.) and quit iCal on the publishing computer. Then find the com.apple.iCal.plist file in the Macintosh HD/Users/yourusername/Library/Preferences Folder, and drag it to your Desktop. Log out/in or restart and start iCal.
    5. Next, use the ICal>Calendar>Publish...command on the publishing computer and check for functionality.
    Let us know what happens.
    ;~)

  • Library re-imported from troubled backup doing odd things

    So i had a bit of a crisis over the past few days, osx partition corrupted, my backup drive was screwed up, so i did some juggling and managed to back up as much as i could...
    anyway, so now im on a fresh installation of osx and installed iphoto...i was able to save the iphotodata folder and all of my original photo folders that iphoto read from, but the iphoto library was corrupted and uncopyable...
    i have about 10,000some photos that i have carefully organized into about 20 different albums, and losing the organization would be a huge pain...
    i option+started iphoto and picked the iphotodata folder, and it has all my albums and everything there, but the odd thing is when i scroll, all the photo thumbnails are there, but when i stop scrolling they all vanish and become the dotted empty squares.
    i always told iphoto not to duplicate the photos into its library to save space and go off the original folders, but all the folders are in the identical relative places to the iphotodata folder...why isnt it able to find them?
    i've also tried cmd+option rebuilding the libraries, but it didnt do anything
    it'll be a huge pain if i have to manually reorganize everything, does anyone have any ideas?

    It sounds like the database is damaged and can't be repaired. Not sure what you mean by the iPhotodata folder but if you mean the folder named Data that's inside the library then all that contains are the thumbnail files for the library. They are not needed as the thumbnails are recreated when you import the photos.
    You'll have to start over with a new library. If you create a new library and import just the Originals folder from your problem library you will get all of your photos in the same Events that they were in in the old library.

  • Odd behaviour in Graphics2D.drawImage - infinite loop?

    Hi,
    I have the following code inside an overriden paintComponent (JPanel):
    g2.drawImage(fc.getImage(),(int)fc.getSignificantPoint().getX(),
                                    (int)fc.getSignificantPoint().getY(), vioPanel);fc is just an object that is a wrapper for an image and vioPanel is the JPanel class that has been overriden (it's not this because the drawing on g2 is done outside the jpanel class)
    I'm getting some really strange behaviour that i can't explain: when the images are drawn i noticed they were flashing. so i put a system.out.println into the paintComponent method and it seems that calling the g2.drawImage method is causing the panel to be repainted constantly as if it is stuck in an infinite loop. Has anyone else experienced this? if so, do you know the solution?
    If it helps, if you replace the vioPanel variable with new JPanel() the looping stops.
    Cheers,
    jj

    hi,
    VioPanel is a simple class that overrides JPanel with some extra functionality. Essentially tho, it overrides the paintComponent method as shown below and calls a method of a different object that draws the shapes and images. I tried putting all the code in that method into paintComponent (i.e. classic overriding of paintComponent), but still get the same problem.
    public void paintComponent(Graphics g)
            super.paintComponent(g);
            dm.fireGraphics2DSequence();
        }The fireGraphics2DSequence method does all the drawing:
    public void fireGraphics2DSequence()
            Graphics2D g2 = getPanelGraphics();
            g2.scale(magniFactor, magniFactor);
            //separate entities out
            ArrayList features = getFeatures();
            ArrayList lines = getLines();
            //draw map entities (lines and hubs first)
            for(int i = 0; i < lines.size(); i++)
                //draws shapes, which works fine
            //draw nodes
            g2.setColor(Color.black);
            for(int i = 0; i < features.size(); i++)
                FeatureCircle fc = (FeatureCircle)features.get(i);
                if (fc.isTagged()) continue;
                g2.drawImage(fc.getImage(),(int)fc.getSignificantPoint().getX(),
                                    (int)fc.getSignificantPoint().getY(), vioPanel);
                //System.out.println("drawing "+i);
                if(entLabels) g2.drawString(fc.getName(),(float)fc.getSignificantPoint().getX(),
                                           (float)fc.getSignificantPoint().getY());
        }

  • Safari v 3: odd behaviour

    I've updated my PowerMac G5 to MacOsX 10.4.11 and ever since then Safari and Mail have behaved oddly on my system. Often Safari just hangs without going anywhere despite frequent resets.
    I have NO third party add-ons for Safari and should note that I've applied permission fixes, ran Cocktail utilities and the problem still occurs.
    My broadband link is between 3 and 5 MB (using speedtest.net) so it is not my ISP's issue.
    Mail often hangs oddly and from time to time has to be force-quitted.
    Any other users experiencing similar problems since this update?
    I am NOT therefore going to install Mac OSX 10.4.11 on my MacBook Pro, which btw works fine.
    I am using an Airport wireless network at home with a NetGear router. Firewall is enabled on the Mac and also in the router.
    How do I uninstall Safari 3 which on current form is a complete dog.
    Nicholas Down

    This is no help, but my G4 iBook running 10.4.11 with Safari 3.0.4 is running like a one legged horse in treacle. Same issues - interestingly one of the sites I have loads of issues with is the apple site, for example trying to log into the uk apple store if I've cleared the cache - it will not recognise the server. There are loads of posts about this on the discussions board, but not a jot of assistance with the actual problem. Must be like the iWeb update (1.0.1), it'll be sorted once they figure it out!
    The stock response is download Mozilla Firefox, which isn't quite as good as Safari (my opinion). The problem I am having is that MF is doing exactly the same thing, which I don't understand. I haven't got any third party utilites running either.

  • Odd Behaviour: Query and Table

    I have odd occurrences within my code and need an explanation
    to one and help with the other.
    First of all, I have a query within which I am using the
    group attribute, and then I am using a counter to control the
    behaviour of the output within a table. The problem is that when I
    use currentrow attribute with my query which returns seven fields
    with on of them being used for the grouping, the currentrow counter
    returns 1 through six for the non grouped fields, yet when I use a
    counter to count the rows and use a MODULUS operator to create a
    conditional statement, I get the right result with a MOD 7 rather
    than a MOD 6. Why is coldfusion counting seven fields (when I use
    the MOD operator) though currentrow counts 6? (Code is attached and
    numbered 1)
    Secondly, I am outputing the results of my query using two
    different tables as the information for the header is not easily
    included within my query. So I have two queries, one displaying the
    header and the other the query results.
    Now because they are related I wanted to align the two table
    one on top of the other (this was successful) my problem is that
    thought I define the same table with and subsequently the same with
    for respective fields in both tables (table width is 980 pixels
    with the first column being assigned 182 pixels and the rest of the
    columns being assigned 136 pixels each. However the output shows
    that the tables and the columns are not perfectly aligned and they
    do not have the same size (why is this when I have hard coded the
    width of the columns?). How do I get the two tables to align
    perfectly? (code for tables is numbers 2). TIA

    Go to SQ03. Check the Authorizations for both the user groups. Compare and based on the differences find out what is causing the error.
    SQ03 --> Enter user group ..> click Assign infoset to user group...
    Assign tht infoset to user BB.

Maybe you are looking for

  • Problem while  using module DynamicConfigurationBean

    Hi experts            I am doing a file-to-file bypass (<b>without any mapping involved</b>) scenario.My input file name is <comanycode>.<date>.<timestamp>.dat and I want output filename as <companycode>constant.<date><timestamp>.dat To achive this I

  • Installation CR2008 trial error message in Windows 7.

    Hi, Current window : Windows 7 I have install crystal report 2008 trial version in windows 7 and the error message: 1) When i open my project in vb6  error msg : c:\windows\system32\crystl32.ocx could not be loaded -- continue loading project? 2) the

  • Allow DB user to change their password

    Greetings, DAD authenticated access to HTMLDB 2.0 on 10gR1 on hpux. I have built a "account" page where among other things the users can change their passwords, I have built the page over anonymous PL/SQL (below). When a DAD authenticated user runs t

  • SAP implementation methology

    Dear,          In interview someone sak me about the standard methology used in sap implementation?        Can any one tell me about this ?Or any link will be help full> Regards.

  • TNS:could not resolve the connect identifier specified

    I am at the end of my rope and I would really appreciate some assistance. I get the error: "TNS:could not resolve the connect identifier specified " from my ASP pages and "Warning: oci_connect() [function.oci-connect]: Error while trying to retrieve