Announcement Announcement Module
Collapse
No announcement yet.
petclinic client-server sample notes Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • petclinic client-server sample notes

    I just went through the process of running the client-server version of the petclinic sample and thought I'd share some notes of what I had to do to get it to work. BTW, I'm using Tomcat 5.5.7 and Java 1.5.

    1. After I deployed the war file and ran Tomcat, I noticed some errors on startup about a missing class:

    Code:
    SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
    java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
    I added:
    Code:
    spring-web.jar
    spring-webmvc.jar
    to WEB-INF/lib and was able to restart the app successfully.

    2. When I tried launching the application via JWS, I received an exception about another missing class (can't recall what it was just now). I noticed that a jar file 'spring-richclient-sandbox.jar' was in the jws/lib directory, but not listed in the jnlp file, so I added
    Code:
        <jar href="lib/spring-richclient-sandbox.jar"/>
    to jws/petclinic-clientserver.jnlp. This fixed the issue.

    3. When I tried to log in, I received an error message and the following exception in the log:
    Code:
    WARNING&#58; Exception occured executing dialog finish command.
    org.springframework.beans.factory.NoSuchBeanDefinitionException&#58; No bean named '&amp;clinic' is defined&#58; org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans &#91;application,petclinicLifecycleAdvisor,applicationDescriptor,applicationObjectConfigurer,applicationEventMulticaster,componentFactory,lookAndFeelConfigurer,messageSource,imageResourcesFactory,imageSource,iconSource,formComponentInterceptorFactory,rulesSource,ownerManagerView,newOwnerWizard,vetManagerView,setupWizard,preferenceStore,preferenceManager,appearancePreferencePage,propertyConfigurer,clinic,remoteAuthenticationManager,remoteAuthenticationProvider,authenticationManager,remotingSecurityConfigurer,roleVoter,accessDecisionManager&#93;; root of BeanFactory hierarchy
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition&#40;DefaultListableBeanFactory.java&#58;356&#41;
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition&#40;AbstractBeanFactory.java&#58;583&#41;
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean&#40;AbstractBeanFactory.java&#58;193&#41;
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean&#40;AbstractBeanFactory.java&#58;145&#41;
    	at org.springframework.context.support.AbstractApplicationContext.getBean&#40;AbstractApplicationContext.java&#58;504&#41;
    	at org.springframework.richclient.security.RemotingSecurityConfigurer.getExporters&#40;RemotingSecurityConfigurer.java&#58;86&#41;
    	at org.springframework.richclient.security.RemotingSecurityConfigurer.updateExporters&#40;RemotingSecurityConfigurer.java&#58;117&#41;
    	at org.springframework.richclient.security.RemotingSecurityConfigurer.onApplicationEvent&#40;RemotingSecurityConfigurer.java&#58;69&#41;
    	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent&#40;SimpleApplicationEventMulticaster.java&#58;68&#41;
    	at org.springframework.context.support.AbstractApplicationContext.publishEvent&#40;AbstractApplicationContext.java&#58;218&#41;
    	at org.springframework.richclient.security.SessionDetails.login&#40;SessionDetails.java&#58;125&#41;
    	at org.springframework.richclient.security.LoginForm.commit&#40;LoginForm.java&#58;57&#41;
    	at org.springframework.richclient.security.LoginCommand$1.onFinish&#40;LoginCommand.java&#58;79&#41;
    	at org.springframework.richclient.dialog.ApplicationDialog$1.doExecuteCommand&#40;ApplicationDialog.java&#58;322&#41;
    	at org.springframework.richclient.command.ActionCommand.execute&#40;ActionCommand.java&#58;188&#41;
    	at org.springframework.richclient.command.ActionCommand$1.actionPerformed&#40;ActionCommand.java&#58;123&#41;
    	at javax.swing.AbstractButton.fireActionPerformed&#40;AbstractButton.java&#58;1849&#41;
    	at javax.swing.AbstractButton$Handler.actionPerformed&#40;AbstractButton.java&#58;2169&#41;
    	at javax.swing.DefaultButtonModel.fireActionPerformed&#40;DefaultButtonModel.java&#58;420&#41;
    	at javax.swing.DefaultButtonModel.setPressed&#40;DefaultButtonModel.java&#58;258&#41;
    	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased&#40;BasicButtonListener.java&#58;234&#41;
    	at java.awt.Component.processMouseEvent&#40;Component.java&#58;5488&#41;
    	at javax.swing.JComponent.processMouseEvent&#40;JComponent.java&#58;3093&#41;
    	at java.awt.Component.processEvent&#40;Component.java&#58;5253&#41;
    	at java.awt.Container.processEvent&#40;Container.java&#58;1966&#41;
    	at java.awt.Component.dispatchEventImpl&#40;Component.java&#58;3955&#41;
    	at java.awt.Container.dispatchEventImpl&#40;Container.java&#58;2024&#41;
    	at java.awt.Component.dispatchEvent&#40;Component.java&#58;3803&#41;
    	at java.awt.LightweightDispatcher.retargetMouseEvent&#40;Container.java&#58;4212&#41;
    	at java.awt.LightweightDispatcher.processMouseEvent&#40;Container.java&#58;3892&#41;
    	at java.awt.LightweightDispatcher.dispatchEvent&#40;Container.java&#58;3822&#41;
    	at java.awt.Container.dispatchEventImpl&#40;Container.java&#58;2010&#41;
    	at java.awt.Window.dispatchEventImpl&#40;Window.java&#58;1766&#41;
    	at java.awt.Component.dispatchEvent&#40;Component.java&#58;3803&#41;
    	at java.awt.EventQueue.dispatchEvent&#40;EventQueue.java&#58;463&#41;
    	at java.awt.EventDispatchThread.pumpOneEventForHierarchy&#40;EventDispatchThread.java&#58;234&#41;
    	at java.awt.EventDispatchThread.pumpEventsForHierarchy&#40;EventDispatchThread.java&#58;163&#41;
    	at java.awt.EventDispatchThread.pumpEventsForHierarchy&#40;EventDispatchThread.java&#58;153&#41;
    	at java.awt.Dialog$1.run&#40;Dialog.java&#58;515&#41;
    	at java.awt.event.InvocationEvent.dispatch&#40;InvocationEvent.java&#58;209&#41;
    	at java.awt.EventQueue.dispatchEvent&#40;EventQueue.java&#58;461&#41;
    	at java.awt.EventDispatchThread.pumpOneEventForHierarchy&#40;EventDispatchThread.java&#58;234&#41;
    	at java.awt.EventDispatchThread.pumpEventsForHierarchy&#40;EventDispatchThread.java&#58;163&#41;
    	at java.awt.EventDispatchThread.pumpEvents&#40;EventDispatchThread.java&#58;157&#41;
    	at java.awt.EventDispatchThread.pumpEvents&#40;EventDispatchThread.java&#58;149&#41;
    	at java.awt.EventDispatchThread.run&#40;EventDispatchThre
    I clicked on the OK button on the message window and then cancel on the login dialog window and was able to use the application normally.

  • #2
    Thanks for sharing this, Rob!

    I ran into the first issue myself today and after fiddling with it for a while I went here to see if there was a fix for it. So your post saved me the trouble with issue 2.

    Number 3 didn't happen to me, so maybe it's been fixed?

    And ... could someone PLEASE fix in the source? It should take about 7,5 minutes, but for people new to Spring (and RCP) it may take hours to figure out.

    /Ragnar

    Comment


    • #3
      Correction!

      Number 3 does happen to me, too. I clicked Cancel on the authentication dialog the first time, and then it does'nt happen.

      If I enter bad credentials, I get a proper error message.
      If I enter correct credentials, the aforementioned error occurs.

      In other words, the only way to enter the (client/server) PetClinic application going is to click Cancel in the authentication dialog box.

      BTW, the error message dialog is worth some attention in itself. The error message is very long and seems to have no CR/LF's, resulting in a one line dialog of about .... 1 meter in width. No kidding!

      /Ragnar

      Comment


      • #4
        I correct like this

        I remove all spring's seperate jar. add the spring.jar instead.,it's ok.

        Comment

        Working...
        X