Is ModuleInstall still exsting?

View: New views
6 Messages — Rating Filter:   Alert me  

Is ModuleInstall still exsting?

by Michael Holste :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I just wanted to run my application with a link in some new module now and I receive this error:
cannot access org.openide.modules.ModuleInstall   class file for org.openide.modules.ModuleInstall not found
Well, of course the new module has a link to ModulInstall and with this to the Module System API, this dependency is declared and this API is also shown in the 'Libraries' folder of the module. Further, NB doesn't show an error in the code view and I think this should mean, that NB finds and sees the API and the class, too. So, what's going on there if I start the application? Why is this class not found? Is there anything that I may have forgotten or that should have been done additionally?
Regs, Michael

Re: Is ModuleInstall still exsting?

by Geertjan Wielenga :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Michael Holste wrote:

> I just wanted to run my application with a link in some new module now and I
> receive this error:
> cannot access org.openide.modules.ModuleInstall   class file for
> org.openide.modules.ModuleInstall not found
> Well, of course the new module has a link to ModulInstall and with this to
> the Module System API, this dependency is declared and this API is also
> shown in the 'Libraries' folder of the module. Further, NB doesn't show an
> error in the code view and I think this should mean, that NB finds and sees
> the API and the class, too. So, what's going on there if I start the
> application? Why is this class not found? Is there anything that I may have
> forgotten or that should have been done additionally?
> Regs, Michael
>  
You have a reference to a ModuleInstall class in your manifest file. But
that ModuleInstall class doesn't exist. Look in your manifest file.

Gj

Re: Is ModuleInstall still exsting?

by Michael Holste :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Well, thanks at first for your quick answer! I think, the manifest file is not really the point. I had a look into it and of course, there is a reference to the ModuleInstall class, but it exists! I double-checked this in the physical filesystem, too and I find it. Maybe I have to reference this file in just another way? My manifest looka like this at moment:

Manifest-Version: 1.0
OpenIDE-Module: org.mho.db.derby
OpenIDE-Module-Public-Packages: org.mho.db.derby.*
OpenIDE-Module-Install: org/mho/db/derby/DatabaseManager.class
OpenIDE-Module-Localizing-Bundle: org/mho/db/derby/Bundle.properties
OpenIDE-Module-Specification-Version: 1.0

In my eyes, this should generally be ok?!
Michael

Geertjan Wielenga wrote:
Michael Holste wrote:
> I just wanted to run my application with a link in some new module now and I
> receive this error:
> cannot access org.openide.modules.ModuleInstall   class file for
> org.openide.modules.ModuleInstall not found
> Well, of course the new module has a link to ModulInstall and with this to
> the Module System API, this dependency is declared and this API is also
> shown in the 'Libraries' folder of the module. Further, NB doesn't show an
> error in the code view and I think this should mean, that NB finds and sees
> the API and the class, too. So, what's going on there if I start the
> application? Why is this class not found? Is there anything that I may have
> forgotten or that should have been done additionally?
> Regs, Michael
>  
You have a reference to a ModuleInstall class in your manifest file. But
that ModuleInstall class doesn't exist. Look in your manifest file.

Gj

Re: Is ModuleInstall still exsting?

by Tim Boudreau :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Michael Holste wrote:
Well, thanks at first for your quick answer! I think, the manifest file is not really the point. I had a look into it and of course, there is a reference to the ModuleInstall class, but it exists! I double-checked this in the physical filesystem, too and I find it. Maybe I have to reference this file in just another way? My manifest looka like this at moment:

OpenIDE-Module-Install: org/mho/db/derby/DatabaseManager.class
Does DatabaseManager really extend ModuleInstall?

If so, probably the next step is to build an NBM of your module.  Then in the Files tab, expand it and take a look at its contents and make sure there really is a org/mho/db/derby/DatabaseManager.class file in the JAR file (under modules/ - NBM is a jar within a jar), and that it really has *exactly* the same path as in the manifest, including matching character case.

-Tim

Re: Is ModuleInstall still exsting?

by Michael Holste :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Tim Boudreau wrote:
Does DatabaseManager really extend ModuleInstall?

If so, probably the next step is to build an NBM of your module.  Then in the Files tab, expand it and take a look at its contents and make sure there really is a org/mho/db/derby/DatabaseManager.class file in the JAR file (under modules/ - NBM is a jar within a jar), and that it really has *exactly* the same path as in the manifest, including matching character case.

-Tim
Thank you for that hint! I did exactly what you wrote and the results don't look good for me: Yes, DatabaseManger extends ModuleInstall and after I checked that, I built the NBM and checked the contents. It really has the same path as in the manifest and it is also case-sensitively ok. I wonder if there may be a thing that may be overlooked or anything else? If not, for me the only way to continue is to place the funtionality of that module in another module...
Michael

Re: Is ModuleInstall still exsting?

by Tim Boudreau :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Michael Holste wrote:
Tim Boudreau wrote:
Does DatabaseManager really extend ModuleInstall?

If so, probably the next step is to build an NBM of your module.  Then in the Files tab, expand it and take
Thank you for that hint! I did exactly what you wrote and the results don't look good for me: Yes, DatabaseManger extends ModuleInstall and after I checked that, I built the NBM and checked the contents. It really has the same path as in the manifest and it is also case-sensitively ok.
That all sounds like it is correct.  One other thing:  Is your module marked to be "autoload" (check the API Versioning tab in the project properties)?  If so, then your module might never be enabled unless another module is loaded that depends on it.  Make sure it is set to "Regular".

If all else fails, I'd suggest you copy the module somewhere else, delete all code except the ModuleInstall, and add some logging to that and try to diagnose (also look at the startup log when you run it).

-Tim