Re: Mysql and JDBC
Re: Mysql and JDBC
- Subject: Re: Mysql and JDBC
- From: Gino Pacitti <email@hidden>
- Date: Sat, 4 Jun 2005 11:19:58 +0100
Hi Sacha
I can connect via msyql -uusername -ppassword at the command line on
the deployment machine and also use select etc.. statements so mysql
recognizes the user, password and database.
This is the index.eomodeld file and as you can see it seems pretty
much ok - yet I get the error - ( see below )
{
EOModelVersion = "2.1";
adaptorName = JDBC;
connectionDictionary = {
URL = "jdbc:mysql://xxx.xxx.xxx.xx/childsafe/";
driver = "org.gjt.mm.mysql.Driver";
password = xxxxx;
plugin = MySQL;
username = xxxx;
};
entities = (
{className = AccountRecord; name = AccountRecord; },
{className = ActiveTimeStamp; name = ActiveTimeStamp; },
{className = Admin; name = Admin; },
{className = Areas; name = Areas; },
{className = AttractionPostcodes; name =
AttractionPostcodes; },
{
className = AttractionPostcodesForBanners;
name = AttractionPostcodesForBanners;
},
{className = AttractionTypes; name = AttractionTypes; },
{className = BannerAD; name = BannerAD; },
{className = Competition; name = Competition; },
{className = CompetitionSpecial; name = CompetitionSpecial; },
{className = Customer; name = Customer; },
{className = CustomerAnswer; name = CustomerAnswer; },
{className = EOGenericRecord; name = Freemagazine; },
{className = FullPrizeDetails; name = FullPrizeDetails; },
{className = EOGenericRecord; name = HitCounter; },
{className = HoldingTable; name = HoldingTable; },
{className = EOGenericRecord; name = HoldingTabless; },
{className = Images; name = Images; },
{className = ListingTypes; name = ListingTypes; },
{className = Lonlat; name = Lonlat; },
{className = Magazine; name = Magazine; },
{className = MediaPackAddress; name = MediaPackAddress; },
{className = MessageTimeStamp; name = MessageTimeStamp; },
{className = OrderPendingCheque; name = OrderPendingCheque; },
{className = Orders; name = Orders; },
{className = PostcodeCoordinates; name =
PostcodeCoordinates; },
{className = Prize; name = Prize; },
{className = Question; name = Question; },
{className = Sitedata; name = Sitedata; },
{className = SpecialEvents; name = SpecialEvents; },
{className = TblCompetition; name = TblCompetition; },
{className = TblCompetitionWinner; name =
TblCompetitionWinner; },
{className = EOGenericRecord; name = TblDuplicateattraction; },
{className = TblJubilee; name = TblJubilee; },
{className = EOGenericRecord; name = TblOnlinesales; },
{className = EOGenericRecord; name = TblTempPassword; },
{className = EOGenericRecord; name = TblTempattraction; },
{className = EOGenericRecord; name = TblTempattractionold; },
{className = WhatsOnNews; name = WhatsOnNews; },
{className = WhatsOnNewsHeading; name = WhatsOnNewsHeading; }
);
internalInfo = {"_deletedEntityNamesInObjectStore" =
(competitiondetails, HoldingTables); };
}
[2005-06-04 11:08:28 BST] <main> An exception occurred while trying
to open a channel: com.webobjects.jdbcadaptor.JDBCAdaptorException:
Server configuration denies access to data source
[2005-06-04 11:08:28 BST] <main> A fatal exception occurred:
_obtainOpenChannel -- com.webobjects.eoaccess.EODatabaseContext
com.webobjects.eoaccess.EODatabaseContext@82600f: failed to open
database channel. Check your connection dictionary, and ensure your
database is correctly configured.
[2005-06-04 11:08:28 BST] <main> java.lang.IllegalStateException:
_obtainOpenChannel -- com.webobjects.eoaccess.EODatabaseContext
com.webobjects.eoaccess.EODatabaseContext@82600f: failed to open
database channel. Check your connection dictionary, and ensure your
database is correctly configured.
at
com.webobjects.eoaccess.EODatabaseContext._obtainOpenChannel
(EODatabaseContext.java:2132)
at
com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecification
EditingContext(EODatabaseContext.java:3205)
Any more ideas?
Has the server got some security measures in place?
Gino
On 3 Jun 2005, at 18:52, Sacha Mallais wrote:
On Jun 3, 2005, at 10:02 AM, Gino Pacitti wrote:
I have a db named correctly with user and password plus I can
connect via commandline to mysql and use the settings,,
Sure seems as though your connection settings are incorrect. Are
you setting them in code, or manually, in EOModeler? If your
connection parameters are set statically in the EO model, then try
connecting directly from EOModeler to your database by hitting the
"Browse Data" button.
If you are setting your connection parameters in code, then trace
through and determine exactly what those parameters are, then put
them into the EOModel and attempt to connect from there.
sacha
PS. I've added this question to a WO FAQ I've been working on:
http://www.global-village.net/gvc.webobjects/faq
It's hardly ready for prime time yet -- there are only a few
questions/answers (and any suggestions for content would be
appreciated -- in fact, anyone that wants add/edit access is
welcome!), but at least it is not years out of date... :-)
[2005-06-03 17:53:11 BST] <main> Creating LifebeatThread now with:
testtt 52961 xserveOne.local/xxx.xxx.xxx.xxx 1085 30000
Welcome to testtt!
DefaultGroup is <EOModelGroup (("childsafe", "file:/Users/g43p/
Sites/WebObjects/testtt.woa/Contents/Resources/childsafe.eomodeld"))>
[2005-06-03 17:53:11 BST] <main> An exception occurred while
trying to open a channel:
com.webobjects.jdbcadaptor.JDBCAdaptorException: Unable to connect
to any hosts due to exception:
java.lang.ArrayIndexOutOfBoundsException: 45
[2005-06-03 17:53:11 BST] <main> A fatal exception occurred:
_obtainOpenChannel -- com.webobjects.eoaccess.EODatabaseContext
com.webobjects.eoaccess.EODatabaseContext@e4605c: failed to open
database channel. Check your connection dictionary, and ensure
your database is correctly configured.
[2005-06-03 17:53:11 BST] <main> java.lang.IllegalStateException:
_obtainOpenChannel -- com.webobjects.eoaccess.EODatabaseContext
com.webobjects.eoaccess.EODatabaseContext@e4605c: failed to open
database channel. Check your connection dictionary, and ensure
your database is correctly configured.
at
com.webobjects.eoaccess.EODatabaseContext._obtainOpenChannel
(EODatabaseContext.java:2132)
at
com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecificat
ionEditingContext(EODatabaseContext.java:3205)
at
com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecificati
on(EODatabaseContext.java:3347)
at
com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpe
cification(EOObjectStoreCoordinator.java:539)
at
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecificati
on(EOEditingContext.java:4075)
at
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecificati
on(EOEditingContext.java:4461)
Any help would surely help enormously
GIno
_______________________________________________
WebObjects-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/webobjects-dev
_______________________________________________
WebObjects-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/webobjects-dev
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden