Mohammed Sardar.

Ranch Hand
+ Follow
since Jun 22, 2014
Mohammed likes ...
jQuery Spring Java
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
2
In last 30 days
0
Total given
0
Likes
Total received
23
Received in last 30 days
0
Total given
18
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt Green check

Recent posts by Mohammed Sardar.

Tim Holloway wrote:As a professional shop, I'd consider one of the LTS (Long-Term Support) releases of Java as a new base. Java 11, 17, and 21 are LTS releases, I think.

The biggest hurdle will be upgrading from Java 8. After Java 8, the introspection processes of Java changed significantly and as a result, the compiler will probably make many complaints. Be ssure also that when doing builds with libraries that you're using libraries that are compatible with newer Java as well.



Thanks for sharing your ideas. 1. Long Term Support
2. Compatibility (Noted) -  I wonder if you can mention some use cases where I can compare and choose a better compatibility match? For example, After Jdk 8, JAXB, CORBA were become obselete. During migration we should find equivalent replacements for the same  libraries. Do you mean the same? If so, jakarta replacement would be better or do I need to deep dive before considering this selection?

3. What different studies needed in terms backend migration? Any other ideas would you like to provide?
6 months ago
Dear All,

Festival Greetings for a Happy new year 2024,

We're on a planning, discovery to migrate a heavy load backend application from Java 1.8 . What are the factors do I need to consider and prepare a check list to do further study for selecting a different jvm based languages like Go/kotlin? If I'm considering to suggest to stick with higher java version for backend development, what're the highlighting points I should compare before choosing higher version of Java. What are the studies do I need to carry on to draw a drafted proposal? Any high level ideas would help me here to follow a direction. I'm new to this kind of study task. I should also keep in mind that the application should cloud neutral. should support different types of caches. Looking for some different suggestions/advices please. Some useful links will either help.  Thank you.
6 months ago
Could somebody help to understand this concept from Kafka  ? How pulling message from the  Queue differs from pulling message from the topic in Kafka? About what context should I read to understand this more ? Thank you.
1 year ago
Thanks for your comments Campbell. So If I change the return types of both test methods to either int or void in both the interfaces (A1, A2). It accepts the implementation of the test as void/int. In this case, which method is allowed to  pick from the interfaces A1 or A2? since they both have the same!.

I read this is treated as a single method, but I think won't the compiler confused which method to go with when both the interfaces are having the same signatures?
1 year ago
Hi All,

It would be glad, if someone extend the help  to understand the below scenario better and why this behaviour kept this way! In the below class TestDiamondProblem, I'm trying to call the test method  which returns int and there is no chance of confusion. Because I ask to over ride the method which returns int but not void.  Why still the compiler gives the error to change the return type of overridden method to void? Once changed to void, again the compiler warns to change int.

My question in question is , though we specify to  override the method with right signature, why are we forced to change the return type back and forth which again doesn't satisfies the situation?  What's the futruristic problem this behaviour trying to solve or prevent  withi kind of enforcement ? Your thoughts please.

1 year ago

Campbell Ritchie wrote:. . . don't have two fields with the same name . . . .



That's a very best remedy to overcome ambiguity of this kind.
1 year ago
Thanks Bert. It's a pleasure to hear from you that you're working to creating a learning systems based on non-linear pedagogy and hope that system will be educative and informative to new up coming learners. Thanks for your tips and Have a nice day.
1 year ago
You're right, basically, by default the "level" constant declared in interface is static and final. But when accessing the interface level member there is no qualified accessor specified in the code which makes the ambiguity here and confusing the compiler.

Compiler is stalled to decide which level variable the developer is trying to access. Whether the one from  Moveable interface or Animal class. One of the below or both the ways can be followed to access the level here.



Note: Please read this twice. Reference to 'level' is ambiguous, both 'Animal.level' and 'Moveable.level' match. Hope this helps a bit.
1 year ago
Hey Bert, Kathy and Trisha,

Hope you're all doing well and Happy to virtually talk with you all.

It was all funny and exciting to read the previous HeadFirst Java editions. Being said that the book was not at all like reading a technical book.  Kathy and Bert - You are best teachers when coming to teach Java stuff as like we can see throughout the previous editions. Trisha you would also be as part of this edition I hope.

We could learn along with lots of dogs, coffee cups, coding pool, java cross word puzzles, Dogs learning polymorphism, crossword puzzles, code Magnets, funny and humorous cartoons,  pictures, pool puzzles, Horses, beers   , beer mugs and the list will go on with long smile.   Happy to know, what that kind of stimulating and skilful learning methodologies are introduced through this edition?.

What memorable event happened during the writing of this book? Like while designing gaming puzzles, drawing cartoons suitable to the java stuff, if that's being part of this edition like the previous two.

I'm more keen to recommend this new edition to growing junior coding geeks around me, because I really feel it will be a great way for them to learn java through this kind of inspiring teaching method  .

If you're requested to give some tips for junior java programmers what that would be? Especially those who are enthusiastic about developing new games Wishing you all the best for this book promo to become successful.

Lovely Regards,
Mohammed Sardar.
1 year ago
Hi All,

Happy new year greetings. I'm looking out for some help in rendering the UML diagram through the installed plugin PlantUML. I was able to view the UML for some time, now I see only the blank page prolong. I tried to follow the performance tips too which didn't help at least. I ensured the below screenshot settings in the plantUML settings window is fine. Cleared cache, restarted the IDE, tried to create a new plantUML and it went fine. Either I'm unable to see the UML code too to place the cursor between the @startuml and @enduml. If anyone can help with what is missed in the settings or configuration, will be much helpful.
2 years ago
I'm curious to know, how Oracle notifies its subscribers about the removal of the javax.xml.bind(JAXB) module since Java 11. Doesn't this break existing functionalities of the JAXB-based code already implemented? So, whoever using JAXB needs to download and add as a separate dependency whenever reading the release notes from the Oracle team? Also, what is the intention making to remove and separate from Java? I'm seeing this from the technical perspective.  
2 years ago
I'm able to import the dependency after including it in the respective sub-module instead of root pom. I thought the dependency would be inherited from root pom but that didn't work.  I still need to understand why is it so. How the root pom dependencies can be reused in another sub-module pom?
2 years ago
Sharing some more lengthy stack traces for better understanding. some of the package names are masked due to security reason.

Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.xxx.orc.payments.api.config.KafkaConfiguration$$EnhancerBySpringCGLIB$$b11914e9]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlElement
2022-01-09T13:08:45.562+05:30 ERROR [org-payments,,,] 4880 --- [TraceId:] [UserId:] [UserScope:] [           main] o.s.b.SpringApplication                  : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kafkaConfiguration'
payments/api/config/KafkaConfiguration.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate
Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlElement
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:304) ~[spring-beans-5.1.12.RELEASE.jar:5.1.12.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:285) ~[spring-beans-5.1.12.RELEASE.jar:5.1.12.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1340) ~[spring-beans-5.1.12.RELEASE.jar:5.1.12.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1186) ~[spring-beans-5.1.12.RELEASE.jar:5.1.12.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-5.1.12.RELEASE.jar:5.1.12.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlElement
at com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.<init>(JaxbAnnotationIntrospector.java:139) ~[jackson-module-jaxb-annotations-2.9.10.jar:2.9.10]
at com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.<init>(JaxbAnnotationIntrospector.java:126) ~[jackson-module-jaxb-annotations-2.9.10.jar:2.9.10]
at com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule.setupModule(JaxbAnnotationModule.java:90) ~[jackson-module-jaxb-annotations-2.9.10.jar:2.9.10]
at com.fasterxml.jackson.databind.ObjectMapper.registerModule(ObjectMapper.java:751) ~[jackson-databind-2.9.10.1.jar:2.9.10.1]
at com.fasterxml.jackson.databind.ObjectMapper.registerModules(ObjectMapper.java:951) ~[jackson-databind-2.9.10.1.jar:2.9.10.1]
at com.fasterxml.jackson.databind.ObjectMapper.findAndRegisterModules(ObjectMapper.java:1029) ~[jackson-databind-2.9.10.1.jar:2.9.10.1]
at com.xxxx.core.messaging.spring.kafka.AbstractKafkaConfiguration.<init>(AbstractKafkaConfiguration.java:61) ~[spring-kafka-support-2.12.0.jar:2.12.0]
at com.xxxx.orc.payments.api.config.KafkaConfiguration.<init>(KafkaConfiguration.java:16) ~[classes/:na]
at com.yyyy.orc.payments.api.config.KafkaConfiguration$$EnhancerBySpringCGLIB$$b11914e9.<init>(<generated>) ~[classes/:na]
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:na]
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[na:an]
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlElement
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) ~[na:na]
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[na:na]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[na:na]
... 43 common frames omitted


2 years ago
Thanks all for sharing throughts and link. For some unknown reason, I couldn't download the below dependency either from nexus or from maven repos. I ensured I follow the proper URL in the .m2 folder settings.xml. After spending some long hours, manually downloaded the below jar and added it to the local maven repo. Then tried to execute the application but still ended up with the error.  The screenshot shows, manually added XML. bind dependency to the external library. Maven build was a success. Do we have any debugging techniques to reach the root cause of the issue? Any issue in dependency setup?

I observe looks something different from the shown error in the link. Actually, I'm getting Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlElement
at com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.<init>(JaxbAnnotationIntrospector.java:139) ~[jackson-module-jaxb-annotations-2.9.10.jar:2.9.10]

2 years ago