This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
yttrium's profile picture

[Error] Null pointer exception on boot

Started by yttrium, 18 September 2012 - 02:11 AM
yttrium #1
Posted 18 September 2012 - 04:11 AM
Whenever I place a ComputerCraft Computer in SMP, it tries to boot and instantly gives this error:

bios:377: vm error: java.lang.NullPointerException

The server's log also shows something similar:

22:31:40 [SEVERE] dan200.computer.core.FileSystemException: No such directory
22:31:40 [SEVERE]     at dan200.computer.core.FileSystem.<init>(FileSystem.java:67)
22:31:40 [SEVERE]     at dan200.computer.core.Computer.initFileSystem(Computer.java:759)
22:31:40 [SEVERE]     at dan200.computer.core.Computer.access$30(Computer.java:753)
22:31:40 [SEVERE]     at dan200.computer.core.Computer$58.execute(Computer.java:1794)
22:31:40 [SEVERE]     at dan200.computer.core.ComputerThread$1$1.run(ComputerThread.java:50)
22:31:40 [SEVERE]     at java.lang.Thread.run(Thread.java:722)
22:31:40 [INFO] org.luaj.vm2.LuaError: bios:377: vm error: java.lang.NullPointerException
22:31:40 [INFO] stack traceback:

Any idea what might be causing this?
Luanub #2
Posted 18 September 2012 - 04:21 AM
Something went wrong with the installation. What version is this for? What version of forge are you using? Did you place the CC zip file in the mods folder or extract it?
yttrium #3
Posted 18 September 2012 - 04:25 AM
I'm on Tekkit's latest version. I don't know which version of CC it uses, or Forge, but I've literally just reinstalled Tekkit so it's the latest on their site.

It's extracted, so is ccSensors - that's how it came. Should it not be?

EDIT: Just checked, that makes CC on 1.33.

EDIT2: I tried downloading stock CC 1.33, and it appears that it has two .class files in the root directory which Tekkit did not have.

Upon trying to copy those files to the directory and reloading the server, I get this error:

23:45:58 [INFO] [WeaponMod] Properties file read succesfully!
23:45:58 [SEVERE] java.lang.NoClassDefFoundError: ni
23:45:58 [SEVERE]	 at java.lang.Class.getDeclaredConstructors0(Native Method)
23:45:58 [SEVERE]	 at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
23:45:58 [SEVERE]	 at java.lang.Class.getConstructor0(Class.java:2714)
23:45:58 [SEVERE]	 at java.lang.Class.newInstance0(Class.java:343)
23:45:58 [SEVERE]	 at java.lang.Class.newInstance(Class.java:325)
23:45:58 [SEVERE]	 at cpw.mods.fml.common.modloader.ModLoaderModContainer.preInit(ModLoaderModContainer.java:107)
23:45:58 [SEVERE]	 at cpw.mods.fml.common.Loader.preModInit(Loader.java:235)
23:45:58 [SEVERE]	 at cpw.mods.fml.common.Loader.loadMods(Loader.java:607)
23:45:58 [SEVERE]	 at cpw.mods.fml.server.FMLBukkitHandler.onPreLoad(FMLBukkitHandler.java:134)
23:45:58 [SEVERE]	 at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:135)
23:45:58 [SEVERE]	 at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:438)
23:45:58 [SEVERE]	 at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
23:45:58 [SEVERE] Caused by: java.lang.ClassNotFoundException: ni
23:45:58 [SEVERE]	 at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
23:45:58 [SEVERE]	 at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
23:45:58 [SEVERE]	 at java.security.AccessController.doPrivileged(Native Method)
23:45:58 [SEVERE]	 at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
23:45:58 [SEVERE]	 at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
23:45:58 [SEVERE]	 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
23:45:58 [SEVERE]	 at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
23:45:58 [SEVERE]	 ... 12 more
23:45:58 [SEVERE] Unexpected exception
java.lang.NoClassDefFoundError: ni
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
	at java.lang.Class.getConstructor0(Class.java:2714)
	at java.lang.Class.newInstance0(Class.java:343)
	at java.lang.Class.newInstance(Class.java:325)
	at cpw.mods.fml.common.modloader.ModLoaderModContainer.preInit(ModLoaderModContainer.java:107)
	at cpw.mods.fml.common.Loader.preModInit(Loader.java:235)
	at cpw.mods.fml.common.Loader.loadMods(Loader.java:607)
	at cpw.mods.fml.server.FMLBukkitHandler.onPreLoad(FMLBukkitHandler.java:134)
	at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:135)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:438)
	at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
Caused by: java.lang.ClassNotFoundException: ni
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
	... 12 more

Removing them does not fix it - only a complete reinstall of Tekkit fixes it.

There also seems to be a few conflicts when booting the server, though it does manage to continue booting.


23:51:30 [WARNING] Configuration for mod_ComputerCraft.enableAPI_http found value 0 outside acceptable range 4.9E-324,1.7976931348623157E308
23:51:30 [INFO] Loading ComputerCraft: To change block IDs, modify config/mod_ComputerCraft.cfg
23:51:30 [INFO] ComputerCraft: computerBlockID 207
23:51:30 [INFO] ComputerCraft: diskDriveBlockID 208
23:51:30 [INFO] ComputerCraft: diskItemID 4000
23:51:30 [INFO] CONFLICT @ -49 item slot already occupied by dan200.computer.shared.ItemComputer@1e95777 while adding net.minecraft.server.ItemBlock@6d6c90
23:51:30 [INFO] ComputerCraft: Searching for RedPowerLib...
23:51:30 [INFO] ComputerCraft: RedPowerLib and methods located.
23:51:30 [INFO] CONFLICT @ -48 item slot already occupied by dan200.computer.shared.ItemPeripheral@b37561 while adding net.minecraft.server.ItemBlock@1df60c5

Luanub #4
Posted 18 September 2012 - 06:03 AM
Tekkit should work out of the box, it has both thaumcraft and CC. Mine works fine. You should probably contact tekkit for help.

Tekkit uses Bukkit, so downloading CC from here and installing it will not work. You will need a bukkit port, but really you shouldn't need anything since CC/Thaum both come installed on Tekkit.

EDIT: It's just technic that has thaumcraft not Tekkit if I remember right. Are you trying to add thaumcraft to Tekkit? I don't think modding tekkit is as easy as just modding you're own server. I have not tried it however so I could be wrong. I still recommend that you contact Tekkit. This isn't a CC issue.
Edited on 18 September 2012 - 04:07 AM
yttrium #5
Posted 18 September 2012 - 06:08 AM
I'm not trying to do anything with Thaumcraft, I don't even know what that is.

I'm trying to figure out why CC doesn't work out of the box stock.
Luanub #6
Posted 18 September 2012 - 06:22 AM
Sorry I got mixed up on threads with the Thaumcraft… It's been a long night….

You shouldn't have to mess with any of the mod files since you're using tekkit. It should work out of the box.

Have you put any scripts on the computer yet that it may be trying to run when it is starting up? You're able to place the comuter right? Just not able to turn it on?
Cloudy #7
Posted 18 September 2012 - 07:24 AM
ForgeModLoader-0.log please.

Technically though this is a Tekkit issue and you should bug them with it, but hey. I'll see what happens once I get that log.

If I had to guess I'd say that the ComputerCraft folder isn't actually named ComputerCraft.
yttrium #8
Posted 18 September 2012 - 12:25 PM
I'll pastebin ForgeModLoader-0.log as soon as I have time to TV into the server again.

I know for a fact the folder is named ComputerCraft, though.

EDIT: Here's the log.
http://pastebin.com/a8K8CRy2

And here's the server.log in case you want to check that out, too.
http://pastebin.com/bw60UPFB

The tidbit at the end there is because there's a computer block in a chunk that contains a World Anchor, so it loads automatically when the server starts.
Cranium #9
Posted 18 September 2012 - 03:47 PM
Erm, i think those are the same logs….
Edit: I am an idiot, they are not.
yttrium #10
Posted 18 September 2012 - 03:49 PM
Yeah, they're pretty similar, but are indeed different.
yttrium #11
Posted 18 September 2012 - 04:14 PM
The only issue I've found is on line 329 of the server.log:
2012-09-18 10:27:41 [WARNING] Configuration for mod_ComputerCraft.enableAPI_http found value 0 outside acceptable range 4.9E-324,1.7976931348623157E308
Cranium #12
Posted 18 September 2012 - 04:36 PM
Well that is your HTTP config. What is the value in your server settings? It should be either 1 or 0.
yttrium #13
Posted 18 September 2012 - 04:41 PM
Do you mean my server.properties?
#Minecraft server properties
#Mon Sep 10 19:39:03 EDT 2012
allow-nether=true
level-name=AlexDoomFortress
enable-query=false
allow-flight=false
server-port=25565
level-type=DEFAULT
enable-rcon=false
level-seed=
server-ip=
max-build-height=256
spawn-npcs=true
white-list=false
spawn-animals=true
online-mode=true
pvp=true
difficulty=1
gamemode=0
max-players=20
spawn-monsters=true
generate-structures=true
view-distance=10
motd=lol
Cranium #14
Posted 18 September 2012 - 04:48 PM
No, somewhere(i don't know, never hosted a server) in your server files, there is a place to change HTTP setting on/off. It should be a config file, but again, I have never hosted a server, so I don't know. I'm sure someone around here knows.
yttrium #15
Posted 18 September 2012 - 05:03 PM
Are we talking tekkit settings or OS settings?

I'm hosting it on GNU/Linux Ubuntu 12.04 LTS (32bit).

I don't see why HTTP settings would mess ComputerCraft up though, it isn't like it doesn't work - people can access the server externally.
GopherAtl #16
Posted 18 September 2012 - 05:26 PM
Now a system setting, a cc setting. it's in the server directory, in .minecraft/config/ change enable_http from 0 to 1
Cranium #17
Posted 18 September 2012 - 05:44 PM
HTTP settings are for allowing the HTTP API to be loaded. The error you posted there would just mean that the number value is neither a 1 or 0, which are the only two options it can be. 1 is on, 0 is off. I know some new server owners put in their server IP there, and should not be.
yttrium #18
Posted 18 September 2012 - 08:04 PM
mod_ComputerCraft.cfg in ~/tekkit/config/ ?

These are the lines in that file:

#MLProperties: name (type:default) min:max -- information
#MLProp : computerBlockID (int:207)
#MLProp : diskDriveBlockID (int:208)
#MLProp : diskItemID (int:4000)
#MLProp : diskDriveGUIID (int:100)
#MLProp : enableAPI_http (int:0)
#MLProp : modem_range (int:64)
#MLProp : modem_rangeDuringStorm (int:1)
#
#Tue Sep 18 11:25:04 EDT 2012
terminal_width=50
terminal_textColour_g=255
modem_rangeDuringStorm=16
computerBlockID=207
diskItemID=4000
diskDriveBlockID=208
enableAPI_http=0
terminal_textColour_b=255
checksum=440
terminal_textColour_r=255
modem_range=64
diskDriveGUIID=100
terminal_height=18

Changing
enableAPI_http=0
to
enableAPI_http=1
doesn't fix anything. Adding a line
enable_http=1
also doesn't fix anything.
Luanub #19
Posted 18 September 2012 - 09:50 PM
Can other players on the server use computers? Have you tried it in SSP?

The config files options looks good.

These are the only real errors that I see in the logs. The other "warnings" are all benign.

2012-09-18 10:27:58 [SEVERE] dan200.computer.core.FileSystemException: No such directory
2012-09-18 10:27:58 [SEVERE]	at dan200.computer.core.FileSystem.<init>(FileSystem.java:67)
2012-09-18 10:27:58 [SEVERE]	at dan200.computer.core.Computer.initFileSystem(Computer.java:759)
2012-09-18 10:27:58 [SEVERE]	at dan200.computer.core.Computer.access$30(Computer.java:753)
2012-09-18 10:27:58 [SEVERE]	at dan200.computer.core.Computer$58.execute(Computer.java:1794)
2012-09-18 10:27:58 [SEVERE]	at dan200.computer.core.ComputerThread$1$1.run(ComputerThread.java:50)
2012-09-18 10:27:58 [SEVERE]	at java.lang.Thread.run(Thread.java:722)

This makes me think that there are files missing inside of the mods/ComputerCraft folder for the server.

Check this folder and make sure that the 4 .class files listed in that error message are present "Tekkit ServermodsComputerCraftdan200computercore" (there should be 91 total files in this folder)

If they are there, the might be corrupt or something. Either way I would back up your save files and re-install the server software using a fresh download. If that don't work, I'd contact the guys at Tekkit.
Cloudy #20
Posted 18 September 2012 - 11:23 PM
For some reason it looks like it can't create the directory for the Computer. Which is weird. Try looking in the world folder in your server folder - is there a Computer folder?
yttrium #21
Posted 19 September 2012 - 12:49 AM
Works fine in SSP, and on my friend's server.

Those files are all there:
t4w@applesapplesapples:~/tekkit$ cd ./mods/ComputerCraft/dan200/computer/core
t4w@applesapplesapples:~/tekkit/mods/ComputerCraft/dan200/computer/core$ ls
Computer$10.class  Computer$25.class  Computer$3.class	 Computer$53.class  Computer$68.class				   ComputerThread.class
Computer$11.class  Computer$26.class  Computer$40.class    Computer$54.class  Computer$69.class				   ComputerThread$Task.class
Computer$12.class  Computer$27.class  Computer$41.class    Computer$55.class  Computer$6.class				    Computer$Timer.class
Computer$13.class  Computer$28.class  Computer$42.class    Computer$56.class  Computer$70.class				   FileSystem.class
Computer$14.class  Computer$29.class  Computer$43.class    Computer$57.class  Computer$71.class				   FileSystemException.class
Computer$15.class  Computer$2.class   Computer$44.class    Computer$58.class  Computer$7.class				    FileSystem$Mount.class
Computer$16.class  Computer$30.class  Computer$45.class    Computer$59.class  Computer$8.class				    HTTPRequest$1.class
Computer$17.class  Computer$31.class  Computer$46.class    Computer$5.class   Computer$9.class				    HTTPRequest.class
Computer$18.class  Computer$32.class  Computer$47$1.class  Computer$60.class  Computer$Alarm.class			    HTTPRequestException.class
Computer$19.class  Computer$33.class  Computer$47.class    Computer$61.class  Computer.class					  IComputerEnvironment.class
Computer$1.class   Computer$34.class  Computer$48.class    Computer$62.class  Computer$Event.class			    Terminal.class
Computer$20.class  Computer$35.class  Computer$49.class    Computer$63.class  Computer$PeripheralWrapper$1.class
Computer$21.class  Computer$36.class  Computer$4.class	 Computer$64.class  Computer$PeripheralWrapper$2.class
Computer$22.class  Computer$37.class  Computer$50.class    Computer$65.class  Computer$PeripheralWrapper.class
Computer$23.class  Computer$38.class  Computer$51.class    Computer$66.class  ComputerThread$1$1.class
Computer$24.class  Computer$39.class  Computer$52.class    Computer$67.class  ComputerThread$1.class


There is no Computer or ComputerCraft folder (or anything of the sort) in my world folder.
yttrium #22
Posted 19 September 2012 - 12:55 AM
Cloudy, you must be a genius.

You said that it can't write a folder.

I decided I would try giving the launch script root permissions.

Suddenly, it works.
Cloudy #23
Posted 19 September 2012 - 06:52 PM
Cloudy, you must be a genius.

You said that it can't write a folder.

I decided I would try giving the launch script root permissions.

Suddenly, it works.

Heh. Only use that as a stop gap. Set up permissions correctly for the "world" folder in the minecraft folder.
yttrium #24
Posted 20 September 2012 - 01:55 PM
Will do.

I don't know why it's accessing the world "world" though. The map data is actually being loaded from the map set in server.properties - why is it making a ComputerCraft folder (and using it) in a different world?
Cloudy #25
Posted 21 September 2012 - 08:33 AM
Will do.

I don't know why it's accessing the world "world" though. The map data is actually being loaded from the map set in server.properties - why is it making a ComputerCraft folder (and using it) in a different world?

It is making a "computer" folder in "world" because that location was hardcoded.

As of ComputerCraft 1.4 it uses the world set in the properties folder.