PengZheng commented on issue #643:
URL: https://github.com/apache/celix/issues/643#issuecomment-1730681588

   > Is it normal for it to extract to .cache/bundle1/resources?
   
   Yes, it is normal. My directory structure after a successful run:
   
   ```Bash
   build/Release/deploy/TestCelixContainer/
   ├── bundles
   │   ├── celix_http_admin.zip
   │   ├── celix_ShellCxx.zip
   │   ├── celix_shell_tui.zip
   │   └── celix_shell_wui.zip
   ├── .cache
   │   ├── bundle1
   │   │   ├── bundle_state.properties
   │   │   ├── resources
   │   │   │   ├── libhttp_admin.so.0
   │   │   │   └── META-INF
   │   │   │       └── MANIFEST.MF
   │   │   └── storage
   │   │       └── root
   │   ├── bundle2
   │   │   ├── bundle_state.properties
   │   │   ├── resources
   │   │   │   ├── libShellCxx.so.2
   │   │   │   └── META-INF
   │   │   │       └── MANIFEST.MF
   │   │   └── storage
   │   ├── bundle3
   │   │   ├── bundle_state.properties
   │   │   ├── resources
   │   │   │   ├── libshell_tui.so.1
   │   │   │   └── META-INF
   │   │   │       └── MANIFEST.MF
   │   │   └── storage
   │   └── bundle4
   │       ├── bundle_state.properties
   │       ├── resources
   │       │   ├── libshell_wui.so.1
   │       │   ├── META-INF
   │       │   │   └── MANIFEST.MF
   │       │   └── resources
   │       │       ├── ansi_up.js
   │       │       ├── index.html
   │       │       └── script.js
   │       └── storage
   └── TestCelixContainer
   
   20 directories, 20 files
   
   ```
   
   The `main` of TestCelixContainer is 
   
   ```C++
   #include <celix_launcher.h>
   int main(int argc, char *argv[]) {
       const char * config = "\
   CELIX_CONTAINER_NAME=TestCelixContainer\n\
   CELIX_BUNDLES_PATH=bundles\n\
   \
   \
   \
   CELIX_AUTO_START_3=celix_http_admin.zip celix_ShellCxx.zip 
celix_shell_tui.zip celix_shell_wui.zip\n\
   \
   \
   \
   \
   ";
   
       celix_properties_t *embeddedProps = 
celix_properties_loadFromString(config);
       return celixLauncher_launchAndWaitForShutdown(argc, argv, embeddedProps);
   }
   ```
   From the following message, the bundle path is resolved correctly, but "no 
such file or directory" is reported.
   
   ```
   "[2023-09-17T16:46:56] [  error] [celix_framework] 
[celix_framework_utils_extractBundlePath:217] No such file or directory(0x2): 
"Could not extract bundle zip file `bundles/celix_ShellCxx.zip` to 
`.cache/bundle1/resources`";
    Cause: No such file or directory"
   ```
   
   Since the issue is not reproducible on my machine, I suggest:
   
   1. Add the following to both TestCelix and Celix:
   
   ```CMake
   set(CMAKE_C_FLAGS "-g ${CMAKE_C_FLAGS}")
   set(CMAKE_CXX_FLAGS "-g ${CMAKE_CXX_FLAGS}")
   ```
   
   2. Re-create Celix package in your local Conan cache (remember to remove it 
first).
   3. Fire the debugger in the IDE, break at 
`celix_framework_utils_extractBundlePath`, and find out why.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to