Bug 1206503 - NullPointerException from Hello example (hello.properties file missing)
Summary: NullPointerException from Hello example (hello.properties file missing)
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: Release_Notes
Version: Development
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: mmurray
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-27 09:56 UTC by Petr Matousek
Modified: 2020-03-20 16:51 UTC (History)
6 users (show)

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.
Clone Of:
: 1207368 (view as bug list)
Environment:
Last Closed: 2020-03-20 16:51:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Petr Matousek 2015-03-27 09:56:17 UTC
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.