Bug 1207368 - NullPointerException from Hello example (hello.properties file missing)
Summary: NullPointerException from Hello example (hello.properties file missing)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-java
Version: Development
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 3.2
: ---
Assignee: Irina Boverman
QA Contact: Jiri Prajzner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-30 18:44 UTC by Irina Boverman
Modified: 2015-10-08 13:10 UTC (History)
9 users (show)

Fixed In Version: qpid-java-0.30-7
Doc Type: Bug Fix
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. The bug fix permanently moves the java source for examples into `/examples/org` instead of `examples/src/main/java/org` which puts the content back into the correct classpath context for the example start script. This corrects the workaround present in https://bugzilla.redhat.com/show_bug.cgi?id=1206503[BZ#1206503].
Clone Of: 1206503
Environment:
Last Closed: 2015-10-08 13:10:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2015:1879 0 normal SHIPPED_LIVE Red Hat Enterprise MRG Messaging 3.2 Release 2015-10-08 17:07:53 UTC

Comment 2 Rajith Attapattu 2015-04-28 16:18:58 UTC
The solution to this is to adjust the paths in the rpm structure accordingly

Comment 3 Rajith Attapattu 2015-04-28 17:59:39 UTC
The hello.properties is loaded via the classpath.
Therefore it needs to be within a jar file (where Hello.java code is packaged) or in a path where Hello.java is compiled to when run_example.sh is executed.

This is best handled by whoever is creating the rpms as run_example.sh is a rpm specific artifact and not present in upstream.

I haven't been creating rpms for a while and therefore,
1. It would be faster for the maintainer to handle this, as I will have to re-orient myself with the new setup.

2. I don't know the reason why the structure was changed. Therefore this change is best handled with the person who changed the paths to figure out why it was done.

If assistance is required, I'm happy to help.

Comment 6 Jared MORGAN 2015-07-20 00:10:52 UTC
Hi Irina.

I've created a release note for this because it corrects a Known Issue from the previous z-stream. Let me know if the wording is OK, bearing in mind the material change was to move files around, and that particular comment was set to private.

Comment 7 Jiri Prajzner 2015-07-23 13:07:13 UTC
List of installed packages:
yum list installed "*qpid-java*"
qpid-java-client.noarch 0.32-2
qpid-java-common.noarch 0.32-2
qpid-java-example.noarch 0.32-2

yum list installed "*openjdk*"
java-1.7.0-openjdk 1:1.7.0.75-2.5.4.2
java-1.7.0-openjdk-devel 1:1.7.0.75-2.5.4.2
java-1.7.0-openjdk-headless 1:1.7.0.75-2.5.4.2

Platforms:
i686, x86_64

RHELs:
6.7, 7.1

Comment 11 Jiri Prajzner 2015-09-02 13:03:11 UTC
List of installed packages:
yum list installed "*qpid-java*"
qpid-java-client.noarch 0.30-7
qpid-java-common.noarch 0.30-7
qpid-java-example.noarch 0.30-7

Platforms:
i686, x86_64

RHELs:
6.7, 7.1

Comment 13 errata-xmlrpc 2015-10-08 13:10:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2015-1879.html


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