Coder Social home page Coder Social logo

NPE for JobExecution#getJobName about jsr352 HOT 6 OPEN

jberet avatar jberet commented on September 18, 2024
NPE for JobExecution#getJobName

from jsr352.

Comments (6)

chengfang avatar chengfang commented on September 18, 2024

Your code path is different from the current version. Which version of JBeret, or which version of WildFly if using JBeret inside WildFly? Can you try the latest version?

from jsr352.

ltvcuong avatar ltvcuong commented on September 18, 2024

I'm using JBeret inside WildFly 8.2.0.Final. The problem is, i've been using it for more than a year without such problem. It's just happened recently and not always, it does not happen on my dev environment and test server but on my integration server, both servers have the same configuration except that we do the DB cleanup for test server for each installation and not for integration.

from jsr352.

chengfang avatar chengfang commented on September 18, 2024

Could be related to https://issues.jboss.org/browse/JBERET-191

But issue JBERET-191 is about setting the wrong job instance, not the null job instance.

Looks like some problem during deserializaing job execution data from db. In your dev or test environment, where you cleaned db, there is nothing to deserialize from db, so this problem does not show up. Can you upgrade to recent version of WildFly (e.g., WildFly 10.1)?

from jsr352.

ltvcuong avatar ltvcuong commented on September 18, 2024

Hi, thanks for you hints. So do you think cleaning the job excecution data would help in this case? Upgrading Wildfly is not really a decision i can make...

Actually, i'm still confused: if it's the deserialization problem, it should happen on my test server as well because we would have job execution data in the DB after some time (after the first fun).

from jsr352.

chengfang avatar chengfang commented on September 18, 2024

job execution data is also cached. I guess in your test server, those job execution data is present in memory and in db too, so there is no need to deserialize it from db.

In your integration server, somehow those job execution data is not in cache, so JBeret needs to deserialize it from db. And just for this particular use case and code path, a bug like JBERET-191 occurred.

If you cannot upgrade, then the workaround is to make sure the requested job execution data is already in memory, or there is no job execution data in db to deserialize.

To achieve the same result as getRunningExecutions(jobName), you can try first calling getJobInstances(final String jobName, final int start, final int count) to get list of JobInstance, then for each JobInstance, call getJobExecutions(final JobInstance jobInstance) to get a list of JobExecution, then filter them by their batch status.

Again, the best approach is to upgrade to latest stable version of WildFly and JBeret, to benefit from bug fixes like this and other fixes.

from jsr352.

ltvcuong avatar ltvcuong commented on September 18, 2024

thanks a lot for your answer.

I will try the alternative you mentioned. I will get back when i get the result (it usually takes weeks for a fix to go to integration...)

from jsr352.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.