Hi Micha,

in writing a plugin to batch import genepix and nimblegen files i have 
come across the
following:

you can only call dc.commit(); once.. after that, the connection is 
closed.. maybe check if
anything gets committed inbetween method calls.

sometimes you have to call dc.reattachItem(Item); before you can start 
using it. try to
reattach the arrayDesign and cdfFile before running any methods on them.

-keith

Micha Bayer wrote:
> Hi,
>
> I am trying to add Affymetrix support for the batch import plugin I have
> been working on, and I am having trouble getting things to work with the
> Affymetrix class. Is there a unit test for this class that I could look
> at for finding out about proper use of this class? I may just not be
> doing things right here.
>
> I get exceptions from two of the method calls -- setCdfFile(ArrayDesign
> design, File file) and setCelFile(RawBioAssay rawBioAssay, File file).
>
> setCdfFile(ArrayDesign design, File file) throws a NullPointerException
> which is not related to my own code: 
>
> Affymetrix.setCdfFile(arrayDesign, cdfFile);
>
> I have double checked and both the arrayDesign and cdfFile objects are
> not null. The stacktrace looks like this:
>
> java.lang.NullPointerException
>         at
> net.sf.basedb.core.HibernateUtil.createQuery(HibernateUtil.java:1238)
>         at
> net.sf.basedb.core.HibernateUtil.getPredefinedQuery(HibernateUtil.java:1
> 387)
>         at net.sf.basedb.core.AnyToAny.getByName(AnyToAny.java:129)
>         at
> net.sf.basedb.core.AnyToAny.getNewOrExisting(AnyToAny.java:169)
>         at net.sf.basedb.core.Affymetrix.setCdfFile(Affymetrix.java:86)
>         at
> sbrn.base.BatchDataImport.importData(BatchDataImport.java:350)
>         at sbrn.base.BatchDataImporter.run(BatchDataImporter.java:137)
>         at
> net.sf.basedb.core.PluginExecutionRequest.invoke(PluginExecutionRequest.
> java:82)
>         at
> net.sf.basedb.core.InternalJobQueue$JobRunner.run(InternalJobQueue.java:
> 420)
>         at java.lang.Thread.run(Thread.java:595)
>
>
> Further down the line in my code I then try to attach the cel files to
> my raw bioassays (I have tested this independently from the above
> problem with a array design that already has a cdf file associated with
> it):
>
> Affymetrix.setCelFile(rawBioAssays[i], dataFiles[i]);         
>
> ...and this gives me the following exception:
>
>
> net.sf.basedb.core.ConnectionClosedException: The connection has been
> closed.
>         at net.sf.basedb.core.DbControl.getItem(DbControl.java:696)
>         at
> net.sf.basedb.core.RawBioAssay.getArrayDesign(RawBioAssay.java:382)
>         at net.sf.basedb.core.Affymetrix.setCelFile(Affymetrix.java:169)
>         at
> sbrn.base.BatchDataImport.importData(BatchDataImport.java:371)
>         at sbrn.base.BatchDataImporter.run(BatchDataImporter.java:137)
>         at
> net.sf.basedb.core.PluginExecutionRequest.invoke(PluginExecutionRequest.
> java:82)
>         at
> net.sf.basedb.core.InternalJobQueue$JobRunner.run(InternalJobQueue.java:
> 420)
>         at java.lang.Thread.run(Thread.java:595)
>
> This is despite the fact that I have a check for a closed connection
> immediately preceding my method call, so the connection is definitely
> open before Affymetrix.setCelFile is called. 
>
> Any help would be much appreciated.
>
> Cheers
>
> Micha
>
> ==================================
> Dr Micha M Bayer
> Bioinformatics Specialist
> Genetics Programme
> The Scottish Crop Research Institute
> Invergowrie
> Dundee
> DD2 5DA
> Scotland, UK
> Telephone +44(0)1382 562731 ext. 2309
> Fax +44(0)1382 562426
> http://www.scri.sari.ac.uk/MichaBayer.htm
> =============================
>  
>
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> SCRI, Invergowrie, Dundee, DD2 5DA.  
> The Scottish Crop Research Institute is a charitable company limited by 
> guarantee. 
> Registered in Scotland No: SC 29367.
> Recognised by the Inland Revenue as a Scottish Charity No: SC 006662.
>
>
> DISCLAIMER:
>
> This email is from the Scottish Crop Research Institute, but the views 
> expressed by the sender are not necessarily the views of SCRI and its 
> subsidiaries.  This email and any files transmitted with it are confidential 
> to the intended recipient at the e-mail address to which it has been 
> addressed.  It may not be disclosed or used by any other than that addressee.
> If you are not the intended recipient you are requested to preserve this 
> confidentiality and you must not use, disclose, copy, print or rely on this 
> e-mail in any way. Please notify [EMAIL PROTECTED] quoting the 
> name of the sender and delete the email from your system.
>
> Although SCRI has taken reasonable precautions to ensure no viruses are 
> present in this email, neither the Institute nor the sender accepts any 
> responsibility for any viruses, and it is your responsibility to scan the 
> email 
> and the attachments (if any).
>
>
> -------------------------------------------------------------------------
> 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]
>
>   

-- 
Keith Ching, Ph.D.
Bioinformatics, Laboratory of Gene Regulation
Ludwig Institute for Cancer Research
9500 Gilman Drive, #0653
CMM East, Room 3020
La Jolla, CA 92093-0653

[EMAIL PROTECTED]
858-822-5767


-------------------------------------------------------------------------
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