[jboss-user] [EJB 3.0] - NOTYETINSTALLED state

Davide80 do-not-reply at jboss.com
Tue Aug 7 10:00:28 EDT 2007


Hello, i've problems with an helloworld-like project.

I use netbeans 5.5 with Jboss 4_0_4 and EJB3 extentions.

When I try to deploy my ear, I receve this log from Jboss and naturally nothings work:

15:30:03,693 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

--- MBeans waiting for other MBeans ---
ObjectName: persistence.units:ear=EnterpriseApplication1.ear,jar=EnterpriseApplication1-ejb.jar,unitName=EnterpriseApplication1-ejbPU
  State: NOTYETINSTALLED
  I Depend On:
    jboss.jca:name=EnterpriseApplication1/Datasource,service=ManagedConnectionFactory
  Depends On Me:
    jboss.j2ee:ear=EnterpriseApplication1.ear,jar=EnterpriseApplication1-ejb.jar,name=NewSessionBean,service=EJB3

ObjectName: jboss.j2ee:ear=EnterpriseApplication1.ear,jar=EnterpriseApplication1-ejb.jar,name=NewSessionBean,service=EJB3
  State: NOTYETINSTALLED
  I Depend On:
    persistence.units:ear=EnterpriseApplication1.ear,jar=EnterpriseApplication1-ejb.jar,unitName=EnterpriseApplication1-ejbPU

--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.jca:name=EnterpriseApplication1/Datasource,service=ManagedConnectionFactory
  State: NOTYETINSTALLED
  Depends On Me:
    persistence.units:ear=EnterpriseApplication1.ear,jar=EnterpriseApplication1-ejb.jar,unitName=EnterpriseApplication1-ejbPU



This log doesn't give any clue and i don't know what to do.

this is may source:
an Entitybean:

/*
  |  * NewEntityBean.java
  |  *
  |  * Created on 7 agosto 2007, 14.30
  |  *
  |  * To change this template, choose Tools | Template Manager
  |  * and open the template in the editor.
  |  */
  | 
  | package myEJBs;
  | 
  | import java.io.Serializable;
  | import javax.persistence.Entity;
  | import javax.persistence.GeneratedValue;
  | import javax.persistence.GenerationType;
  | import javax.persistence.Id;
  | 
  | /**
  |  * Entity class NewEntityBean
  |  * 
  |  * @author IG17540
  |  */
  | @Entity
  | public class NewEntityBean implements Serializable {
  | 
  |     @Id
  |     @GeneratedValue(strategy = GenerationType.AUTO)
  |     private Long id;
  |     
  |     /** Creates a new instance of NewEntityBean */
  |     public NewEntityBean() {
  |     }
  | 
  |     /**
  |      * Gets the id of this NewEntityBean.
  |      * @return the id
  |      */
  |     public Long getId() {
  |         return this.id;
  |     }
  | 
  |     /**
  |      * Sets the id of this NewEntityBean to the specified value.
  |      * @param id the new id
  |      */
  |     public void setId(Long id) {
  |         this.id = id;
  |     }
  | 
  |     /**
  |      * Returns a hash code value for the object.  This implementation computes 
  |      * a hash code value based on the id fields in this object.
  |      * @return a hash code value for this object.
  |      */
  |     @Override
  |     public int hashCode() {
  |         int hash = 0;
  |         hash += (this.id != null ? this.id.hashCode() : 0);
  |         return hash;
  |     }
  | 
  |     /**
  |      * Determines whether another object is equal to this NewEntityBean.  The result is 
  |      * <code>true</code> if and only if the argument is not null and is a NewEntityBean object that 
  |      * has the same id field values as this object.
  |      * @param object the reference object with which to compare
  |      * @return <code>true</code> if this object is the same as the argument;
  |      * <code>false</code> otherwise.
  |      */
  |     @Override
  |     public boolean equals(Object object) {
  |         // TODO: Warning - this method won't work in the case the id fields are not set
  |         if (!(object instanceof NewEntityBean)) {
  |             return false;
  |         }
  |         NewEntityBean other = (NewEntityBean)object;
  |         if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) return false;
  |         return true;
  |     }
  | 
  |     /**
  |      * Returns a string representation of the object.  This implementation constructs 
  |      * that representation based on the id fields.
  |      * @return a string representation of the object.
  |      */
  |     @Override
  |     public String toString() {
  |         return "myEJBs.NewEntityBean[id=" + id + "]";
  |     }
  |     
  | }
  | 
  | a stateless session bean:
  | /*
  |  * NewSessionBean.java
  |  *
  |  * Created on 7 agosto 2007, 14.31
  |  *
  |  * To change this template, choose Tools | Template Manager
  |  * and open the template in the editor.
  |  */
  | 
  | package myEJBs;
  | 
  | import javax.ejb.Stateless;
  | import javax.persistence.EntityManager;
  | import javax.persistence.PersistenceContext;
  | 
  | /**
  |  *
  |  * @author IG17540
  |  */
  | @Stateless
  | public class NewSessionBean implements NewSessionRemote, NewSessionLocal {
  | 
  |     @PersistenceContext
  |     private EntityManager em;
  |     
  |     /** Creates a new instance of NewSessionBean */
  |     public NewSessionBean() {
  |     }
  | 
  |     public Integer calcola(Integer a) {
  |         //TODO implement calcola
  |         return null;
  |     }
  | 
  |     public void persist() {
  |         NewEntityBean eb = new NewEntityBean();
  |         em.persist(eb);
  |     }
  |  
  | }
  | 
  | 
  | 
  | a jsp page:
  | <% 
  |         InitialContext ctx = new InitialContext();
  |         NewSessionLocal eb = (NewSessionLocal) ctx.lookup("EnterpriseApplication1/NewSessionBean/local");
  |         out.write(eb.calcola(new Integer(4)).toString());
  |         
  |         
  |         eb.persist();
  |     %> 
  | 
the persistence.xml:
<?xml version="1.0"...
  | <persistence version............
  | <jta-data-source>EnterpriseApplication1/Datasource</jta-data-source>
  | <exclude-unlisted-classes>false</exclude-unlisted-classes>
  | <properties>
  | <property name="hibernate.hbm2ddl.auto" value="update"/>
  | </properties>
  | </persistence-unit>
  | </persistence>

jboss-ds.xml:
<?xml version="1.0" encoding="UTF-8"?>
  | <datasources>
  |   <local-tx-datasource>
  |     <jndi-name>Datasource</jndi-name>
  |     <connection-url>jdbc:odbc:CRTSIG4</connection-url>
  |     <driver-class>sun.jdbc.odbc.JdbcOdbcDriver</driver-class>
  |     <user-name>pwrline</user-name>
  |     <password>pwrline</password>
  |     <min-pool-size>5</min-pool-size>
  |     <max-pool-size>20</max-pool-size>
  |     <idle-timeout-minutes>5</idle-timeout-minutes>
  |   </local-tx-datasource>
  |  </datasources>

I tried changing the JNDI name format, the data source driver, the version of jboss, the OS (both linux and windows) and this seems the best version(!), however nothings works...

Help me, please.. :-(
David

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071614#4071614

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071614



More information about the jboss-user mailing list