Examples of ServerException


Examples of org.wso2.carbon.utils.ServerException

        } catch (Exception e) {
            String msg = "Error occured while getting parameters of service group : "
                         + serviceGroupName;
            log.error(msg, e);
            throw new ServerException("getServiceParameters", e);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.utils.ServerException

        } catch (Exception e) {
            String msg = "Error occured while gettig parameter " + paramName
                         + " of service group : " + serviceGroupName;
            log.error(msg, e);
            throw new ServerException("getServiceParameter", e);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.utils.ServerException

            builder = new StAXOMBuilder(xmlFile);
        } catch (Exception e) {
            String msg = "Error occurred while trying to instantiate StAXOMBuilder for XML file " +
                         xmlFile;
            log.error(msg, e);
            throw new ServerException(msg, e);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.utils.ServerException

     * @throws org.wso2.carbon.utils.ServerException ServerException
     */
    public void init(String repoLocation, String weblocation) throws
                                                              ServerException {
        if (repoLocation == null) {
            throw new ServerException("Axis2 repository not specified!");
        }
        this.webLocation = weblocation;

        // Check whether this is a URL
        isUrlRepo = CarbonUtils.isURL(repoLocation);

        if (isUrlRepo) { // Is repoLocation a URL Repo?
            try {
                new URL(repoLocation).openConnection().connect();
            } catch (IOException e) {
                throw new ServerException("Cannot connect to URL repository " + repoLocation, e);
            }
            this.repoLocation = repoLocation;
        } else { // Is repoLocation a file repo?
            File repo = new File(repoLocation);
            if (repo.exists()) {
                this.repoLocation = repo.getAbsolutePath();
            } else {
                this.repoLocation =
                        System.getProperty("wso2wsas.home") + File.separator +
                                repoLocation;
                repo = new File(this.repoLocation);
                if (!repo.exists()) {
                    this.repoLocation = null;
                    throw new ServerException("Repository location '" + repoLocation +
                            "' not found!");
                }
            }
        }

        axis2xml = CarbonUtils.getAxis2Xml();

        isUrlAxis2Xml = CarbonUtils.isURL(axis2xml);

        if (!isUrlAxis2Xml) { // Is axis2xml a URL to the axis2.xml file?
            File configFile = new File(axis2xml);
            if (!configFile.exists()) {
                //This will fallback to default axis2.xml
                this.axis2xml = null;
                //Thus default
            }
        } else {
            try {
                URLConnection urlConnection = new URL(axis2xml).openConnection();
                urlConnection.connect();
            } catch (IOException e) {
                throw new ServerException("Cannot connect to axis2.xml URL " + repoLocation, e);
            }
            isInitialized = true;
        }
    }
View Full Code Here

Examples of sherpa.protocol.ServerException

  public void testExceptionOnQuery() {
    DummyQueryResponder queryResponder = new DummyQueryResponder(20) {
      private ErrorResponse err() {
        ErrorResponse resp = new ErrorResponse();
        resp.code = ReasonCode.Error;
        resp.serverException = new ServerException();
        resp.serverException.message = "foo";
        return resp;
      }
      @Override
      public QueryResponse query(QueryRequest query)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.