[
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-921?pag...
]
JetsonLee edited comment on HSEARCH-921 at 9/26/11 3:03 AM:
------------------------------------------------------------
How could I do ....
I can't create index in windows system,that's too pain!!
I just want to test how to use Hibernate Search,and I only have a windows system...
Can solve this problem at first??That's very important..Thanks.
was (Author: xinggg22):
How could I do ....
I can create index in windows,that's to pain!!
I just want to test how to use Hibernate Search,and I only have a windows system...
Can solve this problem at first??That's very important..Thanks.
NullPointerException in AvroSerializationProvider due to wrong
resource path
----------------------------------------------------------------------------
Key: HSEARCH-921
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-921
Project: Hibernate Search
Issue Type: Bug
Affects Versions: 4.0.0.Beta1
Reporter: Hardy Ferentschik
Assignee: Hardy Ferentschik
Priority: Critical
Fix For: 4.0.0.Beta2
From AvroSerializationProvider:
{code}
private void parseSchema(String filename) {
String fullFileName = V1_PATH + filename + ".avro";
fullFileName = fullFileName.replace( '/', File.separatorChar );
InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(
fullFileName );
String messageSchemaAsString;
try {
messageSchemaAsString = readInputStream( in, fullFileName );
}
finally {
try {
in.close();
}
catch ( IOException e ) {
//we don't care
}
}
schemas.put( filename, messageSchemaAsString );
}
{code}
the problem is:
{code}
fullFileName = fullFileName.replace( '/', File.separatorChar );
{code}
Since the files are loaded from the jar the forward slash has to be used regardless. On
windows you will get a wrong file name and the loading of the resource will fail.
See also:
https://forum.hibernate.org/viewtopic.php?f=9&t=1012548
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira