Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenHFT SHM as JCACHE Operand : testKeySet() failing ... #17

Closed
Cotton-Ben opened this issue Mar 23, 2014 · 6 comments
Closed

OpenHFT SHM as JCACHE Operand : testKeySet() failing ... #17

Cotton-Ben opened this issue Mar 23, 2014 · 6 comments

Comments

@Cotton-Ben
Copy link

Our @testsuite to adapt SHM as an ISPN7 JCACHE operand is currently failing the testKeySet() test .

line 291 at https://github.com/Cotton-Ben/infinispan/blob/master/off-heap/src/test/java/org/infinispan/offheap/test/OffHeapDefaultDataContainerTest.java makes the exact same OpenHFT invoke as was used in the infoQ whitepaper.

 BondVOInterface bondV = DataValueClasses.newDirectReference(BondVOInterface.class);

could you guys take a look and provide counsel?

here is the stack trace.

[TestNG] Running:
/root/.IdeaIC13/system/temp-testng-customsuite.xml

ISPN7 JCACHE DataContainer view of OpenHFT SHM is being created
OpenHFT /dev/shmSHM/bondVO.@t=1395590961708 entries=[{}]
initialize
ISPN7 JCACHE DataContainer created jcacheDataContainer=[org.infinispan.offheap.container.OffHeapDefaultDataContainer@50431425]
warning: Supported source version 'RELEASE_6' from annotation processor 'org.sonatype.guice.bean.scanners.index.SisuIndexAPT6' less than -source '1.7'
1 warning
java.lang.AssertionError: java.lang.NullPointerException
at net.openhft.lang.model.DataValueClassCache.newDirectReference(DataValueClassCache.java:39)
at net.openhft.lang.model.DataValueClasses.newDirectReference(DataValueClasses.java:36)
at org.infinispan.offheap.OffHeapDefaultDataContainerTest.testKeySet(OffHeapDefaultDataContainerTest.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
at org.testng.TestNG.run(TestNG.java:1031)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:125)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.NullPointerException
at net.openhft.lang.model.DataValueGenerator.methodSet(DataValueGenerator.java:691)
at net.openhft.lang.model.DataValueGenerator.generateNativeObject(DataValueGenerator.java:539)
at net.openhft.lang.model.DataValueGenerator.acquireNativeClass(DataValueGenerator.java:482)
at net.openhft.lang.model.DataValueClassCache.directClassFor(DataValueClassCache.java:48)
at net.openhft.lang.model.DataValueClassCache.newDirectReference(DataValueClassCache.java:37)
... 32 more

Process finished with exit code 0

@peter-lawrey
Copy link
Owner

I am downloading a fork now.
On 23 Mar 2014 16:22, "Ben Cotton" notifications@github.com wrote:

Our @testsuite https://github.com/TestSuite to adapt SHM as an ISPN7
JCACHE operand is currently failing the testKeySet() test .

line 291 at
https://github.com/Cotton-Ben/infinispan/blob/master/off-heap/src/test/java/org/infinispan/offheap/test/OffHeapDefaultDataContainerTest.javamakes the exact same OpenHFT invoke as was used in the infoQ whitepaper.

BondVOInterface bondV = DataValueClasses.newDirectReference(BondVOInterface.class);

could you guys take a look and provide counsel?

here is the stack trace.

[TestNG] Running:
/root/.IdeaIC13/system/temp-testng-customsuite.xml

ISPN7 JCACHE DataContainer view of OpenHFT SHM is being created
OpenHFT /dev/shmSHM/bondVO.@t https://github.com/t=1395590961708
entries=[{}]
initialize
ISPN7 JCACHE DataContainer created jcacheDataContainer=[
org.infinispan.offheap.container.OffHeapDefaultDataContainer@5043142https://github.com/org.infinispan.offheap.container.OffHeapDefaultDataContainer/HugeCollections/commit/50431425
]
warning: Supported source version 'RELEASE_6' from annotation processor
'org.sonatype.guice.bean.scanners.index.SisuIndexAPT6' less than -source
'1.7'
1 warning
java.lang.AssertionError: java.lang.NullPointerException
at
net.openhft.lang.model.DataValueClassCache.newDirectReference(DataValueClassCache.java:39)
at
net.openhft.lang.model.DataValueClasses.newDirectReference(DataValueClasses.java:36)
at
org.infinispan.offheap.OffHeapDefaultDataContainerTest.testKeySet(OffHeapDefaultDataContainerTest.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
at org.testng.TestNG.run(TestNG.java:1031)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:125)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.NullPointerException
at
net.openhft.lang.model.DataValueGenerator.methodSet(DataValueGenerator.java:691)
at
net.openhft.lang.model.DataValueGenerator.generateNativeObject(DataValueGenerator.java:539)
at
net.openhft.lang.model.DataValueGenerator.acquireNativeClass(DataValueGenerator.java:482)
at
net.openhft.lang.model.DataValueClassCache.directClassFor(DataValueClassCache.java:48)
at
net.openhft.lang.model.DataValueClassCache.newDirectReference(DataValueClassCache.java:37)
... 32 more

Process finished with exit code 0

Reply to this email directly or view it on GitHubhttps://github.com//issues/17
.

@Cotton-Ben
Copy link
Author

very cool! Thanks so much Peter for your stellar support.

If still willing, please re-try your clone of this Fork. We, unfortunately, gave each other 'push x-stream upstream' git authority ...big mistake ... and we ended up pushing an unresolved conflict! the conflict is now resolved ... and we have now adapted to the traditional 'issue me a pull request' protocol from all git views.

so from your 'origin' view, maybe issue:

git clone https://github.com/Cotton-Ben/infinispan.git #Peter's origin
git remote add upstream https://github.com/infinispan/infinispan.git #mmarkus@redhat.com
git remote add benstream https://github.com/Cotton-Ben/infinispan.git #Ben
git remote add dgorstream https://github.com/dgor/infinispan.git #Dmitry
git remote add xiaostream https://github.com/geminigx/infinispan.git #Xiao

from intelliJ, I haven't figured out how to build via the RedHat provided ./build.sh so from the Korn shell we all just type this to build everything:

mvn -s maven-settings.xml clean compile validate package  -DskipTests &

Once you get that built, intelliJ beautifully imports as a maven project. And you can then right click "run Test" at

https://github.com/Cotton-Ben/infinispan/blob/master/off-heap/src/test/java/org/infinispan/offheap/test/OffHeapDefaultDataContainerTest.java

Our current roadblock is line 291 of that .java Test

 BondVOInterface bondV = DataValueClasses.newDirectReference(BondVOInterface.class); 

Thanks again Peter. Excited to learn, Ben, Dmitry, and Xiao

@peter-lawrey
Copy link
Owner

I spent an hour trying to get it to build and gave up. Will try again when
I have more time.

If you can add a failing test to a fork of huge collection and issue a pull
request it might get fixed faster. I.e. not wait for me to do it.
On 25 Mar 2014 17:44, "Ben Cotton" notifications@github.com wrote:

very cool! Thanks so much Peter for your stellar support.

If still willing, please re-try your clone of this Fork. We,
unfortunately, gave each other 'push x-stream upstream' git authority
...big mistake ... and we ended up pushing an unresolved conflict! the
conflict is now resolved ... and we have now adapted to the traditional
'issue me a pull request' protocol from all git views.

so from your 'origin' view, maybe issue:

git clone https://github.com/Cotton-Ben/infinispan.git #Peter's origin
git remote add upstream https://github.com/infinispan/infinispan.git #
mmarkus@redhat.com
git remote add benstream https://github.com/Cotton-Ben/infinispan.git#Ben
git remote add dgorstream https://github.com/dgor/infinispan.git #Dmitry
git remote add xiaostream https://github.com/geminigx/infinispan.git#Xiao

from intelliJ, I haven't figured out how to build via the RedHat provided
./build.sh so from the Korn shell we all just type this to build everything:

mvn -s maven-settings.xml clean compile validate package -DskipTests &

Once you get that built, intelliJ beautifully imports as a maven project.
And you can then right click "run Test" at

https://github.com/Cotton-Ben/infinispan/blob/master/off-heap/src/test/java/org/infinispan/offheap/test/OffHeapDefaultDataContainerTest.java

Our current roadblock is line 291 of that .java Test

BondVOInterface bondV = DataValueClasses.newDirectReference(BondVOInterface.class);

Thanks again Peter. Excited to learn, Ben, Dmitry, and Xiao

Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-38596940
.

@ben--cotton
Copy link

Understand completely … sorry you endured the initial RedHat “must build it this way” trauma.

We will right now create a [jcache] module under our /apps/OpenHFT parent module and present the failing test to you from that view.

Thanks, Ben, Dmitry and Xiao.

P.S. when/if you do have time to dare to try again (and understand if you don’t) these steps demonstrate the Test’s failure.

  1.   git clone https://github.com/Cotton-Ben/infinispan.git
    
  2.  cd  infinispan
    
  3.  git remote add upstream https://github.com/infinispan/infinispan.git   #mmarkus@redhat.com<mailto:#mmarkus@redhat.com> REPO
    
  4.  mvn –s maven-settings.xml clean compile validate package –DskipTests
    
  5.  From intelliJ, import project infinispan as maven project (two check box =ON for “search for projects recursively” and “ import Maven projects recursviely”, then next->next->next->Finish)
    
  6.  From intelliJ, Right click on ‘RUN testKeySet()’   at  line 290 of https://github.com/Cotton-Ben/infinispan/blob/master/off-heap/src/test/java/org/infinispan/offheap/test/OffHeapDefaultDataContainerTest.java
    
  7.  You will see the NPE at the test’s invoke of
    

BondVOInterface bondV = DataValueClasses.newDirectReference(BondVOInterface.class);

From: Peter Lawrey [mailto:notifications@github.com]
Sent: Tuesday, March 25, 2014 3:43 PM
To: OpenHFT/HugeCollections
Subject: Re: [HugeCollections] OpenHFT SHM as JCACHE Operand : testKeySet() failing ... (#17)

I spent an hour trying to get it to build and gave up. Will try again when
I have more time.

If you can add a failing test to a fork of huge collection and issue a pull
request it might get fixed faster. I.e. not wait for me to do it.

Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-38611091.

This email is confidential and subject to important disclaimers and conditions including on offers for the purchase or sale of securities, accuracy and completeness of information, viruses, confidentiality, legal privilege, and legal entity disclaimers, available at http://www.jpmorgan.com/pages/disclosures/email.

@Cotton-Ben
Copy link
Author

Dmitry, Xiao,

It is no wonder this is so awkward to build.

Anyway, the key to building our Fork of RedHat ISPN7 is now resolved. Don't use any intelliJ maven lifecycle events. Go to the Korn Shell command line of your workspace's clone of the Fork and only type:

mvn –s maven-settings.xml  install  –DskipTests

That is the trick to overcome the awkward can't build from intelliJ issue.

@Cotton-Ben
Copy link
Author

now fixed (problem was my misuse of #newDirectReference() )

Cotton-Ben/JCache@39f1d72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants