Solved

return type of ItemBean() Constructor

Posted on 2004-09-15
4
160 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupSum6 challenge 6 77
Java. Convert method from recursion based to iteration based ( loop based ) 6 76
bitbucket vs gitbucket 3 57
Java Options in Zimbra Server 2 46
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

896 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now