Compiling EJB files and Deployment Discriptor
Hi,
Could any body tell me step by step process of compiling EJB files and building deployment descriptor. I want to learn from scrap. I search on web but not found material that I need.
Actually I've made a simple EJB example now I want to compile and want to write a deployment descriptor for that using ant or javac.
You can also refer me tutorial describing the process form scrap.
Looking forward,
Regards,
Abbasi
Although you could deploy each bean in a different .jar file , deploying them
together in an jar file produces a classloader arrangement that allows one ejb
class to refer to another ejb class. Packaging ejb jar files in a ear file produces
a common classloader for the ejb jar files.
"Gary Gu" <[email protected]> wrote:
>
Hi,
To build ejb jar files, we can include all beans (including bean class,
home,
inteface, and other java classes) of the application into one jar file.
Or we
can make ONE jar file for EACH bean (including only bean class, home
and interface.
NOT other dependent classes that will sit in weblogic server classpath).
I would like to know any disadvantage for second method in terms of memory,
class
loading, etc. Or any advantage for the second method
Thanks
Similar Messages
-
How to compile .ejb files
Hi,
I want to compile .ejb files generated through weblogic workshop 8.1, jar it and need to deploy it through Ant scripts(all three tasks). Can anyone help me in doing that?
Thanks,
Adwitiya Nigam...Compile with javac task.
<javac classpath="" destdir="" includes="" srcdir=""/>
Create a jar file with the jar task.
<jar basedir="${build}" includes="" jarfile="ejb.jar"/>
Copy jar file to the deploy directoy applications.
<copy file="${dist}/ejb.jar" todir="${weblogic.deploy.dir}"/> -
Hi,
im new to j2ee and there are some qns i hope you can help me with.
1. why is there a need to put my jsp and servlets in a .war file?
2. where do i do my placements of ejb and jsp into the respective jar and war files? in my web server?
thanks a lot!1. why is there a need to put my jsp and servlets in a .war file?Answer- As technology evolved over ther period of time, it became more and more evident that the smaller and easier the things the better it is. WAR format is a ZIP format created to deploy your web application data. Hence called WAR(Web Application Archive). It usually contains your Images, JSP pages, and servlets and other related helper files needed by your web application. Java being a cross platform technology, it becomes easy and standardized to distribute your application(web) to other vendors/teams/people if one makes use of a WAR file. Once dropped in the root directory of the App server(i mean the proper webapp directory) the application server is smart enuf to load your WAR file and create respective directory structure.
2. where do i do my placements of ejb and jsp into the respective jar and war files? in my web server?Answer:- When you add the EJB files and distribute it along with your WAR file, its called EAR(Enterprise Archive) which is WAR+ EJB jar files. As for the JSP's they form a part of the WAR and should be bundled up while creating the WAR file.
Hope this answers the question. -
DynPro application compiled under SP14 and deployed to SP11 Portal
Hello,
I have accidently compiled and deployed a DynPro application on NWDS client with SP14 to NW Portal with SP11. Now I receive an exception:
java.lang.NoClassDefFoundError: com/sap/tc/webdynpro/progmodel/api/IWDEventHandlerId
Is there any way to retreive this jar from the SP11 server and recompile the application with it?HI Roy,
You question is confusing. In heading you said that "DynPro application compiled under SP14 and deployed to SP11 Portal" and in message you said "application on NWDS client with SP11 to NW Portal with SP11".
If you have compiled application with SP11 then it should be ok. But, if you have compiled with SP14 then it surely gives such error.
You can open your dynpro application in NWDS SP11 and then rebuild it and deploy on the WAS SP11. It will work.
Regards,
Bhavik -
I download the tutorial of EJB from Sun and try to compile the source files. After I create a New Application, then I open a terminal and enter "ant converter". I got a error message.
My system is Linux.
ant converter
Error: JAVA_HOME is not defined correctly.
We cannot execute /usr/java/jdk1.3.1/bin/java -Xmx128m -Djavax.net.ssl.trustStore=
/usr/java/j2sdkee1.3/lib/security/cacerts.jks -Djava.security.auth.policy=/usr/java/
j2sdkee1.3/lib/security/jaas.policyI'm sure the JAVA_HOME is correct because I can compile other java and JavaBean files.
thanks.Thanks .
I solve the previous problem by use ant 1.3 instead of ant 1.4.
All the paths are correct, but only ant 1.3 work fine.
Now, I have another problem . After I finished the deployment process, I open a terminal and enter runclient -client ConverterApp.ear -name ConverterClient -textauth. There is a error message
Error:
Blinding name'java:comp/env/ejb/SimpleConverter'
Caught an unexpected exception!
javax.naming.NameNotFoundException . Root exception is org.omg.CosNaming.NamingContextPackage.NotFound.
Please, help me !!
Thanks ! -
How to create a custom ear file and deploy it onto a freshly created oc4j
Hi,
Wanted to know that how should i go about creating a custom EAR file or for that matter any application and deploy it onto a test oc4j instance created within the 10.1.3 Home of Oracle Apps R12.
I believe in a standalone Application server installation it is quite simple to deploy an application by creating an oc4j instance using the AS console ,but not very sure about how to go about it in Oracle Apps .
N.B:I have been able to create a test oc4j instance by the name of Test and able to start and stop it using the opmn of 10.1.3 oracle home.
Any help in this regard will be appreciated.Hi,
can you please post this question to one of the Apps forums if your main concern is to deploy applications in the context of Oracle Apps?
It seems that you don't have a problem in creating the EAR file in JDev.
Frank -
Why Oracle XML parser do not compile this file and Apache does?
Hi:
I am trying to parse this xml file:
http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/documentation/xdocs/userdocs/xsp/logicsheet-concepts.xml?rev=1.2&content-type=text/vnd.viewcvs-markup
and fails with the tag <anchor id="logicsheet"/>, if I change
"logicsheet" to "id_lg" it works fine.
Apache XML parsers do not have this problem.
Best regards, Marcelo.I tried downloading the file and (after removing the DOCTYPE
since I didn't want to download the whole set of DTD's) it
parses fine with XDK 9.0.2C
Which XDK are you using?
If you remove the <!DOCTYPE> line for a test, does it still fail? -
Hi,
To build ejb jar files, we can include all beans (including bean class, home,
inteface, and other java classes) of the application into one jar file. Or we
can make ONE jar file for EACH bean (including only bean class, home and interface.
NOT other dependent classes that will sit in weblogic server classpath).
I would like to know any disadvantage for second method in terms of memory, class
loading, etc. Or any advantage for the second method
ThanksAlthough you could deploy each bean in a different .jar file , deploying them
together in an jar file produces a classloader arrangement that allows one ejb
class to refer to another ejb class. Packaging ejb jar files in a ear file produces
a common classloader for the ejb jar files.
"Gary Gu" <[email protected]> wrote:
>
Hi,
To build ejb jar files, we can include all beans (including bean class,
home,
inteface, and other java classes) of the application into one jar file.
Or we
can make ONE jar file for EACH bean (including only bean class, home
and interface.
NOT other dependent classes that will sit in weblogic server classpath).
I would like to know any disadvantage for second method in terms of memory,
class
loading, etc. Or any advantage for the second method
Thanks -
Coverting .EAR to .SDA file and deploy it via JSPM
Hi Guys
I am trying to convert the .EAR file to the .SDA using nwcetool and nwpacktool and both are giving me the same results.
I follow the below blobs of which they are very helpful
-http://wiki.sdn.sap.com/wiki/display/XI/ConvertEARfiletoSDA+file
-http://forums.sdn.sap.com/thread.jspa?threadID=1751232&tstart=0
-http://forums.sdn.sap.com/thread.jspa?threadID=1390629
The results I am getting, have the externsion .ear instead of .sda
Results: ExcelFileRead.ear with the message "with compression"
What could be that problem, why am I not getting the the file with .sda extersion?
Below is my command :
createsda -n ExcelFileRead -v pi.module -l ExcelFileRead -c 2 -type J2EE C:\EAR.ear c:\result\ExcelFileRead
YonzaHi Guys
I am not that familiar with JAVA, Can you plz give me a working class for Conversion of Exceel sheet content to xml structure for SAP PI 7.1. I tried using the one for PI 7.0 but I am getting error and the one from the below blod I double if it can be deployed:
http://wiki.sdn.sap.com/wiki/display/XI/Adapter%20module%20example%20for%20PI%207.1?bc=true
Anyway I am getting a errors on the two below line after I've imported
--if (msg.getMessageDirection()== MessageDirection.INBOUND)
--Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"AO: Now got the xml payload object.");
I am using these are recomended on: http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/11835
com.sap.aii.af.lib.mod.jar
com.sap.aii.af.ms.ifc_api.jar
sap.comtcloggingjavaimpl.jar
com.sap.aii.af.svc_api.jar
com.sap.aii.af.cpa.svc_api.jar
import com.sap.engine.interfaces.messaging.api.MessageKey;
import com.sap.engine.interfaces.messaging.api.MessageDirection;
import com.sap.engine.interfaces.messaging.api.auditlog.AuditLogStatus; -
Classloader for PAR-Files and deployment
Hello,
I'm wondering how the deployment of a par file actually works in depth. Especially how the sharingreferences und privatesharingreferences come into play here.
Can anybody tell me how it works or can tell me some resources where I can get some more information about it?
Any interesting help is appreciated a lot.
Many thanks
regards
Markus ArmbrusterHi,
Check this:
http://help.sap.com/saphelp_nw70/helpdata/EN/53/c8af42a6f6cb6ae10000000a155106/frameset.htm
The portal application deployment descriptor or simply portalapp.xml
Explaination about difference between PrivateSharingReference & SharingReference:
Check my post here: Portal Runtime
Regards,
Praveen Gudapati -
Error Compiling Movie: Unknown Error - compiling .mxf files and .png files
Hi there, really hoping someone can help here!
I'm attempting to output a Premiere Pro CS6 v.6.0.0 timeline through the AME V6.0.382 64bit and am getting the "unknown error" at various points during the output. The timeline contains .mxf files directly imported from a Canon MX105 recorded at 1980x1080 - the sequence is in the same resolution - 25p 50mb. It also contains .png slides, .jpeg slides, titles, transitions, 3-way color correction, mutliband audio compression, a volume plugin. I've tried "watching" the output as it renders and removing potential "bad frames" within Premiere but I've done this 3 times and they keep rearing their head later down the project, and I can't afford to remove any more clips.
I'm working on an OSx v10.8.2 Mountain Lion Mac with 2.6g i7 w/8gigs RAM.
Any help greatly appreciated, I'm quite new to this so any further information required to troubleshoot, just ask.
Thanks,
PaulI'm having (what appears to be) the same problem. I've spent a total of 8 hours talking to Adobe tech support about it, and they've said they would look into it. Here is a project containing two consecutive frames of my animation; the first (4965) does not load (and appears with the "Media pending" image if you try to view it), but the second (4966) loads fine. In every other application I've tried, both images load fine. Adobe support said "there's something wrong with the header" but I've looked at them with several programs (e.g. below) and can't see anything different between the file that works and the one that fails.
Jeffrey's Exif Viewer
http://regex.info/exif.cgi
TweakPNG
http://entropymine.com/jason/tweakpng/
Synalyze It!
https://www.synalysis.net/tutorial-decode-a-png-file.html -
How to compile and deploy an ejb into Sun ONE app.server 7.0
I am new to Sun ONE application server. I Have .java files and deployment descriptor files with me. How should proceed. When i tried to use asant it is saying that build.xml not found. I copied build.xml from some other directory to the current directory. Then it is saying that common.xml not found. Please help.
Regards,
Nagaraju.Hi,
The build.xml file should be in a directory from where
you are running the asant command.
To resolve the common.xml file not found error,
open your build.xml and check from which location the common.xml file is incuded.
In the sample application it is four directories above
the directory where build.xml is located.
You can copy the common.xml in the current directory and then change the following in your build.xml
<!ENTITY include SYSTEM "../../../../common.xml">
to <!ENTITY include SYSTEM "common.xml">
Hope this helps.
Get back in case you have more issues -
Need ant script to compile, package, and deploy to Oracle AS 10.3.1
I have a test app with ADF faces/jsf for front-end and EJB 3.0 Session Facade/Entity beans for back-end. The project structure/layout is similar to the SRDEMO app in JDeveloper. I was able to compile, package, and deploy within JDeveloper 10g to Oracle AS 10g successfully. Is there a sample ant script to compile, package, and deploy to Oracle AS 10g that I can run from command line? The build.xml that came with SRDEMO only do the compilation, not packaging and deployment. I was able to modify the SRDEMO's build.xml to compile my test app though. I still need the script to package and deploy it.
Thanks,Hi,
How are you referring to the class path. I have created my custom build file and I refer like this.
<path id="classpath">
<pathelement location="${oracle.home}/lib/aia.jar"/>
<pathelement location="${oracle.common.home}/modules/org.apache.commons.logging_1.0.4.jar"/>
</path> oracle.home is the location where my aia.jar resides.
In the compile-classes target I have
<!--Target for Class path details -->
<target name="compile-classes">
<mkdir dir="${sca-inf.classes.dir}"/>
<javac destdir="${sca-inf.classes.dir}" classpathref="classpath"
debug="on" nowarn="${javac.nowarn}"
deprecation="${javac.deprecation}" encoding="Cp1252"
source="1.6" target="1.6">
<src path="${src.dir}"/>
</javac>
</target> Regards,
Neeraj Sehgal -
War Files And Their Deployment and Redeployment
Howdy
I have a WAR file that a developer gave me which I deployed on a Linux box no problem.
Now I would like to add a jsp file and custom tag to this application.
This is what I tried:
I turned the war file into a zip file extracted the contents and then added my jsp page the class file for the custom tag modified the web.xml file for the tag and added a tld file for the tag as well.
Then I rezipped the files and renamed to a .war file and deployed it on the linux box. The previous existing files work but my new jsp page comes up with a HTTP 404 Not Found error.
Now the new jsp and custom tag work on my development machine just not on the live server when reployed into the other existing app.
What am I missing? Or am I totally off with trying to redeploy the app in this way?
Any help appreciated.
AdamFor deployment you need to use ant
-
WLS 6.0 config and deployment
Hi,
Just converted our app from 5.1 to 6.0. Not too many problems once we
figured out the class loader situation. I have some questions regarding
configuration and deployment which are not clear to me after reading the
documentation.
I find I have to modify config.xml manually quite often to fix problems
which the console creates. It is not at all uncommon for me to change a
property via the console and then have to undo the change manually to
get the server to properly start up again. While I accept that this is
probably due to a mistake I am making, I am very surprised that this
system is so fragile. Now for my questions...
1) Sometimes the console will add a new application to my config.xml
with a
"-1 " extension. Why is this? It doesn't create problems in and of
itself but does seem to accompany other problems which the console
creates in this file.
2) I intend to deploy an ear for production purposes, but as the
documentation points out this is inconvenient for development. I need
the ability to modify single jsp files without redploying all of them.
This worked great in 5.1. I am unable to do this in 6.0. As it stands
now, my jsp files are only redeployed on startup and unfortunately seem
to be redeployed every time we start regardless of whether chnages were
made to them. This makes development much slower. The REPLOY file
business discussed in the docs doesn't seem to have any effect. I
currently am deploying the jsp files and associated classes in "expanded
directory format" under the .config/domain/applications/applicationName
directory. I am deploying some EJBS in a pre-compiled jar file and
placing this jar file in the system classpath so the jsps can access the
shared classes. (I know this prevents hot deployment but I seem to have
no choice since the EJBs interfaces do not reference all shared classes
and therefore do not export them to their parent.) This jar file resides
in the ./config/domain/applications directory. Any ideas as to why I can
not get my jsp files to hot deploy one at a time.
All in all, 6.0 is a great release but development time has increased
dramatically. Hot deployment is not going to work for us because
unfortuneately many of our classes are required by our startup classes
and therefore must be placed in the system classpath.
Thanks,
SteveBasically, hot deployment of JSPs isn't supported for dynamically deployed
webapps, that is, those int the applications directory.
Gary
Steve Snodgrass <[email protected]> wrote in message
news:[email protected]...
Follow up...
I have been able to get individual jsp files to hot deploy if they are
located in the DefaultWebApp_myserver directory instead of my applications
directory. It is possible to achieve this behavior in other directoriestoo
if they are configured correctly right? I mean, there is nothing special
about DefaultWebApp_myserver that would allow it to do something thatother
directories can not?
Steve
Steve Snodgrass wrote:
Hi,
Just converted our app from 5.1 to 6.0. Not too many problems once we
figured out the class loader situation. I have some questions regarding
configuration and deployment which are not clear to me after reading the
documentation.
I find I have to modify config.xml manually quite often to fix problems
which the console creates. It is not at all uncommon for me to change a
property via the console and then have to undo the change manually to
get the server to properly start up again. While I accept that this is
probably due to a mistake I am making, I am very surprised that this
system is so fragile. Now for my questions...
1) Sometimes the console will add a new application to my config.xml
with a
"-1 " extension. Why is this? It doesn't create problems in and of
itself but does seem to accompany other problems which the console
creates in this file.
2) I intend to deploy an ear for production purposes, but as the
documentation points out this is inconvenient for development. I need
the ability to modify single jsp files without redploying all of them.
This worked great in 5.1. I am unable to do this in 6.0. As it stands
now, my jsp files are only redeployed on startup and unfortunately seem
to be redeployed every time we start regardless of whether chnages were
made to them. This makes development much slower. The REPLOY file
business discussed in the docs doesn't seem to have any effect. I
currently am deploying the jsp files and associated classes in "expanded
directory format" under the .config/domain/applications/applicationName
directory. I am deploying some EJBS in a pre-compiled jar file and
placing this jar file in the system classpath so the jsps can access the
shared classes. (I know this prevents hot deployment but I seem to have
no choice since the EJBs interfaces do not reference all shared classes
and therefore do not export them to their parent.) This jar file resides
in the ./config/domain/applications directory. Any ideas as to why I can
not get my jsp files to hot deploy one at a time.
All in all, 6.0 is a great release but development time has increased
dramatically. Hot deployment is not going to work for us because
unfortuneately many of our classes are required by our startup classes
and therefore must be placed in the system classpath.
Thanks,
Steve
Maybe you are looking for
-
Running "Flex test drive" - Got error while attempting to connect to data service
Hi, I'm a Flex / Flash builder beginner. I downloaded the 60 days evaluation, and started to run the "Flex test drive" : http://www.adobe.com/devnet/flex/testdrive.html My configuration : XP SP3 PRO french edition Tomcat 6.0 My local Eclipse :eclipse
-
Failing to initialize an RFC in WDJ application
Dear All, I have created an RFC enabled function module in $TMP. I am trying to invoke this RFC passing a paramter value in my WDJ application. The RFC is not even getting initialized and the entire thing ends with a null pointer exception. Please he
-
URGENT !!! Detail Event in Agenda
Hello, I have made an Agenda. But I have a problem with that. My Agenda show upcoming events. If I click on an event then I get every upcoming events. I know that if you link a report with a report, you must use a bind variable in your detail report
-
Password showing in running configuration on 3750's and 3560's
Hi All, Forigve the stupid question here but I was just backing up the running configuration on the switches at work before we have a big powerdown at the weekend and I noticed that the passwords to access the switches are showing in readable text in
-
Edit EXIF metadata in Elements
Hi I have recently started to use Elements 8 and have discovered that some of my old photos have some corrupt EXIF data values (probably due to they having been processed by a series of different graphics programs). Q: Is it possible to edit these EX