Re: dataport

From: Tore Halset (halse..vv.ntnu.no)
Date: Tue Nov 06 2007 - 02:03:12 EST

  • Next message: Tore Halset (JIRA): "[JIRA] Created: (CAY-914) cdataport classloader trouble"

    It is in my cayenne-server-3.0M2.jar as well.

    The problem is that DataSourceInfo.getPasswordEncoder and
    DriverDataSource.loadDriver depends on
    Thread.currentThread().getContextClassLoader(). In my setup (Mac OS X
    10.5 with java 5 and ant 1.7) that does not work.

    My current fix is to try with Class.forName(className) if context
    class loader throws a ClassNotFoundException. It is working, but I do
    not know if it is the best way to fix the problem.

      - Tore.

    On Nov 5, 2007, at 17:03 , Andrus Adamchik wrote:

    > Strange... The class is clearly there:
    >
    > ~/Desktop/cayenne-3.0M2/lib: jar tvf cayenne-server-3.0M2.jar |grep
    > PlainText
    > 705 Sun Oct 28 16:43:02 EET 2007 org/apache/cayenne/conf/
    > PlainTextPasswordEncoder.class
    >
    >
    > Which jar are you using? cayenne-server?
    >
    > Andrus
    >
    >
    >
    > On Nov 5, 2007, at 4:24 PM, Tore Halset wrote:
    >
    >> Hello.
    >>
    >> I just tried cdataport from the unreleased cayenne-3.0M2. I do not
    >> remember if I have tried dataport in cayenne-3.0 before. Anyone
    >> seen this before?
    >>
    >> Regards,
    >> - Tore.
    >>
    >>
    >> [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 archive was generated by hypermail 2.0.0 : Tue Nov 06 2007 - 02:03:58 EST