Tabnine Logo
MarshallingException.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.kie.server.api.marshalling.MarshallingException
constructor

Best Java code snippets using org.kie.server.api.marshalling.MarshallingException.<init> (Showing top 10 results out of 315)

origin: org.kie/kie-server-api

@Override
public String marshall(Object objectInput) {
  try {
    return objectMapper.writeValueAsString(objectInput);
  } catch (IOException e) {
    throw new MarshallingException("Error marshalling input", e);
  }
}
origin: org.kie/kie-server-api

@Override
public <T> T unmarshall(String serializedInput, Class<T> type) {
  try {
    return objectMapper.readValue(serializedInput, type);
  } catch (IOException e) {
    throw new MarshallingException("Error unmarshalling input", e);
  }
}
origin: org.kie/kie-server-api

@Override
public <T> T unmarshall(String input, Class<T> type) {
  try {
    return (T) unmarshaller.unmarshal( new StringReader( input ) );
  } catch ( JAXBException e ) {
    throw new MarshallingException( "Can't unmarshall input string: "+input, e );
  }
}
origin: org.kie/kie-server-api

public JaxbMarshaller() {
  try {
    this.jaxbContext = JAXBContext.newInstance( KIE_SERVER_JAXB_CLASSES );
    this.marshaller = jaxbContext.createMarshaller();
    this.unmarshaller = jaxbContext.createUnmarshaller();
  } catch ( JAXBException e ) {
    throw new MarshallingException( "Error while creating JAXB context from default classes!", e );
  }
}
origin: org.kie/kie-server-api

@Override
public String marshall(Object input) {
  StringWriter writer = new StringWriter();
  try {
    marshaller.marshal( input, writer );
  } catch ( JAXBException e ) {
    throw new MarshallingException( "Can't marshall input object: "+input, e );
  }
  return writer.toString();
}
origin: kiegroup/droolsjbpm-integration

@Override
public String marshall(Object objectInput) {
  try {
    return objectMapper.writeValueAsString(wrap(objectInput));
  } catch (IOException e) {
    throw new MarshallingException("Error marshalling input", e);
  }
}
origin: kiegroup/droolsjbpm-integration

@Override
public <T> T unmarshall(String serializedInput, Class<T> type) {
  try {
    Class actualType = classesSet.contains(type) ? Object.class : type;
    return (T) unwrap(deserializeObjectMapper.readValue(serializedInput, actualType));
  } catch (IOException e) {
    throw new MarshallingException("Error unmarshalling input", e);
  } finally {
    stripped.set(false);
  }
}
origin: kiegroup/droolsjbpm-integration

protected void buildMarshaller( Set<Class<?>> classes, final ClassLoader classLoader ) {
  try {
    logger.debug("Additional classes for JAXB context are {}", classes);
    Set<Class<?>> allClasses = new HashSet<Class<?>>();
    allClasses.addAll(Arrays.asList(KIE_SERVER_JAXB_CLASSES));
    if (classes != null) {
      allClasses.addAll(classes);
    }
    logger.debug("All classes for JAXB context are {}", allClasses);
    this.jaxbContext = JAXBContext.newInstance( allClasses.toArray(new Class[allClasses.size()]) );
  } catch ( JAXBException e ) {
    logger.error("Error while creating JAXB Marshaller due to {}", e.getMessage(), e);
    throw new MarshallingException( "Error while creating JAXB context from default classes! " + e.getMessage(), e );
  }
}
origin: kiegroup/droolsjbpm-integration

@Override
public String marshall(Object input) {
  if (input == null) {
    return null;
  }
  StringWriter writer = new StringWriter();
  try {
    getMarshaller().marshal(ModelWrapper.wrap(input), writer);
  } catch ( JAXBException e ) {
    throw new MarshallingException( "Can't marshall input object: "+input, e );
  }
  return writer.toString();
}
origin: kiegroup/droolsjbpm-integration

@Override
public <T> T unmarshall(String input, Class<T> type) {
  try {
    return (T) unwrap(getUnmarshaller().unmarshal(new StringReader(input)));
  } catch ( JAXBException e ) {
    throw new MarshallingException( "Can't unmarshall input string: "+input, e );
  }
}
org.kie.server.api.marshallingMarshallingException<init>

Popular methods of MarshallingException

    Popular in Java

    • Making http requests using okhttp
    • putExtra (Intent)
    • getSharedPreferences (Context)
    • orElseThrow (Optional)
      Return the contained value, if present, otherwise throw an exception to be created by the provided s
    • Menu (java.awt)
    • Collection (java.util)
      Collection is the root of the collection hierarchy. It defines operations on data collections and t
    • Queue (java.util)
      A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
    • Callable (java.util.concurrent)
      A task that returns a result and may throw an exception. Implementors define a single method with no
    • JButton (javax.swing)
    • JFileChooser (javax.swing)
    • Top plugins for Android Studio
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Tabnine for your IDE now