javaee / glassfish-maven-plugin-legacy

Other
1 stars 5 forks source link

JDBCRealm does not recognized DataSource #15

Open glassfishrobot opened 10 years ago

glassfishrobot commented 10 years ago

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 commented 10 years ago

Reported by ccaspanello

glassfishrobot commented 7 years ago

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