Need help determining why my nothing is showing up after setting up site to site vpn

Ok, so I'm am trying to figure out why I can't get nothing to show up when I do sh crypto isakmp sa or sh crypto ipsec sa. I did the basic setup for a site to site vpn and I can ping across both networks just fine no problem. So when I ping from a pc in the 172.16.0.0 network to 192.168.0.0 network there is no problem at all because the pings are recieved just fine. But when I go to sh crypto isakmp sa, there is just nothing there and I can't for the life of me figure out why. I looked at my sh run for both routers and everything looks fine, but I guess I may be overlooking something. If someone could help me diagnose this problem I would truely appreciate.   I have attached my packet tracer file and both routers are using the password binary. I put the password on there for the sake of it and to have a more real feel.

Here are the show runs for both routers
Router Main A
hostname RmainA
ip dhcp pool ITS
network 172.16.150.0 255.255.255.0
default-router 172.16.150.1
option 150 ip 172.16.150.1
username ciscosdm privilege 15 password 0 ciscosdm
crypto isakmp policy 2
encr aes 128
authentication pre-share
group 2
crypto isakmp key binary address 192.0.2.27
crypto ipsec transform-set yasser esp-aes 128 esp-sha-hmac
crypto map vader 100 ipsec-isakmp
set peer 192.0.2.27
set pfs group2
set transform-set yasser
match address S2S-VPN-TRAFFIC
no ip domain-lookup
spanning-tree mode pvst
interface Loopback0
ip address 172.16.95.100 255.255.255.255
interface FastEthernet0/0
ip address 192.0.2.25 255.255.255.248
duplex auto
speed auto
crypto map vader
interface FastEthernet0/0.1
no ip address
interface FastEthernet0/1
description TRUNK TO MAIN SWITCH A
no ip address
duplex auto
speed auto
interface FastEthernet0/1.10
encapsulation dot1Q 10
ip address 172.16.10.1 255.255.255.240
interface FastEthernet0/1.20
encapsulation dot1Q 20
ip address 172.16.20.1 255.255.255.0
interface FastEthernet0/1.30
encapsulation dot1Q 30
ip address 172.16.30.1 255.255.255.0
interface FastEthernet0/1.40
encapsulation dot1Q 40
ip address 172.16.40.1 255.255.255.0
interface FastEthernet0/1.70
encapsulation dot1Q 70
ip address 172.16.70.1 255.255.255.0
interface FastEthernet0/1.95
encapsulation dot1Q 95
ip address 172.16.95.1 255.255.255.240
interface FastEthernet0/1.100
encapsulation dot1Q 100
ip address 172.16.100.1 255.255.255.0
shutdown
interface FastEthernet0/1.150
encapsulation dot1Q 150
ip address 172.16.150.1 255.255.255.0
interface Serial0/0/0
description TO BRANCH
ip address 10.0.0.1 255.255.255.252
clock rate 64000
shutdown
interface Serial0/0/1
no ip address
clock rate 125000
shutdown
interface Serial0/1/0
no ip address
clock rate 2000000
shutdown
interface Serial0/1/1
no ip address
clock rate 2000000
shutdown
interface FastEthernet1/0
switchport mode access
shutdown
interface FastEthernet1/1
switchport mode access
shutdown
interface FastEthernet1/2
switchport mode access
shutdown
interface FastEthernet1/3
switchport mode access
shutdown
interface FastEthernet1/4
switchport mode access
shutdown
interface FastEthernet1/5
switchport mode access
shutdown
interface FastEthernet1/6
switchport mode access
shutdown
interface FastEthernet1/7
switchport mode access
shutdown
interface FastEthernet1/8
switchport mode access
shutdown
interface FastEthernet1/9
switchport mode access
shutdown
interface FastEthernet1/10
switchport mode access
shutdown
interface FastEthernet1/11
switchport mode access
shutdown
interface FastEthernet1/12
switchport mode access
shutdown
interface FastEthernet1/13
switchport mode access
shutdown
interface FastEthernet1/14
switchport mode access
shutdown
interface FastEthernet1/15
switchport mode access
shutdown
interface Vlan1
no ip address
shutdown
router ospf 1
log-adjacency-changes
network 10.0.0.0 0.0.0.3 area 0
network 192.0.2.24 0.0.0.7 area 0
network 172.16.0.0 0.0.0.255 area 1
network 172.16.1.0 0.0.0.255 area 1
network 172.16.10.0 0.0.0.255 area 1
network 172.16.20.0 0.0.0.255 area 1
network 172.16.30.0 0.0.0.255 area 1
network 172.16.70.0 0.0.0.255 area 1
network 172.16.95.1 0.0.0.0 area 1
network 172.16.95.0 0.0.0.15 area 1
network 172.16.100.0 0.0.0.3 area 1
network 172.16.150.0 0.0.0.255 area 1
network 0.0.0.0 255.255.255.255 area 1
default-information originate
ip classless
ip default-network 10.0.0.0
ip access-list extended S2S-VPN-TRAFFIC
permit ip 172.16.0.0 0.0.0.255 192.168.0.0 0.0.0.255
dial-peer voice 150 voip
destination-pattern 20..
session target ipv4:192.168.150.1
telephony-service
max-ephones 30
max-dn 30
ip source-address 172.16.150.1 port 2000
auto assign 1 to 30
ephone 1
device-security-mode none
mac-address 0014.6AAC.2355
type 7960
ephone 2
device-security-mode none
ephone 3
device-security-mode none
ephone 4
device-security-mode none
ephone 5
device-security-mode none
ephone 6
device-security-mode none
ephone 7
device-security-mode none
ephone 8
device-security-mode none
ephone 9
device-security-mode none
ephone 10
device-security-mode none
ephone 11
device-security-mode none
ephone 12
device-security-mode none
ephone 13
device-security-mode none
ephone 14
device-security-mode none
ephone 15
device-security-mode none
ephone 16
device-security-mode none
ephone 17
device-security-mode none
ephone 18
device-security-mode none
ephone 19
device-security-mode none
ephone 20
device-security-mode none
ephone 21
device-security-mode none
ephone 22
device-security-mode none
ephone 23
device-security-mode none
ephone 24
device-security-mode none
ephone 25
device-security-mode none
ephone 26
device-security-mode none
ephone 27
device-security-mode none
ephone 28
device-security-mode none
ephone 29
device-security-mode none
ephone 30
device-security-mode none
line con 0
exec-timeout 90 0
password binary
logging synchronous
login
line vty 0 4
password binary
login local
end

Similar Messages

  • Need help determining why my podcast has disappeared from the iTunes store.

    For a while, the last ten episodes or so were missing, but now the entire show is gone. The feed url is: www.warrenandbradley.com/feed/podcast
    The feed seems to be perfectly valid and work just fine. I can't think of anything I've changed, and have been submitting new episodes very regularly. Is there any way to determine why it's disappeared from iTunes?
    Any help would be greatly appreciated.

    bradavic wrote:
    If I am forced to submit it again, would this mean that I'd lose all my subscribers?
    So far you haven't lost any subscribers because your feed is still there - they read it directly and the Store is not involved. It's just that without the Store you aren't likely to get any new ones.
    If you can manage to resubmit it by changing the title but not the feed URL then it won't affect subscribers. However sometimes you need to change both (and it can help to change the contents of the 'link' tag) and of course if you change the URL your subscribers will lose contact with you.
    You can get round this by adding the 'itunes:new-feed-url' tag to the existing feed, redirecting to the new feed - this will seamlessly move subscribers to the new feed (provided of course that you have access to the feed to edit it). The details are given here:
    http://www.wilmut.webspace.virginmedia.com/notes/podcast.html#move
    (It refers to moving the Store to the new feed; of course this isn't relevant here, but it applies equally to subscribers.)

  • Need help determining why 10.6.x clients take FOREVER to login to X Serve

    Issue:
    New MacBooks running of 10.6.x are taking a ridiculous amount of time to log in to network as clients.
    FIle Server (location of Open Directory):
    Xserve G5
    2 x 2.3 GHz PowerPC G5
    8 GB Memory
    Mac OS X Server 10.5.8 (Build 9L34)
    Client Computers:
    17" Intel iMacs (mostly running TIger, starting to image with Leopard)
    17" G5 iMacs (running Tiger)
    20" Intel iMacs (all running 10.5.8)
    MacBook unibodies (shipped with 10.6 and upgraded to 10.6.2)
    Current situation:
    1. Extreme lag time on Snow Leopard MacBook login for network clients—we are looking at well over 90 seconds. BUT, once logged in, the machines log out quickly with no issues.
    2. Local accounts log in with no issue and shared computers/servers are showing up in the finder.
    3. Used Migration Assistant on first new MacBook to "clone" current Applications and accounts from a 10.5.8 master computer and proceeded to update the unit to 10.6.2. Unboxed another new MacBook and did not use MA but instead set up the unit to the our network using Directory Utility. Both machines behave similarly when trying to log in using a client's account. The only difference I can tell is during the actual login box. The migrated MacBook switches from name/password to the "Logging In..." progress bar (which takes up to 2 minutes). The "factory" MacBook stays on the name/password login box with a carousel-ing progress circle to the right of the text boxes.
    4. I've triple checked all the Network/Directory/Account settings on our master 10.5.8 machine (which accesses the network for all clients and run perfectly) vs. the two new MacBooks with 10.6.2—no differences. Maybe that is the problem.....
    5. Unfortunately, we are using a jumble of OSs here. Tiger, Leopard, and now Snow Leopard. We manage accounts using WorkGroupManager (both from 10.5 and 10.4—probably not the best idea)
    Questions:
    Do Snow Leopard machines need folder relocation for things such as Directory?
    Does our X Serve need to be altered in anyway?
    Your expertise is needed....
    Thank you in advance for any input

    Past migrations can get pretty messy.
    I'm sure the root of your problem lies in your ldapv3 settings; including contacts and searches
    Revisit the directory settings, via system prefs--> accounts.
    Look for older "migrated" setting that are no longer needed.
    Perseverance brings good fortune.
    You're welcome.

  • TS2771 I need help with my camera it's shows a black screen. And I have restarted it many times

    I need help with my camera it's shows a black screen. And I have restarted it many times

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                                
    iOS: How to back up                                                                
    - Restore to factory settings/new iOS device.             
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem. Y are not alones. Sometimes the camera fails.
    Apple Retail Store - Genius Bar                                      

  • Need Help Determining Least Common Demoninator for Frame Rate, Codec, and Workflow

    I need help determining the best timeline setting and Compressor workflow to integrate footage with varying frame rates and codecs that I'm currently upres'ing for a multi-camera concert performance destined for HD broadcast output. I'm assuming the network needs 29.97.
    Thus far, I've been working with Apple ProRes Proxy files to create lo-res edits. Now, I've started the task of offlining and ingesting new, HD clips from the proxy references. The content originates from either Panasonic HVX200 or Panasonic GH1 cameras.
    Looking at the material, it appears the cameras were not shooting with the same settings and, somehow, a PAL GH1 got into the mix. Some of the performances have the PAL GH1 and other do not.
    Here's the breakdown of the varying sources. I got this info from the Log & Transfer columns.
    HVX Cameras
    Format: 1080p24
    Source Format: DVCPRO HD 1080i60
    Shooting Rate: 24
    Vid Rate: 29.97
    TC Format: Non-Drop
    GH1 NTSC
    Format: 1080i60
    Source Format: AVCHD 1080i60
    Shooting Rate: 30
    Video Rate: 29.97
    TC Format: Drop
    GH1 PAL
    Format: 1080i50
    Source Format: AVCHD 1080i50
    Shooting Rate: 25
    Video Rate: 25
    TC Format: Non-Drop
    ANOTHER GH1 NTSC
    Format: 1080p24
    Source Format: AVCHD 1080p24
    Shooting Rate: 24
    Video Rate: 23.98
    TC Format: Non-Drop

    Call the TV station/network and get their spec sheet first. You need to know more than frame rate.
    Once you have that, you can work backwards to arrive at a workflow.
    As a general priniciple, you'll get a more seamless translation of format when you add frames rather than removing them. (eg 24p to 27.97 rather than 29.97 to 24p)
    At least all the material starts out in the 1080 world.
    Do all your conversions before you start editing. (I'd use ProRes or ProRes LT for the editing codec).
    Budget a bunch of time to sync the material or figure out a quick cutting style that minimizes sync drift.
    What a nightmare.
    x

  • My email address is ***********, Apple ID I forgot my password, why not send links that Reset Pass on my email, I need help than why? Contact Us By Email me back with ***********, Thanks

    My email address is ***********, Apple ID I forgot my password, why not send links that Reset Pass on my email, I need help than why? Contact Us By Email me back with ***********, Thanks
    <E-mails Edited by Host>

    You are not addressing Apple here. This is a user-supported technical support forum. If you have tried to restore your Apple ID using iForgot, then try contacting iTunes Customer Service.

  • Hello everyone I need help! Why i cant Update to Mountain Lion if Im gonna try to update my Macbook Pro with Mac OS X 2.3 GHz Intel Core i5. It always says "Your Software is up to date" which is only Mac Os X ver. 10.7.5

    Hello everyone I need help! Why i cant Update to Mountain Lion if Im gonna try to update my Macbook Pro with Mac OS X 2.3 GHz Intel Core i5. It always says "Your Software is up to date" which is only Mac Os X ver. 10.7.5

    Not sure what exactly you did (or not), but it looks as if you should attempt doing it all again, only this time all right and by the book. Many millions have done so, and sure it'll work for you as well.
    If you've indeed purchased ML already, you'll find it exactly there in the App Store: under Purchases.

  • Why are contacts not showing up after added

    why are contacts not showing up after added. Don't show up after they added when I want to select then for a new email

    I am replying to my post with the hopes that someone can please help me!
    I am adding new episodes, but they don't show up on the main page. The most recent one to show up is from 10/29/07. I added a new episode today, but it doesn't appear on the main page (before you subscribe). Is there a limit to the # of podcasts that can appear on the main page? Has anyone else had this problem? All the relevant info is above.
    Your help is much appreciated.
    Message was edited by: oneness_podcaster

  • Why don't iBooks shows definition after I have updated to iOS 6?

    Why don't iBooks shows definition after I have updated to iOS 6?

    The same reason why you can't use it under iOS5. It's exclusive to devices since the iPhone 4S.
    (for selling new products)
    So iPhone 4S, iPad 3, iPhone 5 and iPod Touch 5.
    Thinking about other features, you may be interested in 3D-Maps, but there for, you need an A5 CPU or better.
    So iPad2, iPhone 4S, iPad 3, iPhone 5 and iPod Touch 5.

  • No contacts show up after setting up CardDav with gmail- any idea how to fix?

    No contacts are showing up after setting up CardDav with gmail. Any idea why?
    Here is how i setup CardDav (with no success)
    1. I removed my old gmail account that was setup with the Exchange protocol, checked that my Exchange-Gmail contacts were no longer showing in my Contacts app, then rebooted my iPad.
    2. I setup my gmail contacts with the CardDAV protocal as per google's instructions (which match everyone's instructions when I googed to troubleshoot). Google's instructions can be found here: http://support.google.com/mail/bin/answer.py?hl=en&answer=2753077 .
    3. No contacts showed up in my contacts app. I have verified all of Google's troubleshooting tips such as ensuring SSL in enabled, etc. There were no problems or error messages when verifying my username and password. I also checked to make sure my contacts were in Google's "My Contacts" group, which they were.
    After pulling my hair out a little, removing the account and going through the steps over and over for an hour, I have given up and gone back to syncing my contacts with the Exchange protocol as per: http://support.google.com/a/users/bin/answer.py?hl=en&answer=138740 . My contacts show up instantly with this method.
    I would like to get cardDAV working, since Google is phasing out Exchange ActiveSync, and CardDAV seams to support more fields etc (although it is not Push sadly).
    Any ideas? Thanks for your reply if you can think of anything.

    Hey there AppJunkie ...
    I'm having this issue too. The odd thing about it is that when using my iOS devices, all of the contacts (and other address books) all show up exactly as I expect and want them to. Now, on Mac OS X, that's a different story. There doesn't seem to be the same functionality between the two Apple operating systems.
    Quite frustrating, as I have clients who expect these to work with no problem on their Mac desktops, since their mobile devices work perfectly. They let me know their mobile devices work, and they want the problem fixed. I have nothing I can say or even suggest. It is very discouraging.
    I have not been able to find any fix or workaround for this, unfortunately.
    ~Laz

  • I need help my ipod touch 4g wont show up on my computer and it is stuck in recovery mode

    i need help with my ipod touch 4g its stuck on recovery mode and it wont show up on my computer its been 4 months and its still like that what can i doo to fix that email me at [email protected] or post on here

    - Try here to get iTunes to see the iPod:
    iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows
    iPhone, iPad, iPod touch: Device not recognized in iTunes for Mac OS X
    - Yu can also try another computer to help determine if you have a computer or iPod problem
    - Try manually placing the iPod in recovery mode. For that see:
    iPhone and iPod touch: Unable to update or restore
    - Try DFU mode:
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings

  • I need help diagnosing why my Macbook pro is crashing my internet?

    Hi, I need help diagnosing a problem with my macbook pro early 2011.  For the past two weeks all of a sudden my internet was crashing and really slow. Finally I was getting so fed up I called my internet provider and we ruled out that it isnt the cable modem or router.  When I turned my macbook off everything was working fine and all my tablets and apple TV was streaming fine with the speeds I pay for.  I've already went to the genius bar and they did a clean install of maverick.  After the clean install the internet worked for one day and the next day when I got home at night it stopped working. Went to the genius bar once more and took my router and the problem was encountering the same at the store we reseted the router and everything worked fine again.  When I got home I reseted the router setup up with new ssisd and same problem internet crashing. Finally I decided to make another account and the internet was working fine again. Before going to my second trip to the genius bar I made a second account which was working good with good internet speeds, but I still decided to go in cause I don't want to have to have multiple accounts since I'm the only user.  Right now the only way the internet isn't crashing is using another account rather than the administer account. Please help cause I've already went to the apple store twice and feel like I'm at the end of the road and never going to fix the problem

    When you next have the problem, note the exact time: hour, minute, second.
    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Scroll back in the log to the time you noted above. Select any messages timestamped from then until the end of the episode, or until they start to repeat, whichever comes first. Copy the messages to the Clipboard by pressing the key combination command-C. Paste into a reply to this message (command-V).
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.

  • TS2570 i need help with my computer, it only shows a grey screen

    i need help!!!!

    Give this a try if you have an Apple logo and spinning gear displayed on the screen:
    Reinstalling Lion/Mountain Lion Without Erasing the Drive
    Boot to the Recovery HD: Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the main menu. Repair the Hard Drive and Permissions as follows.
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu.
    Reinstall Lion/Mountain Lion: Select Reinstall Lion/Mountain Lion and click on the Continue button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.

  • Need help determining compiling error

    Good morning,
    I need help finding the cause of a compiling error I receive. I have reviewed my code numerous times without any luck. I hope you guys might see something I am not! The entire file exceeds the limit I can post, so I am attaching it in 2 posts. Sorry for the inconvenience. The error and my code are posted below. Thank you for your help!
    C:\StockTrackerDB.java:382: cannot find symbol
    symbol : method add(java.lang.Boolean)
    location: class java.util.ArrayList<java.lang.String>
                   aList.add(new Boolean(rs.getBoolean("admin")));
    ^
    1 error
    Tool completed with exit code 1
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    public class StockTrackerDB
         private Connection con = null;
         //Constructor; makes database connection
         public StockTrackerDB() throws ClassNotFoundException,SQLException
              if(con == null)
                   String url = "jdbc:odbc:StockTracker";
                   try
                        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   catch(ClassNotFoundException ex)
                        throw new ClassNotFoundException(ex.getMessage() +
                                    "\nCannot locate sun.jdbc.odbc.JdbcOdbcDriver");
                   try
                        con = DriverManager.getConnection(url);
                   catch(SQLException ex)
                        throw new SQLException(ex.getMessage()+
                                    "\nCannot open database connection for "+url);
         // Close makes database connection; null reference to connection
         public void close() throws SQLException,IOException,ClassNotFoundException
              con.close();
              con = null;
         // Method to serialize object to byte array
         private byte[] serializeObj(Object obj) throws IOException
              ByteArrayOutputStream baOStream = new ByteArrayOutputStream();
              ObjectOutputStream objOStream = new ObjectOutputStream(baOStream);
              objOStream.writeObject(obj); // object must be Serializable
              objOStream.flush();
              objOStream.close();
              return baOStream.toByteArray(); // returns stream as byte array
         // Method to deserialize bytes from a byte array into an object
         private Object deserializeObj(byte[] buf) throws IOException, ClassNotFoundException
              Object obj = null;
              if(buf != null)
                   ObjectInputStream objIStream = new ObjectInputStream(new ByteArrayInputStream(buf));
                   obj = objIStream.readObject(); //IOException, ClassNotFoundException
              return obj;
         // Methods for adding a record to a table
         // add to the Stocks Table
         public void addStock(String stockSymbol, String stockDesc) throws SQLException, IOException, ClassNotFoundException
              Statement stmt = con.createStatement();
              stmt.executeUpdate("INSERT INTO Stocks VALUES ('"
                                    +stockSymbol+"'"
                                    +",'"+stockDesc+"')");
              stmt.close();
         // add to the Users table
         public boolean addUser(User user) throws SQLException,IOException,ClassNotFoundException
              boolean result = false;
              String dbUserID;
              String dbLastName;
              String dbFirstName;
              Password dbPswd;
              boolean isAdmin;
              dbUserID = user.getUserID();
              if(getUser(dbUserID) == null)
                   dbLastName = user.getLastName();
                   dbFirstName = user.getFirstName();
                   Password pswd = user.getPassword();
                   isAdmin = user.isAdmin();
                   PreparedStatement pStmt = con.prepareStatement("INSERT INTO Users VALUES (?,?,?,?,?)");
                   pStmt.setString(1, dbUserID);
                   pStmt.setString(2, dbLastName);
                   pStmt.setString(3, dbFirstName);
                   pStmt.setBytes(4, serializeObj(pswd));
                   pStmt.setBoolean(5, isAdmin);
                   pStmt.executeUpdate();
                   pStmt.close();
                   result = true;
              else
                   throw new IOException("User exists - cannot add.");
              return result;
         // add to the UserStocks table
         public void addUserStocks(String userID, String stockSymbol)
                        throws SQLException,IOException,ClassNotFoundException
              Statement stmt = con.createStatement();
              stmt.executeUpdate("INSERT INTO UserStocks VALUES ('"
                                    +userID+"'"
                                    +",'"+stockSymbol+"')");
              stmt.close();
         // Methods for updating a record in a table
         // updating the Users table
         public boolean updUser(User user) throws SQLException, IOException, ClassNotFoundException
              boolean result = false;
              String dbUserID;
              String dbLastName;
              String dbFirstName;
              Password dbPswd;
              boolean isAdmin;
              dbUserID = user.getUserID();
              if(getUser(dbUserID) != null)
                   dbLastName = user.getLastName();
                   dbFirstName = user.getFirstName();
                   Password pswd = user.getPassword();
                   isAdmin = user.isAdmin();
                   PreparedStatement pStmt = con.prepareStatement("UPDATE Users SET lastName = ?," + " firstName = ?, pswd = ?, admin = ? WHERE userID = ?");
                   pStmt.setString(1, dbLastName);
                   pStmt.setString(2, dbFirstName);
                   pStmt.setBytes(3, serializeObj(pswd));
                   pStmt.setBoolean(4, isAdmin);
                   pStmt.setString(5, dbUserID);
                   pStmt.executeUpdate();
                   pStmt.close();
                   result = true;
              else
                   throw new IOException("User does not exist - cannot update.");
              return result;
         }

         // Methods for deleting a record from a table
         // delete a record from the Stocks table
         private void delStock(String stockSymbol) throws SQLException,IOException,ClassNotFoundException
              Statement stmt = con.createStatement();
              stmt.executeUpdate("DELETE FROM Stocks WHERE "
                                    +"symbol = '"+stockSymbol+"'");
              stmt.close();
         // delete a record from the Users table
         public void delUser(User user) throws SQLException,IOException,ClassNotFoundException
              String dbUserID;
              String stockSymbol;
              Statement stmt = con.createStatement();
              try
                   con.setAutoCommit(false);
                   dbUserID = user.getUserID();
                   if(getUser(dbUserID) != null) // verify user exists in database
                        ResultSet rs1 = stmt.executeQuery("SELECT userID, symbol "
                                              +"FROM UserStocks WHERE userID = '"+dbUserID+"'");
                        while(rs1.next())
                             try
                                  stockSymbol = rs1.getString("symbol");
                                  delUserStocks(dbUserID, stockSymbol);
                             catch(SQLException ex)
                                  throw new SQLException("Deletion of user stock holding failed: " +ex.getMessage());
                        } // end of loop thru UserStocks
                        try
                        {  // holdings deleted, now delete user
                             stmt.executeUpdate("DELETE FROM Users WHERE "
                                              +"userID = '"+dbUserID+"'");
                        catch(SQLException ex)
                             throw new SQLException("User deletion failed: "+ex.getMessage());
                   else
                        throw new IOException("User not found in database - cannot delete.");
                   try
                        con.commit();
                   catch(SQLException ex)
                        throw new SQLException("Transaction commit failed: "+ex.getMessage());
              catch (SQLException ex)
                   try
                        con.rollback();
                   catch (SQLException sqx)
                        throw new SQLException("Transaction failed then rollback failed: " +sqx.getMessage());
                   // Transaction failed, was rolled back
                   throw new SQLException("Transaction failed; was rolled back: " +ex.getMessage());
              stmt.close();
         // delete a record from the UserStocks table
         public void delUserStocks(String userID, String stockSymbol) throws SQLException,IOException,ClassNotFoundException
              Statement stmt = con.createStatement();
              ResultSet rs;
              stmt.executeUpdate("DELETE FROM UserStocks WHERE "
                                    +"userID = '"+userID+"'"
                                    +"AND symbol = '"+stockSymbol+"'");
              rs = stmt.executeQuery("SELECT symbol FROM UserStocks "
                                         +"WHERE symbol = '"+stockSymbol+"'");
              if(!rs.next()) // no users have this stock
                   delStock(stockSymbol);
              stmt.close();
         // Methods for listing record data from a table
         // Ordered by:
         //          methods that obtain individual field(s),
         //          methods that obtain a complete record, and
         //          methods that obtain multiple records
         // Methods to access one or more individual fields
         // get a stock description from the Stocks table
         public String getStockDesc(String stockSymbol) throws SQLException, IOException, ClassNotFoundException
              Statement stmt = con.createStatement();
              String stockDesc = null;
              ResultSet rs = stmt.executeQuery("SELECT symbol, name FROM Stocks "
                                                      +"WHERE symbol = '"+stockSymbol+"'");
              if(rs.next())
                   stockDesc = rs.getString("name");
              rs.close();
              stmt.close();
              return stockDesc;
         // Methods to access a complete record
         // get User data from the Users table
         public User getUser(String userID) throws SQLException,IOException,ClassNotFoundException
              Statement stmt = con.createStatement();
              String dbUserID;
              String dbLastName;
              String dbFirstName;
              Password dbPswd;
              boolean isAdmin;
              byte[] buf = null;
              User user = null;
              ResultSet rs = stmt.executeQuery("SELECT * FROM Users WHERE userID = '" +userID+"'");
              if(rs.next())
                   dbUserID = rs.getString("userID");
                   dbLastName = rs.getString("lastName");
                   dbFirstName = rs.getString("firstName");
                   // Do NOT use with JDK 1.2.2 using JDBC-ODBC bridge as
                   // SQL NULL data value is not handled correctly.
                   buf = rs.getBytes("pswd");
                   dbPswd=(Password)deserializeObj(buf);
                   isAdmin = rs.getBoolean("admin");
                   user = new User(dbUserID,dbFirstName,dbLastName,dbPswd,isAdmin);
              rs.close();
              stmt.close();
              return user; // User object created for userID
         // Methods to access a list of records
         // get a list of selected fields for all records from the Users Table
         public ArrayList listUsers() throws SQLException,IOException,ClassNotFoundException
              ArrayList<String> aList = new ArrayList<String>();
              Statement stmt = con.createStatement();
              ResultSet rs = stmt.executeQuery("SELECT userID, firstName, lastName, admin "
                                                 +"FROM Users ORDER BY userID");
              while(rs.next())
                   aList.add(rs.getString("userID"));
                   aList.add(rs.getString("firstName"));
                   aList.add(rs.getString("lastName"));
                   aList.add(new Boolean(rs.getBoolean("admin")));
              rs.close();
              stmt.close();
              return aList;
         // get all fields in all records for a given user from the UserStocks table
         public ArrayList listUserStocks(String userID) throws SQLException, IOException, ClassNotFoundException
              ArrayList<String> aList = new ArrayList<String>();
              Statement stmt = con.createStatement();
              ResultSet rs = stmt.executeQuery("SELECT * FROM UserStocks "
                                                      +"WHERE userID = '"+userID+"' ORDER BY symbol");
              while(rs.next())
                   aList.add(rs.getString("symbol"));
              rs.close();
              stmt.close();
              return aList;
    }

  • Why is it not showing anything after I plugged in my USB hard drive? I cannot locate the drive in my macbook. FYI this happened after few times using it.

    I need help as I am new to IOS.
    Currently it is not showing anything after I plugged in the hdd to my mac book.

    I had the same exact issue, which you can see in another forum.
    I "killed" both my MBP and my wife's MBP by plugging in my iPhone and getting a  message about USB drawing too much power.
    It was not fixed by using an SMC reset.
    I DID fix it by unplugging the battery, I left it unplugged long enough to remove the RAM, HD and put some RAM and HD back into place. (I initially swapped the RAM and HD from my MBP into my wife's MBP.
    After that everything was good, although upon first boot, some apps crashed because of the "system date" being set to a date before 2000. I forget the exact date, but it will be some time in 1984, the birthdate of the Macintosh. It is not a big issue, just correct the date and time.
    If you are curious about that date, copy a large file on your drive and look at the CREATED/MODIFIED date....it will show this same date, until the copy is complete, at which time you will see the correct one.
    Once again, try to disconnect your battery, very carefully by lifting up the connecter evenly on both sides to avoid damaging the connector or the board.

Maybe you are looking for