java.lang.java.lang.NoClassDefFoundError
- Dominant language
- Python
- Stars
- 534
- Forks
- 95
- PR merge metrics
- No merged PRs in 30d
Description
### The env



From a local installation ,run the code
```python
import imagej
ij = imagej.init('G:\\Fiji.app')
image_url = 'https://imagej.net/images/clown.jpg'
jimage = ij.io().open(image_url)
image = ij.py.from_java(jimage)
ij.py.show(image, cmap='gray')
```
### the result
```
D:\python_tool\.env\Scripts\python.exe D:\python_tool\de.py
Traceback (most recent call last):
File "ClassLoader.java", line 521, in java.lang.ClassLoader.loadClass
java.lang.java.lang.ClassNotFoundException: java.lang.ClassNotFoundException: net.imglib2.img.basictypelongaccess.unsafe.owning.OwningFloatUnsafe
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "org.jpype.manager.TypeManager.java", line -1, in org.jpype.manager.TypeManager.findClassByName
Exception: Java Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\python_tool\de.py", line 3, in
ij = imagej.init('G:\\Fiji.app')
File "D:\python_tool\.env\lib\site-packages\imagej\__init__.py", line 1200, in init
success = _create_jvm(ij_dir_or_version_or_endpoint, mode, add_legacy)
File "D:\python_tool\.env\lib\site-packages\imagej\__init__.py", line 1424, in _create_jvm
sj.start_jvm()
File "D:\python_tool\.env\lib\site-packages\scyjava\_java.py", line 243, in start_jvm
callback()
File "D:\python_tool\.env\lib\site-packages\imglyb\util.py", line 26, in _java_setup
Helpers = scyjava.jimport("net.imglib2.python.Helpers")
File "D:\python_tool\.env\lib\site-packages\scyjava\_java.py", line 405, in jimport
return jpype.JClass(class_name)
File "D:\python_tool\.env\lib\site-packages\jpype\_jclass.py", line 99, in __new__
return _jpype._getClass(jc)
java.lang.java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: net/imglib2/img/basictypelongaccess/unsafe/owning/OwningFloatUnsafe
```
So I don't have the ideal to fix it
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the example using imagej.init('G:\\Fiji.app'), then inspect imagej/__init__.py around init and _create_jvm, along with the scyjava and imglyb startup frames named in the traceback. Determine why the net.imglib2 class is unavailable; done means the example starts without the reported NoClassDefFoundError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100