Extracted ear/war/jar file location in JBoss

How can I find out in runtime where JBoss extracted my ear/war/jar file?
I have a file inside my ear/war/jar file and I need to know the location of the file. I know that it is in the tmp/deploy directory but I need the exact application temporary name.

You can take out the common classes and bundle them in a jar library that can be bundled directly in APP-INF/lib (or library directory defined by <library-directory> in applicaton.xml if you are using JEE5 / WLS 10). Is it possible to do this re-arragement?

Similar Messages

  • Putting unix utility visible version info into ear, war, jar files?

    I would like to be able to use some unix utility (or java itself without a separate program) to display my version information for jar-like artifacts: ear, war, jar.
    In other words, when I build one of these things, I'd like to put my SVN version, date, user name, and maybe some other stuff into it in a way that can be read without a custom program. This needs to be done as part of the ant build (without requiring a custom java program).
    For example, one approach would be "strings | grep <special-string>" if I could put something, somewhere in the file that had this as 8-bit character encoding.
    For jars, making the jar executable and having the main print it out works, but I don't think that's do-able for ears and wars, and it would be desirable to have a consistent approach.
    Anyone already doing this?
    Ideas?

    For example, I don't think you can specify a mainline in the manifest of an ear or war.
    They have pretty strictly defined formats, and I don't want to risk violating a standard by tinkering outside the standard.Possible, but you can always run it as java -cp myWar.war my.utility.Version.
    There may be another possibility, but I'm unable to find any reference though:
    In my early Java days, I used to work on a system where there was a Unix utility (called something like +"ident"+) that was able to extract version and description info stuffed in a .so file (under which "standard" or proprietary format was the info stored, I don't know).
    I used to see it work on individual Java .class files too (from memory we had to put a String constant name "VERSION" in the class) and maybe jar files (I'm unsure).
    One of my co-workers at that time had described that as a standard tool, but "ident" turns up nothing of that kind on Google... And I've never since encountered any description of the "VERSION" constant naming convention...
    I was young and naive, I hope I were not bluffed by some alias in a custom setup... :o(
    Edited by: jduprez on Feb 18, 2010 11:30 AM
    OK a bit more reserah turned up [that man page|http://man-wiki.net/index.php/1:ident]. Apparently ident is part of RCS (installed along with CVS), and works by grepping the target file for patterns such as "$keyword: text $" (which is RCS/CVS keyword substitution pattern). Now that it mentions it, I remeber that that's what we put into our VERSION constant's value ("$version : ...$", or something of that kind).
    So:
    1) it's not so standard after all, you have to install the rcs package on the target host (regardless of whether you use RCS for configuration management, which would probably be a bad idea nowadays)
    2) you have to put such formatted strings somewhere in your code or configuration files (easy with Ant, if not genuinely through Subversion)
    3) To have it work on jar, war, ear, files, you have to make sure that the file is not compressed (otherwise the pattern might not appear in clear). I don't know whether that's easy to configure using Ant's jar, war, ear tasks.
    A bit of a hassle compared to stuffing your own utility class and using java -cp...

  • Problem parsing XML with schema when extracted from a jar file

    I am having a problem parsing XML with a schema, both of which are extracted from a jar file. I am using using ZipFile to get InputStream objects for the appropriate ZipEntry objects in the jar file. My XML is encrypted so I decrypt it to a temporary file. I am then attempting to parse the temporary file with the schema using DocumentBuilder.parse.
    I get the following exception:
    org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element '<root element name>'
    This was all working OK before I jarred everything (i.e. when I was using standalone files, rather than InputStreams retrieved from a jar).
    I have output the retrieved XML to a file and compared it with my original source and they are identical.
    I am baffled because the nature of the exception suggests that the schema has been read and parsed correctly but the XML file is not parsing against the schema.
    Any suggestions?
    The code is as follows:
      public void open(File input) throws IOException, CSLXMLException {
        InputStream schema = ZipFileHandler.getResourceAsStream("<jar file name>", "<schema resource name>");
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        DocumentBuilder builder = null;
        try {
          factory.setNamespaceAware(true);
          factory.setValidating(true);
          factory.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
          factory.setAttribute(JAXP_SCHEMA_SOURCE, schema);
          builder = factory.newDocumentBuilder();
          builder.setErrorHandler(new CSLXMLParseHandler());
        } catch (Exception builderException) {
          throw new CSLXMLException("Error setting up SAX: " + builderException.toString());
        Document document = null;
        try {
          document = builder.parse(input);
        } catch (SAXException parseException) {
          throw new CSLXMLException(parseException.toString());
        }

    I was originally using getSystemResource, which worked fine until I jarred the application. The problem appears to be that resources returned from a jar file cannot be used in the same way as resources returned directly from the file system. You have to use the ZipFile class (or its JarFile subclass) to locate the ZipEntry in the jar file and then use ZipFile.getInputStream(ZipEntry) to convert this to an InputStream. I have seen example code where an InputStream is used for the JAXP_SCHEMA_SOURCE attribute but, for some reason, this did not work with the InputStream returned by ZipFile.getInputStream. Like you, I have also seen examples that use a URL but they appear to be URL's that point to a file not URL's that point to an entry in a jar file.
    Maybe there is another way around this but writing to a file works and I set use File.deleteOnExit() to ensure things are tidied afterwards.

  • Weblogic.jar file location in  CC&B Media

    Hi Guys
    Can anyone let me know the weblogic.jar file location in CC&B 2.2 media.
    Thanks
    Aleem

    vinod hadlee wrote:
    Hi,
    We use weblogic 8.1 for our development purpose... and mostly work on ejb's. Every time a new ear file is created and deployed we need to specify the jar files needed to run that application in server classpath.... is there any alternate way so that v can avoid specifying these jar files in server classpath...One alternative is you could bundle the jars in the EAR itself in APP-INF/lib.
    Gerald

  • In PI 7.1 - Java UDF's Compiled Class files - Jar File location

    Hi All,
    In PI 7.1 Does anybody know where the compiled Java UDF's (which are used in Graphical mapping) class files stored in jar are located in integration server? I want to use this jar file in my XSLT mapping.

    Hi,
    I guess it would be under
    \usr\sap\<SID>\DVEBMGS00\j2ee\cluster\server0\temp\classpath_resolver
    or
    \usr\sap\<SID>\DVEBMGS00\j2ee\cluster\server0\.\temp\classpath_resolver
    Where SID is your XI instance name.
    Thanks,
    Gujjeti
    Edited by: Praveen Gujjeti on Jun 23, 2008 5:12 PM

  • Jar files location

    Hi all,
    Kindly can someone guide me to the location of the below related Jar files:
    com.audium.server.AudiumException;
    com.audium.server.voiceElement.ActionElementBase;
    com.audium.server.session.ActionElementData;
    Thank you in advance.

    Hi Chintan,
    Thank you for the reply.
    I have both of these jar files under the Eclipse lib folder but i'm still getting errors that the import cannot be resloved when adding the below:
    import com.audium.server.AudiumException;
    import com.audium.server.voiceElement.ActionElementBase;
    import com.audium.server.session.ActionElementData;
    your help is highly appreciated.

  • Where are the jar files located in the server in which the MS SQL Server is installed?

    Hello All,
    Please tell me the place where jar files are located in the system in which the MS SQL Server is installed.
    Please help me as early as possible.
    Thanks in advance.
    Thanks and Regards, Readers please vote for my posts if the questions i asked are helpful.

    Check BOL page: Using the JDBC Driver
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Required jar files in using jboss Schedular

    if i have to use org.jboss.varia.schedular.Schedulable
    what are the jar files that need to be added in my class path
    thank you

    Neetu,
    You will need to deploy the classes.zip file using the SDM. More details on how to configure the JDBC adapter can be found at
    How to Install and Configure JDBC adapter
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3867a582-0401-0010-6cbf-9644e49f1a10

  • Alternative to specify the jar file location other than server classpath.

    Hi,
    We use weblogic 8.1 for our development purpose... and mostly work on ejb's. Every time a new ear file is created and deployed we need to specify the jar files needed to run that application in server classpath.... is there any alternate way so that v can avoid specifying these jar files in server classpath...

    vinod hadlee wrote:
    Hi,
    We use weblogic 8.1 for our development purpose... and mostly work on ejb's. Every time a new ear file is created and deployed we need to specify the jar files needed to run that application in server classpath.... is there any alternate way so that v can avoid specifying these jar files in server classpath...One alternative is you could bundle the jars in the EAR itself in APP-INF/lib.
    Gerald

  • Calling class or jar file location

    I created one set of java api for third party application to call. How do I found out that the location of third party jar file or class file that call my api? Please advise.

    If you don't know what called your program, then there is no way.

  • Common jar files location

    We have several "common" jar files that will be used across several of our existing
    applications. We are currently trying to figure out the 'best' location for these
    files. There is one school which feels that /opt/bea/wlserverX.x/ext is the proper
    location for these files and others say /opt/bea/wlserverX.x/lib, yet a third
    opinion is to put it at the same level as the aformentioned directories.
    Has anyone run into this in the past and what was your solution?
    any help would be greatly appreciated!!
    Sebastian

    Just put it in a commonly shared path of the classpath. For example the /lib folder of the application server in question. You only need admin rights on the appserver in question to be able to place the JARs in there.

  • Unable to extract connector/j jar file(mysql)

    im have having a problem on extracting mysql's connector/j jar file on j2sdk1.4.0.
    and may i know does sun allows windows xp users to install various kind of versions of j2sdk? for example, install j2sdk1.4.0 into c:\j2sdk1.4.0, and j2sdk1.4.2_05 into c:\j2sdk1.4.2_05?
    what to do using j2sdk1.4.0 for connector/j?
    i would like to know manual steps instead if automatic step provided by netbean.
    i wish this problem could be solved as sonn as possible

    im have having a problem on extracting mysql's
    connector/j jar file on j2sdk1.4.0.I'm not sure what this means. The MySQL connector JAR isn't part of any JDK. You've got to download it and put it in your CLASSPATH.
    >
    and may i know does sun allows windows xp users to
    install various kind of versions of j2sdk? for
    example, install j2sdk1.4.0 into c:\j2sdk1.4.0, and
    j2sdk1.4.2_05 into c:\j2sdk1.4.2_05?
    what to do using j2sdk1.4.0 for connector/j?
    i would like to know manual steps instead if
    automatic step provided by netbean.
    i wish this problem could be solved as sonn as
    possible

  • How to structure a JSF application (EAR/WAR/JAR)

    Hi All,
    How do you recommend I should structure a JSF application in terms of EARs, WARs and JARs?
    Let me set the context for you: I have a fairly large project which consists of a number of sub components. Each of these sub components are JSF applications in the sense that they have JSF pages connected to each other. So, for instance, I have a company management sub component and a product management subcomponent. Most of these sub components share some Java libraries and/or entities.
    Because of this I decided to have each sub component contained in its own WAR, with no universal libraries in its lib folder, and to then add these WARs to an EAR with all the library JARs in the EAR's lib folder, as so:
    EAR
       |_ component1.WAR
       |_ component2.WAR
       |_ lib
             |_ sharedlib1.JAR
             |_ sharedlib2.JARUnfortunately I'm having more problems than I hoped I would with JSF with this setup. An alternative I have is to create one gigantic WAR which contains all the library archives and then to only deploy this WAR. Although this would probably work, it destroys the nice seperation I had between sub components, where I could for instance just remove the one WAR from the EAR if it was giving problems. That structure would look something like this:
    WAR
       |_ <WebContent>
       |_ WEB-INF
                 |_ classes
                           |_ <JSF classes>
                 |_ lib
                        |_ sharedlib1.JAR
                        |_ sharedlib2.JARFinally, I have a third option where I add all the libraries required by a WAR to its lib folder and I have no shared libraries in the EAR's lib folder. The disadvantages are of course that the EAR will be huge as JARs get duplicated unnecessarily, and I'm not sure that this won't cause conflicts. The structure would look like this:
    EAR
       |_ component1.WAR
                        |_ WEB-INF
                                  |_ lib
                                        |_ sharedlib1.JAR
                                        |_ sharedlib2.JAR
       |_ component2.WAR
                        |_ WEB-INF
                                  |_ lib
                                        |_ sharedlib1.JAR
                                        |_ sharedlib2.JARI believe the first way to be the best, but I'm struggling getting JSF to work like I expect (see [http://forum.java.sun.com/thread.jspa?threadID=5288069|http://forum.java.sun.com/thread.jspa?threadID=5288069] ). What are your suggestions?
    Thank you,
    Ristretto

    Dear hiwa,
    thank you very much for your response. I have had a look into the book and found out that it provides indeed half of the solution i need. Now I can generate a JSF response to my non-JSF request which has been issued by the main application.
    Unfortunately this is only the first half of the solution, because the JSF framework of the child application will still render URIs into HTML-forms (e.g. for the <f:view>) that point to the faces servlet and not to the non-JSF servlet of the main application.
    I'll try to solve this problem by providing my own ViewHandler that provides other URIs. But I still don't know how to encode the view ID into the generated HTML-form as a hidden field.
    After all, I am really surprised at how difficult it is to integrate the JSF framework into a non-JSF application. I don't think this is a very uncommon scenario. In my case, we integrate into an existing large application of our customer in order to extend his application with our product. I would expect this to work out of the box with JSF (sigh).
    I will post my progress in this matter if I found some interesting solution.
    Bye, Marcus

  • Jar files Location in PI ?

    Hi Friends,
    Can any body please tell me the locaiton on PI server where i can find the below jar files ?
    tc_sec_core.jar
    lcrclient.jar
    httpclient.jar
    jARM.jar
    lcrclient.jar
    logging.jar
    sldclient.jar
    Thanks,
    Amar.

    Hi Amar
    Please find below pasted files and their paths in SAP Installation folders.
    lcrclient.jar     \usr\sap\<SID>\DVEBMGS00\j2ee\cluster\server0\bin
    httpclient.jaru00A0     \usr\sap\<SID>\DVEBMGS00\j2ee\cluster\server0\bin\ext\tc.httpclient
    jARM.jar     \usr\sap\<SID>\DVEBMGS00\j2ee\cluster\server0\bin\ext\com.sap.util.monitor.jarm
    logging.jar     \usr\sap\<SID>\SYS\global\xi\directory_server\javaws\directory
    sldclient.ja     \usr\sap\<SID>\DVEBMGS00\j2ee\cluster\server0\bin\ext\tcsldsldclient_sda

  • Diff bw EAR,WAR,JAR

    Can any one tell me the diff bw EAR,WAR,JAR

    follow this link:
    http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci1105646,00.html

Maybe you are looking for

  • Possible to render a UIView into a bitmap without attaching it to a window?

    Hi all, I am trying to capture the visual output of a UIView into a bitmap which I can save to a file. However, it seems that all the information I have about rendering a UIView requires it to be attached to an UIWindow to give it a backing surface.

  • What's up with TextEdit?

    Get this...thanks to this new autosave/version "feature", TextEdit won't let you save as any other file type than .txt.  Just try editing and HTML file in TextEdit!  Hit command+s, or just close the file so it saves on its own and your wonderful html

  • Storage not available

    I Don't have enough storage to take a picture! I have deleted apps, picture and emails but nothing helping ! I bought more storage but still not helping ?

  • How much does apple charge to replace ipadmini2 screen?

    How much does apple charge to replace ipadmini2 screen?

  • Z10 BBID basically frozen, won't let me verify

    All I want is a ringtone, lol!! I couldn't remember the password, so I did the steps to reset it, and it won't let me in. Any help is totally appreciated! Thanks!!