The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

walrus (14) [Avatar] Offline
#1
Hello,
On page 40, it is suggested to drop the 'fancyfoods.web-1.0.0.war' into the Aries Runtime 'Load' directory.
Where is this Load directory located?
It strikes me that at this time (following the instructions) I don't have a runtime except in the jar.
holly.cummins (16) [Avatar] Offline
#2
Re: Load Directory for Aries Runtime
Hi,

Section 2.1.2 has instructions for downloading and generating a simple runtime, based on Apache Aries. (It's actually the runtime Apache Aries use for their samples.) Once you've downloaded and built the Aries assembly using maven, you should find a directory called blog/blog-assembly/target/load, where you can drop the fancyfoods jar you've just built.

Please let us know if this helps, or if the instructions still aren't clear, or if you still haven't got a load directory!
walrus (14) [Avatar] Offline
#3
Re: Load Directory for Aries Runtime
Thank you,
It looks like the Load directory does not get created.

At the risk of giving you too much information, below is the Target directory after mvn install . . .

jack@jack-Inspiron-8600:~/Library/Apache/samples-0.3/blog/blog-assembly/target$ ls
aries.osgi.version.txt
asm-all-3.2.jar
blogDB.sql
cm-3.2.0-v20070116.jar
commons-collections-3.2.1.jar
commons-lang-2.5.jar
commons-pool-1.5.4.jar
configuration
derby-10.5.3.0_1.jar
geronimo-j2ee-connector_1.5_spec-2.0.0.jar
geronimo-jpa_2.0_spec-1.1.jar
geronimo-jta_1.1_spec-1.1.1.jar
geronimo-servlet_2.5_spec-1.2.jar
geronimo-transaction-2.1.3.jar
maven-shared-archive-resources
META-INF
openjpa-2.0.0.jar
org.apache.aries.application.api-0.3.jar
org.apache.aries.application.default.local.platform-0.3.jar
org.apache.aries.application.deployment.management-0.3.jar
org.apache.aries.application.install-0.3.jar
org.apache.aries.application.management-0.3.jar
org.apache.aries.application.modeller-0.3.jar
org.apache.aries.application.noop.platform.repo-0.3.jar
org.apache.aries.application.noop.postresolve.process-0.3.jar
org.apache.aries.application.resolver.obr-0.3.jar
org.apache.aries.application.runtime-0.3.jar
org.apache.aries.application.utils-0.3.jar
org.apache.aries.blueprint-0.3.jar
org.apache.aries.jndi-0.3.jar
org.apache.aries.jpa.api-0.3.jar
org.apache.aries.jpa.blueprint.aries-0.3.jar
org.apache.aries.jpa.container-0.3.jar
org.apache.aries.jpa.container.context-0.3.jar
org.apache.aries.proxy-0.3.jar
org.apache.aries.samples.blog.datasource-0.3.jar
org.apache.aries.transaction.blueprint-0.3.jar
org.apache.aries.transaction.manager-0.3.jar
org.apache.aries.transaction.wrappers-0.3.jar
org.apache.aries.util-0.3.jar
org.apache.felix.bundlerepository-1.6.4.jar
org.apache.felix.fileinstall-3.1.4.jar
org.apache.servicemix.bundles.serp-1.13.1_2.jar
osgi-3.5.0.v20090520.jar
pax-logging-api-1.4.jar
pax-logging-service-1.4.jar
pax-web-extender-war-0.8.1.jar
pax-web-jetty-bundle-0.8.1.jar
pax-web-jsp-0.8.1.jar
services-3.1.200-v20070605.jar
jack@jack-Inspiron-8600:~/Library/Apache/samples-0.3/blog/blog-assembly/target$


The mvn output is . . .

[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.aries.samples.blog:org.apache.aries.samples.blog.assembly:pom:0.3
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:properties-maven-plugin is missing. @ org.apache.aries:default-parent:0.3, /home/jack/.m2/repository/org/apache/aries/default-parent/0.3/default-parent-0.3.pom, line 420, column 17
[WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-pmd-plugin is missing. @ org.apache.aries:java5-parent:0.3, /home/jack/.m2/repository/org/apache/aries/java5-parent/0.3/java5-parent-0.3.pom, line 133, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Apache Aries blog sample assembly 0.3
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (default) @ org.apache.aries.samples.blog.assembly ---
[INFO]
[INFO] --- maven-antrun-plugin:1.2:run (create-prop) @ org.apache.aries.samples.blog.assembly ---
[INFO] Executing tasks
[echo] Maven version: 0.3
[echo] OSGi version: 0.3.0
[mkdir] Created dir: /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target
[INFO] Executed tasks
[INFO]
[INFO] --- properties-maven-plugin:1.0-alpha-2:read-project-properties (default) @ org.apache.aries.samples.blog.assembly ---
[INFO]
[INFO] --- maven-remote-resources-plugin:1.1:process (default) @ org.apache.aries.samples.blog.assembly ---
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO]
[INFO] --- maven-resources-plugin:2.4:resources (filter) @ org.apache.aries.samples.blog.assembly ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 1 resource
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-dependency-plugin:2.1:copy-dependencies (copy) @ org.apache.aries.samples.blog.assembly ---
[INFO] Copying asm-all-3.2.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/asm-all-3.2.jar
[INFO] Copying commons-collections-3.2.1.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/commons-collections-3.2.1.jar
[INFO] Copying commons-lang-2.5.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/commons-lang-2.5.jar
[INFO] Copying commons-pool-1.5.4.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/commons-pool-1.5.4.jar
[INFO] Copying org.apache.aries.util-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.util-0.3.jar
[INFO] Copying org.apache.aries.application.api-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.application.api-0.3.jar
[INFO] Copying org.apache.aries.application.default.local.platform-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.application.default.local.platform-0.3.jar
[INFO] Copying org.apache.aries.application.deployment.management-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.application.deployment.management-0.3.jar
[INFO] Copying org.apache.aries.application.install-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.application.install-0.3.jar
[INFO] Copying org.apache.aries.application.management-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.application.management-0.3.jar
[INFO] Copying org.apache.aries.application.modeller-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.application.modeller-0.3.jar
[INFO] Copying org.apache.aries.application.noop.platform.repo-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.application.noop.platform.repo-0.3.jar
[INFO] Copying org.apache.aries.application.noop.postresolve.process-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.application.noop.postresolve.process-0.3.jar
[INFO] Copying org.apache.aries.application.resolver.obr-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.application.resolver.obr-0.3.jar
[INFO] Copying org.apache.aries.application.runtime-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.application.runtime-0.3.jar
[INFO] Copying org.apache.aries.application.utils-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.application.utils-0.3.jar
[INFO] Copying org.apache.aries.blueprint-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.blueprint-0.3.jar
[INFO] Copying org.apache.aries.jndi-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.jndi-0.3.jar
[INFO] Copying org.apache.aries.jpa.api-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.jpa.api-0.3.jar
[INFO] Copying org.apache.aries.jpa.blueprint.aries-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.jpa.blueprint.aries-0.3.jar
[INFO] Copying org.apache.aries.jpa.container-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.jpa.container-0.3.jar
[INFO] Copying org.apache.aries.jpa.container.context-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.jpa.container.context-0.3.jar
[INFO] Copying org.apache.aries.proxy-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.proxy-0.3.jar
[INFO] Copying org.apache.aries.samples.blog.datasource-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.samples.blog.datasource-0.3.jar
[INFO] Copying org.apache.aries.transaction.blueprint-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.transaction.blueprint-0.3.jar
[INFO] Copying org.apache.aries.transaction.manager-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.transaction.manager-0.3.jar
[INFO] Copying org.apache.aries.transaction.wrappers-0.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.aries.transaction.wrappers-0.3.jar
[INFO] Copying derby-10.5.3.0_1.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/derby-10.5.3.0_1.jar
[INFO] Copying org.apache.felix.bundlerepository-1.6.4.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.felix.bundlerepository-1.6.4.jar
[INFO] Copying org.apache.felix.fileinstall-3.1.4.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.felix.fileinstall-3.1.4.jar
[INFO] Copying geronimo-transaction-2.1.3.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/geronimo-transaction-2.1.3.jar
[INFO] Copying geronimo-j2ee-connector_1.5_spec-2.0.0.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/geronimo-j2ee-connector_1.5_spec-2.0.0.jar
[INFO] Copying geronimo-jpa_2.0_spec-1.1.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/geronimo-jpa_2.0_spec-1.1.jar
[INFO] Copying geronimo-jta_1.1_spec-1.1.1.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/geronimo-jta_1.1_spec-1.1.1.jar
[INFO] Copying geronimo-servlet_2.5_spec-1.2.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/geronimo-servlet_2.5_spec-1.2.jar
[INFO] Copying openjpa-2.0.0.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/openjpa-2.0.0.jar
[INFO] Copying org.apache.servicemix.bundles.serp-1.13.1_2.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/org.apache.servicemix.bundles.serp-1.13.1_2.jar
[INFO] Copying osgi-3.5.0.v20090520.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/osgi-3.5.0.v20090520.jar
[INFO] Copying cm-3.2.0-v20070116.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/cm-3.2.0-v20070116.jar
[INFO] Copying services-3.1.200-v20070605.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/services-3.1.200-v20070605.jar
[INFO] Copying pax-logging-api-1.4.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/pax-logging-api-1.4.jar
[INFO] Copying pax-logging-service-1.4.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/pax-logging-service-1.4.jar
[INFO] Copying pax-web-extender-war-0.8.1.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/pax-web-extender-war-0.8.1.jar
[INFO] Copying pax-web-jetty-bundle-0.8.1.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/pax-web-jetty-bundle-0.8.1.jar
[INFO] Copying pax-web-jsp-0.8.1.jar to /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/target/pax-web-jsp-0.8.1.jar
[INFO]
[INFO] --- ianal-maven-plugin:1.0-alpha-1:verify-legal-files (default) @ org.apache.aries.samples.blog.assembly ---
[INFO]
[INFO] --- maven-install-plugin:2.3:install (default-install) @ org.apache.aries.samples.blog.assembly ---
[INFO] Installing /home/jack/Library/Apache/samples-0.3/blog/blog-assembly/pom.xml to /home/jack/.m2/repository/org/apache/aries/samples/blog/org.apache.aries.samples.blog.assembly/0.3/org.apache.aries.samples.blog.assembly-0.3.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.858s
[INFO] Finished at: Sun Jan 08 09:45:18 PST 2012
[INFO] Final Memory: 12M/37M
[INFO] ------------------------------------------------------------------------


Version information . . .


jack@jack-Inspiron-8600:~/Library/Apache/samples-0.3/blog/blog-assembly$ mvn --version
Apache Maven 3.0.3 (r1075438; 2011-02-28 09:31:09-0800)
Maven home: /home/jack/apache-maven-3.0.3
Java version: 1.6.0_23, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-openjdk/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.0.0-15-generic", arch: "i386", family: "unix"
jack@jack-Inspiron-8600:~/Library/Apache/samples-0.3/blog/blog-assembly$


Again, I hope this is not too much information and thank you.
holly.cummins (16) [Avatar] Offline
#4
Re: Load Directory for Aries Runtime
Your installation looks broadly correct, which is good news. My recollection is that the load directory gets automatically created the first time you create the framework. (The instructions go through starting the framework to see it working before creating the web bundle.)

However, I suspect lots of people might do you as you've done and skip straight to the exciting part, creating the web bundle. In that case you can just create a directory called 'load' in the target directory and copy in the web bundle. I'll update the instructions to make this clear. Thanks!
walrus (14) [Avatar] Offline
#5
Re: Load Directory for Aries Runtime
Thank you.

From your response, I found where I was tripping up.
I had run the bundles, but for whatever reason the 'load' directory was not created. So, I just did an 'install file:\ ...' command but received an error that I was initially a bit thick in the head reading. It turns out to be an import of the fancyfoods.offer that was missing.
So, after creating the load directory, I dropped the 'fancyfoods.api-1.0.0.jar' in there as well. This worked.

I was also confused by what you called the runtime's 'target' directory. Your response made that clear which allowed me to put the missing 'load' directory in the right place.

Additionally, it looks like the runtime was updated and now contains 44 packages.
btgreene1010 (4) [Avatar] Offline
#6
Re: Load Directory for Aries Runtime
I've followed the sample in Ch.2 but cannot get the application to run properly. I'm not getting any OSGi errors in my container, however whenever I link to the application I get;

HTTP ERROR 404

Problem accessing /fancyfoods.web/SayHello. Reason:

NOT_FOUND

Powered by Jetty://
btgreene1010 (4) [Avatar] Offline
#7
Re: Load Directory for Aries Runtime
Please disregard the previous post. I did a full reboot and now everything works fine. I was getting the same jetty error even after closing down osgi. I'm not sure what caused the inconsistent state of Jetty.
vahid.sh (2) [Avatar] Offline
#8
Re: Load Directory for Aries Runtime
I have the same problem,"HTTP ERROR 404

Problem accessing /fancyfoods.web/SayHello.. Reason:

Not Found

Powered by Jetty:// " !!!
why is that its really driving me crazy smilie
holly.cummins (16) [Avatar] Offline
#9
Re: Load Directory for Aries Runtime
There are a number of things which could cause this kind of error. All the Jetty error is telling you is that the web page you hope is there isn't actually there. In order to debug further, you'll need to start out by looking in the OSGi console. Things to check are
* Are all the fancyfoods bundles installed and active?
* Can you see services being registered from the fancyfoods.web bundle? These are the services which show a web page is active.
* In the detailed list of information about the fancyfoods.web services in the OSGi console, there should be a URL. Does the context root match the one you're using?

Hope this helps!