Solved

return type of ItemBean() Constructor

Posted on 2004-09-15
4
161 Views
Last Modified: 2013-11-24
Hi,

I am working on the TUSC tutorial
"Tutorial for building J2EE Applications using JBOSS and ECLIPSE "

In chapter 6 I am trying to generate an CMP EJB, but after Creation using the Lomboz EJB Creation Wizard if got an error because of the return type of my ItemBean Constructor:


   public ItemBean() throws javax.ejb.CreateException {
        return null;
    }

Of course this can´t work because void can´t return something. But other classes are depending on this ItemBean class and I can´t just take away the return statement.
I also couldn´t find any information about the correct use of this Constructor.

Any suggestions?

Thx, Stefan
0
Comment
Question by:Scotchman
  • 2
4 Comments
 
LVL 6

Expert Comment

by:expertmb
ID: 12065259
>> ItemBean Constructor:
constructor's doesnot have return type.
0
 
LVL 6

Accepted Solution

by:
expertmb earned 50 total points
ID: 12065283
remove/comment the below statement and then compile
   public ItemBean() throws javax.ejb.CreateException {
      //   return null;
    }
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
custom annotations 9 39
fibonacci ten numbers 4 39
type mismatch (Object[] to double[] 4 24
Is Applet the way to go for my drag and drop system? 8 16
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question