File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "jboss-ejb-Stateless?" Watch "jboss-ejb-Stateless?" New topic


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>

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

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

I am using MySQL.

Many Thanks....
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17260

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.


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 on this line: "public class Businesses implements"

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. is

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
I agree. Here's the link:
subject: jboss-ejb-Stateless?