-
1. Re: MySQL strange hostname problem
prabhat.jha Jun 12, 2008 7:29 PM (in response to michaelchan)First, you should only have portal-mysql-ds.xml (or whatever name you give it as long as it's named like *-dx.xml). You can leave hsqldb-ds.xml untouched. I would suggest you double check this file or you can paste the contents here.
-
2. Re: MySQL strange hostname problem
michaelchan Jun 12, 2008 7:32 PM (in response to michaelchan)"prabhat.jha@jboss.com" wrote:
First, you should only have portal-mysql-ds.xml (or whatever name you give it as long as it's named like *-dx.xml). You can leave hsqldb-ds.xml untouched. I would suggest you double check this file or you can paste the contents here.
content of portal-mysql-ds.xml:
<?xml version="1.0" encoding="UTF-8"?>
<local-tx-datasource>
<jndi-name>PortalDS</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/jbossportal?useServerPrepStmts=fals</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>jbossportal</user-name>
jboss
</local-tx-datasource> -
3. Re: MySQL strange hostname problem
michaelchan Jun 12, 2008 7:33 PM (in response to michaelchan)<?xml version="1.0" encoding="UTF-8"?>
<local-tx-datasource>
<jndi-name>PortalDS</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/jbossportal?useServerPrepStmts=false</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>jbossportal</user-name>
jboss
</local-tx-datasource>
The correct one -
4. Re: MySQL strange hostname problem
michaelchan Jun 12, 2008 7:46 PM (in response to michaelchan)This is getting even stranger now, look at the following error:
Reason: org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Access denied for user 'jbossportal'@'1777777777767777767400 database 'jbossportal'); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Access denied for user 'jbossportal'@'0 database 'jbossportal'))
How come jboss append those 0 and 17777.... ???? -
5. Re: MySQL strange hostname problem
prabhat.jha Jun 12, 2008 8:04 PM (in response to michaelchan)I use mysql and jboss portal all the time and I have never seen this before. Let's see if other community members can point out something.
-
6. Re: MySQL strange hostname problem
peterj Jun 13, 2008 11:27 AM (in response to michaelchan)What OS are you running? Linux? If so, post the /etc/hosts file.
Also, are you using the -b option to start JBossAS?
Also, did you create a database named 'jbossportal' and a user name jbossportal with password jboss?
Finally, when posting XML text, embed it within [ code ] brackets (select the text and click on the Code button). -
7. Re: MySQL strange hostname problem
michaelchan Jun 13, 2008 12:38 PM (in response to michaelchan)Thanks for your reply.
You remind me of checking the hosts file.
It turns out that there are some strange things in the hosts file. I removed em and jBoss portal is now working
Thanks again