• Post Reply Bookmark Topic Watch Topic
  • New Topic

jboss-ejb-Stateless?

 
Mimi Tam
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Mimi Tam
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!