Spotlight broken for shared drives

I'm using a MacMini under Mavericks 10.9.2 as a file server with a big external drive connected via FW800. Several folders of that drive are shared network folders (AFP, not SMB, no windows machines around here). The MBPs are all on 10.9.2 either. The Wifi is generated by an Airport Extreme base station (newest model). However, trying to locate files on the network shares via spotlight doesn't work if typing in search strings longer than 3 characters.
Has anybody seen similar problems? Any clue how to fix this?
Many thanks!

While I haven't seen this issue personally, have you tried reindexing the network drives on the affected machines? I find it fixes a lot of problems with Spotlight search going sideways.
This article shows how: Spotlight: How to re-index folders or volumes
Hope that helps!
- Aysha

Similar Messages

  • Spotlight - Results from Shared Drives

    I'm looking for a solution, how to bring the Spotlight Search Result Page showing me also results from Shared Drives.
    (My Shared Drives are hosted by a OS X Lion Server and an AFP Share)
    Any ideas?
    Thanks
    Bojan

    I'd like to know how to do this too.
    I have several folders shared on Lion server and have got spotlight to index their drives successfully on the server. Once the shares are mounted on the client machines, I can search the server results through the search window in Finder, no problem. But results from those shares never appear in the spotlight window on the menu bar.
    Anyone know how to fix this or change spotlight so it defaults to include shared locations?
    Thanks

  • WRT610N Supported Formats for Shared Drives

    Hi, I just got the WRT610N. I have an external drive that has two partitions. One for PC (FAT32) and one for MAC (MAC OS Extended - Journal). In the Linksys Storage->Disk Section of the Administration GUI, the PC partition shows up. However, the MAC partition does not show up. Is this an error? What formats are supported? What formats are not supported? Is there any intention from Linksys/Cisco to support the MAC OS Extended format? Thank you.

    And also try formatting the HDD thru the Routers interface.
    C | EH
    linksyshelp.blogspot.com

  • How do I tell my Macbook to not look for Shared drives?

    Our internet connection has been slow at best and drops altogether frequently. I wondered if our old Base Station was to blame, so bought a $39 Belkin router yesterday. The speed improvement was instant and striking!
    But now in Finder I see a list of Shared devices in the pane on the left that I have no idea where they are coming from, other than perhaps they are other customers of the isp we use.
    I don't want my MacBook wasting time and energy looking for other people's computers over the internet connection, if that is what is happening. How can I tell it to stop that?

    Follow Camelot's advice.
    In addition, some routers control NAT services via whether or not you enable the DHCP server in the router.  You should have it enabled.  Some routers actually have a separate control for NAT server, if yours does it should be enabled.
    With respect to your Mac looking for other computers with shared services, it does not work that way.  Rather the other computers broadcast their availability, and your Mac sees that.  You Mac is not polling, it is just listening.
    And whether or not you are broadcasting availability of services on your Mac is controlled by System Preferences -> Sharing.  If all are disabled, then you are not broadcasting anything.
    Regardless, you need to figure out why you are seeing other services if you do not have any in your own home.  So follow Camelot's advice.

  • URL action to open PDF on a shared drive with credentials

    I am using "Go to URL" feature of SSRS 2008 to open a PDF file saved on a shared drive. It works fine for me as I have access to the drive.
    I don't want to give access to this drive to all the business users who will be using the report. There are several reports on the drive which they should not access. Is there a way to pass generic credentials with URL to allow opening the relevant document
    without giving permissions to every single user.
    Thanks
     AY

    Hi  AY,
    As far as I know, we cannot pass generic credentials with URL. In your case, we can set permissions for Shared Drive to work around the issue. It is assign permission to specific user on the network.
    These articles are about Give Permissions to a Shared Drive, Set Permissions for Shared Folders, you can refer to it.
    http://www.ehow.com/how_6187022_give-permissions-shared-drive.html
    http://technet.microsoft.com/en-us/library/cc726004.aspx
    Hope this helps.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • Help adding new Macs to the household, creating shared drive for iTunes,

    I have a few questions:
    My husband and I recently both got MacBook Pros. Our former set-up was a iMac which backs up to a 500 G Time Capsule. We have a large iTunes library and iPhoto library on the iMac. The iMac is going to turn in to the kids computer. I would like to do the following:
    1. transfer photos to my MBP (#1). Will the Time Machine backup for the iMac become significantly smaller, making room for the soon to be larger backup of the MBP #1? Little confused how that is going to work.
    2. have shared access to iTunes library? basically it would be nice for all 3 computers to have the complete iTunes library, but I would also like to backup all 3 computers using Time Machine and don't want to have triplicates of the library. I was trying to figure out if the way to go is to put the iTunes on a shared drive on the Time Capsule, but is there a way for the 3 computers to 'sync' to the shared drive when new music is added? Finally, if the iTunes is within a shared drive does that mean it won't be backed up?
    Much appreciation and thanks to anyone who can help make sense of this.

    Update: Downloaded free version of Syncopation, and am hopeful this is going to some what solve my iTunes issue.
    New question would be: when creating the Time Machine backups for MBP#1 and MBP #2 can I NOT back up the iTunes folders? That would save approx. 36G on each of these backups, right? 72G total of the Time Capsule space. And the assumption is that with Syncopation, as long as the iMac iTunes is backed up then, you have everything.

  • Can no longer connect to shared drive for Time Machine backups

    I have  a Firewire drive connected to my iMac and sharing enabled. 2 MacBook Airs then connect wirelessly to the same network and backup to the drive.
    It has worked perfectly for the last couple of years with Lion and Mountain Lion.
    Yesterday I upgraded to Mavericks and now neither laptop can see the shared drive in Time Machine, although the drive displays quite happily in Finder.
    I have disabled and re-enabled sharing.  Booted and re-plugged the drive in and still when I go to Time Machine preferences and select drive, nothing is listed.
    Any ideas?

    After hours and hours of constant searching and testing I still can't get it to work?
    Any ideas?
    I think sharing has changed in Mavericks.

  • Can spotlight search for files in external drives?

    I was wondering If I can index my hard drives so that when I do a search in spotlight, they show up along with the files in my primary drive.
    Is this possible?

    Yes, but due to connection reliability of external drives, and the constant background noise that is required to keep the index up to date on them, I turn it off for external drives. I use File Buddy or Easy Find to find files on external drives.

  • How do I setup music files on a shared drive for access on my apple tv

    I am trying to set up music files on my shared wifi drive on my home network for accessability through the computer icon of my apple tv.....can someone tell me how to set up the files on the shared drive....right now, the apple tv will not recognize the music i have there to play it.

    Welcome to the Apple Community.
    You can put your music anywhere, but it must be part of an iTunes library and iTunes needs to be running for the Apple TV to play it.

  • Neither Spotlight nor Finder searching SHARED drives

    I have two shared drives (both accessed via a Time Capsule) on my local network (LAN). I have total access to these two drives (reading,writing,etc.).
    How can I perform a search for a particular file on these drives?
    When I attempt to search via Finder, I enter the name of a file I know exists on one of these drives (just to test the process out) in the Search box in Finder. I click the Shared and File Name buttons, but nothing happens, no files found, nothing, zip, nada.
    I know this file exists on one of these drives.
    Why don't I see any results when I attempt to perform a search on Shared drives?
    (NOTE: This works if I search on "This Mac").
    Ideas?
    Thanks
    -Mike
    Message was edited by: Soniq2

    Apparently this is a bug in 10.5.6.
    Several posts throughout these forums indicate that many folks are experiencing the same issue.
    We can search within individual folders on a Sharepoint, but cannot perform a search of the entire sharepoint.
    Strange.
    Apple, are you aware of this?
    Thanks
    -Mike

  • Screen Sharing Broken for Network Account Admins Mac OS X Server

    Re: OS X 10.8.4, Server.app 2.2.1
    After replacing a failed Airport Extreme -- and the resulting changes in server IP address -- Screen sharing is now broken for "Network" account administrators. "Local" adminstrators can screen share successfully.
    When logging in as a Local Admin, the System Log contains a single entry:
    Authentication: SUCCEEDED :: User Name: localadmin :: Viewer Address: 10.0.1.6 :: Type: DH
    When logging as a Network Admin, a similar line appears:
    Authentication: SUCCEEDED :: User Name: testnetwork :: Viewer Address: 10.0.1.6 :: Type: DH
    followed by screen-fulls of other log messages, eventually ending -- a minute or two later -- with:
    screensharingd[77693]: uid 1034 not found
    screensharingd[77693]: unable to get width and height of display.
    at which point the client sees a "Error: Network connection lost." alert. 1034 is the UID of "testnetwork", as seen in
    dscl /LDAPv3/127.0.0.1 -list /Users UniqueID
    So apparently, Network users are authenticated, but screensharingd cannot find the user.
    changeip -checkhostname returns "success". Just to be sure, I  "Updated the Host Name" as suggested by the "Network Configuration Has Changed" alert in Server.app -- problem remains.
    How does one debug this? Are there more comprehensive debug logging options available for screensharingd or login window? Anyone else seen this problem?

    Linc: thanks for your inquiry.
    Here are more steps I've taken to solve this problem:
    1) From a Time Machine backup to a test partition, I restored the server from before the failure of the base station and found that the login problems were present then.
    2) On yet another test partition, I created from scratch a new OS X Server. Added a local administrator, and a network admistrator and discovered the same problem: network administrators cannot screen share, although in this case, they are simply unauthorized.
    Using dscl, things look OK: there is a /Local/Default/Groups/com.apple.access_screensharing that lists only the admin group, and the admin group contains networkAdmin.
    Furthermore, I can log in as the networkadmin from the login window, as "Other".
    Furthermore, I can ssh into the server using the networkadmin credential.
    I used odutil to boost the logging OpenDirectory log level. The logs are very verbose, but to my eyes, it looks like OD recognizes the networkUser, but screensharingd fails to authorize. See logs below.
    Can someone confirm that screen sharing from network admin accounts works at all? Is there a way to elevate screensharingd logging to find out more about why it rejects network admins?
    TIA
    /var/log/opendirectoryd.log
    4643.65273.65277, Module: search - ODQueryCreateWithNode request, NodeID: 3D4241C6-FAFF-4816-8F7C-B3E0ED6F56A6, RecordType(s): dsRecTypeStandard:Users, Attribute: dsAttrTypeStandard:RecordName, MatchType: EqualTo, Equality: CaseIgnore, Value(s): networkadmin, Requested Attributes: dsAttributesStandardAll, Max Results: 1
    4643.65273.65277, Node: /LDAPv3/127.0.0.1, Module: search - queuing request to connection - '/LDAPv3/127.0.0.1:ldap:406935A6-9ADB-413A-A82B-7F30F4E9E5A1'
    4643.65273.65277, Node: /LDAPv3/127.0.0.1, Module: ldap - adding 'dsAttrTypeStandard:RecordName' for ambiguous name query
    4643.65273.65277, Node: /LDAPv3/127.0.0.1, Module: ldap - adding 'dsAttrTypeStandard:RealName' for ambiguous name query
    4643.65273.65277, Node: /LDAPv3/127.0.0.1, Module: ldap - query with filter - '(&(&(objectClass=inetOrgPerson)(objectClass=posixAccount)(objectClass=shadowAc count)(objectClass=apple-user)(objectClass=extensibleObject))(|(uid=networkadmin )(cn=networkadmin)))', baseDN - 'cn=users, dc=testserver,dc=local'
    4643.65273.65277, Node: /LDAPv3/127.0.0.1, Module: ldap - found result - 'uid=networkadmin,cn=users,dc=testserver,dc=local'
    4643.65273.65277, Node: /LDAPv3/127.0.0.1, Module: ldap - ODQueryCreateWithNode completed, delivered 1 result
    4643.65273, Node: /Search, Module: search - ODQueryCreateWithNode completed, delivered 1 result
    4643.65278 - Client: screensharingd, UID: 0, EUID: 0, GID: 0, EGID: 0
    4643.65278 - ODNodeRelease request, NodeID: 184CFA31-1EB8-4384-B9CA-D04A93736CB1
    4643.65278, Node: /Search - ODNodeRelease completed
    clearing all node authentication connections
    /var/log/system.log:
    screensharingd[4665]: Authentication: FAILED :: User Name: networkadmin :: Viewer Address: 10.0.1.6 :: Type: DH

  • Broken part - cover for hard drive

    I am trying to buy a broken part, it is a cover for hard drive for Thinkpad T400 type7417. Please give me an idea where?
    Picture of it: https://plus.google.com/u/0/photos/109298789000338710152/albums/posts
    Solved!
    Go to Solution.

    Hi janman,
    You can buy it from eBay or IBM maintenance parts. The FRU no. is 43Y9654.
    Hope this helps.
    Maliha (I don't work for lenovo)
    ThinkPads:- T400[Win 7], T60[Win 7], IBM 240[Win XP]
    IdeaPad: U350
    Apple:- Macbook Air [Snow Leopard]
    Did someone help you today? Compliment them with a Kudos!
    Was your question answered today? Mark it as an Accepted Solution! 
      Lenovo Deutsche Community     Lenovo Comunidad en Español 
    Visit my YouTube Channel

  • Problems with Spotlight searching of shared volumes

    According to: http://www.apple.com/macosx/features/300.html#spotlight, I should be able to "...search any connected Mac with Personal File Sharing enabled or a file server that’s sharing its files."
    It doesn't specify what "file server", so I presume it means Spotlight should be able to search any mounted shared volume (assuming, of course, that indexing has been enabled).
    I have a NAS device that I want to be able to search with Spotlight. According to mdutil, the volume is enabled for indexing, but I don't see any results when I search under "Shared" in Finder via Cmd+F. (I checked, and there's no .Spotlight folders on the volume.)
    From what I recall, under Tiger you could manually specify a network volume to index, but if you dismounted the volume, you'd have to re-enable indexing on next mount. This worked for other file systems (such as Fat32 & NTFS), as well as for HFS+ drives.
    According to mdutil in Leopard, the volume is still enabled for indexing even across dismounts. The NAS drive is not HFS+ formatted, but uses XFS.
    I've tried deleting the index, to no avail.
    Has anyone successfully used Spotlight to search mounted volumes on volumes not shared via another Mac?
    Am I missing something?

    You have not missed anything.... Leopard promises but does NOT deliver.
    I use an AFP server with Bonjour enabled. And NO NO NO Spotlight search is possible on this network volume...
    This is outrageous and FALSE information....
    Oh and - that Leopard is Sporting 300 new features is false info too.... Not even the "What is New in Leopard" says anything about 300 features.. But it sounds great doesn't it....

  • Enabling Spotlight search for server clients?

    I have a mac mini server running OSX Mavericks, and 6 client mac also running Mavericks.
    The server provides access to the main storage raid for our design dept, and all the designers need to be able to search for files on this server, but Spotlight never seems to work when trying to search the server.
    No of us are It types, so the few possible solutions i have found seem to be aimed at advanced unix programmers, and as a result assume that a single line of code is enough of a hint for us to sort out the problem!
    Pleae can someone explain how i can set up the server to index the raid, and allow the users to perform searches?
    thanks
    adam

    It used to be that you could manually enable and disable spotlight indexing for network shares on a  Mac server. With Server.app and therefore your Macvericks server this is automatically enabled. The process would be along the following lines.
    You have a drive which has permissions enabled, external drives may default to having this turned off you can if needed enable it by doing a 'Get Info' on the external drive, and at the bottom will be an option 'Ignore ownership on this volume' this needs to be turned off i.e. unticked.
    You then tell Server.app to 'share' the volume or a folder within the volume.
    Server.app will automatically enable both AFP and SMB sharing for this new share, you can modify this if you wish.
    Server.app will also automatically add an ACL (Access Control List) record containing the special server account 'Spotlight' so it can access every single file and folder within the share, this lets the server spotlight indexing software be able to access and therefore index all those files.
    Client Macs can then search the share, it should only return results of files that that user has permission to access.
    There is nothing really to configure. I have seen problems where the server will periodically decide to re-index the share again and while it is doing this searching does not work because the server is busy rebuilding the index. You can tell if this is happening by clicking on the Spotlight menu on the server, if it says it is re-indexing then this is what is happening.

  • Help Creating a Graph (of sorts) for Professional Driver Daily Logs

    Hey All!
    I'm working on a project for myself, that could go commercial if it gets as good as I'm hoping it will. This application (which I'm calling Truck Manager) will manage income and expenses, help plan trips, track trip/load information and do the US-MCSA/DOT regulated Driver's Daily Log. This log is a line graph that runs from midnight to midnight and has four lines: (1) Off Duty; (2) Sleeper Berth; (3) On Duty, Driving; and (4) On Duty, Not Driving. If anyone needs to see a paper form of this log book, just ask and I'll scan in one of my copies and post.
    Anyway, I'm using J2D to handle the log book "pages" and have already gotten the grid laid out just fine...it runs from midnight to midnight and is broken into 15-minute increments, with the four required lines described above. Now that I have that done, I've hit a logic block that is keeping me from figuring out the best and/or simplest way to log the status changes and time lines. For example, let's say that I work the following day:
    Midnight until 06:00 == off duty
    06:00 until 06:15 == on duty, not driving: performing pre-trip inspection
    06:15 until 08:00 == on duty, driving to customer to be loaded
    08:00 until 08:15 == on duty, not driving: being loaded (only required to log 15 minutes for this)
    08:15 until 09:00 == off duty (still being loaded)
    09:00 until 12:00 == on duty, driving (heading toward delivery)
    12:00 until 12:45 == off duty (lunch)
    12:45 until 15:00 == on duty, driving (heading toward delivery)
    15:00 until 15:15 == on duty, not driving (being unloaded)
    15:15 until 16:00 == off duty, (still being unloaded)
    16:00 until 20:00 == on duty, driving (heading home)
    20:00 until midnight == sleeper (ran out of hours)
    This graph would look like the following (provided each dash represents one 15-minute block:
    <pre>
    1. -----------------------| |---| |---| |---|
    2. | | | | | | | |----------------
    3. | -------| | |------------| |---------| | |----------------|
    4. |-| |-| |-|
    </pre>
    Though the above graph is crappy, it should give the idea of what needs to be done. At each change of status (i.e., from off duty to on duty, not driving) there must be a vertical line between the statuses, not going above and below like in the example above. Then, once the status changes again, the horizontal line needs to be drawn from the vertical line of the last status change to the time of the new status change and then the vertical line to the new status.
    The way the driver's daily log works is like this...When I come on duty, I am required to do a pre-trip inspection of my truck/trailer, which requires 15 minutes on duty, not driving, so I log that all at once, including the vertical line up to the 3rd line of the graph, which is on duty, driving. Then, in this example, I drive for 1.75 hours, until I arrive at my pick-up. Once I get there, I draw the horizontal line on line 3 of the graph, the vertical line down to line 4 (on duty, not driving), the 15-minute horizontal line and the vertical line up to line 1 (off duty). When I get ready to leave the pick-up after I am loaded, I draw the horizontal line across line 1, the vertical line down to line 3 and then drive until I stop.
    Other things that are desired for this graph logic is to take into account the US-MCSA/DOT regulations for drivers that state the following:
    a. A driver may not be on duty for more than 14 hours, without a 10-hour break
    - Nothing stops this "14-hour clock" except a 10-hour break, so if a driver comes on duty at 06:00 and spends 15 minutes doing the pre-trip inspection and then goes off duty for the next 8 hours, the 14-hour clock is still running and the driver will only have 5 hours and 45 minutes to work (roughly).
    b. A driver may not drive for more than 11 hours, without a 10-hour break, provided the 14-hour rule is obeyed.
    - In other words, even if a driver only drives for a total of 7 hours, but the 14-hour clock expires, the driver may not complete his/her 11 hours of driving allowed.
    c. A driver must take a break of 10 consecutive hours in each 24-hour period.
    *** This is confusing because the 10-hour break can span midnight and still be considered consecutive, even though part of the break is on one graph and the other part is on another graph.
    In taking these rules into account, I would like the graphing part of the program's logic to change the horizontal line color from blue (the regular line color) to red if the driver is in violation of the rules above. Where this gets really complicated is where the same status crosses midnight from day-to-day.
    As I said, I have successfully gotten the grid painted using java.awt.Graphics2D methods, but am having trouble coming up with the logic for drawing the driver status throughout the day. All data will be stored in a MySQL database table and can be pulled at any time that it is needed. The user will be entering the current status change time, as well as location (city and state) and a comment (which is not required, except for when doing a pre-trip inspection, fueling, loading or unloading), then clicking a button labeled "Update Log".
    Any help with the logic for this part of the application is greatly appreciated. If you can provide sample code to help demonstrate the logic you are describing, I will be grateful.
    Thank you all for your assistance. If you would like a better idea of what the daily log graph looks like, you can run the class below.
    Cheers,
    Sean
    <pre>
    * DriverLog.java: Driver's Daily Log entry screen. By completing the small form at the bottom of
    * dialog, the system will automatically update your log.
    * Created on Sep 30, 2010, 2:03:18 PM
    package net.pekinsoft.trkmgr.gui;
    import java.awt.BasicStroke;
    import java.awt.Color;
    import java.awt.Graphics2D;
    import java.awt.Point;
    import java.awt.Toolkit;
    * @author Sean Carrick
    public class DriverLog extends javax.swing.JFrame {
    // Private class-level variables.
    * @code{java.awt.Graphics2D} object that we will use for drawing on our
    * view port, which is a @code{javax.swing.JPanel} on our form. This view
    * port will hold our driver's log graph that shows the driver's status at
    * different times of the day based upon the data the driver provides.
    private Graphics2D canvas;
    * @code{java.awt.geom.Point} object to hold the starting x, y coordinates
    * for the driver's daily log off duty line.
    private Point offDutyStartPoint;
    * @code{java.awt.geom.Point} object to hold the ending x, y coordinates
    * for the driver's daily log off duty line.
    private Point offDutyEndingPoint;
    * @code{java.awt.geom.Point} object to hold the starting x, y coordinates
    * for the driver's daily log sleeper berth line.
    private Point sleeperStartPoint;
    * @code{java.awt.geom.Point} object to hold the ending x, y coordinates
    * for the driver's daily log sleeper berth line.
    private Point sleeperEndingPoint;
    * @code{java.awt.geom.Point} object to hold the starting x, y coordinates
    * for the driver's daily log driving line.
    private Point drivingStartPoint;
    * @code{java.awt.geom.Point} object to hold the ending x, y coordinates
    * for the driver's daily log driving line.
    private Point drivingEndingPoint;
    * @code{java.awt.geom.Point} object to hold the start x, y coordinates
    * for the driver's daily log not driving line.
    private Point notDrivingStartPoint;
    * @code{java.awt.geom.Point} object to hold the ending x, y coordinates
    * for the driver's daily log not driving line.
    private Point notDrivingEndingPoint;
    * @code{int} that holds the number of 15-minute blocks in a 24-hour period.
    private static final int qtrHourBlocks = (24 * 60) / 15;
    /** Creates new form DriverLog */
    public DriverLog() {
    // Initialize the window's components. {handled by NetBeans}
    initComponents();
    // Center the window on the screen.
    Toolkit tk = Toolkit.getDefaultToolkit();
    int winX = (tk.getScreenSize().width - getWidth()) / 2;
    int winY = (tk.getScreenSize().height - getHeight()) / 2;
    setLocation(winX, winY);
    // Initialize our drawing canvas.
    canvas = (Graphics2D) viewPort.getGraphics();
    // Next, we need to initialize our line starting and ending point objects.
    int qtr = (viewPort.getHeight() / 8);
    int y = qtr + 20;
    int startX = 20;
    int endX = viewPort.getWidth() - 20;
    offDutyStartPoint = new Point(startX, y);
    offDutyEndingPoint = new Point(endX, y);
    y = (qtr * 2) + 20; // Double the value of y
    sleeperStartPoint = new Point(startX, y);
    sleeperEndingPoint = new Point(endX, y);
    y = (qtr * 3) + 20; // Triple the value of y.
    drivingStartPoint = new Point(startX, y);
    drivingEndingPoint = new Point(endX, y);
    y = (qtr * 4) + 20; // Quadruple the value of y.
    notDrivingStartPoint = new Point(startX, y);
    notDrivingEndingPoint = new Point(endX, y);
    // Now that our objects have been initialized, we need to draw our grid.
    paint();
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
    bgrpStatus = new javax.swing.ButtonGroup();
    viewPort = new javax.swing.JPanel();
    lblStatusChange = new javax.swing.JLabel();
    txtStatusChange = new javax.swing.JFormattedTextField();
    rbtnOffDuty = new javax.swing.JRadioButton();
    rbtnSleeper = new javax.swing.JRadioButton();
    rbtnDriving = new javax.swing.JRadioButton();
    rbtnNotDriving = new javax.swing.JRadioButton();
    btnUpdate = new javax.swing.JButton();
    lblComment = new javax.swing.JLabel();
    txtComment = new javax.swing.JTextField();
    lblLocation = new javax.swing.JLabel();
    txtLocation = new javax.swing.JTextField();
    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("Driver's Daily Log");
    setAlwaysOnTop(true);
    setResizable(false);
    addWindowListener(new java.awt.event.WindowAdapter() {
    public void windowOpened(java.awt.event.WindowEvent evt) {
    formWindowOpened(evt);
    addWindowStateListener(new java.awt.event.WindowStateListener() {
    public void windowStateChanged(java.awt.event.WindowEvent evt) {
    formWindowStateChanged(evt);
    javax.swing.GroupLayout viewPortLayout = new javax.swing.GroupLayout(viewPort);
    viewPort.setLayout(viewPortLayout);
    viewPortLayout.setHorizontalGroup(
    viewPortLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGap(0, 674, Short.MAX_VALUE)
    viewPortLayout.setVerticalGroup(
    viewPortLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGap(0, 351, Short.MAX_VALUE)
    lblStatusChange.setText("Status Change Time:");
    txtStatusChange.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(
    new javax.swing.text.DateFormatter(new java.text.SimpleDateFormat("HH:mm"))));
    bgrpStatus.add(rbtnOffDuty);
    rbtnOffDuty.setSelected(true);
    rbtnOffDuty.setText("Off Duty");
    bgrpStatus.add(rbtnSleeper);
    rbtnSleeper.setText("Sleeper");
    bgrpStatus.add(rbtnDriving);
    rbtnDriving.setText("Driving");
    bgrpStatus.add(rbtnNotDriving);
    rbtnNotDriving.setText("On Duty; Not Driving");
    btnUpdate.setMnemonic('U');
    btnUpdate.setText("Update Driver Log");
    btnUpdate.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    btnUpdateActionPerformed(evt);
    lblComment.setText("Reason/Comment:");
    lblLocation.setText("Location: City, ST:");
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addComponent(viewPort, javax.swing.GroupLayout.DEFAULT_SIZE,
    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addGroup(layout.createSequentialGroup()
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addComponent(lblLocation)
    .addComponent(lblStatusChange))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addGroup(layout.createSequentialGroup()
    .addComponent(txtStatusChange, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
    javax.swing.GroupLayout.PREFERRED_SIZE)
    .addGap(18, 18, 18)
    .addComponent(rbtnOffDuty)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
    .addComponent(rbtnSleeper)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
    .addComponent(rbtnDriving)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
    .addComponent(rbtnNotDriving)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
    65, Short.MAX_VALUE)
    .addComponent(btnUpdate))
    .addGroup(layout.createSequentialGroup()
    .addComponent(txtLocation, javax.swing.GroupLayout.DEFAULT_SIZE,
    232, Short.MAX_VALUE)
    .addGap(18, 18, 18)
    .addComponent(lblComment)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(txtComment, javax.swing.GroupLayout.PREFERRED_SIZE,
    227, javax.swing.GroupLayout.PREFERRED_SIZE)))))
    .addContainerGap())
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(viewPort, javax.swing.GroupLayout.DEFAULT_SIZE,
    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addGap(18, 18, 18)
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(lblStatusChange)
    .addComponent(txtStatusChange, javax.swing.GroupLayout.PREFERRED_SIZE,
    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(rbtnOffDuty)
    .addComponent(rbtnSleeper)
    .addComponent(rbtnDriving)
    .addComponent(rbtnNotDriving)
    .addComponent(btnUpdate))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(txtComment, javax.swing.GroupLayout.PREFERRED_SIZE,
    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(lblComment)
    .addComponent(lblLocation)
    .addComponent(txtLocation, javax.swing.GroupLayout.PREFERRED_SIZE,
    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addContainerGap())
    pack();
    }// </editor-fold>
    private void btnUpdateActionPerformed(java.awt.event.ActionEvent evt) {                                         
    // KEEP AS LAST LINE IN THIS FUNCTION!!! //
    paint();
    private void formWindowStateChanged(java.awt.event.WindowEvent evt) {                                       
    // Draw the driver's daily log grid.
    paint();
    private void formWindowOpened(java.awt.event.WindowEvent evt) {                                 
    // Draw the driver's daily log grid.
    paint();
    private void paint() {
    drawOutline();
    * @code{net.pekinsoft.gui.DriverLog.drawOutline()} function handles the
    * rendering of the driver's daily log grid outline only.
    private void drawOutline() {
    // Set up the starting point for our log grid's upper-left corner.
    int x = 0; // 20 points down from the top.
    int y = 0; // 20 points in from the left.
    int offset = 28;
    // Get the height and width of our log grid from the panel.
    int h = 112;
    int w = 671;
    // Set the color of our border to Red.
    canvas.setStroke(new BasicStroke(1));
    canvas.setPaint(Color.BLACK);
    // Draw our log graph outline.
    canvas.drawRect(x, y, w, h);
    // Draw our log's horizontal lines.
    for ( int i = 1; i < 5; i++ ) {
    canvas.drawLine(x, y + (i * offset), w + offset, y + (i * offset));
    // Draw our log's hour lines.
    for ( int i = 1; i < 24; i++ ) {
    canvas.drawLine(x + (i * offset), 0, x + (i * offset), 112);
    // Draw our log's 30-minute ticks.
    for ( int i = 1; i < 48; i++ ) {
    for ( int j = 0; j < 5; j++ ) {
    canvas.drawLine(x + (i * (offset / 2)), y + (j * offset),
    x + (i * (offset / 2)), (y + (j * offset) + 10));
    // Draw our log's 15-minute ticks.
    for ( int i = 1; i < 96; i++ ) {
    for ( int j = 0; j < 5; j++ ) {
    canvas.drawLine(x + (i * (offset / 4)), y + (j * offset),
    x + (i * (offset / 4)), (y + (j * offset) + 5));
    canvas.drawLine(0, 112, 0, 122);
    canvas.drawLine(w, 112, w, 122);
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new DriverLog().setVisible(true);
    // Variables declaration - do not modify
    private javax.swing.ButtonGroup bgrpStatus;
    private javax.swing.JButton btnUpdate;
    private javax.swing.JLabel lblComment;
    private javax.swing.JLabel lblLocation;
    private javax.swing.JLabel lblStatusChange;
    private javax.swing.JRadioButton rbtnDriving;
    private javax.swing.JRadioButton rbtnNotDriving;
    private javax.swing.JRadioButton rbtnOffDuty;
    private javax.swing.JRadioButton rbtnSleeper;
    private javax.swing.JTextField txtComment;
    private javax.swing.JTextField txtLocation;
    private javax.swing.JFormattedTextField txtStatusChange;
    private javax.swing.JPanel viewPort;
    // End of variables declaration
    </pre>
    Edited by: 799477 on Oct 1, 2010 2:42 PM

    <blockquote>Sean, I checked your code and seen that package net.pekinsoft..., is this an Illinois Company by any chance?</blockquote>
    Yes, this is a company that I have tried (unsuccessfully) to start in central Illinois...I'm guessing that the "Pekin" part gave it away.
    <blockquote>Thanks for posting the DB TABLE -- we'll need that later, plus I wanted to see if you would respond.</blockquote>
    Not a problem on the DB table. Why wouldn't I respond...I want and NEED help here... ;-)
    <blockquote>I have a few questions but don't want to complicate your line of thinking, so I'll just describe generally how I have approached a big project like this. </blockquote>
    I will answer them the best that I can.
    <blockquote>For one thing, I do not start with a GUI or even consider what I want it to look like... I start with the data, and how that data is broken down into different classes, and then how those classes come together to form an Object Hierarchy. I have and do maintain a large MySQL database myself with 18 TABLES. Some of the TABLES hold very little information which I use as static final information. As a matter of fact, one of those TABLES is called status and contains 5 fields. This status TABLE is storing 7 rows of information because I have 7 different levels. The fields in my status TABLE are status_id, status_type, status_title, status_desc, and status_icon. This means I will have 7 icons to represent the different status levels, a description, a title, a type (maybe yours could be ON or OFF duty for example), and the ID of the status.
    Another thing at this stage of development is that I don't make up my mind concretely about any of the data or how the data will fit together. I want to remain as flexible as possible, so that as my design develops, the design allows for the addition or subtraction of data and different data types to be created. In other words, I completely atomize all structure, associations, relationships, dependencies, or just anything in general that makes two or more pieces of information stick together.
    At this point, all I have is a loose bag of primitive data types with no structure whatsoever. Like I just tore up a piece of paper into a hundred pieces and threw into the air letting the pieces fall where they may.
    While I'm at this point, I will make decisions about which languages and platform would be the best to raise the beast. In my case, I chose to run it on the internet, so I chose MySQL to store the data, SQL to communicate to the DB, and the server uses a PHP scripting engine to spit out the HTML, also PHP lets me create OO classes very similar to a JAVA class. This is a very important step and must be made now, not later -- you don't want to do all this work only to find out that it should have been done in another language! Been there done that.
    Once I've decided all of the above, then I come back and decide how the data should be organized. NOW I make all the database TABLES. Then I write a class definition for each of the db tables. Each class will provide methods for saving, editing, and retrieving info to and from the db using SQL.
    Once I get to this point I will make FORMS for the easy entry of data. The FORMS, CLASSES and and db TABLES all mirror each other now, so the CLASSES handle all the info from FORM to DB, DB to FORM. Notice at this point I am still dealing with data and data flow, NOT the display of pretty information -- not even close.
    Ok, enough about this Sean, let me know if this helps any.</blockquote>
    This information was helpful, but also how I typically approach a large project.
    The only problem with what you talk about above is dealing with allowing "wiggle-room" for changing the data because the data that I'm storing is codified by the federal government through the CSA-2010 laws that regulate the trucking industry. Therefore, I really don't have any wiggle-room with the data at all.
    As for choosing Java over another language, I made this choice because I don't like limiting myself (or others) on what operating system they use and platform-independence is one of the best things about Java (provided you don't use any OS-specific code, which I try like hell not to do). I am a huge Linux guy, but have to use Windows to update my GPS and would like to be able to use this application no matter which OS I'm booted into. Just so you understand, I am fluent in multiple languages, including PHP, Java, Python, Ruby, C/C++, BASIC and Bash. I am also very big on OOP and always leave accessing the database to the class that holds that data (i.e., LogEntry class will access the database to store and retrieve the log data). I am also using MySQL as the database back-end, because it is the SQL server that I am most comfortable with and also has versions for various OSes. I use the mysql-connector.jar library for accessing MySQL from Java, so that's not even an issue.
    As for "static final" data in the database, I do store my statuses, with the status_id numbers the same as the row number on the hard-copy Driver's Daily Log books. These records simply hold the status_id and description (i.e., 1, "Off Duty").
    I believe that I've got the logic for logging an entry such as: 08:00-10:00, On Duty, Driving, status location Indianapolis, IN, comment: Tire check. This whole entry is on the same day and therefore fairly easy to graph. The type of entry that I'm having problems figuring the logic for is one where the last change of duty status was before midnight and the current change of duty status is after midnight, on the next day. For example, I typically stop for the night (my DOT 10-hour break) at 5:00 PM (17:00) and am in the sleeper across midnight, then get going at 3:00 AM (03:00). I'm having trouble figuring out how many hours to log on the current day. In the example that I just gave, I'm not getting how I can figure out when to start at midnight and when to start out at the prior status change time through code. Nothing that I try seems to work correctly and I keep getting horizontal status lines outside of my graph area.
    As for what data I need to store and how I need to store it, I am very flexible, except with the daily log data, since it is federally mandated. Once I figure out the logic for actually logging the statuses and changes of status properly, I will create the class for storing and retrieving the database data...for now I'm just using hard-coded times to get the graphing logic right without the overhead of database access. Changing this code to use the data from the database will be a snap in comparison to figuring out the graphing functionality.
    Thanks for your insights and assistance. I look forward to seeing what other ideas you have to share.
    Sean

Maybe you are looking for

  • Code Sample: Easy RFC Lookup From XSLT Mappings Using a Java Helper Class

    Hi everyone, This is just a shameless plug for my article: <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14">Easy RFC Lookup From XSLT M

  • Netflix no longer available message keeps popping up

    Cannot seem to get Netflix to work on the apple tv anymore..keeps saying Netflix unavailable but Netflix works on my MacBook and iPad ..

  • System Registration Error in UWL

    Hello All i am getting following error while trying to register my sap crm system in UWL.: System SAP_CRM: Tue Jul 29 14:56:18 GMT+05:30 2008 (Configuration) :org.xml.sax.SAXException:com.sap.engine.lib.xml.parser.Parser Exception: End of model expec

  • Temp tables not dropped SQL Server 2012

    I have a server that houses a database application that makes heavy use of temp tables. It appears that temp tables are not getting dropped from the tempdb.  In perfmon the temp table count is hanging around 1000 and is not going down over time. Even

  • What happened to the infected files found by ClamXav?

    I ran a scan with ClamXav and found 15 infected files - Trojan and Phishing. I was told to rerun the scan with Quarantine turned on if I wanted to remove the files, which I di. The second scan found no infected files. I ran a third scan and still no