[EvA] A peculiare Error while running EvA2.jar library from commandprompt

Marcel Kronfeld marcel.kronfeld at uni-tuebingen.de
Tue May 4 10:18:16 CEST 2010


Hi there,

I am not sure why there is different behavior of the IDE compared to the
command line. Have you checked if there is a different java class path
employed in the two cases?

Specifically, if you are actively relying on constraints, it seems like
the subtraction node is somehow not found or not correctly applied
(class GPNodeSub). Did you alter parts of the AbstractGPNode class tree?

In case you are not working with constraints, you may just remove the
GenericConstraint from the problem instance. I assume this might be
necessary in your ProbDE implementation, line 82?
If you copied the code from a problem class with generic constraints,
there may be a line

private AbstractConstraint[] constraintArray = new
AbstractConstraint[]{new GenericConstraint()};

which you may change into

private AbstractConstraint[] constraintArray = new AbstractConstraint[]{};

If this does not help, some more info on ProbDE (especially code
snippets around line 82) and the exact EvA2 version number would be
helpful (check the eva2.EvAInfo class).

Best regards,
 Marcel Kronfeld

> I am using the Eva2.jar library to develop an application in Java. I
> have successfully managed to achieve it. It runs fine when I use
> NetBeans IDE but when the same is run from command prompt it
> generates error.
> 
> The error printStack shows following line as the source.
> 
> GenericConstraint const1 = new GenericConstraint("-(x0, 489.94831)",
> ConstraintRelationEnum.greaterEqZero);
> 
> The Syntax used to run it from command prompt is:
> 
> C:\Documents and Settings\151600\Desktop\EMS run>C:"\\Program
> Files\\"Java\jdk1.6.0_11\bin\java -Xmx256m -jar EMSConfigModule.jar
> 
> I am copy-pasting the error:
> 
> String has unknown prefix: -(x0,489.94831) String has unknown prefix:
> -(x0,489.94831) Exception occurred during event dispatching: 
> java.lang.NullPointerException at
> eva2.server.go.individuals.codings.gp.AbstractGPNode.parseFromString(
>  AbstractGPNode.java:240) at
> eva2.server.go.operators.constraint.GenericConstraint.compileConstrai
>  nt(GenericConstraint.java:52) at
> eva2.server.go.operators.constraint.GenericConstraint.<init>(GenericC
>  onstraint.java:31) at
> eva2.server.go.operators.constraint.GenericConstraint.<init>(GenericC
>  onstraint.java:35) at
> NetworkSimulation.ProbDE.<init>(ProbDE.java:82) at
> NetworkSimulation.Simulation.<init>(Simulation.java:91) at
> NetworkSimulation.SimulationWindow.actionPerformed(SimulationWindow.j
>  ava:129) at
> javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:19
>  95) at
> javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
>  a:2318) at
> javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
>  .java:387) at
> javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242
>  ) at
> javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
>  istener.java:236) at
> java.awt.Component.processMouseEvent(Component.java:6134) at
> javax.swing.JComponent.processMouseEvent(JComponent.java:3265) at
> java.awt.Component.processEvent(Component.java:5899) at
> java.awt.Container.processEvent(Container.java:2023) at
> java.awt.Component.dispatchEventImpl(Component.java:4501) at
> java.awt.Container.dispatchEventImpl(Container.java:2081) at
> java.awt.Component.dispatchEvent(Component.java:4331) at
> java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4301
>  ) at
> java.awt.LightweightDispatcher.processMouseEvent(Container.java:3965)

-- 
 Dipl.-Inform. Marcel Kronfeld
 Wilhelm-Schickard-Institute for Computer Science
 University of Tuebingen
 Sand 1 - A305, 72076 Tuebingen, Germany

 Phone: (+49/0)-7071-29-78987, Fax: (+49/0)-7071-29-5091
 EMail: marcel.kronfeld at uni-tuebingen.de


More information about the EvA mailing list