When you build the calculator example, are you building it from the top-level calculator directory? You should see the OAR in the target directory. If you dont, try running mvn install -X -Dmaven.test.skip to get some debugging information and post back.
Dennis
Let me boot up a Windows environment and try and reproduce
Dennis
Not sure whats going on for you quite yet, but I've been able to produce the OAR without difficulty on OSX and Windows.
Dennis
Dennis
Now I tried to deploy this oar to rio. First a started Rio with the start-all script, on linux. Then I copied the oar archive to the deploy directory under $RIO_HOME. The deploy didn't work, here is the trace I obtained in Rio:
INFO: Created /home/beauche/programmes/rio-4.2/deploy/calculator-2.0
18 avr. 2012 16:38:20 org.rioproject.opstring.OARUtil install
INFO: Installed OAR to /home/beauche/programmes/rio-4.2/deploy/calculator-2.0/calculator-2.0.oar
[WARNING] org.rioproject:examples:2.0 (pom) not found on repository http://repo1.maven.org/maven2/
18 avr. 2012 16:38:24 org.rioproject.monitor.AbstractOARDeployHandler parseOAR
ATTENTION: Parsing [/home/beauche/programmes/rio-4.2/deploy/calculator-2.0/calculator.groovy]
java.lang.NullPointerException
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.createGroovyObjectGetPropertySite(AbstractCallSite.java:264)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.acceptGroovyObjectGetProperty(AbstractCallSite.java:249)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:241)
at org.rioproject.resolver.maven2.PomParser.processParent(PomParser.groovy:311)
at org.rioproject.resolver.maven2.PomParser$processParent.callCurrent(Unknown Source)
at org.rioproject.resolver.maven2.PomParser.parse(PomParser.groovy:107)
at org.rioproject.resolver.maven2.PomParser$parse.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:159)
at org.rioproject.resolver.maven2.PomParser.processParent(PomParser.groovy:308)
at org.rioproject.resolver.maven2.PomParser$processParent.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
at org.rioproject.resolver.maven2.PomParser.parse(PomParser.groovy:107)
at org.rioproject.resolver.maven2.PomParser$parse.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
at org.rioproject.resolver.maven2.SimpleResolver.doResolve(SimpleResolver.groovy:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:159)
at org.rioproject.resolver.maven2.SimpleResolver.getClassPathFor(SimpleResolver.groovy:89)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:225)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:63)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
at org.rioproject.resolver.ResolverHelper.resolve(ResolverHelper.groovy:111)
at org.rioproject.opstring.OpStringUtil.checkCodebase(OpStringUtil.java:150)
at org.rioproject.opstring.OpStringUtil.checkCodebase(OpStringUtil.java:81)
at org.rioproject.monitor.AbstractOARDeployHandler.parseOAR(AbstractOARDeployHandler.java:101)
at org.rioproject.monitor.FileSystemOARDeployHandler.look(FileSystemOARDeployHandler.java:109)
at org.rioproject.monitor.AbstractOARDeployHandler.listofOperationalStrings(AbstractOARDeployHandler.java:76)
at org.rioproject.monitor.ProvisionMonitorImpl$DeployMonitor.processDeployHandlers(ProvisionMonitorImpl.java:4979)
at org.rioproject.monitor.ProvisionMonitorImpl$DeployMonitor.access$800(ProvisionMonitorImpl.java:4949)
at org.rioproject.monitor.ProvisionMonitorImpl$DeployMonitor$1.run(ProvisionMonitorImpl.java:4963)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
18 avr. 2012 16:38:24 org.rioproject.monitor.AbstractOARDeployHandler parseOAR
PLUS FIN: Returning [0] OperationalStrings
18 avr. 2012 16:38:50 org.rioproject.monitor.AbstractOARDeployHandler parseOAR
PLUS FIN: Returning [0] OperationalStrings
18 avr. 2012 16:39:20 org.rioproject.monitor.AbstractOARDeployHandler parseOAR
PLUS FIN: Returning [0] OperationalStrings
18 avr. 2012 16:39:50 org.rioproject.monitor.AbstractOARDeployHandler parseOAR
PLUS FIN: Returning [0] OperationalStrings
18 avr. 2012 16:40:20 org.rioproject.monitor.AbstractOARDeployHandler parseOAR
PLUS FIN: Returning [0] OperationalStrings
18 avr. 2012 16:40:50 org.rioproject.monitor.AbstractOARDeployHandler parseOAR
PLUS FIN: Returning [0] OperationalStrings
18 avr. 2012 16:41:20 org.rioproject.monitor.AbstractOARDeployHandler parseOAR
PLUS FIN: Returning [0] OperationalStrings
18 avr. 2012 16:41:50 org.rioproject.monitor.AbstractOARDeployHandler parseOAR
PLUS FIN: Returning [0] OperationalStrings
18 avr. 2012 16:42:20 org.rioproject.monitor.AbstractOARDeployHandler parseOAR
PLUS FIN: Returning [0] OperationalStrings
18 avr. 2012 16:42:50 org.rioproject.monitor.AbstractOARDeployHandler parseOAR
PLUS FIN: Returning [0] OperationalStrings
18 avr. 2012 16:43:20 org.rioproject.monitor.AbstractOARDeployHandler parseOAR
PLUS FIN: Returning [0] OperationalStrings
18 avr. 2012 16:43:50 org.rioproject.monitor.AbstractOARDeployHandler parseOAR
PLUS FIN: Returning [0] OperationalStrings
18 avr. 2012 16:44:20 org.rioproject.monitor.AbstractOARDeployHandler parseOAR
PLUS FIN: Returning [0] OperationalStrings
18 avr. 2012 16:44:50 org.rioproject.monitor.AbstractOARDeployHandler parseOAR
PLUS FIN: Returning [0] OperationalStrings
18 avr. 2012 16:45:20 org.rioproject.monitor.AbstractOARDeployHandler parseOAR
PLUS FIN: Returning [0] OperationalStrings
Sandrine.
Dennis
Thank you very much for your quick replies.
> No I tried on calculator only... I have just tried on the examples module and now it works. Very strange...
It is not strange, the calculator's parent (example) could not be found locally or in central. The 4.2 code through an NPE because of that issue.
>
> Thank you very much for your quick replies.
Sure, no problem.
Dennis
I would like to have an oar that is standalone, because on the target deployment machine, I'm not be sure to be able to run maven. I would like just to upload rio on the target machine with my oar and then it work by launching the start-all script. How can I do to have this standalone archive?
Sandrine.
----- Original Message -----
From: "Dennis Reedy" <dennis...@gmail.com>
To: rio-...@googlegroups.com
Sent: Mercredi 18 Avril 2012 17:14:17
Subject: Re: oar generation on examples
> Ok I understand that to deploy an oar, Rio needs to take the dependencies declarated in the opstring from the maven repository. That is why if I didnt' mvn install on the target machine, the oar does not work.
Correct.
>
> I would like to have an oar that is standalone, because on the target deployment machine, I'm not be sure to be able to run maven. I would like just to upload rio on the target machine with my oar and then it work by launching the start-all script. How can I do to have this standalone archive?
The OAR and the dependencies that your service requires must all be resolvable from a repository. So what this means is you will need to deploy (via maven) your artifacts to a repository. When Rio processes the OAR it will resolve the dependencies (both direct and transitive) your service require at service activation time.
HTH
Dennis
For my demo, I can do with this constraint by uploading a local maven repository with the interesting dependencies.
But just to give a feedback, I find this idea quite disturbing... When I deploy an archive to Tomcat, Axis or Petals for example, I deploy an archive containing all the dependencies, so it is standalone. Or the container has is own shared library management mechanism, so it not depends on another software like maven. The problem with maven is the dependency to an internet network connection and not all the environment provide it. And what about people that prefer Ivy instead than maven?
Anyway thank you very much for you quick help! :)
A+
Sandrine.
----- Original Message -----
From: "Dennis Reedy" <dennis...@gmail.com>
To: rio-...@googlegroups.com
Sent: Mercredi 18 Avril 2012 19:34:12
Subject: Re: oar generation on examples
> Hi,
>
> For my demo, I can do with this constraint by uploading a local maven repository with the interesting dependencies.
For your demo you can just have the artifacts installed locally, you dont need them to be available remotely.
>
> But just to give a feedback, I find this idea quite disturbing... When I deploy an archive to Tomcat, Axis or Petals for example, I deploy an archive containing all the dependencies, so it is standalone. Or the container has is own shared library management mechanism,
You could do this, just create an uber jar that has no dependencies and ensure it is available locally. But I think you are missing key concepts.
Rio is not just a container. Rio provides for the dynamic provisioning and management of services through the network. In order to make your application work using any of the systems you list above you must install the artifacts on each machine and into each directory for your application to work. What happens if ...
- A machine dies and you need to keep your application running?
- Your application needs to be upgraded to fix an issue or defect, but you have to install your archive first, on every machine.
- Your application needs to scale up (or down), there are additional machines available, but the software is not installed
- Your administrator is out sick for any of the above
If none of these are use-cases in your system then dont bother with Rio, choose Tomcat, Axis or Petals.
> so it not depends on another software like maven.
There is no dependency on Maven, Rio provides the resolution of the artifacts at runtime.
> The problem with maven is the dependency to an internet network connection and not all the environment provide it. And what about people that prefer Ivy instead than maven?
It has nothing to do with Rio. You can develop your artifacts using anything you want. All you need to do is put your artifacts in a maven compatible repository.
HTH
Dennis