Re: [OJB-developers] ERROR: Server configuration denies access to data source
Brought to you by:
thma
From: <ri...@ya...> - 2002-02-20 22:44:53
|
Hello, It turns out that this error: java.sql.SQLException: Server configuration denies access to data = source was caused because MySql used its "max_connections" limit of 100. I tried to initialize MySql with a parameter of max_connections=3D1000, = but it gave me the same error. What leads me to think that it's a problem with OJB not closing = connections. It looks like OJB open a lot of connections trying to materialize the = dynamic proxies, but then it stops and gives the Exception, because all = the connections are occupied. Why does OJB open so many connections when using dynamic proxies? Thanks in advance, Ricardo Arguello ----- Original Message -----=20 From: "Mahler Thomas" <tho...@it...> To: "'Ricardo Arg=FCello'" <ri...@ya...> Cc: "Objectbridge (E-Mail)" = <obj...@li...> Sent: Tuesday, February 19, 2002 4:48 AM Subject: AW: [OJB-developers] ERROR: Server configuration denies access = to data source > Hi Ricardo, >=20 > >=20 > > Hello, > >=20 > > Since OJB is performing REALLY slowly, I tried to add the=20 > > next tag to my repository.xml file: > >=20 > > <class.proxy>dynamic</class.proxy> > >=20 > > in every <ClassDescriptor> tag. > >=20 > > All my objects implement an interface, so this theorically=20 > > should work fine. > > That's the only thing I changed in this file, and now I'm=20 > > getting this strange exception: > =20 > > [DEFAULT] ERROR: Server configuration denies access to data source > > java.sql.SQLException: Server configuration denies access to=20 > > data source > > at org.gjt.mm.mysql.MysqlIO.init(Unknown Source) > > at org.gjt.mm.mysql.Connection.connectionInit(Unknown = Source) > > at=20 > > org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Unknown Source) > > at org.gjt.mm.mysql.Driver.connect(Unknown Source) > > at=20 > > java.sql.DriverManager.getConnection(DriverManager.java:517) > > at=20 > > java.sql.DriverManager.getConnection(DriverManager.java:177) > > at=20 > > = ojb.broker.accesslayer.ConnectionFactoryDefaultImpl.newConnection(Con > > nectionFactoryDefaultImpl.java:72) > <snip> >=20 > OK this exception is raised during the materilization of a proxy. But = the > error is NOT Proxy related at all. You get an Error from the the MySQL > driver. > I'm not a MySQL expert thus I can't help here. >=20 > >=20 > >=20 > > -------------------------------------------------------------- > > ------------ > >=20 > > After a LOT of these messages: =20 > >=20 > > [DEFAULT] WARN: problems with platform=20 > > ojb.broker.platforms.PlatformMySQLImpl: > > ojb.broker.platforms.PlatformMySQLImpl > > [DEFAULT] WARN: OJB will use PlatformDefaultImpl instead > >=20 >=20 > This is totally harmless. It just tells you that OJB does not use any = MySql > specific PlatForm code. >=20 > >=20 > >=20 > > Do you have any idea of what's might the problem be? >=20 > IMHO this is a MySQL specific problem. > =20 > > Besides this, how can I make OJB perform faster? > >=20 >=20 > Mhh. > Of course using an O/R layer has a certain impact on performance. > If you are using handcoded JDBC and handcoded mappings you can do = things > much faster. > There is nothing like a free lunch ! >=20 > But: has been carefully designed to minimize the performance impact. > There is a special JUnit target 'performance' >=20 > By calling 'build.sh performance' you can execute the OJB performance > testsuite. > The testsuite runs to tests: > 1. running five tescenarios using OJB > 2. running the same scenarios with manual coded JDBC calls. >=20 > If you are executing it out of the box the tests are executed against = the > HSQLDB database that ships with OJB. > You will see that the OJB mode is about half as fast as the native = JDBC > mode. > (For instance inserting 10.000 Objects takes about 2500 msecs using = JDBC and > about 5000 msecs using OJB on one of my machines.) >=20 > This sounds bad. But you have to take in account that HDSQL does = everything > in memory and that there is no network overhead involved. >=20 > Now just change the target database (in the repository.xml) to say MS = access > and you will see a totally different picture: > Inserting 10.000 object via JDBC takes 50.000 msecs and 52.500 msecs = using > OJB. >=20 > You see: the absolute OJB overhead remains the same but the factor = OJB/JDBC > decreases enormously. >=20 > Please try this performance test against your target database and tell = us > your exact results. I am almost sure that your results will look quite > similar! >=20 >=20 > On the other hand: There has been a lot of work on OJB internals in = the last > months and it may well be that these refactorings had a negative = performance > impact. This must be carefully checked! > We will need another performance tuning code-walkthrough before we can > release OJB 1.0. >=20 > HTH, >=20 > Thomas >=20 > >=20 > > Thanks in advance! > >=20 > > Ricardo Arguello > >=20 > >=20 > > _______________________________________________ > > Objectbridge-developers mailing list > > Obj...@li... > > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > >=20 > |