Author Topic: Updating a plugin to javaop 2.1.3 lost in forest  (Read 3813 times)

0 Members and 1 Guest are viewing this topic.

Offline ilaggoodly

  • Newbie
  • *
  • Posts: 9
    • View Profile
Updating a plugin to javaop 2.1.3 lost in forest
« on: May 13, 2010, 12:10:10 PM »
Right, so I'm trying to update my old plugin VIPWatch to javaop 2.1.3 (you can find it in the archive) and I must say getting the whole thing imported correctly in eclipse was quite the trip, but eventually I got it working to the point where there are no warnings in eclipse... however it won't get noticed by Javaop at all

Code: [Select]
Loading plugin: com.javaop.UserManagement.PluginMain
Loading plugin: null
Unable to load plugin file: jar:file:///T:\tmp\JavaOp_2.1.3_RC1\Plugins\VIPWatch.jar!/
java.lang.NullPointerException
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at com.javaop.pluginmanagers.PluginManager.loadFile(Unknown Source)
        at com.javaop.pluginmanagers.PluginManager.loadFile(Unknown Source)
        at com.javaop.pluginmanagers.PluginManager.initialize(Unknown Source)
        at com.javaop._main.BotStart.main(Unknown Source)
Loading plugin: com.javaop.Version.PluginMain

Sort of a cryptic error message to me, what could be causing this? Were there some changes that might have subtly broke the code inside my plugin or is it more likely that its my fault?


EDIT: I was going to post the code... but can't attach and my webserver is bitching :(

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10326
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: Updating a plugin to javaop 2.1.3 lost in forest
« Reply #1 on: May 13, 2010, 04:58:02 PM »
Yeah, there was a major change to how plugins are loaded. I thought I maintained backwards compatibility, but obviously not.

I would check out the SVN repository, add your plugin source code there, and modify the build.xml to build it along with the rest of the code.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Lance

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Quote from: Joe
[23:55:31] [william@enterprise ~/Documents/Programming/javaop2]$ svn commit -m 'Tried to fix StayConnected. Again.'
Committed revision 63.
StayConnected strikes back!

Offline Lance

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Re: Updating a plugin to javaop 2.1.3 lost in forest
« Reply #3 on: May 17, 2010, 09:29:11 PM »
If the above does not resolve your issue, make sure you have no uppercase letters in your package names. It sounds strange, I know... But, yesterday when I was creating a plugin, I ran into the same problem. Lowercased package names and the error is gone ;)
Quote from: Joe
[23:55:31] [william@enterprise ~/Documents/Programming/javaop2]$ svn commit -m 'Tried to fix StayConnected. Again.'
Committed revision 63.
StayConnected strikes back!

Offline ilaggoodly

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Updating a plugin to javaop 2.1.3 lost in forest
« Reply #4 on: May 22, 2010, 07:15:11 PM »
Ah, well i think it might have been me just missing the mysql connector, anyway after adding to source & build.xml, it worked. Thanks! The new version of the bot seems to be a lot more stable than the last, I had given up on the project because it was losing connection to battlenet once every 2 days or so!

Return of VIPWATCH!

http://rylai.de/vip/nsg/

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10326
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: Updating a plugin to javaop 2.1.3 lost in forest
« Reply #5 on: May 23, 2010, 06:59:33 PM »
Is it still losing connection, but reconnecting? Or just not losing connection? If it's the second one then I think it's something on your end.. I don't think I fixed anything connection wise, except fixing stayconnected.. if I even did that. :P
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline ilaggoodly

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Updating a plugin to javaop 2.1.3 lost in forest
« Reply #6 on: May 27, 2010, 01:36:43 AM »
I think its not disconnecting at all anymore... but its sort of hard to tell because of the massive text my plugin generates in the logs/cmdline ^^

Offline Lance

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Re: Updating a plugin to javaop 2.1.3 lost in forest
« Reply #7 on: June 24, 2010, 01:52:51 PM »
I found the problem... The manifest needs an empty line at the end. Yay for uppercase package names :D
Quote from: Joe
[23:55:31] [william@enterprise ~/Documents/Programming/javaop2]$ svn commit -m 'Tried to fix StayConnected. Again.'
Committed revision 63.
StayConnected strikes back!