Mantis - Resin
Viewing Issue Advanced Details
4949 minor always 02-02-12 10:44 02-21-12 17:39
rickHigh  
ferg  
normal  
closed  
fixed  
none    
none 4.0.26  
0004949: Resin did not recognize configuration deployed with config-deploy
I deploy with this command.

$ resinctl config-deploy database-conf/

Deployed production/config/resin from database-conf/ to hmux://127.0.0.1:6800 [^]


I verify deployed config exists as follows:



$ resinctl config-ls

database-conf.xml
mysql-connector-java-5.1.18.jar

$ resinctl config-cat database-conf.xml

<resin xmlns="http://caucho.com/ns/resin" [^]
      xmlns:resin="urn:java:com.caucho.resin">

<database jndi-name="jdbc/blogdb">
        <driver type="com.mysql.jdbc.Driver">
                 <url>jdbc:mysql://localhost:3306/blogdb</url> [^]
                 <user>bloguser</user>
                 <password>roofoo</password>
         </driver>
</database>

</resin>

I get this error at runtime which implies that the deployment did not work.

org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'transactionManager' defined in file [/var/www/webapps/blogjndi/WEB-INF/classes/META-INF/spring/applicationContext.xml]:
Cannot resolve reference to bean 'entityManagerFactory' while setting bean
property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'entityManagerFactory' defined in file [/var/www/webapps/blogjndi/WEB-INF/classes/META-INF/spring/applicationContext.xml]:
Cannot resolve reference to bean 'dataSource' while setting bean property
'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'dataSource': Invocation of init method failed;
nested exception is javax.naming.NameNotFoundException: jdbc/blogdb
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360

Notes
(0005688)
rickHigh   
02-02-12 11:01   
I tried restarting the server, but it is still not reading the file.

Nothing obvious in the logs.
(0005689)
rickHigh   
02-02-12 11:22   
This feature might be turned off unless a license is installed.

I installed a license under $RESIN_HOME/licenses but to no avail.


[12-02-02 11:16:47.123] {resin-shutdown} Shutdown Resin reason: OK
Resin Professional 4.0.25 (built Tue, 24 Jan 2012 04:10:16 PST)
Copyright(c) 1998-2010 Caucho Technology. All rights reserved.

  Resin Professional has not found any valid licenses.
  Licenses belong in /var/www/licenses.
  See http://www.caucho.com/resin/sales [^] for licensing information.

I need to move the license.
(0005690)
rickHigh   
02-02-12 11:26   
Resin Professional has not found any valid licenses.
  Licenses belong in /var/www/licenses.
  See http://www.caucho.com/resin/sales [^] for licensing information.

Expired licenses:
  1013262.license -- version expired 2011-12-28 -- 1 Resin server Caucho

Need to get new license.
(0005691)
rickHigh   
02-02-12 13:04   
I installed a valid license (1013792.license) and the problem persists.
(0005692)
rickHigh   
02-02-12 13:15   
As a debugging step, I tried to copy the lib file to resin-inf, but it did not work...



database-conf.xml:5: com.caucho.sql.DriverConfig.setType(): com.caucho.config.ConfigRuntimeException: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver in EnvironmentClassLoader[resin-system:,NEW]

3:
4: <database jndi-name="jdbc/blogdb">
5: <driver type="com.mysql.jdbc.Driver">
6: <url>jdbc:mysql://localhost:3306/blogdb</url> [^]
7: <user>bloguser</user>

rick@ubuntu:~/examples/blog/database-conf$ ls /etc/resin/resin-inf
database-conf.xml mysql-connector-java-5.1.18.jar
(0005693)
rickHigh   
02-02-12 13:22   
When I add the mysql jar file to /usr/local/share it works.

$ ls /usr/local/share/resin/lib/mysql-connector-java-5.1.18.jar
/usr/local/share/resin/lib/mysql-connector-java-5.1.18.jar
(0005695)
rickHigh   
02-02-12 14:15   
$ pwd
/var/www/resin-data/app-0/config

$ ls
database-conf.xml mysql-connector-java-5.1.18.jar

They are there.

They get ignored.

If I copy them to resin-inf and lib then they get used.
(0005700)
ferg   
02-21-12 17:39   
Belongs in cloud:/app-inf/*