title: Error deploying Grails 2.0.4 to Glassfish 3.1.2 Server
body: <p>I am using Spring Security Core 1.2.7.3 plugin and am getting this error when trying to deploy:</p>
  
  <pre><code>Error occurred during deployment: Exception while loading the app : 
  java.lang.IllegalStateException: ContainerBase.addChild: start: 
  org.apache.catalina.LifecycleException: 
  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 
  'transactionManagerPostProcessor': Initialization of bean failed; nested exception
   is     org.springframework.beans.factory.BeanCreationException: Error creating bean 
  with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while
  setting bean property 'sessionFactory'; nested exception is 
  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 
  'sessionFactory': Cannot resolve reference to bean 'hibernateProperties' while setting 
  bean property 'hibernateProperties'; nested exception is 
  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 
  'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while    
  setting 
  bean property 'propertie .... msg.seeServerLog 
  </code></pre>
  
  <p>The application works fine when I run it from inside netbeans, but when I try to deploy it I am getting the error. I have tried cleaning, and uncommenting the <code>'mysql:mysql-connector-java:5.1.16'</code> code in the dependencies in the BuildConfig.groovy file. I am using an Oracle jdbc driver which I have installed inside my /lib folder. </p>
  
  <p>I am guessing that this has something to do with the Oracle jdbc driver not being found. </p>
  
  <p>update: I have added my production closure below</p>
  
  <pre><code>production {
      dataSource {
          url = "jdbc:oracle:thin:@MYSERVERNAME.com:xxxx:xxxxxxx"
          pooled = true
          properties {
             maxActive = -1
             minEvictableIdleTimeMillis=1800000
             timeBetweenEvictionRunsMillis=1800000
             numTestsPerEvictionRun=3
             testOnBorrow=true
             testWhileIdle=true
             testOnReturn=true
             validationQuery="SELECT 1"
          }
      }
  }
  </code></pre>