diff --git a/HIRS_Utils/src/integration/java/integration/hirs/repository/spacewalk/SpacewalkServiceConsoleTester.java b/HIRS_Utils/src/integration/java/integration/hirs/repository/spacewalk/SpacewalkServiceConsoleTester.java index 07ce3715..6386bf43 100644 --- a/HIRS_Utils/src/integration/java/integration/hirs/repository/spacewalk/SpacewalkServiceConsoleTester.java +++ b/HIRS_Utils/src/integration/java/integration/hirs/repository/spacewalk/SpacewalkServiceConsoleTester.java @@ -6,9 +6,12 @@ import hirs.repository.RepositoryUpdateService; import hirs.repository.spacewalk.Credentials; import hirs.repository.spacewalk.SpacewalkChannel; import hirs.repository.spacewalk.SpacewalkChannelRepository; -import hirs.repository.spacewalk.SpacewalkService; import hirs.repository.spacewalk.SpacewalkException; import hirs.repository.spacewalk.SpacewalkPackage; +import hirs.repository.spacewalk.SpacewalkService; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; import java.io.IOException; import java.net.MalformedURLException; @@ -16,10 +19,6 @@ import java.net.URL; import java.util.List; import java.util.Set; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.springframework.context.annotation.AnnotationConfigApplicationContext; - /** * Console tester application that exercises the SpacewalkService test by connecting to a real * Spacewalk instance with username / password. @@ -71,7 +70,7 @@ public final class SpacewalkServiceConsoleTester { private static void loadBeansFromSpringContext() { AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); - context.register(PersistenceConfiguration.class); +// context.register(null); context.refresh(); // register a shutdown hook such that components are properly shutdown when JVM is closing diff --git a/HIRS_Utils/src/main/java/hirs/data/persist/AppraisalResult.java b/HIRS_Utils/src/main/java/hirs/data/persist/AppraisalResult.java index 9e8d78b3..b7eadb91 100644 --- a/HIRS_Utils/src/main/java/hirs/data/persist/AppraisalResult.java +++ b/HIRS_Utils/src/main/java/hirs/data/persist/AppraisalResult.java @@ -16,7 +16,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlTransient; /** * An AppraisalResult represents the result of an appraisal. @@ -57,7 +56,6 @@ public class AppraisalResult extends AbstractEntity { */ @ManyToOne @JoinColumn(name = "reportSummary") - @XmlTransient private ReportSummary reportSummary; /** diff --git a/HIRS_Utils/src/main/java/hirs/data/persist/ReportSummary.java b/HIRS_Utils/src/main/java/hirs/data/persist/ReportSummary.java index fe498113..2ddf6c20 100644 --- a/HIRS_Utils/src/main/java/hirs/data/persist/ReportSummary.java +++ b/HIRS_Utils/src/main/java/hirs/data/persist/ReportSummary.java @@ -20,6 +20,7 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; +import java.io.Serializable; import java.util.Collections; import java.util.Date; import java.util.Set; @@ -33,7 +34,7 @@ import java.util.Set; @Table(name = "ReportSummary") @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public class ReportSummary { +public class ReportSummary implements Serializable { /** * The unique ID of the ReportSummary. The ID is randomly generated when the diff --git a/HIRS_Utils/src/main/java/hirs/data/persist/certificate/attributes/TPMSecurityAssertions.java b/HIRS_Utils/src/main/java/hirs/data/persist/certificate/attributes/TPMSecurityAssertions.java index 7cbb93b1..b0543131 100644 --- a/HIRS_Utils/src/main/java/hirs/data/persist/certificate/attributes/TPMSecurityAssertions.java +++ b/HIRS_Utils/src/main/java/hirs/data/persist/certificate/attributes/TPMSecurityAssertions.java @@ -2,6 +2,7 @@ package hirs.data.persist.certificate.attributes; import javax.persistence.Column; import javax.persistence.Embeddable; +import java.io.Serializable; import java.math.BigInteger; /** @@ -15,7 +16,7 @@ import java.math.BigInteger; * for specifications for TPM 2.0 (pg. 19). */ @Embeddable -public class TPMSecurityAssertions { +public class TPMSecurityAssertions implements Serializable { /** * A type to handle the different endorsement key generation types used in the TPM diff --git a/HIRS_Utils/src/main/java/hirs/data/persist/certificate/attributes/TPMSpecification.java b/HIRS_Utils/src/main/java/hirs/data/persist/certificate/attributes/TPMSpecification.java index 0523e689..728244d3 100644 --- a/HIRS_Utils/src/main/java/hirs/data/persist/certificate/attributes/TPMSpecification.java +++ b/HIRS_Utils/src/main/java/hirs/data/persist/certificate/attributes/TPMSpecification.java @@ -2,6 +2,7 @@ package hirs.data.persist.certificate.attributes; import javax.persistence.Column; import javax.persistence.Embeddable; +import java.io.Serializable; import java.math.BigInteger; /** @@ -15,7 +16,7 @@ import java.math.BigInteger; * for specifications for TPM 2.0. */ @Embeddable -public class TPMSpecification { +public class TPMSpecification implements Serializable { @Column private String family; diff --git a/HIRS_Utils/src/main/java/hirs/data/persist/tpm/QuoteData.java b/HIRS_Utils/src/main/java/hirs/data/persist/tpm/QuoteData.java index 3be4009a..03a31cb6 100644 --- a/HIRS_Utils/src/main/java/hirs/data/persist/tpm/QuoteData.java +++ b/HIRS_Utils/src/main/java/hirs/data/persist/tpm/QuoteData.java @@ -1,6 +1,7 @@ package hirs.data.persist.tpm; -import java.util.UUID; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import javax.persistence.Column; import javax.persistence.Embeddable; @@ -14,9 +15,8 @@ import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; +import java.io.Serializable; +import java.util.UUID; /** * Java class for QuoteData complex type, which was modified from code @@ -30,7 +30,7 @@ import org.apache.logging.log4j.Logger; + "Integrity_Report_v1_0#", propOrder = {"quote2", "tpmSignature" }) @Embeddable -public class QuoteData { +public class QuoteData implements Serializable { private static final Logger LOGGER = LogManager.getLogger(QuoteData.class); diff --git a/HIRS_Utils/src/main/java/hirs/persist/ScheduledJobInfo.java b/HIRS_Utils/src/main/java/hirs/persist/ScheduledJobInfo.java index 88e6fee5..bbccb5d9 100644 --- a/HIRS_Utils/src/main/java/hirs/persist/ScheduledJobInfo.java +++ b/HIRS_Utils/src/main/java/hirs/persist/ScheduledJobInfo.java @@ -7,6 +7,7 @@ import org.joda.time.Period; import javax.persistence.Column; import javax.persistence.Embeddable; +import java.io.Serializable; import java.util.Date; /** @@ -14,7 +15,7 @@ import java.util.Date; * a specified time of day. */ @Embeddable -public class ScheduledJobInfo { +public class ScheduledJobInfo implements Serializable { private static final long MINIMUM_FREQUENCY_MILLISECONDS = 1; diff --git a/HIRS_Utils/src/main/java/hirs/repository/RepoPackage.java b/HIRS_Utils/src/main/java/hirs/repository/RepoPackage.java index 22963490..20c61388 100644 --- a/HIRS_Utils/src/main/java/hirs/repository/RepoPackage.java +++ b/HIRS_Utils/src/main/java/hirs/repository/RepoPackage.java @@ -9,8 +9,6 @@ import javax.persistence.Embedded; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.Table; import javax.persistence.UniqueConstraint; diff --git a/HIRS_Utils/src/main/java/hirs/repository/spacewalk/Credentials.java b/HIRS_Utils/src/main/java/hirs/repository/spacewalk/Credentials.java index bd1ce7df..8eabee36 100644 --- a/HIRS_Utils/src/main/java/hirs/repository/spacewalk/Credentials.java +++ b/HIRS_Utils/src/main/java/hirs/repository/spacewalk/Credentials.java @@ -1,10 +1,12 @@ package hirs.repository.spacewalk; +import java.io.Serializable; + /** * Wraps credentials for Spacewalk connections. */ -public class Credentials { +public class Credentials implements Serializable { private String userName, password; /**