You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "James Carman (JIRA)" <ji...@apache.org> on 2012/06/13 19:19:42 UTC

[jira] [Created] (KARAF-1545) Jar files in lib directory require "karaf-" prefix in order to be loaded

James Carman created KARAF-1545:
-----------------------------------

             Summary: Jar files in lib directory require "karaf-" prefix in order to be loaded
                 Key: KARAF-1545
                 URL: https://issues.apache.org/jira/browse/KARAF-1545
             Project: Karaf
          Issue Type: Bug
          Components: karaf-core
    Affects Versions: 2.2.2
         Environment: Java version: 1.6.0_32, vendor: Sun Microsystems Inc.
Java home: /home/jcarman/Programs/jdk1.6.0_32/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.2.0-24-generic", arch: "amd64", family: "unix"

            Reporter: James Carman


I was trying to configure JDBC fail-over, so I put my mysql driver jar in the KARAF_HOME/lib directory.  I kept getting ClassNotFoundExceptions.  On the advice of someone on IRC, I changed the name to "karaf-mysql-connector-java.jar" and it started working.  Why the karaf- prefix requirement?  If that's the intended behavior, then please update the README file in the lib directory.  It says:

"Any jar in this folder will be part of the main classloader used to load Karaf."

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KARAF-1545) Jar files in lib directory require "karaf-" prefix in order to be loaded

Posted by "Andreas Pieber (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-1545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13396040#comment-13396040 ] 

Andreas Pieber commented on KARAF-1545:
---------------------------------------

tbh I was always curious about the behavior that we only load karaf-*.jar files from the lib directory. Would make more sense (imho) to load all jar files from this dir. 

>From the difficulty it would be

a) change the readme
b) load *.jar instead of karaf-*.jar
c) add a new folder for *.jar

I would rather tend to option (b) but I've no problem with getting over voted :-)
                
> Jar files in lib directory require "karaf-" prefix in order to be loaded
> ------------------------------------------------------------------------
>
>                 Key: KARAF-1545
>                 URL: https://issues.apache.org/jira/browse/KARAF-1545
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-core
>    Affects Versions: 2.2.2
>         Environment: Java version: 1.6.0_32, vendor: Sun Microsystems Inc.
> Java home: /home/jcarman/Programs/jdk1.6.0_32/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "3.2.0-24-generic", arch: "amd64", family: "unix"
>            Reporter: James Carman
>
> I was trying to configure JDBC fail-over, so I put my mysql driver jar in the KARAF_HOME/lib directory.  I kept getting ClassNotFoundExceptions.  On the advice of someone on IRC, I changed the name to "karaf-mysql-connector-java.jar" and it started working.  Why the karaf- prefix requirement?  If that's the intended behavior, then please update the README file in the lib directory.  It says:
> "Any jar in this folder will be part of the main classloader used to load Karaf."

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KARAF-1545) Jar files in lib directory require "karaf-" prefix in order to be loaded

Posted by "Jamie goodyear (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-1545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13294584#comment-13294584 ] 

Jamie goodyear commented on KARAF-1545:
---------------------------------------

The lib folder currently only auto adds "karaf*.jar" to the classpath. The work around to this behaviour is to add the jar directly to CLASSPATH in your environment.

                
> Jar files in lib directory require "karaf-" prefix in order to be loaded
> ------------------------------------------------------------------------
>
>                 Key: KARAF-1545
>                 URL: https://issues.apache.org/jira/browse/KARAF-1545
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-core
>    Affects Versions: 2.2.2
>         Environment: Java version: 1.6.0_32, vendor: Sun Microsystems Inc.
> Java home: /home/jcarman/Programs/jdk1.6.0_32/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "3.2.0-24-generic", arch: "amd64", family: "unix"
>            Reporter: James Carman
>
> I was trying to configure JDBC fail-over, so I put my mysql driver jar in the KARAF_HOME/lib directory.  I kept getting ClassNotFoundExceptions.  On the advice of someone on IRC, I changed the name to "karaf-mysql-connector-java.jar" and it started working.  Why the karaf- prefix requirement?  If that's the intended behavior, then please update the README file in the lib directory.  It says:
> "Any jar in this folder will be part of the main classloader used to load Karaf."

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KARAF-1545) Jar files in lib directory require "karaf-" prefix in order to be loaded

Posted by "Andreas Pieber (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-1545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13396042#comment-13396042 ] 

Andreas Pieber commented on KARAF-1545:
---------------------------------------

btw, it might be worth bringing this topic to the dev list; wdyt?
                
> Jar files in lib directory require "karaf-" prefix in order to be loaded
> ------------------------------------------------------------------------
>
>                 Key: KARAF-1545
>                 URL: https://issues.apache.org/jira/browse/KARAF-1545
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-core
>    Affects Versions: 2.2.2
>         Environment: Java version: 1.6.0_32, vendor: Sun Microsystems Inc.
> Java home: /home/jcarman/Programs/jdk1.6.0_32/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "3.2.0-24-generic", arch: "amd64", family: "unix"
>            Reporter: James Carman
>
> I was trying to configure JDBC fail-over, so I put my mysql driver jar in the KARAF_HOME/lib directory.  I kept getting ClassNotFoundExceptions.  On the advice of someone on IRC, I changed the name to "karaf-mysql-connector-java.jar" and it started working.  Why the karaf- prefix requirement?  If that's the intended behavior, then please update the README file in the lib directory.  It says:
> "Any jar in this folder will be part of the main classloader used to load Karaf."

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KARAF-1545) Jar files in lib directory require "karaf-" prefix in order to be loaded

Posted by "Jamie goodyear (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-1545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13294585#comment-13294585 ] 

Jamie goodyear commented on KARAF-1545:
---------------------------------------

A simple update would be to update the README and online documents to state that the user should add the jar directly to the CLASSPATH environment variable. I'm not sure that changing the current behaviour at this point in the 2.2.x line would be entirely safe.
                
> Jar files in lib directory require "karaf-" prefix in order to be loaded
> ------------------------------------------------------------------------
>
>                 Key: KARAF-1545
>                 URL: https://issues.apache.org/jira/browse/KARAF-1545
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-core
>    Affects Versions: 2.2.2
>         Environment: Java version: 1.6.0_32, vendor: Sun Microsystems Inc.
> Java home: /home/jcarman/Programs/jdk1.6.0_32/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "3.2.0-24-generic", arch: "amd64", family: "unix"
>            Reporter: James Carman
>
> I was trying to configure JDBC fail-over, so I put my mysql driver jar in the KARAF_HOME/lib directory.  I kept getting ClassNotFoundExceptions.  On the advice of someone on IRC, I changed the name to "karaf-mysql-connector-java.jar" and it started working.  Why the karaf- prefix requirement?  If that's the intended behavior, then please update the README file in the lib directory.  It says:
> "Any jar in this folder will be part of the main classloader used to load Karaf."

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KARAF-1545) Jar files in lib directory require "karaf-" prefix in order to be loaded

Posted by "James Carman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-1545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13294601#comment-13294601 ] 

James Carman commented on KARAF-1545:
-------------------------------------

I don't like the idea of having to muck with the CLASSPATH environment variable.  Nobody really does that anymore, do they?  Perhaps adding a new folder "third-party" in the lib directory and put that README in there?  That wouldn't change the functionality, really.  It would only break anyone who put a third-party folder in their lib directory manually.
                
> Jar files in lib directory require "karaf-" prefix in order to be loaded
> ------------------------------------------------------------------------
>
>                 Key: KARAF-1545
>                 URL: https://issues.apache.org/jira/browse/KARAF-1545
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-core
>    Affects Versions: 2.2.2
>         Environment: Java version: 1.6.0_32, vendor: Sun Microsystems Inc.
> Java home: /home/jcarman/Programs/jdk1.6.0_32/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "3.2.0-24-generic", arch: "amd64", family: "unix"
>            Reporter: James Carman
>
> I was trying to configure JDBC fail-over, so I put my mysql driver jar in the KARAF_HOME/lib directory.  I kept getting ClassNotFoundExceptions.  On the advice of someone on IRC, I changed the name to "karaf-mysql-connector-java.jar" and it started working.  Why the karaf- prefix requirement?  If that's the intended behavior, then please update the README file in the lib directory.  It says:
> "Any jar in this folder will be part of the main classloader used to load Karaf."

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira