Results 1 to 4 of 4

Thread: Integrating Flex/BlazeDS in the web layer

  1. #1
    Join Date
    Oct 2006
    Location
    Brindisi
    Posts
    14

    Default Integrating Flex/BlazeDS in the web layer

    Ok, I've adapted for my project the greenpages 2.0.0 web module and tried to add blazeds in my web layer's POM file:
    Code:
    <dependency>
    	<groupId>org.springframework.flex</groupId>
    	<artifactId>org.springframework.flex</artifactId>
    	<version>1.0.0.RELEASE</version>
    </dependency>
    <dependency>
    	<groupId>com.adobe.flex</groupId>
    	<artifactId>com.springsource.flex.messaging.common</artifactId>
    	<version>${spring.blazeds.version}</version>
    </dependency><dependency>
    	<groupId>com.adobe.flex</groupId>
    	<artifactId>com.springsource.flex.messaging</artifactId>
    	<version>${spring.blazeds.version}</version>
    </dependency>
    <dependency>
    	<groupId>com.adobe.flex</groupId>
    	<artifactId>com.springsource.flex.messaging.services.http</artifactId>
    	<version>${spring.blazeds.version}</version>
    </dependency>
    <dependency>
    	<groupId>com.adobe.flex</groupId>
    	<artifactId>com.springsource.flex.messaging.services.remoting</artifactId>
    	<version>${spring.blazeds.version}</version>
    </dependency>
    And modified the template.mf:
    Code:
    Manifest-Version: 1.0
    Bundle-Classpath: .
    Bundle-Version: 2.0
    Bundle-ManifestVersion: 2
    Import-Library:
     org.springframework.spring;version="[2.5.6, 3.1.0)"
    Import-Bundle: 
     org.springframework.flex;version="[1.0.0.RELEASE,1.0.0.RELEASE]",
     com.springsource.flex.messaging;version="${spring.blazeds.version}",
     com.springsource.flex.messaging.common;version="${spring.blazeds.version}",
     com.springsource.flex.messaging.services.http;version="${spring.blazeds.version}",
     com.springsource.flex.messaging.services.remoting;version="${spring.blazeds.version}",
     com.springsource.net.sf.cglib;version="[2.1.3,2.1.3]"
    Import-Package: 
     javax.servlet;version="[2.5.0,2.5.0]",
     javax.servlet.http;version="[2.5.0,2.5.0]",
     com.springsource.server.web.dm;version="[1.0.0, 3.0.0)",
     org.springframework.web.context;version="[2.5.6, 3.1.0)"
    Excluded-Imports: 
     org.springframework.test.*,
     org.junit.*
    Import-Template: 
     org.springframework.*;version="[2.5.6, 3.1.0)",
     flex.messaging.*;version="${spring.blazeds.version}"
    Excluded-Exports: 
     it.amtservices.ido2.core.web
    Export-Template: 
     it.amtservices.ido2.core.service.*;version="${project.version}"
    Bundle-Vendor: ${organization.name} (${organization.url})
    Bundle-SymbolicName: ${project.artifactId}
    Bundle-Name: ${bundle.name}
    Bundle-Version: ${project.version}
    Web-ContextPath: ${webapp.name}
    Then I've added the new web artifact in the PAR and deployed it, adding the new BlazeDS-related bundles to the $DMS_HOME/repository/bundles/usr directory.

    Starting the server means a chain of missing dependencies where I had to add xerces xalan 2.7.0, xerces 2.8.1, xml commons and so on until I finally get:
    Code:
    [2009-08-21 22:01:56.311] fs-watcher               <SPDE0018E> Unable to install application from location 'file:/home/mario/apps/springsource/dm-server-1.0.2.SR02/pickup/ido2.backend-1.0.0.SNAPSHOT.par'. Could not satisfy constraints for bundle 'ido2-1.0.0.SNAPSHOT-core.web' at version '1.0.0.SNAPSHOT'.
     Cannot resolve: ido2-1.0.0.SNAPSHOT-core.web
      Resolver report:
        Bundle: com.springsource.org.apache.xalan_2.7.0 - Missing Constraint: Import-Package: org.apache.xerces.parsers; version="[2.8.1,3.0.0)"
        Bundle: com.springsource.org.apache.xerces_2.8.1 - Constraints from the fragment conflict with the host: Import-Package: javax.xml.datatype; version="0.0.0"
        Bundle: com.springsource.org.apache.xerces_2.8.1 - Constraints from the fragment conflict with the host: Import-Package: javax.xml.namespace; version="0.0.0"
        Bundle: com.springsource.org.apache.xerces_2.8.1 - Constraints from the fragment conflict with the host: Import-Package: javax.xml.parsers; version="0.0.0"
        Bundle: com.springsource.org.apache.xerces_2.8.1 - Constraints from the fragment conflict with the host: Import-Package: javax.xml.transform; version="0.0.0"
        Bundle: com.springsource.org.apache.xerces_2.8.1 - Constraints from the fragment conflict with the host: Import-Package: javax.xml.transform.dom; version="0.0.0"
        Bundle: com.springsource.org.apache.xerces_2.8.1 - Constraints from the fragment conflict with the host: Import-Package: javax.xml.transform.sax; version="0.0.0"
        Bundle: com.springsource.org.apache.xerces_2.8.1 - Constraints from the fragment conflict with the host: Import-Package: javax.xml.transform.stream; version="0.0.0"
        Bundle: com.springsource.org.apache.xerces_2.8.1 - Constraints from the fragment conflict with the host: Import-Package: javax.xml.validation; version="0.0.0"
        Bundle: com.springsource.org.apache.xerces_2.8.1 - Constraints from the fragment conflict with the host: Import-Package: org.apache.xml.resolver; version="[1.2.0,1.3.0)"
        Bundle: com.springsource.org.apache.xerces_2.8.1 - Constraints from the fragment conflict with the host: Import-Package: org.apache.xml.resolver.readers; version="[1.2.0,1.3.0)"
        Bundle: com.springsource.org.apache.xerces_2.8.1 - Constraints from the fragment conflict with the host: Import-Package: org.w3c.dom; version="0.0.0"
        Bundle: com.springsource.org.apache.xerces_2.8.1 - Constraints from the fragment conflict with the host: Import-Package: org.w3c.dom.events; version="0.0.0"
        Bundle: com.springsource.org.apache.xerces_2.8.1 - Constraints from the fragment conflict with the host: Import-Package: org.w3c.dom.html; version="0.0.0"
        Bundle: com.springsource.org.apache.xerces_2.8.1 - Constraints from the fragment conflict with the host: Import-Package: org.w3c.dom.ls; version="0.0.0"
        Bundle: com.springsource.org.apache.xerces_2.8.1 - Constraints from the fragment conflict with the host: Import-Package: org.w3c.dom.ranges; version="0.0.0"
        Bundle: com.springsource.org.apache.xerces_2.8.1 - Constraints from the fragment conflict with the host: Import-Package: org.w3c.dom.traversal; version="0.0.0"
        Bundle: com.springsource.org.apache.xerces_2.8.1 - Constraints from the fragment conflict with the host: Import-Package: org.xml.sax; version="0.0.0"
        Bundle: com.springsource.org.apache.xerces_2.8.1 - Constraints from the fragment conflict with the host: Import-Package: org.xml.sax.ext; version="0.0.0"
        Bundle: com.springsource.org.apache.xerces_2.8.1 - Constraints from the fragment conflict with the host: Import-Package: org.xml.sax.helpers; version="0.0.0"
    .
    [2009-08-21 22:01:56.315] fs-watcher               <SPDE0011E> Deployment of 'ido2' version '1.0.0.SNAPSHOT' failed.
    Maybe it is a bit late here and I'm sleeping but may someone point me where to look for solutions?
    "Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are,
    by definition, not smart enough to debug it." - Brian W. Kernighan

  2. #2
    Join Date
    Oct 2006
    Location
    Brindisi
    Posts
    14

    Question

    [Replying to myself]

    I've found this post in the archive giving me the right hints. I've switched back to dm server 1.0.2.SR2, spring 2.5.6.A and related dependencies (spring dm 1.1.3.B, aspectj 1.6.2, ...) but now I'm getting this different error:
    Code:
    [2009-08-23 22:40:20.249] fs-watcher               <SPDE0048I> Processing 'INITIAL' event for file 'ido2.backend-1.0.0.SNAPSHOT.par'.
    [2009-08-23 22:40:24.562] fs-watcher               <SPFF0002I> Wrote dump file "/home/mario/apps/springsource/dm-server-1.0.2.SR02.ORIG/serviceability/dump/2009-08-23_22-40-24.dump"
    [2009-08-23 22:40:24.761] fs-watcher               <SPDE0018E> Unable to install application from location 'file:/home/mario/apps/springsource/dm-server-1.0.2.SR02.ORIG/pickup/ido2.backend-1.0.0.SNAPSHOT.par'. Could not satisfy constraints for bundle 'ido2-1.0.0.SNAPSHOT-ido2-synthetic.context' at version '1.0.0.SNAPSHOT'.
     Cannot resolve: ido2-1.0.0.SNAPSHOT-ido2-synthetic.context
      Resolver report:
        Bundle: ido2-1.0.0.SNAPSHOT-ido2-synthetic.context_1.0.0.SNAPSHOT - Missing Constraint: Import-Package: it.amtservices.ido2.core.service; version="1.0.0.SNAPSHOT"
        Bundle: ido2-1.0.0.SNAPSHOT-core.repository.jpa_1.0.0.SNAPSHOT - Uses Conflict: Import-Package: org.springframework.beans.factory.aspectj; version="2.5.6.A"
          Possible Supplier: org.springframework.aspects_2.5.6.A - Export-Package: org.springframework.beans.factory.aspectj; version="2.5.6.A"
            Possible Conflicts: org.springframework.beans.factory.annotation,org.springframework.beans,org.aspectj.lang,org.springframework.beans.factory
        Bundle: ido2-1.0.0.SNAPSHOT-core.service_1.0.0.SNAPSHOT - Uses Conflict: Import-Package: org.springframework.beans.factory.aspectj; version="2.5.6.A"
          Possible Supplier: org.springframework.aspects_2.5.6.A - Export-Package: org.springframework.beans.factory.aspectj; version="2.5.6.A"
            Possible Conflicts: org.springframework.beans.factory.annotation,org.springframework.beans,org.aspectj.lang,org.springframework.beans.factory
    .
    [2009-08-23 22:40:24.766] fs-watcher               <SPDE0011E> Deployment of 'ido2' version '1.0.0.SNAPSHOT' failed.
    [2009-08-23 22:40:24.772] fs-watcher               <SPDE0005E> Hot deploy failed for resource '/home/mario/apps/springsource/dm-server-1.0.2.SR02.ORIG/pickup/ido2.backend-1.0.0.SNAPSHOT.par'.
    [2009-08-23 22:40:24.774] fs-watcher               <SPDE0048I> Processing 'INITIAL' event for file 'server.admin.splash-1.0.2.SR02.jar'.
    [2009-08-23 22:40:25.189] fs-watcher               <SPSC1000I> Creating web application '/'.
    [2009-08-23 22:40:25.452] async-delivery-thread-1  <SPSC1001I> Starting web application '/'.
    [2009-08-23 22:40:25.778] fs-watcher               <SPDE0010I> Deployment of 'com.springsource.server.servlet.splash' version '1.0.2.SR02' completed.
    [2009-08-23 22:40:25.779] fs-watcher               <SPDE0048I> Processing 'INITIAL' event for file 'server.admin.web-1.0.2.SR02.jar'.
    [2009-08-23 22:40:26.150] fs-watcher               <SPSC1000I> Creating web application '/admin'.
    [2009-08-23 22:40:26.380] async-delivery-thread-1  <SPSC1001I> Starting web application '/admin'.
    [2009-08-23 22:40:20.249] fs-watcher               <SPDE0048I> Processing 'INITIAL' event for file 'ido2.backend-1.0.0.SNAPSHOT.par'.
    [2009-08-23 22:40:24.562] fs-watcher               <SPFF0002I> Wrote dump file "/home/mario/apps/springsource/dm-server-1.0.2.SR02.ORIG/serviceability/dump/2009-08-23_22-40-24.dump"
    [2009-08-23 22:40:24.761] fs-watcher               <SPDE0018E> Unable to install application from location 'file:/home/mario/apps/springsource/dm-server-1.0.2.SR02.ORIG/pickup/ido2.backend-1.0.0.SNAPSHOT.par'. Could not satisfy constraints for bundle 'ido2-1.0.0.SNAPSHOT-ido2-synthetic.context' at version '1.0.0.SNAPSHOT'.
     Cannot resolve: ido2-1.0.0.SNAPSHOT-ido2-synthetic.context
      Resolver report:
        Bundle: ido2-1.0.0.SNAPSHOT-ido2-synthetic.context_1.0.0.SNAPSHOT - Missing Constraint: Import-Package: it.amtservices.ido2.core.service; version="1.0.0.SNAPSHOT"
        Bundle: ido2-1.0.0.SNAPSHOT-core.repository.jpa_1.0.0.SNAPSHOT - Uses Conflict: Import-Package: org.springframework.beans.factory.aspectj; version="2.5.6.A"
          Possible Supplier: org.springframework.aspects_2.5.6.A - Export-Package: org.springframework.beans.factory.aspectj; version="2.5.6.A"
            Possible Conflicts: org.springframework.beans.factory.annotation,org.springframework.beans,org.aspectj.lang,org.springframework.beans.factory
        Bundle: ido2-1.0.0.SNAPSHOT-core.service_1.0.0.SNAPSHOT - Uses Conflict: Import-Package: org.springframework.beans.factory.aspectj; version="2.5.6.A"
          Possible Supplier: org.springframework.aspects_2.5.6.A - Export-Package: org.springframework.beans.factory.aspectj; version="2.5.6.A"
            Possible Conflicts: org.springframework.beans.factory.annotation,org.springframework.beans,org.aspectj.lang,org.springframework.beans.factory
    .
    [2009-08-23 22:40:24.766] fs-watcher               <SPDE0011E> Deployment of 'ido2' version '1.0.0.SNAPSHOT' failed.
    [2009-08-23 22:40:24.772] fs-watcher               <SPDE0005E> Hot deploy failed for resource '/home/mario/apps/springsource/dm-server-1.0.2.SR02.ORIG/pickup/ido2.backend-1.0.0.SNAPSHOT.par'.
    [2009-08-23 22:40:24.774] fs-watcher               <SPDE0048I> Processing 'INITIAL' event for file 'server.admin.splash-1.0.2.SR02.jar'.
    [2009-08-23 22:40:25.189] fs-watcher               <SPSC1000I> Creating web application '/'.
    [2009-08-23 22:40:25.452] async-delivery-thread-1  <SPSC1001I> Starting web application '/'.
    [2009-08-23 22:40:25.778] fs-watcher               <SPDE0010I> Deployment of 'com.springsource.server.servlet.splash' version '1.0.2.SR02' completed.
    [2009-08-23 22:40:25.779] fs-watcher               <SPDE0048I> Processing 'INITIAL' event for file 'server.admin.web-1.0.2.SR02.jar'.
    [2009-08-23 22:40:26.150] fs-watcher               <SPSC1000I> Creating web application '/admin'.
    [2009-08-23 22:40:26.380] async-delivery-thread-1  <SPSC1001I> Starting web application '/admin'.
    I do not understand what doest it want: that the org.aspecj.lang package is provided by more than one source? How to undestand who is culprit the since the server is suggesting the same bundle as possible provider? Any idea?
    "Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are,
    by definition, not smart enough to debug it." - Brian W. Kernighan

  3. #3
    Join Date
    Oct 2006
    Location
    Brindisi
    Posts
    14

    Thumbs up

    Just for history (and maybe helpful for others): the usual wrong Import-* was present but hidden by other problems in the Web module .

    So I just rebuilt the PAR without the web module, deployed it, fixed the missing/wrong imports and then re-enabled the web module (fixing its own problems).

    Now all is as it should and can start building the real application of OSGi
    "Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are,
    by definition, not smart enough to debug it." - Brian W. Kernighan

  4. #4
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    Thanks for reporting back the cause of your problems and the solution.
    Cheers,
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

Tags for this Thread

Posting Permissions

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