Codota Logo
MarshallingException
Code IndexAdd Codota to your IDE (free)

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

Best Java code snippets using org.kie.server.api.marshalling.MarshallingException (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

Most used methods

  • <init>

Popular in Java

  • Making http requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • findViewById (Activity)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
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