[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Eclipse RCP product as a Terracotta client  XML
Forum Index -> Terracotta Platform
Author Message
suneeta

journeyman

Joined: 03/26/2007 12:50:45
Messages: 12
Offline

Hi,

I am trying to launch an eclipse RCP product as a Terracotta client.
Eclipse RCP product can be configured with a set of launch configuration (as .ini file) which has a 'vmargs' option.

But JVM exits when I try to launch with a -Xbootclasspath vm option (that is needed for Terracotta client bootstraping).

Wondering if anyone has had any luck with this..

I am attaching the test product which has the bootclasspath setting in the .ini file. Extracting it and trying to open test.exe will fail. If you remove the bootclasspath vmrags option from test.ini file, you will notice it launches jsut fine.

Please advice
-sg
 Filename test-bootclasspath.zip [Disk] Download
 Description
 Filesize 9640 Kbytes
 Downloaded:  148 time(s)

tgautier

seraphim

Joined: 06/05/2006 12:19:26
Messages: 1781
Offline

suneeta,

Eclipse RCP is not yet a supported platform. There was a discussion about it here that might help, I don't know if it's relevant for what you are doing: http://forums.terracotta.org/forums/posts/list/131.page

In the upcoming release we will be working on making Terracotta integration with projects like RCP easier and more seamless so stay tuned.
[WWW]
gkeim

ophanim

Joined: 12/05/2006 10:22:37
Messages: 685
Location: Terracotta, Inc.
Offline

There are two problems here. First, you need to have a server running or your client will endlessly try to connect and the window will never appear. Second, you need to specify -Dtc.install-root and -Dtc.config in test.ini. Failing to specify either of these will cause a runtime error, which you see if you run the app like so:

java -Xbootclasspath/p:<bootjar-path> -jar startup.jar -name Test

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.tc.object.bytecode.hook.impl.ClassProcessorHelper.createGlobalContext(ClassProcessorHelper.java:391)
at com.tc.object.bytecode.hook.impl.ClassProcessorHelper.init(ClassProcessorHelper.java:284)
at com.tc.object.bytecode.hook.impl.ClassProcessorHelper.defineClass0Pre(ClassProcessorHelper.java:421)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Caused by: com.tc.config.schema.setup.ConfigurationSetupException:
*******************************************************************************
You must specify the location of the Terracotta configuration file for this process, using the 'tc.config' system property.
*******************************************************************************

at com.tc.config.schema.setup.StandardTVSConfigurationSetupManagerFactory.<init>(StandardTVSConfigurationSetupManagerFactory.java:98)
at com.tc.config.schema.setup.StandardTVSConfigurationSetupManagerFactory.<init>(StandardTVSConfigurationSetupManagerFactory.java:50)
at com.tc.config.schema.setup.StandardTVSConfigurationSetupManagerFactory.<init>(StandardTVSConfigurationSetupManagerFactory.java:44)
at com.tc.object.bytecode.hook.impl.DSOContextImpl.getGlobalConfigHelper(DSOContextImpl.java:163)
at com.tc.object.bytecode.hook.impl.DSOContextImpl.createGlobalContext(DSOContextImpl.java:61)


Gary Keim (terracotta developer) Want to post to this forum? Join the Terracotta Community
suneeta

journeyman

Joined: 03/26/2007 12:50:45
Messages: 12
Offline

Hi,

Thanks for the reply.

I am able to run the eclipse product from command line (using java -jar startup.jar) as has been specified in your reply.

However, when you try to launch from the .exe, JVM will exit.

This seems to be an issue with the -Xbootclasspath option (without that option, it launched fine)

-Suneeta
gkeim

ophanim

Joined: 12/05/2006 10:22:37
Messages: 685
Location: Terracotta, Inc.
Offline

Are you saying that even after adding the required system properties to your test.ini, and making sure a Terracotta server is running, executing test.exe is still failing?

Just to be clear:

(1) you need to add the following to test.ini, in addition to the -Xbootclasspath entry:

-Dtc.install-root=C:\Program Files\Terracotta\terracotta-2.3-stable1
-Dtc.config=C:\Program Files\Terracotta\terracotta-2.3-stable1\samples\tc-config.xml

You can't run a DSO client without providing a config specification, so above I'm specifying the demo config.

(2) Start the demo server:

$ C:\Program Files\Terracotta\terracotta-2.3-stable1\samples\start-demo-server.bat

You can't run a DSO client without having an active Terracotta server for it to connect with.

I made these changes with the example you posted, and it worked fine.

I'll check, but what SHOULD happen if you export your real DSO RCP app is that the DSO plugin should be included, and those system properties should be automatically added to test.ini. It's not clear that is what you would want with respect to including the DSO plugin. You may prefer to install the regular kit on each client machine. Either way, it just takes changing the value of tc.install-root in test.ini.



Gary Keim (terracotta developer) Want to post to this forum? Join the Terracotta Community
 
Forum Index -> Terracotta Platform
Go to:   
Powered by JForum 2.1.7 © JForum Team