CachedRowSet.next() problem. Using mysql.
Hello,
I'm trying to retrieve the results of a database query using a CachedRowSet but the next() function doenst resolve for me.
I'm using intellij with sun java 1.5.0.06 and mysql-connector-java-3.1.12-bin.jar.
I've also tried mysql-connector-java-5.0.3-bin.jar but get the same problem.
Here is the code snippet:
CachedRowSet crs = LinkerAdapterMySQL.getInstance().getData( "SELECT * FROM restype WHERE 1" );
Vector<String> resTypes = new Vector<String>();
while( crs.next() )
try{
resTypes.add( crs.getString( "resType" ) );
} catch( java.sql.SQLException e )
System.err.println( e.toString() );
}When i try to build the project i get this error at the line "while( crs.next() )":
illegal start of type.
Any ideas what's going on?
thanks.
Whoops, nevermind.
I'm an idiot and had that code outside of a function declaration.
Similar Messages
-
30EA4 Problem using MySql: "Query execution was interrupted"
Any query executes the first time but a second execution always causes the error "Query execution was interrupted"
(Update: I just installed the prodcution release of sql delveloper 2.1.1.64.45 and have the same issue)
I am using MySql driver 5.1.15
Others seem to have a similar issue and I tries the older JDBC drivers but the 5.0.4 cause the connection to hang and the 5.0.8 caused the same problem "Query execution was interrupted"
Vendor Code 1317 Query execution was interrupted MySQL
I am using Windows7 64 bit (sql developer and jdk are 32 bit), see below
MySql version
-------------------------------------------------------+
| Variable_name | Value |
-------------------------------------------------------+
| innodb_version | 1.1.4 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 5.5.8 |
| version_comment | MySQL Community Server (GPL) |
| version_compile_machine | x86 |
| version_compile_os | Win64 |
-------------------------------------------------------+
SQL Develper Info:
About
Oracle SQL Developer 3.0.03
Version 3.0.03
Build MAIN-03.97
Copyright © 2005, 2011 Oracle. All Rights Reserved.
IDE Version: 11.1.1.4.37.59.36
Product ID: oracle.sqldeveloper
Product Version: 11.1.2.03.97
Version
Component Version
========= =======
Java(TM) Platform 1.6.0_24
Oracle IDE 3.0.03.97
Versioning Support 3.0.03.97
Properties
Name Value
==== =====
awt.toolkit sun.awt.windows.WToolkit
class.load.environment oracle.ide.boot.IdeClassLoadEnvironment
class.load.log.level CONFIG
class.transfer delegate
file.encoding Cp1252
file.encoding.pkg sun.io
file.separator \
http.agent Mozilla/5.0 (Java 1.6.0_24; Windows 7 6.1 x86; en_IE) ICEbrowser/v6_1_3
ice.browser.forcegc false
ice.pilots.html4.ignoreNonGenericFonts true
ice.pilots.html4.tileOptThreshold 0
ide.AssertTracingDisabled true
ide.bootstrap.start 7381246437329
ide.build MAIN-03.97
ide.conf C:\Program Files (x86)\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf
ide.config_pathname C:\Program Files (x86)\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf
ide.debugbuild false
ide.devbuild false
ide.extension.search.path sqldeveloper/extensions:jdev/extensions:ide/extensions
ide.firstrun true
ide.java.minversion 1.6.0_04
ide.launcherProcessId 2204
ide.main.class oracle.ide.boot.IdeLauncher
ide.patches.dir ide/lib/patches
ide.pref.dir C:\Users\mark\AppData\Roaming\SQL Developer
ide.pref.dir.base C:\Users\mark\AppData\Roaming
ide.product oracle.sqldeveloper
ide.shell.enableFileTypeAssociation C:\Program Files (x86)\sqldeveloper\sqldeveloper.exe
ide.splash.screen splash.gif
ide.startingArg0 C:\Program Files (x86)\sqldeveloper\sqldeveloper.exe
ide.startingcwd C:\Program Files (x86)\sqldeveloper
ide.user.dir C:\Users\mark\AppData\Roaming\SQL Developer
ide.user.dir.var IDE_USER_DIR
ide.vcs.noapplications true
ide.work.dir C:\Users\mark\Documents\SQL Developer
ide.work.dir.base C:\Users\mark\Documents
ilog.propagatesPropertyEditors false
java.awt.graphicsenv sun.awt.Win32GraphicsEnvironment
java.awt.printerjob sun.awt.windows.WPrinterJob
java.class.path ..\..\ide\lib\ide-boot.jar
java.class.version 50.0
java.endorsed.dirs C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\endorsed
java.ext.dirs C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\ext;C:\Windows\Sun\Java\lib\ext
java.home C:\Program Files (x86)\Java\jdk1.6.0_24\jre
java.io.tmpdir C:\Users\mark\AppData\Local\Temp\
java.library.path C:\Program Files (x86)\sqldeveloper;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files\TortoiseSVN\bin;C:\Program Files\SlikSvn\bin\;C:\Program Files (x86)\Java\jdk1.6.0_24\bin;C:\Program Files (x86)\OpenVPN\bin;C:\tools\apache-maven-3.0.2\bin;C:\tools\mysql-5.5.8-winx64\bin
java.naming.factory.initial oracle.javatools.jndi.LocalInitialContextFactory
java.protocol.handler.pkgs oracle.jdevimpl.handler
java.runtime.name Java(TM) SE Runtime Environment
java.runtime.version 1.6.0_24-b07
java.specification.name Java Platform API Specification
java.specification.vendor Sun Microsystems Inc.
java.specification.version 1.6
java.util.logging.config.file logging.conf
java.vendor Sun Microsystems Inc.
java.vendor.url http://java.sun.com/
java.vendor.url.bug http://java.sun.com/cgi-bin/bugreport.cgi
java.version 1.6.0_24
java.vm.info mixed mode
java.vm.name Java HotSpot(TM) Client VM
java.vm.specification.name Java Virtual Machine Specification
java.vm.specification.vendor Sun Microsystems Inc.
java.vm.specification.version 1.0
java.vm.vendor Sun Microsystems Inc.
java.vm.version 19.1-b02
jdbc.library /C:/Program Files (x86)/sqldeveloper/jdbc/lib/ojdbc6.jar
line.separator \r\n
log.file.name ..//log/datamodeler.log
oracle.home C:\Program Files (x86)\sqldeveloper
oracle.ide.util.AddinPolicyUtils.OVERRIDE_FLAG true
oracle.jdbc.mapDateToTimestamp false
oracle.translated.locales de,es,fr,it,ja,ko,pt_BR,zh_CN,zh_TW
oracle.xdkjava.compatibility.version 9.0.4
orai18n.library /C:/Program Files (x86)/sqldeveloper/jlib/orai18n.jar
os.arch x86
os.name Windows 7
os.version 6.1
path.separator ;
reserved_filenames con,aux,prn,lpt1,lpt2,lpt3,lpt4,lpt5,lpt6,lpt7,lpt8,lpt9,com1,com2,com3,com4,com5,com6,com7,com8,com9,conin$,conout,conout$
sqldev.debug false
sun.arch.data.model 32
sun.boot.class.path C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\resources.jar;C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\rt.jar;C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\sunrsasign.jar;C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\jsse.jar;C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\jce.jar;C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\charsets.jar;C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\modules\jdk.boot.jar;C:\Program Files (x86)\Java\jdk1.6.0_24\jre\classes
sun.boot.library.path C:\Program Files (x86)\Java\jdk1.6.0_24\jre\bin
sun.cpu.endian little
sun.cpu.isalist pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
sun.desktop windows
sun.io.unicode.encoding UnicodeLittle
sun.java2d.ddoffscreen false
sun.jnu.encoding Cp1252
sun.management.compiler HotSpot Client Compiler
sun.os.patch.level
svnkit.sax.useDefault true
user.country IE
user.dir C:\Program Files (x86)\sqldeveloper\sqldeveloper\bin
user.home C:\Users\mark
user.language en
user.name mark
user.timezone Europe/Paris
user.variant
windows.shell.font.languages
Extensions
Name Identifier Version Status
==== ========== ======= ======
Check For Updates oracle.ide.webupdate 11.1.1.4.37.59.36 Loaded
Code Editor oracle.ide.ceditor 11.1.1.4.37.59.36 Loaded
Component Palette oracle.ide.palette1 11.1.1.4.37.59.36 Loaded
Data Miner oracle.dmt.dataminer 11.2.0.1.9.96 Loaded
Database Connection Support oracle.jdeveloper.db.connection 11.1.1.4.37.59.36 Loaded
Database Object Explorers oracle.ide.db.explorer 11.1.1.4.37.59.36 Loaded
Database UI oracle.ide.db 11.1.1.4.37.59.36 Loaded
Diagram Framework oracle.diagram 11.1.1.4.37.59.36 Loaded
Diagram Javadoc Extension oracle.diagram.javadoc 11.1.1.4.37.59.36 Loaded
Diagram Thumbnail oracle.diagram.thumbnail 11.1.1.4.37.59.36 Loaded
Diff/Merge oracle.ide.diffmerge 11.1.1.4.37.59.36 Loaded
Extended IDE Platform oracle.javacore 11.1.1.4.37.59.36 Loaded
External Tools oracle.ide.externaltools 11.1.1.4.37.59.36 Loaded
File Support oracle.ide.files 11.1.1.4.37.59.36 Loaded
Help System oracle.ide.help 11.1.1.4.37.59.36 Loaded
History Support oracle.jdeveloper.history 11.1.1.4.37.59.36 Loaded
Import/Export Support oracle.ide.importexport 11.1.1.4.37.59.36 Loaded
Index Migrator support oracle.ideimpl.indexing-migrator 11.1.1.4.37.59.36 Loaded
JDeveloper Runner oracle.jdeveloper.runner 11.1.1.4.37.59.36 Loaded
JViews Registration Addin oracle.diagram.registration 11.1.1.4.37.59.36 Loaded
Log Window oracle.ide.log 11.1.1.4.37.59.36 Loaded
Mac OS X Adapter oracle.ideimpl.apple 11.1.1.4.37.59.36 Loaded
Navigator oracle.ide.navigator 11.1.1.4.37.59.36 Loaded
Object Gallery oracle.ide.gallery 11.1.1.4.37.59.36 Loaded
Oracle IDE oracle.ide 11.1.1.4.37.59.36 Loaded
Oracle SQL Developer oracle.sqldeveloper 11.1.2.03.97 Loaded
Oracle SQL Developer - 3rd Party Database Browsers oracle.sqldeveloper.thirdparty.browsers 11.1.1.03.97 Loaded
Oracle SQL Developer - DBA Navigator oracle.sqldeveloper.dbanavigator 11.1.1.03.97 Loaded
Oracle SQL Developer - Extras oracle.sqldeveloper.extras 1.1.1.03.97 Loaded
Oracle SQL Developer - File Navigator oracle.sqldeveloper.filenavigator 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Antlr3 Translator oracle.sqldeveloper.migration.translation.core_antlr3 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Application Migration oracle.sqldeveloper.migration.application 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Core oracle.sqldeveloper.migration 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations DB2 oracle.sqldeveloper.migration.db2 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations DB2 Translator oracle.sqldeveloper.migration.translation.db2 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Microsoft Access oracle.sqldeveloper.migration.msaccess 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Microsoft SQL Server oracle.sqldeveloper.migration.sqlserver 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations MySQL oracle.sqldeveloper.migration.mysql 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Sybase Adaptive Server oracle.sqldeveloper.migration.sybase 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations T-SQL Translator oracle.sqldeveloper.migration.translation.core 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Teradata oracle.sqldeveloper.migration.teradata 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Translation UI oracle.sqldeveloper.migration.translation.gui 11.1.1.03.97 Loaded
Oracle SQL Developer - Object Viewer oracle.sqldeveloper.oviewer 11.1.1.03.97 Loaded
Oracle SQL Developer - Real Time SQL Monitoring oracle.sqldeveloper.sqlmonitor 11.1.1.03.97 Loaded
Oracle SQL Developer - Reports oracle.sqldeveloper.report 11.1.1.03.97 Loaded
Oracle SQL Developer - Scheduler oracle.sqldeveloper.scheduler 11.1.1.03.97 Loaded
Oracle SQL Developer - Schema Browser oracle.sqldeveloper.schemabrowser 11.1.1.03.97 Loaded
Oracle SQL Developer - SearchBar oracle.sqldeveloper.searchbar 11.1.1.03.97 Loaded
Oracle SQL Developer - Snippet oracle.sqldeveloper.snippet 11.1.1.03.97 Loaded
Oracle SQL Developer - Spatial oracle.sqldeveloper.spatial 11.1.1.03.97 Loaded
Oracle SQL Developer - TimesTen oracle.sqldeveloper.timesten 2.0.0.03.97 Loaded
Oracle SQL Developer - Tuning oracle.sqldeveloper.tuning 11.1.1.03.97 Loaded
Oracle SQL Developer - Unit Test oracle.sqldeveloper.unit_test 11.1.1.03.97 Loaded
Oracle SQL Developer - User Extensions Support oracle.sqldeveloper.userextensions 11.1.1.03.97 Loaded
Oracle SQL Developer - Worksheet v2 oracle.sqldeveloper.worksheet 11.1.1.03.97 Loaded
Oracle SQL Developer - XML Schema oracle.sqldeveloper.xmlschema 11.1.1.03.97 Loaded
Oracle SQL Developer Data Modeler oracle.datamodeler 3.0.0.665 Loaded
Oracle SQL Developer Data Modeler - Reports oracle.sqldeveloper.datamodeler_reports 11.1.1.03.97 Loaded
PROBE Debugger oracle.jdeveloper.db.debug.probe 11.1.1.4.37.59.36 Loaded
Peek oracle.ide.peek 11.1.1.4.37.59.36 Loaded
Persistent Storage oracle.ide.persistence 11.1.1.4.37.59.36 Loaded
Property Inspector oracle.ide.inspector 11.1.1.4.37.59.36 Loaded
QuickDiff oracle.ide.quickdiff 11.1.1.4.37.59.36 Loaded
Replace With oracle.ide.replace 11.1.1.4.37.59.36 Loaded
Runner oracle.ide.runner 11.1.1.4.37.59.36 Loaded
VHV oracle.ide.vhv 11.1.1.4.37.59.36 Loaded
Versioning Support oracle.jdeveloper.vcs 11.1.1.4.37.59.36 Loaded
Versioning Support for Subversion oracle.jdeveloper.subversion 11.1.1.4.37.59.36 Loaded
Virtual File System oracle.ide.vfs 11.1.1.4.37.59.36 Loaded
Web Browser and Proxy oracle.ide.webbrowser 11.1.1.4.37.59.36 Loaded
XML Editing Framework IDE Extension oracle.ide.xmlef 11.1.1.4.37.59.36 Loaded
audit oracle.ide.audit 11.1.1.4.37.59.36 Loaded
classpath: protocol handler extension oracle.jdeveloper.classpath 11.1.1.0.0 Loaded
jdukshare oracle.bm.jdukshare 11.1.1.4.37.59.36 Loaded
mof-xmi oracle.mof.xmi 11.1.1.4.37.59.36 Loaded
oracle.ide.dependency oracle.ide.dependency 11.1.1.4.37.59.36 Loaded
oracle.ide.indexing oracle.ide.indexing 11.1.1.4.37.59.36 Loaded
palette2 oracle.ide.palette2 11.1.1.4.37.59.36 Loaded
status oracle.ide.status 11.1.1.4.37.59.36 Loaded
Edited by: user501466 on 19-Mar-2011 03:21Hi Dermot,
Some clarification.
I have tried these 3 drivers below with the following results:
5.0.4 First Query succeeds, Second gives error "Unknown prepared statement handler (131072) given to mysqld_stmt_execute". At this point I can exit SQL Developer. If I run it a third time then the query does not complete and any attempt to exit SQL Developer results in "Connection is currently busy, try again?" and ultimately I have to kill it.
5.0.8 First Query succeeds, Second Query fails with Query execution was interrupted. Subsequent queries give the same result.
5.1.15 Same as 5.0.8
I tried your suggestion, removed the driver, restarted, installed the 5.0.4 driver and restated and ran the test,
(I added a drop table so I could run it repeatedly) and it works repeatedly if I choose "Run as script F5".
DROP TABLE table1;
CREATE TABLE table1(col1 int);
INSERT INTO Table1 values(1);
SELECT * FROM table1;
SELECT * FROM table1;
But If I execute the query "select * from table1" using "Run Statement Ctrl-Enter" twice then I get problem behaviour as described above.
I looked in the logfile for SQLDeveloper but it was empty.
I also tried creating a new database as root and connecting as root (same result)
I also tried the NightlyBuild of 5.1 and 6.0 but gave the same result as 5.1.5.
I have two other tools for accessing MySql: Toad and MySql workbench, both of which work but I've used SQL Developer with Oracle for some years and would like to keep using it.
I just tried connecting to a remote MySQL database and that seems to work without problems.
I'm thinking it may be related to some incompatibility between SQLDeveloper and the MySQL installed locally.
I'll try another version....
Ok I installed a 32 bit version of MySql 5.5.10. I thought things were working but now I still get the problem but it is much more intermittent.
Now I can get it by modifying the query ie.
select * from table1; (works repeatedly untill followed by a change to the query)
select * from table1 order by col1; (fails)
Another case
select * from table1 order by col1; (works repeatedly)
select * from table1 order by col1 asc; (fails first time)
very weird...
Edited by: user501466 on 26-Mar-2011 06:19 -
Alright well here is my issue... I have been trying to fix it on my own for the past week non stop and I have finally came to a solid conclusion as to the cause of the issue.
I always get the error "The server has encountered an error..." in red text when anyone tries to submit a form and also when I try and test it myself. This led me to test the server / site for compatibility or issues by using the test:
mydomain.com /scripts/form_check.php
I got the first two checks green (pass) and the third test threw a red check meaning I was having an issue with SQL verification. This then led me to days of trying to work with my hosting provider (one.com) trying to solve the problem and I was told that they use mySQL on their servers and that they couldn't do anything on their end to solve the issue. I read alot that we are recommended in this case to try and get our host to add the SQLite database to their server or whatever it is they would do, long story short I guess many people are able to ask their host to make SQLite work and most accept and add SQLite functionality to their servers but unfortunately my hosting provider doesn't want to do this and they said they were sorry and that I would need to either switch the script to work with mySQL or figure something else out...
I took a lot of time building my site and I dont want to take the form out. I absolutely need it... I know many post on here saying "forms dont work, oh poop " or "adobe sucks I dont want to use business catalyst grrr" but I tried to find the source of the problem and I've successfully came to the conclusion that my issue is that my script wants to use SQLite but in order for my sites forms to work the server needs to have SQLite as well... My idea is that if I can configure the script and the site itself to use mySQL instead of SQLite the SQL verification will then not be an issue and my websites forms will function with no issues. I am curious if a member of the staff with adobe has experience with this particular issue and can help me out? or if a member of the adobe community has solved this problem? If not I am hoping that with the description I provided that someone with knowledge of mysql, sqlite or code in general could help me modify the script or write a new script that will allow the forms to work properly. I know its a long shot, I say that because this discussion is full of people who used muse in favor of dreamweaver because just like a large number of people in the muse discussion area, I'm a graphic designer, with plenty of computer experience, art and design skill and I am extremely familiar with photoshop. Muse is perfect in so many ways. In fact, like I mentioned above, I don't even have a complaint at this time about muse. I understand the form issue in this case, and I imagine in thousands of other users situations, is all just a matter of scripts and compatibility.. Its just a little issue between the SQLite scripts we are all given when we export our muse website and the SQL version our various hosting service may be using on their servers.
Just incase I missed anything, to provide just a bit more info on the topic and myself for anyone who may be able to help:
I can alter the text inside of the scripts easily if anyone happens to know any lines of code that easily solve this issue (making the muse contact forms, which are native to SQLite, functional on a server using mySQL)
I was told one way I could make the forms work on a server using mySQL (or any version other than SQLite) If I were to make changes to adobe muses SQL version by converting the SQLite db to mySQL db (db = database)
I am computer literate and I can take any directions necessary, I really just need to get this done, I really appreciate any help I can get!!
Thank you in advance,
Roy<?php
If you see this text in your browser, PHP is not configured correctly on this hosting provider.
Contact your hosting provider regarding PHP configuration for your site.
PHP file generated by Adobe Muse CC 2014.1.6
function formthrottle_check()
if (!function_exists("sqlite_open"))
return '1';
$retCode ='5';
if ($db = @sqlite_open('muse-throttle-db', 0666, $sqliteerror))
$res = @sqlite_query($db, "SELECT 1 FROM sqlite_master WHERE type='table' AND name='Submission_History';", $sqliteerror);
if ($res == null or @sqlite_num_rows($res) == 0 or @sqlite_fetch_single($res) != 1)
$created = @sqlite_exec($db, "CREATE TABLE Submission_History (IP VARCHAR(39), Submission_Date TIMESTAMP)", $sqliteerror);
if($created)
@sqlite_exec($db, "INSERT INTO Submission_History (IP,Submission_Date) VALUES ('256.256.256.256', DATETIME('now'))", $sqliteerror);
else
$retCode = '2';
if($retCode == '5')
$res = @sqlite_query($db, "SELECT COUNT(1) FROM Submission_History;", $sqliteerror);
if ($res != null and @sqlite_num_rows($res) > 0 and @sqlite_fetch_single($res) > 0)
$retCode = '0';
else
$retCode = '3';
@sqlite_close($db);
else
$retCode = '4';
return $retCode;
function formthrottle_too_many_submissions($ip)
$tooManySubmissions = false;
if (function_exists("sqlite_open") and $db = @sqlite_open('muse-throttle-db', 0666, $sqliteerror))
$ip = @sqlite_escape_string($ip);
@sqlite_exec($db, "DELETE FROM Submission_History WHERE Submission_Date < DATETIME('now','-2 hours')", $sqliteerror);
@sqlite_exec($db, "INSERT INTO Submission_History (IP,Submission_Date) VALUES ('$ip', DATETIME('now'))", $sqliteerror);
$res = @sqlite_query($db, "SELECT COUNT(1) FROM Submission_History WHERE IP = '$ip';", $sqliteerror);
if (@sqlite_num_rows($res) > 0 and @sqlite_fetch_single($res) > 25)
$tooManySubmissions = true;
@sqlite_close($db);
return $tooManySubmissions;
?> -
Read/Write problems with multiple connections using MySQL & Tomcat
hello all,
I am developing a web-based java application that runs on a 4.1 tomcat server and uses MySQL 3.23.52 as db server.
this program uses hundreds of tables with hundreds of rows each.
when two or more users are connected, we are experiencing several problems:
1. when a query is started, they get cross-results that come from both connections.
2. when inserting/updating (most queries are long and take a few seconds), sometimes data are crossed too, sometimes they are saved incorrectly but get no error message, sometimes they are not saved and get 'null pointer' sqlexception (but tables and queries are correct).
3. using SHOW PROCESSLIST and SHOW STATUS, we saw that MySQL server hosted no more than 3 max_used_connections, even when my.cnf parameters where set with more. when 3 or more users try to access the database, they get a bad handshake error until other connections are freed.
any suggestions?
thanks
alessandro bonanni
university of udineI am not using a connection pool. I read that when two different connections try to access the same data simultaneously, mysql is not secure. maybe a connection pool could solve that? or maybe is it a mysql limit?
alessandro -
Tomcat problem finding MySQL driver when context used
Hi all.
I have a context set in tomcat3.3 which allows me to run JSPs saved in TOMCAT_HOME/webapps/examples/jsp from /luc.
Initially, I had problems using beans when I used the context (the whole thing works ok when I just enter the actual path in the URL).
I solved that by adding the ...WEB-INF/classes directories to my CLASSPATH. But now that the beans are found, Tomcat is giving errors regarding the mySQL driver I'm using, which is mm-mysql-2.0.11.
The error is:
Error: 500
Location: /luc/validateLogin.jsp
Internal Servlet Error:
javax.servlet.ServletException:
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:460)
at validateLogin_1._jspService(validateLogin_1.java:139)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:484)
Root cause:
java.lang.NullPointerException:
at customerProfile.customerProfileBean.validateUser(customerProfileBean.java:135)
at validateLogin_1._jspService(validateLogin_1.java:98)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:484)
And I've outputted the the following stuff:
Unable to load driver java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
java.sql.SQLException: No suitable driver
Remember, this all works fine when I don't use the context.
In my CLASSPATH, I point to the JAR file:
/usr/local/jdk1.3.1/lib/mm.mysql-2.0.11/mm.mysql-2.0.11-bin.jar
Any ideas?try moving the mm.mysql-2.0.11-bin.jar file to %TOMCAT_HOME%/common/lib. This should make the classes available to all contexts.
-
Problems using the workbench to migrate mysql to Oracle
Hi.
I have ran into couple of problems using Oracle workbench
migration tool.
I was wondering if anyone out there has any insight.
1. If a date field in a mysql table has a default (let's say
9999-12-31) the script for oracle table will also have
9999-12-31 as a default field. This doesn't seem to work in
Oracle because Oracle expects to see something like to_date
('9999-12-31','yyyy-mm-dd'). I couldn't find a way to modify
that in the Workbench.
2. If a numeric field is defined in the mysql database as
smallint, the workbench creates a corresponding Oracle field
as num(250), while oracle would expect the presicion no more
than 38. Again, I couldn't find a way to fix it in the
workbench.
3. If I'm attempting to modify a oracle field's parameters in
the workbench,it won't let me to move to another table
without asking "do you want to save the changes" and won't
move on unless I click on "No".
I would appreciate any comments on these issues
tiaCheck your trash can on the desktop. The old version is automatically moved to the trashcan. You should be able to move it from the trashcan back to the Apps folder within the iTunes folder. The update that was pushed out was for iBooks to work with iOS 7 not iPhone 5. iOS 7 was released today.
-
Using mySQL Password encryption function
hi there,
I am using mySQL's password encryption function to store passwords
safely in a tabe. The problem is when I retreive the username and password, because the password in encrypted, it won't match the password entered in a JSP page. Is there any way I can decrypt it to its original form so I can do a equal match comparision.
thanks
maniFor Eg. you can compare the following way...
Here,
userdb - table name
pwd - Column in table (password encrypted field)
'userpassword' - user entered value....
theSql = "SELECT PASSWORD('userpassword'), pwd FROM userdb
rs = statement.executeQuery(theSql);
if (rs.next())
String strPswdEnter=rs.getString(1);
String strPswdData=rs.getString(2);
if (strPswdEnter.equalsIgnoreCase(strPswdData))
bPasswordCorrect=true;
Regards,
Chandramohan V -
"catastrophic failure" in Teststand database viewer using mySQL
Hello all,
I am using Teststand 3.1 and mySQL version 5.0.3 I have everything set up and teststand seems to be logging results to the database. The reason I say this is because I can see the data using a mySQL query browser. The problem is when I try to use the Teststand database viewer I get a "Catastrophic Failure". I right click on a field from the database and say view data and I get the failure. Any ideas on what this problem is and/or how to fix it?
Thanks in advance.
EHatEHat -
I just debugged this problem last week using MYSQL source for their ODBC driver. This appears to be a bug in their ODBC driver.
Basically the MS DataGrid control is trying to access catalog info from a handle that has not yet been connected to the database. Internally in MYSQL a function table is null and a dereference occurs which causes an access violation. Even though the MS control should be better behaved, the MYSQL driver should be returning an error if the table is null, not crashing.
For the next version of TestStand we will workaround this problem. I have an updated DatabaseViewer that you can try attached to this posting.
Scott Richardson
National Instruments
Attachments:
DatabaseViewer.zip 138 KB -
Can't use MySQL connectionpool?
I write two javabean in the package "lyo.bbs.xml...".I works well if I don't use MySQL ConnectionPool.But the jsp compiler report error if I use MySQL ConnectionPool in javabean.
One of my javabean is:"
ResultSet rs = null;
Statement stm = null;
Connection conn = null;
String sql = "select * from problem";
//String url = "jdbc:mysql://localhost:3306/test";
public ReadData(){
try{
Context ctx=new InitialContext(); <------If I use it jsp report error :(
DataSource ds=(DataSource)ctx.lookup("java:comp/env/jdbc/mysql");
conn=ds.getConnection();
stm=conn.createStatement();
rs=stm.executeQuery(sql);
}catch(Exception e){
System.out.println(e.toString());
public List readD(){
List booklist=new ArrayList();
Readxml readbean=null;
try{
while(rs.next()){
readbean=new Readxml();
readbean.setId(rs.getInt("id"));
readbean.setName(rs.getString("name"));
readbean.setTitle(rs.getString("title"));
readbean.setContent(rs.getString("content"));
readbean.setTime(rs.getString("time"));
booklist.add(readbean);
////////////////////////////second javabean//////////////
public void setId(int id){
this.id=id;
public int getId(){
return this.id;
.............. .........getter and setter method............. ...........
public Element getXml(Document doc){
Element root=doc.createElement("guestbook");
NumberFormat idformat=NumberFormat.getCurrencyInstance(Locale.US);
Element temp=doc.createElement("id");
temp.appendChild(doc.createTextNode(idformat.format(this.getId())));
root.appendChild(temp);
temp=doc.createElement("name");
temp.appendChild(doc.createTextNode(this.getName()));
root.appendChild(temp);
temp=doc.createElement("Title");
temp.appendChild(doc.createTextNode(this.getTitle()));
root.appendChild(temp);
temp=doc.createElement("content");
temp.appendChild(doc.createTextNode(this.getContent()));
root.appendChild(temp);
temp=doc.createElement("time");
temp.appendChild(doc.createTextNode(this.getTime()));
root.appendChild(temp);
return root;
//////////////////////////////End code////////////////////
My jsp file is:
<%@page contentType="text/html;charset=gb2312" import="lyo.bbs.xml.*,java.util.*"%>
<html>
<body>
<%
Readxml readbean;
ReadData data=new ReadData();
List list=data.readD();
Iterator iter=list.iterator();
%>
<table border="1" bgcolor="#cceeee">
<tr>
<td>Topic</td><td>Name</td><td>Post time</td>
</tr>
<%
while(iter.hasNext()){
readbean=(Readxml)iter.next();
%>
<tr>
<td><a href="showtitle.jsp?id=<%=readbean.getId()%>"><%=readbean.getTitle()%></a></td>
<td><%=readbean.getName()%></td>
<td><%=readbean.getTime()%></td>
//////////////////error is://////////////////
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 6 in the jsp file: /showtopic.jsp
Generated servlet error:
[javac] Compiling 1 source file
C:\tomcat\work\Standalone\localhost\bbs\showtopic_jsp.java:7: package lyo.bbs.xml does not exist
import lyo.bbs.xml.*;
^
C:\tomcat\work\Standalone\localhost\bbs\showtopic_jsp.java:51: cannot resolve symbol
symbol : class Readxml
location: class org.apache.jsp.showtopic_jsp
Readxml readbean;
^
An error occurred at line: 6 in the jsp file: /showtopic.jsp
Generated servlet error:
C:\tomcat\work\Standalone\localhost\bbs\showtopic_jsp.java:52: cannot resolve symbol
symbol : class ReadData
location: class org.apache.jsp.showtopic_jsp
ReadData data=new ReadData();
^
An error occurred at line: 6 in the jsp file: /showtopic.jsp
Generated servlet error:
C:\tomcat\work\Standalone\localhost\bbs\showtopic_jsp.java:52: cannot resolve symbol
symbol : class ReadData
location: class org.apache.jsp.showtopic_jsp
ReadData data=new ReadData();
^
An error occurred at line: 16 in the jsp file: /showtopic.jsp
Generated servlet error:
C:\tomcat\work\Standalone\localhost\bbs\showtopic_jsp.java:68: cannot resolve symbol
symbol : class Readxml
location: class org.apache.jsp.showtopic_jsp
readbean=(Readxml)iter.next();
^
//////////////////////////////End error////////////////////////
But I have the package lyo.bbs.xml.. really.If I don't use MySQL Pool (java:comp/env/jdbc/mysql)it can work property.
I add the content in the server.xml and I registe in mysql console.
/////////////////////////////server.xml///////////////////////////////////
<Context className="org.apache.catalina.core.StandardContext" cachingAllowed="true" charsetMapperClass="org.apache.catalina.util.CharsetMapper" cookies="true" crossContext="false" debug="0" displayName="Welcome to Tomcat" docBase="C:\tomcat\webapps\ROOT\bbs" mapperClass="org.apache.catalina.core.StandardContextMapper" path="/bbs" privileged="false" reloadable="false" swallowOutput="false" useNaming="true" wrapperClass="org.apache.catalina.core.StandardWrapper">
<Resource auth="Container" description="mysql BBS XML Testing " name="jdbc/mysql" scope="Shareable" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/mysql">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/test</value>
</parameter>
<parameter>
<name>password</name>
<value>qijiashe</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>4</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>5000</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>org.gjt.mm.mysql.Driver</value>
</parameter>
<parameter>
<name>username</name>
<value>lyo</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>2</value>
</parameter>
</ResourceParams>
<ResourceLink global="jdbc/mysql" name="jdbc/mysql" type="javax.sql.DataSource"/>
</Context>
Anyone can help me?I use Weblogic6.1's ConnectionPool and it works well.It MySQL' problem?Why?
-
Huge problem using apple mail while sending email to a group...
Hey - I am quite confused... apple mail has huge problems using groups with about 150 addresses when writing and sending an email... the writing of emails is nearly impossible. Once the group name is inserted in the addressline (address book in iCloud!), apple mail uses nearly 100% CPU and further writing is nearly impossible. When sending such an email, all addresses are suddenly visible - though the box is NOT checked and the addresses should be hidden... what can I do? I use this feature (sending mails to groups) on a daily basis and cannot accept visible addresses...
Greetings and sorry for inconvenient english...
ChristofHow about next time you send to the group, cc yourself, or include yourself in the group. Then receive the email on the iphone, you can "reply all" in order to send to the group. If you use an imap account, you can make a new folder, call it something like "groups", and save different group emails there for the next time you need to "reply all".
-
How Can I use Mysql's PROCEDURE by Java Can you give me sample???
�������^���������������H�iBEGIN�`END�u���b�N�j�@��TOP
ORACLE�@MSSQL�@SSA�@MySQL�@
���{�I���������������������������B
MySQL�������A ORACLE��MSSSQL��������������BEGIN�`END�u���b�N�����s�������������������������B
���������s�������������K���X�g�A�h�v���O�����������R���p�C�������K�v�����������B
�i�����F�������������������A���w�E�������������K�r�����������j
--drop PROCEDURE sp_hoge;
--�f���~�^�����X��������
delimiter //
CREATE PROCEDURE sp_hoge()
DETERMINISTIC
BEGIN
/* �������� */
DECLARE mystr VARCHAR(20);
DECLARE mycnt INTEGER(2);
/* �l������ */
SET mycnt = 0;
SET mystr = '����';
/* IF�� */
IF mycnt = 0 THEN
SET mystr = '�����Q';
select mystr;
ELSE
select '�����R';
END IF;
/* CASE�� */
CASE extract(month from now())
WHEN 1 THEN SET mystr = '1��';
WHEN 2 THEN SET mystr = '2��';
WHEN 3 THEN SET mystr = '3��';
WHEN 4 THEN SET mystr = '4��';
ELSE SET mystr = '1�`4�����O';
END CASE;
select mystr;
/* WHILE-LOOP */
WHILE mycnt <= 5 DO
SET mycnt = mycnt + 1;
select mycnt;
END WHILE;
/* BEGIN-END�u���b�N������SELECT�������s */
/* PROCEDURE�������\�iFUNCTION���������������j */
select * from help_topic;
END//
delimiter ;
--�X�g�A�h�v���V�[�W�����s
call sp_hoge();
�X�g�A�h�v���V�[�W�����T���v���i�J�[�\�����g�p������LOOP�����j�@��TOP
ORACLE�@MSSQL�@SSA�@MySQL�@
�J�[�\�����g�p����LOOP�������T���v�������B
�����p�����[�^���w�����������������Y�������������������A���E���w�X�^�b�t�x�������������A�����������w�c���X�^�b�t�F�x���\���������B
--drop PROCEDURE sp_hoge;
--�f���~�^�����X��������
delimiter //
CREATE PROCEDURE sp_hoge(inum INTEGER(3))
DETERMINISTIC
BEGIN
/* �������� */
/* �J�[�\���g�p�����f�[�^�L�����f���g�p */
DECLARE done INT DEFAULT 0;
/* �������O������ */
DECLARE v_mystr VARCHAR(20);
/* �J�[�\���g�p�� */
DECLARE v_empnm VARCHAR(40);
DECLARE v_job VARCHAR(20);
/* �J�[�\������ �� �����������������`���� */
DECLARE cur1 CURSOR FOR
select empnm,job from kemp where deptno = inum;
/* �f�[�^��������LOOP�E�o�p���������� */
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;
/* �J�[�\���I�[�v�� */
OPEN cur1;
/* LOOP */
LOOPPROC:REPEAT
FETCH cur1 INTO v_empnm,v_job;
IF NOT done THEN
IF v_job = '�X�^�b�t' THEN
SET v_mystr = '�c���X�^�b�t�F';
ELSE
SET v_mystr = '';
END IF;
select CONCAT(v_mystr,v_empnm);
/* ������������LOOP���E�o����������LEAVE�� */
/* LEAVE LOOPPROC; */
END IF;
UNTIL done END REPEAT;
/* �J�[�\���N���[�Y */
CLOSE cur1;
END//
--�f���~�^���Z�~�R�����i�f�t�H���g�j������������
delimiter ;
--�X�g�A�h�v���V�[�W�����s
call sp_hoge(1);
12.2. Control Flow Functions
CASE value WHEN [compare_value] THEN result [WHEN [compare_value] THEN result ...] [ELSE result] END
CASE WHEN [condition] THEN result [WHEN [condition] THEN result ...] [ELSE result] END
The first version returns the result where value=compare_value. The second version returns the result for the first condition that is true. If there was no matching result value, the result after ELSE is returned, or NULL if there is no ELSE part.
mysql> SELECT CASE 1 WHEN 1 THEN 'one'
-> WHEN 2 THEN 'two' ELSE 'more' END;
-> 'one'
mysql> SELECT CASE WHEN 1>0 THEN 'true' ELSE 'false' END;
-> 'true'
mysql> SELECT CASE BINARY 'B'
-> WHEN 'a' THEN 1 WHEN 'b' THEN 2 END;
-> NULL
The default return type of a CASE expression is the compatible aggregated type of all return values, but also depends on the context in which it is used. If used in a string context, the result is returned as a string. If used in a numeric context, then the result is returned as a decimal, real, or integer value.
Note: The syntax of the CASE expression shown here differs slightly from that of the SQL CASE statement described in Section 17.2.10.2, �gCASE Statement�h, for use inside stored routines. The CASE statement cannot have an ELSE NULL clause, and it is terminated with END CASE instead of END.
IF(expr1,expr2,expr3)
If expr1 is TRUE (expr1 <> 0 and expr1 <> NULL) then IF() returns expr2; otherwise it returns expr3. IF() returns a numeric or string value, depending on the context in which it is used.
mysql> SELECT IF(1>2,2,3);
-> 3
mysql> SELECT IF(1<2,'yes','no');
-> 'yes'
mysql> SELECT IF(STRCMP('test','test1'),'no','yes');
-> 'no'
If only one of expr2 or expr3 is explicitly NULL, the result type of the IF() function is the type of the non-NULL expression.
expr1 is evaluated as an integer value, which means that if you are testing floating-point or string values, you should do so using a comparison operation.
mysql> SELECT IF(0.1,1,0);
-> 0
mysql> SELECT IF(0.1<>0,1,0);
-> 1
In the first case shown, IF(0.1) returns 0 because 0.1 is converted to an integer value, resulting in a test of IF(0). This may not be what you expect. In the second case, the comparison tests the original floating-point value to see whether it is non-zero. The result of the comparison is used as an integer.
The default return type of IF() (which may matter when it is stored into a temporary table) is calculated as follows:
Expression Return Value
expr2 or expr3 returns a string string
expr2 or expr3 returns a floating-point value floating-point
expr2 or expr3 returns an integer integer
If expr2 and expr3 are both strings, the result is case sensitive if either string is case sensitive.
Note: There is also an IF statement, which differs from the IF() function described here. See Section 17.2.10.1, �gIF Statement�h.
IFNULL(expr1,expr2)
If expr1 is not NULL, IFNULL() returns expr1; otherwise it returns expr2. IFNULL() returns a numeric or string value, depending on the context in which it is used.
mysql> SELECT IFNULL(1,0);
-> 1
mysql> SELECT IFNULL(NULL,10);
-> 10
mysql> SELECT IFNULL(1/0,10);
-> 10
mysql> SELECT IFNULL(1/0,'yes');
-> 'yes'
The default result value of IFNULL(expr1,expr2) is the more �ggeneral�h of the two expressions, in the order STRING, REAL, or INTEGER. Consider the case of a table based on expressions or where MySQL must internally store a value returned by IFNULL() in a temporary table:
mysql> CREATE TABLE tmp SELECT IFNULL(1,'test') AS test;
mysql> DESCRIBE tmp;
-------------------------------------------+
| Field | Type | Null | Key | Default | Extra |
-------------------------------------------+
| test | char(4) | | | | |
-------------------------------------------+
In this example, the type of the test column is CHAR(4).
NULLIF(expr1,expr2)
Returns NULL if expr1 = expr2 is true, otherwise returns expr1. This is the same as CASE WHEN expr1 = expr2 THEN NULL ELSE expr1 END.
mysql> SELECT NULLIF(1,1);
-> NULL
mysql> SELECT NULLIF(1,2);
-> 1
Note that MySQL evaluates expr1 twice if the arguments are not equal.
Previous / Next / Up / Table of Contents
User Comments
Posted by I W on July 12 2005 5:52pm [Delete] [Edit]
Don't use IFNULL for comparisons (especially not for Joins)
(example:
select aa from a left join b ON IFNULL(a.col,1)=IFNULL(b.col,1)
It's terrible slow (ran for days on two tables with approx 250k rows).
Use <=> (NULL-safe comparison) instead. It did the same job in less than 15 minutes!!
Posted by [name withheld] on November 10 2005 12:12am [Delete] [Edit]
IFNULL is like oracle's NVL function (these should help people searching for NVL() ..)
Posted by Philip Mak on May 26 2006 7:14am [Delete] [Edit]
When using CASE, remember that NULL != NULL, so if you write "WHEN NULL", it will never match. (I guess you have to use IFNULL() instead...)
Posted by Marc Grue on June 24 2006 2:03pm [Delete] [Edit]
You can ORDER BY a dynamic column_name parameter using a CASE expression in the ORDER BY clause of the SELECT statement:
CREATE PROCEDURE `orderby`(IN _orderby VARCHAR(50))
BEGIN
SELECT id, first_name, last_name, birthday
FROM table
ORDER BY
-- numeric columns
CASE _orderby WHEN 'id' THEN id END ASC,
CASE orderby WHEN 'desc id' THEN id END DESC,
-- string columns
CASE orderby WHEN 'firstname' THEN first_name WHEN 'last_name' THEN last_name END ASC,
CASE orderby WHEN 'descfirst_name' THEN first_name WHEN 'desc_last_name' THEN last_name END DESC,
-- datetime columns
CASE _orderby WHEN 'birthday' THEN birthday END ASC,
CASE orderby WHEN 'desc birthday' THEN birthday END DESC;
END
Since the CASE expression returns the "compatible aggregated type of all return values", you need to isolate each column type in a separate CASE expression to get the desired result.
If you mixed the columns like
CASE _orderby
WHEN 'id' THEN id
WHEN 'first_name' THEN first_name
...etc...
END ASC
.. both the id and first_name would be returned as a string value, and ids would be sorted as a string to '1,12,2,24,5' and not as integers to '1,2,5,12,24'.
Note that you don't need a "ELSE null" in the CASE expressions, since the CASE expression automatically returns null if there's no match. In that case, you get a "null ASC" in your ORDER BY clause which doesn't affect the sort order. If for instance orderby is 'descfirst_name', the ORDER BY clause evaluates to:
ORDER BY null ASC, null DESC, null ASC, first_name DESC, null ASC, null DESC
Effectively the same as "ORDER BY first_name DESC". You could even add a new set of CASE expressions for a second order column (or more..) if you like.
Add your own comment.What is that post supposed to be?
-
Hello,
I have standalone OC4J and I want to use mySQL database (Oracle is no problem). My data-sources.xml for application (not global data-sources) is:
<data-sources>
<data-source class="com.evermind.sql.DriverManagerDataSource"
connection-driver="org.gjt.mm.mysql.Driver"
ejb-location="jdbc/MG_DBDS"
inactivity-timeout="30"
location="jdbc/MG_DBCoreDS"
name="MG_DBDS"
password=""
pooled-location="jdbc/MG_DBPooledDS"
url="jdbc:mysql://127.0.0.1:3306/test"
username="root"
xa-location="jdbc/xa/MG_DBXADS"/>
</data-sources>
Deploy return me:
Error initializing data-source 'jdbc/MG_DBCoreDS': DriverManagerDataSource driver 'org.gjt.mm.mysql.Driver' not found
Then I run this command:
java -jar %OC4J_HOME%\admin.jar ormi://192.168.1.14:23791/ admin heslo -application Register -updateDataSource -oldLocation jdbc/MG_DBCoreDS -jar mysql-2.0.11-bin.jar
this action is success and create in OC4J folder lib with jar file mysql-2.0.11-bin.
When I use this configuration in application, I get connection but creating Statement cause SQL Exception - No suitable driver.
When I try to restart OC4J, I get the same message as throught deploy - Error initializing data-source ...
What is go wrong???? Could me help anyone?
Thanks
Liborpooling solution:
1) put driver mysql.jar into any directory wich described in OC4J application.xml file like
" <library path="D:\j2ee\home\lib">jdev-generated</library>"
2) put a new datasource in data-sources.xml:
<data-sources>
<data-source name="MySqlDS"
location="jdbc/MySqlDS"
class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource"
max-connections="100"
min-connections="5"
inactivity-timeout="200"
wait-timeout="10"
username="scott"
password="tiger"
url="jdbc:mysql://localhost:3306/oln?useUnicode=true"/>
</data-sources>
OC4J needs a special pooling class in comparision with other containers. For example, JBoss has own implementation of pooling broker, so pooling is enabled by default. -
Could not complete the command because of a problem using the Adobe Color Engine
Hi all
This bizarrely started this morning - completely out of the blue - and I've no idea why.
Setup: Mac 10.8.2 / Creative Suite Premium PhotoShop CS5 extended (patched to 12.04)
Am working on images exported from LightRoom 4 (16bit A3 Pro Photo RGB PSDs) in PhotoShop CS5.
As part of my image grading process I have a PhotoShop Action that does the following: copy layer to new document (document respects all of copied layer settings) > Image > Adjustments > HDR toning > apply a certain HDR preset > copy to resultant image back to original doc > set opacity as 40%.
Totally out of the blue, after having this action for about 2 months, this morning I start getting a warning dialog of "Could not complete the command because of a problem using the Adobe Color Engine" and the action fails. The failure seems to take place at the 'make document' part of the action and seems to somehow be related to the contents of the clipboard.
I've tried trashing and re-creating the action. It works first time out fine and then - on the next image - errors again.
At present I can only safely carry out the work 'manually' by completing all the actions myself.
I can think of no settings that have changed and the OS hasn't been updated in a while.
I have found one other thread on a similar problem in PhotoShop Elements, but no definitive solution.
Any help appreciated as I have a shedload of stuff to process.
Best wishes
TPOK: trash of prefs didn't work. Tried thrice. Re-created orig action. same problem.
BUT!
Your 'Image > Duplicate' suggestion does seem to work. If I use that in a new action as the method for creating the HDR version doc (instead of 'Select > Copy > New > Paste), it seems to work.
Will try that out this afternoon, but for now: WIN!
Many thanks for the suggestion!
TP -
Problem using Option Buttons in a form
Hello,<o:p></o:p>
I created a form in Word using a table for defining the layout. Inside of some cells I inserted some Rich Text Content Control and in some others Option Buttons (ActiveX Control). Everything
was working correctly.<o:p></o:p>
The problem appears when I restrict the formatting and editing. I select the option "Allow only this type of editing in the document" and then choose "Filling in forms",
finally click on "Yes Start Enforcing Protection". <o:p></o:p>
Now if I want to fill in the form, at the beginning I'm able to click on the Cells with the Rich Text Content Control and type in some text, but as soon as I click on any of the Option Buttons
all the Rich Text Content Controls get blocked, and I am not able to modify the text anymore. <o:p></o:p>
The only way to make it work again is to jump to the next cells using the Tab key instead of using the mouse. If I go to the "Restrict Editing" and "Stop Protection", then
everything works correctly.
If I delete the Option Buttons the problem is solved as well, it doesn't matter if the from is protected or not.<o:p></o:p>
How can I solve this issue? I'm using Windows 7 and Office 2013.<o:p></o:p>
Thanks in advance.<o:p></o:p>W1zard is correct. Switch to Exec_SQL. Oracle does not support Forms using DBMS_SQL.
Now... please explain why you are not using a dynamic record group. It is SOOO much easier!
And if you want to look at some code using both methods, Exec_SQL and dynamic record group, you can download my "Quick Access" dynamic utility form, here: Oracle Forms Utilities -
Problem with mysql dirver loading
hello friends ,
iam using Mysql of 4.1 version and the MysqlConnector 3.0..4
when i execute a program with the command
java -classpath .;/root/8/20/mysql-connector-java-3.0.14-production/mysql-connector-java-3.0.14-production-bin.jar
it gives the error as
bash: /root/8/20/mysql-connector-java-3.0.14-production/mysql-connector-java-3.0.14-production-bin.jar: Permission denied
so what permisssons should i have iam loged in as root iam using redhat linux 9.0
so how to execute that one
with regards
rama kanth$ chmod 755 /root/8/20/mysql-connector-java-3.0.14-production/mysql-connector-java-3.0.14-production-bin.jar
This is not a java problem though...
Maybe you are looking for
-
Finding serial number and stolen
My IPAD was stolen, when i try to the register my IPAD serial numebr on apple site, i see this message:"" According to our records, this serial number is registered to another Apple ID""!!! Could you help me how do i know who has register the serial
-
Enhanced Podcast Artwork missing in Quicktime
I created a number of enhanced podcasts using Garageband 09. All of them display the podcast track (artwork) just fine in iTunes. Only some of them display correctly in QuickTime. I was using QT to export them as 3gp files, but some of them show audi
-
Can the 3G shuffle be charged with an iPod charger?
I have a friend who would like to use his iPod 3G shuffle when he does not have access to his MacBookPro. Can an iPod shuffle be charged with an iPod charger with the USB socket?
-
Maximum number of rows exceeded
Hi, I am using Smart View (Hyperion 11.1.2.1) where large data needs to be retrieved. But during retrieval, I am getting error "Essbase Error (1020011) : Maximum number of rows [5000] exceeded". I modified the essbase.properties file as below. # Prop
-
DS_CREATE coredumps in 5.2
Hi, I am trying to configure silent install on 5.2. I was able to create script for installing configuration instance (o=netscape). I cannot figure out what to do for users and groups instance (o=acme.com). setup does not work. ds_create coredumps (i