CyberGarage warning :FileNotFoundException

Anonymous
2012-05-25
2013-05-02
  • Anonymous - 2012-05-25

    Hi,
    I am trying to create a control point using cyberlink api.
    Whenever the samsung tv is discovered by control point, there is a FileNotFoundException being thrown.
    Stack trace looks like this:
    CyberGarage warning : java.io.FileNotFoundException: \ConnectionManager1.xml (The system cannot find the file specified)
    org.cybergarage.xml.ParserException: java.io.FileNotFoundException: \ConnectionManager1.xml (The system cannot find the file specified)
    at org.cybergarage.xml.Parser.parse(Parser.java:107)
    at org.cybergarage.upnp.Service.getSCPDNode(Service.java:392)
    at org.cybergarage.upnp.Service.getSCPDNode(Service.java:441)
    at org.cybergarage.upnp.Service.getActionList(Service.java:471)
    at DlnaTest.handleRenderer(DlnaTest.java:193)
    at DlnaTest.browseMediaRenderers(DlnaTest.java:143)
    at DlnaTest.deviceAdded(DlnaTest.java:52)
    at org.cybergarage.upnp.ControlPoint.performAddDeviceListener(ControlPoint.java:486)
    at org.cybergarage.upnp.ControlPoint.addDevice(ControlPoint.java:267)
    at org.cybergarage.upnp.ControlPoint.notifyReceived(ControlPoint.java:507)
    at org.cybergarage.upnp.ssdp.SSDPNotifySocket.run(SSDPNotifySocket.java:138)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.FileNotFoundException: \ConnectionManager1.xml (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at org.cybergarage.xml.Parser.parse(Parser.java:101)
    … 11 more

    I suspect its due to the backslash in device description xml :

    <service>
    <serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
    <serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>
    <controlURL>/upnp/control/ConnectionManager1</controlURL>
    <eventSubURL>/upnp/event/ConnectionManager1</eventSubURL>
    <SCPDURL>ConnectionManager1.xml</SCPDURL>
    </service>
    

    Please help,
    Thanks,

     
  • Anonymous - 2012-05-25

    The line that is causing this exception looks harmless. Its just a call to getServiceType()

    private void handleRenderer(Device device)
        {
    
            String devName = device.getFriendlyName(); 
            System.out.println("==============> " + devName+"  device type"+device.getDeviceType());
    
            ServiceList serviceList = device.getServiceList();
            for(int i=0; i< serviceList.size(); i++)
            {
                Service service = serviceList.getService(i);
                System.out.println("\n service type :  "+service.getServiceType());
                ActionList actionList = service.getActionList();
    
                for(int j =0 ; j< actionList.size(); j++)
                {
                    Action action = actionList.getAction(j);
                    action.print();
                    /*ArgumentList outputList =  action.getOutputArgumentList();
    
                    int argLen = outputList.size();
                    for(int k =0; k< argLen; k++)
                    {
                        Argument argument = outputList.getArgument(k);
                        System.out.println("\t \t argument name:"+argument.getName()+"\t argument value:  "+argument.getValue());
                    }*/
                }
            }
    
        }
    
     
  • Anonymous - 2012-05-25

    The exception is actually being caused by :

    ActionList actionList = service.getActionList();
    

    sorry for the mistake in previous post.
    Thanks,

     
  • Satoshi Konno

    Satoshi Konno - 2012-05-25

    Hi

    Thanks for your report.  I will check your problem this weekend. :-)

    Best Regards,

    Satoshi Konno

     
  • Anonymous - 2012-05-25

    hi satoshi,
    thanks for your prompt attention.
    I am unable to attach full device description xml file. Please let me know, just in case it may help.

     
  • Anonymous - 2012-06-05

    I've checked out source from repository.
    I made some changes to Service.java 441

    String newScpdURLStr = rootDev.getDescriptionFilePath() + HTTP.toRelativeURL(scpdURLStr);
        System.out.println(rootDev.getDescriptionFilePath());
        System.out.println(HTTP.toRelativeURL(scpdURLStr));
    

    to see if description file + relative url actually result in a string that can be used to access the file. getDescriptionFilePath()  is returning an empty string.
    any clue?
    thanks,

     
  • Anonymous - 2013-03-04

    Any updates about this thread??

    I am using CyberLinkForjava on Android, and when I try to getAction(), it gives the same error

    CyberGarage warning : java.io.FileNotFoundException: /x_wfawlanconfig.xml: open failed: ENOENT (No such file or directory)

    I am wondering why this xml file is put in the root directory, which will be denied by Android.

    Is there any suggestion how I can change it to be a relative path (somewhere in /sdcard)

    Thanks

     
  • Anonymous - 2013-03-05

    I think I figured out the reason.

    In Device.java, URLBASE_NAME="URLBase", but in the device I am testing (Cisco E2500 Router), its xml file does not have this field. So rootDevice.getURLBase is always NULL

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks