@Override public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { String subject = reader.getAttribute(A_RELATIONSHIP_SUBJECT); String predicate = reader.getAttribute(A_RELATIONSHIP_PREDICATE); String object = reader.getAttribute(A_RELATIONSHIP_OBJECT); Relationship relationship = null; try { relationship = new Relationship(subject, object, new URI(predicate)); } catch (URISyntaxException e) { log.error("URISyntax exception when creating relationship" + e.getMessage() + e.getStackTrace()); } return relationship; }
@Override public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { String subject = reader.getAttribute(A_RELATIONSHIP_SUBJECT); String predicate = reader.getAttribute(A_RELATIONSHIP_PREDICATE); String object = reader.getAttribute(A_RELATIONSHIP_OBJECT); Relationship relationship = null; try { relationship = new Relationship(subject, object, new URI(predicate)); } catch (URISyntaxException e) { log.error("URISyntax exception when creating relationship" + e.getMessage() + e.getStackTrace()); } return relationship; }
errorList.append(" - Invalid URI syntax: ").append(e.getMessage()).append("\n").append(StringUtils.join(e.getStackTrace(), "\n")).append("\n"); } catch (IOException e) { errorList.append(" - IO Exception: ").append(e.getMessage()).append("\n").append(StringUtils.join(e.getStackTrace(), "\n")).append("\n");
public void createActiveResourceAdapterForEmbeddedRar(String rarModuleName) throws ConnectorRuntimeException { ConnectorDescriptor cdesc = loadConnectorDescriptorForEmbeddedRAR(rarModuleName); String appName = ConnectorAdminServiceUtils.getApplicationName(rarModuleName); String rarFileName = ConnectorAdminServiceUtils .getConnectorModuleName(rarModuleName) + ".rar"; String loc = getResourcesUtil().getApplicationDeployLocation(appName); loc = loc + File.separator + FileUtils.makeFriendlyFilename(rarFileName); String path = null; try { URI uri = new URI(loc); path = uri.getPath(); } catch (URISyntaxException use) { ConnectorRuntimeException cre = new ConnectorRuntimeException("Invalid path [ "+use.getMessage()+" ]"); cre.setStackTrace(use.getStackTrace()); _logger.log(Level.WARNING, cre.getMessage(), cre); throw cre; } // start RA _runtime.createActiveResourceAdapter(cdesc, rarModuleName, path); }