Solved

Cannot create an instance of the abstract class or interface

Posted on 2006-06-16
3
316 Views
Last Modified: 2010-04-16
I converted a java ejb module to .NET and worked out all the errors except 1.  The error message says "Cannot create an instance of the abstract class or interface [name of class]. Could someone suggest some reasons why this would be happening?
0
Comment
Question by:adonavon
  • 2
3 Comments
 
LVL 25

Accepted Solution

by:
dstanley9 earned 500 total points
ID: 16920186
Is it a class or an interface?  You cannot instantiate abstract classes or interfaces directly.  For interfaces, you need to create a class that implements that interface, and for an abstract class you need to create a class that inherits from the abstract class.
0
 
LVL 25

Assisted Solution

by:dstanley9
dstanley9 earned 500 total points
ID: 16920192
Also, can you post the Java class declaration and the C# class declaration?  Maybe something got lost in the translation.
0
 

Author Comment

by:adonavon
ID: 16920595
Turns out it was none of the things you suggested.  The problem was that I couldn't use an abstract class in my situation.  Thanks for your assistance though.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

680 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