[Biojava-l] Exception found in GenbankSequenceDB -- getSequence
Johnny Hujol
johnny.hujol at comcast.net
Mon Nov 22 21:09:13 EST 2004
Hi,
I'm using biojava-1.30-jdk14.jar with
C:\>java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode)
On W2000 SP2.
When running this little Java code:
Sequence seqObject = null;
try {
seqObject = genbankSequenceDB.getSequence(text);
SeqIOTools.writeGenbank(System.out, seqObject);
} catch (Exception e1) {
e1.printStackTrace();
}
String sequence = seqObject.seqString();
This throws the following exception:
got data from
http://www.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nucleotide&id=55740946
Exception found in GenbankSequenceDB -- getSequence
org.biojava.bio.BioException: Could not read sequence
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at
org.jfb.chp1.listing1_6.SequenceForm1_6$4.focusLost(SequenceForm1_6.java:272)
at java.awt.AWTEventMulticaster.focusLost(AWTEventMulticaster.java:172)
at java.awt.Component.processFocusEvent(Component.java:5380)
at java.awt.Component.processEvent(Component.java:5244)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at
java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810)
at
java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:836)
at
java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:526)
at java.awt.Component.dispatchEventImpl(Component.java:3841)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Process finished with exit code 0
The url looks good but it seems that the parser does not get anything
from the data returned by the server.
What's happening?
Any help would be appreciated.
Cheers,
J
More information about the Biojava-l
mailing list