[kepler-dev] Trying own script to start Kepler GUI, Variable Config.xml is null
Christopher Brooks
cxh at eecs.berkeley.edu
Wed Mar 18 19:20:19 PDT 2009
Hi Madhu,
It looks like common.jar is not in your classpath of the script
you include? You have /Users/madhu/NewKepler/common/lib/config.xml
at the end, but this will not work, classpath does not include
individual files like this, classpath includes directories or
jars.
BTW - It looks like the error message failed to print your classpath?
Did you truncate that output (it can be long)? I just
checked and the _classpath() method in Config.java does work.
Note that you can edit Config.xml and print the classpath by
adding
log.debug("Classpath was " + _classpath());
If you edit kepler/loader/src/log4j.properties
and add
log4j.logger.org.ecoinformatics.util.Config=DEBUG
and rerun with
ant run
You will see the debugging message that will show you where your
config.xml file is located. For example, I get:
[run] DEBUG (org.ecoinformatics.util.Config:<init>:135) Opening
config.xml file found at: /Users/cxh/src/kepler/common/lib/config.xml
_Christopher
madhu wrote:
> Hi Chris,
>
> Here is my script
>
> java -cp
> /Users/madhu/NewKepler/provenance/target/provenance.jar:/Users/madhu/NewKepler/loader/target/loader.jar:/Users/madhu/NewKepler/util/target/ut
> il.jar:/Users/madhu/NewKepler/core/target/core.jar:/Users/madhu/NewKepler/ptolemy/target/ptolemy.jar:/Users/madhu/NewKepler/actors/target/actors.jar:/
> Users/madhu/NewKepler/directors/target/directors.jar:/Users/madhu/NewKepler/core/lib/jar/commons-httpclient-2.0-rc2.jar:/Users/madhu/NewKepler/core/li
> b/jar/jython.jar:/Users/madhu/NewKepler/core/lib/jar/jdom.jar:/Users/madhu/NewKepler/core/lib/jar/commons-logging.jar:/Users/madhu/NewKepler/core/lib/
> jar/base-jars/sms/xercesImpl.jar:/Users/madhu/dbdrivers/oracle/ojdbc14.jar:/Users/madhu/NewKepler/loader/lib/jar/ant.jar:/Users/madhu/NewKepler/build-
> area/ant-tasks/target/kepler-tasks.jar:/Users/madhu/NewKepler/common/lib/jar/org.eclipse.osgi_3.4.0.v20080605-1900.jar:/Users/madhu/NewKepler/common/lib/config.xml
> org.kepler.loader.Kepler
>
> I have config.xml included. Also I have added it to the common.jar
> manually. Here is the list of the files in common.jar
> 0 Wed Mar 18 18:53:22 PDT 2009 META-INF/
> 95 Wed Mar 18 18:53:20 PDT 2009 META-INF/MANIFEST.MF
> 19660 Wed Mar 18 18:31:16 PDT 2009 config.xml
>
> But I still get the similar message
>
> Unable to start application.
> java.lang.ExceptionInInitializerError
> at org.ecoinformatics.util.Config.<clinit>(Config.java:92)
> at org.kepler.gui.KeplerApplication.main(KeplerApplication.java:118)
> at org.kepler.loader.Kepler.main(Kepler.java:105)
> Caused by: java.io.FileNotFoundException: Failed to find config.xml in
> the classpath:
>
> THanks
> --Madhu
>
>
>
>
> -----Original Message-----
> From: Christopher Brooks [mailto:cxh at eecs.berkeley.edu]
> Sent: Wed 3/18/2009 6:35 PM
> To: madhu
> Cc: kepler-dev at ecoinformatics.org
> Subject: Re: [kepler-dev] Trying own script to start Kepler GUI,
> Variable Config.xml is null
>
> Hi Madhu,
> I saw that error earlier today, so I edited Config.java and added
> better error messages. However, then I could not replicate the error.
> I think the problem is that config.xml cannot be found in the
> classpath.
>
> Try updating kepler/core/src/org/ecoinformatics/util/Config.java
> and re-running.
>
> _Christopher
>
> madhu wrote:
> >
> > Hi there,
> >
> > I am trying to create script that could run kepler GUI. I am getting
> > following error
> > with Config.xml being null. Technically it should be
> > /Users/madhu/NewKepler/common/lib/config.xml.
> > However when I start with ant run from build area
> > Config.xml:/Users/madhu/NewKepler/common/lib/config.xml
> > is set right. I am certainly missing something in my script, if anyone
> > can point out what it is that would be great.
> >
> > Thanks
> > --Madhu
> >
> > Config.xml: null
> > Unable to start application.
> > java.lang.ExceptionInInitializerError
> > at
> org.kepler.gui.KeplerApplication.main(KeplerApplication.java:118)
> > at org.kepler.loader.Kepler.main(Kepler.java:105)
> > Caused by: java.lang.RuntimeException: Unspecified error creating config
> > object from "null"
> > at org.ecoinformatics.util.Config.<init>(Config.java:151)
> > at org.ecoinformatics.util.Config.<clinit>(Config.java:88)
> > ... 2 more
> > Caused by: java.lang.NullPointerException
> > at java.io.FileInputStream.<init>(FileInputStream.java:103)
> > at java.io.FileInputStream.<init>(FileInputStream.java:66)
> > at org.ecoinformatics.util.Config.<init>(Config.java:136)
> > ... 3 more
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Kepler-dev mailing list
> > Kepler-dev at kepler-project.org
> > http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev
>
> --
> Christopher Brooks (cxh at eecs berkeley edu) University of California
> CHESS Executive Director US Mail: 337 Cory Hall
> Programmer/Analyst CHESS/Ptolemy/Trust Berkeley, CA 94720-1774
> ph: 510.643.9841 fax:510.642.2718 (Office: 545Q Cory)
> home: (F-Tu) 707.665.0131 (W-F) 510.655.5480
>
--
Christopher Brooks (cxh at eecs berkeley edu) University of California
CHESS Executive Director US Mail: 337 Cory Hall
Programmer/Analyst CHESS/Ptolemy/Trust Berkeley, CA 94720-1774
ph: 510.643.9841 fax:510.642.2718 (Office: 545Q Cory)
home: (F-Tu) 707.665.0131 (W-F) 510.655.5480
More information about the Kepler-dev
mailing list