• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

.SAR file problem

 
Sheriff
Posts: 9708
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am in deep deep trouble right now. I was working on a project where there was a Enterprise application. It contained one ejb module and two web modules. In addition to that the application.xml file had two .sar modules. I was not sure what it was so I commented it to run the code. I am using Netbeans 6. Now I have realized that it was a big mistake and now that mistake is killing me. I don't know how to configure it. There two folders in the ejb module's configuration folder representing the two .sar modules. Both contain a jboss-service.xml file. Now I have to configure it properly and I don't have much time. I know I was a fool and I should have asked this here way early. But now I have to do it anyhow. But I am clueless about what to do. Can someone give me some guidance related to this. What is the correct way to configure it.

Please help me. It's very urgent...
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please provide the following information:

1) The contents of your EAR file. Use 'jar -ft xxx.ear' and post the results.
2) Your application.xml file
3) Your jboss-app.xml file, if any.

When posting XML text or source code, please enclose the text in UBBCode "code" tags - you can do this by selecting the text and clicking the Code button above the editor window. Also, click the Preview button to ensure that the formatting is correct and the XML text shows up before posting.
 
Ankit Garg
Sheriff
Posts: 9708
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is the content of the EAR file

META-INF/
META-INF/MANIFEST.MF
Site_Dev-ejb.jar
Site_Dev-payment.war
Site_Dev-war.war
META-INF/application.xml
META-INF/jboss-app.xml
commons-beanutils.jar
commons-codec-1.3.jar
commons-collections-3.2.1.jar
commons-digester.jar
commons-discovery-0.4.jar
commons-fileupload-1.0.jar
commons-fileupload-1.2.1.jar
commons-httpclient-3.1.jar
commons-io-1.4.jar
commons-logging-1.1.1.jar
commons-logging.jar
commons-validator.jar
jakarta-oro.jar
jstl.jar

This is the application.xml file with the .sar modules commented



The jboss-app.xml. is almost empty.

<?xml version="1.0" encoding="UTF-8"?>
<jboss-app/>

There are two folders named ticket-queue and ticket-booking-queue in the src\conf folder of the EJB module. These folders contain jboss-service.xml. These are the contents of the two xml files respectively



and

 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like your EAR no longer contains the SAR modules, so simply uncommenting them in application.xml will not work. Have you done a search in your file system to see if the SAR files are located somewhere? Is there another NetBeans project that builds them? (I'm a little lost here because I don't use NetBeans, so I cannot provide any NetBeans way to get you back to where you were.)
 
Ankit Garg
Sheriff
Posts: 9708
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks peter for the help. I just need to know what the structure of the two .sar file should be according to the jboss-service.xml. Then for now I'll create the .sar files manually and look for a solution later on...
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did the .sar have any .class files? Or was it containing only the -service.xml files? If was containing just the -service.xml files, then you need not even create the .SAR.

Anyways - You can create the structure for the sar as follows:

 
Ankit Garg
Sheriff
Posts: 9708
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks jaikiran for the help. But I don't know the contents of the .sar files. I just got the code and I had to configure it. But I didn't know what to do with the .Sar modules so I just deleted them from Application.xml. Can you guess about the .sar modules by looking at the jboss-service.xml??
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ankit Garg wrote:Can you guess about the .sar modules by looking at the jboss-service.xml??



Yes Those are meant to configure JMS queues in your application and dont require any other application specific code. And that's what surprised me about the packaging You don't even need a .SAR to configure those - although its no harm creating those .SAR with just these files in META-INF.
 
Ankit Garg
Sheriff
Posts: 9708
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jaikiran for the help so far. Sorry that I didn't check it before but I found two MDBs in the source code. The code for the two MDBs looks like this



And this is the second one



Now what do I need to do to make this all work. Please can you help me with this.
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are many ways you could package this. I don't know which is the packaging option your team is using. But if you just want to get it working, then you can create a jar file containing these MDB classes and place it in the EAR. Or you can copy those MDB classes to your already mapped Site_Dev-ejb.jar
 
Ankit Garg
Sheriff
Posts: 9708
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK Thanks Jaikiran. I'll do what you said and ask if I face any problems. Thank you very much again ...
 
The human mind is a dangerous plaything. This tiny ad is pretty safe:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic