The Artima Developer Community
Sponsored Link

Jini Forum
Problems running JINI and TOMCAT

4 replies on 1 page. Most recent reply: Feb 11, 2005 11:02 AM by Brian Pontarelli

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 4 replies on 1 page
Mathieu Lemay

Posts: 1
Nickname: inocult
Registered: May, 2003

Problems running JINI and TOMCAT Posted: May 22, 2003 6:47 AM
Reply to this message Reply
Advertisement
I have a service and It runs fine without tomcat but when I try to include it in TOMCAT I can gets services but the Object in ServiceItem.service is always null?? any idea on what's the problem? Here is the parameters I pass to start Tomcat
java -Djava.rmi.server.codebase="http://skywalker.vpcs.crc.ca:8080/"-Djava.security. manager -Djava.security.policy=C:\jini1_2\policy\policy.all -classpath "C:\jini1_2\lib\jini-core.jar";"C:\jini1_2\lib\jini-ext";"C:\jini1_2\lib\sun-ut il.jar";{tomcat_filesystems} {catalina_home} {catalina_base} {classname} {arguments}
HELP!! :)
Mat


Jacky

Posts: 1
Nickname: jackywmk
Registered: Feb, 2004

Re: Problems running JINI and TOMCAT Posted: Feb 4, 2004 3:13 AM
Reply to this message Reply
I also have the problem as same as you . I can find service without TOMCAT correctly , however , I can't find any services ( services.length = 0) with TOMCAT . Do you find the answer now? Thanks in advance

clbrooks

Posts: 1
Nickname: clbrooks
Registered: Feb, 2003

Re: Problems running JINI and TOMCAT Posted: Apr 22, 2004 5:57 AM
Reply to this message Reply
I'm confused. Tomcat is a J2EE Web container, aimed at providing an environment to run JSPs and Java Servlets. As far as I can tell, the main use of Tomcat would be to provide
access to the appropriate .jar files (xxx-dl.jar, your
services -dl.jar file) by accessing them from a known URL
(e.g. http://hostname:8080/jini-libs). (Tomcat listens to 8080 by default). This is in place of running the light-weight HTTP server that is provided as part of the Jini package.

Note too that you'll have to configure Tomcat to return the appropriate mime-type for the .jar file.

Gregg Wonderly

Posts: 317
Nickname: greggwon
Registered: Apr, 2003

Re: Problems running JINI and TOMCAT Posted: Sep 28, 2004 12:54 PM
Reply to this message Reply
As you have likely found out, the problem is that Tomcat messes with classloaders and codebases and the end result is that the exported Jini service has no available codebase in the marshalled service object that you get. The end result is that your client can't download and instantiate one or more of the classes that are part of the service definition and thus the service member of the ServiceItem class is null.

The jini-users@java.sun.com mailing list has a great deal of historical documentation on this and many other issues. Search there for answers if you are not getting replies here.

Gregg

Brian Pontarelli

Posts: 5
Nickname: brokenwren
Registered: Oct, 2004

Re: Problems running JINI and TOMCAT Posted: Feb 11, 2005 11:02 AM
Reply to this message Reply
This is interesting because I've been able to get services published out of WebLogic without too much trouble. I wonder what Tomcat is doing to the codebase server to cause these types of issues. My WebLogic startup script looks like this:

${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} ${JAVA_OPTIONS} -Dweblogic.Name=${SERVER_NAME} -Dweblogic.ProductionModeEnabled=${PRODUCTION_MODE} -Djava.security.policy="policy.all" -Djava.rmi.server.codebase="http://myserver:8080/mycodebase/" -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=80000 weblogic.Server

Besides that I just have the jini JARs in my classpath and I can publish out my services from a WebLogic web application. Do you think it is the Tomcat RMI server implementation? Are there any documents on that thing?

Flat View: This topic has 4 replies on 1 page
Topic: Lookup Service Previous Topic   Next Topic Topic: ideas n help needed for jini project

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use