OpenPojo / openpojo

POJO Testing & Identity Management Made Trivial
http://openpojo.com
Apache License 2.0
156 stars 40 forks source link

NullPointer when Jenkins run tests #43

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run test with Jenkins

What is the expected output? What do you see instead?
java.lang.NullPointerException: null
    at com.openpojo.reflection.java.packageloader.impl.FilePackageLoader.getTypes(FilePackageLoader.java:45)
    at com.openpojo.reflection.java.packageloader.Package.getTypes(Package.java:51)
    at com.openpojo.reflection.impl.PojoPackageImpl.getPojoClasses(PojoPackageImpl.java:82)
    at com.openpojo.reflection.service.impl.DefaultPojoClassLookupService.getPojoClasses(DefaultPojoClassLookupService.java:72)
    at com.openpojo.reflection.impl.PojoClassFactory.getPojoClasses(PojoClassFactory.java:65)

What version of the product are you using? On what operating system?
0.5.1

Please provide any additional information below.
No error with 0.5.0

Original issue reported on code.google.com by lfernand...@gmail.com on 31 Jul 2014 at 9:55

GoogleCodeExporter commented 9 years ago

this.pojoClasses = PojoClassFactory.getPojoClasses(POJO_PACKAGE, new 
FilterBasedOnInheritance(MyModel.class));

Original comment by lfernand...@gmail.com on 31 Jul 2014 at 10:10

GoogleCodeExporter commented 9 years ago
Can you please paste the full stack trace?
Also if you have an actual sample code that fails for speedy reproduction.

Original comment by oshou...@gmail.com on 1 Aug 2014 at 12:41

GoogleCodeExporter commented 9 years ago
Also can you post the following:
1. JDK version used
2. Operating system & version

Original comment by oshou...@gmail.com on 1 Aug 2014 at 1:35

GoogleCodeExporter commented 9 years ago
My first comment "PojoClassFactory.getPojoClasses(POJO_PACKAGE, new 
FilterBasedOnInheritance(MyModel.class));" is the first line of @Before and is 
the source of bug in stacktrace.

Ubuntu 12.10
JDK 1.7.0_45

Original comment by lfernand...@gmail.com on 1 Aug 2014 at 8:18

GoogleCodeExporter commented 9 years ago
Thank you for your feedback and followup.

I see the java.lang.NullPointerException: null, but the line mentioned  
(FilePackageLoader.java:45) doesn't have any code that would throw NullPointer 
Exception see: 
https://code.google.com/p/openpojo/source/browse/trunk/src/main/java/com/openpoj
o/reflection/java/packageloader/impl/FilePackageLoader.java#45

Any chance something was truncated when doing a copy/paste for the stack trace?

Original comment by oshou...@gmail.com on 1 Aug 2014 at 8:32

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Sorry there are no missing line.

Original comment by lfernand...@gmail.com on 2 Aug 2014 at 8:42

GoogleCodeExporter commented 9 years ago
I have the same problem!

I'm on:
CentOS 6.5
JDK 1.7.0_67

I'm also using maven 3.2.2 as build tool and the build itself works on the 
machine when using CLI, but in Jenkins it fails!

Original comment by J.O.B.Ka...@gmail.com on 24 Sep 2014 at 10:44

GoogleCodeExporter commented 9 years ago

Original comment by oshou...@gmail.com on 26 Sep 2014 at 4:00

GoogleCodeExporter commented 9 years ago
Next version of OpenPojo - to be released soon will log when such an error 
occur, please upgrade to it when its released and update the ticket with the 
log message that comes out, this will help identify what is happening with 
Jenkins.

Original comment by oshou...@gmail.com on 5 Oct 2014 at 12:23

GoogleCodeExporter commented 9 years ago
Can you please run your builds with OpenPojo-0.6.0?
Please make sure your logger is set to enable "error" logs and post back the 
error log.

The system won't be throwing null pointer, it will just skip the error'd 
package path and continue. 

Original comment by oshou...@gmail.com on 8 Oct 2014 at 5:03

GoogleCodeExporter commented 9 years ago
I have reverted the change used for tracking this through logs, the upcoming 
release will throw exception with detailed log to help identify the issue.

Original comment by oshou...@gmail.com on 1 Nov 2014 at 5:32

GoogleCodeExporter commented 9 years ago
I have run the tests in jenkins now, with 0.6.0 and this is what I see:
[main] ERROR com.openpojo.reflection.java.packageloader.impl.FilePackageLoader 
- Failed to retrieve entries in path: 
[/apps/jboss/.jenkins/workspace/Mobil%20kontroll%20-%20Trunk%20-%20Deploy%20Utv%
20(mk-deploy-utv)/model-kund/target/test-classes/se/metria/system/mk/kund/model]
 created from URI: 
[file:///apps/jboss/.jenkins/workspace/Mobil%2520kontroll%2520-%2520Trunk%2520-%
2520Deploy%2520Utv%2520(mk-deploy-utv)/model-kund/target/test-classes/se/metria/
system/mk/kund/model]
[main] ERROR com.openpojo.reflection.java.packageloader.impl.FilePackageLoader 
- Failed to retrieve entries in path: 
[/apps/jboss/.jenkins/workspace/Mobil%20kontroll%20-%20Trunk%20-%20Deploy%20Utv%
20(mk-deploy-utv)/model-kund/target/classes/se/metria/system/mk/kund/model] 
created from URI: 
[file:///apps/jboss/.jenkins/workspace/Mobil%2520kontroll%2520-%2520Trunk%2520-%
2520Deploy%2520Utv%2520(mk-deploy-utv)/model-kund/target/classes/se/metria/syste
m/mk/kund/model]

Original comment by J.O.B.Ka...@gmail.com on 6 Nov 2014 at 12:20

GoogleCodeExporter commented 9 years ago

Original comment by oshou...@gmail.com on 6 Nov 2014 at 8:35

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r833.

Original comment by oshou...@gmail.com on 7 Nov 2014 at 12:12