‎21-07-2022 04:11 PM
Hello,
currently attempting to schedule a job via the windows scheduler. This job will be responsible for fetching objects on an excel sheet and mapping their attributes to the instance in the repository and vice verca.
This is my first attempt at connecting an external application to the system so bear with me.
the implementation is in Java, so far i've done the following:
Running the script almost always results in a segmentation error, whenever the administration.exe is open the execution just hangs until a nullpointerexception is received.
I can attach the error logs if they can be of use.
public static void main(String [] args) {
System.out.println("Starting");
FileWriter writer = null;
try {
writer = new FileWriter("test.txt");
writer.write("test");
MegaApplication app = new MegaApplication();
MegaEnvironment env = app.getEnvironments().get("EnvironmentNAme");
env.setCurrentAdministrator("System");
env.setCurrentPassword("");
MegaTransaction trs = env.transactions().create("Production", env.getCurrentAdministrator());
MegaRoot root = trs.getOwnedDatabase().open();
MegaCollection col = root.getSelection("Select [Application]", new Object[0]);
writer.write(col.size());
//Close the file
if(writer!=null)
{
writer.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
Solved! Go to Solution.
‎24-07-2022 05:37 PM
The error says the users does not have the right to write in the windows registry.
Thus not sure HOPEX is properly defined.
‎22-07-2022 07:25 PM - edited ‎22-07-2022 07:33 PM
Apologies, I had thought that i was on CP3. having upgraded the environment from CP2 to CP3 now the segmentation error is no longer occurring.
That being said, i've attempted to run the powershell script found under the environment path, if i were to run it by right-clicking and selecting "run with powershell" the attached error log is generated. Running the Script with powershell as administrator nothing is logged and the "mgwmapp" service is not found on task manager.
‎22-07-2022 04:08 PM
I'm surprise because you said you are in V5 CP3 (15.3.0+xxxx) and
the screenshot show an error on V5 CP2 HF4 (15.2.4+6158) C:\ProgramData\MEGA\Hopex Application Server\5050\.shadowFiles\hopex.core\15.2.4+6158\
If you really are in V5 CP3 (15.3.0+xxxx) this means the regserver did not work.
‎22-07-2022 04:02 PM
Hello,
for both of your questions, I had read through the javadocs related to the MegaApplication class (find attached a screenshot titled "MegaApplicationdocs.png")
Following the execution of the powershell script, the same segmentation error attached persists ( attached as "Java Unhandled Exception Error.png")
I've also attached the dump file if it can provide any insight.
‎22-07-2022 02:39 PM
Hello,
for both of your questions, I had read through the javadocs related to the MegaApplication class (find attached a screenshot titled "MegaApplicationdocs.png")
Following the execution of the powershell script, the same segmentation error attached persists ( attached as "Java Unhandled Exception Error.png")
I've also attached the dump file if it can provide any insight.
‎21-07-2022 04:15 PM
Hello,
>>> moved the mg_jnib.dll to one of the specified folders, although the paths specified from the docs don't seem to align well with V5CP3. For Example java.ext.dirs does not exist whereas java.jre.lib.ext does ( i've copied the dll into that path )
Why do you do that ?
>>> running the mgwmapp.exe /regserver does not seem to do anything, while true that sometimes the windows front end some times attempts to instantiate.
Where do you do it from ?
In V5 there is a powershell to do it
Can you share logs and screenshot of the error ?