No suitable driver when using MySQL in J2EE server
Hi everyone
I use MySQL's mm driver version 2.0.11 in conjuction with j2ee server. I added it thru deploytool->Tools->Server configuration->Data source->Standard following the instuctions in the help document, either un-jared or not, setting the classpath or/and j2ee_classpath in userconfig.bat and still got the exception when connecting from client.
Can anyone tell me why.
Thanks
James Chiang from Taiwan
You may like this:
http://forum.java.sun.com/thread.jsp?forum=136&thread=237527&message=929097#929097
Similar Messages
-
How to use mysql in J2EE server?
Hi all,
I have been learning J2EE and playing around with Pointbase as my database and the IDE that I'm using is Forte For JAVA 4 EE.
Now, I wanna use mysql in J2EE, EJB. But I do not know how to use mysql in j2ee server. I have try to altered the resources.property file by adding a few lines to called the MYSQL datasource and driver. But, it give me errors when i am doing the deployment process. Can any1 of u help me?
Thanks in advance..Hi,
I guess there must be some problem with your App Server Configuration settings:
Kindly Check if you are using the following ones:
Driver Name: com.mysql.jdbc.Driver
Url: jdbc:mysql://[hostname][,failoverhost...][:port]/[dbname][?param1=value1][¶m2=value2].....
Thanks & regards,
Paritosh
Software Engineer
L&T Infotech Ltd -
How to connect Mysql to J2EE server exactly?
Hi,there
I would like thank you for offering me your precious opinion in advance.
I got a problem with installing Mysql database into J2EE server. All I have done is:
1.Install Mysql and put the Mysql driver,mm.mysql-2.0.4-bin.jar into the directory of J2EE which is j2ee1.3.1/lib.
2. Set the environment variable for invoking the Mysql driver like
this,CLASSPATH=.;%JAVA_HOME%\lib\mysql-connector-java-2.0.14-bin;%
J2EE_HOME%\lib\mysql-connector-java-2.0.14-bin;%JAVA_HOME%\bin;
3.Modify the content of Server.xml file located in J2EE directory like this:
<DefaultContext>
<Resource name="jdbc/mysql" auth="Container"
type="javax.sql.DataSource" />
<ResourceParams name="jdbc/mysql">
<parameter>
<name>driverClassName</name>
<value>org.gjt.mm.mysql.Driver</value>
</parameter>
<parameter>
<name>drivername</name>
<value>jdbc:mysql:localhost:3306:mobiledb</value>
</parameter>
</ResourceParams>
</DefaultContext>
So far,I have no success in connect Mysql to J2EE server. What am I doing wrong?
Thank you for your kind help.hi, sameer
Thank you for reply. Could you tell me exactly the documents that you see? Do you mean "J2EE tutorial documents"?
Thanks for advice.
Revon -
SSL Hand Shake failed when using windows 7/vista/server 2008
When trying to connect with ldp.exe on windows 7, vista, or windows server 2008 we get a gslsflnNegotiateSSL * SSL Hand Shake failed in the log file.
When using xp or windows server 2003 we can connect with no problems.
We can connect using a non-ssl port
Does anybody have an idea as to why this might be happing
we are using oid version 10.1.4
Thanks
WayneThis should of some help:
OID is down and it won't start -
Correct Way to use Bind variables when using an MS SQL server backend
Hey,
I'm having some trouble figuring out how to use bind variables in a view when using an MS SQL server backend. For some reason when I'm using an ApplicationModule that has a MS SQL Server JDBC library loaded and I attempt to click OK when editing the following query:
SELECT kit_status, component_id
FROM numbered_inv
WHERE trialname = :1
I get an error stating that "SQL Query Error Message Incorrect Syntax near ':'". Is JDeveloper compatible with SQL server for bind variables because this query runs just fine if I replace the :1 with a say "Testing testing".
Thanks in advance
Edited by: NullCheck on Dec 15, 2010 2:06 PMGotcha. I had tried %1% %0% ?0 and ?1 and various other permutations none of which worked. Got it working by setting the query to:
SELECT kit_status, component_id
FROM numbered_inv
WHERE trialname = ?
ORDER BY kit_status
And then adding a bind variable with "Bind position" set to 0.
Thanks again Shay! -
No suitable driver when connect MS SQL server from Oracle 10g using JTDS
Hi,
I have developed a java servlet application connection to MS SQL using jtds-1.2.jar. I have try to deploy this application to Oracle 9ias and it works fine.
However, when I deploy the same application to Oracle 10g (10.1.2.0.2), I encounter this error - java.sql.SQLException: No suitable driver.
I have copy the jtds-1.2.jar to Ora10g/jdbc/lib, Ora10g/j2ee/home/lib and also the Ora10g/j233/OC$J_GENERAL/applications/sampleApp/sampleApp/WEB-INF/lib folder, and also setup the data source via the EM interface. The data-source.xml entry is as follows:
<data-source location="jdbc/ess" class="com.evermind.sql.DriverManagerDataSource" xa-location="jdbc/xa/essS" ejb-location="jdbc/ess" connection-driver="net.sourceforge.jtds.jdbc.Driver" username="scott" url="jdbc:jtds:sqlserver://202.xx.xx.xx:1433/sampleDB" inactivity-timeout="30" name="ess"/>
</data-sources>
Is there any configuration that I've forgotten to set?>
I have developed a java servlet application
connection to MS SQL using jtds-1.2.jar. I have try
to deploy this application to Oracle 9ias and it
works fine.
However, when I deploy the same application to Oracle
10g (10.1.2.0.2), I encounter this error -
java.sql.SQLException: No suitable driver.
I have copy the jtds-1.2.jar to Ora10g/jdbc/lib,
Ora10g/j2ee/home/lib and also the
Ora10g/j233/OC$J_GENERAL/applications/sampleApp/sample
App/WEB-INF/lib folder, and also setup the data
source via the EM interface.
Is there any configuration that I've forgotten to set?The JAR file needs to be in a place the container can locate it correctly. This is the applib directory for your OC4J instance.
Which I believe from what you have entered is:
Ora10g/j2ee/OC4J_GENERAL/applib
There's a general JDBC 3rd party driver set of documentation here:
http://download.oracle.com/docs/cd/B14099_11/web.1012/b14012/datasrc.htm#sthref592
This is not using jtds-1.2.jar but it shows how another set of 3rd party jdbc libs are used with the server.
-steve- -
Hi,
I'm getting the following error when trying to use the mapping tool from
within eclipse 3.0M8:
<error>-An error occurred running MappingTool
kodo.util.FatalDataStoreException: No suitable driver
NestedThrowables:
java.sql.SQLException: No suitable driver
<info>-Done.
I followed the instructions on using the eclipse plugin, including copying
all jars from kodo's lib folder to the plugin folder, copying the MySQL
Connector/J jar to the kodo plugin folder, adding all of those jars to the
project classpath, and even added an entry to the plugin.xml file to
include the MySQL Connector/J jar. If I remove the project reference to
the MySQL Connector/J jar, the error changes to:
<error>-An error occurred running MappingTool
kodo.util.FatalDataStoreException: com.mysql.jdbc.Driver
NestedThrowables:
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
<info>-Done.
This would imply that adding a <library> entry for the MySQL Connector/J
jar in my plugin.xml does not have any effect; if I remove it, I see the
same error as above. If I add the MySQL jar back to the project
classpath, the error changes back to 'No suitable driver' as above.
The behavior is the same whether I use the Kodo preferences
(Window\Preferences\Kodo Preferences) individually without a
kodo.properties file, or when I clear all individual properties and
indicate a kodo.properties file.
Help?
Thanks,
Matthew
Here's my kodo.properties file:
# Kodo JDO Properties configuration
kodo.LicenseKey: xxx
javax.jdo.PersistenceManagerFactoryClass:
kodo.jdbc.runtime.JDBCPersistenceManagerFactory
javax.jdo.option.ConnectionDriverName: com.mysql.jdbc.Driver
javax.jdo.option.ConnectionUserName: root
javax.jdo.option.ConnectionPassword:
javax.jdo.option.ConnectionURL: jdbc:mysql://localhost/kodo
javax.jdo.option.Optimistic: true
javax.jdo.option.RetainValues: true
javax.jdo.option.NontransactionalRead: true
kodo.Log: DefaultLevel=WARN, Runtime=INFO, Tool=INFO
Here's my eclipse-3.0M8/plugins/kodo.eclipse_2.1.0/plugin.xml:
<?xml version="1.0" encoding="UTF-8"?>
<plugin id="kodo"
name="%name"
version="1.0.1"
provider-name="%provider-name"
class="kodo.jdbc.integration.eclipse.KodoPlugin">
<runtime>
<!--
Put your jdbc driver in this directory and enter the filename
here (and configure in Preferences the changes you make) -->
<!--<library name="jdbc-hsql-1_7_0.jar"/>-->
<library name="mysql-connector-java-3.0.11-stable-bin.jar"/>
<!-- ########### do not modify below ######### -->
<!-- ########### do not modify below ######### -->
<!-- ########### do not modify below ######### -->
<!-- ########### do not modify below ######### -->
<!-- ########### do not modify below ######### -->
<library name="kodo-jdo.jar"/>
<library name="jakarta-commons-collections-2.1.jar"/>
<library name="jakarta-commons-lang-1.0.1.jar"/>
<library name="jakarta-commons-pool-1.0.1.jar"/>
<library name="jakarta-regexp-1.1.jar"/>
<library name="jca1.0.jar"/>
<library name="jdbc2_0-stdext.jar"/>
<library name="jdo-1.0.1.jar"/>
<library name="jta-spec1_0_1.jar"/>
<library name="xalan.jar"/>
<library name="xercesImpl.jar"/>
<library name="xml-apis.jar"/>
<library name="jfreechart-0.9.16.jar"/>
<library name="jcommon-0.9.1.jar"/>
<library name="mx4j-admb.jar"/>
<library name="mx4j-jmx.jar"/>
<library name="mx4j-tools.jar"/>
<library name="jline.jar"/>
<library name="sqlline.jar"/>
</runtime>
<requires>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.jdt.core"/>
<import plugin="org.eclipse.jdt.launching"/>
</requires>
<extension point="org.eclipse.ui.actionSets">
<actionSet id="kodo.jdbc.integration.eclipse.actionSet"
label="%action-set-name"
visible="true">
<menu id="kodo.menu"
label="%group-label">
<separator name="baseGroup"/>
</menu>
<action id="kodo.removeBuilder"
label="%remove-builder-label"
class="kodo.jdbc.integration.eclipse.RemoveBuilderAction"
tooltip="%remove-builder-tooltip"
menubarPath="kodo.menu/baseGroup"
enablesFor="1">
</action>
<action id="kodo.addbuilder"
label="%add-builder-label"
class="kodo.jdbc.integration.eclipse.AddBuilderAction"
tooltip="%add-builder-tooltip"
menubarPath="kodo.menu/baseGroup"
enablesFor="1">
</action>
<action id="kodo.mapping.build"
label="%mapping-build-label"
tooltip="%mapping-build-tooltip"
class="kodo.jdbc.integration.eclipse.MappingToolAction$BuildSchema"
icon="icons/BuildSchemaMappingTool.gif"
menubarPath="kodo.menu/baseGroup"
toolbarPath="Normal/Kodo"
enablesFor="+">
<selection class="org.eclipse.core.resources.IFile"
name="*.jdo">
</selection>
</action>
<action id="kodo.mapping.drop"
label="%mapping-drop-label"
tooltip="%mapping-drop-tooltip"
class="kodo.jdbc.integration.eclipse.MappingToolAction$Drop"
icon="icons/DropMappingTool.gif"
menubarPath="kodo.menu/baseGroup"
toolbarPath="Normal/Kodo"
enablesFor="+">
<selection class="org.eclipse.core.resources.IFile"
name="*.jdo">
</selection>
</action>
<action id="kodo.mapping.refresh"
label="%mapping-refresh-label"
tooltip="%mapping-refresh-tooltip"
class="kodo.jdbc.integration.eclipse.MappingToolAction$Refresh"
icon="icons/RefreshMappingTool.gif"
menubarPath="kodo.menu/baseGroup"
toolbarPath="Normal/Kodo"
enablesFor="+">
<selection class="org.eclipse.core.resources.IFile"
name="*.jdo">
</selection>
</action>
<action id="kodo.enhance"
label="%enhance-label"
icon="icons/EnhancerAction.gif"
class="kodo.jdbc.integration.eclipse.EnhancerAction"
tooltip="%enhance-tooltip"
menubarPath="kodo.menu/baseGroup"
toolbarPath="Normal/Kodo"
enablesFor="+">
<selection class="org.eclipse.core.resources.IFile"
name="*.jdo">
</selection>
</action>
</actionSet>
</extension>
<!-- lock our actions into the base perspective -->
<extension point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="org.eclipse.ui.resourcePerspective">
<actionSet
id="kodo.jdbc.integration.eclipse.actionSet">
</actionSet>
</perspectiveExtension>
</extension>
<!-- put our extensions in -->
<extension point="org.eclipse.ui.preferencePages">
<page name="%preference-name"
class="kodo.jdbc.integration.eclipse.KodoPreferencePage"
id="kodo.jdbc.integration.eclipse.preferences.KodoPreferencePage">
</page>
</extension>
<!-- lock in our eclipse-generated xml editor -->
<extension point="org.eclipse.ui.editors">
<editor name="%mappingeditor-name" extensions="mapping"
icon="icons/mapping.gif"
contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor"
class="kodo.jdbc.integration.eclipse.editor.XMLEditor"
id="kodo.jdbc.integration.eclipse.editor.XMLEditorMapping">
</editor>
<editor name="%editor-name" extensions="jdo,schema"
icon="icons/metadata.gif"
contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor"
class="kodo.jdbc.integration.eclipse.editor.XMLEditor"
id="kodo.jdbc.integration.eclipse.editor.XMLEditor">
</editor>
</extension>
<!-- lock in our "view" -->
<extension point="org.eclipse.ui.views">
<view id="kodo.jdbc.integration.eclipse.KodoView"
name="%view-name"
category="org.eclipse.jdt.ui.java"
icon="icons/kodosmall.gif"
class="kodo.jdbc.integration.eclipse.KodoView">
</view>
</extension>
<!-- lock in our builder -->
<extension point="org.eclipse.core.resources.builders"
id="kodo.jdbc.integration.eclipse.EnhancerBuilder"
name="%builder-name">
<builder>
<run
class="kodo.jdbc.integration.eclipse.EnhancerBuilder">
</run>
</builder>
</extension>
<!-- put our view onto the bottom bar -->
<extension point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="org.eclipse.debug.ui.DebugPerspective">
<view id="kodo.jdbc.integration.eclipse.KodoView"
relative="org.eclipse.debug.ui.ExpressionView"
relationship="stack"/>
<viewShortcut id="org.eclipse.jdt.debug.ui.DisplayView"/>
</perspectiveExtension>
</extension>
</plugin>I am not using Eclipse but am also experiencing problems similar to those
described below. The fact is I cannot validate a configuration file which
specifies either a traditional MySQL driver or a MySQL DataSoure.
I am using what I believe to be the official stable version of MySQL
Connector/J which is 3.0.11 and has been for several months. Are you
saying that 3.0.11 (or even 3.0.8) is not supported?
3.0.12 was recently released as the latest stable version so 3.0.11 should
at least be supported by now.
-Neil
Stephen Kim wrote:
The milestones are not fully supported versions as they are of beta
quality. I would suggest using a proper release instead.
Wolfgang Kundrus wrote:
Hi,
I have excactly the same behaviour here with Eclipse 3.0M8 and MySQL. It
is the same with 3.0.8. and 3.0.11. What is the solution ?
Best regards
Wolfgang Kundrus
Marc Prud'hommeaux wrote:
Matthew-
Everything looks correct to me. If you try an older version of the MySQL
driver (such as 3.0.8, which is what we test with), do you see anything
different?
If you try to run a stand-alone Kodo program using the MySQL driver, do
you see the same exception? If so, can you post the complete stack
trace?
In article <[email protected]>, Matthew T. Adams wrote:
Hi,
I'm getting the following error when trying to use the mapping tool from
within eclipse 3.0M8:
<error>-An error occurred running MappingTool
kodo.util.FatalDataStoreException: No suitable driver
NestedThrowables:
java.sql.SQLException: No suitable driver
<info>-Done.
I followed the instructions on using the eclipse plugin, including copying
all jars from kodo's lib folder to the plugin folder, copying the MySQL
Connector/J jar to the kodo plugin folder, adding all of those jars to the
project classpath, and even added an entry to the plugin.xml file to
include the MySQL Connector/J jar. If I remove the project reference to
the MySQL Connector/J jar, the error changes to:
<error>-An error occurred running MappingTool
kodo.util.FatalDataStoreException: com.mysql.jdbc.Driver
NestedThrowables:
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
<info>-Done.
This would imply that adding a <library> entry for the MySQL Connector/J
jar in my plugin.xml does not have any effect; if I remove it, I see the
same error as above. If I add the MySQL jar back to the project
classpath, the error changes back to 'No suitable driver' as above.
The behavior is the same whether I use the Kodo preferences
(WindowPreferencesKodo Preferences) individually without a
kodo.properties file, or when I clear all individual properties and
indicate a kodo.properties file.
Help?
Thanks,
Matthew
Here's my kodo.properties file:
# Kodo JDO Properties configuration
kodo.LicenseKey: xxx
javax.jdo.PersistenceManagerFactoryClass:
kodo.jdbc.runtime.JDBCPersistenceManagerFactory
javax.jdo.option.ConnectionDriverName: com.mysql.jdbc.Driver
javax.jdo.option.ConnectionUserName: root
javax.jdo.option.ConnectionPassword:
javax.jdo.option.ConnectionURL: jdbc:mysql://localhost/kodo
javax.jdo.option.Optimistic: true
javax.jdo.option.RetainValues: true
javax.jdo.option.NontransactionalRead: true
kodo.Log: DefaultLevel=WARN, Runtime=INFO, Tool=INFO
Here's my eclipse-3.0M8/plugins/kodo.eclipse_2.1.0/plugin.xml:
<?xml version="1.0" encoding="UTF-8"?>
<plugin id="kodo"
name="%name"
version="1.0.1"
provider-name="%provider-name"
class="kodo.jdbc.integration.eclipse.KodoPlugin">
<runtime>
<!--
Put your jdbc driver in this directory and enter the filename
here (and configure in Preferences the changes you make) -->
<!--<library name="jdbc-hsql-1_7_0.jar"/>-->
<library name="mysql-connector-java-3.0.11-stable-bin.jar"/>
<!-- ########### do not modify below ######### -->
<!-- ########### do not modify below ######### -->
<!-- ########### do not modify below ######### -->
<!-- ########### do not modify below ######### -->
<!-- ########### do not modify below ######### -->
<library name="kodo-jdo.jar"/>
<library name="jakarta-commons-collections-2.1.jar"/>
<library name="jakarta-commons-lang-1.0.1.jar"/>
<library name="jakarta-commons-pool-1.0.1.jar"/>
<library name="jakarta-regexp-1.1.jar"/>
<library name="jca1.0.jar"/>
<library name="jdbc2_0-stdext.jar"/>
<library name="jdo-1.0.1.jar"/>
<library name="jta-spec1_0_1.jar"/>
<library name="xalan.jar"/>
<library name="xercesImpl.jar"/>
<library name="xml-apis.jar"/>
<library name="jfreechart-0.9.16.jar"/>
<library name="jcommon-0.9.1.jar"/>
<library name="mx4j-admb.jar"/>
<library name="mx4j-jmx.jar"/>
<library name="mx4j-tools.jar"/>
<library name="jline.jar"/>
<library name="sqlline.jar"/>
</runtime>
<requires>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.jdt.core"/>
<import plugin="org.eclipse.jdt.launching"/>
</requires>
<extension point="org.eclipse.ui.actionSets">
<actionSet id="kodo.jdbc.integration.eclipse.actionSet"
label="%action-set-name"
visible="true">
<menu id="kodo.menu"
label="%group-label">
<separator name="baseGroup"/>
</menu>
<action id="kodo.removeBuilder"
label="%remove-builder-label"
class="kodo.jdbc.integration.eclipse.RemoveBuilderAction"
tooltip="%remove-builder-tooltip"
menubarPath="kodo.menu/baseGroup"
enablesFor="1">
</action>
<action id="kodo.addbuilder"
label="%add-builder-label"
class="kodo.jdbc.integration.eclipse.AddBuilderAction"
tooltip="%add-builder-tooltip"
menubarPath="kodo.menu/baseGroup"
enablesFor="1">
</action>
<action id="kodo.mapping.build"
label="%mapping-build-label"
tooltip="%mapping-build-tooltip"
class="kodo.jdbc.integration.eclipse.MappingToolAction$BuildSchema"
icon="icons/BuildSchemaMappingTool.gif"
menubarPath="kodo.menu/baseGroup"
toolbarPath="Normal/Kodo"
enablesFor="+">
<selection class="org.eclipse.core.resources.IFile"
name="*.jdo">
</selection>
</action>
<action id="kodo.mapping.drop"
label="%mapping-drop-label"
tooltip="%mapping-drop-tooltip"
class="kodo.jdbc.integration.eclipse.MappingToolAction$Drop"
icon="icons/DropMappingTool.gif"
menubarPath="kodo.menu/baseGroup"
toolbarPath="Normal/Kodo"
enablesFor="+">
<selection class="org.eclipse.core.resources.IFile"
name="*.jdo">
</selection>
</action>
<action id="kodo.mapping.refresh"
label="%mapping-refresh-label"
tooltip="%mapping-refresh-tooltip"
class="kodo.jdbc.integration.eclipse.MappingToolAction$Refresh"
icon="icons/RefreshMappingTool.gif"
menubarPath="kodo.menu/baseGroup"
toolbarPath="Normal/Kodo"
enablesFor="+">
<selection class="org.eclipse.core.resources.IFile"
name="*.jdo">
</selection>
</action>
<action id="kodo.enhance"
label="%enhance-label"
icon="icons/EnhancerAction.gif"
class="kodo.jdbc.integration.eclipse.EnhancerAction"
tooltip="%enhance-tooltip"
menubarPath="kodo.menu/baseGroup"
toolbarPath="Normal/Kodo"
enablesFor="+">
<selection class="org.eclipse.core.resources.IFile"
name="*.jdo">
</selection>
</action>
</actionSet>
</extension>
<!-- lock our actions into the base perspective -->
<extension point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="org.eclipse.ui.resourcePerspective">
<actionSet
id="kodo.jdbc.integration.eclipse.actionSet">
</actionSet>
</perspectiveExtension>
</extension>
<!-- put our extensions in -->
<extension point="org.eclipse.ui.preferencePages">
<page name="%preference-name"
class="kodo.jdbc.integration.eclipse.KodoPreferencePage"
id="kodo.jdbc.integration.eclipse.preferences.KodoPreferencePage">
</page>
</extension>
<!-- lock in our eclipse-generated xml editor -->
<extension point="org.eclipse.ui.editors">
<editor name="%mappingeditor-name" extensions="mapping"
icon="icons/mapping.gif"
contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor"
>>
class="kodo.jdbc.integration.eclipse.editor.XMLEditor"
id="kodo.jdbc.integration.eclipse.editor.XMLEditorMapping">
</editor>
<editor name="%editor-name" extensions="jdo,schema"
icon="icons/metadata.gif"
contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor"
>>
class="kodo.jdbc.integration.eclipse.editor.XMLEditor"
id="kodo.jdbc.integration.eclipse.editor.XMLEditor">
</editor>
</extension>
<!-- lock in our "view" -->
<extension point="org.eclipse.ui.views">
<view id="kodo.jdbc.integration.eclipse.KodoView"
name="%view-name"
category="org.eclipse.jdt.ui.java"
icon="icons/kodosmall.gif"
class="kodo.jdbc.integration.eclipse.KodoView">
</view>
</extension>
<!-- lock in our builder -->
<extension point="org.eclipse.core.resources.builders"
id="kodo.jdbc.integration.eclipse.EnhancerBuilder"
name="%builder-name">
<builder>
<run
class="kodo.jdbc.integration.eclipse.EnhancerBuilder">
</run>
</builder>
</extension>
<!-- put our view onto the bottom bar -->
<extension point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="org.eclipse.debug.ui.DebugPerspective">
<view id="kodo.jdbc.integration.eclipse.KodoView"
relative="org.eclipse.debug.ui.ExpressionView"
relationship="stack"/>
<viewShortcut id="org.eclipse.jdt.debug.ui.DisplayView"/>
</perspectiveExtension>
</extension>
</plugin>
Marc Prud'hommeaux [email protected]
SolarMetric Inc. http://www.solarmetric.com
Steve Kim
[email protected]
SolarMetric Inc.
http://www.solarmetric.com -
No suitable driver with com.mysql.jdbc.Driver
Ok. here's the issue. I have a windows box. (first problem) but let's pretend that it's ok. :) I installed Tomcat 4.1 installed J2SDK1.4.0
start serving pages GREAT!. I have Mysql working perfectly with PHP on this system. I JUST want to connect with JDBC :)
I've downloaded the MySQL Jdbc Connector/J 3.08 stable installed the .jar file in the $JAVA_HOME/jre/lib/ext as per the README
Now granted I am a little new to JSP. but I have checked over this again and again. used different code. connected as many ways as I can think of and I still get the same result.
Database Error :
No suitable driver
Please Try Some Other Time
So I figure it's a MYSQL issue. no I also went thru and did the Microsot connection to MS SQL 2000 with the same result.
Here's where the drivers are (tried using the other method for installing the MySQL connector as well, and my class path
Y:\j2sdk1.4.0\com\mysql\jdbc\Driver.class
com.mysql.jdbc.Driver.class
Y:\j2sdk1.4.0\org\gjt\mm\mysql\Driver.class
org.gjt.mm.mysql.Driver.class
My classpath is:
.;F:\j2sdk1.4.0\;F:\j2sdk1.4.0\bin\;F:\j2sdk1.4.0\lib\;F:\j2sdk1.4.0\lib\classes\
[ Here's The Enviorment]
Windows 2000 5.00.2195 SP3
MS SQL 2K SP3
Apache Tomcat/4.1.27
j2sdk1.4.0
MySql 3.23.57-nt
mysql Jdbc Connector/J 3.08 stable
<!-- mysql.jsp BEGIN-->
<%@ page import="java.sql.*" %>
<%
Connection conn;
ResultSet results;
try {
String jdbc_driver = "com.mysql.jdbc.Driver";
System.out.println("jdbc_driver = " + jdbc_driver);
Class.forName(jdbc_driver).newInstance();
catch (ClassNotFoundException cnfe)
System.out.println(cnfe.getMessage());
try {
String url = "jdbc:mysql://localhost:3306/javatest?username=root,password=****"; // pass hidden
conn = DriverManager.getConnection(url);
System.out.println("connected to mySql DataBase");
Statement stmt = conn.createStatement();
Statement smt=conn.createStatement();
results=smt.executeQuery("select * from testdata");
while(results.next())
%>
<%= results.getString("foo")%>
<%= results.getString("bar")%>
<%= results.getString("id")%>
<%
results.close();
conn.close();
catch(Exception exp)
%>
<H3>Database Error : </H3><B><%= exp.getMessage() %></B><H3>Please Try Some Other Time</H3>
<%
%>
<!-- mysql.jsp end -->
BTW i aslo tried connecting to MicrosoftSQL 2K
<!-- microsoft.jsp Begin -->
<%@ page import="java.sql.*" %>
<%
Connection conn;
ResultSet results;
try {
String jdbc_driver = "sun.jdbc.odbc.JdbcObdcDriver";
System.out.println("jdbc_driver = " + jdbc_driver);
Class.forName(jdbc_driver).newInstance();
catch (ClassNotFoundException cnfe)
System.out.println(cnfe.getMessage());
try {
String url = "jdbc:odbc:contacts";
String username = "javauser";
String pw = "javauser";
conn = DriverManager.getConnection(url, username, pw);
System.out.println("connected to Msoft DataBase");
Statement stmt = conn.createStatement();
Statement smt=conn.createStatement();
results=smt.executeQuery("select * from contacts");
while(results.next())
%>
<%= results.getString("name")%><br>
<%
results.close();
conn.close();
catch(Exception exp)
%>
<H3>Database Error : </H3><B><%= exp.getMessage() %></B><H3>Please Try Some Other Time</H3>
<%
%>
<!-- microsoft.jsp end -->
got the exact same results.
Just to show you mysql is Good. with localhost.
mysql -u root -h localhost -p
mysql> use javatest
Database changed
mysql> select * from testdata;
| id | foo | bar |
| 1 | hello | 12345 |
1 row in set (0.00 sec)
mysql>Nope, it's not a MySQL issue.
I'd recommend NOT putting the JDBC JAR file (or any others, except Sun-sanctioned extensions) in JAVA_HOME/jre/lib/ext.
JDBC JARs belong in TOMCAT_HOME/common/lib or in the WEB-INF/lib directory for your particular app. If you put them in the former, all apps running under Tomcat can have access to them. If you put them in the latter, only your app can see them.
After you've done that, do some reading about JNDI data sources under Tomcat:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
That way you can get that connection code out of your JSPs and into the web.xml and <Context>, where it belongs. You'll be able to change data sources without rewriting your pages.
Good luck - MOD -
Java.sql.SQLException: No suitable driver while using a tomcat DataSource
Im looking for some directing as I keep getting same error no matter what i've tried
App Server: localhost (Win 2000 Tomcat 4.0.6)
MySQL server: 192.168.x.x (Linux version 3.23.49)
IDE: NetBeans 3.5
error:
2003-07-07 11:37:42 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
javax.servlet.ServletException: class stuff.dao.ContextTester : java.sql.SQLException: No suitable driver
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471)
at org.apache.jsp.index$jsp._jspService(index$jsp.java:95)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.service(IDEJspServlet.java:173)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.serviceJspFile(IDEJspServlet.java:246)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:226)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.java:148)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:534)
----- Root Cause -----
java.lang.InstantiationException: class stuff.dao.ContextTester : java.sql.SQLException: No suitable driver
at org.apache.jsp.index$jsp._jspService(index$jsp.java:66)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.service(IDEJspServlet.java:173)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.serviceJspFile(IDEJspServlet.java:246)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:226)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.java:148)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:534)
web.xml:
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>
index.jsp
</welcome-file>
</welcome-file-list>
<resource-ref>
<res-ref-name>jdbc/dao</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
server.xml:
<Context path="" docBase="C:\Documents and Settings\devel\Desktop\stuff Proj">
<Valve className="org.netbeans.modules.web.monitor.catalina.MonitorValve"/>
<InstanceListener>org.netbeans.modules.web.monitor.catalina.DispatchListener</InstanceListener>
<Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost__log." suffix=".txt" timestamp="true"/>
<Resource name="jdbc/dao" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/dao">
<parameter>
<name>url</name>
<value>jdbc:mysql://192.168.x.x/develop</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>username</name>
<value>webapp</value>
</parameter>
<parameter>
<name>password</name>
<value>password</value>
</parameter
</ResourceParams>
</Context>
instantiated class:
package stuff.dao;
import java.beans.*;
import java.sql.*;
import javax.sql.*;
import javax.naming.*;
import java.util.*;
import java.io.*;
public class ContextTester extends Object implements java.io.Serializable {
public Connection con = null;
/** Creates new ContextTester */
public ContextTester() throws NamingException, SQLException {
Context init = new InitialContext();
Context ctx = (Context) init.lookup("java:comp/env");
DataSource ds = (DataSource) ctx.lookup("jdbc/dao");
con = ds.getConnection();
/** get new class ID from database **/
/* public String getNewID () throws SQLException {
PreparedStatement qry;
ResultSet results = null;
try {
qry = con.prepareStatement("SELECT MAX(id)FROM role");
results = qry.executeQuery();
if (!results.next()) throw new SQLException ("Can not retrieve maximum id");
return results.getString(1);
} finally {
try { results.close(); } catch (Exception ex) {}
index.jsp:
<jsp:useBean id="cntxt" class="stuff.dao.ContextTester" scope="page" />
<html>
<head><title>JSP Page</title></head>
<body>
Hello World!<br>
This page has worked!!<br>
</body>
</html>
A jar file containing stuff.dao.ContextTester
and mysql-connector-java-3.0.8-stable-bin.jar
are in the WEB-INF/lib directory of webapps
if anybody has any suggestions it would be appreciated!!I've never seen an IP address like the one you have in your database URL:
<value>jdbc:mysql://192.168.x.x/develop</value>
Are placeholders like that legal? Or did you put them into the note to disguise what machine you were using?
I've got a Context like this for a JSP-to-Oracle app that I'm using:
<Resource name="jdbc/Conference"
auth="Container"
type="javax.sql.DataSource"/>
<!-- Oracle 9.2.0.1 data source -->
<ResourceParams name="jdbc/Conference">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:oracle:thin:@elvis:1521:CAPP</value>
</parameter>
<parameter>
<name>username</name>
<value>api</value>
</parameter>
<parameter>
<name>password</name>
<value>mod</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>20</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>0</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>60000</value>
</parameter>
<parameter>
<name>removeAbandoned</name>
<value>true</value>
</parameter>
<parameter>
<name>removeAbandonedTimeout</name>
<value>300</value>
</parameter>
</ResourceParams>
The JNDI lookup string is "java:comp/env/jdbc/Conference". MOD -
Error when using MySQL view that has name greater than 30 characters
Hi, am loading MySQL data to an Oracle table using an ODI 11g Interface.
The interface errors when the name of the MySQL view exceeds 30 characters. A "view not found" error is encountered.
Is there any work around when using source datastores (MySQL views in this case) where the datastore name exceeds 30 characters, other than renaming the MySQL view to have a max 30 character name?
Thanks,
Kevin L.I believe that mySQL supports upto 64 characters in table name. You need to update the ODI 11g Topology -> Physical Architecture -> Dbl click MySQL -> Goto Advanced tab and update the "Maximum table name length". By default that is setup to 30.
-
HT3964 noisey dvd drive when using with macbook pro retina?
I bought a new macbook pro retina 15" and used the apple external dvd drive to watch a movie and the drive was extremely loud and vibratory - to thr point of nearly not able to hear the movie. I then tried the same drive with the the same dvd with a macbook air and it did not have this issue. Anyone know how to solve the sound issue when using the dvd drive with a macbook pro retina 15"? Thank you.
Thank you - it is the DVD driver I purchased over a year ago with a Mac book air - I wondered whether they have since updated the DVD driver and therefore wondered about compatibility. I also wondered whether it had to do with the fact that I was on battery power when this happened any further thoughts appreciated.
-
Administrative rights to external hard drive when using Parallels
I have installed Parallels to run an embroidery software (Floriani) on my MacBook Air. Both Parallels and the Floriani are running fine and I can see my windows formatted external hard drive when in Floriani and can bring in files from it. But when I try to save a redesigned embroidery file to the external hard drive it tells me I can not because I do not have administrative rights. I have tried to also tried to copy embroidery files downloaded from the internet to my Macbook and get the same message. Since I am the administrator (and only user) of this laptop, how can I get access to the hard drive. I tried following the all the suggestions in the Help Center for setting permission but even though I can set the drive as a "shared" file I cannot see the "lock'" icon referred to and in the "Sharing and Permissions" it still says I can only read. I was told this would be simple???
It is coming from a Windows program (Floriani) AND my Mac/Finder. From Floriani (Windows program) when I try to save a file to the external hard drive. And when I try to copy a file from my Mac hard drive to the external hard drive, it just refuses to do it. I get a "bonk" sound. So I tried highlighting the external drive in finder, went to "file" then "get info" and it says this is a read only "file"....although it is a hard drive, not a file. So I tried same with folders on the hard drive. Same thing.
-
I am trying to connect to mysql Db through RMI but i am getting this exception.
When trying to connect to db through a normal class implementation without RMI it is connected succesfully.
What is causing the problem????
Thanks in advaceCLASSPATH, man. The RMI server needs to have the MySQL driver JAR in its CLASSPATH.
That's usually what that exception means.
% -
Can't share files on a removable hard drive when using Airport Extreme
I connected a removable hard drive to the USB port on the Airport Extreme. I can see the hard drive under Disks in Airport Utility, but cannot view or share the files.
Note: I can share the files when I am connected directly to my MacBook Pro USB port.
Please help.I have enabled file sharing.
I tried going to afp://10.0.1.1 but get a connection error. I may be doing it wrong. How do I get the proper IP to use?
Thanks -
Files lost from external hard drive when using Time Machine
Hi,
I am very new to Mac and might did something stupid. I have one small portable hard drive that I keep everything in it as my backup. All Photos, music, files, etc, now are gone because I was enable this hard drive to be the Time Machine backup.
Mac did tell me that the drive is not compatible and when I selected this drive, Time Machine asked to format it. Of course, I said no.
The structure of folders in the drive looks perfect to me but the files are gone (except only few small files)
Can someone help me restore my backup please? :'(
Message was edited by: PinociohHI,
Many small drives you buy can be formated in a variety of ways that are not Time Machine Friendly. For example, the Western Digital Passport, a very nice small drive, is usually in the FAT(32) format. To use such a drive you only need reformat it for Time machine (really for the Intel Mac).
To do this you go to Applications/Utilities/disk utility. Be sure your drive is plugged in and spun up. In disk utility select the drive in the pane on the left. Then click the tab on the right that says "partition". Choose 1 partition if that's what you want and then in options choose GUID. Then click "apply". This will remove everything on the drive, but now it will work just fine with time machine.
Hope this helps.
Maybe you are looking for
-
Include statement in SAP Scripts
HI 1)Could you send syntax of logo in header window of layout. 2)We have 2 printers, while i give the print request Purchase order, one printer is working and coming logo along with details of the form, but other printer is working, then logo is not
-
While working on PO versions I found entries in EREV, CDHDR, CDPOS..... But when i Check in se 37 for FM "BBP_PD_PO_GETDETAIL" and 'BBP_PD_CTR_GETDETAIL' or cheked for table 'E_VERSION ' or Transaction BBP_PD I didnt found anything.... N
-
IDOC packaging in 7.1 - structure problems
Hi guys, I am using the new PI 7.1 IDOC packaging functionality. On backend side everything looks fine and the IDOCs are received by PI in single package. However, if I use as an Outbound interface the IDOC definition, in Message Mapping the occuren
-
Question about Creating DataSources for FlatFile Data Acquisition
Hello eveyone, I am trying to create flatfile datasources. I've been checking out the existing ds in my dev system and there are some infrastructure here that have loaded data in them, all via their won flatfile DS. I've been looking at the DS and
-
When I apply a new keyword, it deletes the previous
I'm having a big problem in applying keywords to my images on bridge. I built a very extensive keyword tree and imported into bridge. When I try to aplly multiples keywords, my nightmare begins. First, it's extremely slow! Second and even worse, it w