Topic
  • 6 replies
  • Latest Post - ‏2012-11-28T19:56:03Z by Jarabek
jacquesrage
jacquesrage
11 Posts

Pinned topic Problem Worklight server tomcat 7 and derby

‏2012-11-27T15:52:01Z |
hi,
i have followed the admin guide to setup worklight.properties, create derby databases, copy derby.jar and worklight-jee-library.jar in tomcat/lib but starting worklight application in tomcat manager give :

2012-11-27 16:33:00,962 INFO  [JeeProjectActivator] (http-bio-8080-exec-6:) Worklight home folder is /opt/IBM/apache-tomcat-7.0.33/worklight.home/worklight 2012-11-27 16:33:01,332 ERROR [WorklightDataSource] (http-bio-8080-exec-6:) ERROR: Could not connect to database. Cannot create JDBC driver of 

class 
'org.apache.derby.jdbc.EmbeddedDriver' 

for connect URL 
'/opt/IBM/WRKLGHT' 2012-11-27 16:33:01,333 ERROR [JeeProjectActivator] (http-bio-8080-exec-6:) ========= Failed starting project /worklight org.springframework.beans.factory.BeanCreationException: Error creating bean with name 
'txManager' defined in URL [jar:file:/opt/IBM/apache-tomcat-7.0.33/lib/worklight-jee-library.jar!/conf/core.xml]: Cannot resolve reference to bean 
'brokerSessionFactory' 

while setting bean property 
'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 
'brokerSessionFactory' defined in URL [jar:file:/opt/IBM/apache-tomcat-7.0.33/lib/worklight-jee-library.jar!/conf/spring-server-core.xml]: Cannot resolve reference to bean 
'rssBrokerDS' 

while setting bean property 
'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 
'rssBrokerDS' defined in URL [jar:file:/opt/IBM/apache-tomcat-7.0.33/lib/worklight-jee-library.jar!/conf/spring-server-core.xml]: Cannot resolve reference to bean 
'worklight-direct' 

while setting bean property 
'targetDataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 
'worklight-direct' defined in URL [jar:file:/opt/IBM/apache-tomcat-7.0.33/lib/worklight-jee-library.jar!/conf/spring-server-core.xml]: Invocation of init method failed; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of 

class 
'org.apache.derby.jdbc.EmbeddedDriver' 

for connect URL 
'/opt/IBM/WRKLGHT'


thanks
  • slowhand
    slowhand
    35 Posts

    Re: Problem Worklight server tomcat 7 and derby

    ‏2012-11-27T16:32:50Z  
    > connect URL '/opt/IBM/WRKLGHT'

    I believe the correct database URL should be 'jdbc:derby:/opt/IBM/WRKLGHT'.

    --slowhand
  • jacquesrage
    jacquesrage
    11 Posts

    Re: Problem Worklight server tomcat 7 and derby

    ‏2012-11-27T17:09:37Z  
    • slowhand
    • ‏2012-11-27T16:32:50Z
    > connect URL '/opt/IBM/WRKLGHT'

    I believe the correct database URL should be 'jdbc:derby:/opt/IBM/WRKLGHT'.

    --slowhand
    thanks it help to suppress that error. the guide wasn't exactly right.
    there's an other one :
    org.springframework.beans.MethodInvocationException:
    Property 'dbType' threw exception; nested exception is java.lang.IllegalArgumentException:
    No enum const class com.worklight.server.database.api.DBType.derby
  • SystemAdmin
    SystemAdmin
    300 Posts

    Re: Problem Worklight server tomcat 7 and derby

    ‏2012-11-27T17:39:17Z  
    thanks it help to suppress that error. the guide wasn't exactly right.
    there's an other one :
    org.springframework.beans.MethodInvocationException:
    Property 'dbType' threw exception; nested exception is java.lang.IllegalArgumentException:
    No enum const class com.worklight.server.database.api.DBType.derby
    What do you have for the value of wl.db.type= ? Is it DERBY in all caps, or is it lower case?
  • SystemAdmin
    SystemAdmin
    300 Posts

    Re: Problem Worklight server tomcat 7 and derby

    ‏2012-11-27T17:39:46Z  
    thanks it help to suppress that error. the guide wasn't exactly right.
    there's an other one :
    org.springframework.beans.MethodInvocationException:
    Property 'dbType' threw exception; nested exception is java.lang.IllegalArgumentException:
    No enum const class com.worklight.server.database.api.DBType.derby
    I will open a defect to clarify that the value is not simply the path in that section.
  • jacquesrage
    jacquesrage
    11 Posts

    Re: Problem Worklight server tomcat 7 and derby

    ‏2012-11-28T09:31:34Z  
    I will open a defect to clarify that the value is not simply the path in that section.
    hi,
    ok i have modified wl.db.type from derby to DERBY and now it works.
    Here's my worklight.properties for the jdbc connection with derby :

    wl.db.type=DERBY
    wl.db.url=jdbc:derby:/opt/IBM/WRKLGHT
    wl.db.username=worklight
    wl.db.password=worklight
    wl.reports.db.type=DERBY
    wl.reports.db.url=jdbc:derby:/opt/IBM/WLREPORT

    thanks
  • Jarabek
    Jarabek
    1 Post

    Re: Problem Worklight server tomcat 7 and derby

    ‏2012-11-28T19:56:03Z  
    I also had this error. Be sure that you eliminate any trailing spaces at the end of each line of the worklight.properties file. I copied the config from the Worklight Admin PDF, and it included a trailing space, which caused the same error message as below.