-
Notifications
You must be signed in to change notification settings - Fork 40
java.lang.NoSuchMethodError: No static method newFactory() Ljavax/xml/stream/XMLInputFactory #283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@samimejri Can you send in the snippet of code you're executing? |
Thanks for responding. The problem occurs at runtime. When launching the app you will get this error: |
@samimejri have you tried adding the stax-api dependency to your project:
|
https://github.com/samimejri/SKTest/blob/master/app/build.gradle.kts stax-api is already added in the dependencies. It DOES NOT RESOLVE the issue. The implementation of stax-api does not have the static newFactory() method. Like I said, using the newInstance() method instead newFactory() here will resolve the issue for Android. |
@samimejri yeah I agree moving it to newInstance should fix it |
Do you want me to create a pull request? I am no java/kotlin expert but the change seems to be simple enough! |
Yes please! |
Sorry but I am not permitted to push code to this repo. |
Can you fork this repo and create a PR? |
Sorry for the delay! I created the pull request. It's my first open source project contribution and the first java code I touched in years... Please bear with me! |
I am working on an android app using semantic kernel and I have this issue that I have been battling for 2 days now. In the semantic kernel code, the use of the newFactory() static method for prompt parsing is the root cause. I think this is not needed and newInstance() can do the job.
This github issue is talking about the problem I am facing but in another library: FasterXML/jackson-dataformat-xml#533
I have this issue when I use invokePromptAsync() but not when I use getChatMessageContentsAsync().
The problem is easy to reproduce, create a new project in android studio and use any sample that has a call to invokePromptAsync()
The text was updated successfully, but these errors were encountered: