Unable to connect to MySQL database
Hello,
I have written a DatabaseManager class that controls access to a locally stored database, implemented in mysql. In theory, client request should be passed to the DatabaseManager through RMI, but I cannot even create a connection to the database yet!
Here's my connect statement:
con = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/media", "mysql", "mysql");When this statement is executed, the following exception is produced:
java.sql.SQLException: Unable to connect to any hosts due to exception: java.security.AccessControlException: access denied (java.util.PropertyPermission file.encoding read)Can somebody explain to me how I successfully create a connection to the database? I would be extremely grateful. Also, could somebody explain how I could connect to the database from a remote machine using the following connect statement:
con = DriverManager.getConnection("jdbc:mysql://server:3306/media", "mysql", "mysql");I have a feeling I need to grant a certain PropertyPermission in my policy file, but I'm unsure of what values I should be using.
Thank you in advance.
Pete
Thank you for the prompt reply.
In answer to you question: No, it is not an applet. The DatabaseManager is a class that implements a Remote interface, I have it running on the same machine as the mysql database (the server). I then have a small GUI that runs on a client machine which is used to make RMI calls to the DatabaseManager across the network in order to query the database.
When the DatabaseManager object is spawned on the server, it tries to connect to the database to be ready for client queries. This is when it produces the exception mentioned in the original post.
What confuses me is that in my original implementation, the DatabaseManager object was run on the client and the mysql JDBC had no difficulty in connecting to the database across the network. Could the security manager have something to do with it? I am using the RMISecurityManager in conjunction with the java.policy file from the Java RMI tutorial on the Sun website.
Pete
Similar Messages
-
Unable to connect to MySQL Database using MX
I am unable to connect to MySQL database hosted on a remote
server. I get the following error message:
"HTTP Error Code 404 File Not Found. Here are some possible
reason for the problem:
1) There is no testing server running on the server machine.
2) The testing server specified for this site does not map to
the
http://72.9.255.2/~keyitems/_mmServerScripts/MMHTTPDB.php
URL. Verify that the URL Prefix maps to the root of the site."
I have specified a testing server. My url is "
http://72.9.255.2/~keyitems/........."
For the URL prefix to the site's root folder, I listed the
following:
1.
http://72.9.255.2/~keyitems/
this did not work. I got the above error message.
2.
http://72.9.255.2/ this did not work
also. I got the above error message.
Any input would be great as I do not know where to start !!!
Thank youHi Ravi
Glad to hear you solved this. It is very gratifying when one solves it alone, don't you think?
Best wishes
Michael -
Unable to connect to MySQL database in Dreamweaver CS3
I have been working on this problem for hours and am getting
very frustrated. I hope someone can help me out.
My FTP server and MYSQL server have to use two different
hosts.
I will be using false information in this post but hopefully
someone can help me out.
FTP info
domainname.com
username
password
MySQL info
123.servername.com
dblogin
dbpass
port: 3306
Now im sure the problem lies with the Testing Server.
Server Model: PHP MYSQL
Access: FTP
FTP Host:domainname.com
host directory: web/htdoc (this is the folder which holds ALL
of the files which can be reached by domainname.com)
login: username
password: password
url prefix:
http://www.domainname.com
when i try to use this information and then add a database
using the (+) I get access denied errors.
I have tried using 'localhost' as the server and
'123.servername.com'
I should mention that I am able to connect to the database
remotely using the same information using software such as SQL
Maestro, so I know that it isnt the database.
can someone who has successfully done this kind of connection
please tell me what is supposed to go where, the help documents are
horrible at best.This may, or may not, help...
For those using MySQL - Installing PHP and MySQL on Windows
XP
http://www.webassist.com/professional/products/solutionrecipes.asp -
Connecting a MYSQL database in Dreamweaver
Hi All,
I'm tryting to connect a mysql database based locally and am getting the error:
HTTP Error Code 404 File Not Found. Here are some possible reasons for the problem:
1) There is no testing server running on the server machine.
2) The testing server specified for this site does not map to the http://localhost/_mmServerScripts/MMHTTPDB.php. Verify that
the URL Prefix maps to the root of the site.
What does this mean?
How do I start the testing server? I'm unable to locate the folder where the database files are stored as the database has been created locally on my machine. Everything hace been created locally so I know that point 2) could well be irrelavant.
Please can somebody help?
Many Thanks
GordonThe functions for connecting to a database were mostly deprecated. But if you enable them in CS6 Cloud/CC then they will be the same.
-
Connecting to mysql database using DBLOGIN
I am trying to connect to a mysql database through GG command interface and am unable to get the DBLOGIN to work correctly. Here is what I am getting:-
mysql world -u root -p<password> (as user OS user mysql- works!)
GGSCI (rac1) 5> DBLOGIN SOURCEDB world, USERID root, PASSWORD <password>
2010-11-08 16:29:17 WARNING OGG-00769 MySQL Login failed: . SQL error (2002). Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).
ERROR: Failed to connect to MySQL database engine for HOST localhost, DATABASE world, USER root, PORT 0.
I am not too familiar with mysql and will appreciate help and also pointer to documents that walk through setting up and testing Golden Gate with mysql.
Thanks,
Satishhi.
i have same problem can't connect to mysql using dblogin on ggsci, please helpme
this my.cnf configuration
# Example MySQL config file for small systems.
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /var/lib/mysql) or
# ~/.my.cnf to set user-specific options.
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock
#socket = /var/run/mysqld/mysqld.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
#socket = /var/run/mysqld/mysqld.sock
skip-locking
key_buffer_size = 16K
max_allowed_packet = 1M
table_open_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 128K
# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (using the "enable-named-pipe" option) will render mysqld useless!
#skip-networking
server-id = 1
# Uncomment the following if you want to log updates
#log-bin=mysql-bin
# binary logging format - mixed recommended
#binlog_format=mixed
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/lib/mysql/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /var/lib/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[myisamchk]
key_buffer_size = 8M
sort_buffer_size = 8M
[mysqlhotcopy]
interactive-timeout -
Connecting to MySQL Database with Servlet
Hi All,
I want to connect to MySQL Database from servlet.
I am using Tomcat websever 3.3.1, where i have to set classpath of mysql jdbc driver.
I tried by copying mysql jdbc driver in so many directiories of Tomcat server but it is
giving me error like "no specified driver find"
So please send me all the solutions and how to set the classpath to connect to
mysql database.
ThanksU r correct that so many people are giving me solutions but that are not working for me
I think i not correct in setting the classapath to mysql jdbc driver.
1)I have unjarred correctly and all the classes are present in that.
yes driver class is there in that .
2)Now i am using new version of the mysqljdbc that is 2.0.13
If now any driver after this send me url i will download it and use it
3)I am unable to under stand what is yourcontext in
yourcontext/web-inf/lib?
This is my directory structure.
c:tomcat in this i have
bin
conf
doc
lib
logs
modules
native
webapps
work
in bin there are no subdirectories
in conf i have
auto,jserv,jk,users
in doc i have
appdev,images
sample( in appdev)
etc,lib,src,web(in sample)
images(in sample\web)
in lib i have
apps
common
container(c:\tomcat\lib)
in logs,modules there are no subdirectories
in native (c:\tomcat\native) i have
mod_jk
mod_jserv
in mod_jk i have
apache 1.3
common
iis
jni
netscape
nt_service
in webapps i have (c:tomcat\webapps)
Admin,Examples,root
in Admin i have (c:\tomcat\webapps\admin)
contextadmin
Meta-inf
Test
Web-inf
in web-inf (c:\tomcat\webapps\admin\web-inf)
Classes,lib,script
in classes i have (c:\tomcat\webapps\admin\web-inf\classes)
tadm
in examples (c:\tomcat\webapps\examples) i have
Images,Jsp,Meta-inf,Servlets,Web-inf
in web-inf (c:\tomcat\webapps\examples\web-inf) i have
Classes,jsp
in classed (c:\tomcat\webapps\examplesweb-inf\classes) i have
Cal
Checkbox
Colors
Dates
Error
Examples
Num
Sessions
in jsp (c:\tomcat\webapps\examples\web-inf\jsp) i have
applet
I think this is enough to give correct answer for me .
Thanks -
Cannot connect to MySQL database
Hi
I'm new to flex builder 3... and have therefore looked at
lynda.com to learn about the product and get started fast. And here
they show you how to create a connection to a MySQL database using
MAMP on a mac (or WAMP on the PC) - I'm on the mac ;-).
I have installed the MAMP server with both MySQL, Apache and
PHP running on defalt ports. And I have created a simple database
in MySQL... The site is running fine and so is the MySQL (I have
tested with simple HTML etc)... but when I try to connect to the
database using the wizard in Flex, I get the following message:
Unable to connect to the database....
If I look at the details it say (hold on):
com.mysql.jdbc.CommunicationsException: Communications link
failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: java.net.NoRouteToHostException: No route to host
STACKTRACE:
java.net.SocketException: java.net.NoRouteToHostException: No
route to host
at
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
at
com.mysql.jdbc.Connection.createNewIO(Connection.java:2555)
at
com.mysql.jdbc.Connection.<init>(Connection.java:1485)
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
at
org.eclipse.datatools.connectivity.db.generic.JDBCConnection.createConnection(JDBCConnect ion.java:87)
at
org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverCo nnectionBase.java:104)
at
org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:53 )
at
org.eclipse.datatools.connectivity.db.generic.JDBCConnectionFactory.createConnection(JDBC ConnectionFactory.java:52)
at
org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(Co nnectionFactoryProvider.java:77)
at
org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(Connection Profile.java:354)
at
com.adobe.datatools.derived.wizards.BaseConnectionProfilePage.testConnectionSimple(BaseCo nnectionProfilePage.java:70)
at
com.adobe.datatools.derived.wizards.BaseConnectionProfilePage.testConnection(BaseConnecti onProfilePage.java:51)
at
org.eclipse.datatools.connectivity.ui.wizards.ConnectionProfileDetailsPage$1.widgetSelect ed(ConnectionProfileDetailsPage.java:85)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1495)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1519)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1504)
at
org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1295)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3350)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2954)
at
org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at
com.adobe.flexbuilder.dbwizard.ui.DbWizard$8.widgetSelected(DbWizard.java:598)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1495)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1519)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1504)
at
org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1295)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3350)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2954)
at
org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at
com.adobe.flexbuilder.dbwizard.actions.DBWizardAction.run(DBWizardAction.java:69)
at
org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:256)
at
org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionI tem.java:546)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java :402)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1495)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1519)
at
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1504)
at
org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1295)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3350)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2954)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at
org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at
org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at
org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
com.adobe.flexbuilder.standalone.FlexBuilderApplication.start(FlexBuilderApplication.java :112)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau ncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav a:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
** END NESTED EXCEPTION **
.... and more ...
What the h.. does that mean - Plz advice someoone ... I'm
really stock here ;-(
Kind regards
BrianThanks for the answer, but I must be doing something very
wrong - as I still havn't found the correct solution ;-(
I have as mentioned tried both the default MySQL port (3306)
and the one used by MAMP (8889) but without any luck.
I do restart the MySQL server each time - and MAMP even does
that by default when changing the port number.
If I open myphpadmin the DB is running and as told I can
connect to it using Dreamwaever...
But If I run the command "telnet localhost 8889" you told my
to, in terminal I get the following message:
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying fe80::1...
telnet: connect to address fe80::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host
So here it looks as if I can't connect ??? The same happens
if I try the default port 3306.
Everytime I test in the wizard I get the message:
com.mysql.jdbc.CommunicationsException: Communications link
failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: java.net.NoRouteToHostException: No route to host
STACKTRACE:
java.net.SocketException: java.net.NoRouteToHostException: No
route to host
at
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:....
etc
And yes it is the Data -> Create Application from Database
wizard that I'm trying to use.
I don't undersatnd why the lynda.com video tell that it is
important to change the MAMP's settings to the default port instead
of using the MAMP ports, when you say it is not like that ? They
even show how to disable the default Apache webserver to use the
MAMP one on port 80.
Hope the terminal message can give someone a hint to the
posible problem.
Thanks in advance -
Any help is appreciated on this. I'm unable to connect to mysql. I receive the following error when attempting to connect:
<username>: -> mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)
I installed mysql-5.5.23-osx10.6-x86_64 using the user tip located at https://discussions.apple.com/docs/DOC-3082.
/var/log/system.log shows the following errors:
May 10 10:04:16 vp2c01b-dhcp94 com.mysql.mysqld[15809]: 120510 10:04:16 mysqld_safe Logging to '/usr/local/mysql/data/vp2c01b-dhcp94.apple.com.err'.
May 10 10:04:16 vp2c01b-dhcp94 com.apple.launchd[1] (0x7fbda962c6b0.anonymous.nohup[15857]): Bug: launchd_core_logic.c:9394 (25397):0
May 10 10:04:16 vp2c01b-dhcp94 com.apple.launchd[1] (0x7fbda962c6b0.anonymous.nohup[15857]): Switching sessions is not allowed in the system Mach bootstrap.
May 10 10:04:16 vp2c01b-dhcp94 com.apple.launchd[1] (0x7fbda962c6b0.anonymous.nohup[15857]): _vprocmgr_switch_to_session(): kr = 0x44c
May 10 10:04:16 vp2c01b-dhcp94 com.apple.launchd[1] (0x7fbdaa90f8b0.anonymous.nohup[15858]): Bug: launchd_core_logic.c:9394 (25397):0
May 10 10:04:16 vp2c01b-dhcp94 com.apple.launchd[1] (0x7fbdaa90f8b0.anonymous.nohup[15858]): Switching sessions is not allowed in the system Mach bootstrap.
May 10 10:04:16 vp2c01b-dhcp94 com.apple.launchd[1] (0x7fbdaa90f8b0.anonymous.nohup[15858]): _vprocmgr_switch_to_session(): kr = 0x44c
May 10 10:04:16 vp2c01b-dhcp94 com.mysql.mysqld[15809]: 120510 10:04:16 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
May 10 10:04:17 vp2c01b-dhcp94 com.mysql.mysqld[15809]: 120510 10:04:17 mysqld_safe mysqld from pid file /usr/local/mysql/data/vp2c01b-dhcp94.apple.com.pid ended
May 10 10:04:17 vp2c01b-dhcp94 com.apple.launchd[1] (com.mysql.mysqld): Throttling respawn: Will start in 9 seconds
May 10 10:04:19 vp2c01b-dhcp94 com.mysql.mysql[15900]: 120510 10:04:19 mysqld_safe Logging to '/usr/local/mysql/data/vp2c01b-dhcp94.apple.com.err'.
May 10 10:04:19 vp2c01b-dhcp94 com.apple.launchd[1] (0x7fbda962fa80.anonymous.nohup[15948]): Bug: launchd_core_logic.c:9394 (25397):0
May 10 10:04:19 vp2c01b-dhcp94 com.apple.launchd[1] (0x7fbda962fa80.anonymous.nohup[15948]): Switching sessions is not allowed in the system Mach bootstrap.
May 10 10:04:19 vp2c01b-dhcp94 com.apple.launchd[1] (0x7fbda962fa80.anonymous.nohup[15948]): _vprocmgr_switch_to_session(): kr = 0x44c
May 10 10:04:19 vp2c01b-dhcp94 com.apple.launchd[1] (0x7fbdaa90b960.anonymous.nohup[15949]): Bug: launchd_core_logic.c:9394 (25397):0
May 10 10:04:19 vp2c01b-dhcp94 com.apple.launchd[1] (0x7fbdaa90b960.anonymous.nohup[15949]): Switching sessions is not allowed in the system Mach bootstrap.
May 10 10:04:19 vp2c01b-dhcp94 com.apple.launchd[1] (0x7fbdaa90b960.anonymous.nohup[15949]): _vprocmgr_switch_to_session(): kr = 0x44c
May 10 10:04:19 vp2c01b-dhcp94 com.mysql.mysql[15900]: 120510 10:04:19 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
May 10 10:04:21 vp2c01b-dhcp94 com.mysql.mysql[15900]: 120510 10:04:21 mysqld_safe mysqld from pid file /usr/local/mysql/data/vp2c01b-dhcp94.apple.com.pid ended
May 10 10:04:21 vp2c01b-dhcp94 com.apple.launchd[1] (com.mysql.mysql): Throttling respawn: Will start in 9 secondsLooks like modifying the permissions of /var/mysql/ fixed the problem, but now I'm seeing this in /var/log/system.log:
May 10 16:29:25 Smash com.apple.launchd[1] (0x7fbda9410d70.anonymous.nohup[52808]): _vprocmgr_switch_to_session(): kr = 0x44c
May 10 16:29:25 Smash com.mysql.mysql[52759]: 120510 16:29:25 mysqld_safe A mysqld process already exists
May 10 16:29:25 Smash com.apple.launchd[1] (com.mysql.mysql[52759]): Exited with code: 1
May 10 16:29:25 Smash com.apple.launchd[1] (com.mysql.mysql): Throttling respawn: Will start in 10 seconds
May 10 16:29:35 Smash com.mysql.mysql[52815]: 120510 16:29:35 mysqld_safe Logging to '/usr/local/mysql/data/Smash.local.err'.
May 10 16:29:35 Smash com.apple.launchd[1] (0x7fbda962c6b0.anonymous.nohup[52863]): Bug: launchd_core_logic.c:9394 (25397):0
May 10 16:29:35 Smash com.apple.launchd[1] (0x7fbda962c6b0.anonymous.nohup[52863]): Switching sessions is not allowed in the system Mach bootstrap.
Is that expected behavior when using launchctrl? -
Error: OGG-00146 - error 600 - Failed to connect to mysql database
Dear All,
I am replicating Data from MySQL to Oracle.
Version of my MySQL is Server version: 5.5.19 MySQL Enterprise Server - Advanced Edition
Version of Oracle is : Oracle 11gR2
My extract is giving the following error and I am unable to identify the problem:
*2012-12-25 14:18:48 ERROR OGG-00146 Oracle GoldenGate Capture for MySQL, netfors.prm: VAM function VAMInitialize returned unexpected result:*
error 600 - VAM Client Report <CAUSE OF FAILURE : Failed to connect to mysql database WHEN FAILED : While initializing mysql context WHERE FAILED :
MySQLBinLog Reader Module CONTEXT OF FAILURE : No Information Available!>
Following are the contents of my /etc/odbc.ini file
*[netfors]*
Driver = /usr/lib/libmyodbc3.so
Description = Connector/ODBC 3.51 Driver DSN
Server = 10.168.20.226
Port = 6629
User = replication
Password = ******
Database = netfors
Option = 3
Socket = /tmp/mysql_sandbox5519.sock
When i isql -v netfors replication ***** *
it say Connected!
This is my extract:
EXTRACT NETFORS
DBOPTIONS HOST 10.168.20.226, CONNECTIONPORT 6629
SOURCEDB [email protected]:6629, USERID replication, PASSWORD ******
RMTHOST 10.168.20.31, MGRPORT 7809
RMTTRAIL /u01/app/oracle/oradata/GG/dirdat/n1
TRANLOGOPTIONS ALTLOGDEST /root/sandboxes/msb_5_5_19/data/mysql-bin.index
TABLE netfors.syslog;
Extract gets ABENDED
Kindly help on this.
Regards, ImranGot it solved some how, golden gate was trying to connect with default socket file.
*/tmp/mysql.sock*
while my socket file was
*/tmp/mysql_sandbox5519.sock*
I changed it to default and got rid of the error.
Thanks for the help.
Regards, Imran -
I can't connect to MySQL database from The JSP Standard Tag Library
Hi All !
I have a problem, please help me anybody !
I don't connect to MySQL database from jsp page using JSTL tag but from servlet all work correctly. I set my path and put �mysql-connector-java-3.1.13-bin.jar� in ENVIRONMENT WinXP(classpath=C:\Java\jdk1.5.0_10\jre\lib\ext\mysql-connector-java-3.1.13-bin.jar) and in War project folder �WEB-INF/lib� and in [TomcatServer]\common\lib.
I have in folder�WEB-INF/lib� following files:
antlr.jar
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-fileupload.jar
commons-logging.jar
commons-validator.jar
jakarta-oro.jar
jsf-api.jar
jsf-impl.jar
jstl.jar
mysql-connector-java-3.1.13-bin.jar
standard.jar
struts.jar
I'm using:
NetBeans 5.5 Build200610171010 (bundled Tomcat 5.5.17)
Ent.Pack 20061020 Visual Wb Pack 061103
OS WinXP SP2
Java 1.5.0_10
MySQL 5.0.18-nt
1:<%@page contentType="text/html"%>
2:<%@page pageEncoding="UTF-8"%>
8: <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
9: <%@taglib uri="http://java.sun.com/jstl/sql" prefix="sql"%>
10:
11: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
12: "http://www.w3.org/TR/html4/loose.dtd">
13:
14: <sql:setDataSource var="ds"
15: driver="com.mysql.jdbc.Driver"
16: url="jdbc:mysql://localhost:3306/test"
17: user="root"
18: password="xxxx"/>
19:
20:
21:<sql:query sql="select name, age from People" var="res"
22: dataSource="${ds}"/>
I have received report on mistake when entered code at the top:
�/index.jsp [21;0] According to TLD or attribute directive in tag file, attribute dataSource does not accept any expressions�
I used instead of (dataSource="${ds}")->(dataSource="ds") but this did not work.
After build and run I have received
=========================================START=================================
HTTP Status 500
type Exception report:
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /index.jsp(21,0) According to TLD or attribute directive in tag file, attribute dataSource does not accept any expressions
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
root cause
org.apache.jasper.JasperException: /index.jsp(21,0) According to TLD or attribute directive in tag file, attribute dataSource does not accept any expressions
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)
org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:955)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:710)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Validator.validate(Validator.java:1489)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:166)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.
Apache Tomcat/5.5.17
=======================================END================================
Error: "According to TLD or attribute directive in tag file, attribute dataSource does not accept any expressions" - but according to documentation such parameter possible.
BUT WHEN JOINING With DATABASE FROM SERVLET ALL WORK FINE.
I read this doc - [http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html], this applicable if I Tomcat Admin, but i'am not Admin
I simply user, i.e. I want to place its database on virtual host (Tomcat+(JSP-JSTL)+MySQL).
There is idea how can resolve this problem
Thank you in advance ;)For all how have similar problem.
Decision instead of these ways
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
it is necessary to indicate these
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -
Connection error mysql database in Dreamweaver
the error message is - HTTP error code 404 file not found. here are some possible reasons
screen shot - http://netwizlk.site50.net/images/DW-error.jpg
1)there is no testing server running on the server machine.
2)the testing server specified for this site does not map to the http://localhost/_mmServerScripts/MMhTTPDB.php verify that the URL prefix maps to the root of the site.
guy pls help me to solve this problem. I tried several times to connect my mysql database with dreamweaver but ended up having this error I reinstalled dreamweaver cs4 and XAMPP still the error is not rectified my both remote and local files are stored in XAMPP server location called in c:\xampp\htdocs\htdocs\myweb
anybody who could give me a speedy solution for this issue will be highly appreciated thanks alot guys.c:\xampp\htdocs\htdocs\myweb
MM serverscripts must be at the root level of the virtual server, that is directly in the htdocs folder.
Mylenium -
Unable to Connect to the database in RCU, Oracle11g XE on Laptop/Windows
Software downloaded unzipped and installed from OTN
OBIEE foundation 11.1.1.5
Repository Creation Utility 11.1.1.5
Oracle Database Express Edition 11.2
Issues
1. I installed Oracle 11g express edition. I am able to start/stop and run sql against the database however the homepage ("get started " accessed from Start > Programs > Oracle Database 11g XE > Get Started) does not work. This i will post in a separate thread but I am writing this anyway just in case it has some relevance.
2, This is the one I need help with. Can you confirm that these are the parameters when I hit the "create" option in RCU because I get the error message saying I cannot connect.
Hostname:This is the same as the hostname, when I go to cmd prompt like below
C:>hostname<enter> That is what I am using.
Port and Service :Can you confirm, Port = "1521" and Service = "XE". 1521 is the Database listener port when I installed Oracle 11g Database Express Edition. I am not putting the quotes in the boxes in the RCU.
Should the service be OracleServiceXE - i have tried it but does not work.
Anyway I get this message:
Unable to connect to the database using the provided details.
Please enter a valid hostname and port or check if the listener is up and running.
Any ideas appreciated.
By the way My lsnrctl status returns the following: (meaning the listeners are up!0
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\dir>lsnrctl status
LSNRCTL for 32-bit Windows: Version 11.2.0.2.0 - Production on 13-MAR-2012 13:44
:03
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.2.0 - Produ
ction
Start Date 13-MAR-2012 10:55:11
Uptime 0 days 2 hr. 48 min. 51 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File C:\oraclexe\app\oracle\product\11.2.0\server\network\a
dmin\listener.ora
Listener Log File C:\oraclexe\app\oracle\diag\tnslsnr\myspecifichostname\listene
r\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myspecifichostname)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myspecifichostname)(PORT=8080)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Edited by: ideakat on Mar 13, 2012 1:57 PMHi,
Like Abhi said, check your tnsnames.ora file to check the port number and service name is correct or not for the Express Edition database you have installed.
and when you are running RCU installer, Please give system adminstrator account of OracleXE like 'sys' or 'system' account with confirmed port number and service name.
Hope this helps.
Regards,
Bose
Edited by: Bose on Mar 16, 2012 11:42 AM
Edited by: Bose on Mar 16, 2012 5:35 PM -
After clicking in email link, I get the following message on Firefox page : " The application cannot proceed!
An internal error occured. Please contact your administrator and describe the steps you took before you encounter this error message.Error msg: Unable to connect to the database. Please make sure the database information specified in admin/includes/config.php are correct."
The email asked to install the latest Adobe Flashplayer version to have it working. I installed it, also updated my plug-ins and checked in safe mode that the extensions were not the problem. I also deleted the cookies an cache. Nothing seems to be working so far. I have the lastest version of Firefox 8.0.1 as well as Roboform 7. I noticed that the latest Firefox version has (x86) tagged to it. Does it refers to an 86 bits because my computer uses 32 or 64 bits only. I tried also different browsers and the message kept appearing. How do I resolve this problem?Clear the cache and the cookies from sites that cause problems.
"Clear the Cache":
* Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
"Remove Cookies" from sites causing problems:
* Tools > Options > Privacy > Cookies: "Show Cookies" -
INS0009: Unable to connect to the database with user SYS
Hi all,
I'm trying to create an OWB repository with OWB repository assistant (10.2.0.2.) on a 10.2.0.1. database (windows XP platform). I get the following error every time I fill in the connect info for the SYS user:
INS0009: Unable to connect to the database with user SYS. java.sql.SQLException: ORA-01017: invalid username/password; logon denied
I can connect to the database (sqlplus sys/<password>@orcl as sysdba) and the OS user is in the ora_dba group. Also checked the database parameters remote_login_passwordfile (= EXCLUSIVE) and O7_DICTIONARY_ACCESSIBILITY=TRUE.
Does anyone know what the problem is? Any help is appreciated.
Regards,
QuintenOk I found the problem myself, I used the wrong sys password :-(. I thought the password I used to logon in sqlplus was right (sqlplus sys/<password>@orcl as sysdba) but the password doesn't matter when you logon as sysdba! So I altered the password for the user sys and now I can continue the steps of the repository assistant.
Quinten -
Unable to connect to 10g database from developer suite 10g
I have loaded oracle 10g on my server with OS windows 2003 and it is working fine.Now I have installed Oracle developer suite 10g on windows XP client . we have configured local listener also and its entry is found in tnsnames.ora
My database name is mbxdata .
I have defined my host name as
MBXDATA.mbxnet.com in tnsnames but I am unable to connect to the database since I get error as ORA-12154 : TNS :could not resolve the connect identifier specified.
Please suggest matter urgent.
Thanks in advanceWe are having the same issue now. Was this ever resolved? We created 2 new databases and added those entries in both tnsnames on the local pc, and the tnsnames on the application server. Able to connect via sqlplus, toad, etc. but not through forms developer. We are running 10g app server, 10g developer suite, 10g databases. Any ideas?
Thanks,
Deb
Maybe you are looking for
-
Which join to use in situation below?
Hi, I have 2 tables with structures as below table :- Machine (machinename char(5), machineid char(6), starttime date , endtime date, quantity) table :- shutdown machineid char(6), shutdowntime date, shutdownmins char(5) What i want to do is change t
-
My IPod touch got stolen today while on vacation and I can't remember my Apple ID/Apple ID password, which I need to be able to track it. I know my email associated with my Apple ID so I got the password reset link sent to my email but when I click o
-
Is there a way to set Megapixel in camera?
Is there a way to set Megapixel in camera?
-
Hi everyone, I am new to this J2me thing i have finish dl the midp and cldc and upzip both of them but when i go through with the docs i cant install the application on the midp when it call us to input the URL thing. It always give me this error. "T
-
Update on CC installer , failed
Wanted to apply updates to CC Had to uninstall Photoshop When I started to re install, was asked if I wanted to update installer, which I did. Now installer does not work, all I get is this, Have uninstalled and re booted several times. Running windo