Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » java.lang.ExceptionInInitializerError problem
java.lang.ExceptionInInitializerError problem [message #391238] Fri, 18 February 2005 13:20 Go to next message
Gabriela Mising name is currently offline Gabriela Mising nameFriend
Messages: 13
Registered: July 2009
Junior Member
Hi all,
I am migrating to eclipse 3 and I have the following exception when it
is trying to instanciate the model

Unhandled event loop exception
Reason:
java.lang.ExceptionInInitializerError

The exception is raised when it is trying to execute this line

CommonRootModel commonRootModel = modelFty.createCommonRootModel();

the method createCommonRootModel is EMF generated
public CommonRootModel createCommonRootModel() {
CommonRootModelImpl commonRootModel = new CommonRootModelImpl();
return commonRootModel;
}

To do this, the program should initialize the static fields. In
CommonRootModelImpl there is a static field PROPERTIES_EDEFAULT, EMF
generated.

protected static final Hashtable PROPERTIES_EDEFAULT =
(Hashtable)DatatypeFactory.eINSTANCE.createFromString(Dataty pePackage.eINSTANCE.getJavaHashtable(),
"new java.util.Hashtable()");

This field is never initialized, and here the exception is raised.

I will appreciate any idea to find the problem... :)

Gaby
Re: java.lang.ExceptionInInitializerError problem [message #391240 is a reply to message #391238] Fri, 18 February 2005 13:43 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010104080508020801030409
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Gaby,

It sounds like your model (Rose?) has something like this in it:

JavaHashTable x = new java.util.Hashtable()

This is not supported. The thing after the "=" has to be the
convertToString version of an empty hashtable. I.e., I would expect
something like this in your model:

JavaHashTable x = ""

And I would expect that your JavaHashtable's createFromString method
would create an empty hash map given an empty string.

Note that having a mutable default value sounds potentially kind of bad...


Gaby Perez wrote:

> Hi all, I am migrating to eclipse 3 and I have the following
> exception when it is trying to instanciate the model
>
> Unhandled event loop exception
> Reason:
> java.lang.ExceptionInInitializerError
>
> The exception is raised when it is trying to execute this line
>
> CommonRootModel commonRootModel = modelFty.createCommonRootModel();
>
> the method createCommonRootModel is EMF generated
> public CommonRootModel createCommonRootModel() {
> CommonRootModelImpl commonRootModel = new CommonRootModelImpl();
> return commonRootModel;
> }
>
> To do this, the program should initialize the static fields. In
> CommonRootModelImpl there is a static field PROPERTIES_EDEFAULT, EMF
> generated.
>
> protected static final Hashtable PROPERTIES_EDEFAULT =
> (Hashtable)DatatypeFactory.eINSTANCE.createFromString(Dataty pePackage.eINSTANCE.getJavaHashtable(),
> "new java.util.Hashtable()");
>
> This field is never initialized, and here the exception is raised.
>
> I will appreciate any idea to find the problem... :)
>
> Gaby
>
>


--------------010104080508020801030409
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Gaby,<br>
<br>
It sounds like your model (Rose?) has something like this in it:<br>
<blockquote>JavaHashTable x = new java.util.Hashtable()<br>
</blockquote>
This is not supported.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Using equals() instead of "==" in Resource
Next Topic:[Newbie] Need advises to clarify my mind
Goto Forum:
  


Current Time: Thu Apr 25 09:08:23 GMT 2024

Powered by FUDForum. Page generated in 0.03414 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top