Deploy on executable jar file
Hi all.
I have a special need to deploy an application into an executable jar file (so it could be run as java-jar xxxxxx.jar). It is an app of the ADF, and there just the model layer. It has a main method that works perfectly inside the JDeveloper runtime.
I use ADF components (entity objects, see objects, Application Module, etc.).
I tried to deploy it in a jar file and libraries has added to its deployment profile. When I try to run it, I always get:
Exception in thread "main" oracle.jbo.JboException: Houston-29000: Unexpected exception caught: oracle.jbo.ConfigException, msg = Houston-33003: the MyConnection_Dep login name is not defined.
MyConnection_Dep is the login used in JDeveloper and defined in the Module of the Application, but it looks like the data connection are not deployed.
Which can be missing? Any help would be appreciated.
Thanks in advance
In fact, it worked today. I used
public class amConnection implements {EnvInfoProvider}
public Object getInfo (String string, object environment) {}
EnvHashtable Hashtable = (Hashtable) environment;
envHashtable.put (Configuration.DB_USERNAME_PROPERTY, "username");
envHashtable.put (Configuration.DB_PASSWORD_PROPERTY, "password");
envHashtable.put (Configuration.DB_CONNECT_STRING_PROPERTY, "jdbc:oracle:thin:@myserver.domain.com:1521:xxx");
Returns a null value.
}
All required jars are packed. It works very well.
Thanks anyway
Tags: Java
Similar Questions
-
Why - jar option used to install software that is located in the executable jar file?
Hi all
I have a question, I have a generic installer that is used to install oracle weblogic 10.3 in unix (i.e., who is in the .jar extension) platform which is the executable jar file.
To install this software that do use - jar installation option
java-jar net_server < version > _generic.jar
My question why we use - jar option of install or extract the software
can any one clarify my doubts...
Thanks in advance
Aerts
Published by: sumanth_abhi on January 27, 2009 23:50
-
Memory used by the Windows executable jar file
I wrote a java program that locates my position of mouse pointer, and then it moves on the screen using the Robot class. I created a file executable (executable) jar of this java single file and executed. Then I went to Task Manager processes list and saw that the exe is 11MB, which seems pretty huge for me. Anyone know why its occupying 11 MB of memory? And is it normal to occupy this physical memory much?Only 11MB? What is your problem? In order to execute a jar file, the JAVA virtual machine must be loaded into memory, so this 11 is actually JVM + your jar file, as well as all resources used.
-
When I got firefox at the end of the version 3 or 4, he had the function to redirect any search I typed in the awesome bar in a google search. I loved, but recent updates it repeat myself "Firefox can't find the jar file: file: / / / C:/Program Files (x 86) /Mozilla Firefox/omni.jar!/chrome/en-US/locale/browser-region/region.propertieshello. '" How can I solve this
Try this:
In the address bar, type "subject: config", without the quotes
then
Press the Enter key
then
in the filter window, type "Keyword.url" (without the quotes)
then
Double-click the 'Value' field and type "http://www.google.com/search?q=" (without the quotes)
Thank you
Please check 'Resolved' the answer really solve the problem, to help others with a similar problem.
-
Error in bepel jar file deployment
I deploy a bpel jar file in bpel current console to run under UNIX. Obtaining has successfully deployed. But when I click Launch I get the error
Cannot read the wsdl file to: "http://localhost:7777/orabpel/default/IRobo_Workflow1/1.0/IRobo_Workflow1?wsdl", caused by: javax.net.ssl.SSLHandshakeException. : sun.security.validator.ValidatorException: building way PKIX failed: sun.security.provider.certpath.SunCertPathBuilderException: could not find the path of valid certification for target asked
Can someone please tell me how to fixWork with SSL? It seems that the bpel process bends upward on a SSL url?
Date of arrival:
http://orasoa.blogspot.com/2007/09/compile-error-BPEL-against-SSL.html
Perhaps you need to set the certificates in the keystore.
Marc
-
Displacement of the executable jar breaks the function of the app economy
Since last week, I tried to deploy my application of office as an executable jar file, but I am facing the following problem: when I move the jar from its original location of construction, my application become impossible to write in external files. I first thought that the problem was the dependent path; However, when installs the app can still load the data in these files.
The solution is probably simple, but for some reason, I still find .
The application consists of a jar file and a folder named "files" containing text files (for example, library.data) to which the serialized objects are written.
I wouldn't be surprised if the problem has to do with the file xml, but any change, I've tried so far have failed. If it is likely that this is the problem, I'll be happy to post a copy of it on demand.
public static void saveLibraryToFile() { File file = new File(System.getProperty("user.dir")+"\\files\\library.data"); if (file != null && file.exists()) { library = new Library(sortedAccounts, accountCategoriesMap, accountCategoriesList); try { FileOutputStream fos = new FileOutputStream(file); BufferedOutputStream bos = new BufferedOutputStream(fos); ObjectOutputStream oos = new ObjectOutputStream(bos); oos.writeObject(library); oos.close(); } catch (Exception e) { // catches ANY exception System.out.println(e); } } else { System.out.println("this is not supposed to happen!"); } }
Any help would be greatly appreciated.
(PS: A complete set for most of the relevant codes that I use, including the complete xml file Ant, located at:)
( http://stackoverflow.com/questions/22732274/java-save-method-stops-working-when-jar-is-moved)
I partially solved my problem after reviewing the error from the console. Thank you baftos for me having to look it up.
Apparently, all this time, my problem was caused by trying to launch the application after move on the desktop. If I move the application to another directory, such as C:\randomFolder, the app works very well.
Being resolved, out of curiosity, is their anyway completely deny this problem and allow to run the application from anywhere? Or is it simply impossible because of the various security risks?
---EDIT-----------------------------------
So the problem was more to do with the files/folders to access authorization and privileges.
(check the rp0428 response below for more information)
-
Executable JAR using JDeveloper
Hello
I created a very small office with JDeveloper Application.
What I want to do is to create an executable JAR file. I mean, is there any option in this tool such as in Eclipse. Once executable JAR is created, I must be able to run it simply by double-clicking on the JAR file.
So can some1 please help me with the steps?
JDeveloper: 11.1.1.6.0For executable jar, you will need to add:
Main-Class: your_package.YourClass
in META-INF/MANIFEST. MF file within the jar.
I don't think JDeveloper support custom files you can modify this content after the jar is created (for example, with a tool for zip/rar/7z)
In addition, if your application requires some extra pots, you will need to add this line to manifest:
Class-Path: additional.jar
Dario
-
How to create an executable JAR correct?
Hello
I have the following directory structure, it is the way in which the application is running and running Netbeans:
I need to contain all of these files into an executable JAR file. How can I do it correctly? I tried this (where manifest.txt contains the entry point information):-TicTacToe (directory) --board.jpg --manifest.txt --piece-black.png --piece-white.png --build (directory) ---classes (directory) ----MessagesBundle_en_GB.properties ----MessagesBundle_en_US.properties ----MessagesBundle_en.properties ----MessagesBundle_pl_PL.properties ----MessagesBundle_pl.properties ----MessagesBundle.properties ----com (directory) -----piotrraczko (directory) ------tictactoe (directory) -------here several class files, where TicTacToe.class should be the entry point
But when I then try to run the JAR file I get this error:jar cfvm TicTacToe.jar manifest.txt board.jpg piece-black.png piece-white.png ./build/classes/
Thank you-bash: ./TicTacToe.jar: cannot execute binary file
PR.
Published by: Aardenon on August 8, 2011 12:10You must use Class.getResource () or getResourceAsStream().
Obviously if an image file is inside a jar file, it is not visible to the file system (not that is not in any directory).
The above methods responsible for the classpath, working with pots and jars exploded.
-
Prbolem by running the jar file
Hello
I wrote a java program that prints just 'HAI '.
I did that in the form of executable jar file
But when I run that BACK pot, the output is not printing
Please solve my problem
Thank youWhat happens if you run as:
java -cp Sample.jar Sample
-
Pass the parameter of application deployed in the ADF library jar file
Hi all
I use JDeveloper 11.1.2.4.0, i have 2 Applications appA, appB.
I created in taskflow appA containing departments viewobject, appB contain stubborn workflows which has Employee.jsff page.
I have deployed appB as library of ADF jar file and add it to appA, I need to pass the id of employee viewobject, Department
Kind regards
Hello
In order to create a business application, are usually required several workflow tasks. These workflow will perform different functions, but they may have to communicate with each other. To enable this communication, you can use task flow settings, contextual events or sharing of the data control Instances.
Please check below link
Java / Oracle SOA blog: events ADF passing between areas of workflow
Communication between task flow using the flow of the task - Waslley Souza Blog settings
Thank you
Amey
-
Deployment of ADF library jar files
Hello
I want to deploy my application to a standalone WLS which I applied above oracle ADF library. My question is that I have to include jar files that my application has a reference to them in my ear file? Jars for JSF, ADF rumtime, ADF faces DURATION,... these jar files should not be part of the ADF library that I installed on top of WLS?
ADF BC classes are in the adf.oracle.domain library.
The default value is not set in the weblogic application. XML
ADF. Oracle.Domain Other required libraries should be added to the weblogic - application.xml. The
Trinidad Runtime Databinding
ADF Faces DURATION 11
are in the adf.oracle.domain.webapp. Add the following to weblogic - application.xml.
ADF. Oracle.domain.WebApp -
How to deploy the jar file in WLS help ant script
Hello
Im trying to deploy a jar file in weblogic 10.3 using ant script and spin in the below error.
"
+ weblogic.management.DeploymentException [wldeploy]: [J2EE:160177] application to ' / u01//RSJBObjects.jar ' was not recognized as a valid request type. If it is an EAR file, please ensure that the META-INF/application.xml exists. EJB - pots must have a META-INF/ejb-jar. XML or corresponding annotations exist. If there is a WAR exploded, the directory name should be fine with "constituent". RSRA requires a META-INF/ra.xml. A deployment of JMS should be an XML file whose name ends in '-jms.xml. A deployment of JDBC must be an XML file whose name ends with "-jdbc.xml". For other types of applications, see the documentation for WebLogic Server. +
"
When I try to deploy the same manually from the console, I get a warning stating that WLS thought this as a library and therefore proceed to deploy it as a library. After this warning, the deployment continues and ends.
Problem is when I try to deploy it using Ant, it breaks at this stage.
Y at - it all means that we can deploy a jar to WLS help ant script. It must be deployed as a library as other apps would use this jar.
Cannot create an ear for this jar file file unique im.
If there is no suggestion on can do you, please share.
Thank you
Vijay.Hi Vijay,
The following example shows how to deploy a Java EE library named myLibrary whose source files are located in the directory for output/myLibrary:
source = "myLibrary/exit" library = "true"
user = 'weblogic' password = 'weblogic '.
verbose = "true" adminurl = "" t3: / / localhost:7001 ""
target = "MyServer" / >
http://docs.Oracle.com/CD/E11035_01/WLS100/programming/wldeploy.html
HTH
Kind regards
Sunil Polineni -
Accept email jar file deployment
I don't know if this is the right place to ask this problem. I reported the problem to the JDeveloper and ADF a week ago, but did not respond. To avoid rewrite me a long explanation, you can find using my 918805 no.
In other words, the problem is that I can't get a Windows 7 system to accept and execute the program downloaded from my jar file if the receiving computer has UAC affecting more than minimum security. I need to convince the receiving computer to apply the user recipient to allow my jar file and run it once downloaded regardless of account control settings.
Published by: 918805 on March 12, 2012 03:49918805 wrote:
Thanks for your reply of March 12. I did not provide enough information on March 14?For me - not. You didn't really address the points I raised.
I'm not sure of the importance of your comment when you say "I have no problem running Java on Windows 7 programs, as long as I don't have to go outside the family environment of the user."
There are area of only two hard drive you should be able to guarantee to create files and directories - Directory users (tree System.getProperty ("user.home")) and subdirectory and the (System.getProperty ("java.io.tmpdir")) tmp directory and its subdirectory tree.
I use a Windows XP as administrator and single user course and have no problem running Java programs anywhere in the system.
XP security is a joke.
On my Windows 7 machine, I am also administrator and single user and have no problem in executing Java programs anywhere in the system except that I can't run a program downloaded when the account control is set on which I can do on my Windows7 machine. What is the difference and how to solve the problem for all the other people that I would like to send my software?
Do not try to create files and directories outside of the tmp directory tree or directory tree. I'm not an expert on Windows but I create cross-platform Java programs and they run about anywhere as long as I don't have to create files and directories outside the two security zones.
-
Deployment, redeployment JAR file for WebLogic EM without having to restart the service
Hello
Can someone help me how to redeploy the file .jar on weblogic EM with steps.
Deployment, redeployment JAR file for WebLogic EM without restarting the server
Appriciate if you provide information in steps with screenshot.
Note: Not in the 11g weblogic console.
Thank you
Phanihttp://download.Oracle.com/docs/CD/E14571_01/core.1111/e10105/deploy.htm#BIHIIEIA
-
Hey guys,.
I get the following error I think because I have something misconfigured in my xml files. Instead of activationConfig in my MDB yousing properties, I wanted to put them manually in the file ejb - jar.Xml. I get the error message next is...
Unable to deploy EJB: MyMDB of MDBtest2:
[EJB:011026] The EJB container failed when creating the java: / comp/env namespace for this EJB deployment.
weblogic.deployment.EnvironmentException: [EJB:010176] the resource-env-ref 'inQueue", said in the descriptor file ejb - jar.xml has no mapped JNDI name. The resource-ref must be mapped to a JNDI name by using the element of description of the resources of the descriptor weblogic-ejb - jar.Xml.
at weblogic.ejb.container.deployer.EnvironmentBuilder.addResourceEnvReferences(EnvironmentBuilder.java:641)
at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentContext(EJBDeployer.java:330)
at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentFor(EJBDeployer.java:1097)
at weblogic.ejb.container.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:991)
at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1273)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:372)
EJB - jar. XML
<? XML version = "1.0" encoding = "UTF-8"? >
< ejb - jar id = "ejb-jar_ID" version = "2.1" xmlns = "http://java.sun.com/xml/ns/j2ee" 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/ejb-jar_2_1.xsd" >
< display name > MDBtest2 < / display-name >
< some enterprise beans - >
> by message <
MyMDB < ejb-name > < / ejb-name >
> class ejb < cms.crown.mdb.MyMDB < / ejb-class >
Container < transaction-type > < / transaction-type >
OMG < message-destination-link > < / message-destination-link >
< resource-ref >
weblogic.jms.XAConnectionFactory < res-ref-name > < / res-ref-name >
javax.jms.XAConnectionFactory < res-type > < / res-type >
Container < res-auth > < / res-auth >
< / resource-ref >
< resource-env-ref >
inQueue < resource-env-ref-name > < / resource-env-ref-name >
javax.jms.Queue < resource-env-ref-type > < / env-ref-type of resource->
< / resource-env-ref >
< / message-driven >
< / enterprise beans >
< Assembly-descriptor >
< container-transaction >
< method >
MyMDB < ejb-name > < / ejb-name >
onMessage < method name > - < / method name >
< method-params >
javax.jms.Message < method-param > < / param method >
< / method-params >
< / method >
<>trans-attribut required < / trans-attribut >
< / container-transaction >
< / Assembly-descriptor >
< / ejb - jar >
WebLogic-ejb - jar.Xml
<? XML version = "1.0" encoding = "UTF-8"? >
< wls:weblogic - ejb - jar xmlns:wls = "http://www.bea.com/ns/weblogic/10.0" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd http://www.bea.com/ns/weblogic/10.0 http://www.bea.com/ns/weblogic/10.0/weblogic-ejb-jar.xsd" >
<! - weblogic - version: 10.0->
< wls:message - destination-descriptor >
<! - search - method: JNDI->
< wls:message - destination-name > omg < / wls:message - destination-name >
< wls:destination - jndi-name > inQueue < / wls:destination - jndi-name >
< wls: initial context factory > weblogic.jms.XAConnectionFactory < / wls: initial context factory >
< wls:provider - url > address http://localhost: 8010 < / wls:provider - url >
< / wls:message - destination-descriptor >
< / wls:weblogic - ejb - jar >
I hope it's readable, thanks for any helpHello
It seems that the first thing you use EJB3 but your XML files always point to version = "2.1" and very old.
* Try this: below file "ejb - jar. XML ".
QCF = your factory connections JNDI name
TestQ = your queue JNDI name
Transaction attribute is ByDefault required =... so no need to add it here.
MyMDB
TestQ
cms.crown.mdb.MyMDB
javax.jms.MessageListener
Container
destinationType
javax.jms.Queue
connectionFactoryJndiName
QCF
destinationJndiName
TestQ
----------------------------
"weblogic-ejb - jar.xml":
Now you just need to set the URL of the provider here... If you want a remote provider... else is unnecessary
The JNDI names are already defined in the ejb - jar file. XML
------------------------------------------------
Some links that you can refer:
To generate deployment descriptors... .in case of EJB3 Applications: * http://jaysensharma.wordpress.com/2010/04/02/generating-ejb3-clientjar/ *.MDB3.0, example: * http://jaysensharma.wordpress.com/2009/08/17/mdb3-0-sample-for-weblogic-application-server/ *.
.
.
Thank you
Jay SenSharma
Maybe you are looking for
-
I did a google account and complete the settings. After that, I tried to use gmail using thunderbird but could ' t.I can connect to gmail on the web but can't on thunderbird. Just login password but the error message appeared.Please tell me what to d
-
El Cap does not download with the currently installed Version
Running the latest version of Mac OS x 10.11.5 Macbook Pro (15 "mid 2009") at work. I am in the process of upgrading to an SSD, and I live very far from an electronics store. The drive came with the SATA-USB adapter I thought that this was the case,
-
Localhost UDP connection between FCR and Matlab
Hi all I have a question about the connection between Matlab and FCR UDP. My idea is to Exchange data between Matlab and Labview on the same computer. So I found the 'UDP Simple' of the FCR 2.0 sample project where periodically a datasample is genera
-
Loop through the sequences selected using set of entry points into LabVIEW OI
Hi all I have an operator Interface where the operator has the option to select specific measures and loop over the sequence selected according to the needs. Everything works as expected, but the customer wants to remove the default loop configuratio
-
In order to control the number of cells in a column chart, I need a control switch that can choose between the numbers for example. 2048, 1024, 64, 128 and 256, 512. Is there a switch of LabView or vi for this action?