Closed bravegag closed 11 years ago
Hello
You will need to have Spring STS, the m2e and Maven Integration plugins for eclipse juno/4.2 installed to get proper Spring aspect compile time support in eclipse.
Then you must checkout the source and in do eclipse File/Import/Maven/Existing Maven Projects.
Here is a dump of my eclipse plugin config:
AJDT configurator for m2eclipse update site http://dist.springsource.org/release/AJDT/configurator EnabledAJDT Update Site http://download.eclipse.org/tools/ajdt/42/update Enabled m2e releases repository http://download.eclipse.org/technology/m2e/releases Enabled Maven Integration for Eclipse Update Extras Site https://repository.sonatype.org/content/repositories/forge-sites/m2e-extras/0.14.0/N/0.14.0.201109270543/ Enabled SpringSource Update Site for Eclipse 3.5 http://springide.org/updatesite Enabled SpringSource Update Site for Eclipse 4.2 http://dist.springsource.com/release/TOOLS/update/e4.2/ Enabled
Once you have done this you should be able to go to org.valkyriercp.sample.simple.SimpleSampleRunner and do a run as Java Application in eclipse.
Let me know if causes any problems.
Hello cmadsen,
Thank you for the quick reply! so you think this NPE issue is due to the Eclipse plugins installation and not related to the code? that means I should be also able to run the sample jars built via Maven without hitting the issue right? However the problem here is setting up all the libraries.
Another thing, is it possible to use MDI with Valkyrie, basically the package org.springframework.richclient.application.mdi in the old Spring RCP? do you know how to plumb the configurations to achieve an MDI app? I was skimming through the Valkyrie documentation and could not find any directions related to this.
Many thanks in advance, Best regards, Giovanni
I tried installing all those Eclipse plugins into a Juno version and they all fail one way or another because of missing third party dependencies etc etc e.g. the Mylyn plugin is needed before and even then I get many issues. I will retry another time. For the time being I can workaround the exceptions by recompiling outside Eclipse using Maven and then run from Maven. I generate the project files using the Maven eclipse plugin: $M2_HOME/bin/mvn eclipse:eclipse -DdownloadSources=true
If you do a mvn install and then do
cd .../Valkyrie-RCP/valkyrie-rcp-samples/valkyrie-rcp-simple-sample mvn exec:java -Dexec.mainClass="org.valkyriercp.sample.simple.SimpleSampleRunner"
You should be able to launch it.
I'm also engaged in a constant battle with eclipse and the related plugins :-(
I used the eclipse EE version when starting.
I'm sure it is possible to port the Spring rich client MDI stuff to Valkyrie it looks like it only a few classes in the mdi package that needs porting.
Thank you for the hints :) separate from porting the MDI stuff, understanding how they work would be great because it is not really documented anywhere ... Concretely in Valkyrie I can change the Simple example file SimpleSampleApplicationConfig.java line 32: from lifecycleAdvisor.setStartingPageDescriptor(new SingleViewPageDescriptor(initialView())); to lifecycleAdvisor.setStartingPageDescriptor(new MultiViewPageDescriptor());
and I get the MDI skeleton but I have no idea how to open the internal views from a e.g. command.
What happens if you do:
lifecycleAdvisor.setStartingPageDescriptor(new MultiViewPageDescriptor((initialView()));
?
Thank you!
MultiViewPageDescriptor has only a zero argument constructor and it makes sense to be so because MDI don't have an initial view. So it works but I cant find a way to implement an open command that will trigger some internal views. This is the bit where I get lost ... intuitively different commands may lead to opening different internal views in a MDI application
looking MultiViewPageDescriptorTests.java
m = new MultiViewPageDescriptor() m.setViewDescriptors(asList(initialView)); lifecycleAdvisor.setStartingPageDescriptor(m);
might work?
Thank you cmadsen I will do that :) the issue (due to my lack of experience in this project) is that I don't know how to link a command that is enabled to initiating the loading of the JInternalFrame of the MDI document I open. But looking at the tests is a great idea actually thanks, I didn't think about that before.
All the installations I tried failed and I was unable to run Valkyrie samples from Eclipse without the NPE.
I then tried installing the STS (version Spring Tool Suite 3.3.0.M1 for Eclipse Juno 4.2.x 64b) from here: http://www.springsource.org/downloads/sts-ggts
and everything works smoothly out of the box!!! No need to mingle with the hell of Eclipse plugins installation. This has everything we need for happy RCP development.
I just added complete gradle IntelliJ idea support, IntelliJ 12 should now work out of the box too!
Hello,
I have a clone of master from today and all builds fine except two missing jars that I have to install manually:
$M2_HOME/bin/mvn -e install:install-file -Dfile=./l2fprod-common-7.3-20070317.jar -DartifactId=l2fprod-common-all -DgroupId=com.l2fprod -Dversion=7.3 -Dpackaging=jar
$M2_HOME/bin/mvn -e install:install-file -Dfile=./vldocking-2.1.4.jar -DartifactId=vldocking -DgroupId=com.vlsolutions -Dversion=2.1.4 -Dpackaging=jar -Dpom=vldocking-2.1.4.pom
I'm on Mac OS X and have the following environment:
/Users/bravegag/Dropbox/code/valkyrie-rcp-master$ $M2_HOME/bin/mvn -version Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 14:51:28+0100) Maven home: /opt/noarch/maven/3.0.5 Java version: 1.6.0_45, vendor: Apple Inc. Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home Default locale: en_US, platform encoding: MacRoman OS name: "mac os x", version: "10.7.5", arch: "x86_64", family: "mac"
When I run the valkyrie-rcp-showcase-sample (also happens for other samples) via Eclipse I get intermittently the following NPE:
9:25,360 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy] 11:19:25,360 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback-test.xml] at [file:/Users/bravegag/Dropbox/code/valkyrie-rcp-master/valkyrie-rcp-core/target/test-classes/logback-test.xml] 11:19:25,438 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set 11:19:25,444 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender] 11:19:25,448 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CONSOLE] 11:19:25,510 |-WARN in ch.qos.logback.core.ConsoleAppender[CONSOLE] - This appender no longer admits a layout as a sub-component, set an encoder instead. 11:19:25,510 |-WARN in ch.qos.logback.core.ConsoleAppender[CONSOLE] - To ensure compatibility, wrapping your layout in LayoutWrappingEncoder. 11:19:25,510 |-WARN in ch.qos.logback.core.ConsoleAppender[CONSOLE] - See also http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details 11:19:25,511 |-INFO in ch.qos.logback.classic.joran.action.LevelAction - ROOT level set to WARN 11:19:25,511 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CONSOLE] to Logger[ROOT]
3457 [main] ERROR org.valkyriercp.application.exceptionhandling.AbstractLoggingExceptionHandler - Uncaught throwable handled. java.lang.IllegalStateException: Application start thrown an exception: null at org.valkyriercp.application.support.ApplicationLauncher.launchMyRichClient(ApplicationLauncher.java:265) ~[classes/:na] at org.valkyriercp.application.support.ApplicationLauncher.(ApplicationLauncher.java:130) ~[classes/:na]
at org.valkyriercp.application.support.ApplicationLauncher.(ApplicationLauncher.java:102) ~[classes/:na]
at org.valkyriercp.sample.showcase.ShowcaseRunner.main(ShowcaseRunner.java:8) ~[classes/:na]
java.lang.NullPointerException: null
at org.valkyriercp.dialog.CompositeDialogPage.addPage(CompositeDialogPage.java:81) ~[classes/:na]
at org.valkyriercp.dialog.CompositeDialogPage.addForm(CompositeDialogPage.java:94) ~[classes/:na]
at org.valkyriercp.security.LoginCommand.doExecuteCommand(LoginCommand.java:50) ~[classes/:na]
at org.valkyriercp.command.support.ActionCommand.execute(ActionCommand.java:170) ~[classes/:na]
at org.valkyriercp.application.config.support.DefaultApplicationLifecycleAdvisor.onCommandsCreated(DefaultApplicationLifecycleAdvisor.java:83) ~[classes/:na]
at org.valkyriercp.application.support.AbstractApplicationWindow.(AbstractApplicationWindow.java:46) ~[classes/:na]
at org.valkyriercp.application.support.AbstractApplicationWindow.(AbstractApplicationWindow.java:37) ~[classes/:na]
at org.valkyriercp.application.support.DefaultApplicationWindow.(DefaultApplicationWindow.java:14) ~[classes/:na]
at org.valkyriercp.application.support.DefaultApplicationWindowFactory.createApplicationWindow(DefaultApplicationWindowFactory.java:30) ~[classes/:na]
at org.valkyriercp.application.support.DefaultApplication.createNewWindow(DefaultApplication.java:83) ~[classes/:na]
at org.valkyriercp.application.support.DefaultApplication.openWindow(DefaultApplication.java:72) ~[classes/:na]
at org.valkyriercp.application.support.DefaultApplication.start(DefaultApplication.java:56) ~[classes/:na]
at org.valkyriercp.application.support.ApplicationLauncher$1.run(ApplicationLauncher.java:256) ~[classes/:na]
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199) ~[na:1.6.0_45]
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:708) ~[na:1.6.0_45]
at java.awt.EventQueue.access$400(EventQueue.java:82) ~[na:1.6.0_45]
at java.awt.EventQueue$2.run(EventQueue.java:669) ~[na:1.6.0_45]
at java.awt.EventQueue$2.run(EventQueue.java:667) ~[na:1.6.0_45]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.6.0_45]
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) ~[na:1.6.0_45]
at java.awt.EventQueue.dispatchEvent(EventQueue.java:678) ~[na:1.6.0_45]
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) ~[na:1.6.0_45]
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) ~[na:1.6.0_45]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) ~[na:1.6.0_45]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) ~[na:1.6.0_45]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) ~[na:1.6.0_45]
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) ~[na:1.6.0_45]