You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Vivek Pathak <vp...@orgmeta.com> on 2014/06/17 18:03:32 UTC
solrj error
Hi
I am using solrj 4.6 for accessing solr 4.6. As a test case for my
application, I created a servlet which holds the SolrJ connection via
zookeeper.
When I run the test, I am getting a weird stack trace. The test fails on
not finding a currency file of java. This file I believe used to be
present in java 1.6. Is somehow solrj 4.6 coupled with java 1.6? Any
other ideas?
Caused by: java.lang.InternalError
at java.util.Currency$1.run(Currency.java:224)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.Currency.<clinit>(Currency.java:192)
at java.text.DecimalFormatSymbols.initialize(DecimalFormatSymbols
.java:585)
at java.text.DecimalFormatSymbols.<init>(DecimalFormatSymbols.
java:94)
at java.text.DecimalFormatSymbols.getInstance(
DecimalFormatSymbols.java:157)
at java.text.NumberFormat.getInstance(NumberFormat.java:767)
at java.text.NumberFormat.getIntegerInstance(NumberFormat.java:
439)
at java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:
664)
at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:585)
at org.apache.solr.common.util.DateUtil$ThreadLocalDateFormat.<
init>(DateUtil.java:187)
at org.apache.solr.common.util.DateUtil.<clinit>(DateUtil.java:
179)
at org.apache.solr.client.solrj.util.ClientUtils.<clinit>(
ClientUtils.java:193)
at org.apache.solr.client.solrj.impl.CloudSolrServer.request(
CloudSolrServer.java:565)
at org.apache.solr.client.solrj.request.QueryRequest.process(
QueryRequest.java:90)
at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:
310)
at com.qbase.gsn.SearchServlet.doGet(SearchServlet.java:121)
... 21 more
Caused by: java.io.FileNotFoundException: /opt/jdk1.7.0_25/lib/currency.
data (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:97)
at java.util.Currency$1.run(Currency.java:198)
... 37 more
Thanks
Vivek
P.S. : I tried to force /opt/jdk1.7 to be java.home thinking the execution
path will change but the bug remained. Also there is no java 1.6 on the
machine
Re: solrj error
Posted by Vivek Pathak <vp...@orgmeta.com>.
Thanks Michael. This indeed had something to do with environment. mvn
test is running the test case without properly initialized environment.
Once I added System.setProperty( "java.home" , "/opt/jdk.../jre/" ) ; - it
started found the currency.data and moved on....
So it is clearly not solr - but if you have an idea of how to properly init
the system properties in mvn test - then you can surely point out.
Thanks...
On Tue, Jun 17, 2014 at 12:16 PM, Michael Della Bitta <
michael.della.bitta@appinions.com> wrote:
> Clearly you're going to need to deposit 25 cents to make that call. :)
>
> More seriously, I'm wondering if most of the issue is environment-related,
> since it seems like it's looking for that file on your system based on the
> path. I checked my machine and it doesn't have a
> $JAVA_HOME/lib/currency.data file either. Is it possible that you have
> somehow used a mismatched JAVA_HOME and tools.jar somehow?
>
> Michael Della Bitta
>
> Applications Developer
>
> o: +1 646 532 3062
>
> appinions inc.
>
> “The Science of Influence Marketing”
>
> 18 East 41st Street
>
> New York, NY 10017
>
> t: @appinions <https://twitter.com/Appinions> | g+:
> plus.google.com/appinions
> <
> https://plus.google.com/u/0/b/112002776285509593336/112002776285509593336/posts
> >
> w: appinions.com <http://www.appinions.com/>
>
>
> On Tue, Jun 17, 2014 at 12:03 PM, Vivek Pathak <vp...@orgmeta.com>
> wrote:
>
> > Hi
> >
> > I am using solrj 4.6 for accessing solr 4.6. As a test case for my
> > application, I created a servlet which holds the SolrJ connection via
> > zookeeper.
> >
> > When I run the test, I am getting a weird stack trace. The test fails on
> > not finding a currency file of java. This file I believe used to be
> > present in java 1.6. Is somehow solrj 4.6 coupled with java 1.6? Any
> > other ideas?
> >
> >
> > Caused by: java.lang.InternalError
> > at java.util.Currency$1.run(Currency.java:224)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at java.util.Currency.<clinit>(Currency.java:192)
> > at
> > java.text.DecimalFormatSymbols.initialize(DecimalFormatSymbols
> > .java:585)
> > at java.text.DecimalFormatSymbols.<init>(DecimalFormatSymbols.
> > java:94)
> > at java.text.DecimalFormatSymbols.getInstance(
> > DecimalFormatSymbols.java:157)
> > at java.text.NumberFormat.getInstance(NumberFormat.java:767)
> > at
> java.text.NumberFormat.getIntegerInstance(NumberFormat.java:
> > 439)
> > at
> java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:
> > 664)
> > at
> java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:585)
> > at
> org.apache.solr.common.util.DateUtil$ThreadLocalDateFormat.<
> > init>(DateUtil.java:187)
> > at
> org.apache.solr.common.util.DateUtil.<clinit>(DateUtil.java:
> > 179)
> > at org.apache.solr.client.solrj.util.ClientUtils.<clinit>(
> > ClientUtils.java:193)
> > at org.apache.solr.client.solrj.impl.CloudSolrServer.request(
> > CloudSolrServer.java:565)
> > at org.apache.solr.client.solrj.request.QueryRequest.process(
> > QueryRequest.java:90)
> > at
> > org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:
> > 310)
> > at com.qbase.gsn.SearchServlet.doGet(SearchServlet.java:121)
> > ... 21 more
> > Caused by: java.io.FileNotFoundException:
> /opt/jdk1.7.0_25/lib/currency.
> > data (No such file or directory)
> > at java.io.FileInputStream.open(Native Method)
> > at java.io.FileInputStream.<init>(FileInputStream.java:138)
> > at java.io.FileInputStream.<init>(FileInputStream.java:97)
> > at java.util.Currency$1.run(Currency.java:198)
> > ... 37 more
> >
> >
> >
> > Thanks
> > Vivek
> >
> >
> > P.S. : I tried to force /opt/jdk1.7 to be java.home thinking the
> execution
> > path will change but the bug remained. Also there is no java 1.6 on the
> > machine
> >
>
Re: solrj error
Posted by Michael Della Bitta <mi...@appinions.com>.
Clearly you're going to need to deposit 25 cents to make that call. :)
More seriously, I'm wondering if most of the issue is environment-related,
since it seems like it's looking for that file on your system based on the
path. I checked my machine and it doesn't have a
$JAVA_HOME/lib/currency.data file either. Is it possible that you have
somehow used a mismatched JAVA_HOME and tools.jar somehow?
Michael Della Bitta
Applications Developer
o: +1 646 532 3062
appinions inc.
“The Science of Influence Marketing”
18 East 41st Street
New York, NY 10017
t: @appinions <https://twitter.com/Appinions> | g+:
plus.google.com/appinions
<https://plus.google.com/u/0/b/112002776285509593336/112002776285509593336/posts>
w: appinions.com <http://www.appinions.com/>
On Tue, Jun 17, 2014 at 12:03 PM, Vivek Pathak <vp...@orgmeta.com> wrote:
> Hi
>
> I am using solrj 4.6 for accessing solr 4.6. As a test case for my
> application, I created a servlet which holds the SolrJ connection via
> zookeeper.
>
> When I run the test, I am getting a weird stack trace. The test fails on
> not finding a currency file of java. This file I believe used to be
> present in java 1.6. Is somehow solrj 4.6 coupled with java 1.6? Any
> other ideas?
>
>
> Caused by: java.lang.InternalError
> at java.util.Currency$1.run(Currency.java:224)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.util.Currency.<clinit>(Currency.java:192)
> at
> java.text.DecimalFormatSymbols.initialize(DecimalFormatSymbols
> .java:585)
> at java.text.DecimalFormatSymbols.<init>(DecimalFormatSymbols.
> java:94)
> at java.text.DecimalFormatSymbols.getInstance(
> DecimalFormatSymbols.java:157)
> at java.text.NumberFormat.getInstance(NumberFormat.java:767)
> at java.text.NumberFormat.getIntegerInstance(NumberFormat.java:
> 439)
> at java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:
> 664)
> at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:585)
> at org.apache.solr.common.util.DateUtil$ThreadLocalDateFormat.<
> init>(DateUtil.java:187)
> at org.apache.solr.common.util.DateUtil.<clinit>(DateUtil.java:
> 179)
> at org.apache.solr.client.solrj.util.ClientUtils.<clinit>(
> ClientUtils.java:193)
> at org.apache.solr.client.solrj.impl.CloudSolrServer.request(
> CloudSolrServer.java:565)
> at org.apache.solr.client.solrj.request.QueryRequest.process(
> QueryRequest.java:90)
> at
> org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:
> 310)
> at com.qbase.gsn.SearchServlet.doGet(SearchServlet.java:121)
> ... 21 more
> Caused by: java.io.FileNotFoundException: /opt/jdk1.7.0_25/lib/currency.
> data (No such file or directory)
> at java.io.FileInputStream.open(Native Method)
> at java.io.FileInputStream.<init>(FileInputStream.java:138)
> at java.io.FileInputStream.<init>(FileInputStream.java:97)
> at java.util.Currency$1.run(Currency.java:198)
> ... 37 more
>
>
>
> Thanks
> Vivek
>
>
> P.S. : I tried to force /opt/jdk1.7 to be java.home thinking the execution
> path will change but the bug remained. Also there is no java 1.6 on the
> machine
>