0
votes

I am using Eclipse Juno 4.2.2 and installed Worklight V6.0 Developer Eition through Eclipse Marketplace.

I am Running Worklight V6.0 on Tomcat 7 with Oracle 11G.

For Worklight I created three databases namely WRKLGHT, WLREPORT and APPCNTR and a user for it.

Content of the context.xml

   <Context>
     <Resource auth="Container" 
               driverClassName="oracle.jdbc.driver.OracleDriver" 
               name="jdbc/WorklightDS" 
               password="worklight" 
               type="javax.sql.DataSource" url="jdbc:oracle:thin:@localhost:1521/WRKLGHT"   username="worklight"/>
        <Resource auth="Container" driverClassName="oracle.jdbc.driver.OracleDriver" name="jdbc/WorklightReportsDS" password="worklight" type="javax.sql.DataSource" url="jdbc:oracle:thin:@localhost:1521/WLREPORT" username="worklight"/>
        <Resource auth="Container" driverClassName="oracle.jdbc.driver.OracleDriver" name="jdbc/AppCenterDS" password="worklight" type="javax.sql.DataSource" url="jdbc:oracle:thin:@localhost:1521/APPCNTR" username="worklight"/>
    </Context>

Tomcat's web.xml

    <resource-ref>
      <res-ref-name>jdbc/WorklightDS</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
    </resource-ref>
    <resource-ref>
      <res-ref-name>jdbc/WorklightReportsDS</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
    </resource-ref>

worklight.properties wl.db.type=ORACLE wl.db.url=jdbc:oracle:thin:@localhost:1521:WRKLGHT wl.db.username=worklight wl.db.password=worklight wl.reports.db.url=jdbc:oracle:thin:@localhost:1521:WLREPORT wl.reports.db.username=worklight wl.reports.db.password=worklight reports.exportRawData=true

Also updated the publicWorkLightContext, publicWorkLightPort

Placed worklight-jee.jar on tomcat lib and ojdbc14.jar on claspath of the project.

Then try to deploy the project.war file on tomcat.

I get the following error:

SEVERE: FWLST0003E: ========= Failed starting project /SOMApprovalDemo [project SOMApprovalDemo] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'taskManager' defined in URL [jar:file:/C:/Users/IBM_ADMIN/TemdemoWorkspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/lib/worklight-jee-library-6.0.0.jar!/conf/core.xml]

Any help will be appreciated

1

1 Answers

0
votes

I see in worklight.properties the line: wl.db.type=ORACLEwl.db.url=jdbc:oracle:thin:@localhost:1521:WRKLGHT

there are two lines connected to one. is that a forum post typo ? or is this the real file contnet. should be: wl.db.type=ORACLE
wl.db.url=jdbc:oracle:thin:@localhost:1521:WRKLGHT

and don't forget to the delete the line containing : wl.db.jndi.name=... (you must decide: either you use JNDI or you use JDBC database connection).

2nd issue which is much more important: you abuse here the same server for two different worklight versions (5.0.6 and 6.0.0). Are you sure you downloaded from Eclipse market a Worklight v5.0.6 plugin ? (I suspect you've downloded v6.0) If yes, It can be very confusing and error prone. I strongly recommend you install a separate Tomcat instance for 5.0.6 tests and another for 6.0.0 tests. (Or simply migrate all your old Worklight eclipse projects to work on v6.0.0) Right now you are trying to run a Worklight v5.0.6 using Worklight Studio v6.0.0 on the same Tomcat.