Navigation


execute zonefiles2db.sh and throws NullPointerException

jackie.wong

Member since: 2015-07-02 11:59

Added: 2015-07-13 03:49

I use the samplezone.org to save records into Mysql Database.

When I run the sample file executing zonefiles2db.sh , it saves the records successfully.Howerer , I change the records of 'name' , 'primaryDNS' , 'serial' , 'content' and execute zonefiles2db.sh, it shows the log below:

Exception in thread "main" java.lang.NullPointerException
        at se.unlogic.eagledns.utils.PrimaryZones2DB.importZones(PrimaryZones2DB.java:50)
        at se.unlogic.eagledns.utils.PrimaryZones2DB.main(PrimaryZones2DB.java:36)
 
Can anyone help me to solve this problem?
 
PS: here is my samplezone.org file : 
 
test.hkbn.com.hk. IN    SOA   www.test.hkbn.com.hk.  jackie.wong@cs.hkbn.com.hk  (
                                        20150713     ; Serial
                                        5M     ; Refresh
                                        2M    ; Retry
                                        1D     ; Expiry
                                        5M )   ; Minimum
@                       IN      NS      www.test.hkbn.com.hk.
@                       IN      A       192.168.212.136
dns                     IN      A       192.168.212.136
mail                    IN      A       192.168.212.136
www                     IN      A       192.168.212.136
ftp                     IN      A       192.168.212.136

 

jackie.wong

Member since: 2015-07-02 11:59

Added: 2015-07-13 08:18

When I just run the shell script according to the base 'samplezone.org' file, there are no exceptions throwing. However, after I modify the 'samplezone.org.' to another domain name at the beginning of that file, it throws 'NullPointerException'  out. 

I don't know whether the org files use as a file or database records.