Emil Lundberg wrote:
> Hi all,
> 
> We are trying to go from BASE 2 RC1 to 2.0, and neither updating nor  
> initializing a new database seems to be working properly. Question is;  
> is it just us, or a BASE/Java/MySQL versions mismatch? If the latter,  
> are there any officially recommended/supported versions for BASE 2?
> 
> Notes:
> - BASE 2 RC1 (compiled or binary) works OK (and can be rolled back, so  
> I don't suspect the system's broken by all the fiddling).
> - It's not a password problem; setting it wrong in either base.config  
> or to the scripts produces the expected error messages.
> 
> Any help would be greatly appreciated!
> 
> TIA,
> 
> Emil / Linnaeus Centre for Bioinformatics
> 
> 
> * System specs
> Solaris 10 / SPARC, 6 GB, in a zone
> JDK 1.5.0_01
> MySQL 4.1.18
> Tomcat 5.5
> 
> * Problem 1: using binary BASE 2.0
> When running the 'updatedb.sh' script, java crashes after building the  
> initial database:
> 
> [0%]    Building database........................
> [30%]   Database built successfully.
> 
> java.lang.NullPointerException
>          at net.sf.basedb.core.Update.getSchemaVersion(Update.java:319)
>          at  
> net.sf.basedb.core.Update.adjustExistingItems(Update.java:599)
>          at net.sf.basedb.install.InitDB.main(InitDB.java:66)

I have checked the code and it turns out that it is currently not 
possible to update the RC1 release. The schemaVersion stuff that is 
triggering the NullPointerException was added after the RC1 release to 
make it easier to upgrade! If you have important data maybe we can fix 
this for the 2.0.1 release.


> Populating a new database with 'initdb.sh' runs into similar problems:
> 
> [0%]    Building database.............................
> [30%]   Database built successfully.
> [35%]   Initialising database...
> 
> java.lang.NullPointerException
>          at  
> net.sf.basedb.core.HibernateUtil.close(HibernateUtil.java:881)
>          at net.sf.basedb.core.Install.initDatabase(Install.java:605)
>          at net.sf.basedb.install.InitDB.main(InitDB.java:67)

Are you really using the released 2.0 binary here? The reason that I ask 
is that we found the same problem in the trunk of our subversion server 
this morning. But that code was only a couple of days old. We don't get 
the error with the released 2.0 binary.


> * Problem 2: compiling BASE 2.0
> Base 2.0 does build successfully from source but with LOTS of warnings  
> using Java 1.5.0_01, but no change from the above situation. Excerpt:
> 
>      [javac]  
> /install/source/base-2.0-src/src/core/net/sf/basedb/core/ 
> HibernateUtil.java:1425: warning: [unchecked] unchecked conversion
>      [javac] found   : java.util.Iterator
>      [javac] required:  
> java.util.Iterator<org.hibernate.mapping.PersistentClass>
>      [javac]             return cfg.getClassMappings();
>      [javac]                                            ^
>      [javac]  
> /install/source/base-2.0-src/src/core/net/sf/basedb/core/ 
> HibernateUtil.java:1553: warning: [unchecked] unchecked cast
>      [javac] found   : java.util.Iterator
>      [javac] required: java.util.Iterator<org.hibernate.mapping.Table>
>      [javac]             Iterator<Table> tables =  
> (Iterator<Table>)cfg.getTableMappings();
>      [javac]                                                              
>                    ^

This is a problem with the older java compiler which just ignore our 
diretions not to generate warnings. The problem was fixed in a later 
version. I don't remember if it was 1.5.0_04 or some other version.

> * Problem 3: using BASE 2.0 w/ JDK 1.5.0_08
> Suspecting a major java problem, we tried installing a local version of  
> the latest JDK (1.5.0_08) and repeating the above. Compiling is now OK,  
> and using binary or source makes no difference. However, when trying  
> either 'updatedb.sh' or 'initdb.sh', we get the exact same behaviour as  
> before (NullPointerException).
> 
> Note: BASE 2 itself (the tomcat / web service part) works as far as  
> logging in, but afaik needs to be updated/reinitialized to support the  
> new features of 2.0.

Yes, you must run the update.

/Nicklas


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
The BASE general discussion mailing list
basedb-users@lists.sourceforge.net
unsubscribe: send a mail with subject "unsubscribe" to
[EMAIL PROTECTED]

Reply via email to