Kumar Prakash

Greenhorn
+ Follow
since Apr 20, 2016
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kumar Prakash

Hi there,

In my multi-module maven spring boot web project, it's needed to configure log4j2 using the properties file.
I found solutions suggesting to put the file at  resource location, but I want to add it outside the project location.
Can it be possible? If yes then how can I achieve it, please suggest some solution/example.


Thanks in advance
Hi,

Thank you Stephan, it is helpful. But after adding <xs:any> I got below error in .xsd file.
cos-nonambig: "http://www.xyz.com/xml/Input":fieldName and WC[##any] (or elements from their substitution group) violate "Unique Particle Attribution". During validation against this schema, ambiguity would be
created for those two particles.
Could you please suggest something to handle above error.

Thanks in advance,
Prakash
Hi there,

I am getting "Unmarshalling Error: unexpected element" when I hit a web service SOAP xml request having unknown element.
It is known to me, this error is occurred due to missing element in xsd. It will work when unknown element will be defined in xsd.
My expectation: It shouldn't be happen, if unknown element is given from request, if it is then I want to understand/know the logical reason behind this scenario.

Help me to understand why this exception is raised when unknown element is passed through request.

Thanks in advance,
Prakash
3 months ago
Hi all,

My application stores the JSON request/response file. But now I want to use some tools, which can handle all these storing, fetching, deleting, moving, and renaming files, etc operations. While searching on the internet for such tools, I came to know about "Bigqueue". I found a link http://bulldog2011.github.io/blog/2013/01/23/big-queue-design/. I read about it, but unable to understand how to store files and do the operation through it, no such examples are found there.

Can anybody help me to understand "bigqueue" and how provide some like with a java example which will fulfill my requirement?

Thanks in advance,

Prakash
5 months ago
Hello,

In my WebLogic application I am facing the issue of servletcontextlistener initializing 2 times. I have 1 Ear file which contains 2 war files.
For My servletcontextlistener class I am using method annotation (not define it in web.xml file).  

Why WebLogic server is calling servletcontextlistener class 2 times, is there any way to resolve this issue?

Thank you
7 months ago
I am using JMS ActiveMQ to store the data/request received from Rest web service into an ActiveMQ queue. 

Due to our requirement, we have to modify some of the data/messages that are already present in the queue.

Can it is possible to modify/update the messages in the queue or there is any other mechanism/way to implement the same?

Thanks in advance
9 months ago
Hi,

when i run my tests as single test (Run as -> TestNG test) it's working properly (it's ok, its' working)
when i use my testng.xml file the tests fail because some static variables are going to initialize first and get used later. Thus using static variables gives null pointer exception.

Please help me to know the reason of such behavior. Because same test execute perfectly and static variable going to initialize later where it get called.

Thanks in advance,
1 year ago
Hi there,

I am migrating my application to Azure server. I am using maven, jdbc, apache tomcat7, java7, sql server.

------

While my test/execution, I found below exception.
com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset by peer: socket write error
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1352)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1339)
at com.microsoft.sqlserver.jdbc.TDSChannel.write(IOBuffer.java:1670)
at com.microsoft.sqlserver.jdbc.TDSWriter.flush(IOBuffer.java:2486)
at com.microsoft.sqlserver.jdbc.TDSWriter.writePacket(IOBuffer.java:2388)
at com.microsoft.sqlserver.jdbc.TDSWriter.endMessage(IOBuffer.java:1995)
at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:4992)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:388)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:340)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1400)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:179)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:154)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:283)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at net.bull.javamelody.JdbcWrapper.doExecute(JdbcWrapper.java:403)
at net.bull.javamelody.JdbcWrapper$StatementInvocationHandler.invoke(JdbcWrapper.java:128)
at net.bull.javamelody.JdbcWrapper$DelegatingInvocationHandler.invoke(JdbcWrapper.java:285)
at com.sun.proxy.$Proxy52.executeQuery(Unknown Source)



------
And below one as well:

Error while closing Connection object.
java.sql.SQLException: Already closed.
at org.apache.tomcat.dbcp.dbcp.PoolableConnection.close(PoolableConnection.java:114)
at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:191)
at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at net.bull.javamelody.JdbcWrapper$ConnectionInvocationHandler.invoke(JdbcWrapper.java:188)
at net.bull.javamelody.JdbcWrapper$DelegatingInvocationHandler.invoke(JdbcWrapper.java:285)
at com.sun.proxy.$Proxy51.close(Unknown Source)


Please help me to find the reason of the issue and solution.

Thanks in advance,
1 year ago
Hi all,

I am using ThreadPoolExecutor with some bound queue in my application.
Requirement is like queue of ThreadPoolExecutor should pass message to another unbound queue(which is filled with tasks) and ask for task from it.
Thus bound queue will get task from unbound queue if it has less task than defined or any task taken from it.
Is it possible or not?

Thanks in advance
Prakash

Hi Henary,

thank you for you reply, but i got nothing helpful till yet to solve my issue.
Let me explain my case with attached image:

Within the image, I showed one listner/job which divides/control the active threads of different threadpoolexecutor.
If any threadpoolExecutor is not running, then active thread count of that pool will be utilize/assigned to another pool at run time.

Example:
ThreadPool1, ThreadPool2 and ThreadPool3 is running. If ThreadPool2 finishes and shutdown, then ThreadPool2's active Thread count should be distributed in ThreadPool1 & ThreadPool3 which running.

Thus this way, I can utilize full CPU core. Please let me know, is something like my expectation is possible or not. If yes, then help me with you guidance.

Thanks in advance.
Prakash

Hi all,

Looking for solution/demo/code to run several jobs separately/independently.
My requirement is as below:
All jobs have a threadpool, I can manage active running thread(increase or decrease run time), to full utilization of CPU cores.

Is it possible or not and anyone have suggestion/solution?
I am using ThreadPoolExecutor in my project to execute multiple task concurrently.
But now i have a requirement to add new task in between/after threadpool starts its thread execution and decide which one to execute first concurrently.
Previously I was using ArrayBlockingQueue, but I found PriorityBlockingQueue is best to deal with my requirement.

So, I need to know the drawbacks of PriorityBlockingQueue and ThreadPoolExecutor, before using it to my application and for my knowledge also.
Thus I will try to find the solution to handle those cons.
1 year ago
Hi there,

I am using PriorityBlockignQueue within my project with ThreadPoolExecutor. But, I am bit confuse about it, I know it is an unbound queue but need to know what will the the max limit of it.
When my application will crash while inserting thread in it.

I also need to know the pro and cons of it using with ThreadPoolExecutor.

Thanks in advance.
2 years ago
Issue is resolved by setting equal/same size of corePoolSize and maximumPoolSize. It worked now.