Ear and junit

I have a ear file **
and want to write junit test cases for some classes in the ear.
the ear file has the following structure:
->ear
----> ejb.jar
----> utils.jar
----> some.jar
----> app-inf
------------> lib/third.jar
----> meta-inf
----------->application.xml
Q1) Do i have to have the ear file running inside the container to test it?
Q2) I just want to write test case for some standalong classes in utils.jar..but
when i run juni ant task with classpath=ear , its gives classnot found, alghouth
the uitls.jar is part of the ear?
please help.
thanks

Hi,
"java guy" <[email protected]> wrote in message news:[email protected]..
I have a ear file **
and want to write junit test cases for some classes in the ear.
the ear file has the following structure:
->ear
----> ejb.jar
----> utils.jar
----> some.jar
----> app-inf
------------> lib/third.jar
----> meta-inf
----------->application.xml
Q1) Do i have to have the ear file running inside the container to test it?Yes if you are going to test classes that require to run within a container.
Such classes could be EJB and servlets.
Q2) I just want to write test case for some standalong classes in utils.jar..but
when i run juni ant task with classpath=ear , its gives classnot found, alghouth
the uitls.jar is part of the ear?EAR itself is a JAR file. Java classloader does not look for classes
in jars that are packaged in to a jar.
To test your utility jar you should place/access it outside of the EAR.
Regards,
Slava Imeshev

Similar Messages

  • IPhone 4 vibrates in my ear and makes audible sound while on call

    Ever since I did the 4.2 update if I am on a call and message comes in, the phone vibrates in my ear and plays an audible sound that everyone around me can hear and also my caller. First time it happened it scared me so much I about dropped the phone. Now it just makes me mad. When the 4.3 update was released, I was hopeful this "bug" would be fixed. No such luck! Has anyone experienced this? Is there some way to stop the phone from doing this and have it just do the "soft" tone that only I can hear? I went to the apple store and the guy I spoke with suggested just turning off the vibrate. That is not the solution. What about the sound that it plays? Am I supposed to turn that off too? Then it wouldn't make any sound or vibrate. Niiiiiice! Just what I need. A phone that doesn't ring or vibrate.
    Someone HELP!
    Thanks!

    I started a thread like this with my 3Gs iPhone. My solution was to disable the "Vibrate" feature under "Settings, Sounds, Silent" and when I get a phone call I just use the "silent/vibrate" switch on the side of the phone and it turns off all the sounds. Just make sure that you have the "Vibrate" under "Silent" turned off. That fix works for my iPhone 4 as well. Hope this helps.
    Here's my thread from a while back: "http://discussions.apple.com/thread.jspa?threadID=2314868&tstart=0"

  • Creation of SCA Package from EAR and SDA

    Hi All,
    As we know that when a CAF project is created then another 4 projects( dictionary, ejbmodule, permission and webdynpro) are created with the main CAF project and at deployment time five files are deployed at J2EE engine. Among them four are EAR files and one SDA file(for dictionary project).
    I want to put all the five files ( four EAR and one SDA) within a SCA package. So, how can I do it? I have got a help(Note number 696084) of creation SCA from SDA and EAR but that is applied for NetWeaver'04. Now I am using NetWeaver'04S and NWDS SP7 and SP8. So please could anybody help me to solve the problem.
    Thanks and Regards
    Chandan

    Try this link:
    http://help.sap.com/saphelp_nw04s/helpdata/en/a3/782240da03e569e10000000a155106/frameset.htm

  • How to make ear and war file

    hi ,
    can anyone tell me how to make the ear and war file ??/
    Regards,
    Shruti.

    hello shruti
    to make war file enter the following command through command prompt
    jar -cvf filename.war give one space then .(dot)
    bye

  • Explain about JAR,EAR and WAR files

    Explain :what is JAR,EAR and WAR files and how is useful in creating archive files in java with more example?

    Please look up this type of information on your own.
    http://java.sun.com/reference/glossary/index.html

  • How to handlle multiple ear and common database.

    Hi Friends,
    Need urgent help.
    I working on a project where there will be multiple ear ,each for one application.
    There are 4 project and 4 ears and one common util war file which will be shared by all ears.
    Problem is : 3 of the projects will use same database tables. I am using hibernate ORM mapping for database table.
    Q1. In the above scenario db access table are 90% common in 3 projects. Should I go for instead of 3 ears club into 1 EAR and current 3 project as a 3 module in 1 club ear or per project one ear?
    Pls suggest me the approach and advantage and disadvantages of the approach.
    Q2 : Should I put the data-beans and table mapping files (e.g account.hbn.xml) & hibenate.cfg.xml file in common war(centralized or shared) or replicate the copies of all beans mapping xml and beans classes in every ear.
    If you suggesting to use the centralized/shared data configuration approach then how EAR 's jvms will handle Transaction for every ear.
    I am using Websphere app server6.1, hibernate3 and db2 8.0
    Waiting for your interesting replies.
    Thanking you in advance.
    Navin.

    How are you going to handle upgrades if a database change is needed?
    If it is per application then you need to keep the code by app. If across applications then you need to keep the code separate.

  • Netbeans and junit

    Hi,
    I am sorry if this is the wrong place to post this but I need a quick answer.
    I have developed a school project in netbeans and junit.
    How can I execute the junit tests externaly to the IDE?
    Where is the junit installed?
    thanks,
    Sebastian

    JUnit is just a java library. Take a look at
    http://www.junit.org/index.htm

  • Difference between SAP Ear and EAR file in Netweaver 7.3

    Hi all,
    when exporting a EAR file created in nwds 7.3 i get two options to export SAP EAR and EAR . What's the difference between two.and also Target runtime drop down showing sap runtime . What does that signify?
    Please specify.
    Regards
    Prasad

    Hi all,
    when exporting a EAR file created in nwds 7.3 i get two options to export SAP EAR and EAR . What's the difference between two.and also Target runtime drop down showing sap runtime . What does that signify?
    Please specify.
    Regards
    Prasad

  • ANT and JUnit in weblogic

    Hi.
    I see that the problem with ant and junit is discussed here, but with no absolutte solution.
    The problem:
    I create an build.xml containing the <junit>-task and want to run this from within the BEA Workshop. The standard error-message is that it cant find the junit-task. I can run the same build file from command since I got ANT set up correctly with JUnit outside Weblogic.
    It sems for me that Workshop dont care about existing installation of ANT, it uses it own version. I have included junit.jar in the same direstory as ant.jar is in BEA-install-dir also, but it wont work.
    Does anyone have a solution to this "small" problem??
    Thanks in advance.

    I haven't figured out why, but my JDeveloper automatically adds the classpath I have in my ant build.xml to the additional classpath of the project. My classpath is set like this in the build.xml:<path id="classpath">
    <fileset dir="env/lib">
          <include name="**/*.jar"/>
        </fileset>
    </path>And my compile target looks like this:<target name="compile" depends="init">
        <mkdir dir="${compile.outdir}"/>
        <!--Compile Java source files-->
        <javac destdir="${compile.outdir}" debug="on">
           <classpath refid="classpath"/>
           <src refid="srcpath"/>
        </javac>
      </target>And my Jdev project settings -> common -> ant has my build.xml file selected with default make and rebuild targets selected. I have never put a single entry in the additional classpath area but somehow I have all the libs as I set up in my build.xml file. I'm using JDev 9.0.3.2 by the way.

  • EAR and WAR

    Hi,
    i need to know about .ear and .war,what exactly do in atg. why we use.
    thanks.

    They are the standard file formats for storing and distributing JEE applications. A War file groups JSPs, servlets and all related files to create web applications, and a Ear file groups all the various War and Jar files required to create an 'enterprise' application.
    Hope this helps.

  • Ant 1.6.5 and JUnit 4.1

    According to ant bugs Bug-40682 and Bug-40697, Ant 1.6.5 and JUnit 4.1 have integration problems. Is there a plan for Jdeveloper 11g to upgrade to Ant 1.7?

    We are currently testing up take of Ant 1.7 for JDeveloper 11.
    --RiC                                                                                                                                                                                           

  • I'm deaf in one ear and need a stereo-to-mono earbud so I can use my iPod and iPhone. It is not good being able to hear only one channel. Can Apple consider making such a thing for those of use who need such a thing?

    I'm deaf in one ear and need a stereo-to-mono earbud so I can use my iPod and iPhone. It is not good being able to hear only one channel. Can Apple consider making such a thing for those of use who need such a thing?

    bassvid wrote:
    Thanks...now I need to do something about the iPod.
    I'm not sure which version iPod you have, but I just checked my iPod nano (current generation) and it also has a Mono Audio setting in Settings>General>Accessibility.

  • HT204389 I place Siri next to my ear and i get no response. Am i doing something wrong?

    I place siri next to my ear and get no response. Am i doing something wrong ?

    You don't have to do that. You should have Siri voice, when using Siri turn the volume up (the side button)
    Also make sure the iPad Settings > General > Siri > Voice Feedback > Always

  • Error with ant build and JUnit task in IntelliJ

    Hi,
    I seem to be having a very annoying error in IntelliJ. Here are the stats:
    - IntelliJ 4.5.1, Build 2239
    - Using own version of ant (1.5.1)
    - removed junit37.jar from my ant1.5.1/lib dir, and instead added junit version 3.8.1 of junit.jar to that dir
    - Specified that same junit.jar in my project classpath (this is the only item in the classpath for my test project)
    - MyTest.java is the only class in my project, and it is specified as a JUnitTest in run/debug configurations and includes the classpath and jdk of my project module
    When I right-click on my test class, and go to "Run" then my simple test passes. I see the results in the run window.
    Here is where the issue lies (and why this is confusing me). When I try to run the same test from my build.xml file in this project, specified with the classpath as the same from my project, and with the following junit task, I get the below error (3 times in a row for whatever reason). If any of you know of a configuration issue that I may be missing, please let me know. It is very frustrating! Thanks a lot, in advance.
    <target name="run.test">
            <javac classpath="class.path" srcdir="src" destdir="src" />
            <junit haltonerror="true" printsummary="yes" haltonfailure="true" showoutput="true">
                <classpath refid="class.path" />
                <test name="MyTest" />
            </junit>
        </target>
    Test MyTest failed
         at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:568)
         at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:527)
         at org.apache.tools.ant.Task.perform(Task.java:319)
         at org.apache.tools.ant.Target.execute(Target.java:309)
         at org.apache.tools.ant.Target.performTasks(Target.java:336)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
         at org.apache.tools.ant.Main.runBuild(Main.java:610)
         at org.apache.tools.ant.Main.start(Main.java:196)
         at org.apache.tools.ant.Main.main(Main.java:235)
         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:324)
         at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:13)

    I figured this out - I needed a formatter tag to see the output of the test.

  • Deploying EAR and EJB (ClassLoader Question)

    Hi,
    Have a few queries. Appreciate any quick answers.
    (a) To deploy a EAR or EJB jar to WebLogic server, is it necessary to include the jar location specifically in $CLASSPATH?
    I think not. Am I correct?
    (b) Is the bean/EAR deployed at module level? Is there a setting for this - is it at bean deployment descriptor? Where can I find this?
    If (say) I need to update an EJB, do I un-deploy, update and re-deploy it?
    Or must I restart the entire WLS container?

    --> An EAR includes one or more EJB files. You don't need to specify the location because it's contained at application.xml file inside the EAR.
    --> Each bean has a deployment descriptor. You can see it at META-INF directory
    If you need to update an EJB (that it is not part of and EAR), you are right.
    The WLS container not need to be restarted.
    Jin

Maybe you are looking for

  • Acrobat 9.0 and Windows 7

    I just installed Windows 7 but my Acrobat 9.0 is not working right. Do I need to install all of the updates listed or just the newest one?

  • Editing a Mac made PDF in Windows 7?

    Not sure if I should place this in the Mac forum or the Windows forum, so I'll place it in both. For years I've worked with a copy editor through Adobe Acrobat. Recently, she upgraded to Windows 7. Now, she cannot edit the PDFs I send her. Apparently

  • Journal Import - Reference 6 field

    We have recently upgraded from R11.5.10 to R12.1.3. We are uploading Journal Entries using GL_INTERFACE table from extrnal sources. We are populating Reference1 'Batch Name', Reference4 'Journal Name' & Reference6 'External reference id'. While runni

  • PSA SE to PSE 3.0 Upgrade - No Tags

    I just installed PSE 3.0 (full version) and want to maintain the tags I created with PSA SE. Is there a special import function?

  • Can the Noise Gate be adjusted in Audition CS5

    Hi All, Can the noise gate be adjusted in Audition CS5 Regards Matt