[Swift-devel] Swift shell script and JAVA_HOME

David Kelly dk0966 at cs.ship.edu
Tue Jul 20 10:27:30 CDT 2010


On Tue, Jul 20, 2010 at 9:43 AM, Michael Wilde <wilde at mcs.anl.gov> wrote:

In my .soft i have +java_sub before @default in .soft. That seems to work on
> login.ci. Can you try that?
>
> Changing the ordering fixed it for me as well. Thanks.


> What error were you getting?
>

> Perhaps check if other *JAVA* env vars are still pointing to the wrong
> Java, eg:
>
> login$ env | grep -i java
> JRE_HOME=/soft/java-1.5.0_06-sun-r1/jre
> MATLAB_JAVA=/soft/matlab-7.7-r1/java
> JAVA_BINDIR=/soft/java-1.5.0_06-sun-r1/bin
> JAVA_HOME=/soft/java-1.5.0_06-sun-r1
> SDK_HOME=/soft/java-1.5.0_06-sun-r1
> JDK_HOME=/soft/java-1.5.0_06-sun-r1
> JAVA_ROOT=/soft/java-1.5.0_06-sun-r1
>
> and make sure that CLASSPATH is *not* set.
>

If I have @default first followed +java_sun, even if all of the JAVA
variables correctly pointing to sun java it will use gcj. I think this is
due to the ordering of directories in $PATH. Having users adjust their PATH
with the location of sun java ahead of directories like /usr/bin is probably
the solution.

Here are the errors I was getting:

$ swift manyparam.swift
Warning: -Xmx256M not understood. Ignoring.
log4j:ERROR Error occured while converting date.
java.lang.IllegalArgumentException: Illegal pattern character
   at java.text.SimpleDateFormat.format(java.util.Date,
java.lang.StringBuffer, java.text.FieldPosition) (/usr/lib/libgcj.so.5.0.0)
   at java.text.DateFormat.format(java.util.Date) (/usr/lib/libgcj.so.5.0.0)
   at
org.apache.log4j.helpers.PatternParser$DatePatternConverter.convert(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.helpers.PatternConverter.format(java.lang.StringBuffer,
org.apache.log4j.spi.LoggingEvent) (Unknown Source)
   at
org.apache.log4j.PatternLayout.format(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.WriterAppender.subAppend(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.WriterAppender.append(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.AppenderSkeleton.doAppend(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.Category.callAppenders(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at org.apache.log4j.Category.forcedLog(java.lang.String,
org.apache.log4j.Priority, java.lang.Object, java.lang.Throwable) (Unknown
Source)
   at org.apache.log4j.Category.debug(java.lang.Object) (Unknown Source)
   at org.griphyn.vdl.karajan.Loader.main(java.lang.String[]) (Unknown
Source)
log4j:ERROR Error occured while converting date.
java.lang.IllegalArgumentException: Illegal pattern character
   at java.text.SimpleDateFormat.format(java.util.Date,
java.lang.StringBuffer, java.text.FieldPosition) (/usr/lib/libgcj.so.5.0.0)
   at java.text.DateFormat.format(java.util.Date) (/usr/lib/libgcj.so.5.0.0)
   at
org.apache.log4j.helpers.PatternParser$DatePatternConverter.convert(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.helpers.PatternConverter.format(java.lang.StringBuffer,
org.apache.log4j.spi.LoggingEvent) (Unknown Source)
   at
org.apache.log4j.PatternLayout.format(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.WriterAppender.subAppend(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.WriterAppender.append(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.AppenderSkeleton.doAppend(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.Category.callAppenders(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at org.apache.log4j.Category.forcedLog(java.lang.String,
org.apache.log4j.Priority, java.lang.Object, java.lang.Throwable) (Unknown
Source)
   at org.apache.log4j.Category.debug(java.lang.Object) (Unknown Source)
   at org.griphyn.vdl.karajan.Loader.main(java.lang.String[]) (Unknown
Source)
log4j:ERROR Error occured while converting date.
java.lang.IllegalArgumentException: Illegal pattern character
   at java.text.SimpleDateFormat.format(java.util.Date,
java.lang.StringBuffer, java.text.FieldPosition) (/usr/lib/libgcj.so.5.0.0)
   at java.text.DateFormat.format(java.util.Date) (/usr/lib/libgcj.so.5.0.0)
   at
org.apache.log4j.helpers.PatternParser$DatePatternConverter.convert(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.helpers.PatternConverter.format(java.lang.StringBuffer,
org.apache.log4j.spi.LoggingEvent) (Unknown Source)
   at
org.apache.log4j.PatternLayout.format(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.WriterAppender.subAppend(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.WriterAppender.append(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.AppenderSkeleton.doAppend(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.Category.callAppenders(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at org.apache.log4j.Category.forcedLog(java.lang.String,
org.apache.log4j.Priority, java.lang.Object, java.lang.Throwable) (Unknown
Source)
   at org.apache.log4j.Category.debug(java.lang.Object) (Unknown Source)
   at org.griphyn.vdl.karajan.Loader.compile(java.lang.String) (Unknown
Source)
   at org.griphyn.vdl.karajan.Loader.main(java.lang.String[]) (Unknown
Source)
log4j:ERROR Error occured while converting date.
java.lang.IllegalArgumentException: Illegal pattern character
   at java.text.SimpleDateFormat.format(java.util.Date,
java.lang.StringBuffer, java.text.FieldPosition) (/usr/lib/libgcj.so.5.0.0)
   at java.text.DateFormat.format(java.util.Date) (/usr/lib/libgcj.so.5.0.0)
   at
org.apache.log4j.helpers.PatternParser$DatePatternConverter.convert(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.helpers.PatternConverter.format(java.lang.StringBuffer,
org.apache.log4j.spi.LoggingEvent) (Unknown Source)
   at
org.apache.log4j.PatternLayout.format(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.WriterAppender.subAppend(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.WriterAppender.append(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.AppenderSkeleton.doAppend(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.Category.callAppenders(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at org.apache.log4j.Category.forcedLog(java.lang.String,
org.apache.log4j.Priority, java.lang.Object, java.lang.Throwable) (Unknown
Source)
   at org.apache.log4j.Category.debug(java.lang.Object) (Unknown Source)
   at org.griphyn.vdl.karajan.Loader.compile(java.lang.String) (Unknown
Source)
   at org.griphyn.vdl.karajan.Loader.main(java.lang.String[]) (Unknown
Source)
log4j:ERROR Error occured while converting date.
java.lang.IllegalArgumentException: Illegal pattern character
   at java.text.SimpleDateFormat.format(java.util.Date,
java.lang.StringBuffer, java.text.FieldPosition) (/usr/lib/libgcj.so.5.0.0)
   at java.text.DateFormat.format(java.util.Date) (/usr/lib/libgcj.so.5.0.0)
   at
org.apache.log4j.helpers.PatternParser$DatePatternConverter.convert(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.helpers.PatternConverter.format(java.lang.StringBuffer,
org.apache.log4j.spi.LoggingEvent) (Unknown Source)
   at
org.apache.log4j.PatternLayout.format(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.WriterAppender.subAppend(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.WriterAppender.append(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.AppenderSkeleton.doAppend(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at
org.apache.log4j.Category.callAppenders(org.apache.log4j.spi.LoggingEvent)
(Unknown Source)
   at org.apache.log4j.Category.forcedLog(java.lang.String,
org.apache.log4j.Priority, java.lang.Object, java.lang.Throwable) (Unknown
Source)
   at org.apache.log4j.Category.debug(java.lang.Object) (Unknown Source)
   at org.griphyn.vdl.karajan.Loader.compile(java.lang.String) (Unknown
Source)
   at org.griphyn.vdl.karajan.Loader.main(java.lang.String[]) (Unknown
Source)
log4j:ERROR Error occured while converting date.
log4j:ERROR Error occured while converting date.
Exception in thread "main" java.lang.NullPointerException
*** Got java.lang.NullPointerException while trying to print stack trace.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-devel/attachments/20100720/b752141f/attachment.html>


More information about the Swift-devel mailing list