Creation of mapping using Java - SDK - 12 c ODI ODI
Hello
I would like to know the JAVA API and sample code in JAVA to create a new map to 12 c inside an ODIProject.
Please let me know the way to do this.
Kind regards
Dheeraj
Has managed to create the dataset in 12 c and map. . Below are the sample extract.
Thank you all!
Import oracle.odi.domain.mapping.Mapping;
Import oracle.odi.domain.mapping.component.Dataset;
.
.
.
Mapping map = new map ("MyOdiMap", fold);
MyOdiInstance.getTransactionalEntityManager () .persist (map);
dataSet = map.createComponent ("DATASET", "DEFAULTDATASET") (Dataset);
Tags: Business Intelligence
Similar Questions
-
I have a great difficulty. First of all, I'm doing the mapping using Java coding based on the TopLink Developer's Guide.
I use the employee Table as usual, but that is the problem, I can not insert on the database once I do the mapping. As a note, there is no compilation error and also I can do the session connection already.
Employee.Java
Employee/public class extends oracle.toplink.sessions.Project {}
Private Long id;
private String fnama;
private String lnama;
Public Employee() {}
setName ("ObjectTab");
applyLogin();
addDescriptor (empDesc ());
conformAllDescriptors();
}
public String getFnama() {}
Return this.fnama;
}
public String getLnama() {}
Return this.lnama;
}
{} public void setFnama (String fnama)
This.fnama = fnama;
}
{} public void setLnama (String lnama)
This.lnama = lnama;
}
public void applyLogin() {}
DatabaseLogin connection = new DatabaseLogin();
Use the appropriate for the underlying database platform
() login.usePlatform
new oracle.toplink.platform.database.oracle.Oracle9Platform ());
login.setDriverClassName ("oracle.jdbc.OracleDriver");
login.setConnectionString("jdbc:oracle:thin:localhost:1521:pusat");
login.setUserName ("tryo");
login.setEncryptedPassword ("one, CODED");
Configuration properties
setDatasourceLogin (login);
}
public empDesc() {} ClassDescriptor
Descriptor ObjectRelationalDescriptor = new ObjectRelationalDescriptor();
descriptor.setJavaClass (Employee.class);
descriptor.setTableName ("EMPLOYEES");
descriptor.setStructureName ("EMPLOYEE_T");
descriptor.setPrimaryKeyFieldName ("ID");
descriptor.addFieldOrdering ("ID");
descriptor.addFieldOrdering ("F_NAME");
descriptor.addFieldOrdering ("L_NAME");
descriptor.addDirectMapping ("id", "OBJECT_ID");
descriptor.addDirectMapping ("fnama", "What");
descriptor.addDirectMapping ("lnama", "L_NAME");
return the descriptor;
}
}
Main class:
protected String getSessionsXmlPath() {}
Return "sessions.xml";
}
protected String getSessionName() {}
return "Session."
}
protected void createSession() {}
XMLSessionConfigLoader loader = new XMLSessionConfigLoader (getSessionsXmlPath ());
Bishop SessionManager = SessionManager.getManager ();
session = (DatabaseSession) mgr.getSession (loader, getSessionName(), Thread.currentThread () .getContextClassLoader (), true, true);
}
public static closeSession() Sub {}
SessionManager.getManager () .destroyAllSessions ();
session = null;
}
Private Sub jButton1_actionPerformed (ActionEvent e) {}
Employee myEmp = new Employee();
createSession();
}
Private Sub jButton2_actionPerformed (ActionEvent e) {}
Employee theEmp = new Employee();
UOW UnitOfWork = session.acquireUnitOfWork ();
try {}
theEmp.setFnama ("A");
theEmp.setLnama ("B");
UOW.Commit ();
} {Finally
UOW. Release();
}
}
For everyone who already knows the solution please reply as soon as possible. Because I really need this solution to finish my last final project.
Thank youWhen you create a new instance, you must register with the UnitOfWork in order to have the new entity has persisted.
Employee theEmp = new Employee();
UOW UnitOfWork = session.acquireUnitOfWork ();theEmp.setFnama ("A");
theEmp.setLnama ("B");uow.registerObject (theEmp);
UOW.Commit ();
Doug
-
Application using Java SDK 5.0 compatible with the lower SDK version?
Hello
I wanted to know if I'm developing an application using the Blackberry Java SDK 5.0, it would work on slot version 4.3 or 4.2.1? If the current application has features not available on the previous version of course.
I mean, if I develop an application of basic as a HelloWorld with SDK 5.0, this app works on a phone with SDK 4.2.1?
Thank you
Damien.
The only time where I tried it, I received an error of compatilbility so I would say not in my experience.
My suggestion is to build with backward compatibility in mind and remember that what you build for 4.2 will work in 5.0 and so on.
-
How to remove all catalogs org using java sdk
I am trying to remove all the catalogs of organization that I wrote for the catloges of org in this loop even not able to use the code below
Admincataloge it is by exception, if someone help me as this code to remove the catalogs in the Organization, it's greate for me help. I'm new java coding this code not structured.If
(! organizationsMap . isEmpty())
{
ReferenceType organizationReference =
organizationsMap .get (OrganizationName);
System.
on . Print (OrganizationName);
System.
on . println();
System.
on .println (organizationReference.getHref ());
Organization is organization. getOrganizationByReference (
vcloudClient , organizationReference);
Collection < ReferenceType > catalogLinks = organization.getCatalogRefs ();
if (! catalogLinks.isEmpty ())
{
for (CatalogLink ReferenceType: catalogLinks)
{
Catalog category = Catalog. getCatalogByReference (
vcloudClient , catalogLink);
CatalogType catalogType = catalog.getResource ();
System.
on .print ('-' + catalogType.getName ());
System.
on . println();
System.out.println ("-" + catalogLink.getHref ());
} System of.
on . println();
}
on the other
System.
on .println ("no catalog found");
}
else {
System.
on .println ("No organization");
System. output (0) ;
}
Hello
You need to go to the VcloudAdmin and then iterate over the AdminOrganizations and its AdminCatalogs to remove the catalogs.
You can do something like this.
Access the admin of Vcloud.
Admin of VcloudAdmin = vcloudClient.getVcloudAdmin ();Iterate through the admin organizations.{for (adminOrgRef ReferenceType: {admin.getAdminOrgRefs ())}AdminOrganization adminOrg = AdminOrganization.getAdminOrgByReference (vcloudClient, adminOrgRef);Browse the catalogues of the admin.{for (adminCatRef ReferenceType: {adminOrg.getCatalogRefs ())}try {}Delete the catalog.AdminCatalog.delete (vcloudClient, adminCatRef);System.out.println ("Catalogue deleted-" + adminCatRef.getName ());} catch (VCloudException e) {}System.out.println ("Delete Catalog Failed-" + adminCatRef.getName () + "-" + e.getLocalizedMessage ());}}}Kind regards
Rajesh Kamal.
-
Hi all
I'm new to global vCloud. I'm trying to create a vApp by instantiating a model existing in vDC. I am getting error below. Could someone please tell what could be the problem? Thank you much for the help. I do not have full access to the catalog.
June 17, 2011 14:02:36 com.vmware.vcloud.sdk.RestUtil post
INFO: - > Post: https://rarvcloud.dfdev.jnj.com/API/v1.0/VDC/1735607793/action/instantiateVAppTemplate
June 17, 2011 14:02:36 com.vmware.vcloud.sdk.RestUtil post
NEWS: POST Request Body: <? XML version = "1.0" encoding = "UTF-8" standalone = "yes"? >
" < = xmlns:ns1 ns2:InstantiateVAppTemplateParams ' http://schemas.DMTF.org/OVF/envelope/1 "xmlns:ns2 =" " http://www.VMware.com/vCloud/v1 "xmlns:ns3 =" http://schemas.dmtf.org/wbem/wscim/1/CIM-Schema/2/CIM_ResourceAllocationSettingData "xmlns:ns4 =" http://schemas.dmtf.org/wbem/wscim/1/CIM-Schema/2/CIM_VirtualSystemSettingData "xmlns:ns5 =" http://schemas.dmtf.org/wbem/wscim/1/Common "xmlns:ns6 =" http://www.VMware.com/vCloud/versions "xmlns:ns7 =" http://www.VMware.com/vCloud/extension/v1 "name ="BalaTestvAppp"> " "" "" "
Bala Test VAPP < ns2:Description > < / ns2:Description >
< ns2:InstantiationParams >
< ns2:NetworkConfigSection >
< ns1:Info / >
< ns2:NetworkConfig networkName = "RBA 212" >
< ns2:Configuration >
" < ns2:ParentNetwork type="application/vnd.vmware.vcloud.network+xml "name ="RBA 212"href =" https://rarvcloud.dfdev.jnj.com/API/v1.0/network/1334432680 "/>
Bridge of < ns2:FenceMode > < / ns2:FenceMode >
< / ns2:Configuration >
< / ns2:NetworkConfig >
< / ns2:NetworkConfigSection >
< / ns2:InstantiationParams >
" < ns2:Source type="application/vnd.vmware.vcloud.catalogItem+xml "name ="RBA Test 1 "href =" https://rarvcloud.dfdev.jnj.com/API/v1.0/catalogItem/39249650 "/>
< / ns2:InstantiateVAppTemplateParams >
June 17, 2011 14:02:36 com.vmware.vcloud.sdk.RestUtil post
INFO: POST request Content-Type: application/vnd.vmware.vcloud.instantiateVAppTemplateParams+xml
June 17, 2011 14:02:36 com.vmware.vcloud.sdk.RestUtil post
INFO: POST charset request: null
June 17, 2011 14:02:36 com.vmware.vcloud.sdk.RestUtil post
INFO: Status Code: 403
June 17, 2011 14:02:36 com.vmware.vcloud.sdk.RestUtil post
INFO: Status line: HTTP/1.1 403 Forbidden
June 17, 2011 14:02:36 com.vmware.vcloud.sdk.RestUtil post
INFO: Status: banned
June 17, 2011 14:02:37 com.vmware.vcloud.sdk.RestUtil post
INFO: Response:? XML version = "1.0" encoding = "UTF-8"? >
" < error xmlns =" http://www.VMware.com/vCloud/v1 "minorErrorCode ="ACCESS_TO_RESOURCE_IS_FORBIDDEN"message =" no access to the entity & quot; com.vmware.vcloud.entity.vapptemplate:39249650 & quot;. ' majorErrorCode = '403' "xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "xsi: schemaLocation =" http://www.VMware.com/vCloud/v1 http://rarvcloud.dfdev.jnj.com/api/v1.0/schema/master.xsd"> < / error > " "
June 17, 2011 14:02:37 com.vmware.vcloud.sdk.Response Agency
NEWS: Planned the State Code: 201
June 17, 2011 14:02:37 com.vmware.vcloud.sdk.Response Agency
INFO: Actual status Code: 403
Exception in thread "main".
com.vmware.vcloud.sdk.VCloudException : no access to the entity 'com.vmware.vcloud.entity.vapptemplate:39249650'.
to com.vmware.vcloud.sdk.Response.handleUnExpectedResponse)
Response.Java:121 )
to com.vmware.vcloud.sdk.Vdc.instantiateVappTemplate)
VDC. Java:477 ( )
to com.vmware.vcloud.sdk.samples.HellovCloud.newvAppFromTemplate)
HellovCloud.java:270 )
to com.vmware.vcloud.sdk.samples.HellovCloud.main)
HellovCloud.java:375 )
===============
==
Here is the code snippet.
public
static Sub main (String args []) throws
VCloudException,
InterruptedException, HttpException, IOException,
KeyManagementException, {NoSuchAlgorithmException}
Usage example
Connection and getting the list of organization
HellovCloud. opening of session (
" https://MyOrg.com/API/versions " , "1.0" , "userid@RBA-POV" , "password"
);
Find a
VDC
VCC Vcc is HellovCloud. findVdc (
"RBA-POV" , "Org RBA vCD"
);
Catalog category = Catalog. getCatalogByReference (
vcloudClient , findCatalogRef(' RBA-POV ', 'RBA catalogue' )
));
Iterator Iterator < ReferenceType > =
null
;
iterator = catalog.getCatalogItemReferences () .iterator ();
System.
on .println ( 'List of the items in the catalogue' )
);
ReferenceType point =
null
;
While
(iterator.hasNext ()) {
Item = iterator.next ();
System.
on .println ( "name =" "')
+ item.getName ());
System.
on .println ( "href =" "')
+ item.getHref ());
}
ReferenceType vAppTemplatereference =
null
;
vAppTemplatereference = item;
Instantiation of the vAppTemplate
VAPP vapp is HellovCloud. newvAppFromTemplate (vAppTemplatereference, vdc);
waitForTaskCompletion (vapp.getTasks () .get (0));
chaning all the vms ip address mode static ip pool
configureVMsIPAddressingMode (vapp.getReference (), vdc);
String vappName = vapp.getReference () .getName ();
Deploy the VAPP Instantiated
System.
on .println (' deployment of the " " ')
(+ vappName);
System.
on .println("--------------------"
);
waitForTaskCompletion ((vapp.deploy)
fake
1000000));
Turn the VAPP
System.
on .println (' PowerOn the ' )
(+ vappName);
System.
on .println("-------------------"
);
waitForTaskCompletion (vapp.powerOn ());
Suspend the vApp
System.
on .println ("suspend the" )
(+ vappName);
System.
on .println("-------------------"
);
waitForTaskCompletion (vapp.suspend ());
Turn the VAPP
System.
on .println (' PowerOn the ' )
(+ vappName);
System.
on .println("-------------------"
);
waitForTaskCompletion (vapp.powerOn ());
Turn off the vApp
System.
on .println ("PowerOff the ' )
(+ vappName);
System.
on .println("--------------------"
);
waitForTaskCompletion (vapp.powerOff ());
Undeploy VAPP
System.
on .println (' cancel the deployment of the " " ')
(+ vappName);
System.
on .println("--------------------"
);
waitForTaskCompletion ((vapp.undeploy)
true
));
Removal of vApp
System.
on .println (' remove the " " ')
(+ vappName);
System.
on .println("------------------"
);
Hello
Get to the Organization of your preference.
Organization org = organization. getOrganizationByReference (vcloudClient, vcloudClient.getOrgRefByName ("OrgName"));
Download the catalogues of this organization.
{for (catRef ReferenceType: {org.getCatalogRefs ())}
Cat catalog is a Catalog. getCatalogByReference (vcloudClient, catRef);
Check if the catalog is published.
If (cat.getResource () .isIsPublished ()) {}
System. out.println (cat.getReference (). GetName());
Download the catalog items and its entities.
{for (catItemRef ReferenceType: {cat.getCatalogItemReferences ())}
CatalogItem catItem is CatalogItem. getCatalogItemByReference (vcloudClient, catItemRef);
System. out.println ("" + catItem.getEntityReference () .getName () + "-" + catItem.getEntityReference () .getType () "");
}
}
}
Kind regards
Rajesh Kamal.
-
could get java sdk 2.5 vi used Ports, uplinks, as "esxcfg-vswitch - l"?
I try to get the Ports used, java sdk 2.5 uplinks vi. can anyone guide?
Thank you
out of runing 'esxcfg-vswitch - l' as follows:
root@esxhost5# esxcfg - vswitch - lSwitch name Num used Ports configured Ports MTU rising ports
64 4 64 1500 vmnic0 vSwitch0
Name PortGroup VLAN ID used rising Ports
0 1 vmnic0 Console service
Switch name Num used Ports configured Ports MTU rising ports
64 18 64 1500 vmnic1 vSwitch1
Name PortGroup VLAN ID used rising Ports
Prod_1 5 501 vmnic1
Prod_2 502 2 vmnic1
Prod_3 2 503 vmnic1
Prod_4 3 504 vmnic1
Prod_5 6 505 vmnic1
root@esxhost5#.[Take a look at the host-> config-> network-> vswitch]
You will find numPorts and numPortsAvailable and you can do a little math to calculate usedPorts as which is not set automatically.
Here is a sample of how it is actually implemented in esxcfg-vswitch
my $portGroups = $vSwitch->portgroup; foreach my $port (@$portGroups) { my $pg = FindPortGroupbyKey ($netMgr, $vSwitch->key, $port); next unless (defined $pg); my $usedPorts = (defined $pg->port) ? $#{$pg->port} + 1 : 0;
You can find the details if you download the RCLI and they are just standard Perl scripts, and it should help to explore the VI API and find what you need.
=========================================================================
William Lam
VMware vExpert 2009
Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/
-
Creation of posts of Siebel using JAVA API in IOM
Hi Experts,
I need to create positions of Siebel using JAVA API.
I try to incorporate OIM 11 g-Siebel connector, but this connector is not able to create new positions of siebel.
Please tell me where to find the info/examples of use of the api or how to best integrate?
Thanks in advance
Kiran
This is useful.
I was able to create a post of siebel using the model given here,
-
URL of Java sdk sample programs
In the following example, where can I find the vCloudApiVersionsURL and https://vcloud/api/versions.
I have already installed vsphere and vcenter. Do I need to install any other software?
/** ******************************************************** Copyright VMware, Inc. 2009-2010. All rights reserved.* ********************************************************* WARNING. THIS PROGRAM IS PROVIDED TO YOU "AS WHAT ' WITHOUT* WARRANTIES OR CONDITIONS # IF ORAL, WRITTEN, OR ANY* EXPLICIT OR IMPLICIT. THE AUTHOR SPECIFICALLY # DISCLAIMS ANY IMPLIED* WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY # QUALITY,* ABSENCE OF INFRINGEMENT AND APPROPRIATENESS HAS A PARTICULAR PURPOSE.*/package com.vmware.vcloud.sdk.samples.extra;import java.io.IOException;import java.security.KeyManagementException;import java.security.NoSuchAlgorithmException;import java.util.Map;Import org.apache.commons.httpclient.protocol.Protocol;Import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;import com.vmware.vcloud.api.rest.schema.ReferenceType;import com.vmware.vcloud.api.rest.schema.versioning.VersionInfoType;import com.vmware.vcloud.sdk.Organization;import com.vmware.vcloud.sdk.VCloudException;import com.vmware.vcloud.sdk.Vapp;import com.vmware.vcloud.sdk.VcloudClient;import com.vmware.vcloud.sdk.Vdc;/*** This example search details VAPP given one of the ip of the virtual machine** @author ecosystem Engineering**/public class FindvAppByIp {}public static VcloudClient customer;/*** This method searches the VAPP for ip of the given virtual machine.*@param expectedIp* @return* @throws VCloudException*/public static ReferenceType findvAppByIp (String expectedIp)get {VCloudException}{for (orgRef ReferenceType: {client.getOrgRefs ())}Organization org = Organization.getOrganizationByReference (customer,orgRef);{for (vdcRef ReferenceType: {org.getVdcRefs ())}VCC Vcc = Vdc.getVdcByReference (customer, vdcRef);{for (vappRef ReferenceType: {vdc.getVappRefs ())}VAPP vapp = Vapp.getVappByReference (customer, vappRef);{for (VAPP vm: {vapp.getChildrenVms ())}{for (String actualIp: {vm.getIpAddresses ())}If (actualIp! = null)If (actualIp.equals (expectedIp)) {}Return vm.getParentVappReference ();}}}}}}Returns a null value.}Public Shared Sub main (string args []) throws VCloudException,KeyManagementException NoSuchAlgorithmException, IOException {}If (args.length < 5) {}System.out.println ("java FindvAppByIp vCloudApiVersionsURL 1.0 user@organization ipaddress password");System.out.println ("java FindvAppByIp https://vcloud/api/versions 1.0 user@Organizaiton ipaddress password");System.Exit (0);}Implementation for SSL access. Do not use production environmentHttps protocol = new Protocol ('https',((ProtocolSocketFactory) new FakeSSLSocketFactory(), 443);Protocol.registerProtocol ("https", https);client = new VcloudClient(args[0]);Versions of map < String, VersionInfoType > = client.getSupportedVersions ();customer. Login (args [2], args [3], versions.get(args[1]));ReferenceType vappRef = findvAppByIp(args[4]);VAPP vapp = Vapp.getVappByReference (customer, vappRef);System.out.println (vApp.GetResource (). GetName());System.out.println (vApp.GetResource () .getHref ());}}Hello
What is the vcenter sdk?
-4.1 ESX/ESXi and vCenter Server 4.1 systems provide a Web service that you can access using the vSphere API. The vSphere Web Services SDK facilitates the development of client applications that target the vSphere API.
http://www.VMware.com/support/developer/VC-SDK/
Can't, I used without vCloud Director?
-Talk to the vCloud API by using the SDK vCloud, to vCloud Director.
Kind regards
Wangzi
-
Cannot be displayed using the sdk of twitter
I am unable to switch using the sdk of twitter, My credential is unable to check every time. Please test my code where I'm wrong
package mypackage;
Import impl.rim.com.twitterapime.xauth.ui.BrowserFieldOAuthDialogWrapper;
Import net.rim.device.api.browser.field2.BrowserField;
Import net.rim.device.api.ui.UiApplication;
Import net.rim.device.api.ui.component.ButtonField;
Import net.rim.device.api.ui.component.Dialog;
Import net.rim.device.api.ui.component.LabelField;
Import net.rim.device.api.ui.container.MainScreen;import com.twitterapime.rest.Credential;
import com.twitterapime.rest.TweetER;
import com.twitterapime.rest.UserAccountManager;
import com.twitterapime.search.Tweet;
import com.twitterapime.xauth.Token;
import com.twitterapime.xauth.ui.OAuthDialogListener;
import com.twitterapime.xauth.ui.OAuthDialogWrapper;
SerializableAttribute public class TwitterScreen11 extends form {}Private final String CONSUMER_KEY = "NNIMJ7Jwy3fbYKCuSt0eA";
Private final String CONSUMER_SECRET = "XVkHEu8G6Ne52Rpujlwu8qOkB5jYfhFSNTeurMBCt8";
"Final Private String CALLBACK_URL ="http://www.google.co.in ";//' http://twitterapp: / / connect";
private LabelField _labelStutus;
private OAuthDialogWrapper WrapperPage = null;
public StoreToken _tokenValue;
ShowAuthBrowser showAuthBrowserScreen;public TwitterScreen11()
{
setTitle ("Twitter integration using OAuth");showAuthBrowserScreen = new ShowAuthBrowser();
Add (new ButtonField ("Tweet") {}
protected boolean navigationUnclick (int status, int time) {}
showAuthBrowserScreen.doAuth (null);
UiApplication.getUiApplication () .pushScreen (showAuthBrowserScreen);Returns true;
}
});
}' public boolean doTweet (String message, Credential c)
{
Boolean = false;
UAM UserAccountManager = UserAccountManager.getInstance (c);
Try
{
If (uam.verifyCredential ())
{
TweetER.getInstance (uam) .post (new Tweet (message));
= true;
}
}
catch (System.Exception e)
{
System.out.println ("error in posting tweet". + e.getMessage ());
}
return;
}class ShowAuthBrowser extends OAuthDialogListener implements screen
{
BrowserField b = new BrowserField();public ShowAuthBrowser()
{
_labelStutus = new LabelField ("your app is be allow.");
Add (_labelStutus);
Add (b);
WrapperPage = new BrowserFieldOAuthDialogWrapper(b,CONSUMER_KEY,CONSUMER_SECRET,CALLBACK_URL,this);
pageWrapper.setOAuthListener (this);}
public void doAuth (string PIN)
{
Try
{
If (brooch is nothing)
{
pageWrapper.login ();
}
on the other
{
this.deleteAll ();
Add (b);
pageWrapper.login (PIN);
}}
catch (System.Exception e)
{
the final message String = "error loggin Twitter:"+ e.getMessage ();.
Dialog.Alert (message);}
}{} public void onAccessDenied (string response)
Dialog.Alert ("Access denied");
System.out.println ("access denied! -> "+ response);
updateScreenLog (Acceso refused '! ") -> "+ response);}
{} public void onAuthorize (final token token)
last token token = myToken;
Credential c = new information of identification (chip CONSUMER_KEY, CONSUMER_SECRET),
String message = "888 here."
Boolean = false;
done = doTweet (message, c);
if(Done == true)
{
UiApplication.getUiApplication () .invokeLater (new Runnable() {}
public void run() {}
UiApplication.getUiApplication () .pushScreen (new MyScreen ("Tweet succusfully"));
}
});
} else {}
UiApplication.getUiApplication () .invokeLater (new Runnable() {}
public void run() {}
UiApplication.getUiApplication () .pushScreen (new MyScreen ("Impossible to tweet"));
}
});}
// }
// });}
' public void onFail (String arg0, String arg1) {}
Dialog.Alert ("fail Authroise");
updateScreenLog ("error authenticating user. -> "+ arg0 +", "+ arg1);"}
}Private Sub updateScreenLog (final String message)
{
UiApplication.getUiApplication () .invokeLater (new Runnable() {}public void run() {}
_labelStutus.SetText (message);
}
});
}public boolean onClose() {}
Close();
Returns true;
}}
Help, please
Hi nidhicdn,
I've done the integration of Twitter. You can download the demo here http://supportforums.blackberry.com/t5/Java-Development/Twitter-integration-exception/td-p/2472381/p.... but read this thread to start. -
Hello
can someone tell me up to which version of the java sdk, we can use in blackberry.
Java BlackBerry os is based on j2me, which is in turn based on java 1.4 (or 1.3?)
in any case, you cannot use the api collections unless you implement it yourself.
basically: use vector and hashtable. -
VMware Vcenter Converter Standalone Java SDK
Hi guys,.
Currently, I'm trying to imitate what is the GUI version, but I want to use scripts to do the work that is, somehow, to automate the whole process. I installed the Client-Server version, using the code example in the sdk > samples > axis, I managed to do the job, however, I'm unable to specify the minimum value for a specific record. I want to do this because the GUI version allows me to take a minimum storage for a specific disk space and place it on the ESXi server, for my version of java SDK I am unable to take the minimal storage space and had to take the entire disk that I don't like.
For example, the C drive has a total of 200 GB with 50 GB used space and 150 GB of unused space
Version of GUI-> able to avoid 200 GB and take approximately 50 GB only (give and take a few GB more) push-to-server ESXi
Version java SDK-> only able to take in all of 200 GB and push to ESXi that takes lots of my ESXi ServerIs it possible, for example by specifying a certain variable so that I can push my drive with minimum disk storage value instead of taking the entire batch of unused space? Oh and 1 other question, is possible to turn on virtual machines in the ESXi after reboot using a script? I did search but can't really find anything so I thought that it would be a good thing to ask here. Any help would be appreciated because I'm a newbie with this
See you soon!
Hello
You must set the target disk and volumes to clone in order to be able to specify the size of the volume. By default, when these are disabled, is to keep the source size of the volumes.
First make sure you have the SDK examples that are new, such as 6.0 or 6.1. Then, look at the end of the submitwinp2vjob.properties file, you will see this section:
; Must precede the individual disk fields. Assumed to be 0 if not defined. Must follow target.type.
; Fields of individual disk with a number equal or greater than this indictment will be ignored.
Storage.targetdisk.Count =
; Use of the source id obtained by QuerySource or leave blank for new disks
Storage.targetdisk.sourcediskid #0 =
; The valid values for target managed: vmfsMonolithicFlat, vmfsMonolithicFlatThinProvisioned,.
; vmfsTwoGbFlat, vmfsTwoGbFlatThinProvisioned
; The valid values for target hosted: monolithicFlat, monolithicSparse, twoGbFlat, twoGbSparse
; Leave blank to use the default value of the target
Storage.targetdisk.DiskType #0 = vmfsMonolithicFlatThinProvisioned
Storage.targetdisk.LVG #0 = false
Storage.targetdisk.GPT #0 = false
Storage.targetdisk.datastore #0 =; Name of the data store; applicable and compulsory for managed targets
; Must precede the fields individual volumestoclone. Assumed to be 0 if not defined.
; Fields of individual volume with a number equal or greater than this indictment will be ignored.
Storage.targetdisk.volumestoclone.Count #0 =
; The first index is the index of the disk, the second is the volume index
; Use of that source id obtained by QuerySource
Storage.targetdisk.volumestoclone.sourcevolumeid #0 #0 =
Storage.targetdisk.volumestoclone.Resize #0 #0 = false
Storage.targetdisk.volumestoclone.newcapacityinbytes #0 #0 =
Storage.targetdisk.volumestoclone.newclustersizeinbytes #0 #0 =
Here, you must complete the number of target, properties of the target disks disk and their number of respective volumes and properties.
The trickiest part is to get the ID of source disks and volumes. Querying the source info will give you this data (as indicated by the comment). Then, you have to find a way to set up the configuration of the target using these data. It is this that the customer of the user interface, and it gives a lot of flexibility for the user to change this configuration. Something that you should be aware is that when this Linux P2V, each logical volume group gets its own target disk (and his "storage.targetdisk.lvg #i" sets to true).
Once you describe the target configuration, usestorage.targetdisk.volumestoclone.resize #i #j = true fields'and'storage.targetdisk.volumestoclone.newcapacityinbytes #i #j =
' resize the volume. The numbers after the signs sharp suck according to index (not ID!) of the disk and volume (in that order). In the previous line, 'I' is the index of the disc, 'j' is the volume index.
HTH
Plamen
-
Hello world
During playback of Oracle ADF Real World Developer's Guide, I noticed the dates match occurring in JDeveloper is different from what is the list in the book. JDeveloper is failing to oracle.jbo.domain.Date, but according to the book:
DATE java.sql.Date DATE type is mapped to java.sql.Date if the column in the table is a no time didn't need information zone. DATE java.sql.Timestamp DATE type is mapped to java.sql.Timestamp if the column in the table has a component "time" and that the client needs to zone information. TIMESTAMP java.sql.Timestamp The TIMESTAMP type is mapped to java.sql.Timestamp if nanosecond precision is used in the database. In general, is it better to use java.sql.Date and java.sql.Timestamp instead of oracle.jbo.domain.Date? Using java.sql.Date and java.sql.Timestamp could save me some headaches conversion date. And, is there a place in JDeveloper to display these maps? I looked around and didn't see anything.
Thank you.
James
User, what version of jdev we are talking about?
In GR 11, 1 material versions db types date and timestamp are mapped to types of domain data that represents a wrapper for the native data types. The reason was that the framework can work with the domain types regardless of the underlying data type.
Since Oracle 11 GR 2 maps the types DB to java types (default selection, you can change it when you create a model project, you can set the Data Type Mapping). Once the pilot has business components define you cannot change this setting it would break existing components such as eo or vo.
So if you are working wit 11 GR 1 subject, you must use the domain types, if you work with GR 11, 2 or 12 c, you can use the domain types, but it is recommended to use the java type mapping.
Timo
-
I am trying to collect "ListAllvApps.java" code in vCloud Java SDK and run it. Everything that I try to run gives an error about the "FakeSSLSocketFactory" Code and the output is below. Name of the Java application is "Vapplist". Only to learn java so be gentle.
Code:
/*
* *******************************************************
* Copyright VMware, Inc. 2009-2010. All rights reserved.
* *******************************************************
*
* WARNING. THIS PROGRAM IS PROVIDED TO YOU "AS WHAT ' WITHOUT
* WARRANTIES OR CONDITIONS # IF ORAL, WRITTEN, OR ANY
* EXPLICIT OR IMPLICIT. THE AUTHOR SPECIFICALLY # DISCLAIMS ANY IMPLIED
* WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY # QUALITY,
* ABSENCE OF INFRINGEMENT AND APPROPRIATENESS HAS A PARTICULAR PURPOSE.
*/
package com.vmware.vcloud.sdk.samples;import java.io.IOException;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.util.HashMap;Import org.apache.commons.httpclient.HttpException;
Import org.apache.commons.httpclient.protocol.Protocol;
Import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;import com.vmware.vcloud.api.rest.schema.ReferenceType;
import com.vmware.vcloud.sdk.Organization;
import com.vmware.vcloud.sdk.VCloudException;
import com.vmware.vcloud.sdk.VcloudClient;
import com.vmware.vcloud.sdk.Vdc;/*
List of all the vApps
*
*/public class Main {}
Public Shared Sub main (string args []) throws HttpException,
VCloudException, IOException, KeyManagementException,
{NoSuchAlgorithmException}If (args.length < 4) {}
System.out
.println ("java ListAllvApps vCloudApiVersionsURL 1.0 user@organization password");
System.out
.println ("java ListAllvApps https://vcloud/api/versions 1.0 user@System Password");
System.Exit (0);
}Implementation for SSL access. Do not use production environment
Https protocol = new Protocol ('https',
((ProtocolSocketFactory) new FakeSSLSocketFactory(), 443);
Protocol.registerProtocol ("https", https);Client connection
VcloudClient vcloudClient = new VcloudClient(args[0]);
< String, ReferenceType > HashMap orgsList = vcloudClient.login (args [2],)
args [3], vcloudClient.getSupportedVersions (.get(args[1])));Course of tree and print out all the vapps
System.out.println ("listing all the vApps");
System.out.println("---");
{for (orgRef ReferenceType: {orgsList.values ())}
for (vdcLink ReferenceType: Organization)
.getOrganizationByReference (vcloudClient, orgRef)
{(.getVdcRefs())}
for (ReferenceType vAppRef: Vdc.getVdcByReference ())
vcloudClient, {vdcLink) .getVappRefs ())}
System.out.println (vAppRef.GetName ());
System.out.println (vAppRef.getHref ());
System.out.println ();
}}
}}
}_____________________________________________
Clean and build output-
init:
LIFO-clean:
Update property file: /Users/tkraus/NetBeansProjects/vapplist/build/built-clean.properties
Delete the Directory/Users/tkraus/NetBeansProjects/vapplist/build
clean:
init:
DEPS-jar:
Created dir: / Users/tkraus/NetBeansProjects/vapplist/build
Update property file: /Users/tkraus/NetBeansProjects/vapplist/build/built-jar.properties
Created dir: / Users/tkraus/NetBeansProjects/vapplist/build/classes
Created dir: / Users/tkraus/NetBeansProjects/vapplist/build/empty
Compiling 1 source file to/Users/tkraus/NetBeansProjects/vapplist/build/classes
/ Users/tkraus/NetBeansProjects/vapplist/src/com/vmware/vcloud/sdk/samples/Main.java:50: cannot find symbol
symbol: FakeSSLSocketFactory, class
location: com.vmware.vcloud.sdk.samples.Main of the class
((ProtocolSocketFactory) new FakeSSLSocketFactory(), 443);
^
1 error
/ Users/tkraus/NetBeansProjects/vapplist/nbproject/build-impl.xml:531: the following error occurred during the execution of this line:
/ Users/tkraus/NetBeansProjects/vapplist/nbproject/build-impl.xml:261: compilation failure; See the error output of the compiler for details.
BUILD FAILED (total time: 0 seconds)Hello
All samples require the FakeSSLSocketFactory.java.
Just drag the FakeSSLSocketFactory.java in the com.vmware.vcloud.sdk.samples package.
You can find this FakeSSLSocketFactory.java in the vcloud-java-sdk-samples-1.0-sources.jar.
Kind regards
Rajesh Kamal.
-
Create the new virtual machine using Java API vCloud
Hi guys,.
I am trying to create the new virtual machine in TIME, but I've stuck here. The API I'm using is vcloud-java-sdk - 1.0.jar.
Could you please show me a code snippet how to do this?
For now I do it like this:
RecomposeVAppParamsType recomposeVAppParamsType = new RecomposeVAppParamsType();
List the items < CompositionItemParamType > = recomposeVAppParamsType.getItem ();
ReferenceType vappTemplateVMRef = new ReferenceType();// ??? seems that new reference to the new virtual machine should be here. But how to create this VM
CompositionItemParamType compositionItemParamType = new CompositionItemParamType();
compositionItemParamType.setSource (vappTemplateVMRef);Items.Add (compositionItemParamType);
ReferenceType vAppRef is Vdc.getVdcByReference (vcloudClient, vdcRef) .getVappRefByName ("vApp_Websrv");.Vapp.getVappByReference (vcloudClient, vAppRef) .recomposeVapp (recomposeVAppParamsType);
One day before I played with Web Services SDK, which is much easier to understand. I was able to create the vApp and VMs in vSphere. Is it possible to import machines virtual vSphere to vCloud? Should what API I use for this?
Thank you
Hello
You cannot add a new empty virtual machine in a paralytic.
Instead, you can add a virtual machine from an existing vapp, vapptemplate.
To import a vsphere vm to vcloud.
Import vsphere vm as VAPP in vcloud. VMWVimserver-> importVmAsVApp()
The importation of vsphere vm, as vAppTemplate, in vcloud. VMWVimserver-> importVmAsVAppTemplate()
See also the example of ImportVmAsvAppTemplate.java, which is part of the vcloudjavasdk group.
Kind regards
Rajesh Kamal.
-
getting exception when using JavaFX SDK/JRE bundled in Netbeans
When I try to put my JavaFX SDK/JRE to use Java SE and run my application I get an exception ClassLoader (java.lang.NoClassDefFoundError: javafx/application/application).
I still have to get my Netbeans to use properly the bundled JavaFX SDK/JRE that come with JRE/SDK to the Java SE. I am referring to Java for JavaFX platform properties (in a project-> properties-> library-> manage-> tab JavaFX platforms).
Here's what I have my JavaFX platform settings the value:
JavaFX SDK--> C:\Program Files (x86)\Java\jdk1.7.0_10
JRE JavaFX--> C:\Program Files (x86)\Java\jdk1.7.0_10\jre
I am currently using 7u10 7.2 Netbeans and Java (the problem also occurs with 7u7 and 7u6).
For those who using Java7u6 and later, can you tell me what your platform setting manage is the JavaFX tab?
Thank you
JoseOK its fixed. I noticed that the word hellow JavaFX netbeans 7.2 contains the following pots as part of its compilation libraries, jfxrt, deploy, plugin and javaws. In my project of problem I just add them to my library of compilation and it worked.
Thanks for the help Igor.
Jose
Maybe you are looking for
-
Satellite L300 - 20 d is not fully put into operation
Please can someone help me. I have a 20 d toshiba L300 and he simply stopped boot completely. It goes to a black screen with the cursor arrow or it shows just launch windows (recommended repair) when I click this, it does nothing. I tried to restore
-
WiFi connected but browsers and mail stop working
Here's the situation: iMac, 4 years, OS X 10.7.5 WiFi connected but, browsers and mail stop working sometimes recently. Checked the wifi & browser settings. Do not remember something like what happens when connected online cat5. Curious to know what
-
Flash Cards (FN) do not work on my Satellite P300D-14 has
Hello I'm having a P300D 14A. After the start of the hibernation mode, I can't use the FN key to get the menu. Some of the keys are working without the menu, but not all.After a restart of power is ok until I use mode Hibernate once more.IM using Win
-
Satellite M105 - recovery disk is not load all the drivers
I wiped my M105 HD using the Toshiba Recovery DVD. XP Home loaded, but good number drivers did not load as the ATI, Intel Wireless, Ethernet, etc..Most of the factory programs installed, but not important factors. What do you advise? Thank you
-
The mouse does not work after I restored the IBM thinkpad to the factory setting.
I have an IBM thinkpad with win XP. I restored it back to factory setting. But I couldn't use the mouse more.