Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP deployment on Weblogic fails
RAP deployment on Weblogic fails [message #657554] Thu, 03 March 2011 09:31 Go to next message
Florent Metral is currently offline Florent MetralFriend
Messages: 10
Registered: January 2010
Junior Member
Hi all,

Since two days, we are facing issue to deploy a RAP application on Weblogic 10.3. Our EAR is weel deployed on JBoss and WAS 6.1 and 7.
But when we tray to deploy on Weblogic, we get issue ProxyServlet: /eDD_War/rap and we then get a 404 errro.
It seems that the rap servlet is not mapped.
After debugging in RAP framework initialization, here is what we found :
Look at the HttpServiceTracker class (exists twice, once in the equinox and once in the workbench.rap plugin)
In Jboss, both classes are used, in Werblogic, only one in used... why ?

Here is our launch.ini file:
# Eclipse Runtime Configuration Overrides
# These properties are loaded prior to starting the framework and can also be used to override System Properties
# @null is a special value used to override and clear the framework's copy of a System Property prior to starting the framework
# "*" can be used together with @null to clear System Properties that match a prefix name.

osgi.*=@null
org.osgi.*=@null
eclipse.*=@null

The web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app id="WebApp">
<servlet id="bridge">
<servlet-name>equinoxbridgeservlet</servlet-name>
<display-name>Equinox Bridge Servlet</display-name>
<description>Equinox Bridge Servlet</description>
<servlet-class>org.eclipse.equinox.servletbridge.BridgeServlet </servlet-class>
<!-- the OSGi console is useful for trouble shooting but will fill up your
appserver log quickly, so deactivate on production use -->
<!--
<init-param>
<param-name>commandline</param-name>
<param-value>-console</param-value>
</init-param>
-->
<!-- Framework Controls could be useful for testing purpose, but
we disable it per default -->
<init-param>
<param-name>enableFrameworkControls</param-name>
<param-value>false</param-value>
</init-param>
<!-- Enable multi-language support for the extension registry -->
<init-param>
<param-name>commandline</param-name>
<param-value>-registryMultiLanguage</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>equinoxbridgeservlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<!-- ***************** -->
<!-- Security -->
<!-- ***************** -->
<security-constraint>
<web-resource-collection>
<web-resource-name>EDD access</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>EDDACCESS</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>eDDRealm</realm-name>
</login-config>
<security-role>
<role-name>EDDACCESS</role-name>
</security-role>
</web-app>


And the config.ini:
#Product Runtime Configuration File
osgi.bundles.defaultStartLevel=4
osgi.bundles=com.ibm.icu.base@start,com.sopra.datadictionary.ui.rcp.application@start,com.sopra.datadictionary.ui.rcp.classeditor@start,com.sopra.datadictionary.ui.rcp.core@start,com.sopra.datadictionary.ui.rcp.dataheadingeditor@start, com.sopra.datadictionary.ui.rcp.dataheadingrepresentationedi tor @start,com.sopra.datadictionary.ui.rcp.dataheadingtypeeditor@start,com.sopra.datadictionary.ui.rcp.dhtreeview@start,com.sopra.datadictionary.ui.rcp.domaineditor@start,com.sopra.datadictionary.ui.rcp.dstreeview@start,com.sopra.datadictionary.ui.rcp.product@start,com.sopra.datadictionary.ui.rcp.viewlogeditor@start,com.sopra.framework.ui.rap@start,org.eclipse.core.commands@start,org.eclipse.core.contenttype@start,org.eclipse.core.databinding@start,org.eclipse.core.databinding.beans@start,org.eclipse.core.databinding.observable@start,org.eclipse.core.databinding.property@start,org.eclipse.core.expressions@start,org.eclipse.core.jobs@start,org.eclipse.core.runtime@start,org.eclipse.equinox.app@start,org.eclipse.equinox.common@start,org.eclipse.equinox.http.registry@start,org.eclipse.equinox.http.servlet@start,org.eclipse.equinox.http.servletbridge@start,org.eclipse.equinox.preferences@start,org.eclipse.equinox.registry@start,org.eclipse.equinox.servletbridge@start,org.eclipse.equinox.servletbridge.extensionbundle,org.eclipse.help@start,org.eclipse.osgi.services@start,org.eclipse.rap.jface@start,org.eclipse.rap.rwt@start,org.eclipse.rap.rwt.q07,org.eclipse.rap.ui@start,org.eclipse.rap.ui.forms@start,org.eclipse.rap.ui.views@start,org.eclipse.rap.ui.workbench@start

This would be very nice for us if some of you had an idea about this.
Thanks in advance
Re: RAP deployment on Weblogic fails [message #657560 is a reply to message #657554] Thu, 03 March 2011 09:50 Go to previous messageGo to next message
Florent Metral is currently offline Florent MetralFriend
Messages: 10
Registered: January 2010
Junior Member
No Message Body

[Updated on: Thu, 03 March 2011 09:54]

Report message to a moderator

Re: RAP deployment on Weblogic fails [message #657561 is a reply to message #657554] Thu, 03 March 2011 09:54 Go to previous messageGo to next message
Florent Metral is currently offline Florent MetralFriend
Messages: 10
Registered: January 2010
Junior Member
Here is the exception stacktrace we get in RAP log file:
!ENTRY org.eclipse.osgi 4 0 2011-03-03 10:47:04.990
!MESSAGE An unexpected runtime error has occurred.
!STACK 0
java.lang.NullPointerException
at org.eclipse.rap.ui.internal.application.ApplicationRegistry. getApplicationExtensions(ApplicationRegistry.java:102)
at org.eclipse.rap.ui.internal.application.ApplicationRegistry. registerApplicationEntryPoints(ApplicationRegistry.java:91)
at org.eclipse.ui.internal.WorkbenchPlugin$3.addingService(Work benchPlugin.java:1109)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAddin g(ServiceTracker.java:979)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAddin g(ServiceTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTr acked.java:262)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked. java:234)
at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged( ServiceTracker.java:940)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceLis tener.serviceChanged(FilteredServiceListener.java:104)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.d ispatchEvent(BundleContextImpl.java:861)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEv entSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.pu blishServiceEventPrivileged(ServiceRegistry.java:815)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.pu blishServiceEvent(ServiceRegistry.java:772)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistratio nImpl.register(ServiceRegistrationImpl.java:130)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.re gisterService(ServiceRegistry.java:215)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.r egisterService(BundleContextImpl.java:433)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.r egisterService(BundleContextImpl.java:451)
at org.eclipse.equinox.http.registry.internal.HttpServiceTracke r.open(HttpServiceTracker.java:43)
at org.eclipse.equinox.http.registry.internal.Activator.addingS ervice(Activator.java:59)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAddin g(ServiceTracker.java:979)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAddin g(ServiceTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTr acked.java:262)
at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractT racked.java:185)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.jav a:348)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.jav a:283)
at org.eclipse.equinox.http.registry.internal.Activator.start(A ctivator.java:37)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1 .run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(AccessController .java:251)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:702)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:378)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resu me(AbstractBundle.java:377)

[Updated on: Thu, 03 March 2011 09:55]

Report message to a moderator

Re: RAP deployment on Weblogic fails [message #658196 is a reply to message #657561] Mon, 07 March 2011 11:18 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi,

> The excet error in RAP log files is:
> !ENTRY org.eclipse.osgi 4 0 2011-03-03 10:47:04.990 !MESSAGE An
> unexpected runtime error has occurred. !STACK 0
> java.lang.NullPointerException
> at org.eclipse.rap.ui.internal.application.ApplicationRegistry.
> getApplicationExtensions(ApplicationRegistry.java:102) at
> org.eclipse.rap.ui.internal.application.ApplicationRegistry.
> ...

this error suggests that the "application" entrypoint is not found.
Probably the org.eclipse.core.runtime bundle is not installed. The
exception in your previous post could explain this. At any rate, you
should get access to the OSGi console and print your bundle status using
the "ss" command. Post the output here if you need more help.

Best regards, Ralf

--
Ralf Sternberg

Twitter: @ralfstx
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: RAP deployment on Weblogic fails [message #658398 is a reply to message #657554] Tue, 08 March 2011 11:14 Go to previous messageGo to next message
Florent Metral is currently offline Florent MetralFriend
Messages: 10
Registered: January 2010
Junior Member
Hi Ralf,

Thanks a lot for your answer.
In fact, the previous exception stacktrace I posted was not the correct one.
The correct one only appeared at the first server launch, after deleting all temporary files.
So my real exception was :
javax.xml.parsers.FactoryConfigurationError: Provider weblogic.xml.jaxp.RegistrySAXParserFactory not found

To solve it, I have forced the parser using a JVM argument :
-Djavax.xml.parsers.SAXParserFactory =org.apache.xerces.jaxp.SAXParserFactoryImpl
But this is only possible if the weblogic runs with a Java 1.6 JVM.

Now, an HelloWorld application works fine on Weblogic !

Best regards,
Florent
Re: RAP deployment on Weblogic fails [message #658542 is a reply to message #658398] Tue, 08 March 2011 21:19 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi Florent,

thanks for this info. Good to know that it works!

Cheers, Ralf

--
Ralf Sternberg

Twitter: @ralfstx
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
icon5.gif  Re: RAP deployment on Weblogic fails [message #666126 is a reply to message #657554] Tue, 19 April 2011 08:31 Go to previous messageGo to next message
Erwan Pergod is currently offline Erwan PergodFriend
Messages: 3
Registered: April 2011
Junior Member
I successfully deployed and ran a RAP application on weblogic, however, I'm in trouble with EJBs calls from the RAP application (despite they are working on Jboss).
Exception is:
Caused by: java.lang.ClassCastException: Cannot narrow remote object com.myorg.myservices.MyClassSession_42lh0_HomeImpl_CBV@53ee53ee to com.myorg.myservices.MyClassSessionHome

I guess this is a problem of ClassLoader, since the EJB call is performed from RAP and not from a Weblogic thread. Weblogic wlfullclient jar is in classpath. I tried to perform the narrow on a home class created using the classloader of the jndi object retrieved using the lookup, but if failed with:
MyClassSession_42lh0_HomeImpl incompatible with javax.ejb.EJBHome

Any pointer, even doubtful will be appreciated !
I can mention that EJB calls between RCP and Weblogic are working.
Re: RAP deployment on Weblogic fails [message #666305 is a reply to message #666126] Tue, 19 April 2011 20:04 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi,

if you need to run code on the Weblogic thread, you can try to wrap it in
a runnable and let RWT.requestThreadExec() run it.

Hope this helps,
Ralf

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: RAP deployment on Weblogic fails [message #666368 is a reply to message #657554] Wed, 20 April 2011 08:08 Go to previous messageGo to next message
Erwan Pergod is currently offline Erwan PergodFriend
Messages: 3
Registered: April 2011
Junior Member
Hi Ralf,

Sure it does ! I'll definitively try it and report my results.

Regards,
Re: RAP deployment on Weblogic fails [message #672018 is a reply to message #666368] Thu, 19 May 2011 15:26 Go to previous messageGo to next message
Erwan Pergod is currently offline Erwan PergodFriend
Messages: 3
Registered: April 2011
Junior Member
Unfortunatelly this doesn't solved the problem.
We're using following osgi configuration in RAP:
osgi.parentClassloader=boot
osgi.contextClassLoaderParent=boot
(we had no success with app)

using requestThreadExec we get the same "Caused by: java.lang.ClassCastException: Cannot narrow remote object" when ran from a plugin, and when runned from Application:

org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:3210)
at org.eclipse.swt.SWT.error(SWT.java:3130)
at org.eclipse.swt.SWT.error(SWT.java:3101)
at org.eclipse.rwt.RWT.requestThreadExec(RWT.java:332)

The EJB can be called from a servlet located in WAR of the same EAR without problem.

The only workaround I have for the moment is to publish the EJB as a webservice EndPoint and invoke it from the RAP application, but it is likely to be too much overhead.

Feel free to push any clue Wink
Re: RAP deployment on Weblogic fails [message #672060 is a reply to message #672018] Thu, 19 May 2011 18:13 Go to previous message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi Erwan,

are you calling the EJB from a background thread? In this case,
requestThreadExec cannot work. You should try to call it during a
lifecycle request, e.g. in a SelectionListener attached to a Button.

Regards, Ralf

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:Display or download files from server.
Next Topic:How to create a url to a generated resource?
Goto Forum:
  


Current Time: Tue Mar 19 03:40:05 GMT 2024

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

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

Back to the top