Tried to integrate asana API with java,struts project.
By using javasana class i succeeded to get workspaces,users etc
Now my requirement is to add tasks to asana.So i tried to configure API using following configuartion with th help of mvn repositories. http://mvnrepository.com/artifact/net.joelinn/asana/0.5.4
So included following jars in lib folder
1)asana-0.5.4.jar
2)guava-15.0.jar
3)jackson-jaxrs-1.9.13.jar
4)jersey-client-1.17.1.jar
5)junit-4.11.jar
Now its showing method not found error
java.lang.NoSuchMethodError:
org.codehaus.jackson.map.MappingJsonFactory.setCodec(Lorg/codehaus/jackson/ObjectCodec;)Lorg/codehaus/jackson/JsonFactory
Code i wrote for adding task
Asana asana=new Asana(apiKey);
asana.tasks().createTask(new TaskRequestBuilder(workspaceId,"project-followup").addFollower(followassigneeuserId).notes("The task is to follow up user on project system").assignee(assigneeuserId));
may i know where i am wrong?
The jackson jar
3)jackson-jaxrs-1.9.13.jar
depends on two jars
* jackson-core-asl
* jackson-mapper-asl
which you can again get from the above link, If you include those every thing fine
Related
I want to use timerTrigger in azure functions.
I created function according this guide:
https://learn.microsoft.com/en-us/azure/azure-functions/functions-create-maven-intellij
it is generated by default httpTrigger. I tried command of azure-functions:add.
I succeeded adding timerTrigger but I encountered with a lot of errors
How I can delete httpTrigger and declaring only timerTrigger?
before I run the azure-functions:add:
after running the command:
I guess it is related to azure plugin and maven plugin conflict but not sure and I don't know how to handle such this situation
any help will be appreciated
thanks
For now, I suppose it doesn't support create java function with default timer trigger. However you could delete the HTTP one then create the timer, cause you don't provide much information so maybe you could refer to my steps.
Create the function with maven.(I'm using the 1.22 version)
Delete the HTTP function, and delete the test folder.
Create the Timer Trigger function.
After this the project will be like this.(Before packaging remember set the storage connection string in the local.settings.json)
Package it.(Use the package method in the Lifecycle.)
Run it with azure-functions:run under azure-functions plugin.
I am trying to build custom aggregate functions for presto. I have created a FAT Jar and deployed the jar into the plugin directory. When I restart presto, it is always giving me this error :
java.lang.AbstractMethodError
at com.facebook.presto.server.PluginManager.installPlugin(PluginManager.java:183)
at com.facebook.presto.server.PluginManager.loadPlugin(PluginManager.java:175)
at com.facebook.presto.server.PluginManager.loadPlugin(PluginManager.java:158)
Unfortunately, I do not see any verbose error message which will give me a clue on what is actually missing here. I used presto-ml plugin as an example and implemented getFunctions() in plugin implementation. Is there a way to figure out what is missing?
I did check the source code of PLuginManager.java. I am just looking for a way to debug this in a better way.
Currently my team is working on some more complex code which our app will use and although we have UnitTests running we would really like to be able to use JDocTest so that we can create tests while we write some of our smaller methods.
I have successfully followed the instructions from JDocTest github read me and compiled it into my project. However I'm having trouble running the particular .java class files. I'm trying to be able to run MatrixCreator.
Here is what my directory looks like
Here is my attempt to set up MatrixCreator under application
I get the error
Error:Gradle: A problem occurred configuring root project 'AvocadoCoreProject'.
Could not resolve all files for configuration ':classpath'.
Could not find com.android.tools.build:gradle:3.0.0.
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar
Required by:
project :
I have been working on creating a simple Java desktop app using the RESTful API for Business Objects and have run into an issue. Whenever I run my app in Eclipse in works fine; whenever I export it as a 'Runnable Jar' and select the Library handling option 'Package required libraries into generated JAR' it works fine. However, whenever I try to export it using the Library handling option 'Extract required libraries into generated JAR' I get the following error after running the app:
java.lang.NoClassDefFoundError: Could not initialize class com.businessobjects.bcm.BCM
I have the 'bcm.jar' file added under a 'res' Source Folder and have it added to the Build Path. At one point I added all the JARs under the 'SAP BusinessObjects' java folder, and external folder, but it still throws the error. The problem stems from this line of code:
enterpriseSession = CrystalEnterprise.getSessionMgr().logon(userID, password, CMS, auth);
Would anyone know why I am getting said error? I really want to use the Extract option as it will improve performance as my app becomes larger. Any help resolving this issue would be greatly appreciated :)
EDIT: I would be happy to provide clarification or further detail upon request!
Seems this was introduced in SP04 and SAP has no intent of fixing it as the RESTful API wasn't designed to be used with Desktop apps.
Have you included the cryptojFIPS.jar? Leaving it out can cause the error.
I'm trying to generate some stubs for a WSDL (using xmlbeans) and keep running into some issues. I'm using the following page:
http://axis.apache.org/axis2/java/core/docs/userguide-creatingclients-xmlbeans.html
The only part of these steps that I'm skipping is the "client.java" part because I already have another project ready I want to plug the resulting jars into. A quick run down of my steps are as follows:
My WSDL is a crmonline instance, so I run something like this:
C:\Work\aaa2>WSDL2Java -uri
https://mycrmorgname.crm.dynamics.com/XRMServices/2011/Organization.svc?wsdl
-p crmsdk -d xmlbeans -s -o c:\mystubfolder
I build the project using "ant"
In my "client" project I reference the 2 jars created in .\build\lib
My project builds fine once I add all my axis2 / apache references etc, but when I launch it through playframework I get errors when I hit the first page. The first error seems to be:
17:48:45,289 ERROR ~ Error in ControllersEnhancer.
controllers.ProfileController.editProfile has not been properly enhanced
(fieldAccess javassist.expr.FieldAccess#212ca458).
or something similar to that. Scrolling down through the error I can see that I'm getting this:
The file /app/models/MyDynamicsClient.java could not be compiled.
Error raised is : org.apache.axiom.om.util.AXIOMUtil cannot be resolved
Now, I haven't even hit any of my web services yet, or even instantiated any of my classes ... I'm at a loss as to why this is happening. Or to be more accurate, what exactly am I messing up! Am I missing a reference to something? Doing a search on AXIOMUtil tells me this should be in Axiom-api (version I have is Axiom-api-1.2.10.jar). I have this referenced and doesn't seem to help. Or maybe I'm doing something else wrong someplace?
Some details on versions:
Axis2 1.5.4
Apache-ant 1.8.3
Any help would be very much appreciated!!
Ok, after trying a lot of different things and rereading the sites/instructions I realised what I was doing wrong. Or at least I figured out a couple of things that I started to do differently that fixed the problem.
Firstly, I was using jar files from another sample project for the apache http components. I don't know if this had an impact, but I downloaded a fresh version of this anyway and referenced those JARS instead.
Also, instead of creating jars in my "stub" project and referencing those I copied all the generated stubs/classes directly into the existing client project. I have a feeling this might have been what fixed my problem. Or maybe a mix of this and the previous step I did!
So my new steps are as follows:
Ensure you have all the correct versions downloaded for required components. In my case I have the following:
Apache Axis 2 v 1.5.4
Apache HTTP components client 4.1.3
Apache-ant 1.8.3
Copy all the JARS from the Axis2 and HTTP Components libs into your client project and reference them.
Use WSDL2Java to create your stubs and classes within it's own project.
Ensure the project builds using Ant
Copy all the generated class files within the src folder into the source folder of your client.
Fix any other reference isssues and Build
Thankfully this got me going.