Solved

Cannot create an instance of the abstract class or interface

Posted on 2006-06-16
3
318 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: 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

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.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

734 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