This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes having trouble deploying Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "having trouble deploying "hello world" *.rar to jboss 4.2.3" Watch "having trouble deploying "hello world" *.rar to jboss 4.2.3" New topic
Author

having trouble deploying "hello world" *.rar to jboss 4.2.3

radai rosenblatt
Greenhorn

Joined: Feb 22, 2010
Posts: 4
Hi.

Im trying to learn JCA. for that purpose i've created a simple "hello world"-style project so i could try and write a simple connector.
Im having trouble getting the attached project to deploy (using JBoss 4.2.3.GA). the failure looks like this :



this happens both when i try to deploy just the *.rar file and the *.ear which contains the *.rar
what am i missing ? the class its looking for is there in the archive.

(I'd attach the project but the forum does not allow zip archives)

Thanks in advance for any assistance.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10069
    
163



Where exactly is the jar containing this class located?


[My Blog] [JavaRanch Journal]
radai rosenblatt
Greenhorn

Joined: Feb 22, 2010
Posts: 4
Jaikiran Pai wrote:Where exactly is the jar containing this class located?

on my first build attempt it wasnt in the rar at all. to try and correct that i specified the <rarSourceDirectory> of the maven rar plugin config to be /src/main/java, which resulted in the compiled classes being copied into the rar archive, but in an "exploded" form.

only after some digging i discovered that the rar spec requires the classes to be jarred inside the rar, so i had to tweak my maven <build> to look like this:


this produces a working rar archive, but im thinking this should have worked out of the box .... is there any point in trying to ask the maven rar plugin devs about this ? or am i missing something ?
Vinod Tiwari
Ranch Hand

Joined: Feb 06, 2008
Posts: 459
    
    1
having trouble deploying "hello world" *.rar to jboss 4.2.3


I think you meany *.war / *.jar / *.ear


Vinod Tiwari | Twitter
radai rosenblatt
Greenhorn

Joined: Feb 22, 2010
Posts: 4
Vinod Tiwari wrote:I think you meany *.war / *.jar / *.ear

no, i meant *.rar
it failed when i tried bundling the *.rar inside the *.ear too, but also when i deployed it stand-alone.
it you take a look, you can see the default jboss instance comes with a few bundled *.rars straight out of the box
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10069
    
163

radai rosenblatt wrote:[
on my first build attempt it wasnt in the rar at all. to try and correct that i specified the <rarSourceDirectory> of the maven rar plugin config to be /src/main/java, which resulted in the compiled classes being copied into the rar archive, but in an "exploded" form.

only after some digging i discovered that the rar spec requires the classes to be jarred inside the rar, so i had to tweak my maven <build> to look like this:
...


I would have thought that by default the jar gets included. Atleast that's what the Maven rar plugin doc says about includeJar attribute

Can you post your pom.xml which contains the rar plugin configuration?

By the way, i'll now move this to our Maven forum since this now is more of a Maven question. Ranchers there might have a better idea about this.
radai rosenblatt
Greenhorn

Joined: Feb 22, 2010
Posts: 4
Jaikiran Pai wrote:I would have thought that by default the jar gets included. Atleast that's what the Maven rar plugin doc says about includeJar attribute

its in cluded by default, but its not built by default - which is the odd thing. its like the rar:rar execution completely replaces the jar:jar execution in the lifecycle instead of coming after it. if you "manually" add the jar:jar back into the lifecycle (as i did in the pom.xml) than the jar produced is included in the rar and everything is nice and dandy.
this, to me, seems to be an issue with the rar plugin since in my experience most maven plugins (especially the core ones) just work if you stick to conventions, which i think i have.

Jaikiran Pai wrote:Can you post your pom.xml which contains the rar plugin configuration?


sure. there it is:


and this is the parent, just in case:



the thing that bothers me is that the rar plugin does not work out of the box (i had to add an execution of the jar plugin before it).
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

Looks like a JBoss AS-specific discussion to me, moving.


JBoss In Action
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: having trouble deploying "hello world" *.rar to jboss 4.2.3