Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
radai rosenblatt
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Where exactly is the jar containing this class located?
 
radai rosenblatt
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 466
1
IntelliJ IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
having trouble deploying "hello world" *.rar to jboss 4.2.3


I think you meany *.war / *.jar / *.ear
 
radai rosenblatt
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like a JBoss AS-specific discussion to me, moving.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic