[JIRA] Commented: (CAY-914) cdataport classloader trouble

From: Tore Halset (JIRA) ("Tore)
Date: Tue Nov 06 2007 - 02:23:51 EST

  • Next message: Vasil Tarasevich (JIRA): "[JIRA] Updated: (CAY-900) Create CayenneModeler Swing UI for managing callbacks and lifecycle listeners"

        [ https://issues.apache.org/cayenne/browse/CAY-914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12582 ]

    Tore Halset commented on CAY-914:
    ---------------------------------

    The problem seem to be that cayenne tries to load password encoder and jdbc driver using thread context class loader. In this setup, the context class loader are not able to find the classes, but the current class loader are.

    Should we fallback to the current class loader when the context class loader does not find the class or is it possible to make sure that the context class loader works?

    > cdataport classloader trouble
    > -----------------------------
    >
    > Key: CAY-914
    > URL: https://issues.apache.org/cayenne/browse/CAY-914
    > Project: Cayenne
    > Issue Type: Bug
    > Components: Cayenne Core Library
    > Affects Versions: 3.0
    > Environment: Mac OS X 10.5. java 5. ant 1.7
    > Reporter: Tore Halset
    > Assignee: Tore Halset
    > Fix For: 3.0
    >
    >
    > cdataport does not find PlainTextPasswordEncoder and the jdbc drivers.
    > [cdataport] log4j:WARN No appenders could be found for logger (org.apache.cayenne.conf.DefaultConfiguration).
    > [cdataport] log4j:WARN Please initialize the log4j system properly.
    > [cdataport] java.lang.ClassNotFoundException: org.apache.cayenne.conf.PlainTextPasswordEncoder
    > [cdataport] at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    > [cdataport] at java.security.AccessController.doPrivileged(Native Method)
    > [cdataport] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    > [cdataport] at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
    > [cdataport] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    > [cdataport] at org.apache.cayenne.conn.DataSourceInfo.getPasswordEncoder(DataSourceInfo.java:205)
    > [cdataport] at org.apache.cayenne.conf.DriverDataSourceFactory$LoginHandler.init(DriverDataSourceFactory.java:318)
    > [cdataport] at org.apache.cayenne.conf.DriverDataSourceFactory$DriverHandler.startElement(DriverDataSourceFactory.java:186)
    > [cdataport] at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
    > [cdataport] at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
    > [cdataport] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    > [cdataport] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    > [cdataport] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    > [cdataport] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    > [cdataport] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    > [cdataport] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    > [cdataport] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    > [cdataport] at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    > [cdataport] at org.apache.cayenne.conf.DriverDataSourceFactory.load(DriverDataSourceFactory.java:127)
    > [cdataport] at org.apache.cayenne.conf.DriverDataSourceFactory.getDataSource(DriverDataSourceFactory.java:78)
    > [cdataport] at org.apache.cayenne.conf.RuntimeLoadDelegate.shouldLoadDataNode(RuntimeLoadDelegate.java:308)
    > [cdataport] at org.apache.cayenne.conf.ConfigLoader$NodeHandler.init(ConfigLoader.java:330)
    > [cdataport] at org.apache.cayenne.conf.ConfigLoader$DomainHandler.startElement(ConfigLoader.java:219)
    > [cdataport] at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
    > [cdataport] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    > [cdataport] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    > [cdataport] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    > [cdataport] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    > [cdataport] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    > [cdataport] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    > [cdataport] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    > [cdataport] at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    > [cdataport] at org.apache.cayenne.conf.ConfigLoader.loadDomains(ConfigLoader.java:78)
    > [cdataport] at org.apache.cayenne.conf.DefaultConfiguration.initialize(DefaultConfiguration.java:162)
    > [cdataport] at org.apache.cayenne.tools.DataPortTask.execute(DataPortTask.java:66)
    > [cdataport] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    > [cdataport] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    > [cdataport] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    > [cdataport] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    > [cdataport] at java.lang.reflect.Method.invoke(Method.java:585)
    > [cdataport] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
    > [cdataport] at org.apache.tools.ant.Task.perform(Task.java:348)
    > [cdataport] at org.apache.tools.ant.Target.execute(Target.java:357)
    > [cdataport] at org.apache.tools.ant.Target.performTasks(Target.java:385)
    > [cdataport] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
    > [cdataport] at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
    > [cdataport] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    > [cdataport] at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
    > [cdataport] at org.apache.tools.ant.Main.runBuild(Main.java:698)
    > [cdataport] at org.apache.tools.ant.Main.startAnt(Main.java:199)
    > [cdataport] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
    > [cdataport] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
    > [cdataport] java.lang.ClassNotFoundException: org.apache.cayenne.conf.PlainTextPasswordEncoder
    > [cdataport] at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    > [cdataport] at java.security.AccessController.doPrivileged(Native Method)
    > [cdataport] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    > [cdataport] at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
    > [cdataport] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    > [cdataport] at org.apache.cayenne.conn.DataSourceInfo.getPasswordEncoder(DataSourceInfo.java:205)
    > [cdataport] at org.apache.cayenne.conf.DriverDataSourceFactory$LoginHandler.init(DriverDataSourceFactory.java:318)
    > [cdataport] at org.apache.cayenne.conf.DriverDataSourceFactory$DriverHandler.startElement(DriverDataSourceFactory.java:186)
    > [cdataport] at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
    > [cdataport] at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
    > [cdataport] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    > [cdataport] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    > [cdataport] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    > [cdataport] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    > [cdataport] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    > [cdataport] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    > [cdataport] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    > [cdataport] at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    > [cdataport] at org.apache.cayenne.conf.DriverDataSourceFactory.load(DriverDataSourceFactory.java:127)
    > [cdataport] at org.apache.cayenne.conf.DriverDataSourceFactory.getDataSource(DriverDataSourceFactory.java:78)
    > [cdataport] at org.apache.cayenne.conf.RuntimeLoadDelegate.shouldLoadDataNode(RuntimeLoadDelegate.java:308)
    > [cdataport] at org.apache.cayenne.conf.ConfigLoader$NodeHandler.init(ConfigLoader.java:330)
    > [cdataport] at org.apache.cayenne.conf.ConfigLoader$DomainHandler.startElement(ConfigLoader.java:219)
    > [cdataport] at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
    > [cdataport] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    > [cdataport] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    > [cdataport] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    > [cdataport] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    > [cdataport] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    > [cdataport] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    > [cdataport] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    > [cdataport] at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    > [cdataport] at org.apache.cayenne.conf.ConfigLoader.loadDomains(ConfigLoader.java:78)
    > [cdataport] at org.apache.cayenne.conf.DefaultConfiguration.initialize(DefaultConfiguration.java:162)
    > [cdataport] at org.apache.cayenne.tools.DataPortTask.execute(DataPortTask.java:66)
    > [cdataport] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    > [cdataport] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    > [cdataport] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    > [cdataport] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    > [cdataport] at java.lang.reflect.Method.invoke(Method.java:585)
    > [cdataport] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
    > [cdataport] at org.apache.tools.ant.Task.perform(Task.java:348)
    > [cdataport] at org.apache.tools.ant.Target.execute(Target.java:357)
    > [cdataport] at org.apache.tools.ant.Target.performTasks(Target.java:385)
    > [cdataport] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
    > [cdataport] at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
    > [cdataport] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    > [cdataport] at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
    > [cdataport] at org.apache.tools.ant.Main.runBuild(Main.java:698)
    > [cdataport] at org.apache.tools.ant.Main.startAnt(Main.java:199)
    > [cdataport] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
    > [cdataport] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

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



    This archive was generated by hypermail 2.0.0 : Tue Nov 06 2007 - 02:24:14 EST