> Hi, iam a newbie.When i use the below code, i was unable to get the
> required info from the database. i know there are many errors please
> let me know how to rectify them.
<snipped code>
People will be more inclined to answer your question and help you with your
problem if you're more specific as to what problem(s) you are having.
Having said that, I've had a quick look at your code and the first thing I
noticed was the use of system.out and system.err - remember that Java is
Case Sensitive, so that should read System.err and System.out .
Fix those, and run again - maybe these will solve your problem. If not, feel
free to reply, but please include the specific error you are receiving.
Best regards,
JC
--
http://jcsnippets.atspace.com/
a collection of source code, tips and tricks
learner9@gmail.com - 26 Mar 2006 22:53 GMT
Hi, Iam trying to compile and run the above code to get an idea to
write the further code for another database. I fixed that problem, but
still i got the below errors.
EUtilParseExample.java:1: package javax.xml.stream does not exist
import javax.xml.stream.*;
^
EUtilParseExample.java:2: package javax.xml.stream.events does not
exist
import javax.xml.stream.events.* ;
^
EUtilParseExample.java:17: cannot resolve symbol
symbol : class XMLInputFactory
location: class EUtilParseExample
XMLInputFactory factory = XMLInputFactory.newInstance();
^
EUtilParseExample.java:17: cannot resolve symbol
symbol : variable XMLInputFactory
location: class EUtilParseExample
XMLInputFactory factory = XMLInputFactory.newInstance();
^
EUtilParseExample.java:19: cannot resolve symbol
symbol : class XMLEventReader
location: class EUtilParseExample
XMLEventReader r = factory.createXMLEventReader(filename, input);
^
EUtilParseExample.java:22: cannot resolve symbol
symbol : class XMLEvent
location: class EUtilParseExample
XMLEvent e = r.nextEvent();
^
EUtilParseExample.java:48: cannot resolve symbol
symbol : class XMLInputFactory
location: class EUtilParseExample
XMLInputFactory factory = XMLInputFactory.newInstance();
^
EUtilParseExample.java:48: cannot resolve symbol
symbol : variable XMLInputFactory
location: class EUtilParseExample
XMLInputFactory factory = XMLInputFactory.newInstance();
^
EUtilParseExample.java:50: cannot resolve symbol
symbol : class XMLEventReader
location: class EUtilParseExample
XMLEventReader r = factory.createXMLEventReader(filename, in);
^
EUtilParseExample.java:53: cannot resolve symbol
symbol : class XMLEvent
location: class EUtilParseExample
XMLEvent e = r.nextEvent();
^
10 errors
Thanks,
L
Bill Karwin - 26 Mar 2006 23:04 GMT
> EUtilParseExample.java:1: package javax.xml.stream does not exist
> import javax.xml.stream.*;
The javax.xml.stream package is part of the Java Web Services Developer
Pack. It is not included in the J2SE SDK. Do you have the JWSDP product
installed, and can it be located by your CLASSPATH as you compile?
http://java.sun.com/webservices/jwsdp/
Regards,
Bill K.
"90% of Java issues are classpath issues."
Roedy Green - 27 Mar 2006 04:01 GMT
>The javax.xml.stream package is part of the Java Web Services Developer
>Pack. It is not included in the J2SE SDK. Do you have the JWSDP product
>installed, and can it be located by your CLASSPATH as you compile?
>
>http://java.sun.com/webservices/jwsdp/
in general when you can't find a jar, check out
http://mindprod.com/jgloss/wherejars.html
to tell you which jar to look in and where to download the jar.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
learner9@gmail.com - 27 Mar 2006 04:11 GMT
Hello,
I just have downloaded the jwsdp from the url you mentioned and here
is my path when I typed in cmd window
C:\Documents and Settings\Administrator>path
PATH=C:\texmf\miktex\bin;C:\MiKTeX\texmf\miktex\bin;C:\Program
Files\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\
Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program
Files\Common Files\Roxio Shared\DLLShared;D:\j2sdk1.4.2_04\bin
;C:\Program
Files\Perl\site\lib;C:\MiKTeX\texmf\miktex\bin;C:\texmf\miktex\bin;C:\Sun\jwsdp-2.0\jwsdp-shared\bin;C:\Sun\jwsdp-2.0\
jwsdp-shared\bin;C:\texmf\miktex\bin;C:\MiKTeX\texmf\miktex\bin;C:\Program
Files\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDO
WS\System32\Wbem;C:\Program Files\Microsoft SQL
Server\80\Tools\BINN;C:\Program Files\Common Files\Roxio
Shared\DLLShared;D:\j2sdk
1.4.2_04\bin;C:\Program
Files\Perl\site\lib;C:\MiKTeX\texmf\miktex\bin;C:\texmf\miktex\bin;C:\Sun\jwsdp-2.0\jwsdp-shared\bin;C:\PR
OGRA~1\COMMON~1\MUVEET~1\030625
in which
D:\j2sdk1.4.2_04\bin; is the java path
and
C:\Sun\jwsdp-2.0\jwsdp-shared\bin; java web services path
but I still get the same error saying that javax.xml.stream doesn't
exist.
I am missing some thing here?
Thanks
-L
learner9@gmail.com - 27 Mar 2006 04:08 GMT
Hello Bill,
I just have downloaded the jwsdp from the url you mentioned and here
is my path when I typed in cmd window
C:\Documents and Settings\Administrator>path
PATH=C:\texmf\miktex\bin;C:\MiKTeX\texmf\miktex\bin;C:\Program
Files\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\
Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program
Files\Common Files\Roxio Shared\DLLShared;D:\j2sdk1.4.2_04\bin
;C:\Program
Files\Perl\site\lib;C:\MiKTeX\texmf\miktex\bin;C:\texmf\miktex\bin;C:\Sun\jwsdp-2.0\jwsdp-shared\bin;C:\Sun\jwsdp-2.0\
jwsdp-shared\bin;C:\texmf\miktex\bin;C:\MiKTeX\texmf\miktex\bin;C:\Program
Files\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDO
WS\System32\Wbem;C:\Program Files\Microsoft SQL
Server\80\Tools\BINN;C:\Program Files\Common Files\Roxio
Shared\DLLShared;D:\j2sdk
1.4.2_04\bin;C:\Program
Files\Perl\site\lib;C:\MiKTeX\texmf\miktex\bin;C:\texmf\miktex\bin;C:\Sun\jwsdp-2.0\jwsdp-shared\bin;C:\PR
OGRA~1\COMMON~1\MUVEET~1\030625
in which
D:\j2sdk1.4.2_04\bin; is the java path
and
C:\Sun\jwsdp-2.0\jwsdp-shared\bin; java web services path
but I still get the same error saying that javax.xml.stream doesn't
exist.
I am missing some thing here?
Thanks
-L
Bill Karwin - 27 Mar 2006 05:58 GMT
> but I still get the same error saying that javax.xml.stream doesn't exist.
>
> I am missing some thing here?
Yes, you are indeed missing something, if you are programming in Java.
The PATH is different from the CLASSPATH. The former tells the Windows
shell where to find executables. The latter tells Java where to find
classes and other resources.
There is no sharing of information between the PATH and the CLASSPATH. They
are two separate animals.
Read this document:
http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html
Regards,
Bill K.
Roedy Green - 27 Mar 2006 06:27 GMT
>Yes, you are indeed missing something, if you are programming in Java.
>
>The PATH is different from the CLASSPATH.
see http://mindprod.com/jgloss/path.html
http://mindprod.com/jgloss/classpath.html

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
learner9@gmail.com - 29 Mar 2006 05:49 GMT
Hello,
I did add the path to the class path as below
set classpath=C:\Sun\jwsdp-2.0\jwsdp-shared\bin
But it still complains about the complains about the
EUtilParseExample.java:2: package javax.xml.stream.events does not
exist
import javax.xml.stream.events.* ;
Have I done some thing wrong in setting up the class path?
Thanks
-L
^
Roedy Green - 29 Mar 2006 07:01 GMT
>Have I done some thing wrong in setting up the class path?
It is easier to put all the jars you need that you have downloaded in
the ext directories. see http://mindprod.com/jgloss/classpath.html

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
learner9@gmail.com - 29 Mar 2006 13:38 GMT
Hello,
I did add the path to the class path as below
set classpath=C:\Sun\jwsdp-2.0\jwsdp-shared\bin
But it still complains about the complains about the
EUtilParseExample.java:2: package javax.xml.stream.events does not
exist
import javax.xml.stream.events.* ;
Have I done some thing wrong in setting up the class path?
Thanks
-L
Cos - 29 Mar 2006 19:01 GMT
Add the location of the appropriate jar files. I'm asuuming they reside
somewhere else, but not in the .../bin directory.
And it's good to RTFM sometimes - some Sun's docs or dummy books
Cos
learner9@gmail.com - 30 Mar 2006 21:23 GMT
I added the location of all the jar files. But still the same
errors!!!!
Thanks,
L
>URL u = new URL (urlSearch + "db=gene&retmax=10000&term=cmyc");
>input = u.openStream();
to read from an URL you normally do an HTTP GET. You have left out
quite a bit. See http://mindprod.com/applets/fileio.html
for sample code.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.