Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » WAR not working if built with Tycho
WAR not working if built with Tycho [message #1779926] Mon, 15 January 2018 19:42 Go to next message
Chris Merg is currently offline Chris MergFriend
Messages: 12
Registered: January 2018
Junior Member
Hi everybody,

I'm currently switching to Tycho as in this example and face a problem when deploying my generated war file.
I just get 404 Error when opening the url even though I use the correct url.

I got the exactly same start levels in my .product file like in my .launch file (except java.servlet ofc) but when launching the app from eclipse everything works fine.
The only difference is that I got my app itself included in the launch config as plugin and in start levels but I can't add it to the .product file cuz my maven build fails with this error:

[ERROR] Cannot resolve dependencies of product bitnet.product:
[ERROR]   eclipse-plugin artifact with ID "BitNet" and version matching "0.0.0" was not found in the target platform


When removing my app from the launch options I also get 404 Error when launching from eclipse.


Here is the output from osgi ss command:

"Framework is launched."


id	State       Bundle
0	ACTIVE      org.eclipse.osgi_3.12.50.v20170928-1321
	            Fragments=1
1	RESOLVED    org.eclipse.equinox.servletbridge.extensionbundle_1.3.0
	            Master=0
2	ACTIVE      Core_1.0.0.20180115-1859
3	ACTIVE      com.ibm.icu.base_58.2.0.v20170418-1837
4	ACTIVE      javax.xml_1.3.4.v201005080400
5	ACTIVE      org.apache.commons.fileupload_1.3.2.v20170320-2229
6	ACTIVE      org.apache.commons.io_2.2.0.v201405211200
7	ACTIVE      org.apache.felix.gogo.command_0.10.0.v201209301215
8	ACTIVE      org.apache.felix.gogo.runtime_0.10.0.v201209301036
9	ACTIVE      org.apache.felix.gogo.shell_0.10.0.v201212101605
10	ACTIVE      org.apache.felix.scr_2.0.10.v20170501-2007
11	ACTIVE      org.eclipse.core.commands_3.9.0.v20170530-1048
12	ACTIVE      org.eclipse.core.contenttype_3.6.0.v20170207-1037
13	ACTIVE      org.eclipse.core.databinding_1.6.100.v20170515-1119
14	ACTIVE      org.eclipse.core.databinding.beans_1.4.0.v20170210-0856
15	ACTIVE      org.eclipse.core.databinding.observable_1.6.100.v20170515-1119
16	ACTIVE      org.eclipse.core.databinding.property_1.6.100.v20170515-1119
17	ACTIVE      org.eclipse.core.expressions_3.6.0.v20170207-1037
18	ACTIVE      org.eclipse.core.jobs_3.9.2.v20171030-1027
19	ACTIVE      org.eclipse.core.runtime_3.13.0.v20170207-1030
20	ACTIVE      org.eclipse.equinox.app_1.3.400.v20150715-1528
21	ACTIVE      org.eclipse.equinox.cm_1.2.0.v20170105-1446
22	ACTIVE      org.eclipse.equinox.common_3.9.0.v20170207-1454
23	ACTIVE      org.eclipse.equinox.console_1.1.300.v20170512-2111
24	ACTIVE      org.eclipse.equinox.event_1.4.0.v20170105-1446
25	ACTIVE      org.eclipse.equinox.http.registry_1.1.400.v20150715-1528
26	ACTIVE      org.eclipse.equinox.http.servlet_1.4.0.v20170524-1452
27	ACTIVE      org.eclipse.equinox.http.servletbridge_1.0.300.v20130327-1442
28	RESOLVED    org.eclipse.equinox.launcher_1.4.0.v20161219-1356
	            Fragments=29
29	RESOLVED    org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.551.v20171108-1834
	            Master=28
30	ACTIVE      org.eclipse.equinox.preferences_3.7.0.v20170126-2132
31	ACTIVE      org.eclipse.equinox.registry_3.7.0.v20170222-1344
32	ACTIVE      org.eclipse.equinox.servletbridge_1.3.200.v20160128-1435
33	ACTIVE      org.eclipse.help_3.8.1.v20170815-1448
34	ACTIVE      org.eclipse.jdt.junit.runtime_3.4.651.v20171130-0906
35	ACTIVE      org.eclipse.osgi.services_3.6.0.v20170228-1906
36	ACTIVE      org.eclipse.osgi.util_3.4.0.v20170111-1608
37	ACTIVE      org.eclipse.rap.filedialog_3.4.0.20171017-0945
38	ACTIVE      org.eclipse.rap.fileupload_3.4.0.20171017-0945
39	ACTIVE      org.eclipse.rap.jface_3.4.0.20171018-1122
40	ACTIVE      org.eclipse.rap.jface.databinding_3.4.0.20171017-0945
41	ACTIVE      org.eclipse.rap.nebula.jface.gridviewer_3.4.0.20171017-0945
42	ACTIVE      org.eclipse.rap.nebula.widgets.grid_3.4.0.20171020-1239
43	ACTIVE      org.eclipse.rap.rwt_3.4.0.20171130-0837
44	ACTIVE      org.eclipse.rap.rwt.osgi_3.4.0.20171017-0945
45	ACTIVE      org.hamcrest.core_1.3.0.v201303031735
46	ACTIVE      org.junit_4.12.0.v201504281640


Thanks for any hints!
Chris

[Updated on: Tue, 16 January 2018 22:33]

Report message to a moderator

Re: WAR not working if built with Tycho [message #1779954 is a reply to message #1779926] Tue, 16 January 2018 08:04 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
the first remark is that you don't need "org.junit", "org.hamcrest.core" and "org.eclipse.jdt.junit.runtime" in your war file. Also you app bundle is not listed at all in the osgi console?!?
Please note that if your app entry point is bound to path "foo" and the war file is named "bar.war" after deploying it your app will be accessible from
http://server:port/bar/foo
The name if the war file is used as app context path.

HTH,
Ivan
Re: WAR not working if built with Tycho [message #1780004 is a reply to message #1779954] Tue, 16 January 2018 13:16 Go to previous messageGo to next message
Chris Merg is currently offline Chris MergFriend
Messages: 12
Registered: January 2018
Junior Member
Thanks for your quick answer!
I removed the bundles you listed above but this makes no difference. I posted all I get from the OSGI console when typing ss. To get the osgi console working I needed to connect to it with telnet localhost 54321 after putting -console 54321 into the web.xml.
Re: WAR not working if built with Tycho [message #1780007 is a reply to message #1780004] Tue, 16 January 2018 13:49 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
Please make sure that your app bundle is included in the "product" file. How do you try to access the app, what URL? Please post your application configuration - entry point to path mapping?

P.S. Is this your app: Core_1.0.0.20180115-1859?

HTH,
Ivan

[Updated on: Tue, 16 January 2018 13:53]

Report message to a moderator

Re: WAR not working if built with Tycho [message #1780009 is a reply to message #1780007] Tue, 16 January 2018 14:07 Go to previous messageGo to next message
Chris Merg is currently offline Chris MergFriend
Messages: 12
Registered: January 2018
Junior Member
Hi,
Where do I put my app bundle inside the product file? This is my product file:

<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>

<product name="BitNet" uid="bitnet.product" version="1.0.0.qualifier" useFeatures="false" includeLaunchers="false">


   <configIni use="default">
   </configIni>

   <launcherArgs>
   </launcherArgs>

   <plugins>
      <plugin id="Core"/>
      <plugin id="com.ibm.icu.base"/>
      <plugin id="javax.xml"/>
      <plugin id="org.apache.commons.fileupload"/>
      <plugin id="org.apache.commons.io"/>
      <plugin id="org.apache.felix.gogo.command"/>
      <plugin id="org.apache.felix.gogo.runtime"/>
      <plugin id="org.apache.felix.gogo.shell"/>
      <plugin id="org.apache.felix.scr"/>
      <plugin id="org.eclipse.core.commands"/>
      <plugin id="org.eclipse.core.contenttype"/>
      <plugin id="org.eclipse.core.databinding"/>
      <plugin id="org.eclipse.core.databinding.beans"/>
      <plugin id="org.eclipse.core.databinding.observable"/>
      <plugin id="org.eclipse.core.databinding.property"/>
      <plugin id="org.eclipse.core.expressions"/>
      <plugin id="org.eclipse.core.jobs"/>
      <plugin id="org.eclipse.core.runtime"/>
      <plugin id="org.eclipse.equinox.app"/>
      <plugin id="org.eclipse.equinox.cm"/>
      <plugin id="org.eclipse.equinox.common"/>
      <plugin id="org.eclipse.equinox.console"/>
      <plugin id="org.eclipse.equinox.event"/>
      <plugin id="org.eclipse.equinox.http.registry"/>
      <plugin id="org.eclipse.equinox.http.servlet"/>
      <plugin id="org.eclipse.equinox.http.servletbridge"/>
      <plugin id="org.eclipse.equinox.preferences"/>
      <plugin id="org.eclipse.equinox.registry"/>
      <plugin id="org.eclipse.equinox.servletbridge"/>
      <plugin id="org.eclipse.help"/>
      <plugin id="org.eclipse.osgi"/>
      <plugin id="org.eclipse.osgi.services"/>
      <plugin id="org.eclipse.osgi.util"/>
      <plugin id="org.eclipse.rap.filedialog"/>
      <plugin id="org.eclipse.rap.fileupload"/>
      <plugin id="org.eclipse.rap.jface"/>
      <plugin id="org.eclipse.rap.jface.databinding"/>
      <plugin id="org.eclipse.rap.nebula.jface.gridviewer"/>
      <plugin id="org.eclipse.rap.nebula.widgets.grid"/>
      <plugin id="org.eclipse.rap.rwt"/>
      <plugin id="org.eclipse.rap.rwt.osgi"/>
   </plugins>

   <configurations>
      <plugin id="Core" autoStart="true" startLevel="0" />
      <plugin id="com.ibm.icu.base" autoStart="true" startLevel="0" />
      <plugin id="javax.xml" autoStart="true" startLevel="0" />
      <plugin id="org.apache.commons.fileupload" autoStart="true" startLevel="0" />
      <plugin id="org.apache.commons.io" autoStart="true" startLevel="0" />
      <plugin id="org.apache.felix.gogo.command" autoStart="true" startLevel="0" />
      <plugin id="org.apache.felix.gogo.runtime" autoStart="true" startLevel="0" />
      <plugin id="org.apache.felix.gogo.shell" autoStart="true" startLevel="0" />
      <plugin id="org.apache.felix.scr" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.core.commands" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.core.contenttype" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.core.databinding" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.core.databinding.beans" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.core.databinding.observable" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.core.databinding.property" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.core.expressions" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.core.jobs" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.equinox.app" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.equinox.cm" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.equinox.http.registry" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.equinox.http.servlet" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.equinox.http.servletbridge" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.equinox.preferences" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.equinox.registry" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.equinox.servletbridge" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.help" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.osgi" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.osgi.services" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.osgi.util" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.rap.filedialog" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.rap.fileupload" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.rap.jface" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.rap.jface.databinding" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.rap.nebula.jface.gridviewer" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.rap.nebula.widgets.grid" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.rap.rwt" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.rap.rwt.osgi" autoStart="true" startLevel="0" />
   </configurations>

</product>



My URL looks like this: http://serverip:8080/bitnet/bitnet
The path is set like this: application.addEntryPoint("/bitnet", BasicEntryPoint.class, properties);

Note that before using Tycho I always used Libra War Tool and it's working fine with it. So the URL should be fine. Also when deploying the same app with Libra Tool I have my app bundle started in the osgi console:
1 ACTIVE BitNet_1.0.0.201801162328
The bundle is also listed as plugin in the .warproduct file. But I'm not able to add my app bundle to the .product file plugins as I get the already posted error when building with maven.

No, Core is a custom plugin I'm using. My app bundle is called BitNet but it's not listed in the osgi console.

Thanks for your help,
Chris

[Updated on: Tue, 16 January 2018 22:32]

Report message to a moderator

Re: WAR not working if built with Tycho [message #1780059 is a reply to message #1780009] Tue, 16 January 2018 23:32 Go to previous message
Chris Merg is currently offline Chris MergFriend
Messages: 12
Registered: January 2018
Junior Member
Okay I got it now. There was a design mistake in my Tycho build.

Anyway thank you for your help Ivan!
Previous Topic:key bindings in RAP e4
Next Topic:about vertical align for text in the table viewer row
Goto Forum:
  


Current Time: Fri Mar 29 06:40:11 GMT 2024

Powered by FUDForum. Page generated in 0.26218 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top