[2.5.4] OSGI override help.

27 views
Skip to first unread message

Nathan Keiter

unread,
Feb 19, 2016, 11:03:12 AM2/19/16
to dot...@googlegroups.com

Any thoughts on what could be wrong?  There is only the Activator and the overridden class.  All original method signatures remain intact, just added some code.

 

I know in the past I’ve found that certain core classes just refuse to be overridden via OSGI and only work as static plugins.  I was hoping I could keep this OSGI.

 

BTW:  Miami in October sounds great!

 

INFO   | jvm 1    | 2016/02/19 10:57:52 | org.osgi.framework.BundleException: Unresolved constraint in bundle Override of com.dotmarketing.util.Mailer [50]: Unable to resolve 50.0: missing requirement [50.0] osgi.wiring.package; (&(osgi.wiring.package=javax.mail)(version>=0.0.0))

 

Nathan

 

Nathan I. Keiter

Lead Network Applications Programmer

Administrative Advisory Council Member

DataSystems

Gettysburg College

Campus Box 2453

717-337-6993

 

Measure your success by the level of service you provide.

Si hoc legere scis nimium eruditionis habes.

 

Maarten Daalder

unread,
Feb 19, 2016, 11:33:41 AM2/19/16
to dotCMS User Group
Hi Nathan,

I'd try to add the javax.mail to the Exported Packages of dotCMS, by default not all standard JEE packages (or even Java SE packages) are included.

With kind regards,
Maarten Daalder
ISAAC

Nathan Keiter

unread,
Feb 19, 2016, 11:58:16 AM2/19/16
to dot...@googlegroups.com

Thanks Maarten,

 

Yes, I did that, and it got further down the pipe.  The activator doesn’t seem to be in the proper context now, as it can’t find the Logger class.  I did notice that I added some methods.  The original source was from 2002 and needed some work…  Seeing adding methods may not be supported, so I may have to go static on this one, as there’s a lot of pressure to enhance our mailing capabilities.

 

INFO   | jvm 1    | 2016/02/19 11:53:06 | ERROR: Bundle Override of com.dotmarketing.util.Mailer [49] Error starting/stopping bundle. (org.osgi.framework.BundleException: Activator start error in bundle Override of com.dotmarketing.util.Mailer [49].)

INFO   | jvm 1    | 2016/02/19 11:53:06 | java.lang.NoClassDefFoundError: com/dotmarketing/util/Logger

INFO   | jvm 1    | 2016/02/19 11:53:06 |        at edu.gettysburg.nkeiter.override.com.dotmarketing.util.osgi.Activator.start(Activator.java:16)

INFO   | jvm 1    | 2016/02/19 11:53:06 |        at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645)

INFO   | jvm 1    | 2016/02/19 11:53:06 |        at org.apache.felix.framework.Felix.activateBundle(Felix.java:2146)

INFO   | jvm 1    | 2016/02/19 11:53:06 |        at org.apache.felix.framework.Felix.startBundle(Felix.java:2064)

INFO   | jvm 1    | 2016/02/19 11:53:06 |        at org.apache.felix.framework.Felix.setBundleStartLevel(Felix.java:1483)

INFO   | jvm 1    | 2016/02/19 11:53:06 |        at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:334)

INFO   | jvm 1    | 2016/02/19 11:53:06 |        at java.lang.Thread.run(Thread.java:744)

 

Nathan

 

Nathan I. Keiter

Lead Network Applications Programmer

Administrative Advisory Council Member

DataSystems

Gettysburg College

Campus Box 2453

717-337-6993

 

Measure your success by the level of service you provide.

Si hoc legere scis nimium eruditionis habes.

 

--
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
Visit this group at https://groups.google.com/group/dotcms.
For more options, visit https://groups.google.com/d/optout.

Maarten Daalder

unread,
Feb 22, 2016, 3:42:49 AM2/22/16
to dotCMS User Group
And you have com.dotmarketing.util as an imported package? Weird.

Nathan Keiter

unread,
Feb 22, 2016, 8:47:56 AM2/22/16
to dot...@googlegroups.com

Yeah.  I just gave up and made it a static plugin for now.

Reply all
Reply to author
Forward
0 new messages