gwtprojsonserializer 1.0.4 jar - error serializing arraylist - json

I am using gwtprojsonserializer to convert objects to JSON. I've added the version 1.0.4 jar I downloaded from the website http://code.google.com/p/gwtprojsonserializer/ but although the source code on the website includes functionality for serializing arraylists, it is not included in the jar and hence i get the following error:
com.kfuntak.gwt.json.serialization.client.SerializationException: Can't find object serializer for java.util.ArrayList
Does anyone know how I can update the jar or use their latest source code?
Thanks in advance.

Its open source project. The entire source code can be easily downloaded from http://code.google.com/p/gwtprojsonserializer/source/browse/#svn%2Ftrunk
I am assuming the required code for serializing arraylists is in trunk. You can add/remove/modify on you local copy. Build the jar ( it just requires mvn clean install command)
If you are having local repository, use mvn deploy. Ensure your version id is different to avoid confusion.

Related

Passing the ArchiveName to UploadArchives in gradle

Having migrated from Spring Boot 1.5.19 to Spring Boot 2.0.4, we are encountering problems with the build on jenkins. Using gradle 4.2.1. We think the behavioural changes in the spring boot gradle plugin between the versions is causing our issue.
The spring Boot gradle plugin has also been updated from 1.5.19 to 2.0.4
Our target artefact naming convention is :
project-name-<version>-<branch>-RELEASE.jar
The jar file gets generated correctly, having specified the following in the build.gradle file.
bootJar {
baseName = 'project_name'
}
The problem occurs when the uploadArchives task is executed. This task looks for an artefact with the following naming convention.
<path-folder-name>-<version>-<branch>-RELEASE.jar
where is the name of the folder path on the jenkins.
It doesn’t seem to be picking up the baseName config.
The build pipeline runs successfully when we don’t perform the uploadArchives task. Also, prior to the Spring Boot upgrade, this was not an issue.
Is there a way to get uploadArchives task to look for the generated jar file name?
I resolved this eventually by adding a settings.gradle file and defining a a root project name in that
rootProject.name = "project_name"
I think the upgrading of the spring Boot gradle plugin must have changed the way the project was being defined.
The 1.5.* version seemed to be taking the project name from the baseName in the Jar task, but the newer version was using the folder name where the app sits.
That was fun

Is there any command or way to find out the location of my JUnit?

i have a MacBook Pro and have downloaded java version 1.8 and selenium also. But im unable to find JUnit. Can i get the command to check the location of my JUnit. I have tried using a code to check whether JUnit is installed and the output is successful.
JUnit is not part of the standard JDK content; same for selenium.
Thus: you have to do something to pull the JUnit jar to your system. Either by downloading it manually yourself; or by using a build system like Maven or Gradle that can take care about resolving "dependencies" and downloading required artifacts automatically for you.
But in order to locate jar files on your system, you can simply turn to find command, like:
find / -type f -name "*.jar"
which should list you JAR files existing in your file system. You can read here about this and other tools that help you find files in your file system using the command line.

java.lang.NoClassDefFoundError when already imported jar files to android studio

I receive the error java.lang.NoClassDefFoundError: org.codehaus.jackson.map.ObjectMapper even after adding the Jackson jar files. In Android Studio?
Also tried a few links. Namely this, which did not help.
Edit:
After some research I discovered the root of the error. The dynamo-geo.jar library that is provided by Amazon is inherently flawed in that it refers to some sort of outdated Jackson version. Upon looking in I can see that the class that is called geoJsonMapper refers to a deprecated version of ObjectMapper from the old 1.x.x versions of Jackson. I opened source code from dynamo-geo.jar here and I edited the ObjectMapper import from the outdated version to import com.fasterxml.jackson.databind.ObjectMapper;.
Now the issue I have is I am not sure if there is a way to compile a JAR file in Android Studio? In order to get the newly updated library into my other Android Studio project?
EDIT:
Solution - read this.
If you are using Jackson 2 then you will want to import com.fasterxml.jackson.databind.ObjectMapper instead of org.codehaus.jackson.map.ObjectMapper. You may also have a mix of Jackson 1 and Jackson 2 JAR files in your classpath.
You should be able to fork dynamodb-geo, make your changes, and use Maven to package the new JAR file (run the command mvn clean package). The new JAR file would be located in /dynamodb-geo/target/.

FSharp.Data.dll not found

I am creating an example for our next F# meetup and have run into an issue.
I have downloaded the FSharp.Data v2.2.1 to try the JSON tutorials to parse (stock options) data downloaded from the web. I have been struggling with this issue for almost a week now. I have followed the suggestions seen in other posts including complete uninstall of packages suggestion. I ran into the same issue trying to use the CSV provider and decided to switch to JSON.
I have #load #"C:\ full path to dll ...\lib\net40\FSharp.Data.dll" For some reason I have to give the full path for the F# script file to recognize it.
The line open FSharp.Data has an error "The namespace 'Data' is not defined"
Nuget package manager shows that FSharp.Data version:2.2.1 is installed.
I have uninstalled and reinstalled all packages in the project several times but it does not change the error.
So I am stuck at that point. I could use some insights from anyone who has been down this path.
The following steps worked for me. I started from a new F# project and did everything in F# Interactive.
Right click references folder in the project manager.
Select manage nuget packages
Install FSharp.Data
Reference the library in F# Interactive:
\#r #"C:\Users\{Full project path}\packages\FSharp.Data.2.2.1\lib\net40\FSharp.Data.DesignTime.dll";;
I get the warning that the library is locked. But F# Interactive allows me to open it.
Open the library:
open FSharp.Data;;
Run JsonProvider on file with data:
type Stocks = JsonProvider<"C:\msft.txt">;;

Spring 3 MVC on JBoss 5.1: ConflictingBeanDefinitionException

When I try to deploy my application on JBoss 5.1 Spring 3 MVC throw me this stack trace: http://pastebin.com/Aah386PJ
Telling me that I have two definition of the same bean in two different packages. The thing is I don't have this IntershipConfigurationController in the controller package, but I have it in controller.internshipConfiguration. I previously add it under the root of controller but I deleted it from SVN and it doesn't appear anymore in the tree.
I cleaned JBoss, Eclipse's project, tried to redeploy it, to restart JBoss, Eclipse, etc. but I can't get this project working while my mates with the same repository can run it with no issue.
I don't know what to do this is really annoying.
I know this can be frustrating sometimes but you might want to know why this could happen. Spring annotation based ant path matcher checks for the class-path with a URI pattern to search for controllers or components. In your case the class-path either has a jar having the previous version of your class or some referencing .class file in your build path.
Make sure you have your project cleaned up and if possible disconnect
from SVN and download the project again.
You could also try CTRL+SHIFT+T to see if your controller is
referenced from any other library.
I finally deleted my JBoss folder, removed the projects from JBoss in Eclipse, extract a proper JBoss, made a clean on JBoss in Eclipse and then redeployed my projects and it's now working.
Nonetheless it's a really strange issue...
Edit :
It was in fact because the build folder at the root of my project was versioned and the old classes were still present.
Now the folder is ignored and removed from the SVN and I've deleted the old classes from my FS.