Announcement Announcement Module
Collapse
No announcement yet.
dm-serve 2.0 problem spring security dependancy breaks admin console Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Hi,

    It would seem OS is the difference, I can recreate what you are describing on XP but not Mac, we use Macs day to day for dev work. I have dug a little deeper and have an improved fix for you.

    In the java profile file, as well as adding the extra line, change the xerces line so it reads as follows.

    Code:
     org.apache.xalan.*,\
     org.apache.xerces.*,\
    Finally, instead of copying those apache jars to the repository/use directory, place them in the lib directory instead. Now the entire server will be using these instead of the ones that come with Java.

    I have had this working on XP so hopefully you will be good to go now.

    Chris.

    Comment


    • #17
      That seemed to have helped. Both /xalan and /admin contexts are working now.

      However, there are some bundles in repository/usr I use in my app which import package org.apache.xpath and these are not resolved during startup. Here's the list:

      Code:
      com.springsource.flex.messaging.common-3.2.0.3978.jar
      com.springsource.flex.messaging-3.2.0.3978.jar
      com.springsource.org.apache.activemq-5.3.0.jar
      com.springsource.org.apache.derby-10.5.1000001.764942.jar
      Does it mean these have to be fixed not to import that package?

      Comment


      • #18
        Hi,

        Glad to hear it. You are correct about the other bundles, they can not import that packages as technically nothing exports them. They will need to be modified. This can actually be automated to make like a little easier. Using Bundlor, http://www.springsource.org/bundlor . You can give it your modified Java profile and it will crack open the jar and re-write the manifest for you. Seeing is this is the tool used for everything in the EBR to start with it should get it right.

        Chris.

        Comment


        • #19
          The question in my mind really is whether profile in dm server distribution should be modified and also all bundles in EBR

          Comment


          • #20
            A valid point certainly. In your situation it would deffinetly be the right thing to do. We don't however what to make all other uses of dm Server use a different version of the XML transformers and associated code to the one provided with Java. The question then would be what version and I'd bet my hat that several uses would request different versions all for seemingly good reasons.

            I think the ideal solution would be some extra code that keeps an eye out for meta-inf/services definitions and adds the appropriate bundles to the classpath but that would be opening a can of worms I don't want to think about right now. Doing such things at runtime would not be easy.

            Chris.

            Comment


            • #21
              Hi Chris,

              Apologies for the late reply.

              This worked for me but I had to put the com.springsource.org.apache.xalan-2.7.0.jar into the lib and the repository/usr folders.

              Im using dm-server-2.0.1.RELEASE on:

              XP-Pro 2002 SP3.

              Comment


              • #22
                Hi,

                I can believe that, I suspect you are using the xalan lib more than my noddy testing as such it would need to be in the rep/usr folder as well as applications can't resolve against things in the lib dir.

                Thanks for publishing the info,
                Chris.

                Comment


                • #23
                  Experiencing the same issue, but fix didn't work

                  Hi, I have experienced the same issue. Applying the fix detailed in the post led to another exception when installing a par.

                  Code:
                  [2010-06-15 18:22:19.801] http-8080-1                  <DE0002E> Installation of
                   par 'net.company.project' version '1.0.0' failed. java.lang.ClassCastException: or
                  g.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.pars
                  ers.DocumentBuilderFactory
                          at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderF
                  actory.java:123)
                          at com.springsource.kernel.install.artifact.internal.SpringConfigService
                  ModelScanner.createDocumentBuilder(SpringConfigServiceModelScanner.java:203)
                          at com.springsource.kernel.install.artifact.internal.SpringConfigService
                  ModelScanner.<init>(SpringConfigServiceModelScanner.java:94)
                          at com.springsource.kernel.install.artifact.internal.ServiceScoper.doSco
                  pe(ServiceScoper.java:165)
                          at com.springsource.kernel.install.artifact.internal.ServiceScoper.scope
                  (ServiceScoper.java:98)
                          at com.springsource.kernel.install.artifact.internal.PlanScoper.scope(Pl
                  anScoper.java:147)
                          at com.springsource.kernel.install.artifact.internal.StandardPlanInstall
                  Artifact.scope(StandardPlanInstallArtifact.java:183)
                          at com.springsource.kernel.install.pipeline.stage.transform.internal.Sco
                  pingTransformer.processScopedPlanInstallArtifact(ScopingTransformer.java:59)
                          at com.springsource.kernel.install.pipeline.stage.transform.internal.Sco
                  pedPlanIdentifyingTreeVisitor.visit(ScopedPlanIdentifyingTreeVisitor.java:39)
                          at com.springsource.util.common.ThreadSafeArrayListTree.visit(ThreadSafe
                  ArrayListTree.java:172)
                          at com.springsource.kernel.install.pipeline.stage.transform.internal.Sco
                  pingTransformer.transform(ScopingTransformer.java:50)
                          at com.springsource.kernel.install.pipeline.stage.transform.internal.Tra
                  nsformationStage.doProcessTree(TransformationStage.java:64)
                          at com.springsource.kernel.install.pipeline.stage.AbstractPipelineStage.
                  process(AbstractPipelineStage.java:50)
                          at com.springsource.kernel.install.pipeline.internal.StandardPipeline.do
                  ProcessTree(StandardPipeline.java:71)
                          at com.springsource.kernel.install.pipeline.internal.CompensatingPipelin
                  e.doProcessTree(CompensatingPipeline.java:81)
                          at com.springsource.kernel.install.pipeline.stage.AbstractPipelineStage.
                  process(AbstractPipelineStage.java:50)
                          at com.springsource.kernel.install.pipeline.internal.StandardPipeline.do
                  ProcessTree(StandardPipeline.java:71)
                          at com.springsource.kernel.install.pipeline.stage.AbstractPipelineStage.
                  process(AbstractPipelineStage.java:50)
                          at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDe
                  ployer.driveInstallPipeline(PipelinedApplicationDeployer.java:277)
                          at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDe
                  ployer.doInstall(PipelinedApplicationDeployer.java:160)
                          at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDe
                  ployer.install(PipelinedApplicationDeployer.java:132)
                          at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDe
                  ployer.deploy(PipelinedApplicationDeployer.java:196)
                          at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDe
                  ployer.deploy(PipelinedApplicationDeployer.java:110)
                          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                  java:39)
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                          at java.lang.reflect.Method.invoke(Method.java:597)
                          at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
                  on(AopUtils.java:307)
                          at org.springframework.osgi.service.importer.support.internal.aop.Servic
                  eInvoker.doInvoke(ServiceInvoker.java:58)
                          at org.springframework.osgi.service.importer.support.internal.aop.Servic
                  eInvoker.invoke(ServiceInvoker.java:62)
                          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
                  ReflectiveMethodInvocation.java:172)
                          at org.springframework.aop.support.DelegatingIntroductionInterceptor.doP
                  roceed(DelegatingIntroductionInterceptor.java:131)
                          at org.springframework.aop.support.DelegatingIntroductionInterceptor.inv
                  oke(DelegatingIntroductionInterceptor.java:119)
                          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
                  ReflectiveMethodInvocation.java:172)
                          at org.springframework.osgi.service.importer.support.LocalBundleContextA
                  dvice.invoke(LocalBundleContextAdvice.java:59)
                          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
                  ReflectiveMethodInvocation.java:172)
                          at org.springframework.aop.support.DelegatingIntroductionInterceptor.doP
                  roceed(DelegatingIntroductionInterceptor.java:131)
                          at org.springframework.aop.support.DelegatingIntroductionInterceptor.inv
                  oke(DelegatingIntroductionInterceptor.java:119)
                          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
                  ReflectiveMethodInvocation.java:172)
                          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
                  cAopProxy.java:202)
                          at $Proxy130.deploy(Unknown Source)
                          at com.springsource.server.admin.content.artifact.StandardArtifactServic
                  e.deploy(StandardArtifactService.java:62)
                          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                  java:39)
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                          at java.lang.reflect.Method.invoke(Method.java:597)
                          at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
                  on(AopUtils.java:307)
                          at org.springframework.osgi.service.importer.support.internal.aop.Servic
                  eInvoker.doInvoke(ServiceInvoker.java:58)
                          at org.springframework.osgi.service.importer.support.internal.aop.Servic
                  eInvoker.invoke(ServiceInvoker.java:62)
                          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
                  ReflectiveMethodInvocation.java:172)
                          at org.springframework.aop.support.DelegatingIntroductionInterceptor.doP
                  roceed(DelegatingIntroductionInterceptor.java:131)
                          at org.springframework.aop.support.DelegatingIntroductionInterceptor.inv
                  oke(DelegatingIntroductionInterceptor.java:119)
                          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
                  ReflectiveMethodInvocation.java:172)
                          at org.springframework.osgi.service.importer.support.LocalBundleContextA
                  dvice.invoke(LocalBundleContextAdvice.java:59)
                          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
                  ReflectiveMethodInvocation.java:172)
                          at org.springframework.aop.support.DelegatingIntroductionInterceptor.doP
                  roceed(DelegatingIntroductionInterceptor.java:131)
                          at org.springframework.aop.support.DelegatingIntroductionInterceptor.inv
                  oke(DelegatingIntroductionInterceptor.java:119)
                          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
                  ReflectiveMethodInvocation.java:172)
                          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
                  cAopProxy.java:202)
                          at $Proxy136.deploy(Unknown Source)
                          at com.springsource.server.admin.web.ArtifactController.deployFile(Artif
                  actController.java:139)
                          at com.springsource.server.admin.web.ArtifactController.deploy(ArtifactC
                  ontroller.java:130)
                          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                  java:39)
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                          at java.lang.reflect.Method.invoke(Method.java:597)
                          at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.
                  doInvokeMethod(HandlerMethodInvoker.java:710)
                          at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.
                  invokeHandlerMethod(HandlerMethodInvoker.java:167)
                          at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandle
                  rAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:414)
                          at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandle
                  rAdapter.handle(AnnotationMethodHandlerAdapter.java:402)
                          at org.springframework.web.servlet.DispatcherServlet.doDispatch(Dispatch
                  erServlet.java:771)
                          at org.springframework.web.servlet.DispatcherServlet.doService(Dispatche
                  rServlet.java:716)
                          at org.springframework.web.servlet.FrameworkServlet.processRequest(Frame
                  workServlet.java:647)
                          at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServ
                  let.java:563)
                  Steps taken:
                  1. Added apache.xalan-2.7.1.jar
                  apache.xerces-2.9.1.jar
                  apache.xml.resolver-1.2.0.jar
                  apache.xml.serializer-2.7.1.jar
                  apache.xmlcommons-1.3.4.jar
                  to lib
                  2. Edited boot delegation section of java6-server.profile
                  org.apache.xalan.*,\
                  org.apache.xerces.*,\
                  3. Added apache.xalan-2.7.1 jar to repository/usr
                  4. Remove import xpath from bundle MANIFEST's.

                  Environment:
                  Windows 7
                  Dm Server version 2.0.2.RELEASE

                  Comment


                  • #24
                    Hi,

                    On first look this seems pretty nasty. The constructor for DocumentBuilderFactory can be passed a Classloader that should be used so in theory we should be able to just be more intelligent about which Classloader we pass in, if any. Could you expand a little more on your use case please. Why do you want to use an XML library other than the one that comes in the JRE. Also, what files have you added to the repository/usr folders.

                    Thanks, Chris.

                    Comment


                    • #25
                      My use case is very similar to jeremy's. My application uses com.springsource.flex.messaging which depend on

                      com.springsource.org.apache.xalan 2.7.1
                      com.springsource.org.apache.xerces 2.9.1
                      com.springsource.org.apache.xml.resolver 1.2.0
                      com.springsource.org.apache.xmlcommons 1.3.4
                      com.springsource.org.apache.xml.serializer 2.7.1

                      If I put these bundles in repository/usr, dm server throws exception when I try to open up web app /admin or /splash. It is the same exception listed in jeremy's first post.

                      To fix this problem, I took the steps detailed in my previous post, and came across this new exception.

                      My repository/usr:
                      com.springsource.flex.messaging.common
                      com.springsource.flex.messaging.services.remoting
                      com.springsource.flex.messaging

                      com.springsource.org.apache.xalan 2.7.1
                      com.springsource.org.apache.xerces 2.9.1
                      com.springsource.org.apache.xml.resolver 1.2.0
                      com.springsource.org.apache.xmlcommons 1.3.4
                      com.springsource.org.apache.xml.serializer 2.7.1
                      ...

                      The flex bundles depend on xpath, and didn't resolve without the apache bundles.

                      I have been playing with dm server 2 since fall last year, and still haven't garnered enough confidence to make the switch from dm server 1. DmS 1 worked out of the box, and hasn't given us any issues. What has changed from DmS 1 that introduced so much uncertainty? Any insight is appreciated.

                      Comment


                      • #26
                        Sorry for the slow reply, I've had a quick look at this and it's going to take a little work our end to get back to matching 1.0. The fixes I've been giving in this thread have just been moving the server more and more over to the other XML parser as one is also used in various parts of the server. I don't think we can go any further with just the servr set up so this needs some propper investigation and as it is a regretion it really should be fixed. Please could you raise an issue on the Virgo Bugzilla and reference this forum thread please.

                        Thanks for commenting,
                        Chris.

                        Comment

                        Working...
                        X