Solved

Cannot create an instance of the abstract class or interface

Posted on 2006-06-16
3
307 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 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

16 Experts available now in Live!

Get 1:1 Help Now