Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Error when doing mvn wildfly:deploy
PostPosted: Wed Mar 15, 2017 12:02 pm 
Newbie

Joined: Mon Mar 06, 2017 6:47 pm
Posts: 1
Hey, Guys. I have an error when I do mvn wildfly:deploy. I am using wildfly 10.1.0.Final, hibernate ogm 5.0.10.Final and Cassandra 3.0.9. Here is the full error massage:

Quote:
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.1.0.Final:deploy (default-cli) on project aigateway: Failed to execute goal deploy: {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => {"WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"aigateway.war#JPAService\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"aigateway.war#JPAService\": javax.persistence.PersistenceException: [PersistenceUnit: JPAService] Unable to build Hibernate SessionFactory [ERROR] Caused by: javax.persistence.PersistenceException: [PersistenceUnit: JPAService] Unable to build Hibernate SessionFactory [ERROR] Caused by: org.hibernate.HibernateException: Couldn't determine main side role for collection com.sensorhound.aigateway.domain.IOConfiguration.nodeData"},"WFLYCTL0412: Required services that are not installed:" => ["jboss.persistenceunit.\"aigateway.war#JPAService\""],"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined}}} [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/disp ... nException


Here is the code for "IO_CONFIGURATION" table:

Code:
@Entity 
@Indexed 
@Table(name = "IO_CONFIGURATION") 
public class IOConfiguration implements Serializable { 

  private static final long serialVersionUID = 7542743172221933818L; 

  @Id 
  @Column(name = "IO_CONFIGURATION_ID") 
  protected String ioConfigurationId; 

  @Column(name = "ACTIVE") 
  protected Boolean active; 

  @Column(name = "NAME") 
  protected String name; 

  @Column(name = "CONVERSION_TYPE") 
  protected String conversionType; 

  @Column(name = "M_INFO") 
  protected Double mInfo; 

  @Column(name = "B_INFO") 
  protected Double bInfo; 

  @Column(name = "VOLTAGE_DIVIDE") 
  protected String voltageDivide; 

  @Column(name = "SAMPLE_RANGE") 
  protected String sampleRange; 

  @Column(name = "SAMPLE_PERIOD") 
  protected Integer samplePeriod; 

  @Column(name = "STORE_ROW") 
  protected Boolean storeRow; 

  @Column(name = "STORE_CONVERTED") 
  protected Boolean storeConverted; 

  @Column(name = "DEFAULT_GRAPH") 
  protected String defaultGraph; 

  @Column(name = "TITLE") 
  protected String title; 

  @Column(name = "UNIT") 
  protected String unit; 

  @Column(name = "RANGE_LOWERBOUND") 
  protected Integer rangeLowerbound; 

  @Column(name = "RANGE_UPPERBOUND") 
  protected Integer rangeUpperbound; 

  @JsonBackReference 
  @OneToMany(mappedBy = "ioConfiguration") 
  protected List<Alert> alerts; 

  @JsonBackReference 
  @OneToMany(mappedBy = "ioConfiguration") 
  protected List<DataSeriesMeta> dataSeriesMeta; 

  @JsonBackReference 
  @OneToMany(mappedBy = "ioConfiguration") 
  protected List<NodeData> nodeData; 

  @Column(name = "CODE") 
  protected String code; 

  public IOConfiguration() {} 
  //...getters and setter 


Here is the code for "NODE_DATA" table:

Code:
@Entity 
@Indexed 
@IdClass(NodeDataPK.class) 
@Table(name = "NODE_DATA") 
public class NodeData implements Serializable { 

  private static final long serialVersionUID = -3411753713406246973L; 

  @Id 
  @FieldBridge(impl = ByteBridge.class) 
  @JoinColumn(name = "IO_CONFIGURATION_ID", referencedColumnName = "IO_CONFIGURATION_ID") 
  @ManyToOne 
  protected IOConfiguration ioConfiguration; 

  @Id 
  @Column(name = "TIME") 
  protected Long time; 

  @Column(name = "VALUE") 
  protected Double value; 

  public NodeData() {} 

  public NodeDataPK getNodeDataId() { 
    NodeDataPK nodeDataPK = new NodeDataPK(); 
    nodeDataPK.setTime(this.time); 
    nodeDataPK.setIoConfigurationId(this.ioConfiguration.getIoConfigurationId()); 
    return nodeDataPK; 
  } 

  public void setNodeDataId(NodeDataPK nodeDataPK) { 
    this.time = nodeDataPK.getTime(); 
    IOConfigurationDAO ioConfigurationDAO = new IOConfigurationDAO(); 
    ioConfigurationDAO.init(); 
    IOConfiguration ioConfiguration = 
        ioConfigurationDAO.findIOConfiguration(nodeDataPK.getIoConfigurationId()); 
    this.ioConfiguration = ioConfiguration; 
  } 



  /**
   * @return the ioConfiguration
   */ 
  public IOConfiguration getIoConfiguration() { 
    return ioConfiguration; 
  } 

  /**
   * @param ioConfiguration the ioConfiguration to set
   */ 
  public void setIoConfiguration(IOConfiguration ioConfiguration) { 
    this.ioConfiguration = ioConfiguration; 
  } 

  /**
   * @return the time
   */ 
  public Long getTime() { 
    return time; 
  } 

  /**
   * @param time the time to set
   */ 
  public void setTime(Long time) { 
    this.time = time; 
  } 

  /**
   * @return the value
   */ 
  public double getValue() { 
    return value; 
  } 

  /**
   * @param value the value to set
   */ 
  public void setValue(double value) { 
    this.value = value; 
  } 

  /**
   * @return the serialversionuid
   */ 
  public static long getSerialversionuid() { 
    return serialVersionUID; 
  } 


Here is the composite primary key for NodeData entity:

public class NodeDataPK implements Serializable {

Code:
/**
   * 
   */ 
  private static final long serialVersionUID = -3239860594324151192L; 

  // @Column(name = "IO_CONFIGURATION") 
  protected String ioConfiguration; 

  // @Column(name = "TIME") 
  protected Long time; 

  public NodeDataPK() {} 

  public NodeDataPK(String ioConfigId, Long time) { 
    this.ioConfiguration = ioConfigId; 
    this.time = time; 
  } 

  /**
   * @return the channelName
   */ 
  public String getIoConfigurationId() { 
    return ioConfiguration; 
  } 

  /**
   * @param channelName the channelName to set
   */ 
  public void setIoConfigurationId(String ioConfigurationId) { 
    this.ioConfiguration = ioConfigurationId; 
  } 

  /**
   * @return the time
   */ 
  public Long getTime() { 
    return time; 
  } 

  /**
   * @param time the time to set
   */ 
  public void setTime(Long time) { 
    this.time = time; 
  } 

  @Override 
  public int hashCode() { 
    return ioConfiguration.hashCode() + time.hashCode(); 
  } 

  @Override 
  public boolean equals(Object o) { 
    if (o == null) { 
      return false; 
    } 
    if (!(o instanceof NodeDataPK)) { 
      return false; 
    } 
    NodeDataPK nodeDataPK = (NodeDataPK) o; 
    if (((NodeDataPK) o).getIoConfigurationId() != nodeDataPK.getIoConfigurationId() 
        && ((NodeDataPK) o).getTime() != nodeDataPK.getTime()) { 
      return false; 
    } 

    return true; 
  } 


And here is the ByteBridge I copied:

public class ByteBridge extends NumberBridge implements Serializable {
Code:
@Override 
  public Object stringToObject(String stringValue) { 
    if (StringHelper.isEmpty(stringValue)) 
      return null; 
    return Byte.valueOf(stringValue); 
  } 


I don't know what is going on, and there is little message about this error when I google it. If you need for information, I am willing to share. Someone help me please.

Thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.