0

Migrating my project(made up of 3 apps and 2 adapters) from Worklight v6.0 to Worklight v6.1 i'm facing problems over adapters migration.

I had already deployed .war, .wlapp and .adapter files in production environment using an Ant script(for .war file). The application server used is Websphere, the dbms server used is Derby.

I upgraded the worklight studio's plugin to the latest version, created a new, clean workspace, exported the project from the old workspace and imported in the new one.

For what concerns development environment everything works.

For what concerns production environment i successfully deployed all the applications(but don't work yet becouse the adapters lack). When i try to deploy the adapter(each one) i get the following exception:

Failed to deploy adapter 'adapter1.adapter'. The 'adapter' version '6.0.0' is different than the version of the Worklight project '6.1.0.00.20131219-1900'. Use Worklight Studio '6.1.0.00.20131219-1900' to build and deploy the application.

I tried also to create a new adapter and deploy it but i'm still getting the same error.

Riccardo
  • 1,490
  • 2
  • 12
  • 22
  • When you've imported the project into the 6.1.0 studio, there were no errors in the Eclipse console view? What about the Errors view? – Idan Adar Jan 07 '14 at 19:27
  • What about when creating a new project and in it a new adapter, does this work? – Idan Adar Jan 07 '14 at 19:30
  • Can you reproduce this in a test case application and send it over? – Idan Adar Jan 07 '14 at 19:31
  • check weather your update has been finished and check weather your worklight Studio plugin updated to 6.1 – Kawinesh S K Jan 08 '14 at 07:45
  • the project was imported into the 6.1.0 studio with no errors – Riccardo Jan 08 '14 at 07:48
  • i tried to create a new project with a simple adapter but still doesn't work. the exception launched is the same. – Riccardo Jan 08 '14 at 07:49
  • i created a simple project and a simple adapter, how can i send it to you @IdanAdar? – Riccardo Jan 08 '14 at 07:50
  • @KawineshSK the update has been finished successfully, i can deploy only applications but not adapters. – Riccardo Jan 08 '14 at 07:51
  • @Riccardo, Upload to Dropbox and provide download link. – Idan Adar Jan 08 '14 at 08:10
  • i've got the same issue, and many errors in my server's log: [1/8/14 9:27:41:898 CET] 00000029 com.worklight.gadgets.serving.InvokeProcServlet E FWLSE0074E: Failed synchronizing adapters from database. [project IDVS] – ptitjuju69 Jan 08 '14 at 08:28
  • Thanks, but what would help is reproduction steps of what you do in 6.0 and then in 6.1 – Idan Adar Jan 08 '14 at 10:14
  • @IdanAdar https://www.dropbox.com/s/ykjxyiw0o2to2pe/exporthttpAdapter.zip it's a simple test adapter. – Riccardo Jan 08 '14 at 11:13
  • And the reproduction steps? import to Eclipse with WL 6.0.0.0, build and deploy app and adapter, export, import to Eclipse with 6.1.0.0, build and deploy? – Idan Adar Jan 08 '14 at 11:45
  • The steps i did are the following: import to Eclipse with WL 6.1.0.0, Deploy Worklight Adapter, from the Worklight server console choose the .adapter file from the bin directory and upload. I uploaded in dropbox the compiled file too(https://www.dropbox.com/s/lpprf1bevef2u3p/httpAdapter.adapter) – Riccardo Jan 08 '14 at 11:51
  • what do you mean exactly for building the adapter? is there a specific procedure? – Riccardo Jan 08 '14 at 11:57
  • Don't be cheap please :) export your entire test project from Eclipse, the Worklight project... not just a zip containing the adapter files. – Idan Adar Jan 08 '14 at 11:58
  • https://www.dropbox.com/s/hdobmkrodh2bphy/exportContoContabile.zip – Riccardo Jan 08 '14 at 12:08

1 Answers1

1

Edited the answer entirely based on edits to the question

All artifacts produced by Worklight Studio: .adapter, .wlapp and .war must be generated using the same Worklight Studio version.

Make sure that after importing the project to Worklight 6.1, that you are building all the the project's applications and adapters.

Next, you need to deploy the re-generated .war file and then deploy the .wlapp and .adapter files.

To verify that the adapter is of the same version as the project's .war file, extract the .adapter file from the bin folder and open the XML file. You should see the platform version like this:

<ns2:adapter xmlns:ns2="http://www.worklight.com/integration"
name="test" platformVersion="6.1.0.00.20131126-0630">

IBM Worklight Information Center topics to read:

You can also see this in Worklight Console > About > Additional Support Information:

enter image description here

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
  • do you have any specific configuration applied to the adapter deployment? it looks like that the weird behaviour i get is due to the Eclipse configuration. – Riccardo Jan 08 '14 at 12:15
  • None. It's just Eclipse Java EE 4.2.2 ("Juno" SR2) with Worklight Studio Developer Edition and Google ADT plug-in. – Idan Adar Jan 08 '14 at 12:17
  • to deploy the .war project file did you use Ant after customizing the configure-liberty-derby.xml configuration file? – Riccardo Jan 08 '14 at 12:21
  • What? What ever for? We are talking here about 2 Eclipse instances, each with a Worklight Studio plug-in... you just import your exported Worklight project and that's it. What are you not telling me? What else is there in your project? Is this whole question in fact not about Development environment but Production (in other words, not about Eclipse at all...)? – Idan Adar Jan 08 '14 at 12:28
  • yes, i'm talking about production environment, apps and adapters works on development environment for me also. I have the problems i described on the production environment. the only thing i added is the production server settings(right click on any app -> Build Setting and deployment target) – Riccardo Jan 08 '14 at 12:55
  • Edit your question to properly convey what you are doing. That is, mention that after importing and building your project in 6.1, you then proceed to deploy these artifacts (your .adapter, .wlapp and .war files) to your Production environment. How can you not mention such an important detail? There is no Studio in a production environment, there is an application serer (WAS, Tomcat), that you deploy your artifacts to the installed Worklight Server on that application server. – Idan Adar Jan 08 '14 at 12:58
  • The only thing comes to mind is that you did not deploy your WAR file to the production server, meaning it is still using the old one and this is why it does not recognize the adapter. – Idan Adar Jan 08 '14 at 13:02
  • ok i just edited my question. tried to deploy it again several times but still doesn't work. – Riccardo Jan 08 '14 at 13:08
  • Edited my answer as well. – Idan Adar Jan 08 '14 at 13:11
  • is there any way to figure out the version number directly on the .war, .adapter and .wlapp files? – Riccardo Jan 08 '14 at 13:18
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/44797/discussion-between-riccardo-and-idan-adar) – Riccardo Jan 08 '14 at 16:12
  • You must make sure that you have deployed the updated .war file to the production server; you get this error because something in your production server did not update. – Idan Adar Jan 09 '14 at 03:19