This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes jboss-ejb-Stateless? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "jboss-ejb-Stateless?" Watch "jboss-ejb-Stateless?" New topic
Author

jboss-ejb-Stateless?

Mimi Tam
Ranch Hand

Joined: Mar 05, 2010
Posts: 121
I did a Hibernate Code Generation and got 2 files for each POJO: <POJO>.java and <POJO>Home.java

In my <POJO>Home.java (below), javax.ejb.Stateless is missing and hence @Stateless cannot be resolved to a type.



What is this <POJO>Home.java file? Do I need it and where can I get "javax.ejb.Stateless"?

I am using MySQL.

Many Thanks....
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

I am confused. Are you saying Hibernate generated or tried to generate EJBs? They are not the same, I don't think Hibernate would create any EJBs, it would create Domain object and mappings.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Mimi Tam
Ranch Hand

Joined: Mar 05, 2010
Posts: 121
This POJO class was generated by Hibernate at "code generation" time. The auto-generated code has this import statement "javax.ejb.Stateless" and I got "this import cannot be resolved", therefore I believe "@Stateless" cannot be resolved to a type. I could not dig up a file with "javax.elb.Stateless" to add to the file.

I got a compile error in business.java on this line: "public class Businesses implements java.io.Serializable"

Multiple markers at this line
- The serializable class Businesses does not declare a static final serialVersionUID field of
type long
- The public type Businesses must be defined in its own file
- The type Businesses is already defined

and on @Stateless - cannot be resolved to a type


Here's my 2 auto-generated file after Hibernate Code Generation:




Note: sorry for the confusion. I use the class name <book> in my previous postings but it is interchangeable with <business> e.g. book.java is business.java.

Hope I am making some sense.

Many Thanks.
Mimi Tam
Ranch Hand

Joined: Mar 05, 2010
Posts: 121
The 2 compile errors listed RED above are gone after I cleared Tomcat's work directories, the project directories and restarted Eclipse.

Good Grief... I cleared both before many times but did not restart Eclipse. It seems like Eclipse was not registering the changes....unless it restarts.

I am still not entering ModelAndView handleRequest() where I actually get the client's HTTP message and process it before rendering it to the View
 
 
subject: jboss-ejb-Stateless?
 
Similar Threads
Error - ; expected
Can't deploy EJB jar to Glassfish
javax.naming.NameNotFoundException: VBBean not bound
EJB 3.0 Entity Bean
fail: was 6.1 web app update ejb3 mysql