You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Jörn Kottmann (JIRA)" <de...@uima.apache.org> on 2011/02/10 13:52:57 UTC

[jira] Created: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Solrcas should not resolve the solrmapping file only via the classpath
----------------------------------------------------------------------

                 Key: UIMA-2047
                 URL: https://issues.apache.org/jira/browse/UIMA-2047
             Project: UIMA
          Issue Type: Improvement
          Components: Sandbox
            Reporter: Jörn Kottmann


The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 

The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12993983#comment-12993983 ] 

Tommaso Teofili commented on UIMA-2047:
---------------------------------------

I made some tests and it works for URL but does not work using the instance.getResourceAsStream(urlString) method so I refactored out two methods getStream(path) and getURL(path) with path being either classpath:/path/to/solrmapping.xml or file:///home/who/knows/solrmapping.xml (should work also with other URI paths).

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Jörn Kottmann (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997305#comment-12997305 ] 

Jörn Kottmann commented on UIMA-2047:
-------------------------------------

No, the file is now removed from the desc folder. Wouldn't it be better to keep it there and then just do not include the desc folder inside the jar file? Is there a reason to put the descriptor into the jar file?

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997317#comment-12997317 ] 

Tommaso Teofili commented on UIMA-2047:
---------------------------------------

I think it's worth having a default descriptor (that being the main reason for keeping it) in every component even if in this case the fact that the solrmapping file isn't there would force a user to write its own solrmapping file also when using the default descriptor.
In terms of ease of use what is the best way in your opinion?

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tommaso Teofili updated UIMA-2047:
----------------------------------

    Fix Version/s: 2.3.1Addons

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>             Fix For: 2.3.1Addons
>
>         Attachments: relativeurl.patch
>
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Jörn Kottmann (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13000790#comment-13000790 ] 

Jörn Kottmann commented on UIMA-2047:
-------------------------------------

Also get this warning with your patch:

3/1/11 10:16:09 AM - 20: org.apache.uima.impl.ChildUimaContext_impl.getResourceAsStream: WARNING: The unmanaged resource /xxx/apache-uima-as/xxx/desc/solrmapping.xml was accessed.This feature is deprecated, and support may be removed in future versions.


> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>         Attachments: relativeurl.patch
>
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Jörn Kottmann (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997333#comment-12997333 ] 

Jörn Kottmann commented on UIMA-2047:
-------------------------------------

Do you know how to specify a relative file URL? I would like to avoid referencing the mapping file via an absolute URL.

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998420#comment-12998420 ] 

Tommaso Teofili commented on UIMA-2047:
---------------------------------------

If I try both file://src/test/resources/solrmapping.xml or file://desc/solrmapping.xml (note that this is no more in the classpath) in the TestSolracasAE.xml then it gets the right file when running 'mvn clean test' (it's relative to the project directory).
I wonder if it can depend on the running OS.

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>         Attachments: relativeurl.patch
>
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997322#comment-12997322 ] 

Tommaso Teofili commented on UIMA-2047:
---------------------------------------

ok, done :)

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Resolved: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tommaso Teofili resolved UIMA-2047.
-----------------------------------

    Resolution: Fixed

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>         Attachments: relativeurl.patch
>
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Jörn Kottmann (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997799#comment-12997799 ] 

Jörn Kottmann commented on UIMA-2047:
-------------------------------------

Just assumed it should look like the one inside our test folder. There the root element is solrMapping and in the one in the desc folder it is fieldMapping.

Do we support these two formats?

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>         Attachments: relativeurl.patch
>
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003366#comment-13003366 ] 

Tommaso Teofili commented on UIMA-2047:
---------------------------------------

bq. org.apache.uima.impl.ChildUimaContext_impl.getResourceAsStream: WARNING: The unmanaged resource /xxx/apache-uima-as/xxx/desc/solrmapping.xml was accessed.This feature is deprecated, and support may be removed in future versions.

We can get rid of that using getContext().getDataPath() as base for the relative path.
Also the method to get the stream/URL should be made protected to eventually use it when extending the SolrCASConsumer i.e. in EmbeddedSolrCASConsumer to set the solr.dataPath

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>         Attachments: relativeurl.patch
>
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Jörn Kottmann (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998356#comment-12998356 ] 

Jörn Kottmann commented on UIMA-2047:
-------------------------------------

Tested your patch. Couldn't find a way to specify a relative path. To what would the path be relative ?

I tried this:
file://solrmapping.xml

Then it has to be relative to my SolrcasAE.xml descriptor, but it is not. Then I assumed it might be relative to the working directory of the VM and wrote something like this file://application/desc/solrmapping.xml but that also did not work.

As far as I know relative file URLs in java are famous for being confusing ... maybe the implementation is correct, but I just don't get it specified correctly.

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>         Attachments: relativeurl.patch
>
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998327#comment-12998327 ] 

Tommaso Teofili commented on UIMA-2047:
---------------------------------------

bq. There's no check about name of root element, we should introduce it only accepting solrMapping name

Fixed

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>         Attachments: relativeurl.patch
>
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Jörn Kottmann (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997319#comment-12997319 ] 

Jörn Kottmann commented on UIMA-2047:
-------------------------------------

Yes, I think there should be sample descriptor and a sample mapping file. In my opinion that should not be in the jar file itself, but a part of the distribution.

So, lets put the mapping file back to the desc folder and exclude the desc folder from the jar file. 

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003378#comment-13003378 ] 

Tommaso Teofili commented on UIMA-2047:
---------------------------------------

>From rev. 1078800 relative paths should not have the file:// protocol (as they are not proper URIs) so accessing the solrmapping.xml inside the test resources directory must be accessed like this: src/test/resources/solrmapping.xml

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>         Attachments: relativeurl.patch
>
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997801#comment-12997801 ] 

Tommaso Teofili commented on UIMA-2047:
---------------------------------------

There's no check about name of root element, we should introduce it only accepting solrMapping name.

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>         Attachments: relativeurl.patch
>
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997795#comment-12997795 ] 

Tommaso Teofili commented on UIMA-2047:
---------------------------------------

bq. Can you please confirm that the restored solrmapping.xml file is the correct one? For me it looks like that it might not be valid.

it was the JCas oldest one, now back to CAS API one

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>         Attachments: relativeurl.patch
>
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Issue Comment Edited: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12993983#comment-12993983 ] 

Tommaso Teofili edited comment on UIMA-2047 at 2/12/11 7:36 PM:
----------------------------------------------------------------

I made some tests and it works for URL but does not work using the instance.getResourceAsStream(urlString) method so I refactored out two methods getStream(path) and getURL(path) with path being either classpath:/path/to/solrmapping.xml or file:///home/who/knows/solrmapping.xml (should work also with other protocols).

      was (Author: teofili):
    I made some tests and it works for URL but does not work using the instance.getResourceAsStream(urlString) method so I refactored out two methods getStream(path) and getURL(path) with path being either classpath:/path/to/solrmapping.xml or file:///home/who/knows/solrmapping.xml (should work also with other URI paths).
  
> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Updated: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tommaso Teofili updated UIMA-2047:
----------------------------------

    Attachment: relativeurl.patch

With the current implementation I think that's not possible, please have a look at this patch which can handle also relative urls like file://a/relative/path/solrmapping.xml .
It continues to work with absolute urls file:///home/someone/where/to/solrmapping.xml
and classpath urls classpath:/solrmapping.xml 

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>         Attachments: relativeurl.patch
>
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998337#comment-12998337 ] 

Tommaso Teofili commented on UIMA-2047:
---------------------------------------

bq. Nice. I believe the solr mapping file I am using is actually a nice sample, for a real world use case. It extracts an id from a ArticleId FS, it indexes the document text and organization entity annotations. Should I check that in?

Yes cool, only if you can confirm that the relative paths patch is working for you too, let me first commit that please.



> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>         Attachments: relativeurl.patch
>
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Updated: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Jörn Kottmann (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jörn Kottmann updated UIMA-2047:
--------------------------------

    Component/s:     (was: Sandbox)
                 Sandbox-Solrcas

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Closed] (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tommaso Teofili closed UIMA-2047.
---------------------------------

    Resolution: Fixed

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>             Fix For: 2.3.1Addons
>
>         Attachments: relativeurl.patch
>
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Jörn Kottmann (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13000212#comment-13000212 ] 

Jörn Kottmann commented on UIMA-2047:
-------------------------------------

Yes, I will check it in. I believe we have now a second test solrmapping file inside the test resources folder.

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>         Attachments: relativeurl.patch
>
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12993895#comment-12993895 ] 

Tommaso Teofili commented on UIMA-2047:
---------------------------------------

Actually you can use both the file: or http: protocol as the URI.create(path).toURL() allows that and also the /path/to/solrmapping.xml to allow classpath references; it looks good to me as is.
I agree the default solrmapping should not be included.

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Jörn Kottmann (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12993032#comment-12993032 ] 

Jörn Kottmann commented on UIMA-2047:
-------------------------------------

Does someone know what is the best way of doing that? Should it be handled like a resource?

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox
>            Reporter: Jörn Kottmann
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Jörn Kottmann (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998332#comment-12998332 ] 

Jörn Kottmann commented on UIMA-2047:
-------------------------------------

Nice. I believe the solr mapping file I am using is actually a nice sample, for a real world use case. It extracts an id from a ArticleId FS, it indexes the document text and organization entity annotations.

Should I check that in?

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>         Attachments: relativeurl.patch
>
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Resolved: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tommaso Teofili resolved UIMA-2047.
-----------------------------------

    Resolution: Fixed

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13000210#comment-13000210 ] 

Tommaso Teofili commented on UIMA-2047:
---------------------------------------

Jörn, could you please check in your solrmapping file (and eventually align tests if needed)?

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>         Attachments: relativeurl.patch
>
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12996348#comment-12996348 ] 

Tommaso Teofili commented on UIMA-2047:
---------------------------------------

I think that can be considered resolved, Jörn please let me know if you think anything is unclear or not working for you.

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Reopened] (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Tommaso Teofili (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tommaso Teofili reopened UIMA-2047:
-----------------------------------


> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>         Attachments: relativeurl.patch
>
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Jörn Kottmann (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997303#comment-12997303 ] 

Jörn Kottmann commented on UIMA-2047:
-------------------------------------

I am testing it right now. Seems that the mapping file is still included.

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Reopened: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Jörn Kottmann (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jörn Kottmann reopened UIMA-2047:
---------------------------------


> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>         Attachments: relativeurl.patch
>
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (UIMA-2047) Solrcas should not resolve the solrmapping file only via the classpath

Posted by "Jörn Kottmann (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997757#comment-12997757 ] 

Jörn Kottmann commented on UIMA-2047:
-------------------------------------

I will test your patch and report back here.

Can you please confirm that the restored solrmapping.xml file is the correct one? For me it looks like that it might not be valid.

> Solrcas should not resolve the solrmapping file only via the classpath
> ----------------------------------------------------------------------
>
>                 Key: UIMA-2047
>                 URL: https://issues.apache.org/jira/browse/UIMA-2047
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Sandbox-Solrcas
>            Reporter: Jörn Kottmann
>         Attachments: relativeurl.patch
>
>
> The solrmapping file is currently only resolved via the classpath. It should be possible to place a solrmapping file next to the AE descriptor and load it like referenced descriptors. 
> The Solrcas jar file also contains a default solrmapping file. That should not be included in the jar file, otherwise it might accidentally be loaded depending on the location of that jar on the classpath.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira