0 Replies Latest reply on Oct 19, 2006 6:51 PM by Chris Novak

    Netbeans 5.5RC2 + JBoss 4.0.4 + Hibernate ...big problem :(

    Chris Novak Newbie

      Hello everyone!

      I am a new in EJB3. I started learning with this link:

      http://www.netbeans.org/kb/55/ejb30-jboss.html

      I changed ma database on MySQL 4.1 and everything went ok to the moment when I added a new Session Bean for Entity Classes:

      public List find_new() {
       return em.createQuery("select object(o) from Access as o where o.loginID=:a")
       .setParameter("a","1234567")
       .getResultList();
      
       }


      I also added a line in the servlet:

      list=af.find_new();


      Then the JBoss server displayed this information:

      java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
      org.jboss.ejb3.EJBContainer.construct(EJBContainer.java:471)
      org.jboss.ejb3.AbstractPool.create(AbstractPool.java:62)
      org.jboss.ejb3.ThreadlocalPool.get(ThreadlocalPool.java:48)
      org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:54)
      org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
      org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
      org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
      org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:181)
      org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
      $Proxy191.findAll(Unknown Source)
      web.test.processRequest(test.java:38)
      web.test.doGet(test.java:59)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      I don't know what this info is about?

      My persistence.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
       <persistence-unit name="gogo2-ejbPU" transaction-type="JTA">
       <provider>org.hibernate.ejb.HibernatePersistence</provider>
       <jta-data-source>java:/bankingDS</jta-data-source>
       <class>ejb.Access</class>
       <class>ejb.Customer</class>
       <class>ejb.IdType</class>
       <properties>
       <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306//banking"/>
       <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
       <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
       <property name="hibernate.hbm2ddl.auto" value="update"/>
       </properties>
       </persistence-unit>
      </persistence>


      What's wrong, what did I miss, did I forget to add some libraries, please help.
      Thanks in advance.