Obtaining CORBA Object References
I have found two separate references on the Sun site to the different ways in which clients may reference CORBA objects. In each case, three methods are listed, but one item in each list seems to be different from the 'corresponding' item in the other list.
At URL http://java.sun.com/j2se/1.3/docs/guide/idl/jidlInitialization.html, the following list is given:
1. From a string that was specially created from an object reference
2. From another object, such as a naming context
3. From the ORB operation resolve_initial_references()
[Numbers added by me for ease of reference.]
At URL http://java.sun.com/j2se/1.3/docs/guide/idl/jidlUsingCORBA.html, the following list is given:
1. from a factory object. For example, the client could invoke a create method on DocumentFactory
object in order to create a new Document. The DocumentFactory create method would return an
object refererence for Document to the client.
2. from the nameservice. For example, the client could obtain an object reference for the
DocumentFactory by issuing a request on the nameservice.
3. From a string that was specially created from an object reference
Though items 1 and 2 from the first list seem to correspond closely to items 3 and 2 respectively from the second list, item 3 (list 1) and item 1(list 2) do not. Does anybody know how this apparent anomaly can be resolved and which (if either) of these lists is (more?) correct?
Thanks in anticipation.
Jan
There really is not an anomaly here. What you are indicating as an anomaly is really two distinct things.
There are always two steps here:
1. How does your client get the initial object reference to the server object(s). The list 1 comprehensively describes that. Typically the initial object references will be few.
2. Once the initial references are acquired, client can make calls using these initial references to get other object references, during the clients life time. The item 1 in list 2 is a way of doing this.
The list 1 is giving you ALL possible ways of acquiring an object reference for the very FIRST time.
Item 1 in list 2 is actually suggesting a pattern or a way or doing something. For example, if your client wishes to create multiple objects of a certain family, you can use a DocumentFactory on the server side. You would acquire initial reference to the DocumentFactory using one of the ways described in List 1. Once the client has the DocumentFactory reference, it can call create on it to create Document objects on the server side. Also, the create() method will return a reference to the Document object to the client.
Similar Messages
-
Hosting a CORBA object with a Weblogic Container
Hi,
I'm trying to host a CORBA object within a Weblogic (8.1) container
using the weblogic built-in ORB and only using CORBA-compliant APIs.
When I try to obtain the RootPOA using:
org.omg.CORBA.Object obj = orb.resolve_initial_references("RootPOA");
The container throws the exception:
Unexpected System Exception:org.omg.CORBA.ORBPackage.InvalidName
Usually this means that the POA was not registered as an initial
service, but that just can't be the case since I know the weblogic EJB
container uses the POA.
Btw- the handle to the orb was obtained using:
// Initialize the ORB.
String args[] = null;
Properties Prop;
Prop = new Properties();
Prop.put("org.omg.CORBA.ORBClass",
"weblogic.wtc.corba.ORB");
ORB orb = (ORB)new InitialContext().lookup("java:comp/ORB");
Any ideas are greatly appreciated.
MikeThanks Andy!
Btw- orbd must be running for resolve_initial_references() to work.
Seems weird to me.
After which, I was able to host a callback servant in my weblogic
container using the native JDK ORB/POA but now I've run into a deeper
issue. When the client calls back on the hosted callback object, the
JDK ORB processes the request but then raises an
IT_GIOP:REPLY_MESSAGE_NOT_CONSUMED exception.
It's since been brought to my attention that this indicates a
marshalling error with regards to extra bytes being on the stream after
the request has been unmarshaled. Either due to a spotty or older ORB
implementation. The advise is that the JDK ORB is just such an ORB.
I'd like to try using the JacORB within my weblogic container.
Has anyone done this that you know of?
Thanks for the help,
Mike
Andy Piper wrote:
Michael McKnerney <[email protected]> writes:
Hmmn weird. It seems like it wants a URL or something to connect to which seems wrong.
The source for list_initial_services says:
* Get a list of the initially available CORBA services.
* This does not work unless an ORBInitialHost is specified during initialization
* (or unless there is an ORB running on the AppletHost) since the localhostname
* is inaccessible to applets. If a service properties URL was specified,
* then it is used, otherwise the bootstrapping protocol is used.
* @return A list of the initial services available.
So you need an initial host if you use this. However, the root poa is
already registered, so it looks like you can use that. You will need
an initial host if you want to bind things into the NS, in theory you
should be able to use WLS for that.
andy
Thank Andy,
Still no luck, however, the call does not hang it thows and I wasn't catching the
exception and printing the stack trace.
Here's my sample code and the stack trace. Do you see what the problem is?
// Method: ejbFindBigAccounts {
try {
String args[] = null;
Properties Prop = new Properties();
Prop.put("org.omg.CORBA.ORBClass",
"com.sun.corba.se.internal.Interceptors.PIORB");
System.out.println("Initializing the orb...");
ORB orb = org.omg.CORBA.ORB.init(args, Prop);
// Test list_initial_services
System.out.println("Calling resolve_initial_references");
java.lang.String[] ids = orb.list_initial_services();
for (int i=0; i<ids.length; ++i)
System.out.println(ids);
} catch (Exception e) {
System.out.println("Caught Exception: " + e);
e.printStackTrace();
throw new EJBException (e);
Output (including stack trace)
====================
Initializing the orb...
Calling resolve_initial_references
Caught Exception: org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed:
No
org.omg.CORBA.COMM_FAILURE: vmCORBAObjectImpl.javacid: SUN minor code: 201 completed: No
at
com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:148)
at
com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:65)
at com.sun.corba.se.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:67)
at
com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:652)
at
com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:594)
at
com.sun.corba.se.internal.corba.InitialNamingClient.getInitialServices(InitialNamingClient.java:997)
at
com.sun.corba.se.internal.corba.InitialNamingClient.cachedServices(InitialNamingClient.java:967)
at
com.sun.corba.se.internal.corba.InitialNamingClient.list_initial_services(InitialNamingClient.java:925)
at com.sun.corba.se.internal.corba.ORB.list_initial_services(ORB.java:2414)
at
examples.ejb20.basic.beanManaged.AccountBean.ejbFindBigAccounts(AccountBean.java:328)
[snip]
Seeing that its trying to get a connection, does that mean I need to run the jdk orbd? I
figured the weblogic server would take the place of orbd. Anyway, I ran the same test
with orbd running and got the same exception and stack trace.
Thanks, Mike
Andy Piper wrote:
Michael McKnerney <[email protected]> writes:
Btw- I will use the J2SE ORB in the meantime. My understanding is that there can only be
one ORB per weblogic server, or can the J2SE co-exist with the existing weblogic ORB? (I
looked at the docs but it was still not clear to me)
They should be able to coexist if you pass the ORB class in as a
property to ORB.init() and are not using RMI-IIOP. The WLS
ORBSingletonClass should be compatible with the Sun one a vice versa.
-Dorg.omg.CORBA.ORBClass=com.sun.corba.se.internal.Interceptors.PIORB
Try putting this in ORB.init() instead.
But now anytime I invoke on an object reference, the call hangs.
Not sure. can you get threaddumps.
andy
[att1.html] -
Help!! - Unable to use the Application Module Deployed as Corba Object in Oracle 8i
I have been able to successfully deploy an Application Module in Oracle 8i but i am un able to get a reference to the Application Module from the database the code used by me is -
package client;
import javax.naming.Context;
import javax.naming.InitialContext;
import java.util.Hashtable;
import oracle.jbo.*;
import org.omg.CORBA.*;
public class Corba8IClient{
Hashtable env = new Hashtable();
ApplicationModule appMod = null;
String theAMDefName = "test/jd/freshJBO.FreshJBOModule";
public Corba8IClient() {
System.out.println("Started...");
// Load the Application Module
try{
// Component deployed to Oracle8i CORBA Server.
// Set up the 8i environment
System.out.println("Setting up initial Context...");
env.put(Context.INITIAL_CONTEXT_FACTORY, JboContext.JBO_CONTEXT_FACTORY);
env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_ORACLE8I);
env.put(Context.SECURITY_PRINCIPAL, "jd");
env.put(Context.SECURITY_CREDENTIALS, "jd");
env.put(JboContext.HOST_NAME, "Dev51");
env.put(JboContext.CONNECTION_PORT, "2481");
env.put(JboContext.ORACLE_SID, "ORA8I");
// env.put(JboContext.APPLICATION_PATH, "test/jd/");
System.out.println("Getting initial Context.");
Context ic = new InitialContext(env);
System.out.println("Doing Lookup...");
ApplicationModuleHome home = (ApplicationModuleHome)ic.lookup(theAMDefName);
System.out.println("Calling create...");
// home
System.out.println("Home Class Name : "+home.getClass().getName());
oracle.jbo.client.remote.corba.aurora.AuroraApplicationModuleHome am = (oracle.jbo.client.remote.corba.aurora.AuroraApplicationModuleHome)home;
System.out.println("DefName "+am.getDefName());
appMod = home.create();
System.out.println("Setting up connetion from AppMod to database...");
appMod.getTransaction().connect("jdbc:oracle:thin:jd/jd@dev51:1521:ORA8I");
}catch(Exception e) {
e.printStackTrace();
System.out.println("AppMod full Name "+ appMod.getFullName());
public ApplicationModule getAppMod(){
return appMod;
public static void main(String args[]){
Corba8IClient c8c = new Corba8IClient();
after running the output is -
Started...
Setting up initial Context...
Getting initial Context.
Doing Lookup...
Diagnostics: Silencing all diagnostic output (use -Djbo.debugoutput=console to see it)
Calling create...
Home Class Name : oracle.jbo.client.remote.corba.aurora.AuroraApplicationModuleHome
DefName null
oracle.jbo.ApplicationModuleCreateException: JBO-25222: Unable to create application module.
at oracle.jbo.client.remote.corba.CORBAApplicationModuleHomeImpl.create(CORBAApplicationModuleHomeImpl.java:63)
at client.Corba8IClient.<init>(Corba8IClient.java:39)
at client.Corba8IClient.main(Corba8IClient.java:53)
java.lang.NullPointerException
at client.Corba8IClient.<init>(Corba8IClient.java:45)
at client.Corba8IClient.main(Corba8IClient.java:53)
Corba Object is deployed as -
ObjectName = /test/jd/freshJBOModule
Server Class = freshJBO.server.o8.FreshJBOModuleServerO8
Helper Class = oracle.jbo.common.remote.corba.RemoteApplicationModuleHomeHelper
The Application Module conatians an entity object and a view object for Dept Table in schema jd(Username -jd, Password -jd).Moneesh,
I believe there is a problem with the way you set the variable theAMDefName. It should be:
String theAMDefName = freshJBO.FreshJBOModule";
Then you need to reinstate the line you commented out, to set the application path (but remove the trailing / from the path, as shown):
env.put(JboContext.APPLICATION_PATH, "test/jd");
If that doesn't work, and for future reference, I suggest testing your deployed application module from the Business Component Browser (aka the tester) before trying your hand-coded client. Start the tester, select Oracle8i as the middle tier server type, make sure the other information in the connect window is correct, then click Connect.
Good luck
Blaise -
Is there some limitation for the numbers of CORBA objects under Java IDL
Operation System : Windows 98 Second Edition(4.10.2222)
Java 2 SDK version :
java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)
I have programmed a distributed application with java IDL.
there are a lot of CORBA objects in my application and all of those objects must registered with the same orb.
At the beginning,I launched 4 CORBA objects,which is the least number of CORBA objects needed to run my application,and the application runs well.Then I increased the number of CORBA objects gradually.But when the number of CORBA objects has been changed to 6,the application runs instably,that is, the application sometimes runs well,and sometimes it generates an error when I launched my client-side program,the error is as follow:
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:161)
at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:65)
at com.sun.corba.se.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:67)
at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:644)
at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:586)
at com.sun.corba.se.internal.corba.ClientDelegate.is_a(ClientDelegate.java:838)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextExtHelper.narrow(NamingContextExtHelper.java:73)
at Client.main(Client.java:19)
the NO.19 line in Client.java is :
NamingContextExt ncref = NamingContextExtHelper.narrow(comobj);
The COMM_FAILURE/SUN-201 means CONNECT_FAILURE.
This will happen if a client gets a reference to an object reference whose server is not yet started,or perhaps not yet initialized.
But I think I have waited for enough long time before launched Client.java?Can anybody help me?Thanks very much....We are trying to connect to corba naming services using Apache/Tomcat5.0 .We are using servlets to call the Corba services.
We are initializing the ORB as follows:
Properties p= new Properties();
p.setProperty("org.omg.CORBA.ORBInitialHost","ramesh");
p.setProperty("org.omg.CORBA.ORBInitialPort","1234");
p.setProperty("org.omg.CORBA.ORBClass","com.sun.corba.se.internal.iiop.ORB");
ORB orb = ORB.init((String[])null,p);
nmref = NamingContextHelper.narrow(orb.resolve_initial_references("NameService"));
NameComponent[] dmNamingComps ={new NameComponent("DATAMgt","")};
DataManagement.DatamanagementFactory data_factory_ref= DataManagement.DatamanagementHelper.narrow(nmref.resolve(dmNamingComps ));
masterDataref = data_factory_ref.createMasterData();
=====================
when we run the program:
we are getting the error message:
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:161)
at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:65)
at com.sun.corba.se.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:67)
at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:644)
at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:586)
at com.sun.corba.se.internal.corba.ClientDelegate.is_a(ClientDelegate.java:838)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextExtHelper.narrow(NamingContextExtHelper.java:73)
at Client.main(Client.java:19)
Can anybody help ?Do we need any other configuration setup apart from the code in Apache/Tomcat? -
Reconstructing Object references
Im attempting to serialize an object which contains other object references, and then deserialize it back into a difference instance of the same java application. How can I reconstruct the object references inside my serialized object so that they once again point to the correct objects? I dont want to use any corba apis or anything like that, there must be some java native way of doing this (finding objects ie name resolution)...
Thanks in advanceYou have to read in the serialized object and cast it to the serialized object type.
//Guid is how I am differentiating the objects
try
ObjectInputStream in = new ObjectInputStream(new FileInputStream(guid));
YourClass yc = (ObjectMaker)in.readObject();
if (yc.equals(null))
System.out.println("Object Bean not found");
return;
in.close();
frame.getContentPane().add(yc,BorderLayout.CENTER);
This restores the object back to its type.
If you are using Drag and Drop, I would suggest creating a new constructor that accepts the bean name, and reading the object from within it's class. You can then restore the models from the constructor
hope this helps,
mattrock -
I am working on a standalone install Sharepoint 2013 (no Active Directory). I found newsfeed feature is not available and checked Distributed Cache service is stopped. When start it “cacheHostInfo is null” is returned.
I checked the Windows service “AppFabric caching service” is stopped because the default identity “Network Service” not work. Then I change the AppFabric service identity to use “.\administrator” (which is also the sp farm administrator) and the service can
be started.
However the “cacheHostInfo is null” when try to start Distributed Cache service in central admin.
I searched on web and found this blog: http://rakatechblog.wordpress.com/2013/02/04/sharepoint-2013-spdistributedcacheserviceinstance-cachehostinfo-is-null/
I tried to run the script but it return error:
Add-SPDistributedCacheServiceInstance : Object reference not set to an
instance of an object.
At C:\root\ps\test.ps1:8 char:13
+ $whatever = Add-SPDistributedCacheServiceInstance
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (Microsoft.Share…ServiceInstance:
SPCmdletAddDist…ServiceInstance) [Add-SPDistributedCacheServiceInstance]
, NullReferenceException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddDistr
ibutedCacheServiceInstance
I am not sure what went wrong. Please give me some idea? Thank you for any comment!Can you deploy Active Directory as installing without is not a supported installation scenario - http://support.microsoft.com/kb/2764086.
Trevor Seward
Follow or contact me at...
  
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs. -
Web-UI error message "Access via 'NULL' object reference not possible"
I need some help, I'm not a Basis person but I need to get this connection problem resolve.
This problem is in our DEV ICWeb system. After logging in to Web-UI, I got a error message "Access via 'NULL' object reference not possible". We have 3 clients (100, 220, & 310) in DEV and all 3 clients are giving me the same error message.
From the help.sap.com, I found this topic http://help.sap.com/saphelp_nwes70/helpdata/en/84/43f0d786304e19a652a8f80909a8ec/content.htm
but in the document it asked to go to SM59 to check the ESH_APPL_WS_TEMPLATEENGINE destination. But we don't have that destination setup in all our systems.
Here is the complete error message:
Error when processing your request
What has happened?
The URL http://crm-dev.staff.copa:8000/sap/bc/bsp/sap/crm_ui_frame/BSPWDApplication.do was not called due to an error.
Note
■The following error text was processed in the system CD1 : Access via 'NULL' object reference not possible.
■The error occurred on the application server CRM-DEV_CD1_00 and in the work process 0 .
■The termination type was: RABAX_STATE
■The ABAP call stack was:
Method: GET_DATA_LOSS_HANDLER of program CL_CRM_UI_CORE_APPL_CONTROLLERCP
Method: GET_DATA_LOSS_HANDLER of program CL_CRM_UI_CORE_APPL_CONTROLLERCP
Method: EH_TRIGGER_NAVIGATION of program CL_CRM_UI_CORE_APPL_CONTROLLERCP
Method: SET_WORKAREA_CONTENT of program CL_CRM_UI_CORE_APPL_CONTROLLERCP
Method: PROCESS_NAV_QUEUE of program CL_BSP_WD_VIEW_MANAGER========CP
Method: DO_INIT of program CL_CRM_UI_FRAME_APP_CONTROLLERCP
Method: DO_INIT of program CL_BSP_CTRL_ADAPTER===========CP
Method: GET_PAGE_CONTEXT_CURRENT of program CL_BSP_CONTEXT================CP
Method: ON_REQUEST_ENTER of program CL_BSP_RUNTIME================CP
Method: ON_REQUEST of program CL_BSP_RUNTIME================CP
What can I do?
■If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system CD1 in transaction ST22.
■If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server CRM-DEV_CD1_00 in transaction SM21.Hi Michael,
Refer to the link below and check the procedure.
http://help.sap.com/saphelp_nwes70/helpdata/en/84/43f0d786304e19a652a8f80909a8ec/content.htm
Regards,
Arjun -
How to convert from Finder Object reference to POSIX path
I'm new to AppleScript. I'm super close to getting what I need done, but I've ran across a snag in the middle.
The error I'm getting is Can’t make quoted form of POSIX path of item 1 of {«class docf» \"filename\" of «class cfol» \"foldername\" of «class cfol» \"Desktop\" of «class cfol» \"Username\" of «class cfol» \"Users\" of «class sdsk» of application \"Finder\"} into type Unicode text. the problem area is highlighted and notated below. I've looked all around online but can't find what I need.
Thanks in advance for any and all help!
set text item delimiters to "."
tell application "Finder"
set theFilestoChoose to every item of (choose file with prompt "Please select the file(s) you would like to move and rename" with multiple selections allowed) as list
display dialog "Would you like to move these files to an existing folder and then rename them, or create a new folder and then rename them?" buttons {"Move to an existing folder and rename", "Create a new folder and rename"}
if result = {button returned:"Move to an existing folder and rename"} then
set firstnewname to "Aauuttoommaattoorr"
repeat with index from 1 to the count of theFilestoChoose
set theFilesChosenbeingrenamedfirsttime to item index of theFilestoChoose
set filenamecount to text items of (get name of theFilesChosenbeingrenamedfirsttime)
if number of filenamecount is 1 then
set fileextension to ""
else
set fileextension to "." & item -1 of filenamecount
end if
set the name of theFilesChosenbeingrenamedfirsttime to firstnewname & index & fileextension as string
end repeat
log theFilesChosenbeingrenamedfirsttime
set choosingtheplacetomove to choose folder with prompt "Select the folder to move to"
set thechosenfoldersname to name of folder choosingtheplacetomove -- sets the folder name as text
set AppleScript's text item delimiters to {"-"}
set Numberofthemonthatthebeginningofthefoldername to text item 1 of thechosenfoldersname as string -- for later to append the number back on without having to ask again!
set shortenedname to text item 2 of thechosenfoldersname as string
set the name of choosingtheplacetomove to shortenedname as string
set thefolderstemporarynameaslocation to choosingtheplacetomove as string
move theFilestoChoose to folder thefolderstemporarynameaslocation
log theFilestoChoose
set allfilesindestinationfolder to every file in choosingtheplacetomove as alias list --
set aInitials to the text returned of (display dialog "Whose camera were this/these pictures taken on?" default answer "")
set filteredList to my filterList(allfilesindestinationfolder, aInitials) as list
log filteredList
-- everything above this is correct so far and works perfect
--TROUBLE SECTION BELOW
set theSortedfilterList to (sort filteredList by creation date) -- something happens here with the theSortedfilterList that makes it unintelligible to convert to POSIX later. but I need the files in the order that this line puts them.
log theSortedfilterList
set timetorenamelasttime to theSortedfilterList
set newbasename to shortenedname
repeat with index from 1 to the count of timetorenamelasttime
set theonefile to item index of timetorenamelasttime
set theonefilenamecount to text items of (get name of theonetwothreefile)
if number of theonefilenamecount is 1 then
set fileextensionone to ""
else
set fileextensionone to "." & item -1 of theonefilenamecount
end if
tell application "System Events" to set CreaDate to creation date of file theonefile
set CreaDate2 to CreaDate as text -- need to trim down to the first 10 characters and eliminate the "-"
set AppleScript's text item delimiters to {""}
set shorteneddatename to text items 1 thru 10 of CreaDate2 as string
set the name of theonefile to shorteneddatename & {"-"} & newbasename & {"-"} & aInitials & {"-"} & index & fileextensionone as string
end repeat
--Trouble section above
set the name of choosingtheplacetomove to Numberofthemonthatthebeginningofthefoldername & "-" & shortenedname as string -- returns the month prefix to the foldername
else if result = {button returned:"Create a new folder and rename"} then
set repeatConfirmation to true --Boolean to decided if script should be repeated; default is to repeat
repeat while (repeatConfirmation = true) --Repeat if Any Tests Are Failed
set thefirstquestion to choose from list {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"} with title "Event Month Selection" with prompt "Select the month in which the event started. Select only one month:"
set theMonthAnswer to result
if theMonthAnswer = false then --"For historical reasons, choose from list is the only dialog command that returns a result (false) instead of signaling an error when the user presses the “Cancel” button."
set repeatConfirmation to false
set exitingeventmonth to display dialog ("You are exiting selecting the event month phase of the program. You will need to manually fix this decision") buttons {"OK"} with title "Exiting Event Month Selection"
if button returned of exitingeventmonth = "OK" then
set theMonthAnswer to ""
end if
else
set confirmationanswer to display dialog "You selected " & theMonthAnswer & ", is this correct? " buttons {"Yes, that's correct.", "No, the picture(s) are from a different month."} with title "Confirm Event Month Selection"
if button returned of confirmationanswer = "Yes, that's correct." then
set repeatConfirmation to false
else
display dialog ("That's okay, you can select another again!") buttons {"OK"} with title "Return to Event Month Selection"
end if
end if
end repeat
log theMonthAnswer
if theMonthAnswer = "" then
set monthtonumber to "You have cancelled this action."
log monthtonumber
else if theMonthAnswer = {"January"} then
set monthtonumber to "01"
log monthtonumber
else if theMonthAnswer = {"February"} then
set monthtonumber to "02"
log monthtonumber
else if theMonthAnswer = {"March"} then
set monthtonumber to "03"
log monthtonumber
else if theMonthAnswer = {"April"} then
set monthtonumber to "04"
log monthtonumber
else if theMonthAnswer = {"May"} then
set monthtonumber to "05"
log monthtonumber
else if theMonthAnswer = {"June"} then
set monthtonumber to "06"
log monthtonumber
else if theMonthAnswer = {"July"} then
set monthtonumber to "07"
log monthtonumber
else if theMonthAnswer = {"August"} then
set monthtonumber to "08"
log monthtonumber
else if theMonthAnswer = {"September"} then
set monthtonumber to "09"
log monthtonumber
else if theMonthAnswer = {"October"} then
set monthtonumber to "10"
log monthtonumber
else if theMonthAnswer = {"November"} then
set monthtonumber to "11"
log monthtonumber
else if theMonthAnswer = {"December"} then
set monthtonumber to "12"
log monthtonumber
end if
set theNameofFoldertoMake to text returned of (display dialog "Please enter the name of the new folder you are creating:" default answer "" with title "New Folder Name")
set LocationOfNewFolder to choose folder with prompt "Choose the location of the new folder you are creating:"
set theNewNameofFoldertoMake to monthtonumber & "-" & theNameofFoldertoMake
set newfolderaction to make new folder at LocationOfNewFolder with properties {name:theNewNameofFoldertoMake}
move theFilestoChoose to newfolderaction
end if
end tell
--function
on filterList(allfilesindestinationfolder, aInitials)
set patterns to {aInitials as string, "Aauuttoommaattoorr"}
set output to {}
repeat with aFile in the allfilesindestinationfolder
repeat with aPattern in patterns
set filepath to aFile as string
if filepath contains aPattern then
set end of the output to aFile
exit repeat
end if
end repeat
end repeat
return output
end filterListOkay, so you wanted the debugging and error messages. Thank you for the coaching. Here is what I get from the following line:
set theSortedfilterList to (sort filteredList by creation date)
log theSortedfilterList
Log returns:
(*document file Aauuttoommaattoorr3.AVI of folder SnowDay of folder Desktop of folder Username of folder Users of startup disk, document file Aauuttoommaattoorr2.MOV of folder SnowDay of folder Desktop of folder Username of folder Users of startup disk, document file Aauuttoommaattoorr1.mov of folder SnowDay of folder Desktop of folder Username of folder Users of startup disk*)
set pxFile to POSIX path of ((theSortedfilterList) as alias)
Error: "Can’t make {«class docf» \"Aauuttoommaattoorr3.AVI\" of «class cfol» \"SnowDay\" of «class cfol» \"Desktop\" of «class cfol» \"Username\" of «class cfol» \"Users\" of «class sdsk» of application \"Finder\", «class docf» \"Aauuttoommaattoorr2.MOV\" of «class cfol» \"SnowDay\" of «class cfol» \"Desktop\" of «class cfol» \" Username \" of «class cfol» \"Users\" of «class sdsk» of application \"Finder\", «class docf» \"Aauuttoommaattoorr1.mov\" of «class cfol» \"SnowDay\" of «class cfol» \"Desktop\" of «class cfol» \" Username \" of «class cfol» \"Users\" of «class sdsk» of application \"Finder\"} into type alias." number -1700 from {«class docf» "Aauuttoommaattoorr3.AVI" of «class cfol» "SnowDay" of «class cfol» "Desktop" of «class cfol» "Username" of «class cfol» "Users" of «class sdsk», «class docf» "Aauuttoommaattoorr2.MOV" of «class cfol» "SnowDay" of «class cfol» "Desktop" of «class cfol» "Username" of «class cfol» "Users" of «class sdsk», «class docf» "Aauuttoommaattoorr1.mov" of «class cfol» "SnowDay" of «class cfol» "Desktop" of «class cfol» "Username" of «class cfol» "Users" of «class sdsk»} to alias
That is why I labeled it with Finder Object reference won’t return POSIX path, because I tried what was suggested about using the POSIX path of line. I thought seeing the lines above and around it would help set the context.
So I need those files, but I need them sorted by creation date so that they’re in that order for the next renaming step. -
Hi All,
When we do a test-outlookconnectivity -protocol:http the result is a success but then we get the following:
ClientAccessServer ServiceEndpoint Scenario
Result Latency
(MS)
xxxxxxxxxxxx... xxxxxxxxxxxxxx Autodiscover: Web service request. Success 46.80
WARNING: An unexpected error has occurred and a Watson dump is being generated: Object reference not set to an instance
of an object.
Object reference not set to an instance of an object.
+ CategoryInfo : NotSpecified: (:) [Test-OutlookConnectivity], NullReferenceException
+ FullyQualifiedErrorId : System.NullReferenceException,Microsoft.Exchange.Monitoring.TestOutlookConnectivityTask
So it looks like it's not completing successfully.
I can't find anything on this in particular, and don't really know how to go about solving it - We are fully up to date, Exchange 2010 Sp2 with Rollup 5-v2
Any help appreciated!hi,
I have the same issue also on Exchange 2010 SP2 RU5v2
I ran your command and get the below
[PS] C:\Installs\report\Activesync>Test-OutlookConnectivity -Protocol:http |FL
RunspaceId : ebd2c626-1634-40ad-a17e-c9a713d1a62b
ServiceEndpoint : autodiscover.domain.com
Id : Autodiscover
ClientAccessServer : CAS01.domain.com
Scenario : Autodiscover: Web service request.
ScenarioDescription :
PerformanceCounterName :
Result : Success
Error :
UserName : Gazpromuk.intra\extest_645e41faa55f4
StartTime : 8/21/2013 4:08:50 PM
Latency : 00:00:00.1250048
EventType : Success
LatencyInMillisecondsString : 125.00
Identity :
IsValid : True
WARNING: An unexpected error has occurred and a Watson dump is being generated: Object reference not set to an instance of an object.
Object reference not set to an instance of an object.
+ CategoryInfo : NotSpecified: (:) [Test-OutlookConnectivity], NullReferenceException
+ FullyQualifiedErrorId : System.NullReferenceException,Microsoft.Exchange.Monitoring.TestOutlookConnectivityTask
Any help would be greatly appreciated, I also get random failures of OWA, EAS and web services, very frustrating
I have no errors in the app event log
thanks
Faisal Saleem Windows Systems Analyst 07595781867 -
"An error has occurred:Object reference not set to an instance of an object."
This error message comes up with a user in InfoView. The user schedules a report, updates parameters, and the report kicks off successfully. But then a few minutes later, this error is received. This occurs sporadically, regardless of the length of time of report or amount of data being retrieved. Sometimes the report runs to completion. Other times this error message occurs.
Has anyone seen this before and have any thoughts?
Thank you.
“An error has occurred:Object reference not set to an instance of an object.”Are you able to replicate the issue both in Java and .NET InfoView?
For .NET InfoView, sometimes the "An error has occurred: Object reference not set to an instance of an object" error shows up after the .NET Framework is upgraded to 2.0 -
"Object reference not set to an instance of an object" when opening designer
I have a Windows Forms project which was originally developed in Visual Studio 2010. I migrated the project to VS2013, and now every time I open the project's main form, the designer complains of a null reference. If I hit "Ignore and Continue",
the code compiles just fine. The error in question appears in the "Windows Form Designer generated code" region. Even more curious, the line in question is not the first reference to the object. It's as if the first few times it needs to interact
with the object, it's fine, then at a certain point it becomes null.
Here is the call stack for the error:
at System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component,
Object value)at
Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkPropertyDescriptor.SetValue(Object
component, Object value)at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyAssignStatement(IDesignerSerializationManager
manager, CodeAssignStatement statement, CodePropertyReferenceExpression
propertyReferenceEx, Boolean reportError)at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager
manager, CodeAssignStatement statement)at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager
manager, CodeStatement statement)
And here is the code in question:
this.optionsControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
this.optionsControl.IsAsciiMode = false;
this.optionsControl.Location = new System.Drawing.Point(3, 3);
this.optionsControl.LogControl = null;
this.optionsControl.Name = "optionsControl";
this.optionsControl.PlugInManager = null;
this.optionsControl.PortFacade = null;
this.optionsControl.Size = new System.Drawing.Size(613, 259);
this.optionsControl.TabIndex = 0;
The problem is reported at the third line, "this.optionsControl.Location = new System.Drawing.Point(3, 3);".Hi Eric,
I have made a research about your issue, and I found it might be caused by the usercontrol in the project. Was “this.optionsControl” a UserControl? It seems that this issue was difficult to handle.
If possible, I would recommend you recreate this control in a new project.
In addition, I think you could turn to the links below, they may be useful to you:
# How to get more information about exceptions thrown by the designer when switching from code to design view?
http://community.sharpdevelop.net/forums/p/16124/43105.aspx
# How to avoid WSODs in the Visual Studio 2005 Designer
http://www.codeproject.com/Articles/13584/How-to-avoid-WSODs-in-the-Visual-Studio-Desig
# design time error: object reference not set an instance of an object but runs fine
https://social.msdn.microsoft.com/Forums/vstudio/en-US/b3676bef-e457-4aac-b438-d3ed8a667e3f/design-time-error-object-reference-not-set-an-instance-of-an-object-but-runs-fine?forum=winforms
Best Regards,
Edward
This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore,
Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you
completely understand the risk before retrieving any software from the Internet.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey. -
"object reference not set to an instance of an object" after update datasource lightswitch
I'm using Latest Visual Studio 2013 Ultimate (2013.3) and when I attempt to open "update datasource" it throws an error
"Object reference not set to instance of an object."It's quite possibly an issue with the data source definition being dependent on a newer version of a lightswitch framework DLL. When I've hit these kinds of issues I've simply deleted the datasource, run a nuget refresh and added the datasource again.
If you have any code or queries, save a copy of the code-behind files and jot down the details of the queries before you try this. -
Hello.
I just installed a new farm, the wizard was succesfull in all steps. However when I try to load the default site it created I got this exception.
Any idea?
System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.get_ApplicationProperties() at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.get_PartitionIDs()
at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.IsAvailable(SPServiceContext serviceContext) at Microsoft.Office.Server.WebControls.MyLinksRibbon.get_PortalAvailable() at Microsoft.Office.Server.WebControls.MyLinksRibbon.EnsureMySiteUrls()
at Microsoft.Office.Server.WebControls.MyLinksRibbon.get_PortalMySiteUrlAvailable() at Microsoft.Office.Server.WebControls.MyLinksRibbon.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at
System.Web.UI.Control.LoadRecu...
Follow me on Twitter <<<I tried removing the user profile service application and creating it again, when I did that, and tried to navigate to the page to manager the user profile application it shows me an exception
According to the uls log viewer its;
Microsoft.Office.Server.UserProfiles.UserProfileApplicationNotAvailableException: This User Profile Application's connection is currently not available. The Application Pool or User Profile Service may not have been started. Please contact your administrator.
at Microsoft.SharePoint.Portal.UserProfiles.AdminUI.ProfileAdminPage.get_CurrentApplicationProxy() at Microsoft.SharePoint.Portal.UserProfiles.AdminUI.ProfileAdminPage.IsProfileSynchronizationRunning() at Microsoft.SharePoint.Portal.WebControls.UserProfileServiceImportStatisticsWebPart.RenderSectionContents(HtmlTextWriter
writer) at Microsoft.SharePoint.Portal.WebControls.UserProfileServiceImportStatisticsWebPart.RenderWebPart(HtmlTextWriter writer) at Microsoft.SharePoint.WebPartPages.WebPart.Render(HtmlTextWriter ...
I checked and the sharepoint web services default was stopped, I started and still the same error, that pool is under Local Service account.
Follow me on Twitter <<< -
"Object reference not set to an instance of an object" in WAD
10:45:09.659 ########## --> com.sap.bi.et.wad.wadhtmlediting.WADctlWADHTMLControl.SwitchEditable ##########
-EXCEPTION-START- 10:45:09.659: DEBUG ### Browser Init failed. 2nd try will be proceeded. ---
Exception Message: Object reference not set to an instance of an object.
Exception at SAPWADMXHTML.IWADMXBrowser2.AttachAnnotator(Boolean On)
at com.sap.bi.et.wad.AxSAPWADMXHTML.AxCWADMXBrowser2.AttachAnnotator(Boolean on)
at com.sap.bi.et.wad.wadhtmlediting.WADctlWADHTMLControl.SwitchEditable(Boolean iBool)
Full Stack:
at com.sap.bi.et.wad.Debug.WriteTraceToFile(Level, String, Exception)
at com.sap.bi.et.wad.Debug.Exception(Exception, String)
at com.sap.bi.et.wad.wadhtmlediting.WADctlWADHTMLControl.SwitchEditable(Boolean)
at com.sap.bi.et.wad.wadhtmlediting.WADctlWADHTMLControl.set_BrowserDesignMode(Boolean)
at com.sap.bi.et.wad.wadhtmlediting.WADctlWADHTMLControl.Navigate(String, Boolean)
at com.sap.bi.et.wad.wadhtmlediting.WADctlWADHTMLControl.SetHTMLsafe(String, Boolean)
at com.sap.bi.et.wad.wadhtmlediting.WADctlWADHTMLControl.SetHTML(String, Boolean)
at com.sap.bi.et.wad.man.WADctlEditViewLayout.SetDocumentHTML(String)
at com.sap.bi.et.wad.man.WADctlEditViewLayout.TemplateXML2HTMLEdit()
at com.sap.bi.et.wad.man.WADfrmTemplateMDIWindow.UpdateView(Int32, Int32, Boolean)
at com.sap.bi.et.wad.man.WADfrmTemplateMDIWindow.tabLayoutTab_Switch(Object, EventArgs)
at System.Windows.Forms.TabControl.OnSelectedIndexChanged(EventArgs)
at System.Windows.Forms.TabControl.WmSelChange(Message&)
at System.Windows.Forms.TabControl.WndProc(Message&)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message&)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message&)
at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef, Int32, IntPtr, IntPtr)
at System.Windows.Forms.Control.SendMessage(Int32, IntPtr, IntPtr)
at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr, Message&)
at System.Windows.Forms.Control.WmNotify(Message&)
at System.Windows.Forms.Control.WndProc(Message&)
at System.Windows.Forms.ScrollableControl.WndProc(Message&)
at System.Windows.Forms.ContainerControl.WndProc(Message&)
at System.Windows.Forms.Form.WndProc(Message&)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message&)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message&)
at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr, IntPtr, Int32, IntPtr, IntPtr)
at System.Windows.Forms.NativeWindow.DefWndProc(Message&)
at System.Windows.Forms.Control.DefWndProc(Message&)
at System.Windows.Forms.Control.WmMouseDown(Message&, MouseButtons, Int32)
at System.Windows.Forms.Control.WndProc(Message&)
at System.Windows.Forms.TabControl.WndProc(Message&)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message&)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message&)
at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32, Int32, Int32)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32, ApplicationContext)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32, ApplicationContext)
at System.Windows.Forms.Application.Run(Form)
at com.sap.bi.et.wad.BexWebApplicationDesigner.Launch.Main()
-EXCEPTION-END----Hello Dieu,
Have you found a solution of this exception?? i also come across this one.
Kind Regards,
Clark -
"object reference not set to an instance of an object" error while running ssrs report locally
Hi Folks,
I am a bit new to SSRS.
I am using ssrs 2012 and trying to use a method from a dll file. I am loaded the assembly file in reference of the report.
Now I am trying to use a static method from the Dll. e.g. applicationName.classname.MethodName()
But while running the report I am getting "object reference not set to an instance of an object" error.
For a note I am trying execute the report locally.
Any help would be highly appreciable.
sarat chandra sahooSorry for late reply Sinaloe..
I have added a dll file in my report reference. And in a textbox trying to execute this below.
=Recall.Common.LocalizationEx.Localization.GetString(Parameters!Culture.Value, "RFID", "BICustomerPortal")
where Getstring() is a static method in the dll.
I guess some configuration setting I am missing here.
1. I have copied these dlls in "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies" and "C:\Windows\Assembly".
sarat chandra sahoo
Maybe you are looking for
-
Now we can only read emails in different folders if I am managing multiple email accounts. It does not feel so comfortable as we use Live mail and Outlook express.
-
I have 2 email accounts on my computer - work and home....I find that I can only see the past few weeks worth of email messages in either account, and the same is true in the "sent" box. How do I change my settings so that all emails are readily vis
-
Issue in creating sales doc wirth reference contract
hi friends, my requirement is to create a sales order with reference to contract.i had tried it by using bapi 'BAPI_SALESORDER_CREATEFROMDAT2' but i am getting message like this Sales dcoument: S SALES_HEADER_IN has been processed successfu
-
Unexpected error when trying to reinstall iCloud panel in my pc
Apple suggested I uninstall my iCloud control panel in my PC to resolve an earlier problem with my photos not syncing on my I devices and the cloud. Now the I devices work fine but I cannot install the control panel on my PC because it keeps failing.
-
I'm still stuck on learning database-driven development. I plan to take the Lynda.com free lessons... but until then, if anyone can help me, I'd be very appreciative: Here are today's questions: My manager (VP eng./sales/mktg) wants to know WHY I thi