(Documenting for others' possible benefit.)
This error happened:
============================================================
Error using com.comsol.model.impl.SolverSequenceImpl/getPVals
Java exception occurred:
Exception:
com.comsol.util.exceptions.FlException: Solution not initialized
Messages:
Solution not initialized
Stack trace:
at com.comsol.model.internal.impl.SolverSequenceImpl.ax(Unknown Source)
at com.comsol.model.internal.impl.SolverSequenceImpl.U(Unknown Source)
at com.comsol.model.internal.impl.SolverSequenceImpl.getPVals(Unknown
Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.comsol.clientserver.impl.JobImpl.run(Unknown Source)
at com.comsol.server.internal.b.a(Unknown Source)
at com.comsol.server.internal.b.a(Unknown Source)
at com.comsol.server.internal.b$a.a(Unknown Source)
at com.comsol.server.internal.b$a.a(Unknown Source)
at com.comsol.server.internal.b$a$a.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at com.comsol.model.clientserver.ClientManagerImpl.a(Unknown Source)
at com.comsol.model.clientserver.ClientManagerImpl.runServerJob(Unknown
Source)
at com.comsol.model.internal.impl.SolverSequenceImpl.getPVals(Unknown
Source)
at com.comsol.model.impl.SolverSequenceImpl.getPVals(Unknown Source)
Caused by: Exception:
com.comsol.util.exceptions.FlException: Solution not initialized
Messages:
Solution not initialized
at com.comsol.model.internal.impl.SolverSequenceImpl.ax(Unknown Source)
at com.comsol.model.internal.impl.SolverSequenceImpl.U(Unknown Source)
at com.comsol.model.internal.impl.SolverSequenceImpl.getPVals(Unknown
Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.comsol.clientserver.impl.JobImpl.run(Unknown Source)
at com.comsol.server.internal.b.a(Unknown Source)
at com.comsol.server.internal.b.a(Unknown Source)
at com.comsol.server.internal.b$a.a(Unknown Source)
at com.comsol.server.internal.b$a.a(Unknown Source)
at com.comsol.server.internal.b$a$a.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Error in C:\Programs\COMSOL43a\mli\mphsolinfo.p>mphsolinfo (line 102)
Error in process_hexes2D_v2/process_one (line 63)
info = mphsolinfo(m, 'dataset', 'dset2');
Error in process_hexes2D_v2 (line 30)
process_one(m);
============================================================
By saving as Java (after "Reset History") and comparing (gvimdiff) against an earlier version, I found that the following lines mentioning "sol2" appeared in the Java source:
...
model.batch("p1").feature("so1").set("psol", "sol2");
...
model.sol().create("sol2");
model.sol("sol2").study("std1");
...
Removing them, deleting the .run() calls and compiling as usual, everything worked normally.
The moral of the story is that if you create a solution, you'll be hit with a "Solution not initialized" error.
This error happened:
============================================================
Error using com.comsol.model.impl.SolverSequenceImpl/getPVals
Java exception occurred:
Exception:
com.comsol.util.exceptions.FlException: Solution not initialized
Messages:
Solution not initialized
Stack trace:
at com.comsol.model.internal.impl.SolverSequenceImpl.ax(Unknown Source)
at com.comsol.model.internal.impl.SolverSequenceImpl.U(Unknown Source)
at com.comsol.model.internal.impl.SolverSequenceImpl.getPVals(Unknown
Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.comsol.clientserver.impl.JobImpl.run(Unknown Source)
at com.comsol.server.internal.b.a(Unknown Source)
at com.comsol.server.internal.b.a(Unknown Source)
at com.comsol.server.internal.b$a.a(Unknown Source)
at com.comsol.server.internal.b$a.a(Unknown Source)
at com.comsol.server.internal.b$a$a.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at com.comsol.model.clientserver.ClientManagerImpl.a(Unknown Source)
at com.comsol.model.clientserver.ClientManagerImpl.runServerJob(Unknown
Source)
at com.comsol.model.internal.impl.SolverSequenceImpl.getPVals(Unknown
Source)
at com.comsol.model.impl.SolverSequenceImpl.getPVals(Unknown Source)
Caused by: Exception:
com.comsol.util.exceptions.FlException: Solution not initialized
Messages:
Solution not initialized
at com.comsol.model.internal.impl.SolverSequenceImpl.ax(Unknown Source)
at com.comsol.model.internal.impl.SolverSequenceImpl.U(Unknown Source)
at com.comsol.model.internal.impl.SolverSequenceImpl.getPVals(Unknown
Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.comsol.clientserver.impl.JobImpl.run(Unknown Source)
at com.comsol.server.internal.b.a(Unknown Source)
at com.comsol.server.internal.b.a(Unknown Source)
at com.comsol.server.internal.b$a.a(Unknown Source)
at com.comsol.server.internal.b$a.a(Unknown Source)
at com.comsol.server.internal.b$a$a.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Error in C:\Programs\COMSOL43a\mli\mphsolinfo.p>mphsolinfo (line 102)
Error in process_hexes2D_v2/process_one (line 63)
info = mphsolinfo(m, 'dataset', 'dset2');
Error in process_hexes2D_v2 (line 30)
process_one(m);
============================================================
By saving as Java (after "Reset History") and comparing (gvimdiff) against an earlier version, I found that the following lines mentioning "sol2" appeared in the Java source:
...
model.batch("p1").feature("so1").set("psol", "sol2");
...
model.sol().create("sol2");
model.sol("sol2").study("std1");
...
Removing them, deleting the .run() calls and compiling as usual, everything worked normally.
The moral of the story is that if you create a solution, you'll be hit with a "Solution not initialized" error.