Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Today's Messages (on)  | Unanswered Messages (off)

Forum: EMF
 Topic: java.lang.ExceptionInInitializerError
Re: java.lang.ExceptionInInitializerError [message #1404230 is a reply to message #1404174] Wed, 30 July 2014 10:51
Ed Merks is currently offline Ed Merks
Messages: 25945
Registered: July 2009
Senior Member
Raj,

This doesn't appear to be an EMF question and you ought not to expect
much help from just a stack trace.

On 30/07/2014 3:25 PM, raj kumar wrote:
> I am facing the following errors.so please say how to rectify my errors
> Exception in thread "AWT-EventQueue-0"
> java.lang.ExceptionInInitializerError
> at org.eclipse.jdt.core.JavaCore.getOptions(JavaCore.java:2400)
> at
> org.eclipse.jdt.core.dom.ASTParser.initializeDefaults(ASTParser.java:222)
> at org.eclipse.jdt.core.dom.ASTParser.<init>(ASTParser.java:204)
> at org.eclipse.jdt.core.dom.ASTParser.newParser(ASTParser.java:109)
> at Main.DesignAnalyzer.parse(DesignAnalyzer.java:70)
> at Main.DesignAnalyzer.main(DesignAnalyzer.java:165)
> at GUI.MainTabbedPane.<init>(MainTabbedPane.java:41)
> at
> GUI.MainGUI$refactorButtonListener.actionPerformed(MainGUI.java:208)
> at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
> at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
> at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
> at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
> at
> javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
> at java.awt.Component.processMouseEvent(Unknown Source)
> at javax.swing.JComponent.processMouseEvent(Unknown Source)
> at java.awt.Component.processEvent(Unknown Source)
> at java.awt.Container.processEvent(Unknown Source)
> at java.awt.Component.dispatchEventImpl(Unknown Source)
> at java.awt.Container.dispatchEventImpl(Unknown Source)
> at java.awt.Component.dispatchEvent(Unknown Source)
> at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
> at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
> at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
> at java.awt.Container.dispatchEventImpl(Unknown Source)
> at java.awt.Window.dispatchEventImpl(Unknown Source)
> at java.awt.Component.dispatchEvent(Unknown Source)
> at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
> at java.awt.EventQueue.access$200(Unknown Source)
> at java.awt.EventQueue$3.run(Unknown Source)
> at java.awt.EventQueue$3.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
> at
> java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
> at java.awt.EventQueue$4.run(Unknown Source)
> at java.awt.EventQueue$4.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
> at java.awt.EventQueue.dispatchEvent(Unknown Source)
> at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown
> Source)
> at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
> at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
> Source)
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> at java.awt.EventDispatchThread.run(Unknown Source)
> Caused by: java.lang.NullPointerException
> at
> org.eclipse.jdt.internal.core.search.indexing.IndexManager.getJavaPluginWorkingLocation(IndexManager.java:283)
> at
> org.eclipse.jdt.internal.core.search.indexing.IndexManager.<init>(IndexManager.java:50)
> at
> org.eclipse.jdt.internal.core.JavaModelManager.<init>(JavaModelManager.java:671)
> at
> org.eclipse.jdt.internal.core.JavaModelManager.<clinit>(JavaModelManager.java:649)
> ... 44 more
>
 Topic: [EMF] long loading time
Re: [EMF] long loading time [message #1404173 is a reply to message #1404114] Wed, 30 July 2014 04:54
Remi ADAM is currently online Remi ADAM
Messages: 8
Registered: July 2014
Junior Member
Ed,

Below is the TOP.architecture view.
index.php/fa/18698/0/
I have created one node for each controlled resouce. DIAG_virtual allows to load DIAG.architecture.
The text view of TOP.archi looks like that:
<?xml version="1.0" encoding="UTF-8"?>
<architecture:Root xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://architecture/1.0" xmi:id="_gX9ugGcAEeOnxpO1IkhpXA">
  <modules href="file:/D:/WORKSPACE/ws_ARCHI_MODEL/zzDEBUG/zzDIAG.architecture#_zFWIIRcfEeSvR-VX0bDXYw"/>
  <modules href="file:/D:/WORKSPACE/ws_ARCHI_MODEL/zzDEBUG/zzCDD.architecture#_gfBpEBcmEeSvR-VX0bDXYw"/>
  <modules href="file:/D:/WORKSPACE/ws_ARCHI_MODEL/zzDEBUG/zzCORE.architecture#_jvCoUBcmEeSvR-VX0bDXYw"/>
</architecture:Root>

Is it ok ?
(on the DIAG view, we can see that DIAG_virtual has been automatically added in // of Root.
index.php/fa/18699/0/)

Now, I had a script running on the former TOP.archi. It uses the following command to list all Modules (in my example, DEM and DET are modules).
List<EObject> referenceList = ModelUtil.getInstancesOfType(root, ArchitecturePackage.eINSTANCE.getwModule(), true);

With this new TOP.archi, DEM and DET are not seen by this command. So I have to find another solution to parse the TOP.archi.

Remi
Re: [EMF] long loading time [message #1404187 is a reply to message #1404173] Wed, 30 July 2014 06:02
Ed Merks is currently offline Ed Merks
Messages: 25945
Registered: July 2009
Senior Member
Remi,

Comments below.

On 30/07/2014 10:54 AM, Remi ADAM wrote:
> Ed,
>
> Below is the TOP.architecture view.
>
> I have created one node for each controlled resouce. DIAG_virtual allows to load DIAG.architecture.
> The text view of TOP.archi looks like that:
> <?xml version="1.0" encoding="UTF-8"?>
> <architecture:Root xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://architecture/1.0" xmi:id="_gX9ugGcAEeOnxpO1IkhpXA">
> <modules href="file:/D:/WORKSPACE/ws_ARCHI_MODEL/zzDEBUG/zzDIAG.architecture#_zFWIIRcfEeSvR-VX0bDXYw"/>
> <modules href="file:/D:/WORKSPACE/ws_ARCHI_MODEL/zzDEBUG/zzCDD.architecture#_gfBpEBcmEeSvR-VX0bDXYw"/>
> <modules href="file:/D:/WORKSPACE/ws_ARCHI_MODEL/zzDEBUG/zzCORE.architecture#_jvCoUBcmEeSvR-VX0bDXYw"/>
> </architecture:Root>
> Is it ok ?
Yes, so there's a single root object and it cross-resource contains
three other objects.
> (on the DIAG view, we can see that DIAG_virtual has been automatically added in // of Root.
> )
So you're using GMF and it's storing the diagram and the model in the
same resource. It would seem maybe better to store the diagram in a
separate resource. There's some way to configure that, but I'm not so
familiar with GMF's details.
>
> Now, I had a script running on the former TOP.archi. It uses the following command to list all Modules (in my example, DEM and DET are modules).
> List<EObject> referenceList = ModelUtil.getInstancesOfType(root, ArchitecturePackage.eINSTANCE.getwModule(), true);
Unless your model is very big, there's probably a
ArchitecturePackage.Literals.WMODULE constant that's slightly more
efficient than the method call...
>
> With this new TOP.archi, DEM and DET are not seen by this command. So I have to find another solution to parse the TOP.archi.
I don't really follow, but I don't really need to. :-P
>
> Remi
Re: [EMF] long loading time [message #1404218 is a reply to message #1404187] Wed, 30 July 2014 10:03
Remi ADAM is currently online Remi ADAM
Messages: 8
Registered: July 2014
Junior Member
Ed,

I don't use GMF, so I don't know why diagram and model are in the same resource, but having this new node at the same level as Root is not disturbing.

On the Top.archi, when I right clic on Root, I can launch a command to parse the model.
Before having the cross reference implemented, the top.archi looked like this:
<?xml version="1.0" encoding="UTF-8"?>
<architecture:Root xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://architecture/1.0" xmi:id="_gX9ugGcAEeOnxpO1IkhpXA">
    <modules xmi:id="_61IaoAwkEeSEiMOfc07hWQ" shortName="CDD" longName="CDD Stack">
      <moduleChildren xmi:id="_61IaoQwkEeSEiMOfc07hWQ" shortName="BOSS" longName="Bulb Optimized Smart Switch"/>
      <moduleChildren xmi:id="_61JrFQwkEeSEiMOfc07hWQ" shortName="SBC" longName="SBC Driver"/>
    </modules>
    <modules xmi:id="_lhQX4AwlEeSEiMOfc07hWQ" shortName="CORE" longName="CORE Stack">
      <moduleChildren xmi:id="_lhRAsAwlEeSEiMOfc07hWQ" shortName="EVTMAN" longName="Event Manager"/>
      <moduleChildren xmi:id="_lhRmwAwlEeSEiMOfc07hWQ" shortName="EVTMAN_FG2" longName="Event Manager FG2"/>
    </modules>
    <modules xmi:id="_mD38wAwlEeSEiMOfc07hWQ" shortName="DIAG" longName="DIAG Stack">
      <moduleChildren xmi:id="_mD38wQwlEeSEiMOfc07hWQ" shortName="DET" longName="Development Error Tracer"/>
      <moduleChildren xmi:id="_mD4kCAwlEeSEiMOfc07hWQ" shortName="DEM" longName="Diagnostic Event Manager"/>
    </modules>
</architecture:Root>


I was able to output module list : CDD, BOSS, SBC, CORE, EVTMAN, EVTMAN_FG2, DIAG, DET, DEM by using the code:
Root root = (Root) strSelect.getFirstElement();
List<EObject> referenceList = ModelUtil.getInstancesOfType(root, ArchitecturePackage.Literals.MODULE, true);


Now the Top.archi look like this :
<?xml version="1.0" encoding="UTF-8"?>
<architecture:Root xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://architecture/1.0" xmi:id="_gX9ugGcAEeOnxpO1IkhpXA">
  <modules href="file:/D:/WORKSPACE/ws_ARCHI_MODEL/zzDEBUG/zzCDD.architecture#_-VZgABfjEeSjCfp3BWJx-Q"/>
  <modules href="file:/D:/WORKSPACE/ws_ARCHI_MODEL/zzDEBUG/zzCORE.architecture#_Rv_3gBfkEeSjCfp3BWJx-Q"/>
  <modules href="file:/D:/WORKSPACE/ws_ARCHI_MODEL/zzDEBUG/zzDIAG.architecture#_rfFvEBfoEeSjCfp3BWJx-Q"/>
</architecture:Root>

With this, no module is seen, that is why I say I have to find another way to parse de Top.archi.

Do I have to load the 3 href with a specific command?
Or do I have to use another command to parse the referenced .architecture?

Thanks,
Remi

Re: [EMF] long loading time [message #1404229 is a reply to message #1404218] Wed, 30 July 2014 10:50
Ed Merks is currently offline Ed Merks
Messages: 25945
Registered: July 2009
Senior Member
Remi,

Comments below.

On 30/07/2014 4:03 PM, Remi ADAM wrote:
> Ed,
>
> I don't use GMF, so I don't know why diagram and model are in the same
> resource, but having this new node at the same level as Root is not
> disturbing.
I just don't follow the terminology of DIAG....
>
> On the Top.archi, when I right clic on Root, I can launch a command to
> parse the model.
> Before having the cross reference implemented, the top.archi looked
> like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <architecture:Root xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:architecture="http://architecture/1.0"
> xmi:id="_gX9ugGcAEeOnxpO1IkhpXA">
> <modules xmi:id="_61IaoAwkEeSEiMOfc07hWQ" shortName="CDD"
> longName="CDD Stack">
> <moduleChildren xmi:id="_61IaoQwkEeSEiMOfc07hWQ" shortName="BOSS"
> longName="Bulb Optimized Smart Switch"/>
> <moduleChildren xmi:id="_61JrFQwkEeSEiMOfc07hWQ" shortName="SBC"
> longName="SBC Driver"/>
> </modules>
> <modules xmi:id="_lhQX4AwlEeSEiMOfc07hWQ" shortName="CORE"
> longName="CORE Stack">
> <moduleChildren xmi:id="_lhRAsAwlEeSEiMOfc07hWQ"
> shortName="EVTMAN" longName="Event Manager"/>
> <moduleChildren xmi:id="_lhRmwAwlEeSEiMOfc07hWQ"
> shortName="EVTMAN_FG2" longName="Event Manager FG2"/>
> </modules>
> <modules xmi:id="_mD38wAwlEeSEiMOfc07hWQ" shortName="DIAG"
> longName="DIAG Stack">
> <moduleChildren xmi:id="_mD38wQwlEeSEiMOfc07hWQ" shortName="DET"
> longName="Development Error Tracer"/>
> <moduleChildren xmi:id="_mD4kCAwlEeSEiMOfc07hWQ" shortName="DEM"
> longName="Diagnostic Event Manager"/>
> </modules>
> </architecture:Root>
>
>
> I was able to output module list : CDD, BOSS, SBC, CORE, EVTMAN,
> EVTMAN_FG2, DIAG, DET, DEM by using the code:
>
> Root root = (Root) strSelect.getFirstElement();
> List<EObject> referenceList = ModelUtil.getInstancesOfType(root,
> ArchitecturePackage.Literals.MODULE, true);
>
>
> Now the Top.archi look like this :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <architecture:Root xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:architecture="http://architecture/1.0"
> xmi:id="_gX9ugGcAEeOnxpO1IkhpXA">
> <modules
> href="file:/D:/WORKSPACE/ws_ARCHI_MODEL/zzDEBUG/zzCDD.architecture#_-VZgABfjEeSjCfp3BWJx-Q"/>
> <modules
> href="file:/D:/WORKSPACE/ws_ARCHI_MODEL/zzDEBUG/zzCORE.architecture#_Rv_3gBfkEeSjCfp3BWJx-Q"/>
> <modules
> href="file:/D:/WORKSPACE/ws_ARCHI_MODEL/zzDEBUG/zzDIAG.architecture#_rfFvEBfoEeSjCfp3BWJx-Q"/>
> </architecture:Root>
>
> With this, no module is seen, that is why I say I have to find another
> way to parse de Top.archi.
They're children of root. I.e., root.getModules() will visit them.
>
> Do I have to load the 3 href with a specific command?
No, that will be done automatically when you iterate over getModules().
> Or do I have to use another command to parse the referenced
> .architecture?
No.
>
> Thanks,
> Remi
>
>
Re: [EMF] long loading time [message #1404236 is a reply to message #1404229] Wed, 30 July 2014 11:18
Remi ADAM is currently online Remi ADAM
Messages: 8
Registered: July 2014
Junior Member
DIAG is for Diagnosys, that the name of a module container. No link with Diagram.

You are right, when I say "no module is seen", I wanted to say "none of the expected module is seen".
The output of the root.getModules() is
[architecture.impl.BswModuleImpl@18144fa (locked: false, shortName: CDD_link, longName: null, description: , createdFromGateway: false) (autosarModuleId: 0, gatewayTypes: null, gatewayTypesChangeReason: null), architecture.impl.BswModuleImpl@1ece4b (locked: false, shortName: CORE_link, longName: null, description: , createdFromGateway: false) (autosarModuleId: 0, gatewayTypes: null, gatewayTypesChangeReason: null), architecture.impl.BswModuleImpl@9ca3e0 (locked: false, shortName: DIAG_link, longName: null, description: , createdFromGateway: false) (autosarModuleId: 0, gatewayTypes: null, gatewayTypesChangeReason: null)]

But I can not parse the references linked to these fake nodes.
Remi
Pages (3): [ «    1  2  3]


Current Time: Wed Jul 30 11:18:48 EDT 2014

Powered by FUDForum. Page generated in 0.02410 seconds