You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Benson Margulies (JIRA)" <ji...@apache.org> on 2009/09/10 05:45:57 UTC

[jira] Created: (SOLR-1419) Solr won't load filters from parent class loader, and the resulting error stacktrace is very confusing

Solr won't load filters from parent class loader, and the resulting error stacktrace is very confusing
------------------------------------------------------------------------------------------------------

                 Key: SOLR-1419
                 URL: https://issues.apache.org/jira/browse/SOLR-1419
             Project: Solr
          Issue Type: Bug
          Components: search
    Affects Versions: 1.3
            Reporter: Benson Margulies


I specified a token filter class in my schema, and provided that class in a jar file in the system classpath of my jetty instance instead of in WEB-INF/lib of my solr webapp.

This did not work.

To make matters odder, the logged error did not mention my filter, but rather an internal solr interface:

Caused by: java.lang.ClassNotFoundException: org.apache.solr.util.plugin.ResourceLoaderAware
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399)

I note in passing that the token filter in turn uses other classes which stayed happily behind in the outer classloader after moved the immediate filter class into the webapp.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-1419) Solr won't load filters from parent class loader, and the resulting error stacktrace is very confusing

Posted by "Noble Paul (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12753412#action_12753412 ] 

Noble Paul commented on SOLR-1419:
----------------------------------

Please ask the question in solr-user/solr-dev before you raise a JIRA issue.

> Solr won't load filters from parent class loader, and the resulting error stacktrace is very confusing
> ------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-1419
>                 URL: https://issues.apache.org/jira/browse/SOLR-1419
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 1.3
>            Reporter: Benson Margulies
>
> I specified a token filter class in my schema, and provided that class in a jar file in the system classpath of my jetty instance instead of in WEB-INF/lib of my solr webapp.
> This did not work.
> To make matters odder, the logged error did not mention my filter, but rather an internal solr interface:
> Caused by: java.lang.ClassNotFoundException: org.apache.solr.util.plugin.ResourceLoaderAware
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
> 	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399)
> I note in passing that the token filter in turn uses other classes which stayed happily behind in the outer classloader after moved the immediate filter class into the webapp.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-1419) Solr won't load filters from parent class loader, and the resulting error stacktrace is very confusing

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12754294#action_12754294 ] 

Hoss Man commented on SOLR-1419:
--------------------------------

bq. The error message issue struck me as JIRA-worthy even if the underlying behavior is by design. 

the behavior is by design -- of the VM.  Solr doesn't have anything to do with it, so Solr can't really improve the message produced either.

there *MAY* be some tricks Solr can do to recognize when a class load error was caused by another class load error for a class Solr already know about -- and then solr could generate an additional err message explaining the problem -- but that would certainly be a new feature, not a bug.


> Solr won't load filters from parent class loader, and the resulting error stacktrace is very confusing
> ------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-1419
>                 URL: https://issues.apache.org/jira/browse/SOLR-1419
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 1.3
>            Reporter: Benson Margulies
>
> I specified a token filter class in my schema, and provided that class in a jar file in the system classpath of my jetty instance instead of in WEB-INF/lib of my solr webapp.
> This did not work.
> To make matters odder, the logged error did not mention my filter, but rather an internal solr interface:
> Caused by: java.lang.ClassNotFoundException: org.apache.solr.util.plugin.ResourceLoaderAware
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
> 	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399)
> I note in passing that the token filter in turn uses other classes which stayed happily behind in the outer classloader after moved the immediate filter class into the webapp.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (SOLR-1419) Solr won't load filters from parent class loader, and the resulting error stacktrace is very confusing

Posted by "Noble Paul (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Noble Paul closed SOLR-1419.
----------------------------

    Resolution: Invalid

Do not drop your plugins in the system classpath . it WILL NOT WORK. it can work only if your solr internal classes are also loaded by system classpath. drop your jars in the $solr.home/lib dir

> Solr won't load filters from parent class loader, and the resulting error stacktrace is very confusing
> ------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-1419
>                 URL: https://issues.apache.org/jira/browse/SOLR-1419
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 1.3
>            Reporter: Benson Margulies
>
> I specified a token filter class in my schema, and provided that class in a jar file in the system classpath of my jetty instance instead of in WEB-INF/lib of my solr webapp.
> This did not work.
> To make matters odder, the logged error did not mention my filter, but rather an internal solr interface:
> Caused by: java.lang.ClassNotFoundException: org.apache.solr.util.plugin.ResourceLoaderAware
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
> 	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399)
> I note in passing that the token filter in turn uses other classes which stayed happily behind in the outer classloader after moved the immediate filter class into the webapp.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-1419) Solr won't load filters from parent class loader, and the resulting error stacktrace is very confusing

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12753415#action_12753415 ] 

Benson Margulies commented on SOLR-1419:
----------------------------------------

The error message issue struck me as JIRA-worthy even if the underlying behavior is by design.

> Solr won't load filters from parent class loader, and the resulting error stacktrace is very confusing
> ------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-1419
>                 URL: https://issues.apache.org/jira/browse/SOLR-1419
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 1.3
>            Reporter: Benson Margulies
>
> I specified a token filter class in my schema, and provided that class in a jar file in the system classpath of my jetty instance instead of in WEB-INF/lib of my solr webapp.
> This did not work.
> To make matters odder, the logged error did not mention my filter, but rather an internal solr interface:
> Caused by: java.lang.ClassNotFoundException: org.apache.solr.util.plugin.ResourceLoaderAware
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
> 	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399)
> I note in passing that the token filter in turn uses other classes which stayed happily behind in the outer classloader after moved the immediate filter class into the webapp.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-1419) Solr won't load filters from parent class loader, and the resulting error stacktrace is very confusing

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12754324#action_12754324 ] 

Benson Margulies commented on SOLR-1419:
----------------------------------------

I'll comment here and then open a feature request. Solr knows that it just called into the class loader to locate a class by name. So it could certainly include the name of what it was looking for in its exception, even if the VM chooses to describe as the source of the problem.



> Solr won't load filters from parent class loader, and the resulting error stacktrace is very confusing
> ------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-1419
>                 URL: https://issues.apache.org/jira/browse/SOLR-1419
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 1.3
>            Reporter: Benson Margulies
>
> I specified a token filter class in my schema, and provided that class in a jar file in the system classpath of my jetty instance instead of in WEB-INF/lib of my solr webapp.
> This did not work.
> To make matters odder, the logged error did not mention my filter, but rather an internal solr interface:
> Caused by: java.lang.ClassNotFoundException: org.apache.solr.util.plugin.ResourceLoaderAware
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
> 	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399)
> I note in passing that the token filter in turn uses other classes which stayed happily behind in the outer classloader after moved the immediate filter class into the webapp.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.