The error happens when I attempt to persist the data to the database.
[code]
public Asset addAsset(Asset assetVO) {
/*
* This may not be needed, but it is a start on how to add.
*/
EntityManager em = getEntityManager();
em.joinTransaction();
/*
* We don't need the factory unless we are looking for objects.
*/
//AddressEAO addressEAO = EAOFactory.JPA.getAddressEAO();
Asset asset2= new Asset();
asset2.setAssetArtifact(assetVO.getAssetArtifact());
asset2.setAssetImage(assetVO.getAssetImage());
asset2.setAssetMaintenanceHistories(assetVO.getAssetMaintenanceHistories());
asset2.setAssetOrigDate(assetVO.getAssetOrigDate());
asset2.setAssetType(assetVO.getAssetType());
asset2.setCageCode(assetVO.getCageCode());
asset2.setConsumables(assetVO.getConsumables());
asset2.setDateDecommissioned(assetVO.getDateDecommissioned());
asset2.setDatePlacedInService(assetVO.getDatePlacedInService());
asset2.setGovFurnishEquipAssetId(assetVO.getGovFurnishEquipAssetId());
asset2.setItemPart(assetVO.getItemPart());
asset2.setManufacturer(assetVO.getManufacturer());
asset2.setModel(assetVO.getModel());
asset2.setNsn(assetVO.getNsn());
asset2.setPemaAsset(assetVO.getPemaAsset());
asset2.setProdModelName(assetVO.getProdModelName());
asset2.setProductDo(assetVO.getProductDo());
asset2.setSerialNbr(assetVO.getSerialNbr());
asset2.setServerAsset(assetVO.getServerAsset());
asset2.setTradingPartner(assetVO.getTradingPartner());
asset2.setWarranties(assetVO.getWarranties());
-------->>>>>> em.persist(asset2);
return asset2;
}//end method
[/code]
[Message sent by forum member 'russ205' (russ205)]
http://forums.java.net/jive/thread.jspa?messageID=260298