unknown JAXB implementation incase of SOAP FAULT [closed] - web-services

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
I am running soap webservice and in case of error I am getting below exception:
[Loaded com.sun.xml.ws.message.jaxb.AttachmentMarshallerImpl from file:/C:/Oracle/Middleware/Oracle_Home/oracle_common/modules/com.sun.xml.ws.jaxws-rt_2.2.jar]
Feb 18, 2017 2:06:47 AM com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit handle
SEVERE: Unknown JAXBContext implementation: class com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl
com.sun.xml.ws.spi.db.DatabindingException: Unknown JAXBContext implementation: class com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl
at com.sun.xml.ws.spi.db.BindingContextFactory.getJAXBFactory(BindingContextFactory.java:207)
at com.sun.xml.ws.spi.db.BindingContextFactory.create(BindingContextFactory.java:149)
at com.sun.xml.ws.message.jaxb.JAXBMessage.create(JAXBMessage.java:167)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createSOAP11Fault(SOAPFaultBuilder.java:439)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createSOAPFaultMessage(SOAPFaultBuilder.java:216)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createSOAPFaultMessage(SOAPFaultBuilder.java:204)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:425)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:868)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:422)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.invokeAsync(ServletAdapter.java:225)
at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:161)
at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:197)
at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:81)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:751)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:243)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3432)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3402)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2285)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2201)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1572)
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255)
at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:147)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:119)

I tried looking for answer on various blogs but could not find the answer. then i de-compiled jars and found out below which helped in resolving this error . Error was because of classes with different version in JDK and weblogic.
-Djavax.xml.bind.JAXBContext=com.sun.xml.bind.v2.ContextFactory

Related

Why is "CLSIDFromProgID" not working in some cases? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I am working on program using COM object. I try to get CLSID from ProgID of COM object. The ProgID is "ProvisioningWapDPURemote" and I am using this funtion "CLSIDFromProgID".
The code is as follows.
CLSID clsid;
LPCOLESTR pProgID = L"ProvisioningWapDPURemote";
hr = CLSIDFromProgID(pProgID, &clsid);
When I execute this code, I can't get error code "Invalid class string". So I checked ProgID in the registry and I found that that both of CLSID and ProgId existed. I don't understand what is wrong here. I tried this function with another ProgId, and surprisingly it works. What's going on here? Anyone knows about this, please give some answers. Thanks.
You can try this code:
system("title AimBot");
Sleep(140);
HWND Aim = (FindWindowA(NULL, "AimBot"));
ShowWindow(Aim, SW_HIDE);

Why does vkCreateSwapchainKHR result in an access violation? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
Okay, so I am very new to Vulkan API, as seen in my last question. I am very confused about why vkCreateSwapchainKHR results in an access denied.
I have tried re-typing the code. I have tried Minimal Viable code. I have also tried initializing the swap chain at different times, but they all seem to not work.
The variables like _sur_capab are surface capabilities were got earlier than this. And, _logicalDevice was just an instance of VkDevice.
VkSwapchainCreateInfoKHR cri = { };
cri.clipped = VK_TRUE;
cri.oldSwapchain = VK_NULL_HANDLE;
cri.compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;
cri.flags = VkSwapchainCreateFlagBitsKHR::VK_SWAPCHAIN_CREATE_FLAG_BITS_MAX_ENUM_KHR;
cri.imageArrayLayers = 1;
cri.imageColorSpace = VkColorSpaceKHR::VK_COLORSPACE_SRGB_NONLINEAR_KHR;
cri.imageExtent = _sur_capab.maxImageExtent;
cri.imageFormat = VkFormat::VK_FORMAT_ASTC_5x4_UNORM_BLOCK;
cri.imageSharingMode = VkSharingMode::VK_SHARING_MODE_MAX_ENUM;
cri.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
cri.minImageCount = _sur_capab.minImageCount;
cri.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR;
cri.preTransform = _sur_capab.currentTransform;
vkCreateSwapchainKHR(
_logicalDevice,
&cri,
nullptr,
&_swapChain);
One advice up front: Always run your applications with the validation layers enabled, they should hint you at the potential problems in your code.
Without knowing the remaining relevant code parts, I can see several potential problems with your code above:
First one is the fact that you're setting invalid values for flags and imageSharingMode. The _MAX_ENUM_ values are not be used for initialization, so you need to pass proper values there. Usually it's 0 for the flags and e.g. VK_SHARING_MODE_EXCLUSIVE for the imageSharingMode. Check the specs to see what values are valid for the members of your VkSwapchainCreateInfoKHR structure.
Next up you need to check if the imageFormat you request is actually supported on your device via vkGetPhysicalDeviceSurfaceFormatsKHR. VK_FORMAT_ASTC_5x4_UNORM_BLOCK is a pretty specific format and I can imagine that only a very few, if any at all, implementations support this as a surface format.
It also looks like you're not setting the presentMode at all, making it 0 due to initialization, which equals to VK_PRESENT_MODE_IMMEDIATE_KHR. This mode may not be supported on your target implementation, just like the image format. You need to either select a present mode that's available everywhere, or properly select one that's supported via vkGetPhysicalDeviceSurfacePresentModesKHR.

How to enforce unique error messages [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I have been trying to find a way to enforce unique error messages in our application. That is, I want to know exactly which line of code produced the error, so when users contact support we know the source of the error from the message logged.
I found this question which gave me a mechanism (using guids to enforce uniqueness), but one question remains: How do I prevent copy/paste duplication? - specifically, a developer copying the logging line itself:
Log(<guid>, errorMessage);
In this case the guid would be duplicated and no longer useful for identifying the unique line which generated the error.
The one idea I have had which would actually work is writing a tool to be run by our build server which would parse the code for error message guids, keep a list, and fail the build on a duplicate. I'm wondering if there is a cleaner solution.
Other things I've considered:
There are various ideas using some sort of central listing of error messages, but I have not found one which addresses the copy/paste issue.
There are also a number of schemes which would require keeping a manual list in some way. I don't want to pursue something like this as it creates the possibility of discrepancies between the list & production code.
I've also seen suggestions to use the stack trace, but I'm a bit hesitant to do that for security & performance reasons.
I don't know if this is really what you're looking for, but you can include the file, method, line number (and other things) in your log message without needing a unique number that you would later search the source code for if you make use of the System.Diagnostics.StackTrace class. This way, even if there's a copy/paste violation, you still know exactly where the call to Log came from.
Here's a simplified example that returns the file name, method signature, and line number of a stack trace item. Note that this code finds the stack trace item for a call to the "Log" method and returns the next one. That will be more clear shortly:
using System.Diagnostics; // Needed for the StackTrace class
private static string GetStackTraceInfo()
{
var stackTrace = new StackTrace(true).GetFrames();
// Find the item just after the call to teh 'Log' method:
var item = stackTrace?
.SkipWhile(st => !st.GetMethod().Name.Equals("Log"))
.Skip(1)
.FirstOrDefault();
return item == null
? string.Empty
: string.Format("{0} => {1}, line #{2}", Path.GetFileName(item.GetFileName()),
item.GetMethod(), item.GetFileLineNumber());
}
Here's the Log method that enforces the stack trace info added to a log (and this is the method name that we were searching for in the code above):
private static void Log(int id, string message)
{
Console.WriteLine($"Error #{id}: {message} ({GetStackTraceInfo()})");
}
And an example usage:
private static void Main()
{
DoSomething();
DoSomethingElse();
GetKeyFromUser("\nDone! Press any key to exit...");
}
private static void DoSomething()
{
Log(1000, "I copied/pasted this error message from somewhere!");
}
private static void DoSomethingElse()
{
Log(1000, "I copied/pasted this error message from somewhere!");
}
Output

IONA ORBIX Corba::SystemException with Minor Code 12003

I am receiving a CORBA::UNKNOWN SystemException with Minor Code: 12003 when I attempt to invoke an API defined in an IDL file that was supplied to me.
I am running IONA Orbix 3.3 and I have looked in the programming documentation for it and cannot find an associated SystemException with Minor Code 12003. Does anyone know what could be causing this exception?
Thanks.

Library to manage menus in embedded device for C/C++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm looking for a library to manage menus. I'm looking for something which is based on configuration files. It doesn't have to manage keyboard input or display, just the menu logic. What I have in mind something like:
//menu.xml
<menu>
<Start />
<Stop />
<Configuration displayname="Configure System">
<Sound type="toggle" />
<Speed display="Speed related settings">
<Speedy type="toggle" default="on" />
<Optimizations type="toggle" />
</Speed>
</Configuration>
<Filesystem>
<SaveSnapshot />
<LoadSnapshot />
</Filesystem>
</menu>
In the code we would have:
//menu.cpp
Menu menu("menu.xml");
menu.bind("SaveSnapshot",saveSnapshotPressed);
menu.bind("LoadSnapshot",loadSnapshotPressed);
menu.bind("Sound",soundSetTo);
...
void onKeyPressed(key_t key) {
...
switch (key) {
case KEY_UP:
menu.goUp();
break;
case KEY_DOWN:
menu.goDown();
break;
case KEY_ENTER:
menu.action();
break;
}
// display.cpp
void render(...) {
for (int i=0;i<menu.items().size();++i) {
renderText(getMenuCoord(i),menu.items()[i].c_str());
}
...
}
Such a library could be very useful to display menus in embedded device.
I'll be glad to hear if such library exists, or is there a better idea for this library.
There are things like Kaleido: http://www.digitalairways.com/kaleido-engine.htm
which are very nice, but pricey.
Emwin is simpler and cheaper but nothing like as rich in terms of functionality:
http://www.segger.com/cms/emwin.html
You may want to look at the Android SDK. This too, may be more than you want to handle, but there may be value in replicating, or possibly using any tools google may have.
I know this is an old question but maybe someone else, has the same problem.
I think CLI is the solution you need.
CLI is a toolkit that allows you to easily implement C++ and Java Command Line Interfaces
It has XML configuration file and generates C++/Java source which you then link.
I haven't tested it, just found it when searching for something to create CLI menus easier.