Codota Logo
MarshallingException.<init>
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
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

    • Creating JSON documents from java classes using gson
    • getResourceAsStream (ClassLoader)
    • onCreateOptionsMenu (Activity)
    • orElseThrow (Optional)
    • Menu (java.awt)
    • Set (java.util)
      A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
    • Executor (java.util.concurrent)
      An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
    • Modifier (javassist)
      The Modifier class provides static methods and constants to decode class and member access modifiers
    • Filter (javax.servlet)
      A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
    • JComboBox (javax.swing)
    Codota Logo
    • Products

      Search for Java codeSearch for JavaScript codeEnterprise
    • IDE Plugins

      IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Codota for your IDE now