Announcement Announcement Module
Collapse
No announcement yet.
STS 2.5.2 Error Message during save/build Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • STS 2.5.2 Error Message during save/build

    Hi,

    I have a Mac Snow Leopard and am using STS 2.5.2 Carbon w/the Flex 4 plugin.

    When I am in the Flex perspective, there is no problem.

    However, when I am in the Java perspective, any time I save a Java class I get the follow error:

    'Errors occurred during the build'

    Building Spring AOP reference model
    Building workspace

    The 'Details' message:

    Errors occurred during the build.
    Errors running builder 'Spring Project Builder' on project 'My_Project'.
    java.lang.NullPointerException

    ...any help further diagnosing the problem or fixing it would be most appreciated. I can still save/build and run the project, but it is irritating to have to clear this error with 'OK' (no, it isn't) every time I save.

    Thanks !

  • #2
    Hi,

    could take a look at your Error Log. There should be more information about this NPE available. Let me know what you find and I take a look at asap. This shouldn't be too hard to fix.

    Regards, Christian

    Comment


    • #3
      Thanks, Christian!

      Here are the log file entries (message in 2 parts since it is more than 10k characters):

      !ENTRY org.springframework.ide.eclipse.beans.core 2 0 2011-01-29 11:35:56.356
      !MESSAGE Problem loading NamespaceHandler for 'http://www.springframework.org/schema/flex'.
      !STACK 0
      org.springframework.beans.factory.BeanCreationExce ption: Could not construct an appropriate implementation of org.springframework.flex.config.xml.SpringSecurity ConfigHelper; nested exception is java.lang.ClassNotFoundException: org.springframework.flex.config.xml.SpringSecurity 2ConfigHelper
      at org.springframework.flex.config.xml.SpringSecurity ConfigResolver.createConfigHelper(SpringSecurityCo nfigResolver.java:30)
      at org.springframework.flex.config.xml.SpringSecurity ConfigResolver.resolve(SpringSecurityConfigResolve r.java:21)
      at org.springframework.flex.config.xml.MessageBrokerB eanDefinitionParser.<init>(MessageBrokerBeanDefini tionParser.java:143)
      at org.springframework.flex.config.xml.FlexNamespaceH andler.init(FlexNamespaceHandler.java:34)
      at org.springframework.beans.factory.xml.DefaultNames paceHandlerResolver.resolve(DefaultNamespaceHandle rResolver.java:130)
      at org.springframework.ide.eclipse.beans.core.interna l.model.namespaces.DelegatingNamespaceHandlerResol ver.resolve(DelegatingNamespaceHandlerResolver.jav a:87)
      at org.springframework.ide.eclipse.beans.core.interna l.model.BeansConfig$ErrorSuppressingBeanDefinition ParserDelegate.parseCustomElement(BeansConfig.java :1256)
      at org.springframework.beans.factory.xml.BeanDefiniti onParserDelegate.parseCustomElement(BeanDefinition ParserDelegate.java:1325)
      at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.parseBeanDefinitions(Defau ltBeanDefinitionDocumentReader.java:135)
      at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.registerBeanDefinitions(De faultBeanDefinitionDocumentReader.java:93)
      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.registerBeanDefinitions(XmlBeanDefinit ionReader.java:493)
      at org.springframework.ide.eclipse.beans.core.interna l.model.BeansConfig$2.registerBeanDefinitions(Bean sConfig.java:388)
      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio nReader.java:390)
      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:334)
      at org.springframework.ide.eclipse.beans.core.interna l.model.BeansConfig$2.loadBeanDefinitions(BeansCon fig.java:374)
      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:302)
      at org.springframework.ide.eclipse.beans.core.interna l.model.BeansConfig$3.call(BeansConfig.java:418)
      at org.springframework.ide.eclipse.beans.core.interna l.model.BeansConfig$3.call(BeansConfig.java:1)
      at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.jav a:138)
      at java.util.concurrent.Executors$RunnableAdapter.cal l(Executors.java:441)
      at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.jav a:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:680)
      Caused by: java.lang.ClassNotFoundException: org.springframework.flex.config.xml.SpringSecurity 2ConfigHelper
      at java.net.URLClassLoader$1.run(URLClassLoader.java: 202)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.j ava:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:3 07)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:301)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:2 48)
      at org.eclipse.core.runtime.internal.adaptor.ContextF inder.loadClass(ContextFinder.java:129)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:2 48)
      at org.springframework.util.ClassUtils.forName(ClassU tils.java:257)
      at org.springframework.util.ClassUtils.forName(ClassU tils.java:204)
      at org.springframework.flex.config.xml.SpringSecurity ConfigResolver.createConfigHelper(SpringSecurityCo nfigResolver.java:28)
      ... 25 more

      !ENTRY org.springframework.ide.eclipse.core 4 2 2011-01-29 11:35:57.631
      !MESSAGE Problems occurred when invoking code from plug-in: "org.springframework.ide.eclipse.core".
      !STACK 0
      java.lang.NullPointerException
      at org.springframework.ide.eclipse.core.model.java.Ja vaModelSourceLocation.getResource(JavaModelSourceL ocation.java:55)
      at org.springframework.ide.eclipse.beans.core.interna l.model.Bean.getElementResource(Bean.java:113)
      at org.springframework.ide.eclipse.core.model.Abstrac tResourceModelElement.hashCode(AbstractResourceMod elElement.java:45)
      at org.springframework.ide.eclipse.core.model.Abstrac tSourceModelElement.hashCode(AbstractSourceModelEl ement.java:137)
      at org.springframework.ide.eclipse.beans.core.interna l.model.Bean.hashCode(Bean.java:311)
      at java.util.HashMap.put(HashMap.java:372)
      at java.util.HashSet.add(HashSet.java:200)
      at java.util.AbstractCollection.addAll(AbstractCollec tion.java:305)
      at java.util.LinkedHashSet.<init>(LinkedHashSet.java: 152)
      at org.springframework.ide.eclipse.beans.core.interna l.model.AbstractBeansConfig.getBeans(AbstractBeans Config.java:272)
      at org.springframework.ide.eclipse.beans.core.interna l.model.validation.BeansConfigReloadingProjectCont ributionEventListener.start(BeansConfigReloadingPr ojectContributionEventListener.java:118)
      at org.springframework.ide.eclipse.core.internal.proj ect.SpringProjectContributionManager$1.execute(Spr ingProjectContributionManager.java:88)
      at org.springframework.ide.eclipse.core.internal.proj ect.SpringProjectContributionManager$9.run(SpringP rojectContributionManager.java:269)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner .java:42)
      at org.springframework.ide.eclipse.core.internal.proj ect.SpringProjectContributionManager.execute(Sprin gProjectContributionManager.java:272)
      at org.springframework.ide.eclipse.core.internal.proj ect.SpringProjectContributionManager.build(SpringP rojectContributionManager.java:85)
      at org.eclipse.core.internal.events.BuildManager$2.ru n(BuildManager.java:629)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner .java:42)
      at org.eclipse.core.internal.events.BuildManager.basi cBuild(BuildManager.java:172)
      at org.eclipse.core.internal.events.BuildManager.basi cBuild(BuildManager.java:203)
      at org.eclipse.core.internal.events.BuildManager$1.ru n(BuildManager.java:255)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner .java:42)
      at org.eclipse.core.internal.events.BuildManager.basi cBuild(BuildManager.java:258)
      at org.eclipse.core.internal.events.BuildManager.basi cBuildLoop(BuildManager.java:311)
      at org.eclipse.core.internal.events.BuildManager.buil d(BuildManager.java:343)
      at org.eclipse.core.internal.events.AutoBuildJob.doBu ild(AutoBuildJob.java:144)
      at org.eclipse.core.internal.events.AutoBuildJob.run( AutoBuildJob.java:242)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.j ava:54)

      Comment


      • #4
        !ENTRY org.eclipse.core.resources 4 2 2011-01-29 11:35:57.650
        !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
        !STACK 0
        java.lang.NullPointerException
        at org.springframework.ide.eclipse.core.model.java.Ja vaModelSourceLocation.getResource(JavaModelSourceL ocation.java:55)
        at org.springframework.ide.eclipse.beans.core.interna l.model.Bean.getElementResource(Bean.java:113)
        at org.springframework.ide.eclipse.beans.core.interna l.model.BeansModelUtils.getProject(BeansModelUtils .java:694)
        at org.springframework.ide.eclipse.beans.core.interna l.model.BeansModelUtils.extractBeanClass(BeansMode lUtils.java:1409)
        at org.springframework.ide.eclipse.beans.core.interna l.model.BeansModelUtils.resolveBeanType(BeansModel Utils.java:1398)
        at org.springframework.ide.eclipse.beans.core.interna l.model.BeansModelUtils.getBeansByContainingTypes( BeansModelUtils.java:1354)
        at org.springframework.ide.eclipse.beans.core.interna l.model.validation.BeansTypeHierachyState.getBeans ByContainingTypes(BeansTypeHierachyState.java:56)
        at org.springframework.ide.eclipse.beans.core.metadat a.internal.model.BeanMetadataProjectBuilder.getAff ectedResources(BeanMetadataProjectBuilder.java:101 )
        at org.springframework.ide.eclipse.core.internal.proj ect.SpringProjectContributionManager$ResourceDelta Visitor.visit(SpringProjectContributionManager.jav a:324)
        at org.eclipse.core.internal.events.ResourceDelta.acc ept(ResourceDelta.java:68)
        at org.eclipse.core.internal.events.ResourceDelta.acc ept(ResourceDelta.java:79)
        at org.eclipse.core.internal.events.ResourceDelta.acc ept(ResourceDelta.java:79)
        at org.eclipse.core.internal.events.ResourceDelta.acc ept(ResourceDelta.java:79)
        at org.eclipse.core.internal.events.ResourceDelta.acc ept(ResourceDelta.java:48)
        at org.springframework.ide.eclipse.core.internal.proj ect.SpringProjectContributionManager.getAffectedRe sources(SpringProjectContributionManager.java:138)
        at org.springframework.ide.eclipse.core.internal.proj ect.SpringProjectContributionManager.build(SpringP rojectContributionManager.java:97)
        at org.eclipse.core.internal.events.BuildManager$2.ru n(BuildManager.java:629)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner .java:42)
        at org.eclipse.core.internal.events.BuildManager.basi cBuild(BuildManager.java:172)
        at org.eclipse.core.internal.events.BuildManager.basi cBuild(BuildManager.java:203)
        at org.eclipse.core.internal.events.BuildManager$1.ru n(BuildManager.java:255)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner .java:42)
        at org.eclipse.core.internal.events.BuildManager.basi cBuild(BuildManager.java:258)
        at org.eclipse.core.internal.events.BuildManager.basi cBuildLoop(BuildManager.java:311)
        at org.eclipse.core.internal.events.BuildManager.buil d(BuildManager.java:343)
        at org.eclipse.core.internal.events.AutoBuildJob.doBu ild(AutoBuildJob.java:144)
        at org.eclipse.core.internal.events.AutoBuildJob.run( AutoBuildJob.java:242)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.j ava:54)

        !ENTRY org.eclipse.core.resources 4 75 2011-01-29 11:35:57.655
        !MESSAGE Errors occurred during the build.
        !SUBENTRY 1 org.springframework.ide.eclipse.core 4 75 2011-01-29 11:35:57.655
        !MESSAGE Errors running builder 'Spring Project Builder' on project 'My_Project'.
        !STACK 0
        java.lang.NullPointerException
        at org.springframework.ide.eclipse.core.model.java.Ja vaModelSourceLocation.getResource(JavaModelSourceL ocation.java:55)
        at org.springframework.ide.eclipse.beans.core.interna l.model.Bean.getElementResource(Bean.java:113)
        at org.springframework.ide.eclipse.beans.core.interna l.model.BeansModelUtils.getProject(BeansModelUtils .java:694)
        at org.springframework.ide.eclipse.beans.core.interna l.model.BeansModelUtils.extractBeanClass(BeansMode lUtils.java:1409)
        at org.springframework.ide.eclipse.beans.core.interna l.model.BeansModelUtils.resolveBeanType(BeansModel Utils.java:1398)
        at org.springframework.ide.eclipse.beans.core.interna l.model.BeansModelUtils.getBeansByContainingTypes( BeansModelUtils.java:1354)
        at org.springframework.ide.eclipse.beans.core.interna l.model.validation.BeansTypeHierachyState.getBeans ByContainingTypes(BeansTypeHierachyState.java:56)
        at org.springframework.ide.eclipse.beans.core.metadat a.internal.model.BeanMetadataProjectBuilder.getAff ectedResources(BeanMetadataProjectBuilder.java:101 )
        at org.springframework.ide.eclipse.core.internal.proj ect.SpringProjectContributionManager$ResourceDelta Visitor.visit(SpringProjectContributionManager.jav a:324)
        at org.eclipse.core.internal.events.ResourceDelta.acc ept(ResourceDelta.java:68)
        at org.eclipse.core.internal.events.ResourceDelta.acc ept(ResourceDelta.java:79)
        at org.eclipse.core.internal.events.ResourceDelta.acc ept(ResourceDelta.java:79)
        at org.eclipse.core.internal.events.ResourceDelta.acc ept(ResourceDelta.java:79)
        at org.eclipse.core.internal.events.ResourceDelta.acc ept(ResourceDelta.java:48)
        at org.springframework.ide.eclipse.core.internal.proj ect.SpringProjectContributionManager.getAffectedRe sources(SpringProjectContributionManager.java:138)
        at org.springframework.ide.eclipse.core.internal.proj ect.SpringProjectContributionManager.build(SpringP rojectContributionManager.java:97)
        at org.eclipse.core.internal.events.BuildManager$2.ru n(BuildManager.java:629)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner .java:42)
        at org.eclipse.core.internal.events.BuildManager.basi cBuild(BuildManager.java:172)
        at org.eclipse.core.internal.events.BuildManager.basi cBuild(BuildManager.java:203)
        at org.eclipse.core.internal.events.BuildManager$1.ru n(BuildManager.java:255)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner .java:42)
        at org.eclipse.core.internal.events.BuildManager.basi cBuild(BuildManager.java:258)
        at org.eclipse.core.internal.events.BuildManager.basi cBuildLoop(BuildManager.java:311)
        at org.eclipse.core.internal.events.BuildManager.buil d(BuildManager.java:343)
        at org.eclipse.core.internal.events.AutoBuildJob.doBu ild(AutoBuildJob.java:144)
        at org.eclipse.core.internal.events.AutoBuildJob.run( AutoBuildJob.java:242)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.j ava:54)

        !ENTRY org.eclipse.core.jobs 4 2 2011-01-29 11:35:57.912
        !MESSAGE An internal error occurred during: "Building Spring AOP reference model".
        !STACK 0
        java.lang.NullPointerException
        at org.springframework.ide.eclipse.core.model.java.Ja vaModelSourceLocation.getResource(JavaModelSourceL ocation.java:55)
        at org.springframework.ide.eclipse.beans.core.interna l.model.Bean.getElementResource(Bean.java:113)
        at org.springframework.ide.eclipse.aop.core.internal. model.builder.AopReferenceModelBuilderJob.buildAop ReferencesForBeans(AopReferenceModelBuilderJob.jav a:277)
        at org.springframework.ide.eclipse.aop.core.internal. model.builder.AopReferenceModelBuilderJob.buildAop ReferencesForBeansConfig(AopReferenceModelBuilderJ ob.java:304)
        at org.springframework.ide.eclipse.aop.core.internal. model.builder.AopReferenceModelBuilderJob.buildAop ReferencesForFile(AopReferenceModelBuilderJob.java :344)
        at org.springframework.ide.eclipse.aop.core.internal. model.builder.AopReferenceModelBuilderJob.buildAop Model(AopReferenceModelBuilderJob.java:441)
        at org.springframework.ide.eclipse.aop.core.internal. model.builder.AopReferenceModelBuilderJob.run(AopR eferenceModelBuilderJob.java:158)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.j ava:54)

        Comment


        • #5
          Hi,

          the NPE is fixed in latest STS 2.6.0.M1. Would it be possible for you to update to this version? You can use the following update site to install the M1: http://dist.springsource.com/milesto...S/update/e3.5/ for Eclipse 3.5 or http://dist.springsource.com/milesto...S/update/e3.6/ for Eclipse 3.6.

          The ClassNotFoundException seems to be an issue with an incomplete project classpath. Can you tell me what version for Spring Flex you are using and if you're using Maven could you provide your pom.xml? If you don't use Maven could you provide the .classpath file?

          Thanks, Christian

          Comment


          • #6
            I will try the upgrade to STS 2.6.0.M1 and let you know how it works.

            Spring-Flex 1.0.3-Release

            I do not use Maven.

            Where do I find the .classpath file on Snow Leopard ?

            Thanks again !!!

            Comment


            • #7
              Hi,

              the .classpath is in the root for your project. In Eclipse or STS you can open the "Navigator" view to see all the hidden files.

              Cheers, Christian

              Comment


              • #8
                Got it (I have my Mac Finder set to show hidden files):

                I don't know why it is showing tomcat 6 when I have my STS project set to tomcat 7.

                <?xml version="1.0" encoding="UTF-8"?>
                <classpath>
                <classpathentry excluding="*/.svn/*" kind="src" path="src"/>
                <classpathentry kind="src" path="test"/>
                <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXTy pe/JVM 1.6.0 (MacOS X Default)">
                <attributes>
                <attribute name="owner.project.facets" value="jst.java"/>
                </attributes>
                </classpathentry>
                <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.0">
                <attributes>
                <attribute name="owner.project.facets" value="jst.web"/>
                </attributes>
                </classpathentry>
                <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
                <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.contain er"/>
                <classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
                </classpath>

                Comment


                • #9
                  Thanks, one last question: what jars do you have in your WEB-INF/lib directory?

                  Christian

                  Comment


                  • #10
                    Many !

                    My stack is Flex/Swiz/OpenScales/BlazeDS/Spring/Spring-Flex/Spring-AMQP/Hibernate/Postgres


                    antlr-2.7.6.jar
                    aopalliance.jar
                    asm-3.3.jar
                    backport-util-concurrent.jar
                    cfgatewayadapter.jar
                    cglib-2.2.jar
                    commons-codec-1.3.jar
                    commons-collections-3.1.jar
                    commons-httpclient-3.0.1.jar
                    commons-io-1.4.jar
                    commons-logging.jar
                    dbunit-2.4.8.jar
                    dom4j-1.6.1.jar
                    flex-messaging-common.jar
                    flex-messaging-core.jar
                    flex-messaging-opt.jar
                    flex-messaging-proxy.jar
                    flex-messaging-remoting.jar
                    flex-rds-server.jar
                    h2-1.2.140.jar
                    hibernate-jpa-2.0-api-1.0.0.Final.jar
                    hibernate3.jar
                    jackson-all-1.6.4.jar
                    javassist.jar
                    jta-1.1.jar
                    junit-4.8.2.jar
                    log4j-1.2.16.jar
                    mail.jar
                    org.springframework.aop-3.0.5.RELEASE.jar
                    org.springframework.asm-3.0.5.RELEASE.jar
                    org.springframework.aspects-3.0.5.RELEASE.jar
                    org.springframework.beans-3.0.5.RELEASE.jar
                    org.springframework.context-3.0.5.RELEASE.jar
                    org.springframework.context.support-3.0.5.RELEASE.jar
                    org.springframework.core-3.0.5.RELEASE.jar
                    org.springframework.expression-3.0.5.RELEASE.jar
                    org.springframework.flex-1.0.3.RELEASE.jar
                    org.springframework.instrument-3.0.5.RELEASE.jar
                    org.springframework.instrument.tomcat-3.0.5.RELEASE.jar
                    org.springframework.jdbc-3.0.5.RELEASE.jar
                    org.springframework.jms-3.0.5.RELEASE.jar
                    org.springframework.orm-3.0.5.RELEASE.jar
                    org.springframework.oxm-3.0.5.RELEASE.jar
                    org.springframework.spring-library-3.0.5.RELEASE.libd
                    org.springframework.test-3.0.5.RELEASE.jar
                    org.springframework.transaction-3.0.5.RELEASE.jar
                    org.springframework.web-3.0.5.RELEASE.jar
                    org.springframework.web.portlet-3.0.5.RELEASE.jar
                    org.springframework.web.servlet-3.0.5.RELEASE.jar
                    org.springframework.web.struts-3.0.5.RELEASE.jar
                    postgresql-9.0dev-800.jdbc3.jar
                    rabbitmq-client.jar
                    slf4j-api-1.6.1.jar
                    slf4j-jcl-1.6.1.jar
                    spring-amqp-1.0.0.BUILD-20101227.013508-171.jar
                    spring-erlang-1.0.0.BUILD-20101227.013508-163.jar
                    spring-rabbit-1.0.0.BUILD-20101227.013508-182.jar
                    spring-rabbit-admin-1.0.0.BUILD-20101227.013508-182.jar
                    spring-security-acl-3.0.3.RELEASE.jar
                    spring-security-cas-client-3.0.3.RELEASE.jar
                    spring-security-config-3.0.3.RELEASE.jar
                    spring-security-core-3.0.3.RELEASE.jar
                    spring-security-ldap-3.0.3.RELEASE.jar
                    spring-security-openid-3.0.3.RELEASE.jar
                    spring-security-taglibs-3.0.3.RELEASE.jar
                    spring-security-web-3.0.3.RELEASE.jar

                    Comment


                    • #11
                      Hi Christian,

                      It looks like my upgrade to STS 2.6 M1 stops the annoying error message on every save.

                      However, it is still really, really slow when I do things like remove/re-add a BlazeDS service (re-sync after adding a method on the server).

                      It's my inspiration for this post: http://forum.springsource.org/showthread.php?t=102158

                      Comment

                      Working...
                      X