0 Replies Latest reply on Jan 26, 2009 2:26 AM by joepwro.joepwro.gmail.com

    Looking for hibernate-oracle config files that work

    joepwro.joepwro.gmail.com
      I am using Seam 2.1.1 GA with Hibernate. I can connect to MySQL just fine, but when I switch to Oracle 10g, I get the following exception inside my authentication method:

      javax.security.auth.login.LoginException: Login Failure: all modules ignored
              at javax.security.auth.login.LoginContext.invoke(LoginContext.java:921)
              at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
              at javax.security.auth.login.LoginContext$5.run(LoginContext.java:706)


      My components.xml and persistence.xml are below. If you have hibernate working with Oracle, can you post your config files please.

      components.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <components xmlns="http://jboss.com/products/seam/components"
                  xmlns:core="http://jboss.com/products/seam/core"
                  xmlns:persistence="http://jboss.com/products/seam/persistence"
                  xmlns:drools="http://jboss.com/products/seam/drools"
                  xmlns:bpm="http://jboss.com/products/seam/bpm"
                  xmlns:security="http://jboss.com/products/seam/security"
                  xmlns:mail="http://jboss.com/products/seam/mail"
                  xmlns:ui="http://jboss.com/products/seam/ui"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xmlns:navigation="http://jboss.com/products/seam/navigation"
                  xmlns:transaction="http://jboss.com/products/seam/transaction"
                  xsi:schemaLocation=
                      "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.1.xsd
                       http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.1.xsd
                       http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.1.xsd
                       http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.1.xsd
                       http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.1.xsd
                       http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.1.xsd
                       http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.1.xsd">

         <navigation:pages http-port="8080" https-port="8443" />
        
         <core:init jndi-pattern="jlmo/#{ejbName}/local" debug="true"/>
          
         <core:manager concurrent-request-timeout="500"
                       conversation-timeout="3600000"
                       conversation-id-parameter="cid"
                       parent-conversation-id-parameter="pid"/>
         
         <transaction:ejb-transaction/>
         <persistence:entity-manager-factory name="jlmoFactory" persistence-unit-name="jlmoDatabase"/>
         <persistence:managed-persistence-context name="entityManager" auto-create="true"
                                 entity-manager-factory="#{jlmoFactory}"/>
        
         <security:rule-based-permission-resolver security-rules="#{securityRules}"/>

         <drools:rule-base name="securityRules">
            <drools:rule-files>
               <value>/security.drl</value>
            </drools:rule-files>
         </drools:rule-base>
        
         <security:identity authenticate-method="#{authenticator.authenticate}" remember-me="true"/>
              <security:identity-manager identity-store="#{jpaIdentityStore}"
                      role-identity-store="#{jpaIdentityStore}" />
              <security:jpa-identity-store
                      user-class="com.exeloncorp.nuclear.jlmo.User"
                      role-class="com.exeloncorp.nuclear.jlmo.Role" />
              <security:jpa-permission-store
                      user-permission-class="com.exeloncorp.nuclear.jlmo.AccountPermission" />
        
          <ui:entity-converter name="entityConverter"
                               scope="CONVERSATION" precedence="20" entity-loader="#{regularEntityLoader}"/>
          <ui:jpa-entity-loader name="regularEntityLoader" entity-manager="#{entityManager}"/>

         <event type="org.jboss.seam.security.notLoggedIn">
            <action execute="#{redirect.captureCurrentView}"/>
            <action execute="#{identity.tryLogin}"/>
         </event>
         <event type="org.jboss.seam.security.loginSuccessful">
            <action execute="#{redirect.returnToCapturedView}"/>
         </event>
         <event type="org.jboss.seam.security.loggedOut">
            <action execute="#{authenticator.logOut}"/>
         </event>
        
         <mail:mail-session host="localhost" port="2525" username="test" password="test" />
             
          <bpm:jbpm>
              <bpm:process-definitions>
                  <value>ticketManagement.jpdl.xml</value>
              </bpm:process-definitions>
          </bpm:jbpm>
           
      </components>

      persistence.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <!-- Persistence deployment descriptor for dev profile -->
      <persistence xmlns="http://java.sun.com/xml/ns/persistence"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
                   version="1.0">
                  
         <persistence-unit name="jlmoDatabase" transaction-type="JTA">
            <provider>org.hibernate.ejb.HibernatePersistence</provider>
            <jta-data-source>java:jlmoDatasource</jta-data-source>
            <properties>
              <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
                      <property name="hibernate.cache.provider_class"
                                value="org.hibernate.cache.HashtableCacheProvider"/>
                      <property name="hibernate.transaction.manager_lookup_class"
                        value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
               <property name="hibernate.hbm2ddl.auto" value="update"/>
               <property name="hibernate.show_sql" value="true"/>
               <property name="hibernate.format_sql" value="true"/>
              
               <!-- based on internet searches -->
               <property name="hibernate.default_schema" value="lmo_data"/>
              
            </properties>
         </persistence-unit>

      </persistence>