Hello Edward,
You need to add jdbc2_0-stdext.jar to the CLASSPATH or to the
WEB_INF/lib directory inside of your application.
Thursday, July 26, 2001, 5:07:10 PM, you wrote:
EM> So I've put in a data-sources section that does parse right, but I get
EM> the following errors when tomcat starts up een though postgresql.jar is
EM> in the apps WEB-INF/lib directory... Can anyone please help?
EM> BTW: I can use regular (non-pool) JDBC as that is how I have the
EM> application working.
EM> New org.apache.struts.util.GenericDataSource
EM> java.lang.NoClassDefFoundError: javax/sql/DataSource
EM> at java.lang.ClassLoader.defineClass0(Native Method)
EM> at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
EM> at
EM>
org.apache.tomcat.loader.AdaptiveClassLoader12.doDefineClass(AdaptiveClassLoader12.java:93)
EM> at
EM>
org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:509)
EM> at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
EM> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
EM> at java.lang.Class.forName0(Native Method)
EM> at java.lang.Class.forName(Class.java:120)
EM> at
EM> org.apache.struts.digester.ObjectCreateRule.begin(ObjectCreateRule.java:152)
EM> at org.apache.struts.digester.Digester.startElement(Digester.java:498)
EM> at com.sun.xml.parser.Parser.maybeElement(Parser.java:1391)
EM> at com.sun.xml.parser.Parser.content(Parser.java:1499)
EM> at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
EM> at com.sun.xml.parser.Parser.content(Parser.java:1499)
EM> at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
EM> at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
EM> at com.sun.xml.parser.Parser.parse(Parser.java:284)
EM> at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
EM> at javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
EM> at org.apache.struts.digester.Digester.parse(Digester.java:716)
EM> at
EM> org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1247)
EM> at org.apache.struts.action.ActionServlet.init(ActionServlet.java:437)
EM> at javax.servlet.GenericServlet.init(GenericServlet.java:258)
EM> at
EM> org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
EM> at org.apache.tomcat.core.Handler.init(Handler.java:215)
EM> at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
EM> at
EM>
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130)
EM> at
EM> org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491)
EM> at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
EM> at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
EM> at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
EM> Begin event threw exception
EM> java.lang.ClassNotFoundException:
EM> org/apache/struts/util/GenericDataSource
EM> at java.lang.Class.forName0(Native Method)
EM> at java.lang.Class.forName(Class.java:120)
EM> at
EM> org.apache.struts.digester.ObjectCreateRule.begin(ObjectCreateRule.java:152)
EM> at org.apache.struts.digester.Digester.startElement(Digester.java:498)
EM> at com.sun.xml.parser.Parser.maybeElement(Parser.java:1391)
EM> at com.sun.xml.parser.Parser.content(Parser.java:1499)
EM> at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
EM> at com.sun.xml.parser.Parser.content(Parser.java:1499)
EM> at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
EM> at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
EM> at com.sun.xml.parser.Parser.parse(Parser.java:284)
EM> at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
EM> at javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
EM> at org.apache.struts.digester.Digester.parse(Digester.java:716)
EM> at
EM> org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1247)
EM> at org.apache.struts.action.ActionServlet.init(ActionServlet.java:437)
EM> at javax.servlet.GenericServlet.init(GenericServlet.java:258)
EM> at
EM> org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
EM> at org.apache.tomcat.core.Handler.init(Handler.java:215)
EM> at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
EM> at
EM>
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130)
EM> at
EM> org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491)
EM> at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
EM> at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
EM> at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
EM> On 25 Jul 2001 22:20:00 -0400, Edward Muller wrote:
>> Okay. I figured out that <data-sources> needs to go at the tope and I
>> removed the set-property tags and actually made the properties.
>>
>> I am using postgres 7.1 something.
>>
>> Now when I start my sample application I get a ClassNotFoundException.
>> I've checked and postgresql.jar from my postgres install is in my apps
>> WEF-INF/lib directory.
>>
>> I've got the application working by establishing my own connections and
>> not using the pool, so I know I can talk to JDBC and it can load the
>> driver.
>>
>> But I can't seem to get the strut-pool stuff to load it....
>>
>> Can anyone point out my stupid mistake?
>>
>> Here is my <data-sources> section:
>>
>> <data-sources>
>> <data-source
>> autoCommit="false"
>> driverClass="org.postgresql.Driver"
>> maxCount="4"
>> minCount="2"
>> password="whatever"
>> url="jdbc:postgresql://localhost/LPC"
>> user="edwardam" />
>> </data-sources>
>>
>>
>> On 25 Jul 2001 14:05:00 -0400, Edward Muller wrote:
>> > I'm trying to configure a data-source in my struts-config.xml file and I
>> > get the following error:
>> >
>> > Parse Error at line 71 column -1: Element "struts-config" allows no
>> > further input; "data-sources" is not allowed.
>> > ...(more traceback here)...
>> >
>> >
>> > The snippet from my struts-config.xml file is as follows:
>> > <data-sources>
>> > <data-source>
>> > <set-property property="autoCommit" value="false" />
>> > <set-property property="description" value="Postgres Server"/>
>> > <set-property property="driverClass"
>> > value="org.postgresql.Driver"/>
>> > <set-property property="maxCount" value="4"/>
>> > <set-property property="minCount" value="2"/>
>> > <set-property property="password" value="whatever"/>
>> > <set-property property="url"
>> > value="jdbc:postgresql://localhost/LPC"/>
>> > <set-property property="user" value="edwardam"/>
>> > </data-source>
>> > </data-sources>
>> >
>> > What am I doing wrong?
>> >
>> > --
>> > Edward Muller
>> > Director of Information Services
>> > LearningPatterns.com Inc.
>> >
>> > Direct: 212-487-9064 x 115
>> > Fax: 212-202-3822
>> > Email: [EMAIL PROTECTED]
>> >
>> > http://www.learningpatterns.com
>> --
>> Edward Muller
>> Director of Information Services
>> LearningPatterns.com Inc.
>>
>> Direct: 212-487-9064 x 115
>> Fax: 212-202-3822
>> Email: [EMAIL PROTECTED]
>>
>> http://www.learningpatterns.com
EM> --
EM> Edward Muller
EM> Director of Information Services
EM> LearningPatterns.com Inc.
EM> Direct: 212-487-9064 x 115
EM> Fax: 212-202-3822
EM> Email: [EMAIL PROTECTED]
EM> http://www.learningpatterns.com
--
Best regards,
Oleg mailto:[EMAIL PROTECTED]