Cannot cast from a.Class to a.Class [message #1221269] |
Tue, 17 December 2013 09:18 |
|
Hi,
in order to integrate our RAP application into a production environment we needed to add a <filter> in the web.xml.
The filter make use of a third-party Jar which contains a class that has to be called from inside the RAP application.
We put this Jar into the application in the usual RCP way (plugin.xml, tab 'Runtime', Classpath section, Add.. and also checked it in build.properties for exporting).
When we deployed the application the first time we got an error about setting the filter; then we put the third-party Jar also into the WEB-INF/lib folder.
In this way the filter error does not show and the application starts.
The problem comes when the application calls the class from the Jar, where we get the following error:
'Cannot cast object from a.Class to a.Class'
It seems that having this double location for the jar may be the cause.
What is the correct way in this cases?
Thank you
Vincenzo
|
|
|
|
Re: Cannot cast from a.Class to a.Class [message #1221440 is a reply to message #1221419] |
Tue, 17 December 2013 18:05 |
|
Hi Markus,
this third party library is for automatic authentication (a sort of single-signon).
It comes with specific instructions on how to modify the web.xml, so, unless the filter extensionpoint does exactly the same thing of <filter> tag, we would try to stay with the standard J2EE way.
But maybe RAP can handle this.
In fact we saw that the .warproduct file (we followed your tutorial at http://eclipse.org/rap/developers-guide/devguide.php?topic=deployment.html&version=2.1), in the Configuration tab, has the Library section, which says "List all the libraries that go into the lib folder of the WAR file": well, it seems just what we need!
Pressing the Add button we selected the Jar from the plugin where we put at the beginning; once selected it shows in the Libraries section.
When exporting the WAR we see it exactly in the WEB-INF/lib!
Tomorrow I will try the deploy of this war and I'll let you know.
For now I would just be sure to have made the correct usage of the Libraries section in warproduct: in the end what we made was:
1) put the Jar into one of the application plugins in the usual RCP way
2) add it in the .warproduct file, so to have it into WEB-INF/lib when exported
is this the correct procedure?
Thank you very much
Vincenzo
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03161 seconds