RuneScape 2 Development > Server Tutorials
Automatic Port Forwarding
<<< (27/58) >>>
Mariokillu:
Automatically port forwarding...
Could not automatically port forward, stacktrace:
net.sbbi.upnp.messages.UPNPResponseException: Detailed error code :501, Detailed
 error description :Action Failed
        at net.sbbi.upnp.messages.ActionMessageResponseParser.startElement(Actio
nMessageResponseParser.java:145)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startEle
ment(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scan
StartElement(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l$FragmentContentDriver.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(U
nknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next
(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l.scanDocument(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(U
nknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(U
nknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown So
urce)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Un
known Source)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.p
arse(Unknown Source)
        at javax.xml.parsers.SAXParser.parse(Unknown Source)
        at net.sbbi.upnp.messages.ActionMessage.service(ActionMessage.java:172)
        at net.sbbi.upnp.impls.InternetGatewayDevice.addPortMapping(InternetGate
wayDevice.java:388)
        at org.allgofree.upnp.UpnpPortForwarder.addMapping(UpnpPortForwarder.jav
a:30)
        at server.main(server.java:143)
Loaded WorldMap In (172 ms)...
Your server is now online.


help me :P

EDIT:

I messed around a little and brought it down to just 2 errors

Automatically port forwarding...
Could not automatically port forward, stacktrace:
java.lang.NullPointerException
        at org.allgofree.upnp.UpnpPortForwarder.getGateway(UpnpPortForwarder.jav
a:48)
        at org.allgofree.upnp.UpnpPortForwarder.addMapping(UpnpPortForwarder.jav
a:30)
        at server.main(server.java:143)
Loaded WorldMap In (172 ms)...
Your server is now online.
xXLegendaryXx:
Ok. So, I've got errors with both the compiler.bat and the run.bat

run.bat]
Exception in thread "main" java.lang.NoClassDefFoundError: server
Caused by: java.lang.ClassNotFoundException: server
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: server.  Program will exit.
Press any key to continue . . .
___________________________________________________________
If I'm right, it's basically saying that it couldn't find server.java, however, I have put the whole server at the end of it in edit ect ect.
___________________________________________________________
Compiler.bat
Comes up with  
___________________________________________________________
Help would be much appreciated :)
xforeverfree:
i dont have public static void main(String[] args) in my Server.java.. the closes thing to it i  have is public static void main(java.lang.String args[])

Some one plzz help :] i got all the rest done.
doom_j:

--- Quote from: xforeverfree on November 18, 2010, 06:07:48 PM ---i dont have public static void main(String[] args) in my Server.java.. the closes thing to it i  have is public static void main(java.lang.String args[])

Some one plzz help :] i got all the rest done.

--- End quote ---

That is the same thing..... you have the right method...



--- Quote from: xXLegendaryXx on November 01, 2010, 07:22:42 AM ---Ok. So, I've got errors with both the compiler.bat and the run.bat

run.bat]
Exception in thread "main" java.lang.NoClassDefFoundError: server
Caused by: java.lang.ClassNotFoundException: server
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: server.  Program will exit.
Press any key to continue . . .
___________________________________________________________
If I'm right, it's basically saying that it couldn't find server.java, however, I have put the whole server at the end of it in edit ect ect.
___________________________________________________________
Compiler.bat
Comes up with  
___________________________________________________________
Help would be much appreciated :)

--- End quote ---

Your missing a bracket some where... Check to make sure all your opening brackets have a closing bracket and all your closing brackets have a opening bracket. Then re compile.


xforeverfree:
okk, Thanks!
But now when i put the code in i get this error when i try to runserver:
 
  Automatically port forwarding...
Exception in thread "main" java.lang.NoClassDefFoundError: org/allgofree/upnp/Up
npPortForwarder
        at server.main(server.java:89)
Caused by: java.lang.ClassNotFoundException: org.allgofree.upnp.UpnpPortForwarde
r
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        ... 1 more
Press any key to continue . . .
  Heres how i added it:public static void main(java.lang.String args[]) {
       try {                   
         System.out.println("Automatically port forwarding...");                                         

      org.allgofree.upnp.UpnpPortForwarder.INSTANCE.addMapping
   (43594);                   
         System.out.println("Automatic port forwarding complete.");               
         } catch (Exception ex) {                   
         System.out.println("Could not automatically port forward, stacktrace:");                                   

   ex.printStackTrace();

      }
         
      try {
         File f = new File("server.ini");
         if (!f.exists()) {
            misc.println("server.ini doesn't exist!");
         }
         Properties p = new Properties();
         p.load(new FileInputStream("./server.ini"));
         int client = Integer.parseInt(p.getProperty("ClientRequired")
               .trim());
         world = Integer.parseInt(p.getProperty("WorldId"));
         serverlistenerPort = Integer.parseInt(p.getProperty("ServerPort")
               .trim());
         if (client > 0) {
            misc.println("Enforcing Devolution client requirement");
            enforceClient = true;
         }
      } catch (Exception e) {
         misc.println("Error loading settings");
         e.printStackTrace();
      }
      clientHandler = new server();
      (new Thread(clientHandler)).start(); // launch server listener
      playerHandler = new PlayerHandler();
      npcHandler = new NPCHandler();
      itemHandler = new ItemHandler();
      doorHandler = new DoorHandler();
      GraphicsHandler = new GraphicsHandler();
      //checkPlayerCapes = new checkPlayerCapes();
      /*handlers*/
                Wearing = new Wearing();
                special = new special();
                setConfig = new setConfig();
      textHandler = new textHandler();
      potions = new potions();
      clickingMost = new clickingMost();
      /*end of handlers*/
      if (itemHandler == null) {
         misc.println("ERROR NULL");
      }
      shopHandler = new ShopHandler();
      GraphicsHandler = new GraphicsHandler();
      process proc = new process();
      new Thread(proc).start();
Navigation
Message Index
Next page
Previous page

Go to full version
Powered by SMFPacks SEO Pro Mod |