Permission error on ocijdbc8 library from applet.

I have an applet that access a database. I am currently getting a permission error on the above library. The applet will work if I set java.security.AllPermission, but I do not want to do this. Also, the library is in oracle_client/lib...so would I have to distribute this too.
There is probably something I am doing wrong. I have heard reference to using thin drivers for applets. Do I use a thin driver, and if so...HOW?
Thanks! Any and all answers are very much appreciated!

I change this:
Connection conn = DriverManager.getConnection("jdbc:oracle:oci8:@" + database, user, password);To this:
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@" + database, user, password);And I got this error:
oracle.net.TNSAddress.SOException
Does anyone know what this mean.
Thanks again!

Similar Messages

  • Permission Errors: Mtn Lion upgrade from SL iphoto, iTunes, etc; want to save myself and reinstall, Permission Errors: Mtn Lion upgrade from SL iphoto, iTunes, etc; want to save myself and reinstall

    Well here I am again, once again lots of problems with t he upgrade to ML from SL on my late 2009 iMac.
    Background: I took my perfectly fine functioning iMac into the Apple Store to have the Seagate HD replaced pert the recall. BIG MISTAKE. The Geniuses gave me a "complimentary" upgrade to ML without asking if that was okay, and three months later, I still do not have a functioning iMac.
    My iMac since this reintallation has been unable to open ANY iphoto files/photos saved whie I was still running SL--pretty much everything I've saved as a jpeg for the last six years, so I'm not willing to let this go so easily. Not only have I got work-related files on here that I need, all of my children's and family photos are saved on there. I need those files.
    After trying to no avail to reinstall SL from disk, the Apple Tech from Apple Care said that I've got hardware problems (fans wont' stop running; SL disk cannot be read by either Super Drive--the one inside the iMac or the external portable Super Drive, hence reinstallation of SL has not been possible), so I'm supposed to take it BACK into the Apple Store and let them work on it again. Please understand that for the last three months I have been dealing with nonstop issues that have created a real mess of my life and nothing gets fixed, no matter how many phone calls I make. I do not think any of this is hardware-related, honestly. I've found numerous threads on the fan running constantly with the installation of ML; and no, I'm not even running any CPU-instensive programs. And nothing explains why when the SL disk (a second copy of which was mailed to me) cannot be opened (the progress wheel just keeps spinning and spinning).
    Well, I've decided that I'm probably going to have to give up on this, and that my previously working iMac that should have had more life in it is destined for the landfill (or recycling). All I want now is to get my data off of it and be able to  use it with my external hard drive with another Mac (MBA now running Lion--although it's also got lots of problems) and a new Windows machines which I will mostly likely be buying this week. I can no longer live with the interruptions to my life--I work with my computers, need my data, and this has been going for three months.
    I read a bunch of really complicated information on how to get my old data off of my Mac and/or external hard drive, and I've accepted that this is going to take a LOT of time, but I  do't have a choice if I want my data.
    I'm now looking at the contents of my external hard drive, and looking specifically at one of the user accounts (one that I use for work purposes) and I see that I am not allowed to view the contents of the "Pictures" because I do not have permission. This has been an ongoing issue while using the MBA to TRY to view/access data from the iMac. Is there anyone who can help me figure out how to repair all of  these permission errors?
    I've lost an unbelievable amount of time with all of this and I only want MY OWN files. I'm not trying to pirate any software, I just want and need my own iPhoto images and of course, since I own the music in my iTunes library, I think I ought to have permission to take this data off of  this external hard drive and put it onto another external hard drive that I will buy tomorrow, so that I can reinstall onto another machine (ie, probably a  new WIndows computer).
    To paraphrase:
    Upgrade to ML made most of my files saved on my iMac with SL obsolete or not viewable or accessbile. I NEED these files (mostly jpegs, iTunes music, some pages docs, etc, but I'll live without those docs if need be).
    I have the last backup that was done before taking the iMac in to have the hard drive replaced. I can see that the data is there, but in one of the user accounts, the one I use mostly for work related purposes, the error  message that tells me I cannot view the files because I do not have permission comes up. I've never had any other admins of my computers, either the iMac or the MBA that I am trying to use to open the files on the external hard drive. How would I repair the permissions on a backup of my old SL system from a MBA running Lion?
    Anyone? Please help. I'm going to lose a whole heck of a lot of data and money if I cannot get these saved files back.

    Well here I am again, once again lots of problems with t he upgrade to ML from SL on my late 2009 iMac.
    Background: I took my perfectly fine functioning iMac into the Apple Store to have the Seagate HD replaced pert the recall. BIG MISTAKE. The Geniuses gave me a "complimentary" upgrade to ML without asking if that was okay, and three months later, I still do not have a functioning iMac.
    My iMac since this reintallation has been unable to open ANY iphoto files/photos saved whie I was still running SL--pretty much everything I've saved as a jpeg for the last six years, so I'm not willing to let this go so easily. Not only have I got work-related files on here that I need, all of my children's and family photos are saved on there. I need those files.
    After trying to no avail to reinstall SL from disk, the Apple Tech from Apple Care said that I've got hardware problems (fans wont' stop running; SL disk cannot be read by either Super Drive--the one inside the iMac or the external portable Super Drive, hence reinstallation of SL has not been possible), so I'm supposed to take it BACK into the Apple Store and let them work on it again. Please understand that for the last three months I have been dealing with nonstop issues that have created a real mess of my life and nothing gets fixed, no matter how many phone calls I make. I do not think any of this is hardware-related, honestly. I've found numerous threads on the fan running constantly with the installation of ML; and no, I'm not even running any CPU-instensive programs. And nothing explains why when the SL disk (a second copy of which was mailed to me) cannot be opened (the progress wheel just keeps spinning and spinning).
    Well, I've decided that I'm probably going to have to give up on this, and that my previously working iMac that should have had more life in it is destined for the landfill (or recycling). All I want now is to get my data off of it and be able to  use it with my external hard drive with another Mac (MBA now running Lion--although it's also got lots of problems) and a new Windows machines which I will mostly likely be buying this week. I can no longer live with the interruptions to my life--I work with my computers, need my data, and this has been going for three months.
    I read a bunch of really complicated information on how to get my old data off of my Mac and/or external hard drive, and I've accepted that this is going to take a LOT of time, but I  do't have a choice if I want my data.
    I'm now looking at the contents of my external hard drive, and looking specifically at one of the user accounts (one that I use for work purposes) and I see that I am not allowed to view the contents of the "Pictures" because I do not have permission. This has been an ongoing issue while using the MBA to TRY to view/access data from the iMac. Is there anyone who can help me figure out how to repair all of  these permission errors?
    I've lost an unbelievable amount of time with all of this and I only want MY OWN files. I'm not trying to pirate any software, I just want and need my own iPhoto images and of course, since I own the music in my iTunes library, I think I ought to have permission to take this data off of  this external hard drive and put it onto another external hard drive that I will buy tomorrow, so that I can reinstall onto another machine (ie, probably a  new WIndows computer).
    To paraphrase:
    Upgrade to ML made most of my files saved on my iMac with SL obsolete or not viewable or accessbile. I NEED these files (mostly jpegs, iTunes music, some pages docs, etc, but I'll live without those docs if need be).
    I have the last backup that was done before taking the iMac in to have the hard drive replaced. I can see that the data is there, but in one of the user accounts, the one I use mostly for work related purposes, the error  message that tells me I cannot view the files because I do not have permission comes up. I've never had any other admins of my computers, either the iMac or the MBA that I am trying to use to open the files on the external hard drive. How would I repair the permissions on a backup of my old SL system from a MBA running Lion?
    Anyone? Please help. I'm going to lose a whole heck of a lot of data and money if I cannot get these saved files back.

  • Error deploy shared library from Enterprise Manager IAS10.1.3.5.0

    Hi,
    I am trying deploy one shared library in my OC4J instance (prd_oc4j) from Enterprise Manager, but when i run my application its not loading this library (error missing class), but when i put this shared library in file server.xml without Enterprise Manager my application run sucessfully.
    Help me please or this problem is a bug?
    Tks,
    Haysar Lelis

    If finally found the cause of the problem, lack of PermGen space for the home instance;
    When opening the EM Console most of the times i was able to open the login page, under stress opening this page failed most of the times.
    The ascontrol-application.log pointed me in the right direction;
    10/09/07 15:26:59.111 ascontrol: Servlet error
    java.lang.OutOfMemoryError: PermGen space
    When monitoring the PermGen of the home instance, is showed that the system was running out of PermGen space.
    Increasing the PermGen size for the home instance in opmn.xml did the trick
    <data id="java-options" value="-Xrs -server -XX:MaxPermSize=128M......"

  • Errors running converted application (from applet)

    I've converted some codes (applet) into an application. When I run the application, I can see the GUI, but the application reports error as follows:
    Exception occurred during event dispatching:
    java.lang.NullPointerException
         at swarmCanvas.paint(Swarm.java:192)
         at sun.awt.RepaintArea.paint(RepaintArea.java:298)
         at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:196)
         at java.awt.Component.dispatchEventImpl(Component.java:2663)
         at java.awt.Component.dispatchEvent(Component.java:2497)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
    What I see is only the GUI less the animation that occurs when it was an applet. Could anyone offer me any suggestions or help? Thanks a lot.

    Here's my codes, many thanks:
    * Swarm.class
    * This is the major class of the swarm animation. The Swarm class is
    * responsible for initialising and coordinating the Flock, swarmCanvas,
    * and swarmPanel classes.
    * @see Flock.class
    * @see Bird.class
    * @see Barrier.class
    * @author Duncan Crombie
    * @version 2.02, 20 September 1997
    import java.awt.*;
    public class Swarm extends java.applet.Applet implements Runnable {
    Thread animator; // animation thread
    swarmCanvas arena; // display canvas
    swarmPanel controls; // control panel
    static int NUMBLUE = 15, NUMRED = 5, MAXPOP = 20;
    static double SPEED = 5.0;
    static int TURN = 15, MINDIST = 30, MAXDIST = 60;
    boolean paused = false;
    public void init() { // initialise applet components
    arena = new swarmCanvas();
    controls = new swarmPanel(NUMBLUE, NUMRED, MAXPOP);
    setLayout(new BorderLayout());
    add("Center", arena); // add canvas to applet at 'Center'
    add("South", controls); // add panel to applet at 'South'
    arena.requestFocus();
    public void start() { // start thread when applet starts
    if (animator == null) {
    animator = new Thread(this);
    animator.start();
    public void stop() { // stop thread when applet stops
    if (animator != null) {
    animator.stop();
    animator = null;
    public void run() {
    boolean flocking = false;
    while (true) {
    if (!flocking && arena.unpacked) { // once canvas component is unpacked
    Bird.setBoundaries(arena.w, arena.h); // set swarm boundaries
    arena.flock = new Flock(NUMBLUE, NUMRED, SPEED, TURN, MINDIST, MAXDIST);
    flocking = true;
    } else if (flocking) {
    Bird.setBoundaries(arena.w, arena.h);
    if (!paused)
    arena.flock.move(); // animate the flock
    arena.repaint(); // update display
    try {
    Thread.sleep(20); // interval between steps
    } catch (InterruptedException e) {}
    public boolean handleEvent(Event ev) { // check for control panel actions
    if (ev.id == Event.ACTION_EVENT && ev.target == controls.reset) {
    resetApplet(); // reset button pressed in controls
    return true;
    if (ev.id == Event.ACTION_EVENT && ev.target == controls.pause) {
    paused = !paused; // toggle paused status
    controls.pause.setLabel((paused) ? "Continue" : "Pause");
    return true;
    if (ev.target == controls.sbRed) {
    if (ev.id == Event.SCROLL_LINE_UP)
    arena.flock.removeBird(Color.red); // remove a red Bird from flock
    else if (ev.id == Event.SCROLL_LINE_DOWN)
    arena.flock.addBird(new Bird(Color.red)); // add a red Bird
    return true;
    if (ev.target == controls.sbBlue) {
    if (ev.id == Event.SCROLL_LINE_UP)
    arena.flock.removeBird(Color.blue); // remove a blue Bird from flock
    else if (ev.id == Event.SCROLL_LINE_DOWN)
    arena.flock.addBird(new Bird(Color.blue)); // add a blue Bird
    return true;
    return super.handleEvent(ev); // pass on unprocessed events
    public boolean keyDown(Event e, int x) { // check for key press
    boolean shiftKeyDown = ((e.modifiers & Event.SHIFT_MASK) != 0);
    if (shiftKeyDown) {
    if (x == Event.DOWN) Flock.minDISTANCE -= 5; // less separation
    if (x == Event.UP) Flock.minDISTANCE += 5; // more separation
    if (x == Event.LEFT) Flock.maxDISTANCE -= 5; // lower detection
    if (x == Event.RIGHT) Flock.maxDISTANCE += 5; // higher detection
    Barrier.minRANGE = Flock.minDISTANCE;
    Barrier.maxRANGE = Flock.maxDISTANCE;
    } else {
    if (x == Event.DOWN) Bird.maxSPEED -= 1.0; // slower
    if (x == Event.UP) Bird.maxSPEED += 1.0; // faster
    if (x == Event.LEFT) Bird.maxTURN -= 5; // less turning
    if (x == Event.RIGHT) Bird.maxTURN += 5; // more turning
    return true; // all key events handled
    public void resetApplet() {
    arena.flock = new Flock(NUMBLUE, NUMRED, SPEED, TURN, MINDIST, MAXDIST);
    controls.sbBlue.setValue(NUMBLUE); // initialise scrollbars
    controls.sbRed.setValue(NUMRED);
    * swarmPanel.class
    * A Panel holding two scrollbars and two buttons for controlling the
    * Swarm applet.
    * @see Swarm.class
    * @author Duncan Crombie
    * @version 2.01, 20 September 1997
    class swarmPanel extends Panel { // class defines applet control panel
    Button reset, pause;
    Scrollbar sbBlue = new Scrollbar(Scrollbar.HORIZONTAL);
    Scrollbar sbRed = new Scrollbar(Scrollbar.HORIZONTAL);
    Label label1, label2;
    * The construction method creates and adds control panel components
    swarmPanel(int numRed, int numBlue, int maxBoid) {
    setLayout(new GridLayout(2, 3)); // define 2 x 3 grid layout for controls
    label1 = new Label("Blue #");
    label1.setFont(new Font("Dialog", Font.PLAIN, 12)); add(label1);
    label2 = new Label("Red #");
    label2.setFont(new Font("Dialog", Font.PLAIN, 12)); add(label2);
    reset = new Button("Reset"); add(reset);
    sbBlue.setValues(numRed, 1, 0, maxBoid);
    add(sbBlue);
    sbRed.setValues(numBlue, 1, 0, maxBoid);
    add(sbRed);
    pause = new Button("Pause");
    add(pause);
    * swarmCanvas.class
    * A Canvas for displaying the Flock and Swarm parameters.
    * @see Swarm.class
    * @author Duncan Crombie
    * @version 2.01, 20 September 1997
    class swarmCanvas extends Canvas {
    Flock flock;
    Image offScrImg;
    boolean unpacked = false;
    int w, h;
    /* Double buffered graphics */
    public void update(Graphics g) {
    if (offScrImg == null || offScrImg.getWidth(this) != w || offScrImg.getHeight(this) != h)
    offScrImg = createImage(w, h);
    Graphics og = offScrImg.getGraphics();
    paint(og);
    g.drawImage(offScrImg, 0, 0, this);
    og.dispose();
    public void paint(Graphics g) {
    Dimension d = this.preferredSize();
    if (!unpacked) {
    this.w = d.width;
    this.h = d.height;
    unpacked = true;
    g.setColor(Color.white);
    g.fillRect(0, 0, w, h); // draw white background
    g.setColor(Color.black); // set font and write applet parameters
    g.setFont(new Font("Dialog", Font.PLAIN, 10));
    g.drawString("Bird Speed: " + Bird.maxSPEED, 10, 15);
    g.drawString("Bird Turning: " + Bird.maxTURN, 10, 30);
    g.drawString("Minimum Distance: " + Flock.minDISTANCE, 10, 45);
    g.drawString("Maximum Distance: " + Flock.maxDISTANCE, 10, 60);
    flock.display(g); // draw Flock members
    if (this.w != d.width || this.h != d.height)
    unpacked = false;
    public boolean mouseDown(Event ev, int x, int y) {
    int radius = Barrier.maxRANGE;
    boolean top, bottom;
    flock.addBird(new Barrier(x, y)); // place Barrier at click coordinates
    top = (y < radius);
    bottom = (y > h-radius);
    if (x < radius) { // if left
    flock.addBird(new Barrier(w + x, y));
    if (top) flock.addBird(new Barrier(w + x, h + y));
    else if (bottom) flock.addBird(new Barrier(w + x, y - h));
    } else if (x > w-radius) { // if right
    flock.addBird(new Barrier(x - w, y));
    if (top) flock.addBird(new Barrier(x - w, h + y));
    else if (bottom) flock.addBird(new Barrier(x - w, y - h));
    if (top) flock.addBird(new Barrier(x, h + y));
    else if (bottom) flock.addBird(new Barrier(x, y - h));
    return true;
    ===================================================================
    * Bird.class
    * This class defines the appearance and behaviour of a Bird object.
    * @see Swarm.class
    * @see Flock.class
    * @see Barrier.class
    * @author Duncan Crombie
    * @version 2.02, 21 September 1997
    import java.awt.*;
    class Bird {
    int iX, iY, iTheta;
    Color cFeathers;
    static int arenaWIDTH, arenaHEIGHT; // canvas dimensions
    static double maxSPEED; // speed of Bird
    static int maxTURN; // maximum turn in degrees
    Bird(int x, int y, int theta, Color feath) {
    iX = x;
    iY = y;
    iTheta = theta;
    cFeathers = feath;
    Bird(Color feath) {
    this((int)(Math.random() * arenaWIDTH),
    (int)(Math.random() * arenaHEIGHT),
    (int)(Math.random() * 360),
    feath);
    public void move(int iHeading) {
    int iChange = 0;
    int left = (iHeading - iTheta + 360) % 360;
    int right = (iTheta - iHeading + 360) % 360;
    if (left < right)
    iChange = Math.min(maxTURN, left);
    else
    iChange = -Math.min(maxTURN, right);
    iTheta = (iTheta + iChange + 360) % 360;
    iX += (int)(maxSPEED * Math.cos(iTheta * Math.PI/180)) + arenaWIDTH;
    iX %= arenaWIDTH;
    iY -= (int)(maxSPEED * Math.sin(iTheta * Math.PI/180)) - arenaHEIGHT;
    iY %= arenaHEIGHT;
    public void display(Graphics g) { // draw Bird as a filled arc
    g.setColor(this.cFeathers);
    g.fillArc(iX - 12, iY - 12, 24, 24, iTheta + 180 - 15, 30);
    public int getDistance(Bird bOther) {
    int dX = bOther.getPosition().x-iX;
    int dY = bOther.getPosition().y-iY;
    return (int)Math.sqrt(Math.pow(dX, 2) + Math.pow(dY, 2));
    static void setBoundaries(int w, int h) {
    arenaWIDTH = w;
    arenaHEIGHT = h;
    public int getTheta() {
    return iTheta;
    public Point getPosition() {
    return new Point(iX, iY);
    public Color getFeathers() {
    return cFeathers;
    =================================================================
    * Flock.class
    * This class creates and coordinates the movement of a flock of Birds.
    * @see Swarm.class
    * @see Bird.class
    * @see Barrier.class
    * @author Duncan Crombie
    * @version 2.02, 21 September 1997
    import java.util.Vector;
    import java.awt.*;
    class Flock { // implement swarming algorithm on flock of birds
    private Vector vBirds;
    static int minDISTANCE, maxDISTANCE;
    Flock(int nBlue, int nRed, double speed, int turn, int minDist, int maxDist) {
    vBirds = new Vector(5, 5);
    for (int i=0; i < nBlue + nRed; i++)
    addBird(new Bird((i < nBlue) ? Color.blue : Color.red));
    Bird.maxSPEED = speed;
    Bird.maxTURN = turn;
    Barrier.minRANGE = minDISTANCE = minDist;
    Barrier.maxRANGE = maxDISTANCE = maxDist;
    public void addBird(Bird bird) { // add Bird to vector
    vBirds.addElement(bird);
    synchronized void removeBird(Color col) { // remove Bird from vector
    for (int i=0; i < vBirds.size(); i++) { // loop through vector of Birds
    Bird bTemp = (Bird)vBirds.elementAt(i);
    if (bTemp.getFeathers() == col) { // search for Bird of given colour
    vBirds.removeElementAt(i); // if found, remove Bird..
    break; // ..and stop searching
    * The move function simply tells each Bird in the Vector vBirds to move
    * according to the resultant Point of generalHeading.
    synchronized public void move() {
    for (int i=0; i < vBirds.size(); i++) {
    Bird bTemp = (Bird)vBirds.elementAt(i);
    bTemp.move(generalHeading(bTemp));
    * The display function simply draws each Bird in the Vector vBirds at its
    * current position.
    public void display(Graphics g) { // display each Bird in flock
    for (int i=0; i < vBirds.size(); i++) {
    Bird bTemp = (Bird)vBirds.elementAt(i);
    bTemp.display(g);
    public Point sumPoints(Point p1, double w1, Point p2, double w2) {
    return new Point((int)(w1*p1.x + w2*p2.x), (int)(w1*p1.y + w2*p2.y));
    public double sizeOfPoint(Point p) {
    return Math.sqrt(Math.pow(p.x, 2) + Math.pow(p.y, 2));
    public Point normalisePoint(Point p, double n) {
    if (sizeOfPoint(p) == 0.0) return p;
    else {
    double weight = n / sizeOfPoint(p);
    return new Point((int)(p.x * weight), (int)(p.y * weight));
    * The generalHeading function determines the point a Bird will turn towards
    * in the next timestep. The Bird b checks for all Birds (other than self)
    * that fall within the detection range. If the Bird is of a different colour
    * or closer than the separation distance then they are repulsed else the
    * Birds are attracted according to the flocking algorithm.
    private int generalHeading(Bird b) {
    if (b instanceof Barrier) return 0;
    Point pTarget = new Point(0, 0);
    int numBirds = 0; // total of Birds to average
    for (int i=0; i < vBirds.size(); i++) { // for each Bird in array
    Bird bTemp = (Bird)vBirds.elementAt(i); // retrieve element i
    int distance = b.getDistance(bTemp); // get distance to Bird
    if (!b.equals(bTemp) && distance > 0 && distance <= maxDISTANCE) {
    * If the neighbour is a sibling the algorithm tells the boid to align its
    * direction with the other Bird. If the distance between them differs from
    * minDISTANCE then a weighted forces is applied to move it towards that
    * distance. This force is stronger when the boids are very close or towards
    * the limit of detection.
    if (b.getFeathers().equals(bTemp.getFeathers())) { // if same colour
    Point pAlign = new Point((int)(100 * Math.cos(bTemp.getTheta() * Math.PI/180)), (int)(-100 * Math.sin(bTemp.getTheta() * Math.PI/180)));
    pAlign = normalisePoint(pAlign, 100); // alignment weight is 100
    boolean tooClose = (distance < minDISTANCE);
    double weight = 200.0;
    if (tooClose) weight *= Math.pow(1 - (double)distance/minDISTANCE, 2);
    else weight *= - Math.pow((double)(distance-minDISTANCE) / (maxDISTANCE-minDISTANCE), 2);
    Point pAttract = sumPoints(bTemp.getPosition(), -1.0, b.getPosition(), 1.0);
    pAttract = normalisePoint(pAttract, weight); // weight is variable
    Point pDist = sumPoints(pAlign, 1.0, pAttract, 1.0);
    pDist = normalisePoint(pDist, 100); // final weight is 100
    pTarget = sumPoints(pTarget, 1.0, pDist, 1.0);
    * In repulsion the target point moves away from the other Bird with a force
    * that is weighted according to a distance squared rule.
    else { // repulsion
    Point pDist = sumPoints(b.getPosition(), 1.0, bTemp.getPosition(), -1.0);
    pDist = normalisePoint(pDist, 1000);
    double weight = Math.pow((1 - (double)distance/maxDISTANCE), 2);
    pTarget = sumPoints(pTarget, 1.0, pDist, weight); // weight is variable
    numBirds++;
    if (numBirds == 0) return b.getTheta();
    else // average target points and add to position
    pTarget = sumPoints(b.getPosition(), 1.0, pTarget, 1/(double)numBirds);
    int targetTheta = (int)(180/Math.PI * Math.atan2(b.getPosition().y - pTarget.y, pTarget.x - b.getPosition().x));
    return (targetTheta + 360) % 360; // angle for Bird to steer towards
    ======================================================================
    * Barrier.class
    * This class creates and coordinates the movement of a flock of Birds.
    * @see Swarm.class
    * @see Flock.class
    * @see Bird.class
    * @author Duncan Crombie
    * @version 2.01, 21 September 1997
    import java.awt.*;
    class Barrier extends Bird {
    static int minRANGE, maxRANGE;
    Barrier(int x, int y) {
    super(x, y, 0, Color.black); // position Barrier and define color as black
    public void move(int dummy) {
    // do nothing
    public void display(Graphics g) { // paint Barrier
    g.setColor(Color.black);
    g.fillOval(this.iX-5, this.iY-5, 10, 10);
    g.setColor(Color.gray); // paint separation circle
    g.drawOval(this.iX-minRANGE, this.iY-minRANGE, 2*minRANGE, 2*minRANGE);
    g.setColor(Color.lightGray); // paint detection circle
    g.drawOval(this.iX-maxRANGE, this.iY-maxRANGE, 2*maxRANGE, 2*maxRANGE);
    =====================================================================
    import java.awt.*;
    import java.awt.event.*;
    public class SwarmFrame extends Frame implements ActionListener {
    public SwarmFrame() {
    super("Flocking Bird");
    MenuBar mb = new MenuBar();
    setMenuBar(mb);
    Menu fileMenu = new Menu("File");
    mb.add(fileMenu);
    MenuItem exitMenuItem = new MenuItem("Exit");
    fileMenu.add(exitMenuItem);
    exitMenuItem.addActionListener(this);
    Swarm swarmApplet = new Swarm();
    add(swarmApplet, BorderLayout.CENTER);
    swarmApplet.init();
    public void actionPerformed(ActionEvent evt) {
    if(evt.getSource() instanceof MenuItem) {
    String menuLabel = ((MenuItem) evt.getSource()).getLabel();
    if(menuLabel.equals("Exit")) {
    dispose();
    System.exit(0);
    =====================================================================
    import java.awt.*;
    public class SwarmApplication {
    public static void main(String[] args) {
    Frame frame = new SwarmFrame();
    frame.setBounds(10, 10, 600, 400);
    frame.setVisible(true);

  • "Check that you have permission to write to the library directory." I had this error pop up when trying to access a iPhoto Library from Finder.

    The error, "Check that you have permission to write to the library directory." Displayed after trying to access a iPhoto Library from finder. The file is located on the local hard drive and was accessed not 5 minutes before the error displayed. Upon searching the forums I found a similar problem and the instructions said to check a permission box in the "Get Info" tab. There was no box visible and after clicking the arrow to open the "Open With" tab, the rainbow wheel started to spin and I could no longer access Finder or the desktop. I was deleting files trying to make space on my hard drive and noticed as I was deleting files more data was being added to the iPhoto Library. My question is how can I fix this and how can I prevent this in the future, thank you very much for any help, I would really like to keep these pictures.

    I found a similar problem and the instructions said to check a permission box in the "Get Info" tab.
    This applies only when the Library is on an external drive. You cannot ignore permissions on the system drive.
    I was deleting files trying to make space on my hard drive
    What were you deleting?
    and noticed as I was deleting files more data was being added to the iPhoto Library.
    Hard to see how deleting files can add data to the iPhoto Library. Can you explain why you thought this?
    I would really like to keep these pictures.
    Make a back up now.
    Most Simple Back Up:
    Drag the iPhoto Library from your Pictures Folder to another Disk. This will make a copy on that disk.
    Slightly more complex: Use an app that will do incremental back ups. This is a very good way to work. The first time you run the back up the app will make a complete copy of the Library. Thereafter it will update the back up with the changes you have made. That makes subsequent back ups much faster. Many of these apps also have scheduling capabilities: So set it up and it will do the back up automatically.
    Example of such apps: Chronosync - but there are many others. Search on MacUpdate or the App Store

  • After installing 10.7.2 from scratch, permission errors remain

    Hey, this is a summery of what have happened:
    1. upgraded to Lion from SL (via AppStore)
    2. have played with 'get info' > 'apply to all enclosed items'  :/
    3. things have gone messy, slow, permission errors. example:
    (Warning: SUID file “System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAg ent” has been modified and will not be repaired.)
    4. booted from DVD of Lion dmg.
    then, formatted and performed a clean install.
    (backed up to a new disk image with CCC, just in case)
    5. Notice that I did not copy anything or downloaded/installed a single file/application yet.
    after the so called 'clean' install, I've ran the disk utility to verify permissions again (both from DVD and from cmd+R - recovery partition).
    still I get the warning about ARDAgent, still verifying and repairing permission takes 2-3 minutes. with only the OS X installed on HDD.
    6. Got this advice from several boards:
    Open Terminal as an admin user.
    type in the following:
    sudo chmod -RN ~
    you will have to authenticate with a non-blank password.
    then follow the steps of resetting the ACLs.
    I have done this, and got: Failed to clear ACL on file ubiquity.socket: Invalid argument
    Then, booted from DVD, in terminal typed: 'resetpassword' and chose the HDD and "user" and clicked on 'reset password and ACLs'.
    restarted, Spotlight did index againg.
    7. still permission errors, so I didn't copy anything back yet, waiting for help to get the right way or restoring to default/formatting again.
    My questions are:
    1. Did I do everything right? Is it possible to perform a clean install from the DVD that I made?
    2. If so, shouldn't it cancel all the ACLs problems and reset them to the default?
    3. Is there a way to make a real 100% clean install of 10.7.2, with erasing even the recovery partition (if it has to do with ACLs)?
    4. if and when this will be solved, I will need to copy back my files and folders from external FW800 WesternDigital,
    will I need to reset their permissions too somehow? It could cause more problems with the ACLs.
    thank you very much.

    baltwo,
    I have a lion clone. so I guess there is no reason to install lion upon it's own clone.
    anyways, how is it possible that after the complete format, the ACL problem remains.
    what about removing the recovery partition.
    the reason I want it to be done is to get rid of the problems I had with the new installation, tham I'm afraid will not be fixed otherwise: crashing apple applications (safari quitted unexpectedly), slow performance, computer freezes, GUI lags (copying 138 items to another folder stucks and I have to relounch finder) and other animation bugs at almost everywhere on the system.
    restoring lion clone and turning on the time machine sounds like the last option right now...
    and I'll be happy to hear opinions about what to do with the backed up data on the external hdd permissions.

  • Getting error Can't read from the source or disk when moving documents from one folder to another folder in the library

    Hi,
    When we try to move documents from one folder to another folder in the document library using "Open with explorer" getting beloe error.
         Can read from the source file or disk.
        The user having below permission for the Library as well as site.
    Fullcontrol,Limited access--->Given directly
    Read,Limited access--->Givin through the all Test grp
    Contribute,Limited Access-->given through test members grp
    Read,Limited access---> givin through The group grp
    Could you please help me anyone....
    Thanks

    Hi Reddy,
    If you are moving files in two libraries in different sites, then the error will occur and it is by design that there are limitations on the DAV move commands that the DAV client is respecting.
    https://social.msdn.microsoft.com/Forums/en-US/6245f332-c609-4a7b-8e00-c8b5e46f7759/cant-move-files-using-windows-explorer-cant-read-from-source?forum=sharepointgeneral
    If you are moving files in the same library, I recommend you to use Wireshark to reveal the error message and enable IIS
    Trace Logging for Failed Requests to examine the IIS log file for troubleshooting.
    https://social.msdn.microsoft.com/Forums/en-US/47cd569d-98f2-4cca-b78e-fd178c097285/cant-read-from-the-source-file-or-disk?forum=sharepointgeneralprevious
    To narrow down the issue scope, I recommend you to test with another library and see if the copy in explorer can work.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Permissions error when restoring itunes library from old hdd's TM backup to new SSD OS X Music folder...

    Hello,
    I got my self a new SSD and installed Lion in it from the internet. I tried copy pasting the itunes library from the most current backup in the TM drive that was used to backup the old hdd. I keep on getting "not enough permission" error for every single file. This same happens when I restore using Time Machine by navigating to the foler using the option "Browse Other Backup Disks"
    Note: There is no encryption problem here AFAIK cause i never used encryption on any of my drives.
    Please help me restore iTunes library and iPhoto library form the backup. Thanks.
    Neerav

    AceNeerav wrote:
    I tried copy pasting the itunes library from the most current backup in the TM drive that was used to backup the old hdd.
    Don't copy & paste.
    Just use TM to restore it.

  • Permissions Error message trying to restore iPhoto Library from Time Machine

    I've tried several times to restore my iPhoto library from Time Machine. After 45 min. when it's almost finished, I get an error "The operation can't be completed because you don't have permission to access "iPhoto Library". Anyone know how to fix this?

    Hi, and welcome to the forums.
    Connect to the TC via Ethernet cable if at all possible.
    Try repairing your backups, per #A5 in [Time Machine - Troubleshooting|http://web.me.com/pondini/Time_Machine/Troubleshooting.html] (or use the link in *User Tips* at the top of this forum).

  • JMF bundlejava.lang.RuntimeException: No permission to capture from applets

    Hello!
    I'm developing a SIP Softphone Applet which works with Java Media Framework 2.1 (uses RTP).
    I want to make a jmf bundle for my applet, that is very important for me, because users will not install Java Media Framework.
    I have done a jar which contains unpacked JMF, it works very nice when I lunch my applet (jar) as a simple Java application, but NOT IN BROWSER...
    I have used JMFRegistry for generate a jmf.properties file that allows devices to be captured from applets...
    When I try to run my application from browser one error appears : java.lang.RuntimeException: No permission to capture from applets, because the jmf.jar doesn't detect jmf.properties...
    I don't need to use system variables (CLASSPATH), registry because it will require a restart of the system.
    Sorry for my bad English and I wish that I have exposed my minds correctly.
    Help me please!!!
    Thanks!!!

    Hi!
    1.Are you getting this error in Vista or XP ?
    Response:
    I have this error on XP. (I've tried this on the Vista, but there are some problems with JMF...)
    2. If XP,
    a) Do you have any service packs installed in your system ?
    Response:
    Not, I haven't installed any Service Packs.
    b) Which browsers you tried ? In all browsers are you getting this error ?
    Response:
    I'm tried on Internet Explore and on Firefox. The error is in both browsers.
    3. For your Java Application requires JMF to be installed in client machine ?
    Response:
    Not, I don't need to install JMF on client machine, because I must to bundle JMF in my application...
    4. How to create a jar with unpacked JMF ? (is it jmf installer from sun)
    Response:
    Yes, there is a installer from sun (for Windows is .exe, but on linux there are some problems: some packages are missed).
    I use Intellij Idea to develop my Softphone and in this IDE there is a nice plugin "Jar Tool", which can help you to archive...
    I have tried to unjar JMF with 7zip, after that I make a jar with Netbeans IDE and it works...
    5. Did you singed your applet ?
    Response:
    Sure, I've signed my applet...
    Good luck, friend... If you will resolve this problem (to include jmf.properties somewhere and applet will work from browser...) tell me please...

  • Error while deleting image from picture library

    Facing issue in deleting pictures from picture library from a site collection created in SharePoint 2010 mode in SharePoint 2013.  Though we can open the picture and delete it from 'Delete Item' from the ribbon, we cannot delete the pictures from Actions
    -> Delete option.  
    Here is the exception
    Level:Medium Category: General
    Application error when access /_layouts/DeleteMu.aspx, Error=Object reference not set to an instance of an object.   at Microsoft.SharePoint.WebControls.DeltaPage.LoadPageStateFromPersistenceMedium()    
    at Microsoft.SharePoint.ApplicationPages.DeleteMultipleItemPage.<LoadPageStateFromPersistenceMedium>b__0()     at Microsoft.SharePoint.ApplicationPages.LoadViewStateHelper.LoadViewStateOrNull(Func`1 loadPageStateFunc)    
    at System.Web.UI.Page.LoadAllState()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
     

    Hi Shivayogi,
    Whether you migrate SharePoint 2010 to SharePoint 2013, and kept in 2010 mode.
    If yes, please create a new site collection, then test again, compare the result.
    Whether other libraries could work correctly.
    Whether this issue occurres for 2013 mode site collections.
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • SSIS 2012 package runs under SSDT but fails with permission error from SSMS

    I have a simple package that pulls data from a text file located on a Windows file server that runs successfully from SSDT on my client.
    However, when deployed and running the package via SSMS from the client, the package fails with a permission error, with the error stating that the data file could not be opened.
    I have done some investigation and have seen some info that states that a package run from SSMS runs under the account on which you are logged on to the machine, which I would have thought is correct. This is therefore the same account when running from
    SSDT (which works) and I can see from the SSIS Report that the 'Caller' is stated as my account, so if this is the case why isin't the package working.
    I've also seen an MSDN forum answer which stated the opposite that the package when run from the IS Catalog in SSMS doesn't run under the account on which the client is logged on with, which is the opposite of the above, but doesn't indicate which account
    it is using.
    So what account is being used to run SSIS 2012 packages from the IS catalog from within SSMS ?
    If it is the account on which you are logged onto the client running SSMS, why is it not working when the account has the necessary permissions (as provent when running from SSDT) ?

    I am aware it's using my account and not one of the service. There's nothing in the posts above which suggests I'm using the service account. I don't know why people keep assuming that I'm running the package from a job. I've never stated that in any of
    the posts I'm running the package from a job. It's been made quite clear I'm running the package from the IS Catalog on SSMS:
    "This is simply selecting a package from the IS Catalog, right-clicking and selecting Execute package.", as per the Nov 18 post, and in the original post "....So what account is being used to run SSIS 2012 packages from the IS catalog from
    within SSMS".
    Just to be clear, the package is NOT being run from a job. It's using the Execute package option when selecting the package within SSMS from the IS Catalog and it's running under the account on which I am logged on to my client.
    Please read carefully. I was just answering your question "So what account is being used to run SSIS 2012 packages from the IS catalog from within SSMS ?" and stating that you where right and that it uses your account to run the package
    when you execute a package manually from the Catalog and that you can prove that by logging the system variable.
    A good suggestion about using a share in the task to map the drive and I will try this. I would find it strange that SSMS requires this mapping whereas SSDT does not though.
    Ok let us know your findings. If it doesn't work you can also test it with a password and username:
    net use f: \\financial\public  yourpassword /user:username
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com |
    Twitter

  • I just moved my itunes library from a win 7 computer to a win 8.1 computer. Getting an error message "iTunes has detected a problem with your audio configuration. Audio/Video playback may not operate properly. Can't play CDs or get audio file from web!

    Help! I just moved my itunes library from a Win 7 computer to a new Win 8.1 computer following the instructions on the itunes website. Everything is good except I'm getting an error message on the Win 8 computer if I try to play a CD or get an audio file off of the internet. I get an error message that says "iTunes has detected a problem with your audio configuration. Audio/Video playback may not operate properly. I don't know where to look for or fix the audio configuration on the win 8 computer. As far as I can tell the iTunes configuration looks the same as on the other computers in the house. At this point I don't dare plug my ipod touch into the Win 8 computer for fear it will get messed up.

    I have the same problem and I know that it is due to my PCI Audio driver not being compatible with WIndows 8.1.
    iTunes isn't the only program that can't direct sound to the built-in speakers anymore. The obvious solution would be to update the drivers, but unfortunately Dell does not provide an updated driver for my model, so I am stuck with that.
    However, saying that, only my laptop speakers are affected by this. I can use sound fine on applications where I can choose the output device and direct sound to the head phones, but for some reason iTunes does not let you choose the audio device manually.
    To listen to music I imported the iTunes Library in Windows Media Player and changed the audio output using the following instructions: http://windows.microsoft.com/en-us/windows7/c00d11ba
    However, I would also like to rent movie's from iTunes, 
    Would be great if iTunes would let you choose the output device, too, like most other applications using sound  from Skype to Windows Media Player,...

  • Using Photoshop CC I cannot save images to folder from Camera Raw as Tif. I get message 'write permission error'. I am using Widows 7 Professional.

    I have just changed to Photoshop CC from CS4 and cannot now save images from Camera Raw. I get message 'write permission error'. I assume there is some permissions setting which did not exist with CS4.
    I cannot progress unless I revert to CS4. What am I failing to do?

    See if the suggestions, here, help, although this was back with CS6-cloud, not CC, so may not apply 100%:
    http://forums.adobe.com/message/4758115
    I'd suggest that rather than deleting the file, you move it out of the folder to somewhere else, in case things get worse and you need to put it back.
    I found this by Googling the error message. 
    If you can't figure it out, you might post in the "Downloading, Installing and Set Up" or "Adobe Creative Cloud" forums  since it seems to be related to the Cloud updates, and not necessarily ACR plug-in functionality, and I've seen India support people actually tackle problems posted there, which rarely happens in the ACR forum, although an ACR engineer may sometimes pop in to answer questions, they'd be less likely to know how to fix deployment issues.

  • Error 36 when trying to recover iphoto library from time machine back up

    When I try to recover a backup of an iPhoto library from my Time Capsule using TimeMachine, I receive the following error code: "The Finder can’t complete the operation because some data in “iPhoto Library” can’t be read or written. (Error code -36)." I have read a post regarding Snow Leopard 10.6.6 being the issue. Has anyone else had experience of this and if so how did you reslove this.

    Hi, and welcome to the forums.
    Connect to the TC via Ethernet cable if at all possible.
    Try repairing your backups, per #A5 in [Time Machine - Troubleshooting|http://web.me.com/pondini/Time_Machine/Troubleshooting.html] (or use the link in *User Tips* at the top of this forum).

Maybe you are looking for