Hi there,
Server version is 2.17.
i'm try to use a old project with java ChatExtension.jar, but the main class drop down box is empty on zone extension tab.
then i open the Chrome console and it show that error massage "sfs2x-api-1.7.15.js:6 Uncaught SFSTypeError: Requested value is not of type SFSDataType.UTF_STRING".
Whats the problem?
Main class in Extension is empty
Re: Main class in Extension is empty
Hi,
what is the name of the class that should appear in the drop down? (in other words what is the name of your Extension class)
Thanks
what is the name of the class that should appear in the drop down? (in other words what is the name of your Extension class)
Thanks
Re: Main class in Extension is empty
its called "InitialExtension"
Re: Main class in Extension is empty
Hi,
seems strange. We would need to see the actual jar file.
Can you send it to our support@... email box? Please zip it before sending as sometimes .jar files are seen as "executables" by mail filters and discarded as potential viruses.
Also put a reference to this discussion in the mail.
Thanks
seems strange. We would need to see the actual jar file.
Can you send it to our support@... email box? Please zip it before sending as sometimes .jar files are seen as "executables" by mail filters and discarded as potential viruses.
Also put a reference to this discussion in the mail.
Thanks
Re: Main class in Extension is empty
its weird,
when i use the standalone version admin tool,the Extension main class drop down box works fine
when i use the standalone version admin tool,the Extension main class drop down box works fine
Re: Main class in Extension is empty
What OS are your running?
and how exactly do you run the server when you can't find the Extension via the AdminTool?
Thanks
and how exactly do you run the server when you can't find the Extension via the AdminTool?
Thanks
Re: Main class in Extension is empty
my OS is Win10,
and running the server via the Chat.zone.xml stored in the project folder
and running the server via the Chat.zone.xml stored in the project folder
Re: Main class in Extension is empty
Sorry but this isn't clear yet.
You said:
What do you mean by "standalone version admin tool"?
Are you still using the old Flash-based admin tool?
Thanks
You said:
when i use the standalone version admin tool, the Extension main class drop down box works fine
What do you mean by "standalone version admin tool"?
Are you still using the old Flash-based admin tool?
Thanks
Re: Main class in Extension is empty
after web admin tool had problem,i found AdminTool for Windows (standalone) on this page
and finally the main class can be used
https://www.smartfoxserver.com/download/sfs2x#p=extras
and finally the main class can be used
https://www.smartfoxserver.com/download/sfs2x#p=extras
Re: Main class in Extension is empty
Hi,
it should work just as well with the web-based AdminTool.
If you want us to investigate further send us your Extension file, as I mentioned in my reply above. ( LINK )
Thanks
it should work just as well with the web-based AdminTool.
If you want us to investigate further send us your Extension file, as I mentioned in my reply above. ( LINK )
Thanks
Re: Main class in Extension is empty
I was just experiencing the same issue. Using the legacy standalone AdminTool was the solution.
Going back into the HTML5 web based admin portal and inspecting the Zone Extension setting actually resets it to blank. So, for now, I'm stuck using the old standalone AdminTool sadly.
I was running server version 2.17.0, then upgraded to 2.17.3.
Tried Brave, Firefox, Chrome, & Edge
Windows 10
Going back into the HTML5 web based admin portal and inspecting the Zone Extension setting actually resets it to blank. So, for now, I'm stuck using the old standalone AdminTool sadly.
I was running server version 2.17.0, then upgraded to 2.17.3.
Tried Brave, Firefox, Chrome, & Edge
Windows 10
Re: Main class in Extension is empty
Hi,
we are not aware of a similar issue. I have tested setting different extensions with the HMTL AdminTool and then coming back and everything looked fine.
Can you describe all the steps to reproduce the problem in the HTML version?
Also, are you able to set the Extension the very first time? Or are you having a problem with that as well?
Thanks
we are not aware of a similar issue. I have tested setting different extensions with the HMTL AdminTool and then coming back and everything looked fine.
Can you describe all the steps to reproduce the problem in the HTML version?
Also, are you able to set the Extension the very first time? Or are you having a problem with that as well?
Thanks
Re: Main class in Extension is empty
Hey Lapo,
I'll host the jar file somewhere and PM you with a download.
As I said above, I was on 2.17.0 and then I upgraded again to 2.17.3.
From the AdminTool (HTML5 web tool), I go to Zone Configurator on the top, go to any zone and hit edit, then go to Zone Extension.
1. For "Name", I select the name that corresponds to my JAR file.
2. The type remains as the default "Java" (Note: I am using Kotlin but the end result is a JAR file)
3. For "Main class", there is nothing in the drop down (see screenshot)
I perform the exact same procedure on the standalone (legacy) AdminTool results in the dropdown being populated with the various class objects in the jar file. I select the appropriate one, save and everything works (see second screenshot in imgur album).
Screenshots: https://imgur.com/a/nKSYcPl
I'll host the jar file somewhere and PM you with a download.
As I said above, I was on 2.17.0 and then I upgraded again to 2.17.3.
From the AdminTool (HTML5 web tool), I go to Zone Configurator on the top, go to any zone and hit edit, then go to Zone Extension.
1. For "Name", I select the name that corresponds to my JAR file.
2. The type remains as the default "Java" (Note: I am using Kotlin but the end result is a JAR file)
3. For "Main class", there is nothing in the drop down (see screenshot)
I perform the exact same procedure on the standalone (legacy) AdminTool results in the dropdown being populated with the various class objects in the jar file. I select the appropriate one, save and everything works (see second screenshot in imgur album).
Screenshots: https://imgur.com/a/nKSYcPl
Re: Main class in Extension is empty
Thanks, I was able to reproduce the problem. We'll investigate it and let you know.
While I am here, I also noticed the jar file you sent is packed with other libraries (almost 10K files) which is not ideal unless the Extension is going to be used exclusively at Zone level.
The reason for that is that for every copy of the Extension that is going to be loaded all those other classes will be loaded as well, bloating up the meta-space. Additionally i noticed some dependencies in the org.apache.* package that could be duplicates of other classes already present in the server class path. (e.g. commons logging and http)
The best approach would be to store in the Extension jar only the Extension classes and no other dependencies.
Next deploy all the other dependency jars directly in the extensions/__lib__/ folder which is mapped to the top level class loader.
If you want to learn more about class loading in SFS2X I'd recommend the documentation here:
http://docs2x.smartfoxserver.com/Extens ... assLoading
Cheers
While I am here, I also noticed the jar file you sent is packed with other libraries (almost 10K files) which is not ideal unless the Extension is going to be used exclusively at Zone level.
The reason for that is that for every copy of the Extension that is going to be loaded all those other classes will be loaded as well, bloating up the meta-space. Additionally i noticed some dependencies in the org.apache.* package that could be duplicates of other classes already present in the server class path. (e.g. commons logging and http)
The best approach would be to store in the Extension jar only the Extension classes and no other dependencies.
Next deploy all the other dependency jars directly in the extensions/__lib__/ folder which is mapped to the top level class loader.
If you want to learn more about class loading in SFS2X I'd recommend the documentation here:
http://docs2x.smartfoxserver.com/Extens ... assLoading
Cheers
Re: Main class in Extension is empty
Thanks Lapo for the advice.
For anyone else stumbling upon this, it appears the bloated JAR file was actually the problem with the AdminTool.
After following Lapo's advice, all my classes were appearing in the web-based AdminTool and my JAR file went from being around 10,000 KB to just 39 KB!
If you are using IntelliJ, like I am, you can do this by going to the Project Structure (Ctrl+Alt+Shift+S) and modifying your JAR under Artifacts. I found it easiest just to create a new artifact with the + button, then choosing JAR -> From Modules with Dependences. Now here is the important part, for "JAR files from libraries", choose "copy to the output directory and link via manifest".
After rebuilding the JAR file, you will be able to copy all JAR files for the libraries (found in your output directory) into the extensions/__lib__ directory.
Thanks again for the help and hopes this helps someone else down the road.
For anyone else stumbling upon this, it appears the bloated JAR file was actually the problem with the AdminTool.
After following Lapo's advice, all my classes were appearing in the web-based AdminTool and my JAR file went from being around 10,000 KB to just 39 KB!
If you are using IntelliJ, like I am, you can do this by going to the Project Structure (Ctrl+Alt+Shift+S) and modifying your JAR under Artifacts. I found it easiest just to create a new artifact with the + button, then choosing JAR -> From Modules with Dependences. Now here is the important part, for "JAR files from libraries", choose "copy to the output directory and link via manifest".
After rebuilding the JAR file, you will be able to copy all JAR files for the libraries (found in your output directory) into the extensions/__lib__ directory.
Thanks again for the help and hopes this helps someone else down the road.
Who is online
Users browsing this forum: No registered users and 122 guests