Throwing Exceptions from a new Thread

Please help if you can.........
I have a very simple RMI server, that is used to run processes in seperate threads on a server machine, that are kicked off by a client GUI.
All works fine, except if the process can not be found, then the server generates an IOException. How can I get the thread to throw the exception back to the RMI Server, and then back to the GUI.
I have tried to throw Runtime Exceptions but that did not work, and I can not declare the run method of the thread to throw a remote exception......
Any help would be most appriciated...
G

/* the listener interface */
public interface ExceptionListener {
  void exceptionOccured(Throwable t);
/* the runnable object */
public class WorkerThread implements Runnable {
  List exceptionListenerList;
  public void addExceptionListener(ExceptionListener l) {
    exceptionListenerList(l);
  public void run() {
    try {
    // do the work, e.g some JDBC stuff
    } catch(Throwable t) {
      // error occured, first do some logging, then notify all listeners
      t.printStackTrace();
      for(i=0; i<exceptionListenerList; i++) {
        (ExceptionListener)exceptionListenerList.get(i).exceptionOccured(t);
/* this clas creates and & runs the thread; before doing this it
registers itself as an ExceptionListener to the runnable object */
public class ThreadStarter implements ExceptionListener {
  public final void exceptionOccured(Throwable t) {
    // do whatever you want to do with the exception
  public final void startThread() {
    WorkerThread wt = WorkerThread();
    wt.addExceptionListener(this);
    new Thread(wt).start();
}By the way: I "borrowed" the ExceptionListener / ExceptionCallback idea from the book "java thread programming - the authorative solution" by paul hyde.

Similar Messages

  • Throw exceptions from threads?

    Is it possible to throw exceptions from threads since I can't add the throws statement to the run method I don't know how I could do it...
    Any help greatly appriciated!
    Cya

    Is it possible to throw exceptions from threads since
    I can't add the throws statement to the run method I
    don't know how I could do it...
    Any help greatly appriciated!
    CyaYou can't throw checked exceptions, because obviously the code responsible for invoking the run() method wouldn't know what to do with it, and you wouldn't be the one to catch them. You can however throw unchecked exceptions (such as those based on RuntimeException).

  • How to throws exception from subprocess?

    Hi,
    I use subprocess in my process and I need throws exception from subprocess to my main process.
    Thanks for help.
    Jakub

    The only to throw an exception from a sub process is by leveraging the Exception event (from the event view).
    You need to throw the exception, by dragging the Exception event and choose Throw into your subprocess. Then you need to add an exception "catcher" in the parent process to catch the Exception.
    Jasmin

  • I can throw exception from a catch

    Hello,
    I have created a new Exception : myException (for example).
    and, i can't throw it under a catch bloc !!
    My code :
    public myMethod( ... ) throw myException {
         try {
              if(true) thorw new NullPointerException("test nll pt");
         } catch(NullPointerException nullPt) {
              if(true) throw new myException("toto",nullPt.getMessage());
    this code doesn't want to throw "myException" from the "catch" !
    Why ?
    myException extends the class Exception.
    Thanks.
    maxx.

    First, I assume you didn't cut and paste the code, as what you have there won't compile. Can you 1) paste the actual code and 2) be a bit more specific about what's happening?
    Aside from a couple of misspellings, I don't see why it wouldn't throw myException. Is it not compiling? Running but not throwing any exception? Throwing a different exception?

  • How can I include the results are coming from a new thread, in the main sequence report?

    Hi,
    I have a main sequence which calls other sequence running in a new thread.
    I cannot see the results (limit test etc.) comming from that sequence.
    Is there any trick to it?
    Andras

    Hi again Andras.
    I got a reply from the technical support. I hope this help you.
    To include in main report the results of your test in another thread you must follow these steps:
    1.- Right click on the sequence call where you create the new thread. In "Specify Module" panel, just right "Run sequence in a new thread" press "Settings" button and disable "Automatically wait for the thread to complete..."
    2.- At the end of your main sequence add a new "synchronization - wait" step. Configure your wait, selecting in the upper ring tab "wait for thread".
    3.- Then select below "specify by sequence call" and pick over your thread name.
    With these changes your main sequence will add the results from your thread to your main sequence report.
    I hope it works for you. (but sadly it doesn't work for me)

  • Throwing Exceptions from CacheStore

    If I encounter an exception whilst persisting a cache's contents via a CacheStore implementation, how can I pass this expection up to the code that put the entry on the cache? If it doesn't make it into the database, I'd like to throw something to let the client code know.

    Hi Mike,
         Rethrowing synchronous CacheStore exceptions to the calling thread is now supported in Coherence 3.0. To do so, set the <tt>rollback-cachestore-failures</tt> configuration element in your <tt>read-write-backing-map-scheme</tt> or <tt>versioned-backing-map-scheme</tt> caching scheme to true.
         Jason

  • IViews throwing exception from Non Admin Login?

    Hi,
    I have created some iViews using .Net PDK for SAP.
    I have added these iViews to a page. Then the page is added to workset. I have created a new role and assigned this workset to the new Role. Then I have created a new User and associated this user with the newly created Role.
    Now the problem is whenever I login to portal using new user name and password I am able to see the workset as well as page and iViews. But these iViews are throwing following exception.
    An Error occurred while processing one of the iViews on this page in the .NET server.
    More information:
    1. Default Trace
    Exception id: 10:37_04/10/05_0037_6409650
    However these iViews are running properly when I preview them from admin login.
    What are possible causes/solutions for the above mentioned behavior?
    Thanks for suggestions
    Regards,
    Vikas Khandpur

    Hi Vikas
    You should use the Permission Editor to assign user, group and role permissions to portal objects.
    You can launch the Permission Editor in two ways:
    1. Using the central Permission Editor
    a. Choose System Administration ® Permissions.
    b. Locate the folder or object you want to assign or edit permissions for, right-click it and choose Open ® Permissions from the context menu.
    2. Using the object-specific Permission Editor
    a. Launch the relevant administration tool or editor in the portal.
    b. In the Portal Catalog, locate the object or folder to want to set or edit permissions for. Then, do one of the following:
       i. Right-click the object and choose Open ® Permissions from the context menu.
       ii. Open the object in the editor, and from the Display menu or drop-down list, choose Permissions.
    To know how to set permissions in the permission editor, please refer to the following thread.
    http://help.sap.com/saphelp_nw04/helpdata/en/f6/2604db05fd11d7b84200047582c9f7/content.htm
    As for your doubt on why you are able to view the iViews from an administrator's login,it is because The standard super administer role is assigned maximum access to the entire set of portal initial content. The Super Administrator role is assigned by default to the Administrators group. Therefore, initially all standard administrator users have super administrator permissions in the portal.
    Hope that helped.
    Best Regards
    Priya

  • How to throw exception from Listener's Event Methods

    Hi,
    We are using Jdev 10.1.3 and I'm implementing a class that implements EntityListener and RowSetListener interfaces.
    The problem that i'm facing is when I override the event methods of the interface (Which don,t throw any exception) , I'm not able to throw any exceptions in overridden methods also. Kidnly guide me on how to achieve this...
    Sample Code :
    public class GenericHistoryViewObjectImpl extends ViewObjectImpl implements RowSetListener
    // this event is fired when a row is deleted from rowset and it registers data in history
    public void rowDeleted(DeleteEvent event)
    latestEvent = "DEL";
    try
    GenericHistoryManager.registerDataInHistory(this);
    wasLastEventExecutedSuccessfully = 1;
    catch (Exception e)
    e.printStackTrace();
    wasLastEventExecutedSuccessfully = 0;
    genericHistViewException = e;
    from The mothod public void rowDeleted(DeleteEvent event) of RowSetListener i want to throw an exception ...

    JSalonen is totally correct. I would only add that this topic, generally, exposes the differences between checked and unchecked exceptions. Unchecked exceptions extend RuntimeException or Error. Checked exceptions extend Throwable or Exception. There are important differences.
    Checked exceptions must specifically be caught or declared in a throws clause of a caller. Unchecked exceptions do not have this restriction. This means you can always 'wrap' (or throw without wrapping) an unchecked exception. Unchecked exceptions are very useful. You can use an existing unchecked exception, or create your own by extending RuntimeException or Error.
    To illustrate the difference, let's say we are creating a new user account and storing it in the database. For a checked exception, I might define DuplicateUserRegistration in case a user registers with an existing user name (a non-fatal error case that can be anticipated in system design). However, if the database was down, I would not throw SQLException (which is checked) but rather something like ResourceUnavailableError. This would be unchecked. A calling class (normally) will not be able to realistically handle a situation where the database is down, so why force that caller to either declare throws SQLException or catch SQLException for this instance?
    - Saish

  • Cannot throw exception from switch-"unreachable statement"

    Hi,
    why is this an unreachable statement?
      public static Msg newMsg(int type, Object data)
          Msg msg;
          switch (type)
              case MsgTypes.MSG_CLUSTER_CREATED:
                  msg=new MsgClusterCreated(); break;
              case MsgTypes.MSG_REPLY:
                  msg=new MsgReply(); break;
              default:
                  throw new MessageTypeNotDeclaredException(); break;     //unreachable statement!!!        
          msg.setDataSegment(data);
          return msg;
      }

    When you throw an exception, the program flow never continues "normally" on the next line --- control is always transferred to the nearest exception handler. Thus control never reaches the break statement on the same line, and "unreachable statements" like this are illegal in Java.
    Solution: remove the unnecessary "break;"

  • Accessing shared database throws exception from one of 2 web roles

    Setup:
    Shared database
    Main site and "admin site" each using separate web roles accessing shared database.
    I had things working and running correctly until about 2 days ago.  Then, only the "admin site" stopped working.  I am using the same code to access the database across both sites but am getting the following exception when trying to access the
    database in the admin site:
    Message: Unable to open connection to "Microsoft SQL Server, provider V2.0.0.0 in framework .NET V2.0".
    Stack Trace: at IBatisNet.DataMapper.SqlMapSession.OpenConnection(String connectionString) at IBatisNet.DataMapper.SqlMapSession.OpenConnection() at IBatisNet.DataMapper.Commands.DbCommandDecorator.System.Data.IDbCommand.ExecuteReader() at IBatisNet.DataMapper.MappedStatements.MappedStatement.RunQueryForObject[T](RequestScope
    request, ISqlMapSession session, Object parameterObject, T resultObject) at IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForObject[T](ISqlMapSession session, Object parameterObject, T resultObject) at IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForObject[T](ISqlMapSession
    session, Object parameterObject) at IBatisNet.DataMapper.SqlMapper.QueryForObject[T](String statementName, Object parameterObject) at AutoOffers.Persistence.SqlMapperWrapper.QueryForObject[T](String statementName, Object parameter) at AutoOffers.Persistence.Mappers.DbUserMapper.FindByEmailAddress(String
    emailAddress) at AutoOffers.Persistence.Repositories.UserRepository.FindByEmailAddress(String emailAddress) at AutoOffers.Core.Domain.Services.Authentication.MembershipService.ValidateUser(String username, String password) at Admin.AutoOffers.Web.Controllers.HomeController.Login(LoginModel
    model, String returnUrl) at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext,
    IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41()
    at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End() at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult
    asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
    at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End() at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult
    asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<>c__DisplayClass2a.<BeginInvokeAction>b__20() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult
    asyncResult)
    NOTE: I've tried to go to the v4 provider but get the same error (except with v4 in place of v4).  I would suspect something amiss with my application if I didn't have a working one using shared code...though I'm still not ruling out that I'm doing
    something wrong, just waiting for input from here.
    Thanks in advance.

    Hey there, and apologies for the lack of response.  Are you still having this issue and still needing help?  If so can you tell me a little more.  Where is the application running (web/worker rolls)? what are the details on the SQL Database?
    Thanks Guy

  • Can i catch an exception from another thread?

    hi,guys,i have some code like this:
    public static void main(String[] args) {
    TimeoutThread time = new TimeoutThread(100,new TimeOutException("超时"));
    try{
    t.start();
    }catch(Exception e){
    System.out.println("eeeeeeeeeee");
    TimeoutThread will throws an exception when it runs ,but now i can't get "eeeeeeeeeee" from my console when i runs the main bolck code.
    i asked this question in concurrent forums,somebody told me that i can't.so ,i think if i can do this from aspect of jvm.
    thank you for your help
    Edited by: Darryl Burke -- Double post of how to catching exceptions from another thread locking

    user5449747 wrote:
    so ,i think if i can do this from aspect of jvm. What does that mean? You think you'll get a different answer in a different forum?
    You can't catch exceptions from another thread. It's that easy. You could somehow ensure that exceptions from that other thread are always caught and somehow passed to your thread, but that would be a different thing (you would still be catching the exception on the thread it is originating from, as is the only way).
    For example you can use setUncaughtExceptionHandler() on your thread to provide an object that handles an uncaught exceptions (and you could pass that uncaught exception to your other thread in some way).

  • Throws Exception

    Dear Expert,
    May I know how to throw Exception from a thread back to calling program ?
    As I always get the following message when compiling the code
    cannot override run() in java.lang.Thread; overridden method does not throw java.lang.Exception public void run() throws Exception
    Thanks!
    w

    From what I can see in the javadoc, you can create a subclass of ThreadGroup and override its uncaughtException method, then you'd have to create a Thread that belongs to an instance of your ThreadGroup subclass and have its overridden method set some variable in your main thread. However you should recognize that whatever started your thread may not even exist when it throws that exception, and it may not be sitting around waiting for your thread to throw an exception. You should reconsider that requirement carefully before actually trying to implement it.

  • Custom Indirection Container throwing exception in constructor

    Hi I've following the how-to and implemented my own custom indirection container. However, when reading an object from the database I'm getting the following exception. I'm guessing that it could be related to having null references stored as 0 in id columns. Any help would be greatly appreciated.
    Thanks,
    Jon
    Exception thrown in main Exception [TOPLINK-152] (OracleAS TopLink - 10g (9.0.4.8) (Build 050712)):
    oracle.toplink.exceptions.DescriptorException
    Exception Description: The operation [buildContainer constructor (null) Failed: java.lang.NullPointe
    rException] is invalid for this indirection policy [oracle.toplink.internal.indirection.ContainerInd
    irectionPolicy@cc0e01].
    Mapping: oracle.toplink.mappings.OneToOneMapping[ryFromMail]
    Descriptor: Descriptor(com.peoplesoft.crm.omk.design.PsRyedocVar --> [DatabaseTable(PS_RYEDOC_VAR)])
    Local Exception Stack:
    Exception [TOPLINK-152] (OracleAS TopLink - 10g (9.0.4.8) (Build 050712)): oracle.toplink.exceptions
    .DescriptorException
    Exception Description: The operation [buildContainer constructor (null) Failed: java.lang.NullPointe
    rException] is invalid for this indirection policy [oracle.toplink.internal.indirection.ContainerInd
    irectionPolicy@cc0e01].
    Mapping: oracle.toplink.mappings.OneToOneMapping[ryFromMail]
    Descriptor: Descriptor(com.peoplesoft.crm.omk.design.PsRyedocVar --> [DatabaseTable(PS_RYEDOC_VAR)])
    at oracle.toplink.exceptions.DescriptorException.invalidIndirectionPolicyOperation(Descripto
    rException.java:669)
    at oracle.toplink.internal.indirection.ContainerIndirectionPolicy.buildContainer(ContainerIn
    directionPolicy.java:62)
    at oracle.toplink.internal.indirection.ContainerIndirectionPolicy.valueFromQuery(ContainerIn
    directionPolicy.java:254)
    at oracle.toplink.mappings.ForeignReferenceMapping.valueFromRow(ForeignReferenceMapping.java
    :898)
    at oracle.toplink.mappings.OneToOneMapping.valueFromRow(OneToOneMapping.java:1302)
    at oracle.toplink.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:876)
    at oracle.toplink.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder
    .java:164)
    at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:322)
    at oracle.toplink.queryframework.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:
    242)
    at oracle.toplink.queryframework.ReadObjectQuery.execute(ReadObjectQuery.java:368)
    at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:510)
    at oracle.toplink.queryframework.ReadQuery.execute(ReadQuery.java:125)
    at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:1962)
    at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1086)
    at oracle.toplink.internal.indirection.NoIndirectionPolicy.valueFromQuery(NoIndirectionPolic
    y.java:254)
    at oracle.toplink.mappings.ForeignReferenceMapping.valueFromRow(ForeignReferenceMapping.java
    :898)
    at oracle.toplink.mappings.OneToOneMapping.valueFromRow(OneToOneMapping.java:1302)
    at oracle.toplink.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:876)
    at oracle.toplink.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder
    .java:164)
    at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:322)
    at oracle.toplink.queryframework.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:
    242)
    at oracle.toplink.queryframework.ReadObjectQuery.execute(ReadObjectQuery.java:368)

    Clients of your class might not like you throwing
    exceptions from the ctor. If they're checked
    exceptions it'll mean try/catch blocks. If there are
    LOTS of checked exceptions that'll mean lots of catch
    blocks. Could get messy fast. You could catch in the
    ctor and wrap in a subclass of
    java.lang.RuntimeException. Those are unchecked, like
    java.lang.IllegalArgumentException.I would strongly advise against making your checked exceptions unchecked just so that the caller's code will compile without try/catch blocks. Either way--checked or unchecked--if I do Foo foo = new Foo();
    foo.doStuff(); I won't get to doStuff() if the ctor threw an exception.
    You'd throw unchecked exceptions in those cases where it's appropriate--e.g., the caller passed you invalid args (bad code on the caller's part, appropriated for unchecked exception), or the VM couldn't get enough memory to create your object (probably not something the caller can do anything about, so, again, appropriate for unchecked).
    But if, for example, he's passing you database login parameters that an end user provided, and the password is wrong or the host is unreachable, then you'd want to throw a checked exception, because it's not bad code on the caller's part, and there might be something he can do to recover.
    Note that the example of the incorrect password above is quite different from the "invalid args" example in the previous paragraph. Your method would throw IllegalArgumentException if the caller passed args that violate your method's precondition--e..g. lie outside some range of numbers. That is, it's a value that your method simply can't use. A bad password for a db login, on the other hand, is legal as far as your method is concerned, it just failed authentication in the db.
    @%: I know you're aware of the proper use of checked/unchecked exceptions, but the way you worded you post kind of sounded like you were saying, "just use unchecked if you find the caller has too many try statements."
    &para;

  • Exporting methods that throw exceptions?

    Using 10g Preview, I have encountered the following situation:
    I've written a custom method in my ViewRowImpl class that I intend to export as a client row method. It's a public void method that takes a single String parameter.
    Originally, I declared that the method throws Exception. With the throws clause present, the View Object wizard does not display the method in the list of available methods to export to the client. Removing the throws clause causes the method to appear in the list.
    There's nothing in the documentation that I can find to explain this apparent restriction. The closest thing I can find has to do with all types in the signature being Serializable. Nothing is mentioned about exceptions.
    Can somebody explain why methods that declare thrown exceptions can't be exported to the client? Or does the type of exception declared need to be narrower, such as a JboException?

    I wondered the same thing. Take a look at this thread:
    Why can't I throw exception from the Impl?

  • WebService throw Exception

    I am trying to test throwing exceptions from a java web service.
         * Web service operation
        @WebMethod(operationName = "newRole")
        public String newRole(@WebParam(name = "name") String name, @WebParam(name = "users") String users)  throws Exception
            throw new Exception("TestException");
        }Now whenever I test this webservice I get:
    "Service invocation threw an exception with message : null; Refer to the server log for more details"
    "Exceptions details : java.lang.reflect.InvocationTargetException ..."
    The stack trace is massive.
    Now if I examine the log I see the regular normal "Exception: TestException" message.
    How can I get the web service to properly convert the Exception into a proper SOAP message not wrapped up on this InvocationTargetException .
    Thanks,
    Stephen

    Hi Mahesh,
    I refered those scenarios. But, our requirment is we want to take 'Additional Text' option from SXMB_MONI and map to WS source structure one element.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Call Adapter --> <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1"><SAP:Category>XIServer</SAP:Category><SAP:Code area="INTERNAL">PL_TIMEOUT</SAP:Code><SAP:P1/><SAP:P2/><SAP:P3/><SAP:P4/><SAP:AdditionalText>TIME OUT REACHED</SAP:AdditionalText><SAP:ApplicationFaultMessage namespace=""/><SAP:Stack>Timeout condition of pipeline reached
    </SAP:Stack><SAP:Retry>N</SAP:Retry></SAP:Error>
    Could you kindly help me ?

Maybe you are looking for

  • How to set up two POP e-mail accounts using the same POP and SMTP servers

    I have an e-mail address based on a domain I purchased which is based on my company name. Now retired, I have purchased a new domain with a simpler, personalised name. My original e-mail account uses the incoming (POP3) and outgoing (SMTP) mail serve

  • Can't Uninstall Premiere Pro CS4 from Trial-Missing Uninstall file

    I was using the Premiere Pro CS4 (CS5 XP compatibility pack) as a free trial on my Windows XP computer. Since my trial period is over, I want to uninstall it. Unfortunately, something seems to be wrong. When I click on "Premiere Pro CS4 and After Eff

  • Quick question about SATA 2

    Hi, Very quick question, Are the newer SATA2 Hard Disks compatible with the older model of the Mac Pro? May sound stupid, but I believe that the Mac Pro was released before the SATA 2, so just wanted to check the Mac Pro hardware etc will take SATA 2

  • How do I get a link to a photo stream in ios 7?

    In the old operating system, it was easy to get a link to a photo stream to share as a public web site.  I can't for the life of me figure this out in the new Operating System.  Help!

  • Syncing music from home & outlook from work

    I just synced my iphone with itunes and outlook from work but since I keep all of my music at my home computer that is where I want to grab music from. When I tried to sync to my home computer I got a message that says that the phone can only be sync