Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1206503 - NullPointerException from Hello example (hello.properties file missing)
NullPointerException from Hello example (hello.properties file missing)
Status: MODIFIED
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: Release_Notes (Show other bugs)
Development
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: mmurray
MRG Quality Engineering
: Regression, WorkAround
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-27 05:56 EDT by Petr Matousek
Modified: 2015-10-01 10:03 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Known Issue
Doc Text:
Previously the `hello.properties` file was located in `org/apache/qpid/example` (together with the example sources) and the binaries were compiled to the same location. Starting with MRG-3.1, the source and hello.properties location was changed to src/main/java/org/apache/qpid/example/ while the compiled binaries were still saved to the old location. This caused the Hello example to not be able to read the `hello.properties` file and resulted in a NullPointerException. To workaround the issue, move the `hello.properties` from `org/apache/qpid/example/` to `src/main/java/org/apache/qpid/example/`. A future release of MRG will correct the compiled file location permanently.
Story Points: ---
Clone Of:
: 1207368 (view as bug list)
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Petr Matousek 2015-03-27 05:56:17 EDT
Description of problem:

# /usr/share/doc/qpid-java-0.30/examples/run_example.sh org.apache.qpid.example.Hello
java.lang.NullPointerException
at java.util.Properties$LineReader.readLine(Properties.java:434)
at java.util.Properties.load0(Properties.java:353)
at java.util.Properties.load(Properties.java:341)
at org.apache.qpid.example.Hello.runTest(Hello.java:56)
at org.apache.qpid.example.Hello.main(Hello.java:48)

Previously hello.properties file was located in org/apache/qpid/example (together w/ example sources) and the binaries were compiled to the same location. With MRG-3.1 the source and hello.properties location was changed to src/main/java/org/apache/qpid/example/ while the compiled binaries are placed to the old location, thus Hello example can't read hello.properties file and ends with NullPointerException. 

Workaround is to copy hello.properties to the folder w/ binaries.


Version-Release number of selected component (if applicable):
qpid-java-*-0.30-4.el6
qpid-java-*-0.30-5.el7
java-1.7.0-openjdk-1.7.0.75-2.5.4.0.el6_6
java-1.7.0-openjdk-devel-1.7.0.75-2.5.4.0.el6
java-1.7.0-openjdk-1.7.0.75-2.5.4.7.el7_1
java-1.7.0-openjdk-devel-1.7.0.75-2.5.4.7.el7_1

How reproducible:
100%

Steps to Reproduce:
1. run Hello example
2. NullPointerException

Actual results:
NullPointerException on Hello example execution

Expected results:
Hello world!

Additional info:

Note You need to log in before you can comment on or make changes to this bug.