Your building a JSP/Servlet application, right? I'm afraid I've been stuck
in my own world thinking about swing clients.

It _should_ work (spec says) to put your new jar into the 'WEB-INF/lib'
directory in your .war file. Web containers are supposed to put anything
in there into the classpath for the web application module.

On Thu, 15 Mar 2001, Simphoukham, Southin wrote:

> Danch,
> 
> I have created the app-client.jar.  Within it are two class files, the home
> and remote interfaces.  There is no xml associated to this jar.  The
> app-client.jar I added to the ear file.  Do I need to modify anything like
> the application.xml file?
> 
> Thanks,
> 
> Southin
> 
> -----Original Message-----
> From: Dan Christopherson [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 14, 2001 12:59 PM
> To: JBoss-User
> Subject: RE: [jBoss-User] Deployment & Jndi
> 
> 
> On Wed, 14 Mar 2001, Simphoukham, Southin wrote:
> 
> > Dan,
> > 
> > A newbie question here.  All my ejb classes are in my jar file, that is in
> > the ear file sitting in the deployment directory.  Should I add the jar
> file
> > in my classpath too, ie.  c:\jboss\deploy\app.ear ?
> You can, that would be the quick and dirty way to test things. What I
> generally do for deployment is package up a 'app-client.jar' that contains
> only the interfaces (including exceptions and any 'Data Holder' classes
> that the client might need) This is easier to do if your application has
> interfaces in packages separate from the implementation classes. Then it's
> a simple matter to make an ant build.xml that will do what's needed.
> 
> 
> > 
> > Thanks,
> > 
> > Southin
> > 
> > -----Original Message-----
> > From: Dan Christopherson [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, March 14, 2001 12:18 PM
> > To: JBoss-User
> > Subject: Re: [jBoss-User] Deployment & Jndi
> > 
> > 
> > Your client also needs your bean's interface classes in its classpath. 
> > 
> > On Wed, 14 Mar 2001, Simphoukham, Southin wrote:
> > 
> > > Hi,
> > > 
> > > Does anyone know how to solve this error?  I have practically every jar
> > from
> > > c:\jboss\client in my classpath and still it doesn't work. 
> > > 
> > > [Auto deploy] Pop org.apache.struts.action.ActionMapping
> > > [Container factory]
> > Deploying:file:/C:/jboss/tmp/deploy/Default/Power20.ear
> > > [Verifier] Verifying
> > > file:/C:/jboss/tmp/deploy/Default/Power20.ear/ejb1001.jar
> > > [Container factory] Deploying JDBCSource
> > > [Container factory] Deployed application:
> > > file:/C:/jboss/tmp/deploy/Default/Powe
> > > r20.ear
> > > [J2EE Deployer Default] J2EE application:
> > file:/C:/jboss/deploy/Power20.ear
> > > is d
> > > eployed.
> > > [Auto deploy] Started
> > > [Service Control] Started 27 services
> > > [Default] JBoss 2.1-BETA Started in 0m:13s
> > > [EmbeddedTomcat] Username is test
> > > [EmbeddedTomcat] JDBCSessionMgr:getInstance()
> > > [EmbeddedTomcat] Createing Session Mgr
> > > [EmbeddedTomcat] JDBCSessionMgr.getTheSessionBean()
> > > [EmbeddedTomcat] JDBCSessionMgrCREATING SESSION BEAN
> > > [EmbeddedTomcat] ----> Initial
> Context=javax.naming.InitialContext@22c9df
> > > [EmbeddedTomcat] JDBCSessionMgr.getTheSessionBean() failed.  Exception:
> > > javax.na
> > > ming.CommunicationException [Root exception is
> > > java.lang.ClassNotFoundException:
> > >  com.power20.ejb.sessionbeans.JDBCSourceHome]
> > > [EmbeddedTomcat] javax.naming.CommunicationException [Root exception is
> > > java.lan
> > > g.ClassNotFoundException: com.power20.ejb.sessionbeans.JDBCSourceHome]
> > > [EmbeddedTomcat] java.lang.NullPointerException
> > > 
> > > Which is basically the same as mentioned below (at
> > > http://www.jboss.org/documentation/HTML/ch01s12.html )
> > > 
> > > Compiling and running test client
> > > We're now ready to run the test client, but first a word of explanation.
> > > 
> > > In reality the client and the server are likely to be on different
> > > computers. When you compile the client, the compiler needs to know about
> > the
> > > organization and methods of classes in the Bean so it can do type
> > checking.
> > > When you run the client, the run-time engine needs to know about the
> Bean
> > > classes, because type-casting is done at run-time. So when the client
> > > attempts to cast the remote reference to a reference to an object of
> class
> > > InterestHome for example, it needs to know about this class. This means
> > that
> > > you will need the Bean class files on both the client and the server
> even
> > > though they execute on the server. This is fairly obvious if you think
> > about
> > > the logic, but it causes all sorts of problems for people who are new to
> > RMI
> > > programming. If the client can't find the Bean classes, you will get
> error
> > > messages like this:
> > > 
> > > 
> > > javax.naming.CommunicationException [Root exception is 
> > > java.lang.ClassNotFoundException:
> com.web_tomorrow.interest.InterestHome]
> > > 
> > > A 'communication exception' is the exception that represents any error
> > that
> > > can't readily be ascribed to a definite cause. If you get this message
> you
> > > need to pay attention to the CLASSPATH on the client. NOTE that the
> server
> > > doesn't need to have the classpath set, you just need to put it in the
> > > deploy directory and the server will generate a ClassLoader for it.
> > > 
> > > Thanks,
> > > 
> > > Southin
> > > 
> > > 
> > > 
> > > 
> > > --
> > > --------------------------------------------------------------
> > > To subscribe:        [EMAIL PROTECTED]
> > > To unsubscribe:      [EMAIL PROTECTED]
> > > 
> > 
> > 
> 
> 

-- 
Dan Christopherson (danch) 
nVisia Technical Architect (www.nvisia.com)

Opinions expressed are mine and do not neccessarily reflect any 
position or opinion of nVISIA.

---------------------------------------------------------------------------
If you're a capitalist and you have the best goods and they're 
free, you don't have to proselytize, you just have to wait.
-Eben Moglen



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]

Reply via email to