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.

donlaiq (4) [Avatar] Offline
Hi, I'm trying to follow the book's examples using Eclipse Juno Java EE and I'm stucked in the 3.2.3 chapter. I have configured an "OSGI Framework" launch (maybe I've missed something here) and i'm getting the stack trace from the thread

I've tried to follow the instructions from thread to update the libraries, but there's still issues.

The "ss" command shows the org.apache.geronimo.components.geronimo-transaction bundle in INSTALLED state, and following the thread I fixed it refreshing the org.apache.geronimo.specs.geronimo-j2ee-connector_1.5_spec bundle, but still don't show the new cheese offer in the browser.

Debugging the code I found it breaks with the call to " inventory.getFoodCount()" of the class InventoryPopulator, throwing the exception from this thread, but I don't know what to do. The org.osgi.framework.system.packages is in the config.ini from blog/blog-assembly/target/configuration, what should I do?

It's comic, because I export exactly the same bundles to JAR files and put them in the "load" folder and it works very well, why? can you help me, please?
donlaiq (4) [Avatar] Offline
Re: It works under console, but it doesn't under Eclipse
I've found the solution to this thread a some time ago, but I had busy with another job.
Actually, I don't know if somebody understood me (I do what I can with this language) and I want to share it.
I wanted to follow the book's recipe from Eclipse, not from a single console. So, to do that you need to create a target platform with all the listed bundles in the chapter.
Go to Run->Run Configurations..., and create a new OSGi Framework launch.
Check you have all the bundles from the recently created target platform in the Bundles tab.
Go to the Arguments tab, and in the VM arguments section write -Dorg.osgi.framework.system.packages=(1), where (1) is the value you must copy-paste from the blog/blog-assembly/configuration/config.ini file created with Maven.
Remember to check "Clear configuration area before launching" in the Settings tag, and you are ready to run the example. Hope it helps, good luck!