Websphere & Tivoli: NPE while trying to create PDAuthorizationContext - websphere-8

I am getting the following error when I try to start my Application...
[java.lang.IllegalStateException: java.lang.NullPointerException^M
at com.tivoli.pd.jutil.kb$1.run(kb$1.java:41)^M
at java.security.AccessController.doPrivileged(AccessController.java:229
)^M
at com.tivoli.pd.jutil.kb.c(kb.java:141)^M
at com.tivoli.pd.jutil.kb.(kb.java:56)^M
at com.tivoli.pd.jutil.PDContext.(PDContext.java:76)^M
at com.tivoli.pd.jazn.PDAuthorizationContext.(PDAuthorizationConte
xt.java:66)^M
I double checked the config file was accessible and I could read it. The code I am using looks as follows...
aC = new PDAuthorizationContext(cFile);
Is there a way to get more information on what is causing the NPE?
More information!!!
After debuging a bit, it appears the issue comes from this code (they use progaurd so it is a little hard to be 100% confident)...
Certificate[] arrayOfCertificate1 = ((KeyStore)???).getCertificateChain("DefaultID");
//Throws Null pointer (presumably because array is null)
Certificate localCertificate1 = arrayOfCertificate1[0];
EVEN MORE INFO
This appears to be some kind of dependency conflict (guess), because if I just create a sample App using PDAuthorizationContext it works fine.

Problem was related to the PD.jar version that I was using. Although I thought I was using one version I was using another. This was because on version was registered in my WebSphere library (under build path in eclipse). Once the proper library was introduced everything worked.

Related

Cefsharp : problem with the Reqest Context of the General Usage page

I have some problems, to change user profile with cefsharp 71.0.2.
All is working good with an user1.
To change users, the General Usage Wiki page gives me the solution.
But the 3rd line of this code
var requestContextSettings = new RequestContextSettings { CachePath = cachePath2 };
browser = new ChromiumWebBrowser();
browser.RequestContext = new RequestContext(requestContextSettings, new CustomRequestContextHandler());
gives 2 errors :
impossible to convert Cefsharp.RequestContextSettings to Cefsharp.IRequestContext
CustomRequestContextHandler reference can't be found.
I used Nuget to include the package 71.0.2 targetFramework 461 to my project.
A RequestContext(requestContextSettings) constructor is working to run something, but the browser is frozen on the last page I loaded with the user1.
Some tips to fix the problem ?
I saw that a 73.1.120.pre is on GitHub, but I don't know how to manage that without some Nuget package.
Tx for your help.

Xamarin Forms - Native Forms

I am trying to experiment with Native Forms in XF. I have this in iOS working right. That is fine.
In Android, I am getting the following error:
'MainPage' does not contain a definition for 'CreateSupportFragment' and the best extension method overload 'PageExtensions.CreateSupportFragment(ContentPage, Context)' requires a receiver of type 'ContentPage'
The code is erroring in the following code:
var _cp = new MainPage(); // my page from XF.
_list = _cp.CreateSupportFragment(this);
I have made sure that my nuget packages are up to date. I have cleaned and compiled. I've done a bunch of things, but alas, no love. Any ideas on this?
TIA
you need add the line to head of source:
using Xamarin.Forms.Platform.Android
because CreateSupportFragment is an extension method defined in it.

Why creating model in any other location than client, meteor runtime throws exception?

I am a meteor newbie. I am trying out by building a simple app and it does nothing but shows list of items. I first tried out with hard coded model values in my client javascript code and it worked just fine. I then created a folder called 'model' under root of the application and created the model there like the following
Favorites = new Meteor.collection("favorites")
with this change, meteor throws exception pointing to this line of the file on load. If I move this code to client the code works ofcourse that is wrong. The full code is # https://github.com/ksunair/13favs It is a very simple solution has few files and less than 20 or 30 lines altogether. My client code is,
Template.favorites_main.helper({
favorites:Favorites
});
I did the following in order to clear your app of errors:
Favorites = new Meteor.Collection("favorites"); (Collection starts with a capital C)
I moved model/mainmodel.js to lib/mainmodel.js so Favorites would be available as soon as the template rendered. I always put my models under lib (or in a subdirectory) so they will be loaded first. This contradicts what I see in other places including discover meteor, so I'm unclear what the best practice is. In any case, it fixed the problem.
$ meteor add accounts-ui was needed because you referenced Accounts.ui.config.
You need to actually do a find in your favorites_main template. So it should look something like:
Template.favorites_main.helpers({
favorites: Favorites.find();
});

QAbstractItemModel testing using modeltest

I'm looking for a good tutorial on how to use modeltest to test models based on QAbstractItemModel. I don't know how to interpret debug messages that are displayed.
Also I'm having trouble configuring modeltest project to work with my app in QtCreator. Including the .pri/.pro doesn't work. I get an error saying "No rule to mage target ..". After fixing paths in modeltest/modeltest.pro file it starts to compile. But i get this wierd assertion
ASSERT: "QTest::testLogger" in file c:\ndk_buildrepos\qt-desktop\src\testlib\qtestlog.cpp, line 232
Any ideas why this happens ?
My modeltest folder is located inside my project. I added following line at the end of my *.pro file
include(modeltest/modeltest.pri)
The modeltest.pri file contains the following
load(qttest_p4)
SOURCES += modeltest/modeltest.cpp modeltest/dynamictreemodel.cpp
HEADERS += modeltest/modeltest.h modeltest/dynamictreemodel.h
I modified my code to use modeltest this way
model = new TasksModel(this);
new ModelTest(model, this);
ui->treeView->setModel(model);
TasksModel is my implementation of QAbstractItemModel model.
ui->treeView is the widget that displays data.
No other modifications where made while integrating modeltest with my app.
Qt version is 4.7.
This will sound a little overgeeky - but it is, in fact, what the ModelChecker dev intended for you to do ;) When you hit one of the asserts, go to the point in the code where it is hit and read the comments which are written along with it. The entire thing is extremely heavily commented, and describes what is breaking and likely reasons why. This is by far easiest to do if you run your app through a GUI debugger, such as that included in for example KDevelop, Qt Creator or Visual Studio.
The reason you are getting this error is because you aren't actually using the ModelTest inside a proper QTestLib test case. If you take a look at /tests/auto/modeltest (where you presumably got the modeltest class in the first place), you can see how to properly construct a test case using the ModelTest.

Flash/Flex Error #1063 When Retrieving SharedObject

I have a parts application that is built on Flex 3 and I having a problem with the parts list. The parts list uses two objects:
Part
ArrayOfPart
I cache the parts list locally in a SharedObject. This has been working fine for a couple months. I added a new Boolean property to the Part class and re-imported web services (which shouldn't have affected anything) and now, I can save the ArrayOfPart SharedObject fine, but when I try to retrieve the SharedObject, I get "ArgumentError: Error #1063: Argument count mismatch on ArrayOfPart. Expected 1, got 0. AND then it DELETES my SOL file completely.
(I used RegisterClass on Part and ArrayOfPart, so they both are serializable to SharedObjects)
Here's the steps I followed to get the error:
Save the shared object:
so = SharedObject.getLocal("PartsList");
so.data.AllParts = AllParts;
so.flush();
Verify the SharedObject:
The SharedObject PartsList.sol exists where it should
I opened the SharedObject file and the ArrayOfPart data looks valid
Restart the application and it retrieves the parts list from the SharedObject. This is the line that throws the Error #1063 and causes the sol file to be deleted:
so = SharedObject.getLocal("PartsList");
It looks like the data may not be well-formed when it's saved in the SharedObject? Is this possible?
I solved my own problem.
The ArrayOfPart had a constructor with a parameter. When I removed the constructor, the error went away.
By the way, this was Flash 9.
This looks like a tough one.
I don't think it is a formation or serialization issue. Maybe something else in your code is writing to the shared object?
Is there any way you can share your source? This would help as I personally don't have enough info to diagnose what is going on w/o seeing the rest of the code :(
Also....
Is there anything else that is writing to or changing this shared object?
Are all my objects created in AS3 or are some in MXML (I have noticed that the Flex compiler does not always do a good job figuring out MXML).
What version of Flash do I have?
If its Flash 10 does the same problem occur in Flash 9?
Does this happen in all browsers and on all platforms?
Just a hunch, but, since I installed Flash Player 10, I am seeing lots of errors with Shared Objects when browsing. Could it be related to newly introduced sandbox/security restrictions?

Resources