How to run ear file in java application server
i want how to run .ear file in java application server
1. i m created ear file
2. i m created jar file (bean,home,remote)
3.i m created war file(in the form of jsp)
but till now i couldnt run ear file
how to run
please hel me
You must create :
1.Jar file
2.War file
And then put them into an ear file
Exemple : myapp.ear contains
myappEJB.jar
myappWEB.war
META-INF/application.xml
and application.xml looks like this :
<application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com /xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
<display-name>myapp</display-name>
<description>Demo application</description>
<module>
<ejb>myappEJB.jar</ejb>
</module>
<module>
<web>
<web-uri>myappWAR.war</web-uri>
<context-root>/myapp</context-root>
</web>
</module>
</application>Good luck
Similar Messages
-
Running exe files from java applications
Hello All,
Is it possible to run executable files from java applications?
I need to run an exe file on the client from the server machine, the exe could reside on either the server or any other machine on the LAN. Is it possible to specify the path of where the exe resides, and run it on a client machine?HI,
I tried to launch a MS Word application using runtime.exec but it gives me some problem
The foll. code to launch a txt file using notepad works.
Runtime rt = Runtime.getRuntime();
String[] callAndArgs = {"notepad.exe","C:\\coo7\\wizard.txt"};
Process child = rt.exec(callAndArgs);
However, oif I try to launch a MS Word application, it asks for the entire path of WINWORD.exe, (unlike just specifying notepad.exe as the first argument in String[] callAndArgs) and this can vary from one machine to another.. how do I get around this?
The foll. code snippet works but the complete path of where WINWORD.exe might be installed on any machine, is not fixed:-(
Runtime rt = Runtime.getRuntime();
String[] callAndArgs = {"C:\\Program Files\\Office\\Office10\\WINWORD.exe","C:\\coo7\\wizard.doc"};
Process child = rt.exec(callAndArgs);
Any idea/suggestions pls.. -
How to build ear files for ADF application using Ant task
How to build ear files for ADF applications using Ant. The ojdeploy ant task can not find application-level deployment profiles. I am trying to automated build and release for ADF application.
Any help is highly appreciated.
Thanks
ShivaHi Timo
Thanks for your reply.
I have successfully created ear file using ojdeploy on jenkins. however when am trying to auto deploy using WLDeploy ant task am getting the following
error :
weblogic.application.ModuleException: :oracle.mds.config.MDSConfigurationException:MDS-01335: namespace "/oracle/webcenter/quicklinks/scopedMD" mapped to metadata-store-usage "WebCenterFileMetadataStore" but its definition was not found in MDS configuration
Please advise how to handle this.
As am a newbie to ADF, could you please advise if it is possible for the ADF application deployments can be automated for different environments using jenkins due to this MDS dependencies.
Appreciate your help.
Thanks
Shiva -
How to run SQL files from Java?
Hi,
Can someone point me towards a link on how to run sql files in Java? Thanks.
P.S...if I've been completely blind please go easy on me!Sorry forgot the formating code thingy
public static boolean executeScript(File script, Connection conn){
boolean success = true;
success = script.exists();
if(success){
DEBUG.print("ES::READING SCRIPT:" + script.getAbsolutePath());
StringBuffer buffer = new StringBuffer();
success=readScript(script,buffer);
if(success){
try{
String creationScript = buffer.toString();
Statement st = conn.createStatement();
int start = 0;
int end = 0;
while (end != -1 && start < creationScript.length()) {
end = creationScript.indexOf("GO", start);
if (end != -1) {
DEBUG.print(creationScript.substring(start, end));
st.executeUpdate(creationScript.substring(start, end));
start = end + 2; //2 is the length of "GO"
st.close();
}catch(Exception e){
success=false;
DEBUG.printStackTrace(e);
}else{
DEBUG.print("ES::SCRIPT FILE DOES NOT EXISTS");
success=false;
return success;
public static boolean readScript(File script, StringBuffer buffer){
boolean success = true;
DEBUG.print("RS:: reading file :" + script.getAbsolutePath());
try{
InputStreamReader isr = new InputStreamReader(new FileInputStream(script),"UTF16");
int ch;
while ( (ch = isr.read()) > -1) {
buffer.append( (char) ch);
if (isr != null)
isr.close();
}catch(Exception e){
success=false;
DEBUG.printStackTrace(e);
return success;
} -
How to Rename the file in the application server?
Hi friends.
How to Rename the file in the application server? via abap program so pls kindly let me know thr any function module is there.
Thanks
With Regards
I.Muthukumar.Dont think there is any quick fix way of doin this, however you can use the following sequence of dataset ops to get what you need:
READ DATASET - retrieve contents of current AS file
TRANSFER DATASET - create a new file on AS with the contents read in READ
DELETE DATASET - delete the original file on AS (if TRANSFER above is successful)
Hope this approach helps.
Cheers,
Aditya -
Urgent :- Unable to deploy EAR file in Oracle application server
Hello folks,
I am trying to deploy an application containing jsps and servlets
packaged into EAR using ant. However when am trying to do so by using
the Deploy EAR option in the Enterprise manager, it throws the
following error -
"Invalid J2EE application file specified - Jar file:
/var/tmp/jar47241.tmp is missing its standard xml descriptor located at
META-INF/ejb-jar.xml"
I suspect that something could be wrong with regards to the way the ear
file has been created.
Please if someone could pin point the problem and help me understand
the the above error message , it will be of great help to me and I d
really appreciate this.
Many Thanks,
Ramn.Hello,
I try to deploy an ear file (contains jar and war files) in Oracle Application server in linux, but the time is so long. The same file I deploy in a OAS in windows and the deploy time was 2 minutes, but in linux I leave the hole night and the session close and the deploy in unable.
I don't know if I need configure an especial option in the OAS in Linux, how I can load my ear file.
The OAS in windows was installed with oc4j options only, but the OAS in linux was full installation
Please help me....
Thanks. -
How to see the file at the application server
HI TO ALL SDNERS ,
THIS IS MY CODE WHERE TO CHECK THE DOWNLOADED FILE AT THE APPLICATION SERVER.IN TCODE AL11 I HAVE SEEN THERE IS NO FILE GETTING CREATED.WHEN TRANSFERRING THE SY-SUBRC VALUE IS ZERO.
Program Name : ZME11_BDC.
Title : PURCHASE INFORMATION RECORD LOAD PROGRAM
Program Objective : THIS PROGRAM READS IN THE PURCHASE
INFORMATION FILE. IT CREATES A BDC SESSION TO
USE TO LOAD THE PURCHASE INFORMATION RECORDS
INTO SAP using the ME11 Transaction.
REPORT ZME11_BDC no standard page heading MESSAGE-ID ZHNC line-size 55.
constants declaration
constants: c_x value 'X',
c_sess type apqi-groupid value 'zcustomer',
c_xd01 type tstc-tcode value 'ME11'.
DECLARING VARIABLES
DATA: V_MSG(255),
V_ERREC TYPE I,"NO OF FAILED RECORDS
V_LINES."NO OF RECORDS
FLAG DECLARATIONS
DATA: FG_DATA_EXIST VALUE 'X',"CHECK FOR DATA
FG_SESSION_OPEN VALUE ''.
STRUCTURES AND INTERNAL TABLE DECLARATIONS
TYPES :BEGIN OF TY_PIR,
LIFNR TYPE EINA-LIFNR,
MATNR TYPE EINA-MATNR,
EKORG TYPE EINE-EKORG,
WERKS TYPE EINE-WERKS,
VERKF TYPE EINA-VERKF,"sales person
TELF1 TYPE EINA-TELF1,"telephone
URZLA TYPE EINA-URZLA,"country
REGIO TYPE EINA-REGIO,"region
APLFZ(5),"plan deleivery time
EKGRP TYPE EINE-EKGRP,"purchase group
NORBM(13),
NETPR(13),
END OF TY_PIR.
DATA : IT_PIR TYPE TABLE OF TY_PIR,
WA_PIR LIKE LINE OF IT_PIR.
DATA: BEGIN OF IT_BDCDATA.
INCLUDE STRUCTURE BDCDATA.
DATA END OF IT_BDCDATA.
DATA : BEGIN OF IT_BDCMSG.
INCLUDE STRUCTURE BDCMSGCOLL.
DATA END OF IT_BDCMSG.
SELECTION SCREEN
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETER : FNAME TYPE RLGRAP-FILENAME.
SELECTION-SCREEN END OF BLOCK B1.
AT SELECTION ON VALUE REQUEST
AT SELECTION-SCREEN ON VALUE-REQUEST FOR FNAME.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
FILE_NAME = FNAME.
START OF SELECTION
START-OF-SELECTION.
PERFORM F_GET_DATA USING FNAME
CHANGING IT_PIR.
PERFORM F_GENERATE_DATASET USING FNAME
CHANGING IT_PIR WA_PIR.
*& Form F_GET_DATA
text
-->P_V_FNAME text
<--P_IT_PIR text
FORM F_GET_DATA USING P_FNAME LIKE FNAME
CHANGING P_IT_PIR LIKE IT_PIR.
DATA: LV_FILE TYPE STRING.
LV_FILE = FNAME.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = LV_FILE
FILETYPE = 'DAT'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = P_IT_PIR
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF P_IT_PIR IS INITIAL.
FG_DATA_EXIST = ''.
ENDIF.
ENDFORM. " F_GET_DATA
*& Form F_GENERATE_DATASET
text
-->P_V_FNAME text
<--P_IT_PIR text
FORM F_GENERATE_DATASET USING P_V_FNAME LIKE FNAME
CHANGING P_IT_PIR LIKE IT_PIR
P_WA_PIR LIKE WA_PIR.
MESSAGE I001(ZHNC).
*OPENING FILE AT THE APPLICATION SERVER FOR WRITING
OPEN DATASET FNAME FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC EQ 0.
MESSAGE I002(ZHNC).
LOOP AT P_IT_PIR INTO P_WA_PIR.
SPLIT P_WA_PIR AT '*' INTO P_WA_PIR-LIFNR
P_WA_PIR-MATNR
P_WA_PIR-EKORG
P_WA_PIR-WERKS
P_WA_PIR-VERKF
P_WA_PIR-TELF1
P_WA_PIR-URZLA
P_WA_PIR-REGIO
P_WA_PIR-APLFZ
P_WA_PIR-EKGRP
P_WA_PIR-NORBM.
*TRANSFER THE FILE FROM INTERNAL TABLE TO APPLICATION SERVER
MESSAGE I003(ZHNC).
TRANSFER P_WA_PIR TO FNAME.
ENDLOOP.
*CLOSING THE FILE AT THE APPLICATION SERVER
CLOSE DATASET FNAME.
ENDIF.Hello,
I made a similar program. You can have a look at it.
*& Form write_to_app_server
text
--> p1 text
<-- p2 text
FORM write_to_app_server.
To get filename
PERFORM get_filename.
To write into the application server
OPEN DATASET g_filename_with_path FOR OUTPUT IN TEXT MODE.
IF sy-subrc = 0.
LOOP AT <l_table> INTO <l_line>.
TRANSFER <l_line> TO g_filename_with_path.
ENDLOOP.
CLOSE DATASET g_filename_with_path.
ELSE.
CLOSE DATASET g_filename_with_path.
ENDIF.
To send mail
PERFORM send_mail.
ENDFORM. " write_to_app_server
*& Form get_filename
text
--> p1 text
<-- p2 text
FORM get_filename.
DATA : l_log_path TYPE filepath-pathintern
VALUE 'Y28M_DOWNLOADS_BACKGROUND' .
CALL FUNCTION 'FILE_GET_NAME_USING_PATH'
EXPORTING
client = sy-mandt
logical_path = l_log_path
operating_system = sy-opsys
file_name = p_fname
IMPORTING
file_name_with_path = g_filename_with_path
EXCEPTIONS
path_not_found = 1
missing_parameter = 2
operating_system_not_found = 3
file_system_not_found = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " get_filename
You may find it useful.
Regards,
Karuna. -
How do upload a file to the application server into a directory?
hi to all,
i want to upload file into the database..i need upload the file into the application server and save it to a directory..is there any way?where i can read about this?any information?
ashwinyHello,
First, we need to determine the terms we are using, in order to avoid confusion. We (including the documentation) are using "upload" to describe storing the file on the server, and "download" to pull it from the server into local machine.
You can use the "File Browse" item to upload any file you need from your local machine and into a database table. The default APEX configuration (in the dads.conf file) stored the uploaded file in a table called wwv_flow_file_objects$. In your application, you can access this table using a view called APEX_APPLICATION_FILES.
After you uploaded a file, any user can access it, using the download procedure described in the reference I gave you. The download procedure gives you an option to store the download file anywhere you need, using the "Open/Save" dialog box.
I believe this is covering everything you need. If you still having problems, please consider posting the relevant application pages on apex.oracle.com. It will be easier to understand and help you.
Regards,
Arie. -
How to Run a Hello World Java application on WIndows Mobile
Hi!
We have a sample Plug-in environment Java application downloaded from http://www-128.ibm.com/developerworks/library/os-ecl-ercp/index.html - IBM library.
We have downloaded the source files org.eclipse.testworkbenchapp_1.0.0.jar and tried running the application on desktop PC, this worked fine.
We are using Eclipse 3.2 to run this Java application on Desktop.
Now, we are trying to run the same application on Intermec Windows Mobile 5.0 device.
1. The device has IBM J9 ? WebSphere MicroEnvironment MIDP 2.0 for Windows Mobile2003 installed in it.
2. On installing this on Windows Mobile, in Start ? Programs ? we find MIDlet HQ - on launching this, opens a window with Install button.
3. On Click on Install button, another window opens which asks for URL to install.
4. In the URL Edit box, I give file:////Org.Eclipse.testWorkbenchapp.feature_1.0.0.jar which is present in \MyDocuments\Update site folder copied from desktop workspace via Active sync ? As mentioned in the above IBM library site.
5. I have also tried file:////MyDocuments\Updatesite\Org.Eclipse.testWorkbenchapp.feature_1.0.0.jar as input to URL.
6. On click OK, I get an error titled AMS Error with description The application descriptor was missing the required MIDlet Name field.
I am held up here and not able to move further.
As mentioned in the above IBM library site I tried downloading the update site folder via Eclipse ? Software Updates ? Find and Install in Help menu.
I selected Search for new features to install and browsed the Update site folder location present in my Eclipse workspace. This also does not work.
Any help in this regard in greatly appreciated. Thanks in advance!I would ask such questions in the J2ME forums, or even better in a websphere forum, like here:
http://www-128.ibm.com/developerworks/forums/wsdd_forums.jsp -
How to run .html file from .java file..?
Hi All,
I was just trying as mentioned in the subject of how to run an html file from a java file.We have runtime class which inturn is having exec method which returns process but it supports only .exe as an argument .Is there any way to do this???
Thanks in advance.viswa07 wrote:
You mean to say Desktop class in java...???I'm so sorry, I thought you knew enough Java to look up the API.
[This link|http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html] might be more at your level.
db -
Running .bat files from java applications
Has anyone tried to run a .bat file from a java application?
I know I can run java commands by getting the application's runtime, but I've a number of *.bat files I like to run from the application without having to extract the commands from the .bat files.
thks,Crikey! You were answered very shortly after you posted your question, and you STILL haven't bothered to come back. And are you going to create a new userid the next time you ask a question, since bat2004 seems tied to this particular question?
-
How to run a vi from Java application?
I am passing data to a vi from my java swing application using data socket bean but I have to manually open and run the vi. How can I programatically open and run the vi from my java application without using ActiveX automation server?
I don't know Java but if you can issue a shell command then you can run the VI with the command line:
"\labview.exe" ""
You have to set the VI to "Run when opened". The VI will run each time the command is issued, even if the VI is already opened.
LabVIEW, C'est LabVIEW -
How to run perl file from java file..???
Hi All,
How to run a perl file from java file.I know that there is one JPL(Java-Perl Library) preprocessor which can be used to do this,but no idea of how to do it..
Any help is appreciated.
Thanks in advance.viswa07 wrote:
Ok and any idea regarding JPL..????I don't know it and the first few posts that I found mentioned it using Java 1.1-style JNI calls, which hints at a dead project. And you don't want to use a dead project. -
How to print PDF file from java application?
Hi,
I have a java application that needs to print an PDF files. Could any one provide me links to tutorial/sample codes for doing this?http://onesearch.sun.com/search/onesearch/index.jsp?qt=print+pdf+files&subCat=&site=dev&qp=&chooseCat=javaall&col=developer-forums
-
Geting error when deploy ear file on Oracle Application Server
Hi,
i m trying to deploy EAR on Oracle Application Server but i m getting ther Error
Operation failed with error: Missing class: oracle.adf.controller.v2.lifecycle.PagePhaseListener Dependent class:
any body know that what is this error
plz help me
HarishWhat version of JDeveloper are you using? And what version is your app server?
Maybe you are looking for
-
Play Apple Loops "in the mix" is slow / unusable
Hello All I used Apple Loops for quite a while now within my projects. In the earlier versions it was possible to listen to apple loops while playing in the mix and switching the the next loop was allmost in realtime. *PROBLEM NOW* : while the sequen
-
How do I stop iTunes from using the cloud?
I use iTunes primarily for listening to podcasts. I recently upgraded to version 11.1. Now, it used to be that I'd refresh podcasts, download the subscribed ones, listen to them, delete them. done. I just opened iTunes and under one of the podcasts
-
Remove one version from web gallery album
I created a mobile me gallery in aperture. AFter doing it, i decided to add copyright to the images in photoshop. I did this with apertures ability to edit with an external editor. I completed it all and went back into to aperture happy to se there w
-
Image size difference making PDF's in Bridge
Making PDF's in Bridge on a Mac. The image size I am using is 199 x 300 pixels (5.3 x 8 cm) and when I add a horizontal image to the output preview box, the images retain that size, however, when I add the vertical images to the preview box, althoug
-
Is old 845E Max the same as 845E Max (HT ready)?
Hi:) I've got MSI 6566 845E Max mainboard. But the only mainboard i found on http://www.msi.com.tw is 845E Max (HT ready). Can i use driver, firmware etc updates if they r for 845E Max (HT ready) to my mainboard? And finally, can i mount a Intel HT p