>  I don't understand what "the web app can't access the component" means in 
>technical terms, nor "It can see the 
>  RuntimeService" nor "when I try to get the actual component". 
 
In my web app I call a servlet.  This servlet in turn instantiates a simple 
class.  That class initially does this to verify I have access to the 
NXRuntime.  


    RuntimeService rs = NXRuntime.getRuntime();

This part seems to work just fine.  But when I use a nearly verbatim example 
from the documentation for getting an instance of a custom component.

    
adm = (Adm) 
NXRuntime.getRuntime().getComponent("com.anystream.velocity.adm.Adm");
 
I want to execute a simple method within that component after I actually get it 
instantiated from the other jar file.  The NXRuntime is evidently not seeing my 
other components/extensions despite having been registered....or  I have the 
war configured incorrectly for a web app to use the component.

"com.anystream.velocity.adm.Adm");
 
I want to execute a simple method within that component after I actually get it 
instantiated from the other jar file.  The NXRuntime is evidently not seeing my 
other components/extensions despite having been registered....or  I have the 
war configured incorrectly for a web app to use the component.

The actual errors returned are:

23:00:27,250 INFO  [STDOUT] WAR: GetResource - getXsltResources - Error 
gettingADM component.  (Custom error message so I could identify the offending 
part of the call)
23:00:27,250 ERROR [STDERR] java.lang.NullPointerException
23:00:27,250 ERROR [STDERR]     at 
com.anystream.velocity.test.GetResource.getXsltResources(GetResource.java:22)
23:00:27,250 ERROR [STDERR]     at 
com.anystream.velocity.servlet.TestServlet.doGet(TestServlet.java:19)
23:00:27,250 ERROR [STDERR]     at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
23:00:27,250 ERROR [STDERR]     at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
23:00:27,250 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
23:00:27,250 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
23:00:27,250 ERROR [STDERR]     at 
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
23:00:27,250 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
23:00:27,250 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
23:00:27,250 ERROR [STDERR]     at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
23:00:27,250 ERROR [STDERR]     at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
23:00:27,250 ERROR [STDERR]     at 
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
23:00:27,250 ERROR [STDERR]     at 
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
23:00:27,250 ERROR [STDERR]     at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
23:00:27,250 ERROR [STDERR]     at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
23:00:27,250 ERROR [STDERR]     at 
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
23:00:27,250 ERROR [STDERR]     at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
23:00:27,250 ERROR [STDERR]     at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
23:00:27,250 ERROR [STDERR]     at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
23:00:27,250 ERROR [STDERR]     at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
23:00:27,250 ERROR [STDERR]     at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
23:00:27,250 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:595)

It now fails.  So the problem is actually getting that component 
instance....not access to the NXRuntime.  

Previously I had seen a message that the war was registered / resolved:

22:59:59,828 INFO  [OSGiAdapter] Installing OSGi bundle: 
file:/C:/jboss/server/default/tmp/deploy/tmp31801SimpleEar.ear-contents/SimpleWar.war
22:59:59,828 INFO  [BundleRegistry] Registering resolved bundle: 
com.anystream.velocity.test.war

But I never get a message like "COMPONENT_REGISTERED" for the war.  (Despite 
receiving that for an extension inside of the war for the same custom 
component.)  I am modeling the ability to add plugins into an app to expose 
xslt & scripting files as needed for customizations on a client by client basis.

>  Please provide at least the error messages you get, or the code that doesn't 
>do what you expect it to do. 
>  Also please explain where you organize all the various files in the deployed 
>JBoss, with some directory listing for instance. 

Ear
  ---META-INF
          --- MANIFEST.MF
          --- application.xml
  ---AdmComponent.jar
  ---AdmExtension.jar
  ---NXRuntime.sar
  ---MXRuntimeJBossDemo.sar
  ---SimpleWar.war
          ---META-INF
                 ---Manifest.mf
          ---OSGI-INF
                 ---adm_extension.xml
          ---WEB-INF
                 ---web.xml
                 ---lib
                         ---osgi.core
                         ---NXRuntime1.0.0.jar
                         ---NXRuntime.jar              (Which version is 
applicable here????)
                         ---log4j.jar
                         ---junit.jar
                         ---jmock1.0.1.jar
                         ---jboss-4.0.4.GA.jar
                         ---jboss.jar
                         ---commons-logging.jar
                         ---commons-jexl-1.1.jar
                 ---classes
                         ---com/anystream/velocity/servlet
                                  ---TestServlet.class
                         ---com/anystream/velocity/test
                                  ---GetResource.class

  
I hope this helps.  I'm definately a rat running in circles at this point.  
(Maybe it's the lack of sleep....dunno.)

Thanks!

Steve



________________________________________________________________________
AOL now offers free email to everyone.  Find out more about what's free from 
AOL at AOL.com.
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to