I did 3 and it worked.

But I still wonder, do I really have to manually delete this jar
whenever I upload my application to Tomcat? Or is there a better way?

On 17 מרץ, 13:35, Juan Pablo Gardella <[email protected]>
wrote:
> Try this:
>
> 1) Verify if you put the mysql-connector-java-5.1.15-bin.jar in correct
> place. Seehttp://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html.
>
> 2) What version of mysql you use? Is the driver for this version? If yes
> perhaps the jar is corrupt. Try download it again
>
> 3) Delete mysql-connector-java-5.1.15-bin.jar from WEB-INF/lib/ if you have
> in your war.
>
> Juan
>
> 2011/3/17 Erel Segal <[email protected]>
>
> > It doesn't work at Tomcat either, but I don't know if the problems are
> > related. This is what I did regarding Tomcat:
>
> > * I put the file "mysql-connector-java-5.1.15-bin.jar" in Tomcat's
> > lib/ folder;
>
> > * I edited the file conf/context.xml to declare a resource:
> > <Context>
> >    <WatchedResource>WEB-INF/web.xml</WatchedResource>
> >    <Resource name="jdbc/TestDB" auth="Container"
> > type="javax.sql.DataSource"
> >               maxActive="100" maxIdle="30" maxWait="10000"
> >               username="[username]" password="[password]"
> > driverClassName="com.mysql.jdbc.Driver"
> >               url="jdbc:mysql://localhost:3306/gwtchat"/>
> > </Context>
>
> > * I edited my application's web.xml file to declare a resource:
>
> > <web-app>
> >  <servlet>
> >    <servlet-name>chatroom</servlet-name>
> >    <servlet-class>gwtchat.server.ChatRoomServiceImpl</servlet-class>
> >  </servlet>
> >  <servlet-mapping>
> >    <servlet-name>chatroom</servlet-name>
> >    <url-pattern>/gwtchat/chatroom</url-pattern>
> >  </servlet-mapping>
> >  <servlet-mapping>
> >    <servlet-name>chatroom</servlet-name>
> >    <url-pattern>/wizardofoz/chatroom</url-pattern>
> >  </servlet-mapping>
> >  <resource-ref>
> >      <description>DB Connection</description>
> >      <res-ref-name>jdbc/TestDB</res-ref-name>
> >      <res-type>javax.sql.DataSource</res-type>
> >      <res-auth>Container</res-auth>
> >  </resource-ref>
> > </web-app>
>
> > * I restarted Tomcat.
>
> > Now, in the Tomcat log file, I get the following exception:
> > "No suitable driver found for jdbc:mysql://localhost:3306/gwtchat?..."
>
> > On 15 מרץ, 13:16, Juan Pablo Gardella <[email protected]>
> > wrote:
> > > It seems that your classpath is good. When you said:
>
> > > "But then I restarted the server (from the eclipse "development pane"),
> > > and I started getting errors saying that the server cannot find a
> > > driver for jdbc:mysql connection!"
>
> > > You want to "deploy" the app in a servlet container?. Try make a war and
> > put
> > > in it and test. Tell me if the error persist
>
> > > Juan
>
> > > 2011/3/15 Erel Segal <[email protected]>
>
> > > > Here it is:
>
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <classpath>
> > > >        <classpathentry kind="src" path="src"/>
> > > >        <classpathentry kind="src" output="test-classes" path="test"/>
> > > >        <classpathentry kind="con"
> > > > path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
> > > >        <classpathentry kind="con"
> > > > path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
> > > >        <classpathentry combineaccessrules="false" kind="src" path="/
> > > > GeniusBI"/>
> > > >        <classpathentry kind="lib"
> > path="/home/<username>/workspace/gwtchat/
> > > > war/WEB-INF/lib/mysql-connector-java-5.1.15-bin.jar"/>
> > > >        <classpathentry kind="output" path="war/WEB-INF/classes"/>
> > > > </classpath>
>
> > > > On 9 מרץ, 18:49, Juan Pablo Gardella <[email protected]>
> > > > wrote:
> > > > > Is classpath error problem. Show the .classpath file
>
> > > > > Juan
>
> > > > > 2011/3/9 Erel Segal <[email protected]>
>
> > > > > > I added a mysql server to the default GWT application. I put the
> > mysql
> > > > > > connector jar in the lib folder under WEBINF, and also added it to
> > the
> > > > > > build path. I ran the web application in development mode and it
> > > > > > worked fine.
>
> > > > > > But then I restarted the server (from the eclipse "development
> > pane"),
> > > > > > and I started getting errors saying that the server cannot find a
> > > > > > driver for jdbc:mysql connection!
>
> > > > > > Can you please help me?
>
> > > > > > --
> > > > > > You received this message because you are subscribed to the Google
> > > > Groups
> > > > > > "Google Web Toolkit" group.
> > > > > > To post to this group, send email to
> > > > [email protected].
> > > > > > To unsubscribe from this group, send email to
> > > > > > [email protected].
> > > > > > For more options, visit this group at
> > > > > >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Google Web Toolkit" group.
> > > > To post to this group, send email to
> > [email protected].
> > > > To unsubscribe from this group, send email to
> > > > [email protected].
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected].
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to