Quantcast
Channel: SCN : Unanswered Discussions - SAP NetWeaver Technology Platform
Viewing all articles
Browse latest Browse all 1093

JEE5 Applications Development

$
0
0

While persisting (Transaction) the state of entity in custom JEE5 Application error appears: The class >>******<< is not a valid entity. The application is is based on EJB Java Dictionary Entity for backend, Stateless session Beans for middle tier along with JSF / ManagedBean / JSP front end. Code used to persist the entity is as follows:

 

 

 

private String Error1;


@PersistenceContext

  EntityManager em;

 

@Resource

private UserTransaction utx;

 

public String Save() throws Exception{

 

  try

  {

 

  utx.begin();

  Audits ad  = new Audits();

  ad.setDept("HR");

  ad.setRemarks("Remarks");

  ad.setPurpose("Purpose");

  ad.setAuditno(11);

  ad.setCostcenter(172);

  ad.setPhase(3);

 

  em.persist(ad);

  utx.commit();

 

  return "saved";

  }

  catch (Exception ex) {

  Error1=ex.getMessage();

  

  return "error";

 

  }


Viewing all articles
Browse latest Browse all 1093

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>