Skip to content
This repository has been archived by the owner on Jan 30, 2019. It is now read-only.

JDBCRealm does not recognized DataSource #15

Open
glassfishrobot opened this issue Oct 30, 2013 · 2 comments
Open

JDBCRealm does not recognized DataSource #15

glassfishrobot opened this issue Oct 30, 2013 · 2 comments

Comments

@glassfishrobot
Copy link
Contributor

When calling the 'deploy' goal using the below plugin configuration a new domain is created with a DataSource and the application is deployed. I can successfully ping the DataSource in the console and I can access data from the database on unsecured pages. However, if I try to use the JDBC realm which uses this DataSource I always get an invalid login. In the console if I manually delete the JDBC Resource and add it again the login works. When doing a compare on the working domain.xml and non working domain.xml this line is missing from the non working one:

If I manually add this line and restart the domain it works. Below is my configuration. Please email or respond to this issue if you need any more details.

Plugin Configuration:

org.glassfish.maven.plugin maven-glassfish-plugin 2.1 C:/glassfish-3.1.2.2/glassfish admin C:/glassfish-3.1.2.2/password.txt true true true true domain1 8080 4848 true $

{basedir}

/src/main/setup/glassfish-resources.xml


jdbcRealm
com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm


jaas-context
jdbcRealm


password-column
PASSWORD


datasource-jndi
jdbcExample


group-table
ROLE


user-table
T_USER


group-name-column
ROLE_ID


group-table-user-name-column
USERNAME


digest-algorithm
MD5


user-name-column
USERNAME


assign-groups
ADMIN,USER


digestrealm-password-enc-algorithm
MD5


charset
UTF-8

$

{project.artifactId}

$

{project.build.directory}

/$

{project.build.finalName}

.ear



glassfish-resources.xml

#### Environment Windows 7 / JDK 1.7 / Glassfish-3.1.2.2 / Plugin version 2.1 #### Affected Versions [current]
@glassfishrobot
Copy link
Contributor Author

Reported by ccaspanello

@glassfishrobot
Copy link
Contributor Author

This issue was imported from java.net JIRA MAVEN_GLASSFISH_PLUGIN-15

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant