jQuery in Action, 3rd edition
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 Java Interview Guide this week in the Jobs Discussion forum!
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>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

Joined: Feb 05, 2001
Posts: 17276

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 - iOS Apps
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
I agree. Here's the link: http://aspose.com/file-tools
subject: jboss-ejb-Stateless?
It's not a secret anymore!