You can close this thread I fixed this issue. Thank you "NotaDickLol" for well , not being a dick haha and helping me out.
https://ibb.co/w6j5wWG
![]()
You can close this thread I fixed this issue. Thank you "NotaDickLol" for well , not being a dick haha and helping me out.
https://ibb.co/w6j5wWG
![]()
Last edited by iCyanidex; 22-02-22 at 12:52 AM.
there is a full stack trace, what else do you need frm us? lol
at-least tr to solve it yourself
xD
Alright so basically how to read these stack traces to figure out your errors is simple if your break it down.
I've highlighted the problem files and lines its referring to for you so its easier to locate them in your source.
First, open up scripting.AbstractScriptManager.java - line 82. Next open up scripting.event.EventScriptManager - line 59. There, you will see a line with something referring toCode:getInvocableSEVERE: Error executingscript.java.lang.NullPointerException: Cannot invoke "javax.script.ScriptEngine.eval(java.io.Reader)" because "this.engine" is null at scripting.AbstractScriptManager.getInvocable(AbstractScriptManager.java:82)at scripting.event.EventScriptManager.<init>(EventScriptManager.java:59) at handling.channel.ChannelServer.run(ChannelServer.java:243) at- however your object has not been initialized so it throws a NullPointerException.. All this means is that you need to make sure you're callingCode:'this.engine.getInvocable("some bullshit");'(or whatever the fuck scripting engine you actually use would be, rather than ScriptEngine) before scripting.event.EventScriptManager - line 59.Code:this.engine = new ScriptEngine();
If you provide the full file, I will PERHAPS spoonfeed it to you later if I choose to drink again tomorrow night. but this should be sufficient to manage it on your own i think.
*** scratch that you have 2 errors lmao mb #2 -- ***
Code:(7575).[INFO] Channel 1 is online.Exception in thread "main" java.lang.NullPointerException: Cannot invoke "javax.script.ScriptEngine.put(String, Object)" because "entry.iv" is null at scripting.event.EventScriptManager.init(EventScriptManager.java:74) ...
For this one, you'll go to scripting.event.EventScriptManager.init() - line 74. You'll see a line that says something likeand before it you'll wanna addCode:entry.iv... idk manto wrap it. That will fix your error and allow the server to start, however you will still need to figure out why 'entry.iv' was null in the first place to truly fix the problem. (though I'd bet its related to the first error where your engine is null to begin with - solving the first problem should solve this #2 problem is my best guess so i would focus on the first one)Code:if (entry.iv != null) { entry.iv... idk man }
Last edited by NotaDickLol; 21-02-22 at 11:03 AM.
Sorry, Fraysa. Didn't mean to upset you. Have a beer ;)
- - - Updated - - -
Thank you for highlighting that portion for me , i've been away for quite some time , 7+ years now so im very rusty on java but i found my old server files on an old mediafire account I just wanted to try getting them working check out the old server and old account have some fun with it ya know haha , I will go through with what you have told me and see if I can find whyis not being initialized in the first place , Could it be just that i need to use older java ? I have Java 8 installed , but used the older update revision. I have done more digging into it and it seems it may be trying to load an Event script on startup that either isn't there or isn't being referenced properly ...this.engine
this appears like if it tries to read an event script that is null or not there it will throw the invocable code i am seeing in the .bat. is this correct ?public EventScriptManager(ChannelServer cserv, String[] scripts) {
super();
for (String script : scripts)
if (!script.equals("")) {
Invocable iv = getInvocable("event/" + script + ".js", null);
Here are my EventScriptManager and AbstractScriptManager files
https://www.mediafire.com/file/rvw5w...ager.java/file
https://www.mediafire.com/file/m34wr...ager.java/file
- - - Updated - - -
Here is line 55-90 of Abstract Script Manager.
protected Invocable getInvocable(String path, MapleClient c) {
try {
String scriptPath = "scripts/" + path;
int prior = 0; //Used for priority of features
engine = null;
if (c != null) {
engine = c.getScriptEngine(scriptPath);
}
if (engine == null) {
File scriptFile = new File(scriptPath);
FeatureManager fm = new FeatureManager();
for(int i = 0; i < fm.count(); i++) {
Feature feat = fm.featureList[i];
if(feat.isEnabled() && feat.getPriority() > prior) {
scriptPath = "scripts/feature/" + feat.toString() + "/" + path;
File tmpScriptFile = new File(scriptPath);
if(tmpScriptFile.exists())
scriptFile = tmpScriptFile;
}
}
if (!scriptFile.exists())
return null;
engine = sem.getEngineByName("javascript");
if (c != null) {
c.setScriptEngine(scriptPath, engine);
}
FileReader fr = new FileReader(scriptFile);
engine.eval(fr); <<<<<<<< This is line 82
fr.close();
}
return (Invocable) engine;
} catch (Exception e) {
log.error("Error executing script.", e);
return null;
}
}
Last edited by iCyanidex; 21-02-22 at 06:07 PM.