Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Exported Scout application not working
Exported Scout application not working [message #1407677] Wed, 13 August 2014 07:34 Go to next message
Lukas Steigerwald is currently offline Lukas SteigerwaldFriend
Messages: 47
Registered: July 2014
Member
I currently have the issue that I would like to export my Scout-Application as an EAR-File to run on a Websphere Applcation Server Liberty Profile. As long as I am running the application from within the workspace everything works fine. The different product files give no errors when validating them. But when trying to run the exported EAR-file on the application server I get a lot of error messages that are telling me that it is not able to resolve a lot of the bundles and throws mutltiple ClassNotFoundExceptions.


One example:
org.osgi.framework.BundleException: test.prototype.shared [80]
  Another singleton bundle selected: osgi.identity; osgi.identity="test.prototype.shared"; type="osgi.bundle"; version:Version="1.0.0.201408121450"; singleton:="true"

	at org.eclipse.osgi.internal.framework.EquinoxBundle.getModuleClassLoader(EquinoxBundle.java:589)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564)
	at org.eclipse.scout.commons.osgi.BundleListClassLoader.doLoadClass(BundleListClassLoader.java:273)
	at org.eclipse.scout.commons.osgi.BundleListClassLoader.loadClass(BundleListClassLoader.java:210)
	at org.eclipse.scout.commons.osgi.BundleObjectInputStream.resolveClass(BundleObjectInputStream.java:56)
	at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
	at java.io.ObjectInputStream.readClassDesc(Unknown Source)
	at java.io.ObjectInputStream.readClass(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.readObject(Unknown Source)
	at java.util.HashMap.readObject(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
	at java.io.ObjectInputStream.readSerialData(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
	at java.io.ObjectInputStream.readSerialData(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
	at java.io.ObjectInputStream.readSerialData(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.readObject(Unknown Source)
	at org.eclipse.scout.commons.serialization.AbstractObjectSerializer.deserialize(AbstractObjectSerializer.java:90)
	at org.eclipse.scout.rt.shared.servicetunnel.DefaultServiceTunnelContentHandler.getData(DefaultServiceTunnelContentHandler.java:382)
	at org.eclipse.scout.rt.shared.servicetunnel.DefaultServiceTunnelContentHandler.read(DefaultServiceTunnelContentHandler.java:364)
	at org.eclipse.scout.rt.shared.servicetunnel.DefaultServiceTunnelContentHandler.readResponse(DefaultServiceTunnelContentHandler.java:315)
	at org.eclipse.scout.rt.servicetunnel.http.internal.HttpBackgroundExecutable.run(HttpBackgroundExecutable.java:94)
	at org.eclipse.scout.rt.client.servicetunnel.http.internal.InternalClientHttpServiceTunnel$2.runStatus(InternalClientHttpServiceTunnel.java:207)
	at org.eclipse.scout.rt.client.ClientJob.runTransactionWrapper(ClientJob.java:172)
	at org.eclipse.scout.rt.client.ClientJob.run(ClientJob.java:159)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


These errors occur for the rap module, shared, client, client.mobile.


Before this in the log there are a multiple ClassNotFoundExceptions starting with the following one:
java.lang.ClassNotFoundException: org.eclipse.osgi.internal.baseadaptor.BaseHookConfigurator
	at com.ibm.ws.classloading.internal.AppClassLoader.findClassCommonLibraryClassLoaders(AppClassLoader.java:390)
	at com.ibm.ws.classloading.internal.AppClassLoader.findClass(AppClassLoader.java:247)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at com.ibm.ws.classloading.internal.AppClassLoader.loadClass(AppClassLoader.java:366)
	at org.eclipse.equinox.servletbridge.FrameworkLauncher$ChildFirstURLClassLoader.loadClass(FrameworkLauncher.java:1028)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Unknown Source)
	at org.eclipse.osgi.internal.hookregistry.HookRegistry.loadConfigurators(HookRegistry.java:185)
	at org.eclipse.osgi.internal.hookregistry.HookRegistry.initialize(HookRegistry.java:106)
	at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:73)
	at org.eclipse.osgi.launch.Equinox.<init>(Equinox.java:31)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:297)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.servletbridge.FrameworkLauncher.start(FrameworkLauncher.java:409)
	at org.eclipse.equinox.servletbridge.BridgeServlet.init(BridgeServlet.java:97)
	at javax.servlet.GenericServlet.init(GenericServlet.java:161)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:324)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadOnStartupCheck(ServletWrapper.java:1368)
	at com.ibm.ws.webcontainer.webapp.WebApp.doLoadOnStartupActions(WebApp.java:1091)
	at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinally(WebApp.java:1059)
	at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:965)
	at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:6049)
	at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.startWebApp(DynamicVirtualHost.java:421)
	at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.createRunnableHandler(DynamicVirtualHost.java:241)
	at com.ibm.ws.http.internal.VirtualHostImpl.discriminate(VirtualHostImpl.java:182)
	at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:169)
	at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:448)
	at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:382)
	at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:282)
	at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:253)
	at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:174)
	at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:83)
	at com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:502)
	at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:550)
	at com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:899)
	at com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:981)
	at com.ibm.ws.threading.internal.Worker.executeWork(Worker.java:439)
	at com.ibm.ws.threading.internal.Worker.run(Worker.java:421)
	at java.lang.Thread.run(Unknown Source)


Maybe someone has got an idea what the issue could be?

EDIT:
The application is starting when I try to access the web-client. However when leaving the loading screen the same Error-Message Box appears like in the case when I have forgotten to start my MySqlDB (And no I have checked multiple times whether the DB is running - so this is unfortunately not the solution to the problem). As I only get the MessageBox in German the translation into English should be something like: The original Error Message is: Processing Exception

EDIT2:
The only error printed in red in the console, maybe that helps someone to get an idea what might be wrong:
[err] 	at org.eclipse.scout.rt.servicetunnel.AbstractServiceTunnel.invokeService(AbstractServiceTunnel.java:120)
[err] 	at org.eclipse.scout.rt.servicetunnel.http.internal.AbstractInternalHttpServiceTunnel.invokeService(AbstractInternalHttpServiceTunnel.java:132)
[err] 	at org.eclipse.scout.rt.client.servicetunnel.http.ClientHttpServiceTunnel.invokeService(ClientHttpServiceTunnel.java:121)
[err] 	at org.eclipse.scout.rt.servicetunnel.ServiceTunnelInvocationHandler.invoke(ServiceTunnelInvocationHandler.java:48)
[err] 	at com.sun.proxy.$Proxy20.getParentAccounts(Unknown Source)
[err] 	at test.prototype.client.services.CachingService.getParentAccounts(CachingService.java:686)
[err] 	at test.prototype.client.services.CachingService.<init>(CachingService.java:204)
[err] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[err] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
[err] 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
[err] 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
[err] 	at java.lang.Class.newInstance(Unknown Source)
[err] 	at org.eclipse.scout.rt.client.services.ClientServiceFactory.updateInstanceCache(ClientServiceFactory.java:129)
[err] 	at org.eclipse.scout.rt.client.services.ClientServiceFactory.getService(ClientServiceFactory.java:87)
[err] 	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:212)
[err] 	at java.security.AccessController.doPrivileged(Native Method)
[err] 	at [internal classes]


The strange thing is that I already had it working somehow, afterwards only switched from configuring the sql service by overriding the methods to configuring it through the config.ini. Switching back to overwriting does not solve the problem.

[Updated on: Thu, 14 August 2014 07:04]

Report message to a moderator

Re: Exported Scout application not working [message #1409970 is a reply to message #1407677] Tue, 19 August 2014 13:00 Go to previous messageGo to next message
Lukas Steigerwald is currently offline Lukas SteigerwaldFriend
Messages: 47
Registered: July 2014
Member
I might have an idea why it is not working. I have just discovered that I somewhere use a path C:/... to define where certain icons are located inside the project. That has obviously to fail when only knowing the inside of its container.
The question now is: How can I define a relative path to e.g. some resources folder where I store the icons? It would be great if anyone could help me with that.
Re: Exported Scout application not working [message #1409988 is a reply to message #1409970] Tue, 19 August 2014 13:54 Go to previous messageGo to next message
Matthias Zimmermann is currently offline Matthias ZimmermannFriend
Messages: 208
Registered: June 2015
Senior Member
if you'd like to use project specific icons, check out this how-to [1].
hope this helps

[1] https://wiki.eclipse.org/Scout/HowTo/4.0/Add_an_icon
Re: Exported Scout application not working [message #1410228 is a reply to message #1409988] Wed, 20 August 2014 06:52 Go to previous messageGo to next message
Lukas Steigerwald is currently offline Lukas SteigerwaldFriend
Messages: 47
Registered: July 2014
Member
Thank you for the reply Matthias. This link looks not too bad, as it works like how the icons should be stored. However what I try to use these icons in a table like described in[1]. I have not yet managed to make the getLogo() method of the LogoService from [1] accept any relative input. I am still trying, but if anyone already knows a good solution that could save me some time.

EDIT:
What I try to do at the moment:
IIconProviderService service = SERVICES.getService(IIconProviderService.class);

              byte[] content = service.getIconSpec(imageId).getContent();

where the imageId is the String read from the field in the table.

with the getIconSpec(String imageId) method looking as follows:
  @Override
  public IconSpec getIconSpec(String iconName) {
    byte[] content = Activator.getDefault().getImageFromCache(iconName);
    if (content == null) {
      return null;
    }


instead of the following from [1]:
 byte[] content = SERVICES.getService(ILogoService.class).getLogo(imageId);

Unfortunately it seems in this scenario the application tries to get the image from some kind of cache that is not populated when reaching that point in code.

EDIT2:
I guess the most interesting question would be where and how the actual icon is loaded in the case of just setting an icon for e.g. the navigation tree. As far as I managed to step through the source code it was always only the String that is defined in the Icons.class, but never was converted into the actual image.

[1]https://wiki.eclipse.org/Scout/HowTo/4.0/Display_images_in_a_table_page

[Updated on: Wed, 20 August 2014 09:36]

Report message to a moderator

Re: Exported Scout application not working [message #1410607 is a reply to message #1410228] Thu, 21 August 2014 07:30 Go to previous messageGo to next message
Lukas Steigerwald is currently offline Lukas SteigerwaldFriend
Messages: 47
Registered: July 2014
Member
Solved the issue with the absolute path. The decorate cell function is able to work with icons that are dropped into the icons folder without any problems. You can leave most of the lines of the HowTo I posted earlier and simply keep the last two lines:
cell.setIconId(imageId);
  cell.setText(null);

That is enough to display the icons in the table.

However this does not solve the export problem. Next strange thing I discovered is the following in the config.ini of the server:
org.eclipse.scout.rt.server.services.common.file.RemoteFileService#rootPath=C:/[...]/com.ibm.ilm.prototype.server/j2ee/ear/war/WEB-INF/remotefiles

So here is another absolute path. What is this path for? This directory does not even exist on my drive. Maybe I have to change that to make the EAR run on an application server?
Re: Exported Scout application not working [message #1413413 is a reply to message #1410607] Thu, 28 August 2014 13:12 Go to previous message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
Lukas Steigerwald wrote on Thu, 21 August 2014 09:30
Next strange thing I discovered is the following in the config.ini of the server:
org.eclipse.scout.rt.server.services.common.file.RemoteFileService#rootPath=C:/[...]/com.ibm.ilm.prototype.server/j2ee/ear/war/WEB-INF/remotefiles

So here is another absolute path. What is this path for?


I think this configuration is useful if you use the RemoteFileService provided by Eclipse Scout. Otherwise it can be ignored (and removed).

The problem is that a lot of services are registered in the Scout Framework itself (for example org.eclipse.scout.rt.client). This is the case for org.eclipse.scout.rt.shared.services.common.file.IRemoteFileService and therefore the SDK creates an entry in the config.ini to initialize the service [side note: I give you right, the absolute path is still questionable].

The idea with BUG 410328 is to remove all those service registrations from the Scout framework plug-ins, allowing each scout project to decide what they want to use (and register in the project specific plug-ins).
Previous Topic:Tests
Next Topic:TablePageData and SearchForm
Goto Forum:
  


Current Time: Tue Apr 16 16:29:49 GMT 2024

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

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

Back to the top