I am trying to deploy a .jar file to jboss 3.2.1 and I recieve this error when the ejb is deployed: org.jboss.deployment.DeploymentException: Error while fixing table name;
I have the mysql-ds.xml properly setup. However I got an error from mysql saying "Invalid authorizationn specification: access denied for user"
So I checked the user setup for mysql and the user has full privalages to that table.
I've seen a similar problem all over the net but can't find a response with a solution. Has anyone run into this problem?
Thanks for your time.
-
JBOSS-mysql table creation problem (7 messages)
- Posted by: mark greene
- Posted on: August 11 2003 00:16 EDT
Threaded Messages (7)
- JBOSS-mysql table creation problem by Tim Allen MO on August 11 2003 13:36 EDT
- JBOSS-mysql table creation problem by jason poley on August 11 2003 19:32 EDT
- JBOSS-mysql table creation problem by mark greene on August 11 2003 21:20 EDT
-
JBOSS-mysql table creation problem by Tim Allen MO on August 11 2003 10:52 EDT
-
JBOSS-mysql table creation problem by mark greene on August 12 2003 07:36 EDT
-
JBOSS-mysql table creation problem by jason poley on August 12 2003 07:48 EDT
- JBOSS-mysql table creation problem by mark greene on August 12 2003 09:21 EDT
-
JBOSS-mysql table creation problem by jason poley on August 12 2003 07:48 EDT
-
JBOSS-mysql table creation problem by mark greene on August 12 2003 07:36 EDT
-
JBOSS-mysql table creation problem by Tim Allen MO on August 11 2003 10:52 EDT
- JBOSS-mysql table creation problem by mark greene on August 11 2003 21:20 EDT
-
JBOSS-mysql table creation problem[ Go to top ]
- Posted by: Tim Allen MO
- Posted on: August 11 2003 13:36 EDT
- in response to mark greene
Check if you have set passworf in login-config.xml file in deploy/conf dir -
JBOSS-mysql table creation problem[ Go to top ]
- Posted by: jason poley
- Posted on: August 11 2003 19:32 EDT
- in response to mark greene
tomcat can use md5 for passwords, but jboss doesn't
(to my knowledge)
be sure your passwords are stored properly.
can you post your login-config.xml ? -
JBOSS-mysql table creation problem[ Go to top ]
- Posted by: mark greene
- Posted on: August 11 2003 21:20 EDT
- in response to jason poley
Here's my login-config.xml:
<?xml version='1.0'?>
<!DOCTYPE policy PUBLIC
"-//JBoss//DTD JBOSS Security Config 3.0//EN"
"http://www.jboss.org/j2ee/dtd/security_config.dtd">
<!-- The XML based JAAS login configuration read by the
org.jboss.security.auth.login.XMLLoginConfig mbean. Add
an application-policy element for each security domain.
The outline of the application-policy is:
<application-policy name="security-domain-name">
<authentication>
<login-module code="login.module1.class.name" flag="control_flag">
<module-option name = "option1-name">option1-value</module-option>
<module-option name = "option2-name">option2-value</module-option>
...
</login-module>
<login-module code="login.module2.class.name" flag="control_flag">
...
</login-module>
...
</authentication>
</application-policy>
$Revision: 1.6.2.2 $
-->
<policy>
<!-- Used by clients within the application server VM such as
mbeans and servlets that access EJBs.
-->
<application-policy name = "client-login">
<authentication>
<login-module code = "org.jboss.security.ClientLoginModule"
flag = "required">
</login-module>
</authentication>
</application-policy>
<!-- Security domain for JBossMQ -->
<application-policy name = "jbossmq">
<authentication>
<login-module code = "org.jboss.mq.sm.file.DynamicLoginModule"
flag = "required">
<module-option name = "unauthenticatedIdentity">guest</module-option>
<module-option name = "sm.objectname">jboss.mq:service=StateManager</module-option>
</login-module>
</authentication>
</application-policy>
<!-- Security domains for testing new jca framework -->
<!-- created security ream for mySQL, using HsqlDbRealm as a template -->
<application-policy name = "MySqlRealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required>
<module-option name = "pricipal">jboss</module-option>
<module-option name = "userName">jboss</module-option>
<module-option name = "password">secret</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MySqlDS</module-option>
</login-module>
</authentication>
</application-policy>
<application-policy name = "HsqlDbRealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
flag = "required">
<module-option name = "principal">sa</module-option>
<module-option name = "userName">sa</module-option>
<module-option name = "password"></module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
</login-module>
</authentication>
</application-policy>
<application-policy name = "FirebirdDBRealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
flag = "required">
<module-option name = "principal">sysdba</module-option>
<module-option name = "userName">sysdba</module-option>
<module-option name = "password">masterkey</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=XaTxCM,name=FirebirdDS</module-option>
</login-module>
</authentication>
</application-policy>
<application-policy name = "JmsXARealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
flag = "required">
<module-option name = "principal">guest</module-option>
<module-option name = "userName">guest</module-option>
<module-option name = "password">guest</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=TxCM,name=JmsXA</module-option>
</login-module>
</authentication>
</application-policy>
<!-- A template configuration for the jmx-console web application. This
defaults to the UsersRolesLoginModule the same as other and should be
changed to a stronger authentication mechanism as required.
-->
<application-policy name = "jmx-console">
<authentication>
<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
flag = "required" />
</authentication>
</application-policy>
<!-- A template configuration for the web-console web application. This
defaults to the UsersRolesLoginModule the same as other and should be
changed to a stronger authentication mechanism as required.
-->
<application-policy name = "web-console">
<authentication>
<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
flag = "required" />
</authentication>
</application-policy>
<!-- The default login configuration used by any security domain that
does not have a application-policy entry with a matching name
-->
<application-policy name = "other">
<!-- A simple server login module, which can be used when the number
of users is relatively small. It uses two properties files:
users.properties, which holds users (key) and their password (value).
roles.properties, which holds users (key) and a comma-separated list of
their roles (value).
The unauthenticatedIdentity property defines the name of the principal
that will be used when a null username and password are presented as is
the case for an unuathenticated web client or MDB. If you want to
allow such users to be authenticated add the property, e.g.,
unauthenticatedIdentity="nobody"
-->
<authentication>
<login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
flag = "required" />
</authentication>
</application-policy>
</policy>
-------------------------------------------------------
Here's the error that I'm getting now:
-------------------------------------------------------
Failed to load config: file:/alphadev/servers/jboss-3.2.2/server/default/conf/login-config.xml
org.jboss.security.auth.login.ParseException: Encountered "<?xml" at line 1, column 1.
Was expecting one of:
<EOF>
<IDENTIFIER> ...
at org.jboss.security.auth.login.SunConfigParser.generateParseException(SunConfigParser.java:389)
at org.jboss.security.auth.login.SunConfigParser.jj_consume_token(SunConfigParser.java:327)
...
-----------------------------------------------
Here's my mysql-ds.xml
-----------------------------------------------
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://localhost/db</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>user</user-name>
<password>pass</password>
<security-domain>MySqlRealm</security-domain>
</local-tx-datasource>
I had to actually edit the jbosscmp-jdbc.xml file because eclipse-xdoclet did not generate it correctly. For some reason it skipped over the @jboss tags. If anyone has had any expierence with that i'd appreciate any insight.
Thanks for your time. -
JBOSS-mysql table creation problem[ Go to top ]
- Posted by: Tim Allen MO
- Posted on: August 11 2003 22:52 EDT
- in response to mark greene
Check here and modify accordingly and then let me know if you get any other exception.Hope this helps.
<!-- Security domains for testing new jca framework -->
<!-- created security ream for mySQL, using HsqlDbRealm as a template -->
<application-policy name = "MySqlDbRealm"> <!-- modified this from MySqlRealm -->
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required>
<module-option name = "pricipal">jboss</module-option> <!-- remove jboss as principal -->
<module-option name = "userName">jboss</module-option> <!-- user name and password should match with your mysql-ds.xml and its not matching -->
<module-option name = "password">secret</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MySqlDS</module-option>
</login-module>
</authentication>
</application-policy>
Tim -
JBOSS-mysql table creation problem[ Go to top ]
- Posted by: mark greene
- Posted on: August 12 2003 19:36 EDT
- in response to Tim Allen MO
Well I've actually gotten a couple tables to be created (I ended up using a different mysql database server cause the first one had something wrong with it), however the only ones that do are the ones that have primary key class's. The beans that don't throw a SQLException saying I have an error in my SQL Syntax. Unforuantely it does not produce the SQL it is trying to use. Any ideas as to why JBoss would be giving me crap about this?
Again, thanks for your time. I really appreciate it. -
JBOSS-mysql table creation problem[ Go to top ]
- Posted by: jason poley
- Posted on: August 12 2003 19:48 EDT
- in response to mark greene
Why would you not have a primary key?
read this
http://www.theserverside.com/discussion/thread.jsp?thread_id=4140
HTH
-jp -
JBOSS-mysql table creation problem[ Go to top ]
- Posted by: mark greene
- Posted on: August 12 2003 21:21 EDT
- in response to jason poley
No,I meant the beans that do not have primary key classes throw a SQLException. They use a java data type as a primary key (i.e. Integer).
Sorry for the confussion