Java 8 ServiceNotFoundException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 ServiceNotFoundException class.

This code example shows how to use the following methods:
        else if (resolve.canResolve(TiledWebMapServer.class)) {
            server = resolve.resolve(TiledWebMapServer.class, monitor);
        } 
        else { 
            // if there is no server for the tiles to come from, we can't/wont continue 
            WmsPlugin.trace("WMS or WMST required", new ServiceNotFoundException()); //$NON-NLS-1$
            return null; 
        } 
 
        if (resolve instanceof IGeoResource && adapter.isAssignableFrom(TileSet.class)) {
            IGeoResource resource = (IGeoResource) resolve;
            TileSet tileSet = WMSCTileUtils.toTileSet(resource, server, monitor);
             
            return adapter.cast( tileSet );
        } 
        return null; 
    } 
 
} 
5
CodeRank
This code example shows how to use the following methods:getCause, printStackTrace
            System.out.println("TEST FAILED: Expected " +
                               ServiceNotFoundException.class +
                               " exception not thrown."); 
            error = true;
        } catch (ServiceNotFoundException e) {
            if (e.getCause() == null) {
                System.out.println("TEST FAILED: Got null cause in " +
                                   ServiceNotFoundException.class +
                                   " exception."); 
                error = true;
            } else { 
                System.out.println("TEST PASSED: Got non-null cause in " +
                                   ServiceNotFoundException.class +
                                   " exception."); 
                error = false;
            } 
            e.printStackTrace(System.out);
        } 
 
        // Unregister the MLet MBean 

5
CodeRank
This code example shows how to use the following methods:getCause, printStackTrace
            mlet.getMBeansFromURL(mletFile);
            System.out.println(
                "TEST FAILED: Expected ServiceNotFoundException not thrown"); 
            error = true;
        } catch (ServiceNotFoundException e) {
            if (e.getCause() == null) {
                System.out.println("TEST FAILED: Got unexpected null cause " +
                    "in ServiceNotFoundException"); 
                error = true;
            } else if (!(e.getCause() instanceof IOException)) {
                System.out.println("TEST FAILED: Got unexpected non-null " +
                    "cause in ServiceNotFoundException"); 
                error = true;
            } else { 
                System.out.println("TEST PASSED: Got expected non-null " +
                    "cause in ServiceNotFoundException"); 
                error = false;
            } 
            e.printStackTrace(System.out);
        } 

5
CodeRank
This code example shows how to use the following methods:getCause, printStackTrace
            System.out.println("TEST FAILED: Expected " +
                               ServiceNotFoundException.class +
                               " exception not thrown."); 
            error = true;
        } catch (ServiceNotFoundException e) {
            if (e.getCause() == null) {
                System.out.println("TEST FAILED: Got null cause in " +
                                   ServiceNotFoundException.class +
                                   " exception."); 
                error = true;
            } else { 
                System.out.println("TEST PASSED: Got non-null cause in " +
                                   ServiceNotFoundException.class +
                                   " exception."); 
                error = false;
            } 
            e.printStackTrace(System.out);
        } 
 
        // Unregister the MLet MBean 

5
CodeRank
This code example shows how to use the following methods:getCause, printStackTrace
            mlet.getMBeansFromURL(mletFile);
            System.out.println(
                "TEST FAILED: Expected ServiceNotFoundException not thrown"); 
            error = true;
        } catch (ServiceNotFoundException e) {
            if (e.getCause() == null) {
                System.out.println("TEST FAILED: Got unexpected null cause " +
                    "in ServiceNotFoundException"); 
                error = true;
            } else if (!(e.getCause() instanceof IOException)) {
                System.out.println("TEST FAILED: Got unexpected non-null " +
                    "cause in ServiceNotFoundException"); 
                error = true;
            } else { 
                System.out.println("TEST PASSED: Got expected non-null " +
                    "cause in ServiceNotFoundException"); 
                error = false;
            } 
            e.printStackTrace(System.out);
        } 

5
CodeRank
See Code Examples for Java 8 ServiceNotFoundException Methods: