Hi Jack,
Thank you very much. As you have instructed I have added all jar files in
the dist/lib folder. Then it asked for a AttributeTableConfig.xml file which
I then provided. After that I am getting following error.
run:
2011-10-28 14:04:27,986 INFO [main:Log.java:164]: Loading resources from
org/biomart/configurator/resources/messages
2011-10-28 14:04:27,999 INFO [main:Log.java:164]: Done loading resources
2011-10-28 14:04:28,004 ERROR [main:Log.java:208]: load properties error
2011-10-28 14:04:28,005 ERROR [main:Log.java:208]: load properties error
2011-10-28 14:04:28,422 INFO [main:Log.java:164]: Loading resources from
org/biomart/configurator/resources/messages
2011-10-28 14:04:28,423 INFO [main:Log.java:164]: Done loading resources
2011-10-28 14:04:28,423 ERROR [main:Log.java:208]: load properties error
2011-10-28 14:04:28,424 ERROR [main:Log.java:208]: load properties error
Oct 28, 2011 2:04:28 PM owlextract.Main main
SEVERE: null
org.biomart.api.BioMartApiException: java.lang.NullPointerException
at
org.biomart.api.factory.XmlMartRegistryFactory.<init>(XmlMartRegistryFactory.java:33)
at cosmicAccess.accessCosmic.main(accessCosmic.java:21)
at owlextract.Main.main(Main.java:26)
Caused by: java.lang.NullPointerException
at
org.biomart.objects.objects.MartConfiguratorObject.<init>(MartConfiguratorObject.java:131)
at org.biomart.objects.portal.Portal.<init>(Portal.java:25)
at
org.biomart.configurator.controller.MartController.constructMartRegsitry(MartController.java:1683)
at
org.biomart.configurator.controller.MartController.requestCreateRegistryFromXML(MartController.java:1647)
at
org.biomart.objects.objects.MartRegistry.<init>(MartRegistry.java:57)
at
org.biomart.api.factory.XmlMartRegistryFactory.<init>(XmlMartRegistryFactory.java:31)
... 2 more
BUILD SUCCESSFUL (total time: 11 seconds)
There are no changes on the code or Registry XML file. I will grateful if
you can help in problem.
Thank you very much.
Regards,
Manjula
On Fri, Oct 28, 2011 at 1:48 AM, Jack Hsu <[email protected]> wrote:
> Hi Manjula,
>
> It seems like you may be missing a required library. Can you please add all
> the jar files under dist/lib folder? (not just biomart-0.8.jar)
>
> Let me know if you have further issues.
>
> -jack
>
>
> From: Manjula Dharmawardhana <[email protected]>
> Date: Thu, 27 Oct 2011 02:24:03 -0400
> To: BioMart Users <[email protected]>
> Subject: [BioMart Users] Error using Java API
>
> Hi All,
> Thank you very much for all the help for the previous questions. Sadly I am
> stuck again.
> Here is my code (Same code given at Biomart Central)
>
> package cosmicAccess;
>
> import org.biomart.api.factory.*;
> import org.biomart.api.Portal;
> import org.biomart.api.Query;
>
> /*
> * This is a runnable Java class that executes the query.
> * Please adapt this code as needed, and DON'T forget to change the
> xmlPath.
> */
>
> public class accessCosmic {
> public static void main(String[] args) throws Exception {
> String xmlPath = "C:/cosmicRegistry.xml"; // Needs to be changed
>
> MartRegistryFactory factory = new XmlMartRegistryFactory(xmlPath,
> null);
> Portal portal = new Portal(factory, null);
>
> Query query = new Query(portal);
> query.setProcessor("TSV");
> query.setClient("biomartclient");
> query.setLimit(-1);
> query.setHeader(true);
>
> Query.Dataset ds = query.addDataset("COSMIC54", "COSMIC54_config");
> ds.addFilter("sample_source", "primary");
> ds.addFilter("tumour_source", "primary");
> ds.addFilter("site_primary", "cervix");
> ds.addAttribute("id_sample");
> ds.addAttribute("tumour_source");
> ds.addAttribute("id_gene");
> ds.addAttribute("accession_number");
> ds.addAttribute("pubmed_pmid");
>
> // Print to System.out, but you can pass in any
> java.io.OutputStream
> query.getResults(System.out);
>
> System.exit(0);
> }
> }
>
> Here is the Registry file in C:/cosmicRegistry.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- <!DOCTYPE MartRegistry> -->
> <MartRegistry>
> <MartURLLocation
> database="cosp"
> default="1"
> displayName="COSMIC (SANGER UK)"
> host="www.sanger.ac.uk"
> includeDatasets=""
> martUser=""
> name="CosmicMart"
> path="/genetics/CGP/cosmic/biomart/martservice"
> port="80"
> redirect="1"
> serverVirtualSchema="default"
> visible="1"
> />
> </MartRegistry>
>
> When I run this I get this error.
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> net/infonode/docking/View
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
> at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
> at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
> 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)
> at
> org.biomart.api.factory.XmlMartRegistryFactory.<init>(XmlMartRegistryFactory.java:23)
> at cosmicAccess.accessCosmic.main(accessCosmic.java:21)
> at owlextract.Main.main(Main.java:26)
> Caused by: java.lang.ClassNotFoundException: net.infonode.docking.View
> 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)
> ... 15 more
> Java Result: 1
> BUILD SUCCESSFUL (total time: 2 seconds)
>
> I am running this in windows 7 environment. I have added the biomart0.8.jre
> as a lib to my Netbeans project. I compiled it using Ant.
> I will be grateful if anyone can point me to the error. Thank you very much
> for all the support and the great tool.
>
> Regards,
> Manjula
>
>
> --
>
> * <http://lk.linkedin.com/in/manjulapra>
> *
>
> *This communication (including any attachments) is intended for the use of
> the intended recipient only and may contain information that is
> confidential, privileged or legally protected. Any unauthorized use or
> dissemination of this communication is strictly prohibited. If you have
> received this communication in error, please immediately notify
> [email protected] by return e-mail message and delete all copies of the
> original communication. Thank you for your cooperation.*
>
>
--
* <http://lk.linkedin.com/in/manjulapra>
*
*This communication (including any attachments) is intended for the use of
the intended recipient only and may contain information that is
confidential, privileged or legally protected. Any unauthorized use or
dissemination of this communication is strictly prohibited. If you have
received this communication in error, please immediately notify
[email protected] by return e-mail message and delete all copies of the
original communication. Thank you for your cooperation.*
_______________________________________________
Users mailing list
[email protected]
https://lists.biomart.org/mailman/listinfo/users