Page 1 of 3 123 LastLast
Results 1 to 10 of 30

Thread: Problem with Valkyrie Simple Sample

  1. #1
    Join Date
    Jul 2010
    Posts
    19

    Unhappy Problem with Valkyrie Simple Sample

    Just running the easy example I get the below error. I'm think is something relate with auto-wiring but don't know what it's.

    I thought the reason is because of this:
    2480 [main] INFO org.springframework.context.support.AbstractApplic ationContext$BeanPostProcessorChecker - Bean 'org.valkyriercp.sample.simple.SimpleSampleApplica tionConfig#0' of type [class org.valkyriercp.sample.simple.SimpleSampleApplicat ionConfig$$EnhancerByCGLIB$$3301b34c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
    2564 [main] INFO org.springframework.context.support.AbstractApplic ationContext$BeanPostProcessorChecker - Bean 'applicationObjectConfigurer' of type [class org.valkyriercp.application.config.support.Default ApplicationObjectConfigurer] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

    Errors:
    java.lang.IllegalStateException: Application start thrown an exception: Command context could not be loaded
    at org.valkyriercp.application.support.ApplicationLau ncher.launchMyRichClient(ApplicationLauncher.java: 269) ~[classes/:na]
    at org.valkyriercp.application.support.ApplicationLau ncher.<init>(ApplicationLauncher.java:132) ~[classes/:na]
    at org.valkyriercp.application.support.ApplicationLau ncher.<init>(ApplicationLauncher.java:104) ~[classes/:na]
    at org.valkyriercp.sample.simple.SimpleSampleRunner.m ain(SimpleSampleRunner.java:9) ~[classes/:na]
    org.valkyriercp.application.ConfigurationException : Command context could not be loaded
    at org.valkyriercp.application.config.support.Default ApplicationLifecycleAdvisor.initNewWindowCommandBa rFactory(DefaultApplicationLifecycleAdvisor.java:4 1) ~[classes/:na]
    at org.valkyriercp.application.config.support.Default ApplicationLifecycleAdvisor.createWindowCommandMan ager(DefaultApplicationLifecycleAdvisor.java:28) ~[classes/:na]
    at org.valkyriercp.application.support.AbstractApplic ationWindow.init(AbstractApplicationWindow.java:50 ) ~[classes/:na]
    ...
    at java.awt.EventQueue$1.run(EventQueue.java:639) ~[na:1.6.0_24]
    at java.awt.EventQueue$1.run(EventQueue.java:637) ~[na:1.6.0_24]
    at java.security.AccessController.doPrivileged(Native Method) ~[na:1.6.0_24]
    at java.security.AccessControlContext$1.doIntersectio nPrivilege(AccessControlContext.java:87) ~[na:1.6.0_24]
    at java.awt.EventQueue.dispatchEvent(EventQueue.java: 648) ~[na:1.6.0_24]
    at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:296) ~[na:1.6.0_24]
    at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:211) ~[na:1.6.0_24]
    at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:201) ~[na:1.6.0_24]
    at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:196) ~[na:1.6.0_24]
    at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:188) ~[na:1.6.0_24]
    at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:122) ~[na:1.6.0_24]
    Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'applicationWindowCommandManager' defined in class org.valkyriercp.sample.simple.SimpleSampleCommandC onfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionSt oreException: Factory method [public org.valkyriercp.application.support.ApplicationWin dowCommandManager org.valkyriercp.sample.simple.SimpleSampleCommandC onfig.applicationWindowCommandManager()] threw exception; nested exception is java.lang.NullPointerException
    at org.springframework.beans.factory.support.Construc torResolver.instantiateUsingFactoryMethod(Construc torResolver.java:581) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.instantiateUsingFactory Method(AbstractAutowireCapableBeanFactory.java:983 ) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBeanInstance(Abst ractAutowireCapableBeanFactory.java:879) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:485) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:456) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 91) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:288 ) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:194) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.context.support.AbstractApplic ationContext.registerBeanPostProcessors(AbstractAp plicationContext.java:722) ~[spring-context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:410) ~[spring-context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.valkyriercp.application.config.support.Default ApplicationLifecycleAdvisor$CommandBarApplicationC ontextFactory.getObject(DefaultApplicationLifecycl eAdvisor.java:124) ~[classes/:na]
    at org.valkyriercp.application.config.support.Default ApplicationLifecycleAdvisor.initNewWindowCommandBa rFactory(DefaultApplicationLifecycleAdvisor.java:3 9) ~[classes/:na]
    ... 24 common frames omitted
    Caused by: org.springframework.beans.factory.BeanDefinitionSt oreException: Factory method [public org.valkyriercp.application.support.ApplicationWin dowCommandManager org.valkyriercp.sample.simple.SimpleSampleCommandC onfig.applicationWindowCommandManager()] threw exception; nested exception is java.lang.NullPointerException
    at org.springframework.beans.factory.support.SimpleIn stantiationStrategy.instantiate(SimpleInstantiatio nStrategy.java:157) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.Construc torResolver.instantiateUsingFactoryMethod(Construc torResolver.java:570) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    ... 36 common frames omitted
    Caused by: java.lang.NullPointerException: null
    at org.valkyriercp.command.support.DefaultCommandMana ger.configure(DefaultCommandManager.java:194) ~[classes/:na]
    at org.valkyriercp.command.support.DefaultCommandMana ger.registerCommand(DefaultCommandManager.java:161 ) ~[classes/:na]
    at org.valkyriercp.command.support.DefaultCommandMana ger.createTargetableActionCommand(DefaultCommandMa nager.java:180) ~[classes/:na]
    at org.valkyriercp.application.support.ApplicationWin dowCommandManager.setSharedCommandIds(ApplicationW indowCommandManager.java:37) ~[classes/:na]
    at org.valkyriercp.sample.simple.SimpleSampleCommandC onfig.applicationWindowCommandManager(SimpleSample CommandConfig.java:25) ~[classes/:na]
    at org.valkyriercp.sample.simple.SimpleSampleCommandC onfig$$EnhancerByCGLIB$$d62b4032.CGLIB$application WindowCommandManager$2(<generated>) ~[cglib-nodep-2.2.jar:na]
    at org.valkyriercp.sample.simple.SimpleSampleCommandC onfig$$EnhancerByCGLIB$$d62b4032$$FastClassByCGLIB $$5fd62062.invoke(<generated>) ~[cglib-nodep-2.2.jar:na]
    at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodP roxy.java:215) ~[cglib-nodep-2.2.jar:na]
    at org.springframework.context.annotation.Configurati onClassEnhancer$BeanMethodInterceptor.intercept(Co nfigurationClassEnhancer.java:210) ~[spring-context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    at org.valkyriercp.sample.simple.SimpleSampleCommandC onfig$$EnhancerByCGLIB$$d62b4032.applicationWindow CommandManager(<generated>) ~[cglib-nodep-2.2.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) ~[na:1.6.0_24]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) ~[na:1.6.0_24]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) ~[na:1.6.0_24]
    at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_24]
    at org.springframework.beans.factory.support.SimpleIn stantiationStrategy.instantiate(SimpleInstantiatio nStrategy.java:145) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    ... 37 common frames omitted
    6068 [main] ERROR org.valkyriercp.application.exceptionhandling.Abst ractLoggingExceptionHandler - The ExceptionHandler has thrown the following exception itself:
    java.lang.NullPointerException: null
    at org.valkyriercp.application.exceptionhandling.Mess agesDialogExceptionHandler.resolveExceptionCaption (MessagesDialogExceptionHandler.java:68) ~[classes/:na]
    at org.valkyriercp.application.exceptionhandling.JXEr rorDialogExceptionHandler.notifyUserAboutException (JXErrorDialogExceptionHandler.java:39) ~[classes/:na]
    ...
    at java.lang.Thread.dispatchUncaughtException(Thread. java:1898) [na:1.6.0_24]

  2. #2
    Join Date
    Mar 2007
    Location
    Oudenaarde
    Posts
    294

    Default

    Are you running the class from an IDE or from the command line? If running from an IDE, remember that Valkyrie using AOP weaving. IntelliJ detects this out-of-the-box and compiles the aspects into the classes as defined by the Maven plugin. If I'm not mistaken, Eclipse has a plugin like this too to enable compile time weaving.
    MSN: PM me please
    Skype: doclo_lieven

    Spring Rich Client Project Lead

  3. #3
    Join Date
    Mar 2007
    Location
    Oudenaarde
    Posts
    294

    Default

    If you're using Eclipse/STS/RAD/MyEclipse/..., take a look at this:
    http://maven.apache.org/plugins/mave...-projects.html
    As for Netbeans... I haven't got a clue.
    As said before, IntelliJ works out-of-the-box.
    MSN: PM me please
    Skype: doclo_lieven

    Spring Rich Client Project Lead

  4. #4
    Join Date
    Jul 2010
    Posts
    19

    Default

    I'm doing in Intellij IDEA and does not work for me. I don't know what I can be doing wrong. I try everything.

    Thanks

  5. #5
    Join Date
    Jul 2010
    Posts
    19

    Default

    A little forward in the process. Open just on example at the time I get the splash screen, the login dialog, after login, the same again. The log is in the attachment.

    Thanks in advance
    Attached Files Attached Files

  6. #6
    Join Date
    Mar 2007
    Location
    Oudenaarde
    Posts
    294

    Default

    Do a git pull and try again, if you will. Could've been a problem with some recent changes
    MSN: PM me please
    Skype: doclo_lieven

    Spring Rich Client Project Lead

  7. #7
    Join Date
    Jul 2010
    Posts
    19

    Default

    Now the samples don't compile for some errors. Mainly because a change in AbstractView, now no have a constructor with String parameter.

    Also in line 78 of SimpleSampleApplicationConfig because you are returning a PageComponentDescriptor instead a ViewDescriptor.

  8. #8
    Join Date
    Mar 2007
    Location
    Oudenaarde
    Posts
    294

    Default

    I just did a fresh clone of the entire git repo and a mvn clean install. Everything compiles as it should. Are you sure you did a git pull of the entire codebase?
    MSN: PM me please
    Skype: doclo_lieven

    Spring Rich Client Project Lead

  9. #9
    Join Date
    Jul 2010
    Posts
    19

    Default

    Now everything compile fine, after a fresh clone. But getting the same result like my first message.

    What I can doing wrong? I no have more ideas about it. I'm trying to make run my first application test and something very similar happe.


  10. #10
    Join Date
    Mar 2007
    Location
    Oudenaarde
    Posts
    294

    Default

    What version of IntelliJ are you using? IDEA X? The ultimate or community edition? In your project settings, are you using the ajc compiler with the right aspectjtools library?
    I'm using IDEA X Ultimate and importing the project from the POM configures everything correctly. However, if you're using the Community Edition, you need to install the AspectJ Support plugin and correctly configure the ajc compiler in order to correctly run the code (due to the @Configurable beans). Unfortunately, the plugin is the 0.4 version, as IntelliJ 10 is blocked for newer versions of the plugin (as it's bundled since X, but only in the Ultimate edition, whoops).
    What you could do is create a run config which does a mvn clean compile instead of a make before install... But you're better off downloading the aspectj compiler and configuring the plugin in IntelliJ.

    Now I'm just waiting for one of the STS guys to jump in and tell us that STS does this out of the box as well (it should, as Roo uses AspectJ quite extensively).
    MSN: PM me please
    Skype: doclo_lieven

    Spring Rich Client Project Lead

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •