-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Excecuting statement to a different database?
PostPosted: Thu Sep 16, 2010 7:30 am 
Newbie

Joined: Tue Oct 06, 2009 1:40 pm
Posts: 10
Hi everyone, I am watching some very strange behavior today:

INFO - rManagerConnectionProvider.configure:103 - using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://10.10.20.141:3306/profile_migration
INFO - rManagerConnectionProvider.configure:109 - connection properties: {user=epuser, password=****, autocommit=true, release_mode=auto}

Now this is correct. Look what happens after a while...

INFO - SessionFactoryImpl .<init>:199 - building session factory
INFO - essionFactoryObjectFactory.addInstance:105 - Not binding factory to JNDI, no JNDI name configured
INFO - SchemaUpdate .execute:155 - Running hbm2ddl schema update
INFO - SchemaUpdate .execute:167 - fetching database metadata
INFO - SchemaUpdate .execute:179 - updating schema
INFO - DatabaseMetadata .getTableMetadata:119 - table not found: ProfileSequenceNumber
INFO - DatabaseMetadata .getTableMetadata:119 - table not found: lcs_countries
[...]
ERROR - SchemaUpdate .execute:212 - Unsuccessful: create table ProfileSequenceNumber (number bigint not null auto_increment, primary key (number)) ENGINE=InnoDB
ERROR - SchemaUpdate .execute:213 - CREATE command denied to user 'epuser'@'10.10.20.56' for table 'ProfileSequenceNumber'
ERROR - SchemaUpdate .execute:212 - Unsuccessful: create table lcs_countries (id bigint not null auto_increment, code varchar(64) not null, status char(1) not null, primary key (id)) ENGINE=InnoDB
ERROR - SchemaUpdate .execute:213 - CREATE command denied to user 'epuser'@'10.10.20.56' for table 'lcs_countries'


Now, where is 10.10.20.56 coming from?
I have debugged, SchemaUpdate line 204 is

stmt.executeUpdate( formatted );

and here is the value in that moment:

stmt.getConnection().getMetaData().getURL()
(java.lang.String) jdbc:mysql://10.10.20.141:3306/profile_migration


I am confused, at least... any suggestion?


Top
 Profile  
 
 Post subject: Re: Excecuting statement to a different database?
PostPosted: Thu Sep 16, 2010 8:13 am 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
Quote:
Now, where is 10.10.20.56 coming from?


It is the ip address of the computer running your program. It seems like 'epuser' is allowed to log-in from this ip address but doesn't have permission to create new tables.


Top
 Profile  
 
 Post subject: Re: Excecuting statement to a different database?
PostPosted: Thu Sep 16, 2010 9:05 am 
Newbie

Joined: Tue Oct 06, 2009 1:40 pm
Posts: 10
nordborg wrote:
Quote:
Now, where is 10.10.20.56 coming from?


It is the ip address of the computer running your program. It seems like 'epuser' is allowed to log-in from this ip address but doesn't have permission to create new tables.


Thanks, in fact I checked and the privileges was not assigned correctly.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.