Building postfix with mysql problem
Hi all,
I have a sun fire v880 machine running solaris 10, i need to set an email server using postfix+mysql.
I already installed myql and its working fine. but when trying to build postfix with mysql i get a compliation error, here's wts going on:
bash-3.00# make makefiles 'CCARGS=-DHAS_MYSQL -I/usr/local/bdb/include -I/opt/mysql/mysql/include -DUSE_SASL_AUTH' 'AUXLIBS=-L/opt/mysql/mysql/lib -R/opt/mysql/mysql/lib -lmysqlclient -lz -lm'
(echo "# Do not edit -- this file documents how Postfix was built for your machine."; /bin/sh makedefs) >makedefs.tmp
set +e; if cmp makedefs.tmp conf/makedefs.out; then rm makedefs.tmp; \
else mv makedefs.tmp conf/makedefs.out; fi >/dev/null 2>/dev/null
set -e; for i in src/util src/global src/dns src/tls src/xsasl src/milter src/master src/postfix src/smtpstone src/sendmail src/error src/pickup src/cleanup src/smtpd src/local src/trivial-rewrite src/qmgr src/oqmgr src/smtp src/bounce src/pipe src/showq src/postalias src/postcat src/postconf src/postdrop src/postkick src/postlock src/postlog src/postmap src/postqueue src/postsuper src/qmqpd src/spawn src/flush src/verify src/virtual src/proxymap src/anvil src/scache src/discard src/tlsmgr; do \
(set -e; echo "[$i]"; cd $i; rm -f Makefile; \
make -f Makefile.in Makefile MAKELEVEL=) || exit 1; \
done;
[src/util]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/global]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/dns]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/tls]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/xsasl]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/milter]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/master]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postfix]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/smtpstone]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/sendmail]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/error]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/pickup]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/cleanup]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/smtpd]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/local]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/trivial-rewrite]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/qmgr]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/oqmgr]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/smtp]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/bounce]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/pipe]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/showq]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postalias]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postcat]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postconf]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postdrop]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postkick]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postlock]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postlog]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postmap]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postqueue]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postsuper]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/qmqpd]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/spawn]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/flush]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/verify]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/virtual]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/proxymap]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/anvil]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/scache]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/discard]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/tlsmgr]
(set -e; echo "# DO NOT EDIT"; /bin/sh ../../makedefs && cat Makefile.in) >Makefile
rm -f Makefile; (cat conf/makedefs.out Makefile.in) >Makefile
* Then when i run:
bash-3.00# /usr/local/bin/make
The compilation goes on till i get the following error
"ld: warning: file /opt/mysql/mysql/lib/libmysqlclient.a(libmysql.o): wrong ELF class: ELFCLASS64
Undefined first referenced
symbol in file
mysql_fetch_row ../../lib/libglobal.a(dict_mysql.o)
mysql_query ../../lib/libglobal.a(dict_mysql.o)
mysql_error ../../lib/libglobal.a(dict_mysql.o)
mysql_close ../../lib/libglobal.a(dict_mysql.o)
mysql_free_result ../../lib/libglobal.a(dict_mysql.o)
mysql_store_result ../../lib/libglobal.a(dict_mysql.o)
mysql_init ../../lib/libglobal.a(dict_mysql.o)
mysql_real_connect ../../lib/libglobal.a(dict_mysql.o)
mysql_real_escape_string ../../lib/libglobal.a(dict_mysql.o)
mysql_num_rows ../../lib/libglobal.a(dict_mysql.o)
mysql_num_fields ../../lib/libglobal.a(dict_mysql.o)
mysql_escape_string ../../lib/libglobal.a(dict_mysql.o)
ld: fatal: Symbol referencing errors. No output written to error
collect2: ld returned 1 exit status
make: *** [error] Error 1
make: *** [update] Error 1"
Please help me with this issue, i use gcc-3.3.2 and used both GNU make and the "make" shipped with solaris, both gave the same result.
I installed Mysql as a pkg and didn't compile it from source.
Thanks in advance.
"ld: warning: file /opt/mysql/mysql/lib/libmysqlclient.a(libmysql.o): wrong ELF class: ELFCLASS64Usually this kind of error is an indication that both 32- and 64-bit object files are being used in building the application. Use all 32-bit objects or 64-bit objects - please do not mix them during compilation.
If building from scratch is not mandatory for you, you can try installing postfix {and other applications, libraries, ..} with the help of Blastwave's 'pkg-get'. Some instrustions are at: http://technopark02.blogspot.com/2005/06/solaris-installing-appspackages-with.html
% pkg-get -a | grep postfix
postfix 2.2.8,REV=2006.03.13
Similar Messages
-
Problem building postfix with mysql
Hi all,
I have a sun fire v880 machine running solaris 10, i need to set an email server using postfix+mysql.
I already installed myql and its working fine. but when trying to build postfix with mysql i get a compliation error, here's wts going on:
bash-3.00# make makefiles 'CCARGS=-DHAS_MYSQL -I/usr/local/bdb/include -I/opt/mysql/mysql/include -DUSE_SASL_AUTH' 'AUXLIBS=-L/opt/mysql/mysql/lib -R/opt/mysql/mysql/lib -lmysqlclient -lz -lm'
(echo "# Do not edit -- this file documents how Postfix was built for your machine."; /bin/sh makedefs) >makedefs.tmp
set +e; if cmp makedefs.tmp conf/makedefs.out; then rm makedefs.tmp; \
else mv makedefs.tmp conf/makedefs.out; fi >/dev/null 2>/dev/null
set -e; for i in src/util src/global src/dns src/tls src/xsasl src/milter src/master src/postfix src/smtpstone src/sendmail src/error src/pickup src/cleanup src/smtpd src/local src/trivial-rewrite src/qmgr src/oqmgr src/smtp src/bounce src/pipe src/showq src/postalias src/postcat src/postconf src/postdrop src/postkick src/postlock src/postlog src/postmap src/postqueue src/postsuper src/qmqpd src/spawn src/flush src/verify src/virtual src/proxymap src/anvil src/scache src/discard src/tlsmgr; do \
(set -e; echo "[$i]"; cd $i; rm -f Makefile; \
make -f Makefile.in Makefile MAKELEVEL=) || exit 1; \
done;
[src/util]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/global]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/dns]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/tls]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/xsasl]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/milter]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/master]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postfix]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/smtpstone]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/sendmail]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/error]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/pickup]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/cleanup]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/smtpd]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/local]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/trivial-rewrite]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/qmgr]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/oqmgr]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/smtp]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/bounce]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/pipe]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/showq]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postalias]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postcat]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postconf]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postdrop]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postkick]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postlock]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postlog]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postmap]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postqueue]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postsuper]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/qmqpd]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/spawn]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/flush]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/verify]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/virtual]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/proxymap]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/anvil]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/scache]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/discard]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/tlsmgr]
(set -e; echo "# DO NOT EDIT"; /bin/sh ../../makedefs && cat Makefile.in) >Makefile
rm -f Makefile; (cat conf/makedefs.out Makefile.in) >Makefile
* Then when i run:
bash-3.00# /usr/local/bin/make
The compilation goes on till i get the following error
"ld: warning: file /opt/mysql/mysql/lib/libmysqlclient.a(libmysql.o): wrong ELF class: ELFCLASS64
Undefined first referenced
symbol in file
mysql_fetch_row ../../lib/libglobal.a(dict_mysql.o)
mysql_query ../../lib/libglobal.a(dict_mysql.o)
mysql_error ../../lib/libglobal.a(dict_mysql.o)
mysql_close ../../lib/libglobal.a(dict_mysql.o)
mysql_free_result ../../lib/libglobal.a(dict_mysql.o)
mysql_store_result ../../lib/libglobal.a(dict_mysql.o)
mysql_init ../../lib/libglobal.a(dict_mysql.o)
mysql_real_connect ../../lib/libglobal.a(dict_mysql.o)
mysql_real_escape_string ../../lib/libglobal.a(dict_mysql.o)
mysql_num_rows ../../lib/libglobal.a(dict_mysql.o)
mysql_num_fields ../../lib/libglobal.a(dict_mysql.o)
mysql_escape_string ../../lib/libglobal.a(dict_mysql.o)
ld: fatal: Symbol referencing errors. No output written to error
collect2: ld returned 1 exit status
make: *** [error] Error 1
make: *** [update] Error 1"
Please help me with this issue, i use gcc-3.3.2 and used both GNU make and the "make" shipped with solaris, both gave the same result.
I installed Mysql as a pkg and didn't compile it from source.
Thanks in advance."ld: warning: file /opt/mysql/mysql/lib/libmysqlclient.a(libmysql.o): wrong ELF class: ELFCLASS64Usually this kind of error is an indication that both 32- and 64-bit object files are being used in building the application. Use all 32-bit objects or 64-bit objects - please do not mix them during compilation.
If building from scratch is not mandatory for you, you can try installing postfix {and other applications, libraries, ..} with the help of Blastwave's 'pkg-get'. Some instrustions are at: http://technopark02.blogspot.com/2005/06/solaris-installing-appspackages-with.html
% pkg-get -a | grep postfix
postfix 2.2.8,REV=2006.03.13 -
Recompiling Postfix with MySQL support
It took me so much time that I think the following explanation could be useful.
Goal: Recompiling Postfix with MySQL support without losing compatibility with Apple administration tools
Original instructions from webutilities:
downloaded the postfix from the Darwin Sources here:
http://www.opensource.apple.com/darwinsource/10.4.3/
Thx to pterobyte
i created the directorys
/src
i put the source in there
/src/postfix-144
and
/AppleInternal/Deverloper/Headers
i put the Sasl headers in there
/AppleInternal/Deverloper/Headers/sasl
then i modyfied the makefile in postfix-144
SRCROOT=
to
SRCROOT=/src/postfix-144
and
build :
echo "ENV = $(ENV)"
$(ENV) $(MAKE) -C $(SRCROOT)/$(PROJECT) makefiles OPT="-DBIND8COMPAT -DHAS_SSL -DUSESASLAUTH -D_APPLE_ \
-I/AppleInternal/Developer/Headers/sasl -framework DirectoryService $(CFLAGS)" \
AUXLIBS="-L/usr/lib -lssl -lsasl2.2.0.1 -lgssapi_krb5"
$(ENV) $(MAKE) -C $(SRCROOT)/$(PROJECT)
cd $(SRCROOT)/postfix/src/smtpstone && make all
to
build :
echo "ENV = $(ENV)"
$(ENV) $(MAKE) -C $(SRCROOT)/$(PROJECT) makefiles OPT="-DBIND8COMPAT -DHAS_SSL -DUSESASLAUTH -D_APPLE_ \
-I/AppleInternal/Developer/Headers/sasl -framework DirectoryService $(CFLAGS) -DHAS_MYSQL -I/usr/include/mysql" \
AUXLIBS="-L/usr/lib/sasl2 -lssl -lsasl2.2.0.1 -lgssapi_krb5 -L/usr/lib/mysql -lmysqlclient -lz -lm"
$(ENV) $(MAKE) -C $(SRCROOT)/$(PROJECT)
cd $(SRCROOT)/postfix/src/smtpstone && make all
then in the cli
cd /src/postfix-144
make build
cd postfix
i tryed to
make update
but it gave me
nothing to do back
so i made a backup of the postfix files
mv /usr/sbin/postfix /usr/sbin/postfix.bak
mv /usr/sbin/postfconf /usr/sbin/postfconf.bak
mv /usr/libexec/postfix /usr/libexec/postfix.bak
i moved
mv src/postfix/postfix /usr/sbin
mv src/postfconf/postfconf /usr/sbin
mv libexec /usr/libexec/postfix
Here is what I did not understand first:
1. SASL headers
These headers can be found in Apple's distribution of passwordserver_sasl-59.3 (http://www.opensource.apple.com/darwinsource/10.4.4/). Here is the list:
-rw-r--r-- 1 administ admin 5472 Sep 3 2002 exits.h
-rw-r--r-- 1 root wheel 3547 Apr 11 2005 gai.h
-rw-r--r-- 1 root wheel 1368 Apr 11 2005 hmac-md5.h
-rw-r--r-- 1 root wheel 1442 Apr 11 2005 md5.h
-rw-r--r-- 1 root wheel 1007 Apr 11 2005 md5global.h
-rw-r--r-- 1 root wheel 7273 Apr 11 2005 prop.h
-rw-r--r-- 1 root wheel 47906 Apr 11 2005 sasl.h
-rw-r--r-- 1 root wheel 30986 Apr 11 2005 saslplug.h
-rw-r--r-- 1 root wheel 2648 Apr 11 2005 saslutil.h
2. Postfix update
I did a "make build", then moved to /src/postfix-144/postfix and did a "make update". But it was not enough, I had to follow the instructions by manually copying the files (src/postfix/postfix, src/postfconf/postfconf, libexec).
And it seems to work fine!
DavidIt took me so much time that I think the following explanation could be useful.
Goal: Recompiling Postfix with MySQL support without losing compatibility with Apple administration tools
Original instructions from webutilities:
downloaded the postfix from the Darwin Sources here:
http://www.opensource.apple.com/darwinsource/10.4.3/
Thx to pterobyte
i created the directorys
/src
i put the source in there
/src/postfix-144
and
/AppleInternal/Deverloper/Headers
i put the Sasl headers in there
/AppleInternal/Deverloper/Headers/sasl
then i modyfied the makefile in postfix-144
SRCROOT=
to
SRCROOT=/src/postfix-144
and
build :
echo "ENV = $(ENV)"
$(ENV) $(MAKE) -C $(SRCROOT)/$(PROJECT) makefiles OPT="-DBIND8COMPAT -DHAS_SSL -DUSESASLAUTH -D_APPLE_ \
-I/AppleInternal/Developer/Headers/sasl -framework DirectoryService $(CFLAGS)" \
AUXLIBS="-L/usr/lib -lssl -lsasl2.2.0.1 -lgssapi_krb5"
$(ENV) $(MAKE) -C $(SRCROOT)/$(PROJECT)
cd $(SRCROOT)/postfix/src/smtpstone && make all
to
build :
echo "ENV = $(ENV)"
$(ENV) $(MAKE) -C $(SRCROOT)/$(PROJECT) makefiles OPT="-DBIND8COMPAT -DHAS_SSL -DUSESASLAUTH -D_APPLE_ \
-I/AppleInternal/Developer/Headers/sasl -framework DirectoryService $(CFLAGS) -DHAS_MYSQL -I/usr/include/mysql" \
AUXLIBS="-L/usr/lib/sasl2 -lssl -lsasl2.2.0.1 -lgssapi_krb5 -L/usr/lib/mysql -lmysqlclient -lz -lm"
$(ENV) $(MAKE) -C $(SRCROOT)/$(PROJECT)
cd $(SRCROOT)/postfix/src/smtpstone && make all
then in the cli
cd /src/postfix-144
make build
cd postfix
i tryed to
make update
but it gave me
nothing to do back
so i made a backup of the postfix files
mv /usr/sbin/postfix /usr/sbin/postfix.bak
mv /usr/sbin/postfconf /usr/sbin/postfconf.bak
mv /usr/libexec/postfix /usr/libexec/postfix.bak
i moved
mv src/postfix/postfix /usr/sbin
mv src/postfconf/postfconf /usr/sbin
mv libexec /usr/libexec/postfix
Here is what I did not understand first:
1. SASL headers
These headers can be found in Apple's distribution of passwordserver_sasl-59.3 (http://www.opensource.apple.com/darwinsource/10.4.4/). Here is the list:
-rw-r--r-- 1 administ admin 5472 Sep 3 2002 exits.h
-rw-r--r-- 1 root wheel 3547 Apr 11 2005 gai.h
-rw-r--r-- 1 root wheel 1368 Apr 11 2005 hmac-md5.h
-rw-r--r-- 1 root wheel 1442 Apr 11 2005 md5.h
-rw-r--r-- 1 root wheel 1007 Apr 11 2005 md5global.h
-rw-r--r-- 1 root wheel 7273 Apr 11 2005 prop.h
-rw-r--r-- 1 root wheel 47906 Apr 11 2005 sasl.h
-rw-r--r-- 1 root wheel 30986 Apr 11 2005 saslplug.h
-rw-r--r-- 1 root wheel 2648 Apr 11 2005 saslutil.h
2. Postfix update
I did a "make build", then moved to /src/postfix-144/postfix and did a "make update". But it was not enough, I had to follow the instructions by manually copying the files (src/postfix/postfix, src/postfconf/postfconf, libexec).
And it seems to work fine!
David -
EJB 3.0 entity beans generation with MySql - problem
Hi,
I am using JDev 10.1.3 Production and using the EJB3.0 CMP wizard to generate the code from a MySQL database. No matter what type I specify for my database columns in schema, code generator always generates the properties of type String only. e.g if a column called Age is specified as Integer in schema, the generator generates setters/getters with String type.
Can somebody please help me.
Regards
VimalHi,
I'm experiencing same problems, is this a bug or an feature? -
i am using jdk1.6.0_02,apache tomcat 5.5.23 ,mysql integrated with redhat linux EE 4 and.mysql connector java 5.0.7.bin.jar.
look at the the following java program
import java.sql.*;
public class TestMysql
public static void main(String args[])
try
String driver = "com.mysql.jdbc.Driver";
Class.forName( driver );
String url = "jdbc:mysql://localhost/test";
DriverManager.getConnection( url, "root", "mysql" );
catch( Exception x )
{ x.printStackTrace();
i got the following exception
java.sql.SQLException: Access denied for user 'root'@'localhost.localdomain' (us *** password:
YES)
at com.mysql.jdbc.SQLError.createSQLException(java.lang.String, java.lang.Str ***, int)
(Unknown Source)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(int) (Unknown Source)
at com.mysql.jdbc.MysqlIO.checkErrorPacket() (Unknown Source)
at com.mysql.jdbc.MysqlIO.secureAuth411(com.mysql.jdbc.Buffer, int, java.lang .String,
java.lang.String, java.lang.String, boolean) (Unknown Source)
at com.mysql.jdbc.MysqlIO.doHandshake(java.lang.String, java.lang.String, jav a.lang.String)
(Unknown Source)
at com.mysql.jdbc.Connection.createNewIO(boolean) (Unknown Source)
at com.mysql.jdbc.Connection.Connection(java.lang.String, int, java.util.Prop erties,
java.lang.String, java.lang.String) (Unknown Source)
at com.mysql.jdbc.NonRegisteringDriver.connect(java.lang.String, java.util.Pr operties)
(Unknown Source)
at java.sql.DriverManager.getConnection(java.lang.String, java.util.Propertie s)
(/usr/lib/libgcj.so.5.0.0)
at java.sql.DriverManager.getConnection(java.lang.String, java.lang.String, j
ava.lang.String) (/usr/lib/libgcj.so.5.0.0)
at Connect.main(java.lang.String[]) (Unknown Source)
access denied problem. but the user name and password are correct. i can login to mysql by using
the same username and password.
but when connecting through java , i can't ? what is the problem?
can u help me.?
actually i am working in JSP. and when i got this problem, i created a small java program for testing.
here i am submitting the java program.friend please put your code inside
// your code goes here it will more readable and other can solve it better.
==================
and your problem tells that you must set access permission inside
mySQL server.
or try with creating new User with password.
EnJOY.
Ghanshyam
Edited by: Ghanshyam on Sep 28, 2007 4:13 PM -
Applescript with mysql problem (An error of type 1 has occured)
Hi all!
I'm quite new to scripting with applescript...
Currently I'm trying to get applescript to connect to a remote mysql-database, and execute a insert-command.
All is working fine, when I just use a select-command.
But when I try to use my insert-query, I get this error:
"An error of type 1 has occured".
I've googled high and low, but cant seem to find out either if this is mysql returning the error-code or if it's applescript returning it.
set mySQLList to {"/usr/local/mysql-5.1.30-osx10.5-x86/bin/", "/Library/mysql-5.1.30-osx10.5-x86/bin"}
repeat with i from 1 to the count of mySQLList
try
set theResult to do shell script (item i of mySQLList) & "mysql -V"
set gPathToMySQL to (item i of mySQLList)
set haveFound to true
exit repeat
end try
end repeat
set gmySQLCommand to gPathToMySQL & "mysql"
set theHost to "server"
set theUser to "username"
set thePassword to "password"
set thePort to "3306"
set theDatabase to "database"
set theTable to "recivedMail"
set theLoginString to " -h " & theHost & " -u " & theUser & " --password=" & thePassword
set dataBaseString to " -D " & "'" & theDatabase & "'"
--set theCommand to gmySQLCommand & theLoginString & dataBaseString & " -e \"" & "select count(*) from recivedMail;" & "\""
set theCommand to gmySQLCommand & theLoginString & dataBaseString & " -e \"" & "INSERT INTO database.recivedMail (sentTo,ticket,dateRecived) VALUES ('[email protected]', 'en ticket', '2009-01-21 17:15:56'); " & "\""
-- set theCommand to gmySQLCommand & theLoginString & dataBaseString & " -e \"" & "SELECT COUNT(*) FROM recivedMail;" & "\""
set theResult to ""
--display dialog theCommand
try
set theResult to do shell script theCommand
on error errMsg
display dialog errMsg
end try
return theResult
can someone here help me out?I just had the same problem you described below. I did some searching on the subject in the forums and there seems to be an issue with A.Pack on dual processor machines. I kept getting errors until I shut one of the processors off. The encoding went thru on the first attempt after that.
There is a system preference pane called Processor that will allow you to shut off one of the processors. Then launch A.Pack and encode. I believe this preference pane is installed when you install the developer software with xcode. The developer software can be found on the Tiger install disc.
Also, they have done away with A.Pack and this issue in DVDSP 4. Apparently A.Pack is integrated somehow into Compressor.
Hope this helps. Good luck.
Dual 1.25GHz Mac OS X (10.4.3) 1.25GB Ram 22" Cinema & 17" Acer -
Toplink with mysql: problem with blob size
I'm using toplink with a mysql database. I want to store some data in a blob.
In mysql there exist different sizes of blobs (in my case I need a mediumblob).
But if I create the scheme for the database with jpa/toplink it alway creates only a column with type blob.
I can explicitly tell the database to use a mediumblob by this:
@Column("MEDIUMBLOB")
But by doing this I limit my program to mysql of course, as this data type is not known to other databases.
Does anybody know a more elegant solution to setting the blob size?
for example with hibernate it can be done this way:
@Column(length=666666)Looks like you are using JPA, and in JPA you would set the columnDefinition to the type that you want, e.g.
@Lob
@Column(name="BLOBCOL", columnDefinition="MEDIUMBLOB")
byte[] myByteData;
As you mentioned, this does introduce a dependency on the database. However, you can always either put the Column metadata in XML, or override it with something else later in XML.
The length attribute was intended and specified for use with Strings but I guess there is no reason why it couldn't be used for BLOBs as well (please enter an enhancement request, or submit the code to add the feature to EclipseLink). Be aware, though, that doing so at this stage is going to be introducing a dependency on the provider to support a non-spec defined feature. -
Problems conecting java with mysql
Hi, im workin' with mysql-connector-java-3.1.12 and it work on debug runtime but not when i access the .jar of the project.
the code of conection is:
try
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection(url,login,password);
con.setAutoCommit(false);
catch (Exception e)
JOptionPane.showMessageDialog(null,"error en " + e.getMessage());
there is no problems with code, it works!!, but i don't know what to do about of conection in the .jar
I apreciate some help with this, Thankkkssss!!!Hi, im workin' with mysql-connector-java-3.1.12 and
it work on debug runtime but not when i access the
.jar of the project.Huh?
the code of conection is:
try
lass.forName("com.mysql.jdbc.Driver").newInstance();
con =
DriverManager.getConnection(url,login,password);
con.setAutoCommit(false);This is probably wrong. Unnecessary in this case - you aren't doing any writes.
catch (Exception e)
OptionPane.showMessageDialog(null,"error en " +
e.getMessage());This is foolish code. You don't need Swing or a dialog box. You're printing less information than is available. Better to print the entire stack trace.
is no problems with code, it works!!, Plenty of problems, really, regardless of whether it "works".
You don't post your URL. That would help.
but i don't
know what to do about of conection in the .jar
I apreciate some help with this, Thankkkssss!!!Put in the CLASSPATH, of course. NOT a system environment variable, either. javac.exe and java.exe ignore it. Use the -classpath option.
% -
i have problem with MySQL i have a driver i added it in to servers list and i made tests with data source everythink is ok, i see tables but when i drop a table from data source on table componenet(or other) i have errors nullPointerExpection at: (here is very long list of java classes. when i click "view data" of table in data source everythink works, only in components it doesn't. Can sombody help me please. I hope you understood my problem if not i will try to explain it once again.
i get his Exception:
A java.lang.NullPointerException exception has occurred.
Please report this at http://www.netbeans.org/issues.html,
including a copy of your messages.log file as an attachment.
The messages.log file is located in your C:\Documents and Settings\Leszczyński\.Creator\2_0\var\log folder.
here are details:
java.lang.NullPointerException
at com.mysql.jdbc.PreparedStatement.asSql(PreparedStatement.java:565)
at com.mysql.jdbc.PreparedStatement.asSql(PreparedStatement.java:507)
at com.mysql.jdbc.PreparedStatement.toString(PreparedStatement.java:3290)
at java.lang.String.valueOf(String.java:2577)
at java.lang.StringBuffer.append(StringBuffer.java:220)
at com.mysql.jdbc.trace.Tracer.printParameters(Tracer.aj:240)
at com.mysql.jdbc.trace.Tracer.printEntering(Tracer.aj:167)
at com.mysql.jdbc.trace.Tracer.entry(Tracer.aj:126)
at com.mysql.jdbc.trace.Tracer.ajc$before$com_mysql_jdbc_trace_Tracer$1$f51c62b8(Tracer.aj:45)
at com.mysql.jdbc.Connection.registerStatement(Connection.java)
at com.mysql.jdbc.Statement.<init>(Statement.java:190)
at com.mysql.jdbc.PreparedStatement.<init>(PreparedStatement.java:432)
at com.mysql.jdbc.ServerPreparedStatement.asSql(ServerPreparedStatement.java:343)
at com.mysql.jdbc.PreparedStatement.asSql(PreparedStatement.java:507)
at com.mysql.jdbc.ServerPreparedStatement.toString(ServerPreparedStatement.java:2306)
at java.lang.String.valueOf(String.java:2577)
at java.lang.StringBuffer.append(StringBuffer.java:220)
at com.mysql.jdbc.trace.Tracer.printParameters(Tracer.aj:240)
at com.mysql.jdbc.trace.Tracer.printEntering(Tracer.aj:167)
at com.mysql.jdbc.trace.Tracer.entry(Tracer.aj:126)
at com.mysql.jdbc.trace.Tracer.ajc$before$com_mysql_jdbc_trace_Tracer$1$f51c62b8(Tracer.aj:45)
at com.mysql.jdbc.Connection.registerStatement(Connection.java)
at com.mysql.jdbc.Statement.<init>(Statement.java:190)
at com.mysql.jdbc.PreparedStatement.<init>(PreparedStatement.java:414)
at com.mysql.jdbc.ServerPreparedStatement.<init>(ServerPreparedStatement.java:280)
at com.mysql.jdbc.Connection.prepareStatement(Connection.java:4288)
at com.mysql.jdbc.Connection.prepareStatement(Connection.java:4226)
at com.sun.rave.sql.DesignTimeConnection.prepareStatement(DesignTimeConnection.java:187)
at com.sun.sql.rowset.CachedRowSetXImpl.getMetaData(CachedRowSetXImpl.java:2334)
at com.sun.data.provider.impl.CachedRowSetDataProvider.getMetaData(CachedRowSetDataProvider.java:1317)
at com.sun.data.provider.impl.CachedRowSetDataProvider.getFieldKeys(CachedRowSetDataProvider.java:489)
at com.sun.rave.web.ui.component.table.TableRowGroupDesignState.resetTableColumns(TableRowGroupDesignState.java:261)
at com.sun.rave.web.ui.component.table.TableRowGroupDesignState.setDataProviderBean(TableRowGroupDesignState.java:163)
at com.sun.rave.web.ui.component.table.TableDesignState.setDataProviderBean(TableDesignState.java:250)
at com.sun.rave.web.ui.component.TableDesignInfo.linkBeans(TableDesignInfo.java:162)
at com.sun.rave.insync.models.FacesModel.linkBeans(FacesModel.java:1042)
at com.sun.rave.designer.DndHandler.processLinks(DndHandler.java:2126)
at com.sun.rave.designer.DndHandler.importBean(DndHandler.java:880)
at com.sun.rave.designer.DndHandler.importItem(DndHandler.java:702)
at com.sun.rave.designer.DndHandler.importDataDelayed(DndHandler.java:376)
at com.sun.rave.designer.DndHandler.access$000(DndHandler.java:114)
[catch] at com.sun.rave.designer.DndHandler$1.run(DndHandler.java:298)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
yes i use JSC 2
Is it posible that my MySQL is not working properly??
Micz. -
Problem in creating a CMP bean with MySql
Hi,
I am using lomboz eclipse, jboss 4.0.2, xdoclet 1.2.3 & DB as MySql 5.0. I am encountering a very strange problem when I try to create a CMP with MySql as DB. After entering relevant information about the datasource & testing the connection & finding it to be successful, I get the error in lomboz eclipse as : CMP has no attributes. Moreover, I donot even get the table names from the schema, that was given in the datasource, with which the mapping of my CMP will be done.
I tried using Oracle 9i. But to my wonder, I didnot experience this issue, as it gave me all the CMP atttributes mapped & also created the CMP with Oracle DB. Can anyone help me in getting this issue resloved with MySql DB?Yeah, the DB User permissions are found to be ok, as the test connection was successfull. I have tried for MySql 4.1 & Myql 5.0, with their respective jars & driver classes. But the result was same. Test connection is successful, but when i hit the next button to see the CMP attributes, it doesnot give me the list of tables under that schema & says that CMP has no attributes. Please help.
-
Firmware WRT160N ver.2 - 2.0.03 Build 9 with problem
I updated the firmware (WRT160N ver.2 - 2.0.02 build 15) to (WRT160N ver.2 - 2.0.03 Build 9) which is available on the website of CISCO and simply several problems arose in the product and can not revert to the firmware old. When upgraded did not have the option to backup the current firmware! Would the link for downloading the firmware (WRT160N ver.2 - 2.0.02 build 15) whose only problem was the signal strength! Someone could tell me where can I download? In Brazil the support is terrible... i beleave i can fix the problem with the old firmware... Tank you for atention
Solved!
Go to Solution.I am afraid that the old firmware is no longer available in their website
-
Problem with CS3 hooking up with MySQL
So i have a Database on a Webserver, i can get to it with
MySQL query Browser, but when i try to connect to it with Dream
weaver I get this error
Access denied. The file may not exist, or there could be a
permission problem
Make sure you have proper authorization on the server and the
server is properly configured.
my passwords are correct, and i can get to the server. The
website is even linked inside Dreamweaver, i just can't get the
Application window to work.Is your testing site properly defined?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"908098475093258" <[email protected]> wrote
in message
news:fqp3vg$rj7$[email protected]..
> So i have a Database on a Webserver, i can get to it
with MySQL query
> Browser,
> but when i try to connect to it with Dream weaver I get
this error
>
> Access denied. The file may not exist, or there could be
a permission
> problem
> Make sure you have proper authorization on the server
and the server is
> properly configured.
>
> my passwords are correct, and i can get to the server.
The website is
> even
> linked inside Dreamweaver, i just can't get the
Application window to
> work.
> -
A problem happened when building dimensions with Rule File
Hi All,
I was trying to build dimensions with the rule file. But it showed the error 1030100, which means "cannot open file".
I can load data with a data source (.txt). Thus, I assumed that it's a problem to open a rule file.
I don't think it's the problem about the rule files I wrote since I cannot even build dimensions with rule files in the Sample/Basic database.
Anyone knows how to solve the problem? Thanks for the help.
Best Regards,
Anderson854285 wrote:
Hi Prebhas,
Here are the error messages:
Object [Basic] is locked by user [admin]
Building Dimensions Elapsed Time: [0.016] seconds
Cannot open file: [E:\Hyperion\products\Essbase\eas\Client\dataload.err]
Unexpected Essbase error 1030100
Object [Basic] is unlocked by user [admin]
p.s. Even I re-install my system is English, the word "Client" is shown in Chinese. Is it possible this is the reason? If so, how I change the folder?
After I saw this message, I checked the folder and there is no such file. I tried to created one, but it disappear after I tried to build dimensions.
Best Regards,
Anderson
Edited by: 854285 on 2011/4/25 上午 3:27HI,
E:\Hyperion\products\Essbase\eas\Client\dataload.err
This path is referred to error message .... it will show the errors in that file...
and one more thing...
while adding data source to rule file it will ask you provide a path for the error message...there you can see this path...
Just check dataload.err file after running the rule file...
have you associated the out line to the rule file ???
is that rule file validate fine?
if not associate it and try...
Regards,
Prabhas
Edited by: P on Apr 25, 2011 4:43 PM -
PROBLEM BUILDING CDC WITH RED HAT 9.0
HI, i'm trying to build CDC with the following command:
make CVM_JAVABIN=/usr/java/jdk1.3/bin CVM_GNU_TOOLS_PATH=/usr/bin CVM_DEBUG=true
It start to make some new direcotries, but later the following error occurs:
... mkdir ../../build/linux-i686/obj
... mkdir ../../build/linux-i686/btclasses
... mkdir ../../build/linux-i686/testclasses
... mkdir ../../build/linux-i686/cdc_classes
Checking for build-time classes to compile ...
Compiling build-time classes...
error: compiler message file broken: key=compiler.err.sun.io.MalformedInputException arguments=null, null, null, null, null,
null, null
100 errors
make: *** [.compile.btclasses] Error 1
Do you know what can i do? I'm using jdse1.3.1 and red hat linux 9.0.Thanks very much.Hi,
I ran into the same problem with RH 9.0. To fix this problem you have two options:
1. Use jdk 1.4.x - if you use this jdk to perform the compile, you'll won't receive this error.
2. Modify your make file that performs the javac and make the following change: javac -encoding "ISO-8859-1"
Both of those approaches should get rid of that error.
Hope this helps?
Cheers,
Jeff -
Date Problem in Java with MySql
Hello
I am using Java with Mysql.I want to enter date in some in my format(YYYY:MM:DD:HH:MM:SS), this thing i have convert using format class and format class return date in String and iwwnat to insert this value in MySQL Table,So i want to know how can i convert String value in Date for Mysql is their inbuild function for converting string into date in mysql.
Regards
Anupam SUse PreparedStatement and SimpleDateFormat classes
http://onesearch.sun.com/search/onesearch/index.jsp?qt=%2BPreparedStatement+%2BSimpleDateFormat+&qp=siteforumid%3Ajava48&chooseCat=allJava&col=developer-forums&site=dev
Maybe you are looking for
-
Implementing Webservices Doubt
Hi, i have few queries in my mind we have to integrate Third party webservices with our SAP R/3 1) Assume that in IDOC--- SOAP scenario( External Web Service) who has to generate the WSDL file???? 2) In SOAP - IDOC scenario( External web service) wh
-
Urgent: MacBook pro boots up in disk utility mode
today, out of the blue it boots up in disk utility mode. I restarted it several times but nothing changed. I runned disk repair and permissions repair and no change. Tried to start in safe mode but it will not. any ideas? My last backup is a month ol
-
Duplicate entries under "Open With..." menu?
I recently exchanged my troubled iMac for a new one and migrated the User Accounts during the inital setup. Now that I've installed all of my old apps, the "Open With" contextual menu item shows duplicates of some (not all) of the available apps. For
-
DirectoryManager API query (ES2)
In my workflow I have two User tasks, 'Sanction' and 'Validate', which are performed by members of the 'Risk Assessors' group. Business logic dictates that the user who performs the 'Sanction' task may NOT perform the 'Validate' task. My implementa
-
When i convert my .tga sequence from 3dmax to a .swf in adobe after effects and then import into Dreamweaver I get these two weird purple or blue lines in my video. The photos look good out of 3dmax. They look fine in After Effects. But once I render