problem authenticating using Jboss 3 RC1
kometen Apr 16, 2002 7:55 AMHi.
I've used Jboss 3 beta (cvs-version from March) for quite a long time. Was able to deploy a bean and insert records in postgresql.
When I downloadet RC1 my Postgresql-connection suddenly died. Resolved the issue by grabbing a new/changed postgres-service.xml from http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/jbosscx/src/etc/example-config/ as suggested by the link http://main.jboss.org/thread.jsp?forum=46&thread=12589.
This registrered my datasource. But I can't deploy a bean. The error I get is (part of err.message removed):
Deploying PostCodeTbl
Failed to load users/passwords/role files
Properties file users.properties not found
So I add the missing users.properties-file in the conf-dir. get Jboss up and running. Then it tells me about a missing roles.properties which I also add. Adding the two properties-files finally gives me this error (parts of err.message removed):
Deploying PostCodeTbl
Exception in service lifecyle operation: create
java.lang.SecurityException: Invalid authentication attempt, principal=null
The question is: How can I (for the time being) bypass the username/password-issue that I'm presented with, so I can go on developing my app? Or add the necessary entries in the various files so I can deploy my bean?
Basically I'm using the user claus which is a unix-user (FreeBSD) and a postgresql-user which created the table I'd like to access.
I'd like to be able to track down the changes I have to make in order to make this work, but I've spent six hours just to change/add/edit the properties-files and my postgres-service.xml-file to no avail.
The postgres-service.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<!--make the rar deploy! hack till better deployment-->
jboss.jca:service=RARDeployer
<depends optional-attribute-name="ManagedConnectionFactoryName">
<!--hack-->
<depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter
<!--real attributes-->
<config-property>
<config-property-name>ConnectionURL</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>jdbc:postgresql://localhost/profadb</config-property-value>
</config-property>
<config-property>
<config-property-name>DriverClass</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>org.postgresql.Driver</config-property-value>
</config-property>
<config-property>
<config-property-name>UserName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>claus</config-property-value>
</config-property>
<config-property>
<config-property-name>Password</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>myPwd</config-property-value>
</config-property>
profaDS
<depends optional-attribute-name="ManagedConnectionPool">
<!--embedded mbean-->
0
50
5000
15
<!--criteria indicates if Subject (from security domain) or app supplied
parameters (such as from getConnection(user, pw)) are used to distinguish
connections in the pool. Choices are
ByContainerAndApplication (use both),
ByContainer (use Subject),
ByApplication (use app supplied params only),
ByNothing (all connections are equivalent, usually if adapter supports
reauthentication)-->
ByContainer
<depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager
java:/jaas/PostgresDbRealm
java:/TransactionManager
users.properties:
claus=
roles.properties:
claus=everyone
I tried to add the password I'm using to gain access to the postgresql-db, but this didn't change my current situation.
There is also a file called auth.conf, which I believe is the place to add my entries, but I'm uncertain of which.
Using RC1/cvs from April 14'th, FreeBSD 4.5 (stable), linux-jdk13, postgresql 7.2.1.
regards
Claus