Class not registered errors with sharpDX - class

I'm trying some sharpDX examples and I;m getting this "Class not registered". I figure from the error its an os thing but I dont see why? I have installed the DX run-time as mentioned n the sharpDX page and I'm using windows7 64. This is a win32 app though.
error
An unhandled exception of type 'SharpDX.SharpDXException' occurred in SharpDX.dll
Additional information: HRESULT: [0x80040154], Module: [SharpDX.DirectInput], ApiCode: [DIERR_DEVICENOTREG/DeviceNotRegistered], Message: Class not registered
stack
SharpDX.dll!SharpDX.Result.CheckError() + 0x42 bytes
SharpDX.DirectInput.dll!SharpDX.DirectInput.DirectInput.CreateDevice(System.Guid arg0, out System.IntPtr arg1, SharpDX.ComObject arg2) + 0xee bytes
SharpDX.DirectInput.dll!SharpDX.DirectInput.Device.Device(SharpDX.DirectInput.DirectInput directInput, System.Guid deviceGuid) + 0x52 bytes
SharpDX.DirectInput.dll!SharpDX.DirectInput.CustomDevice<SharpDX.DirectInput.JoystickState,SharpDX.DirectInput.RawJoystickState,SharpDX.DirectInput.JoystickUpdate>.CustomDevice(SharpDX.DirectInput.DirectInput directInput, System.Guid deviceGuid) + 0x68 bytes
SharpDX.DirectInput.dll!SharpDX.DirectInput.Joystick.Joystick(SharpDX.DirectInput.DirectInput directInput, System.Guid deviceGuid) + 0x40 bytes
Code:
joystickState = new JoystickState();
Guid foundDevice = new Guid();
joystick = new Joystick(directInput, foundDevice);

You are not using correctly the API. The Guid should match a registered DirectInput Joystick Guid. Check more carefully the sample JoystickApp that is dealing exactly with this.

Related

SAP JCo JCoServerTIDHandler and/or JCoIDocHandler interfaces

we're currently setting up a SAP-IDoc JCo-Server.
There are two interfaces for transaction management und receiving IDOCs.
Transaction management (JCoServerTIDHandler):
boolean checkTID(com.sap.conn.jco.server.JCoServerContext arg0, java.lang.String arg1);
void confirmTID(com.sap.conn.jco.server.JCoServerContext arg0, java.lang.String arg1);
void commit(com.sap.conn.jco.server.JCoServerContext arg0, java.lang.String arg1);
void rollback(com.sap.conn.jco.server.JCoServerContext arg0, java.lang.String arg1);
IDOC-Handling (JCoIDocHandler):
void handleRequest(com.sap.conn.jco.server.JCoServerContext arg0, com.sap.conn.idoc.IDocDocumentList arg1);
There's only checkTID with a return value. No method has a throws declaration.
How to tell the calling SAP-System that e.g. commit/confirmTID or handleRequest failed ?
Throw a runtime exception ? What happens afterwards, does SAP resend the IDOCs or restart the transaction ?
Is there any documentation how to handle these error situations ?
Any help is welcome, if my description is unclear or incomplete, please don't hesitate to ask.
Thanks a lot.

Error in Eclipse while running a simple function on web service client

I just want to start by apologizing for my not so well english.
I am working on Eclipse IDE for Enterprise Java Developers version 4.17.0 , i am also using Apache Tomcat v9.0 and axis2-1.7.9. I am trying to execute a simple sum function on my client web service but i ran into this error:
package org.apache.ws.axis2;
import java.rmi.RemoteException;
import org.apache.axis2.AxisFault;
import org.apache.ws.axis2.CalculStub.Somme;
public class TesrClient {
public static void main(String[] args) throws RemoteException {
// TODO Auto-generated method stub
CalculStub stub = new CalculStub();
Somme somme0 = new Somme();
somme0.setX(10);
somme0.setY(20);
int res = stub.somme(somme0).get_return();
System.out.println("la somme est : " + res);
}
}
This is the console log :
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The type CalculStub.Somme must implement the inherited abstract method ADBBean.serialize(QName, XMLStreamWriter)
at org.apache.ws.axis2.CalculStub$Somme.serialize(CalculStub.java:823)
at org.apache.axis2.databinding.ADBDataSource.serialize(ADBDataSource.java:49)
at org.apache.axiom.om.impl.common.serializer.push.stax.StAXSerializer.serializePushOMDataSource(StAXSerializer.java:53)
at org.apache.axiom.om.impl.common.serializer.push.Serializer.serialize(Serializer.java:293)
at org.apache.axiom.om.impl.common.AxiomSourcedElementSupport.ajc$interMethod$org_apache_axiom_om_impl_common_AxiomSourcedElementSupport$org_apache_axiom_om_impl_intf_AxiomSourcedElement$internalSerialize(AxiomSourcedElementSupport.aj:434)
at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OMSourcedElementImpl.java:1)
at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMethod$org_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_axiom_om_impl_intf_AxiomContainer$serializeChildren(AxiomContainerSupport.aj:362)
at org.apache.axiom.om.impl.llom.OMElementImpl.ajc$interMethodDispatch2$org_apache_axiom_om_impl_common$serializeChildren(OMElementImpl.java:1)
at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMethodDispatch1$org_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_axiom_om_impl_intf_AxiomContainer$serializeChildren(AxiomContainerSupport.aj)
at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethod$org_apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_impl_intf_AxiomElement$defaultInternalSerialize(AxiomElementSupport.aj:519)
at org.apache.axiom.om.impl.llom.OMElementImpl.defaultInternalSerialize(OMElementImpl.java:1)
at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethodDispatch1$org_apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_impl_intf_AxiomElement$defaultInternalSerialize(AxiomElementSupport.aj)
at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethod$org_apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_impl_intf_AxiomElement$internalSerialize(AxiomElementSupport.aj:513)
at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:1)
at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMethod$org_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_axiom_om_impl_intf_AxiomContainer$serializeChildren(AxiomContainerSupport.aj:362)
at org.apache.axiom.om.impl.llom.OMElementImpl.ajc$interMethodDispatch2$org_apache_axiom_om_impl_common$serializeChildren(OMElementImpl.java:1)
at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMethodDispatch1$org_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_axiom_om_impl_intf_AxiomContainer$serializeChildren(AxiomContainerSupport.aj)
at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethod$org_apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_impl_intf_AxiomElement$defaultInternalSerialize(AxiomElementSupport.aj:519)
at org.apache.axiom.om.impl.llom.OMElementImpl.defaultInternalSerialize(OMElementImpl.java:1)
at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethodDispatch1$org_apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_impl_intf_AxiomElement$defaultInternalSerialize(AxiomElementSupport.aj)
at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethod$org_apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_impl_intf_AxiomElement$internalSerialize(AxiomElementSupport.aj:513)
at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:159)
at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMethod$org_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_axiom_om_impl_intf_AxiomContainer$serializeAndConsume(AxiomContainerSupport.aj:319)
at org.apache.axiom.om.impl.llom.OMElementImpl.serializeAndConsume(OMElementImpl.java:1)
at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:74)
at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:85)
at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.executeMethod(HTTPSenderImpl.java:872)
at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.sendViaPost(HTTPSenderImpl.java:212)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:403)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:234)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:399)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:150)
at org.apache.ws.axis2.CalculStub.somme(CalculStub.java:178)
at org.apache.ws.axis2.TesrClient.main(TesrClient.java:16)
What seems to be the problem ?
EDIT :
This is CalculStub.java file, it's too long so i had to paste in an online clipboard : https://cl1p.net/calculstub
The key is the following at the top of the stack trace:
The type CalculStub.Somme must implement the inherited abstract method ADBBean.serialize(QName, XMLStreamWriter)
You haven't shown us the "CalculStub" class, but I'm going to guess that it extends the "ADBBean" class, either directly or indirectly.
In Java programming, concrete classes that can be used to create instances (using the "new" operator) have to have implementations of any abstract methods. The error message says that the "CalculStub" class needs to have a concrete implementation of the "serialize" method, but it does not have one.

VTI71.DLL Give error du0x80004005 in c# project

I am try to automate Gupta's Team Developer control as mention in
Centura Gupta Team Developer Automation Possibility
I download 32-bit trial version of Team Developer 7.1
[DllImport("user32.dll")]
static extern IntPtr WindowFromPoint(System.Drawing.Point p);
[DllImport("User32.dll", SetLastError = true, CharSet = CharSet.Auto)]
static extern long GetClassName(IntPtr hwnd, StringBuilder lpClassName, long nMaxCount);
const string guptadllpath = #"C:\program files (x86)\gupta\team developer 7.1\VTI71.DLL";
[DllImport(guptadllpath)]
extern static int VisTblFindString(IntPtr hwndTable, int lStartRow, IntPtr hwndColumn, string lpctszSearchFor);
IntPtr _wndFromPoint;
private void MainForm_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
Cursor.Current = Cursors.Default;
Point p = PointToScreen(e.Location);
_wndFromPoint = WindowFromPoint(p);
StringBuilder classText = new StringBuilder(256);
GetClassName(_wndFromPoint, classText, 256);
listBox1.Items.Add("Class: " + classText);
int a = VisTblFindString(_wndFromPoint, 0, IntPtr.Zero, "Pat");
this.Text = a.ToString();
}
}
But give me below error:
System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
My sample application is
Please suggest me how to resolve this error. Is it correct way to use Gupta's dll in c# for automate?
Thanks,
Calling VisTblFindString(..) from outside won't work. Even though the function takes a window handle as a parameter this will only work from inside the "grid-application". The reason is that one process cannot peek into the memory of another process (ok you can use GetWindowText(..) but this is not applicable here since in a grid not every cell is a distinct window).
You have to set up some interprocess-communication. Unfortunately in gupta grid there are no built-in functions that support this.
The only way I see is that you have to modify the grid-application (not sure if you control the source code of it). If you have the possibility to modify it then you can implement automation e.g. via Windows messages.
I dont know c# from a bar of soap - but if you are using the dll outside of TeamDeveloper, it could be the way you have imported it , or you haven't registered the dll, or you dont have a license to use it outside of TeamDeveloper , or you should be using the 64bit version. A Trial license may not cut it. But I'm just guessing here.

Reference to method is ambiguous in OpenJDK but not Eclipse - why?

I know that similar questions have been asked (here, here, here), but none of the answers seem to apply to my case.
Consider the following set of interfaces:
public interface I1<X> {
void method(X arg);
}
public interface I2 {
void method(String arg);
}
public interface I3 extends I1<String>, I2 {
// empty
}
Now I want to call method(String) on an instance of I3, like so:
public class C implements I3 {
public void method(String arg) {
// does nothing
}
public static void main(String[] args) {
((I3) new C()).method("arg");
}
}
The OpenJDK (Java 7 or 8, doesn't matter) flags an incompatibility error here:
generics\C.java:10: error: reference to method is ambiguous
((I3) new C()).method("arg");
^
both method method(String) in I2 and method method(X) in I1 match
where X is a type-variable:
X extends Object declared in interface I1
Since X is instantiated to String in I3, I do not see where the problem comes from. Note that Eclipse considers this to be fine.
The answer to the question, "why?" is simple but probably not what you're looking for. It is, "Because Eclipse and Open JDK each have their own compilers and either a) one of them has a bug or b) the language specification (JLS) is ambiguous and they've interpreted it differently."
Figuring out which of a) or b) is the case is a tricky, tedious task. It means, as a starting point, reading the relevant sections of the JLS, trying to compile the same code with Oracle JDK's javac, and possibly diving into the bug tracking systems of Eclipse and OpenJDK.

Sharepoint Edit Form Error

I cant find a glue for that. Trying to edit a Listitem in the Browser , I get an Error the Log says:
File Not Found: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Template\Layouts\EditingMenu\SiteAction.xml
System.ArgumentNullException: Der Wert darf nicht NULL sein. Parametername: s bei System.IO.StringReader..ctor(String s) bei System.Xml.XmlDocument.LoadXml(String xml) bei Microsoft.SharePoint.Publishing.Internal.WorkflowUtilities.FlattenXmlToHashtable(String strXml) bei Microsoft.SharePoint.Publishing.Internal.WorkflowUtilities.DoesWorkflowCancelWhenItemEdited(String associationXml) bei Microsoft.SharePoint.Publishing.WebControls.ConsoleDataSource.EnsurePageNotInLockingWorkflowIfInEditMode() bei Microsoft.SharePoint.Publishing.WebControls.ConsoleDataSource.OnPreRender(EventArgs e) bei System.Web.UI.Control.PreRenderRecursiveInternal() bei System.Web.UI.Control.PreRenderRecursiveInternal() bei System.Web.UI.Control.PreRenderRecursiveInternal() bei Sy... 489b3ebb-eb93-4172- SharePoint Foundation Runtime tkau Unexpected System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
The Xml is in Place and Edit Forms for Other Lists in the same Web are working well ... Even Tried to make a new Editform ( and iisreset etc..)
Any Hint would be helpfull
Thanks Lars
The exception is thrown because the SharePoint 2010 expects that the AssociationData element contains a valid xml, where AssociationData element is a tag in Workflow Definition Schema. I've faced this issue after migrating our SP 2007 application to SP 2010. Unfortunately, it's not enough to just apply a valid xml to AssociationData element in your workflow definition:
It helps only for applications and workflow instances created/started after modifications have been made. Therefore, for live applications and started workflow instances we have to change AssociationData through the object model. I implemented the set of methods I described here - SharePoint: Workflow + List Item Edit Form = Value cannot be null Exception. The basic methods are listed below:
public static void AdjustAssociationData(SPWorkflowAssociation workflowAssociation, SPWorkflowAssociationCollection collection)
{
if (!IsValidXml(workflowAssociation.AssociationData))
{
string newValue = string.IsNullOrEmpty(workflowAssociation.AssociationData)
? "<Data />"
: string.Format("<Data>{0}</Data>", workflowAssociation.AssociationData);
workflowAssociation.AssociationData = newValue;
collection.Update(workflowAssociation);
}
}
public static bool IsValidXml(string str)
{
if (!string.IsNullOrEmpty(str))
{
try
{
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(str);
return true;
}
catch {}
}
return false;
}
Also, from my blog post mentioned above, you can download the console app I developed and used against our problem sp application.
I hope this will be useful.
In fact there was a Workflow for Disposition Approval attached to the Element Content type, not shure who placed it there, but anyways the Tasks could be found at the List. The Workflow was nerly invisible to me. The Error is odd and something I didnt expected
Lars