Search the web
Sign In
New User? Sign Up
weblogic-workbook · WebLogic Workbook for EJB 3rd Edition
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 1 - 30 of 647   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#30 From: Greg Nyberg <nyberg@...>
Date: Mon Dec 10, 2001 6:10 pm
Subject: Re: Using ejbgen to create deployment descriptors
nyberg
Offline Offline
Send Email Send Email
 
A tool you might want to look at is "ejbgen", available at:

www.beust.com/ejbgen

It is a pre-processor which creates all of the non-bean files for your EJB
including the remotes/locals, homes, and all three XML descriptors.  You write
a single "<xxx>Bean.java" file for each EJB and include javadoc comments
telling ejbgen what it needs to know to do its magic.

There is an active yahoo group for it (ejbgen).  I'm using the tool on a fairly
large (150+ CMP 2.0 Entity beans) project right now and it has performed very
well to date.

I uploaded to the weblogic-workbook group site in yahoo the file "gentry.jar"
which contains the ex07_1 example built using ejbgen.  Compare the number of
files, etc, with the regular ex07_1 example and you'll see why it's a very good
tool.  You'll need to download the ejbgen tool from Cedric's site and adjust
the build.xml file accordingly to match where you put it, but you should be
able to "ant ejbgen" and "ant dist" and build the exercise files.

Have fun.
-Greg

--- d10n2002@... wrote:
> Hello,
>
> It's not really related to the workbook, but I was wondering for a
> long time how do I create ejb-jar.xml, weblogic-cmp-rdbms-jar.xml &
> weblogic-ejb-jar.xml?
>
> Is there any tools from BEA for handling these documents, tools that
> is able to look in the Bean files, like in J2EE deployment tools?
> Or should I manually type those xml files? I've just downloaded
> XMLEditor from BEA but after I try it a while, I find it it's just a
> plain XML editor.
>
> Thank you very much in advance.
>
> --
> Best regards,
> dion
> mailto:d10n2002@...
>
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>
> To unsubscribe from this group, send an email to:
> weblogic-workbook-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

#29 From: "bartleycpb" <bartleycpb@...>
Date: Mon Dec 10, 2001 5:35 pm
Subject: Note on Client_54
bartleycpb
Offline Offline
Send Email Send Email
 
Just a minor FYI tip...

I noticed that the testReferences() method never prints out
the "Names match!" message.

I found that this is because the DB (i'm
using CloudView) pads the name with trailing spaces so it is returned
as "Keel Korner                   ".  Comparing that with "Keel
Korner" fails, thus the "Names match!" message is never printed.

chris

#28 From: "p_alexander_harvey" <p_alexander_harvey@...>
Date: Mon Dec 10, 2001 4:46 pm
Subject: Re: how to create deployment descriptor from scratch?
p_alexander_...
Offline Offline
Send Email Send Email
 
I believe many of the higher end Java IDE's can do what you are
looking for. I'm learning how to use TogetherSoft's ControlCenter and
it can create the deployment descriptor, etc.

WebLogic recommends using WebGain and you can download a trail copy
from BEA's website.

-Alex
--- In weblogic-workbook@y..., d10n2002@y... wrote:
> Hello,
>
> It's not really related to the workbook, but I was wondering for a
> long time how do I create ejb-jar.xml, weblogic-cmp-rdbms-jar.xml &
> weblogic-ejb-jar.xml?
>
> Is there any tools from BEA for handling these documents, tools that
> is able to look in the Bean files, like in J2EE deployment tools?
> Or should I manually type those xml files? I've just downloaded
> XMLEditor from BEA but after I try it a while, I find it it's just a
> plain XML editor.
>
> Thank you very much in advance.
>
> --
> Best regards,
> dion
> mailto:d10n2002@y...
>
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com

#27 From: "boymcgruff" <boymcgruff@...>
Date: Sun Dec 9, 2001 7:13 pm
Subject: Book Reviews
boymcgruff
Offline Offline
Send Email Send Email
 
Was curious if your book has been reviewed in any of the Java
magazines such as Java Developers Journal?

Has it been endorsed by any industry recognized names such as Bill
Joy, Scott Ambler, Joshua Bloch, Doctor Java (JDJ) or others?

#26 From: d10n2002@...
Date: Sat Dec 8, 2001 1:22 pm
Subject: how to create deployment descriptor from scratch?
d10n2002
Offline Offline
Send Email Send Email
 
Hello,

It's not really related to the workbook, but I was wondering for a
long time how do I create ejb-jar.xml, weblogic-cmp-rdbms-jar.xml &
weblogic-ejb-jar.xml?

Is there any tools from BEA for handling these documents, tools that
is able to look in the Bean files, like in J2EE deployment tools?
Or should I manually type those xml files? I've just downloaded
XMLEditor from BEA but after I try it a while, I find it it's just a
plain XML editor.

Thank you very much in advance.

--
Best regards,
dion
mailto:d10n2002@...



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

#25 From: Greg Nyberg <nyberg@...>
Date: Fri Dec 7, 2001 10:24 pm
Subject: RE: Question On Client_41 & SQL Server
nyberg
Offline Offline
Send Email Send Email
 
Make sure you use a TX datasource, not a regular datasource.  That's what I
used in my testing.

In the book I used a regular datasource, but have since come to learn that this
is never a good idea with EJBs.  It autocommits creates(), for example, despite
the JTA transaction not being committed yet.

Try it with a TXDataSource of the same name mapped to the same pool...

-Greg

--- Matt Koidin <mkoidin@...> wrote:
> Greg, et. al. --
>
> I'm not sure if this solution is working entirely properly. I am
> getting weird results back from the getId() within the transaction. I
> ran the client a bunch of times in a row...
>
> Here are my results:
>
> Run #1: Cabin ID=0
> Database inserted record with ID #1
> I got an error when I tried to findBy (can't findBy with 0 primary key)
>
> Run #2: Cabin ID=1
> Database inserted record with ID #2
> Record #1 is updated by findBy
>
> Run #3: Cabin ID=2
> Database inserted record with ID #3
> Record #2 is updated by findBy
>
> ...
> ...
>
> Basically it looks like the getId() call inside of the transaction does
> not necessarily return the NEWEST id. It usually returns the last id,
> but a few times it even returned the one before that.
>
> NOTE: the code I used matches the code you sent, except I needed to add
> some more exception catches to get it to compile.
>
> Any thoughts?
>
> -Matt
>
>
>
> --- Greg Nyberg <greg.nyberg@...> wrote:
> > Interesting behavior I found with this..
> >
> > Turns out you must have an explicit transaction around the create()
> > method
> > and a quick getId() call to the bean to grab the primary key assigned
> > during
> > the create process.  But, the bean reference itself cannot be used
> > within
> > that transaction or after it to do anything without getting the
> > primary key
> > not found problem.  You have to use findByPrimaryKey() again using
> > the pk
> > you grabbed during the transaction to get a fresh reference.
> > Confusing?
> > Here's an updated version of my Client_41 example code that
> > more-or-less
> > works with the IDENTITY primary-key-generation:
> >
> > package com.titan.clients;
> >
> > import com.titan.cabin.CabinHomeRemote;
> > import com.titan.cabin.CabinRemote;
> >
> > import javax.naming.InitialContext;
> > import javax.naming.Context;
> > import javax.naming.NamingException;
> > import javax.rmi.PortableRemoteObject;
> > import java.rmi.RemoteException;
> > import java.util.Properties;
> > import javax.transaction.*; // new, needed for UserTransaction
> >
> > public class Client_41_identity {
> >     public static void main(String [] args) {
> >         try {
> >             Context jndiContext = getInitialContext();
> >             Object ref = jndiContext.lookup("CabinHomeRemote");
> >             CabinHomeRemote home = (CabinHomeRemote)
> >     PortableRemoteObject.narrow(ref,CabinHomeRemote.class);
> >
> >    UserTransaction tran =
> > (UserTransaction)jndiContext.lookup("java:comp/UserTransaction");
> >
> >    tran.begin();
> >     CabinRemote cabin_1 = home.create(new Integer(0));
> >     System.out.println("Id is: "+cabin_1.getId());
> >     Integer wow = cabin_1.getId();  // this actually returns the
> > identity
> > value assigned by SQL*Server!!
> >     // attempts to use cabin_1 for any sets in here fails..
> >    tran.commit();
> >
> >    try {
> >     cabin_1.setName("Master Suite"); // this fails also
> >    }
> >    catch (Exception e) {
> >     System.out.println("Caught and ignored error: "+e.getMessage());
> >    }
> >
> >             CabinRemote cabin_1x = home.findByPrimaryKey(wow); // get
> > a
> > reference using saved ID, this works
> >             cabin_1x.setName("Master Suite");
> >             cabin_1x.setDeckLevel(1);
> >             cabin_1x.setShipId(1);
> >             cabin_1x.setBedCount(3);
> >
> >             CabinRemote cabin_2 = home.findByPrimaryKey(wow);
> >             System.out.println(cabin_2.getName());
> >             System.out.println(cabin_2.getDeckLevel());
> >             System.out.println(cabin_2.getShipId());
> >             System.out.println(cabin_2.getBedCount());
> >
> >         } catch (java.rmi.RemoteException re){re.printStackTrace();}
> >           catch (javax.naming.NamingException
> > ne){ne.printStackTrace();}
> >           catch (javax.ejb.CreateException ce){ce.printStackTrace();}
> >           catch (javax.ejb.FinderException fe){fe.printStackTrace();}
> >           catch (Exception e){e.printStackTrace();}
> >     }
> >
> >     public static Context getInitialContext()
> >         throws javax.naming.NamingException {
> >
> >         Properties p = new Properties();
> >   p.put(Context.INITIAL_CONTEXT_FACTORY,
> > "weblogic.jndi.WLInitialContextFactory");
> >   p.put(Context.PROVIDER_URL, "t3://localhost:7001");
> >         return new javax.naming.InitialContext(p);
> >     }
> > }
> >
> > Very surprised the "cabin_1" reference fails to work either inside or
> > after
> > the transaction block..  Something fishy going on in the internal pk
> > storage
> > of the bean it seems like.  Probably a WebLogic bug.  We posted this
> > on the
> > BEA newsgroup and may get some feedback from them also.
> >
> > Note that getId() needs to get added to the CabinRemote interface for
> > this
> > to work (not in canned version of example).
> >
> > Hope this helps.
> > -Greg
> >
> >
> > > -----Original Message-----
> > > From: Matt Koidin [mailto:mkoidin@...]
> > > Sent: Friday, December 07, 2001 9:09 AM
> > > To: weblogic-workbook@yahoogroups.com
> > > Subject: [weblogic-workbook] Question On Client_41 & SQL Server
> > >
> > >
> > > Greg and all --
> > >
> > > First, let me thank you for an excellent book and workbook. I
> > really
> > > like the workbook approach. Too often I spend my time trying to
> > figure
> > > out how to apply examples to my particular environment... this
> > approach
> > > really solves the problem.
> > >
> > > I am using Weblogic 6.1 sp1 and SQL Server for my database. I have
> > a
> > > question based off of the Client_41 example.
> > >
> > > I am usng Weblogic's automatic key generation to support having an
> > > IDENTITY as my primary key in the CABIN table.
> > >
> > > I have updated my weblogic-cmp-rdbms-jar.xml file to include the
> > > following specification:
> > >
> > >     <automatic-key-generation>
> > >         <generator-type>SQL_SERVER</generator-type>
> > >     </automatic-key-generation>
> > >
> > > If I change my create method to not pass in an id, I can still
> > > successfully create a new CABIN record using:
> > >
> > > CabinRemote cabin_1 = home.create();
> > >
> > > My question is: How do I figure out what primary key was used to
> > create
> > > the new record??? If I then try to do an update by calling
> > > cabin_1.setName("Master Suite") I get an error that primary key 0
> > was
> > > not found.
> > >
> > > I know this is not directly specified in the workbook, but I was
> > hoping
> > > someone else had come across a similar problem.
> > >
> > > Thanks in advance,
> > > Matt Koidin
> > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Send your FREE holiday greetings online!
> > > http://greetings.yahoo.com
> > >
> > >
> > > To unsubscribe from this group, send an email to:
> > > weblogic-workbook-unsubscribe@yahoogroups.com
> > >
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
> > http://docs.yahoo.com/info/terms/
> > >
> > >
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Send your FREE holiday greetings online!
> http://greetings.yahoo.com
>
> To unsubscribe from this group, send an email to:
> weblogic-workbook-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

#24 From: Matt Koidin <mkoidin@...>
Date: Fri Dec 7, 2001 10:07 pm
Subject: RE: Question On Client_41 & SQL Server
mkoidin
Offline Offline
Send Email Send Email
 
Greg, et. al. --

I'm not sure if this solution is working entirely properly. I am
getting weird results back from the getId() within the transaction. I
ran the client a bunch of times in a row...

Here are my results:

Run #1: Cabin ID=0
Database inserted record with ID #1
I got an error when I tried to findBy (can't findBy with 0 primary key)

Run #2: Cabin ID=1
Database inserted record with ID #2
Record #1 is updated by findBy

Run #3: Cabin ID=2
Database inserted record with ID #3
Record #2 is updated by findBy

...
...

Basically it looks like the getId() call inside of the transaction does
not necessarily return the NEWEST id. It usually returns the last id,
but a few times it even returned the one before that.

NOTE: the code I used matches the code you sent, except I needed to add
some more exception catches to get it to compile.

Any thoughts?

-Matt



--- Greg Nyberg <greg.nyberg@...> wrote:
> Interesting behavior I found with this..
>
> Turns out you must have an explicit transaction around the create()
> method
> and a quick getId() call to the bean to grab the primary key assigned
> during
> the create process.  But, the bean reference itself cannot be used
> within
> that transaction or after it to do anything without getting the
> primary key
> not found problem.  You have to use findByPrimaryKey() again using
> the pk
> you grabbed during the transaction to get a fresh reference.
> Confusing?
> Here's an updated version of my Client_41 example code that
> more-or-less
> works with the IDENTITY primary-key-generation:
>
> package com.titan.clients;
>
> import com.titan.cabin.CabinHomeRemote;
> import com.titan.cabin.CabinRemote;
>
> import javax.naming.InitialContext;
> import javax.naming.Context;
> import javax.naming.NamingException;
> import javax.rmi.PortableRemoteObject;
> import java.rmi.RemoteException;
> import java.util.Properties;
> import javax.transaction.*; // new, needed for UserTransaction
>
> public class Client_41_identity {
>     public static void main(String [] args) {
>         try {
>             Context jndiContext = getInitialContext();
>             Object ref = jndiContext.lookup("CabinHomeRemote");
>             CabinHomeRemote home = (CabinHomeRemote)
>     PortableRemoteObject.narrow(ref,CabinHomeRemote.class);
>
>    UserTransaction tran =
> (UserTransaction)jndiContext.lookup("java:comp/UserTransaction");
>
>    tran.begin();
>     CabinRemote cabin_1 = home.create(new Integer(0));
>     System.out.println("Id is: "+cabin_1.getId());
>     Integer wow = cabin_1.getId();  // this actually returns the
> identity
> value assigned by SQL*Server!!
>     // attempts to use cabin_1 for any sets in here fails..
>    tran.commit();
>
>    try {
>     cabin_1.setName("Master Suite"); // this fails also
>    }
>    catch (Exception e) {
>     System.out.println("Caught and ignored error: "+e.getMessage());
>    }
>
>             CabinRemote cabin_1x = home.findByPrimaryKey(wow); // get
> a
> reference using saved ID, this works
>             cabin_1x.setName("Master Suite");
>             cabin_1x.setDeckLevel(1);
>             cabin_1x.setShipId(1);
>             cabin_1x.setBedCount(3);
>
>             CabinRemote cabin_2 = home.findByPrimaryKey(wow);
>             System.out.println(cabin_2.getName());
>             System.out.println(cabin_2.getDeckLevel());
>             System.out.println(cabin_2.getShipId());
>             System.out.println(cabin_2.getBedCount());
>
>         } catch (java.rmi.RemoteException re){re.printStackTrace();}
>           catch (javax.naming.NamingException
> ne){ne.printStackTrace();}
>           catch (javax.ejb.CreateException ce){ce.printStackTrace();}
>           catch (javax.ejb.FinderException fe){fe.printStackTrace();}
>           catch (Exception e){e.printStackTrace();}
>     }
>
>     public static Context getInitialContext()
>         throws javax.naming.NamingException {
>
>         Properties p = new Properties();
>   p.put(Context.INITIAL_CONTEXT_FACTORY,
> "weblogic.jndi.WLInitialContextFactory");
>   p.put(Context.PROVIDER_URL, "t3://localhost:7001");
>         return new javax.naming.InitialContext(p);
>     }
> }
>
> Very surprised the "cabin_1" reference fails to work either inside or
> after
> the transaction block..  Something fishy going on in the internal pk
> storage
> of the bean it seems like.  Probably a WebLogic bug.  We posted this
> on the
> BEA newsgroup and may get some feedback from them also.
>
> Note that getId() needs to get added to the CabinRemote interface for
> this
> to work (not in canned version of example).
>
> Hope this helps.
> -Greg
>
>
> > -----Original Message-----
> > From: Matt Koidin [mailto:mkoidin@...]
> > Sent: Friday, December 07, 2001 9:09 AM
> > To: weblogic-workbook@yahoogroups.com
> > Subject: [weblogic-workbook] Question On Client_41 & SQL Server
> >
> >
> > Greg and all --
> >
> > First, let me thank you for an excellent book and workbook. I
> really
> > like the workbook approach. Too often I spend my time trying to
> figure
> > out how to apply examples to my particular environment... this
> approach
> > really solves the problem.
> >
> > I am using Weblogic 6.1 sp1 and SQL Server for my database. I have
> a
> > question based off of the Client_41 example.
> >
> > I am usng Weblogic's automatic key generation to support having an
> > IDENTITY as my primary key in the CABIN table.
> >
> > I have updated my weblogic-cmp-rdbms-jar.xml file to include the
> > following specification:
> >
> >     <automatic-key-generation>
> >         <generator-type>SQL_SERVER</generator-type>
> >     </automatic-key-generation>
> >
> > If I change my create method to not pass in an id, I can still
> > successfully create a new CABIN record using:
> >
> > CabinRemote cabin_1 = home.create();
> >
> > My question is: How do I figure out what primary key was used to
> create
> > the new record??? If I then try to do an update by calling
> > cabin_1.setName("Master Suite") I get an error that primary key 0
> was
> > not found.
> >
> > I know this is not directly specified in the workbook, but I was
> hoping
> > someone else had come across a similar problem.
> >
> > Thanks in advance,
> > Matt Koidin
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Send your FREE holiday greetings online!
> > http://greetings.yahoo.com
> >
> >
> > To unsubscribe from this group, send an email to:
> > weblogic-workbook-unsubscribe@yahoogroups.com
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> >
> >
>
>


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

#23 From: "Greg Nyberg" <greg.nyberg@...>
Date: Fri Dec 7, 2001 8:05 pm
Subject: RE: Question On Client_41 & SQL Server
greg.nyberg@...
Send Email Send Email
 
Interesting behavior I found with this..

Turns out you must have an explicit transaction around the create() method
and a quick getId() call to the bean to grab the primary key assigned during
the create process.  But, the bean reference itself cannot be used within
that transaction or after it to do anything without getting the primary key
not found problem.  You have to use findByPrimaryKey() again using the pk
you grabbed during the transaction to get a fresh reference.  Confusing?
Here's an updated version of my Client_41 example code that more-or-less
works with the IDENTITY primary-key-generation:

package com.titan.clients;

import com.titan.cabin.CabinHomeRemote;
import com.titan.cabin.CabinRemote;

import javax.naming.InitialContext;
import javax.naming.Context;
import javax.naming.NamingException;
import javax.rmi.PortableRemoteObject;
import java.rmi.RemoteException;
import java.util.Properties;
import javax.transaction.*; // new, needed for UserTransaction

public class Client_41_identity {
     public static void main(String [] args) {
         try {
             Context jndiContext = getInitialContext();
             Object ref = jndiContext.lookup("CabinHomeRemote");
             CabinHomeRemote home = (CabinHomeRemote)
     PortableRemoteObject.narrow(ref,CabinHomeRemote.class);

    UserTransaction tran =
(UserTransaction)jndiContext.lookup("java:comp/UserTransaction");

    tran.begin();
     CabinRemote cabin_1 = home.create(new Integer(0));
     System.out.println("Id is: "+cabin_1.getId());
     Integer wow = cabin_1.getId();  // this actually returns the identity
value assigned by SQL*Server!!
     // attempts to use cabin_1 for any sets in here fails..
    tran.commit();

    try {
     cabin_1.setName("Master Suite"); // this fails also
    }
    catch (Exception e) {
     System.out.println("Caught and ignored error: "+e.getMessage());
    }

             CabinRemote cabin_1x = home.findByPrimaryKey(wow); // get a
reference using saved ID, this works
             cabin_1x.setName("Master Suite");
             cabin_1x.setDeckLevel(1);
             cabin_1x.setShipId(1);
             cabin_1x.setBedCount(3);

             CabinRemote cabin_2 = home.findByPrimaryKey(wow);
             System.out.println(cabin_2.getName());
             System.out.println(cabin_2.getDeckLevel());
             System.out.println(cabin_2.getShipId());
             System.out.println(cabin_2.getBedCount());

         } catch (java.rmi.RemoteException re){re.printStackTrace();}
           catch (javax.naming.NamingException ne){ne.printStackTrace();}
           catch (javax.ejb.CreateException ce){ce.printStackTrace();}
           catch (javax.ejb.FinderException fe){fe.printStackTrace();}
           catch (Exception e){e.printStackTrace();}
     }

     public static Context getInitialContext()
         throws javax.naming.NamingException {

         Properties p = new Properties();
   p.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
   p.put(Context.PROVIDER_URL, "t3://localhost:7001");
         return new javax.naming.InitialContext(p);
     }
}

Very surprised the "cabin_1" reference fails to work either inside or after
the transaction block..  Something fishy going on in the internal pk storage
of the bean it seems like.  Probably a WebLogic bug.  We posted this on the
BEA newsgroup and may get some feedback from them also.

Note that getId() needs to get added to the CabinRemote interface for this
to work (not in canned version of example).

Hope this helps.
-Greg


> -----Original Message-----
> From: Matt Koidin [mailto:mkoidin@...]
> Sent: Friday, December 07, 2001 9:09 AM
> To: weblogic-workbook@yahoogroups.com
> Subject: [weblogic-workbook] Question On Client_41 & SQL Server
>
>
> Greg and all --
>
> First, let me thank you for an excellent book and workbook. I really
> like the workbook approach. Too often I spend my time trying to figure
> out how to apply examples to my particular environment... this approach
> really solves the problem.
>
> I am using Weblogic 6.1 sp1 and SQL Server for my database. I have a
> question based off of the Client_41 example.
>
> I am usng Weblogic's automatic key generation to support having an
> IDENTITY as my primary key in the CABIN table.
>
> I have updated my weblogic-cmp-rdbms-jar.xml file to include the
> following specification:
>
>     <automatic-key-generation>
>         <generator-type>SQL_SERVER</generator-type>
>     </automatic-key-generation>
>
> If I change my create method to not pass in an id, I can still
> successfully create a new CABIN record using:
>
> CabinRemote cabin_1 = home.create();
>
> My question is: How do I figure out what primary key was used to create
> the new record??? If I then try to do an update by calling
> cabin_1.setName("Master Suite") I get an error that primary key 0 was
> not found.
>
> I know this is not directly specified in the workbook, but I was hoping
> someone else had come across a similar problem.
>
> Thanks in advance,
> Matt Koidin
>
>
> __________________________________________________
> Do You Yahoo!?
> Send your FREE holiday greetings online!
> http://greetings.yahoo.com
>
>
> To unsubscribe from this group, send an email to:
> weblogic-workbook-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>

#22 From: Glenlake255@...
Date: Fri Dec 7, 2001 12:05 pm
Subject: Re: unable to run Client_41 was CLASSPATH problem
Glenlake255@...
Send Email Send Email
 
Great thank to you Greg. My problem is getting easier now. I think I will fix it.

Best Regards.

Viktor.

In a message dated 07/12/2001 11:43:12 AM Eastern Standard Time, greg.nyberg@... writes:



The ejb20.jar file is no longer (as of WL 6.1 SP1) required to enable EJB 2.0 functionality in the problem.  Things change fast!

Your problem really, really looks like a CLASSPATH issue.  The message "Cannot load driver class: COM.cloudscape.core.JDBCDriver" is a dead giveaway.

1) Make sure your startWebLogic script for the ejbbook domain includes the following line (assuming NT/Win2K):

set CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;.\samples\eval\cloudscape\lib\cloudscape.jar

2) Make sure that you've set the cloudscape.system.home variable in the java command:

-Dcloudscape.system.home=./samples/eval/cloudscape/data

Both of these are discussed on page 36.

Send me your config.xml and startWebLogic.cmd in private email if you are still having trouble.

-Greg

-----Original Message-----
From: Glenlake255@... [mailto:Glenlake255@...]
Sent: Friday, December 07, 2001 8:11 AM
To: weblogic-workbook@yahoogroups.com
Subject: Re: [weblogic-workbook] unable to run Client_41 was CLASSPATH problem


Hello all,

I have the same problem running the first examples (ex04_01). This is an errors description from the log file:

####<6-Dec-01 6:30:37 EST PM> <Error> <JDBC> <cicero-4lkeb9st> <myserver> <main> <system> <> <001060> <Cannot startup connection pool "titan-pool" Cannot load driver class: COM.cloudscape.core.JDBCDriver>
####<6-Dec-01 6:30:37 EST PM> <Error> <JDBC> <cicero-4lkeb9st> <myserver> <main> <system> <> <001059> <Error during Data Source creation: weblogic.common.ResourceException: DataSource(titan-dataSource) can't be created with non-existent Pool (connection or multi) (titan-pool)>
####<6-Dec-01 6:30:39 EST PM> <Error> <J2EE> <cicero-4lkeb9st> <myserver> <main> <system> <> <160001> <Error deploying application titanejb: Unable to deploy EJB: CabinEJB from titanejb.jar: The DataSource with the JNDI name: titan-dataSource could not be located. Please ensure that the DataSource has been deployed successfully and that the JNDI name in your EJB Deployment descriptor is correct.

The Cloudscape database was created using CloudView. The Cabin table existed, the database  was not running separatelly. The cloudscape.jar was in CLASSPATH in the startWebLogic.cmd script.

I suspect, the errors are because I do not have the ejb20.jar file in the wlserver6.1\lib directory. It is written in the Weblogic workbook "If this file is absent, you will encounter run time errors when you try to deploy EJB 2.0 beans."
But I can not find a way to download the ejb20.jar file from the http://commerse.bea.com/downloads/products.jsp. I go to BEA Weblogic Server Downloads ... J2EE 1.2 Plus J2EE 1.3 Features ... Proceed to Download. At the end, I have a message " You are downloading WebLogic Server 6.1 with Servece Pack1. But there is not ejb20.jar file in weblogic610sp1_win.exe.

Please, tell me how to download the ejb20.jar file.

Thank you.

Viktor.

In a message dated 07/12/2001 1:12:35 AM Eastern Standard Time, nyberg@... writes:


Thanks for your input. 

We resolved his problem in private email and I forgot to post it.  In his case,
the cloudscape.jar was not in his CLASSPATH in the startWebLogic.cmd script
(see page 36).  It's easy to forget.

Because CMP beans will not deploy unless all database prerequisites are met
(datasource exists/targetted, underlying pool exists/targetted, pool
connections valid, bean tables and columns match rdbms XML descriptor, etc.),
it is important to watch the log during boot to determine the root cause of a
"deployment" problem.  In many cases it is database-related..

I'm glad you were able to figure out your CloudView-related problem!
-Greg

--- bartleycpb <bartleycpb@...> wrote:
> I got the exact same error.  I also noticed this error message in the
> log window:
>
>     Unable to deploy EJB: CabinEJB from titanejb.jar:
>
>     The DataSource with the JNDI name: titan-dataSource
>     could not be located. Please ensure that the
>     DataSource has been deployed successfully and that
>     the JNDI name in your EJB Deployment descriptor is
>     correct.
>
> The error message is a bit misleading, but I discovered that the
> problem is that I still had CloudView open.  Somewhere in the book I
> remember reading that you can only have one instance open at a time
> due to the licensing.  Once i closed CloudView and then restarted the
> server everything worked fine.
>
> Hope that helps,
>
> chris
>
> --- In weblogic-workbook@y..., d10n2002@y... wrote:
> > Hi all,
> >
> > Thank you for providing such forum, I'm sure it's gonna be
> > helpful for users.
> >
> > I'm trying to deploy the weblogic's sourcecode that is bundled with
> > the workbook, and (as far as i know), have been following the
> > instruction, like creating ejbbook domain etc.
> >
> > However, I'm stuck in running the first examples (ex04_01) in
> > workbook in page 78.
> > The result of running the client (Client_41) is:
> > javax.naming.NameNotFoundException
> > Unable to resolve CabinHomeRemote. Resolved: ''
> > Unresolved:'CabinHomeInterface' ; remaining name ''
> >
> > When i compare the jndi tree in my console window, it looks
> > different with the jndi tree in the workbook, in my window, no
> > CabinHomeRemote & titan-dataSource items displayed.
> > I've been searching what steps that I've missed but failed.
> >
> > Could you please help?
> > Thank you very much in advance.





#21 From: "Greg Nyberg" <greg.nyberg@...>
Date: Fri Dec 7, 2001 4:38 pm
Subject: RE: unable to run Client_41 was CLASSPATH problem
greg.nyberg@...
Send Email Send Email
 
The ejb20.jar file is no longer (as of WL 6.1 SP1) required to enable EJB 2.0 functionality in the problem.  Things change fast!
 
Your problem really, really looks like a CLASSPATH issue.  The message "Cannot load driver class: COM.cloudscape.core.JDBCDriver" is a dead giveaway.
 
1) Make sure your startWebLogic script for the ejbbook domain includes the following line (assuming NT/Win2K):
 
set CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;.\samples\eval\cloudscape\lib\cloudscape.jar
2) Make sure that you've set the cloudscape.system.home variable in the java command:
 
-Dcloudscape.system.home=./samples/eval/cloudscape/data
 
Both of these are discussed on page 36.
 
Send me your config.xml and startWebLogic.cmd in private email if you are still having trouble.
 
-Greg
-----Original Message-----
From: Glenlake255@... [mailto:Glenlake255@...]
Sent: Friday, December 07, 2001 8:11 AM
To: weblogic-workbook@yahoogroups.com
Subject: Re: [weblogic-workbook] unable to run Client_41 was CLASSPATH problem

Hello all,

I have the same problem running the first examples (ex04_01). This is an errors description from the log file:

####<6-Dec-01 6:30:37 EST PM> <Error> <JDBC> <cicero-4lkeb9st> <myserver> <main> <system> <> <001060> <Cannot startup connection pool "titan-pool" Cannot load driver class: COM.cloudscape.core.JDBCDriver>
####<6-Dec-01 6:30:37 EST PM> <Error> <JDBC> <cicero-4lkeb9st> <myserver> <main> <system> <> <001059> <Error during Data Source creation: weblogic.common.ResourceException: DataSource(titan-dataSource) can't be created with non-existent Pool (connection or multi) (titan-pool)>
####<6-Dec-01 6:30:39 EST PM> <Error> <J2EE> <cicero-4lkeb9st> <myserver> <main> <system> <> <160001> <Error deploying application titanejb: Unable to deploy EJB: CabinEJB from titanejb.jar: The DataSource with the JNDI name: titan-dataSource could not be located. Please ensure that the DataSource has been deployed successfully and that the JNDI name in your EJB Deployment descriptor is correct.

The Cloudscape database was created using CloudView. The Cabin table existed, the database  was not running separatelly. The cloudscape.jar was in CLASSPATH in the startWebLogic.cmd script.

I suspect, the errors are because I do not have the ejb20.jar file in the wlserver6.1\lib directory. It is written in the Weblogic workbook "If this file is absent, you will encounter run time errors when you try to deploy EJB 2.0 beans."
But I can not find a way to download the ejb20.jar file from the http://commerse.bea.com/downloads/products.jsp. I go to BEA Weblogic Server Downloads ... J2EE 1.2 Plus J2EE 1.3 Features ... Proceed to Download. At the end, I have a message " You are downloading WebLogic Server 6.1 with Servece Pack1. But there is not ejb20.jar file in weblogic610sp1_win.exe.

Please, tell me how to download the ejb20.jar file.

Thank you.

Viktor.

In a message dated 07/12/2001 1:12:35 AM Eastern Standard Time, nyberg@... writes:


Thanks for your input. 

We resolved his problem in private email and I forgot to post it.  In his case,
the cloudscape.jar was not in his CLASSPATH in the startWebLogic.cmd script
(see page 36).  It's easy to forget.

Because CMP beans will not deploy unless all database prerequisites are met
(datasource exists/targetted, underlying pool exists/targetted, pool
connections valid, bean tables and columns match rdbms XML descriptor, etc.),
it is important to watch the log during boot to determine the root cause of a
"deployment" problem.  In many cases it is database-related..

I'm glad you were able to figure out your CloudView-related problem!
-Greg

--- bartleycpb <bartleycpb@...> wrote:
> I got the exact same error.  I also noticed this error message in the
> log window:
>
>     Unable to deploy EJB: CabinEJB from titanejb.jar:
>
>     The DataSource with the JNDI name: titan-dataSource
>     could not be located. Please ensure that the
>     DataSource has been deployed successfully and that
>     the JNDI name in your EJB Deployment descriptor is
>     correct.
>
> The error message is a bit misleading, but I discovered that the
> problem is that I still had CloudView open.  Somewhere in the book I
> remember reading that you can only have one instance open at a time
> due to the licensing.  Once i closed CloudView and then restarted the
> server everything worked fine.
>
> Hope that helps,
>
> chris
>
> --- In weblogic-workbook@y..., d10n2002@y... wrote:
> > Hi all,
> >
> > Thank you for providing such forum, I'm sure it's gonna be
> > helpful for users.
> >
> > I'm trying to deploy the weblogic's sourcecode that is bundled with
> > the workbook, and (as far as i know), have been following the
> > instruction, like creating ejbbook domain etc.
> >
> > However, I'm stuck in running the first examples (ex04_01) in
> > workbook in page 78.
> > The result of running the client (Client_41) is:
> > javax.naming.NameNotFoundException
> > Unable to resolve CabinHomeRemote. Resolved: ''
> > Unresolved:'CabinHomeInterface' ; remaining name ''
> >
> > When i compare the jndi tree in my console window, it looks
> > different with the jndi tree in the workbook, in my window, no
> > CabinHomeRemote & titan-dataSource items displayed.
> > I've been searching what steps that I've missed but failed.
> >
> > Could you please help?
> > Thank you very much in advance.
>
>
>
> To unsubscribe from this group, send an email to:
> weblogic-workbook-unsubscribe@yahoogroups.com
>

>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>





To unsubscribe from this group, send an email to:
weblogic-workbook-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

#20 From: Matt Koidin <mkoidin@...>
Date: Fri Dec 7, 2001 3:08 pm
Subject: Question On Client_41 & SQL Server
mkoidin
Offline Offline
Send Email Send Email
 
Greg and all --

First, let me thank you for an excellent book and workbook. I really
like the workbook approach. Too often I spend my time trying to figure
out how to apply examples to my particular environment... this approach
really solves the problem.

I am using Weblogic 6.1 sp1 and SQL Server for my database. I have a
question based off of the Client_41 example.

I am usng Weblogic's automatic key generation to support having an
IDENTITY as my primary key in the CABIN table.

I have updated my weblogic-cmp-rdbms-jar.xml file to include the
following specification:

     <automatic-key-generation>
         <generator-type>SQL_SERVER</generator-type>
     </automatic-key-generation>

If I change my create method to not pass in an id, I can still
successfully create a new CABIN record using:

CabinRemote cabin_1 = home.create();

My question is: How do I figure out what primary key was used to create
the new record??? If I then try to do an update by calling
cabin_1.setName("Master Suite") I get an error that primary key 0 was
not found.

I know this is not directly specified in the workbook, but I was hoping
someone else had come across a similar problem.

Thanks in advance,
Matt Koidin


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

#19 From: Glenlake255@...
Date: Fri Dec 7, 2001 9:10 am
Subject: Re: unable to run Client_41 was CLASSPATH problem
Glenlake255@...
Send Email Send Email
 
Hello all,

I have the same problem running the first examples (ex04_01). This is an errors description from the log file:

####<6-Dec-01 6:30:37 EST PM> <Error> <JDBC> <cicero-4lkeb9st> <myserver> <main> <system> <> <001060> <Cannot startup connection pool "titan-pool" Cannot load driver class: COM.cloudscape.core.JDBCDriver>
####<6-Dec-01 6:30:37 EST PM> <Error> <JDBC> <cicero-4lkeb9st> <myserver> <main> <system> <> <001059> <Error during Data Source creation: weblogic.common.ResourceException: DataSource(titan-dataSource) can't be created with non-existent Pool (connection or multi) (titan-pool)>
####<6-Dec-01 6:30:39 EST PM> <Error> <J2EE> <cicero-4lkeb9st> <myserver> <main> <system> <> <160001> <Error deploying application titanejb: Unable to deploy EJB: CabinEJB from titanejb.jar: The DataSource with the JNDI name: titan-dataSource could not be located. Please ensure that the DataSource has been deployed successfully and that the JNDI name in your EJB Deployment descriptor is correct.

The Cloudscape database was created using CloudView. The Cabin table existed, the database  was not running separatelly. The cloudscape.jar was in CLASSPATH in the startWebLogic.cmd script.

I suspect, the errors are because I do not have the ejb20.jar file in the wlserver6.1\lib directory. It is written in the Weblogic workbook "If this file is absent, you will encounter run time errors when you try to deploy EJB 2.0 beans."
But I can not find a way to download the ejb20.jar file from the http://commerse.bea.com/downloads/products.jsp. I go to BEA Weblogic Server Downloads ... J2EE 1.2 Plus J2EE 1.3 Features ... Proceed to Download. At the end, I have a message " You are downloading WebLogic Server 6.1 with Servece Pack1. But there is not ejb20.jar file in weblogic610sp1_win.exe.

Please, tell me how to download the ejb20.jar file.

Thank you.

Viktor.

In a message dated 07/12/2001 1:12:35 AM Eastern Standard Time, nyberg@... writes:


Thanks for your input. 

We resolved his problem in private email and I forgot to post it.  In his case,
the cloudscape.jar was not in his CLASSPATH in the startWebLogic.cmd script
(see page 36).  It's easy to forget.

Because CMP beans will not deploy unless all database prerequisites are met
(datasource exists/targetted, underlying pool exists/targetted, pool
connections valid, bean tables and columns match rdbms XML descriptor, etc.),
it is important to watch the log during boot to determine the root cause of a
"deployment" problem.  In many cases it is database-related..

I'm glad you were able to figure out your CloudView-related problem!
-Greg

--- bartleycpb <bartleycpb@...> wrote:
> I got the exact same error.  I also noticed this error message in the
> log window:
>
>     Unable to deploy EJB: CabinEJB from titanejb.jar:
>
>     The DataSource with the JNDI name: titan-dataSource
>     could not be located. Please ensure that the
>     DataSource has been deployed successfully and that
>     the JNDI name in your EJB Deployment descriptor is
>     correct.
>
> The error message is a bit misleading, but I discovered that the
> problem is that I still had CloudView open.  Somewhere in the book I
> remember reading that you can only have one instance open at a time
> due to the licensing.  Once i closed CloudView and then restarted the
> server everything worked fine.
>
> Hope that helps,
>
> chris
>
> --- In weblogic-workbook@y..., d10n2002@y... wrote:
> > Hi all,
> >
> > Thank you for providing such forum, I'm sure it's gonna be
> > helpful for users.
> >
> > I'm trying to deploy the weblogic's sourcecode that is bundled with
> > the workbook, and (as far as i know), have been following the
> > instruction, like creating ejbbook domain etc.
> >
> > However, I'm stuck in running the first examples (ex04_01) in
> > workbook in page 78.
> > The result of running the client (Client_41) is:
> > javax.naming.NameNotFoundException
> > Unable to resolve CabinHomeRemote. Resolved: ''
> > Unresolved:'CabinHomeInterface' ; remaining name ''
> >
> > When i compare the jndi tree in my console window, it looks
> > different with the jndi tree in the workbook, in my window, no
> > CabinHomeRemote & titan-dataSource items displayed.
> > I've been searching what steps that I've missed but failed.
> >
> > Could you please help?
> > Thank you very much in advance.
>
>
>
> To unsubscribe from this group, send an email to:
> weblogic-workbook-unsubscribe@yahoogroups.com
>

>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>




#18 From: Greg Nyberg <nyberg@...>
Date: Fri Dec 7, 2001 6:10 am
Subject: Re: unable to run Client_41 was CLASSPATH problem
nyberg
Offline Offline
Send Email Send Email
 
Thanks for your input.

We resolved his problem in private email and I forgot to post it.  In his case,
the cloudscape.jar was not in his CLASSPATH in the startWebLogic.cmd script
(see page 36).  It's easy to forget.

Because CMP beans will not deploy unless all database prerequisites are met
(datasource exists/targetted, underlying pool exists/targetted, pool
connections valid, bean tables and columns match rdbms XML descriptor, etc.),
it is important to watch the log during boot to determine the root cause of a
"deployment" problem.  In many cases it is database-related..

I'm glad you were able to figure out your CloudView-related problem!
-Greg

--- bartleycpb <bartleycpb@...> wrote:
> I got the exact same error.  I also noticed this error message in the
> log window:
>
>     Unable to deploy EJB: CabinEJB from titanejb.jar:
>
>     The DataSource with the JNDI name: titan-dataSource
>     could not be located. Please ensure that the
>     DataSource has been deployed successfully and that
>     the JNDI name in your EJB Deployment descriptor is
>     correct.
>
> The error message is a bit misleading, but I discovered that the
> problem is that I still had CloudView open.  Somewhere in the book I
> remember reading that you can only have one instance open at a time
> due to the licensing.  Once i closed CloudView and then restarted the
> server everything worked fine.
>
> Hope that helps,
>
> chris
>
> --- In weblogic-workbook@y..., d10n2002@y... wrote:
> > Hi all,
> >
> > Thank you for providing such forum, I'm sure it's gonna be
> > helpful for users.
> >
> > I'm trying to deploy the weblogic's sourcecode that is bundled with
> > the workbook, and (as far as i know), have been following the
> > instruction, like creating ejbbook domain etc.
> >
> > However, I'm stuck in running the first examples (ex04_01) in
> > workbook in page 78.
> > The result of running the client (Client_41) is:
> > javax.naming.NameNotFoundException
> > Unable to resolve CabinHomeRemote. Resolved: ''
> > Unresolved:'CabinHomeInterface' ; remaining name ''
> >
> > When i compare the jndi tree in my console window, it looks
> > different with the jndi tree in the workbook, in my window, no
> > CabinHomeRemote & titan-dataSource items displayed.
> > I've been searching what steps that I've missed but failed.
> >
> > Could you please help?
> > Thank you very much in advance.
>
>
>
> To unsubscribe from this group, send an email to:
> weblogic-workbook-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

#17 From: "bartleycpb" <bartleycpb@...>
Date: Thu Dec 6, 2001 10:52 pm
Subject: Re: unable to run Client_41
bartleycpb
Offline Offline
Send Email Send Email
 
I got the exact same error.  I also noticed this error message in the
log window:

     Unable to deploy EJB: CabinEJB from titanejb.jar:

     The DataSource with the JNDI name: titan-dataSource
     could not be located. Please ensure that the
     DataSource has been deployed successfully and that
     the JNDI name in your EJB Deployment descriptor is
     correct.

The error message is a bit misleading, but I discovered that the
problem is that I still had CloudView open.  Somewhere in the book I
remember reading that you can only have one instance open at a time
due to the licensing.  Once i closed CloudView and then restarted the
server everything worked fine.

Hope that helps,

chris

--- In weblogic-workbook@y..., d10n2002@y... wrote:
> Hi all,
>
> Thank you for providing such forum, I'm sure it's gonna be
> helpful for users.
>
> I'm trying to deploy the weblogic's sourcecode that is bundled with
> the workbook, and (as far as i know), have been following the
> instruction, like creating ejbbook domain etc.
>
> However, I'm stuck in running the first examples (ex04_01) in
> workbook in page 78.
> The result of running the client (Client_41) is:
> javax.naming.NameNotFoundException
> Unable to resolve CabinHomeRemote. Resolved: ''
> Unresolved:'CabinHomeInterface' ; remaining name ''
>
> When i compare the jndi tree in my console window, it looks
> different with the jndi tree in the workbook, in my window, no
> CabinHomeRemote & titan-dataSource items displayed.
> I've been searching what steps that I've missed but failed.
>
> Could you please help?
> Thank you very much in advance.

#16 From: "Greg Nyberg" <greg.nyberg@...>
Date: Mon Dec 3, 2001 4:17 pm
Subject: RE: unable to run Client_41
greg.nyberg@...
Send Email Send Email
 
Did the "ant ejbjar" task complete without errors?

Did you perform the "ant dist" task to move the .jar file?

Is there a titanejb.jar file in your applications/titanapp directory?

If the answer to all of these questions is yes, what was in the log/server
output during boot?  Did you see any errors related to deploying the jar
file?   If so, send them to me (private email please).

-Greg

> -----Original Message-----
> From: d10n2002@... [mailto:d10n2002@...]
> Sent: Monday, December 03, 2001 10:03 AM
> To: weblogic-workbook@yahoogroups.com
> Subject: [weblogic-workbook] unable to run Client_41
>
>
> Hi all,
>
> Thank you for providing such forum, I'm sure it's gonna be
> helpful for users.
>
> I'm trying to deploy the weblogic's sourcecode that is bundled with
> the workbook, and (as far as i know), have been following the
> instruction, like creating ejbbook domain etc.
>
> However, I'm stuck in running the first examples (ex04_01) in
> workbook in page 78.
> The result of running the client (Client_41) is:
> javax.naming.NameNotFoundException
> Unable to resolve CabinHomeRemote. Resolved: ''
> Unresolved:'CabinHomeInterface' ; remaining name ''
>
> When i compare the jndi tree in my console window, it looks
> different with the jndi tree in the workbook, in my window, no
> CabinHomeRemote & titan-dataSource items displayed.
> I've been searching what steps that I've missed but failed.
>
> Could you please help?
> Thank you very much in advance.
>
>
>
>
>
> To unsubscribe from this group, send an email to:
> weblogic-workbook-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>

#15 From: d10n2002@...
Date: Mon Dec 3, 2001 4:03 pm
Subject: unable to run Client_41
d10n2002
Offline Offline
Send Email Send Email
 
Hi all,

Thank you for providing such forum, I'm sure it's gonna be
helpful for users.

I'm trying to deploy the weblogic's sourcecode that is bundled with
the workbook, and (as far as i know), have been following the
instruction, like creating ejbbook domain etc.

However, I'm stuck in running the first examples (ex04_01) in
workbook in page 78.
The result of running the client (Client_41) is:
javax.naming.NameNotFoundException
Unable to resolve CabinHomeRemote. Resolved: ''
Unresolved:'CabinHomeInterface' ; remaining name ''

When i compare the jndi tree in my console window, it looks
different with the jndi tree in the workbook, in my window, no
CabinHomeRemote & titan-dataSource items displayed.
I've been searching what steps that I've missed but failed.

Could you please help?
Thank you very much in advance.

#14 From: qing51801@...
Date: Fri Nov 30, 2001 7:20 pm
Subject: Re: oraclePool
qing51801
Offline Offline
Send Email Send Email
 
Thank you very much for your enthusiasm, Greg!

1. Prob 2 is my mistake. I use WLS6.0 which doesn't have ant
included. And my
ant doesn't have the optional.jar in the lib dir. It's OK now.
2. Prob 1. I still can't figure it out.
This is the preconfigured oracPool:
Name: oraclePool
URL: jdbc:weblogic:oracle
Driver Class: weblogic.jdbc.oci.Driver
Properties:
user=SCOTT
password=tiger
server=ORCL

I created a new dataSource:
Name: examples-dataSource-oraclePool
JNDI Name: examples-dataSource-oraclePool
poolName: oraclePool

I use this code to test it:

     Context ctx = new InitialContext();

     DataSource ds = (javax.sql.DataSource)ctx.lookup ("examples-
dataSource-oraclePool");

Error message in log:
Service Error: java.sql.SQLException: java.sql.SQLException:
Connection Pool oraclePool does not exist.

Thanks a lot for your help!

Tiger

--- In weblogic-workbook@y..., "Greg Nyberg" <greg.nyberg@o...> wrote:
> Thanks for your kind comments.
>
> 1. The oraclePool which is preconfigured in the examples domain
during the
> install provides a good example if you want to modify the demoPool
to use
> Oracle.  The definition in the config.xml looks something like:
>
>     <JDBCConnectionPool CapacityIncrement="2"
>         DriverName="weblogic.jdbc.oci.Driver" InitialCapacity="4"
>         LoginDelaySeconds="1" MaxCapacity="10" Name="oraclePool"
>         Password="{3DES}Y9jXl683KDY="
>         Properties="user=SCOTT;server=DEMO" RefreshMinutes="10"
>         ShrinkPeriodMinutes="15" ShrinkingEnabled="true"
>         TestConnectionsOnRelease="false"
>         TestConnectionsOnReserve="false" TestTableName="dual"
> URL="jdbc:weblogic:oracle"/>
>
> Note that it uses the WebLogic jDriver for Oracle rather than the
Oracle
> Type-2 JDBC driver.
>
> If you use the Oracle Type-2 JDBC driver the Driver Name and URL
would
> obviously be different (see Oracle's doc), you'd need to include the
> appropriate Oracle OCI libraries in your PATH (NT) or
LD_LIBRARY_PATH (Sun),
> and you'd need the .jar or .zip file containing the Oracle Type-2
JDBC
> drivers in your CLASSPATH.  Much easier to just use jDriver!
>
> 2. Make sure you execute the "setEnv" script before trying to make
the
> build.  The setEnv script sets your path and classpath to force the
use of
> the "ant" within WebLogic's /bin directory.  When you type "ant"
now it is
> probably trying to use a previously-installed version of ant on
your machine
> which does not include the optional "ejbjar" task.
>
> Let me know how it goes.
> -Greg
>

#13 From: "Greg Nyberg" <greg.nyberg@...>
Date: Fri Nov 30, 2001 4:57 pm
Subject: CUSTOMER table definition problem
greg.nyberg@...
Send Email Send Email
 
The CUSTOMER table dedfinition on page 78 in the book is correct only for
SQL*Server, as it turns out. The correct datatype for the HAS_GOOD_CREDIT
field depends on the database:

Cloudscape:  boolean
Oracle: int
SQL*Server: bit
DB2 UDB: int

So strictly speaking the errata would have to indicate that the proper
datatype depends on the technology and either least them as shown above or
refer the reader to the .sql scripts in the download which are correct.

Note that the pre-created Cloudscape database provided in the download
works, and the cloudscape.sql script provided in the download uses the
"boolean" datatype.  It is only the book version of the create statement
which is wrong.

Thanks for the report, Don!
-Greg


> -----Original Message-----
> From: Richard Monson-Haefel [mailto:Richard@...]
> Sent: Thursday, November 29, 2001 9:16 AM
> To: Greg Nyberg
> Subject: Errors in WebLogic Workbook
>
>
> Hi Greg,
>
> Can you take a look as this and tell me if its an error in the
> workbook?  If so, I would like to put up an errata page and list it
> there.  Thanks!
>
>
> __________________________________________________________________________
>
> Reporter:        Don Stadler
> Email:           donald.stadler@...
> Title:           Enterprise JavaBeans, 3rd Edition
> Page:            151
> Location:        First example
> Severity:        minor technical mistake
>
> An email acknowlegement of the reported error is requested.
>
> =======================   Description   =======================
>
> {151}  First example;
> There is an error in the Weblogic Workbook on page 78, third section.
> The SQL statement used to set up the Customers file is erroneous (at
> least for the cloudscape DB). The statement should look like:
>
> create table CUSTOMER (
> IN int primary key,
> LAST_NAME char(20),
> FIRST_NAME char(20),
> HAS_GOOD_CREDIT boolean
> )
>
> The example given throws an exception because an attempt was made to
> insert a value of type 'boolean' into type 'bit'.
>
> --
> Richard Monson-Haefel
> Author of Enterprise JavaBeans, 3rd Edition  (O'Reilly 2001)
> Co-Author of Java Message Service (O'Reilly 2000)
> http://www.jMiddleware.com
>
>

#12 From: "Greg Nyberg" <greg.nyberg@...>
Date: Fri Nov 30, 2001 4:37 pm
Subject: RE: demoPool, ex04_1(build.xml)
greg.nyberg@...
Send Email Send Email
 
Thanks for your kind comments.

1. The oraclePool which is preconfigured in the examples domain during the
install provides a good example if you want to modify the demoPool to use
Oracle.  The definition in the config.xml looks something like:

     <JDBCConnectionPool CapacityIncrement="2"
         DriverName="weblogic.jdbc.oci.Driver" InitialCapacity="4"
         LoginDelaySeconds="1" MaxCapacity="10" Name="oraclePool"
         Password="{3DES}Y9jXl683KDY="
         Properties="user=SCOTT;server=DEMO" RefreshMinutes="10"
         ShrinkPeriodMinutes="15" ShrinkingEnabled="true"
         TestConnectionsOnRelease="false"
         TestConnectionsOnReserve="false" TestTableName="dual"
URL="jdbc:weblogic:oracle"/>

Note that it uses the WebLogic jDriver for Oracle rather than the Oracle
Type-2 JDBC driver.

If you use the Oracle Type-2 JDBC driver the Driver Name and URL would
obviously be different (see Oracle's doc), you'd need to include the
appropriate Oracle OCI libraries in your PATH (NT) or LD_LIBRARY_PATH (Sun),
and you'd need the .jar or .zip file containing the Oracle Type-2 JDBC
drivers in your CLASSPATH.  Much easier to just use jDriver!

2. Make sure you execute the "setEnv" script before trying to make the
build.  The setEnv script sets your path and classpath to force the use of
the "ant" within WebLogic's /bin directory.  When you type "ant" now it is
probably trying to use a previously-installed version of ant on your machine
which does not include the optional "ejbjar" task.

Let me know how it goes.
-Greg

> -----Original Message-----
> From: qing51801@... [mailto:qing51801@...]
> Sent: Thursday, November 29, 2001 5:45 PM
> To: weblogic-workbook@yahoogroups.com
> Subject: [weblogic-workbook] demoPool, ex04_1(build.xml)
>
>
> First, I must admit this is a very good book and it helps a lot! I
> really love it!
> However, I have two questions as I reading and trying the examples.
> 1. pages 13-15(I read the onlive version)Configure the JDBC
> connection pools. It says we can directly congigure the demoPool to
> use other database drivers, for example, Oracle oci driver. When I
> did so and rebooted the server, the log displayed exceptions that the
> database driver could not be found(or something like that, I couldn't
> remember vrey well).
>   I think this is caused by the example applications(shipped with
> weblogic) which use the preconfigured demoPool. After we change the
> driver,etc about the demoPool, they could not find the right info. If
> this is true, then we could not configure the demoPool or other pools
> which are used by some applications. Am I right?
>
> 2. example ex04_1, build.xml does not work. When I type "ant dist",
> it gives out this message(betwee star lines):
> *********
> Buildfile: build.xml
>
> compile:
>
> ejbjar:
>
> BUILD FAILED
>
> C:\titan\work_ejbbook_win\ex04_1\build.xml:33: Could not create task
> of type: ejbjar. Common solutions are to use taskdef to declare your
> task, or, if this is an optional task, to put the optional.jar in the
> lib directory of your ant installation (ANT_HOME).
> ************
> I think it's because of JAR_NAME. Actually I don't know what this
> item means.
> This is in the property section in the build.xml:
>  <property name="JAR_NAME" value="titanejb" />
> this in the target section:
> <ejbjar srcdir="${src}"
>             descriptordir="."
>             basejarname="${JAR_NAME}">(line 33)
>
> How can I fix this problem?
> Thank you very much for your time and attention!
>
> Tiger
>
>

#11 From: qing51801@...
Date: Thu Nov 29, 2001 11:45 pm
Subject: demoPool, ex04_1(build.xml)
qing51801
Offline Offline
Send Email Send Email
 
First, I must admit this is a very good book and it helps a lot! I
really love it!
However, I have two questions as I reading and trying the examples.
1. pages 13-15(I read the onlive version)Configure the JDBC
connection pools. It says we can directly congigure the demoPool to
use other database drivers, for example, Oracle oci driver. When I
did so and rebooted the server, the log displayed exceptions that the
database driver could not be found(or something like that, I couldn't
remember vrey well).
   I think this is caused by the example applications(shipped with
weblogic) which use the preconfigured demoPool. After we change the
driver,etc about the demoPool, they could not find the right info. If
this is true, then we could not configure the demoPool or other pools
which are used by some applications. Am I right?

2. example ex04_1, build.xml does not work. When I type "ant dist",
it gives out this message(betwee star lines):
*********
Buildfile: build.xml

compile:

ejbjar:

BUILD FAILED

C:\titan\work_ejbbook_win\ex04_1\build.xml:33: Could not create task
of type: ejbjar. Common solutions are to use taskdef to declare your
task, or, if this is an optional task, to put the optional.jar in the
lib directory of your ant installation (ANT_HOME).
************
I think it's because of JAR_NAME. Actually I don't know what this
item means.
This is in the property section in the build.xml:
  <property name="JAR_NAME" value="titanejb" />
this in the target section:
<ejbjar srcdir="${src}"
             descriptordir="."
             basejarname="${JAR_NAME}">(line 33)

How can I fix this problem?
Thank you very much for your time and attention!

Tiger

#10 From: p_alexander_harvey@...
Date: Wed Nov 28, 2001 7:48 pm
Subject: Re: problem with dbview.jsp
p_alexander_...
Offline Offline
Send Email Send Email
 
Yes that is indeed the problem. I created multiple pools for the
purpose of using different databases and then changing the pool name
in the data source.

Thanks for your help!

-Alex Harvey
Nine Pound Hammer Consulting

--- In weblogic-workbook@y..., "Greg Nyberg" <greg.nyberg@o...> wrote:
> Can you look in the server log file and send the error stack?
>
> One possibility: Did you change the pool name?  The ViewDB.jsp page
and it's
> fellow direct-db-manipulation pages use the pool directly, rather
than the
> datasource, so if you changed the pool name that would make it fail.
>
> If you send the exception trace from the log we'll figure it out.
>
> -Greg
>
> > -----Original Message-----
> > From: p_alexander_harvey@y... [mailto:p_alexander_harvey@y...]
> > Sent: Wednesday, November 28, 2001 12:44 PM
> > To: weblogic-workbook@y...
> > Subject: [weblogic-workbook] problem with dbview.jsp
> >
> >
> > Hi,
> >
> > I am getting an HTTP 500 internal server error when I try and use
the
> > dbview.jsp sample page. I cannot get any of its subpages to work
> > either if i hardcode the table variable.
> >
> > Other JSP pages are working fine.
> >
> > Any ideas as to why I would be getting this message or where I
might
> > look to determine the error?
> >
> > Thanks,
> >
> > -Alex Harvey
> > Nine Pound Hammer Consulting
> >
> >
> >
> > To unsubscribe from this group, send an email to:
> > weblogic-workbook-unsubscribe@y...
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >

#9 From: "Greg Nyberg" <greg.nyberg@...>
Date: Wed Nov 28, 2001 7:08 pm
Subject: RE: problem with dbview.jsp
greg.nyberg@...
Send Email Send Email
 
Can you look in the server log file and send the error stack?

One possibility: Did you change the pool name?  The ViewDB.jsp page and it's
fellow direct-db-manipulation pages use the pool directly, rather than the
datasource, so if you changed the pool name that would make it fail.

If you send the exception trace from the log we'll figure it out.

-Greg

> -----Original Message-----
> From: p_alexander_harvey@... [mailto:p_alexander_harvey@...]
> Sent: Wednesday, November 28, 2001 12:44 PM
> To: weblogic-workbook@yahoogroups.com
> Subject: [weblogic-workbook] problem with dbview.jsp
>
>
> Hi,
>
> I am getting an HTTP 500 internal server error when I try and use the
> dbview.jsp sample page. I cannot get any of its subpages to work
> either if i hardcode the table variable.
>
> Other JSP pages are working fine.
>
> Any ideas as to why I would be getting this message or where I might
> look to determine the error?
>
> Thanks,
>
> -Alex Harvey
> Nine Pound Hammer Consulting
>
>
>
> To unsubscribe from this group, send an email to:
> weblogic-workbook-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>

#8 From: p_alexander_harvey@...
Date: Wed Nov 28, 2001 6:43 pm
Subject: problem with dbview.jsp
p_alexander_...
Offline Offline
Send Email Send Email
 
Hi,

I am getting an HTTP 500 internal server error when I try and use the
dbview.jsp sample page. I cannot get any of its subpages to work
either if i hardcode the table variable.

Other JSP pages are working fine.

Any ideas as to why I would be getting this message or where I might
look to determine the error?

Thanks,

-Alex Harvey
Nine Pound Hammer Consulting

#7 From: p_alexander_harvey@...
Date: Wed Nov 21, 2001 10:51 pm
Subject: very nice
p_alexander_...
Offline Offline
Send Email Send Email
 
I'm up and running with WebLogic against SQL Server 2000. I'm finding
the Workbook to be extremely accurate. Nicely done!

-Alex Harvey
Nine Pound Hammer Consulting

#6 From: Richard Monson-Haefel <rmonson_us@...>
Date: Fri Oct 26, 2001 3:21 am
Subject: Re: EJB 3rd Edition - Excellent book!.
rmonson_us
Offline Offline
Send Email Send Email
 
On behalf of Greg Nyberg and myself, thanks for the
positive feedback!

Richard Monson-Haefel

--- my_workplace@... wrote:
> Excellent book, this quality you expect from
> Oreilly. I like the
> approach of having the overview covered
> first(chapter 1-3) and then
> digging into step-by-step coding.  I have tried
> another book
> Professional-EJB by Wrox, but personaly I prefer the
> book from
> Oreilly.
>
> And this concept of having a sperate workbook is
> also excellent, this
> frees-up carrying a huge book around, and download
> only the
> server/platform you are intrested in.
>
> Good job.
>
>


__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

#5 From: my_workplace@...
Date: Thu Oct 25, 2001 3:18 am
Subject: EJB 3rd Edition - Excellent book!.
my_workplace
Offline Offline
Send Email Send Email
 
Excellent book, this quality you expect from Oreilly. I like the
approach of having the overview covered first(chapter 1-3) and then
digging into step-by-step coding.  I have tried another book
Professional-EJB by Wrox, but personaly I prefer the book from
Oreilly.

And this concept of having a sperate workbook is also excellent, this
frees-up carrying a huge book around, and download only the
server/platform you are intrested in.

Good job.

#4 From: nyberg@...
Date: Tue Oct 23, 2001 7:58 pm
Subject: Errant META-INF directory in applications
nyberg
Offline Offline
Send Email Send Email
 
Examining the log he sent me pointed out a minor problem..

When I "jar"ed up the titanapp_empty.jar I accidently included a META-
INF directory with a manifest.mf file.

When you unzip or "jar xvf" the titanapp_empty.jar file to the
ejbbook/applications directory it creates the META-INF directory,
which WebLogic thinks is another application in the domain.  Ooops.

You should delete the META-INF directory from the
ejbbook/applications directory before booting the domain for the
first time.  Just delete this errant META-INF directory, not the
correct META-INF directory down in /titanapp containing
application.xml!

We'll fix the download to not include the META-INF/manifest.mf file
in it, but "jar xvf" still creates the empty META-INF directory.

-Greg

#3 From: nyberg@...
Date: Tue Oct 23, 2001 5:10 pm
Subject: Re: Configuring TitanApp Application in EJBBook Domain
nyberg
Offline Offline
Send Email Send Email
 
Everything looks fine until the line:
<23/10/2000 14h42min33s BRST> <Info> <HTTP> <Initializing WEB server
myserver>
I don't recognize that message, or the following warning about having
no components.  They don't occur for me.

Can you please:

1) Send me (private email at nyberg@...) the contents of your
config.xml file.
2) Delete all temporary directories WebLogic may have created in the
applications area and try again.

Do you still have the "DefaultWebApp" directory in the "applications"
directory?

Which version/servicepack are you using?

Thanks.
-Greg

#2 From: abilio_assis@...
Date: Tue Oct 23, 2001 4:48 pm
Subject: Configuring TitanApp Application in EJBBook Domain
abilio_assis
Offline Offline
Send Email Send Email
 
Dear Sr.

I canīt realize the task above. My Command Pronpt Window keeps giving
the following message. Any help?

<23/10/2000 14h42min33s BRST> <Info> <HTTP> <[HTTP myserver] Loading
web app: we
bapp>
<23/10/2000 14h42min33s BRST> <Info> <HTTP> <[myserver]
Loading "webapp" from di
rectory: ".\config\ejbbook\applications\titanapp\webapp">
<23/10/2000 14h42min33s BRST> <Info> <HTTP> <[WebAppServletContext
(1602470,webap
p,/webapp)] extracting classfiles to C:\bea\wlserver6.1
\.\config\ejbbook\applica
tions\titanapp\webapp\WEB-INF\_tmp_war_myserver_myserver_webapp:>
<23/10/2000 14h42min33s BRST> <Info> <HTTP> <[WebAppServletContext
(1602470,webap
p,/webapp)] extracted classfiles successfully...>
<23/10/2000 14h42min33s BRST> <Info> <HTTP Session> <Creating
SessionContext of
type: memory for webapp: /webapp>
<23/10/2000 14h42min33s BRST> <Info> <HTTP> <[WebAppServletContext
(1602470,webap
p,/webapp)] registering classpath servlet with initArgs 'null'>
<23/10/2000 14h42min33s BRST> <Info> <HTTP> <[WebAppServletContext
(1602470,webap
p,/webapp)] registering getior servlet with initArgs 'null'>
<23/10/2000 14h42min33s BRST> <Info> <HTTP> <[WebAppServletContext
(1602470,webap
p,/webapp)] registering tunneling servlets with initArgs 'wl-dispatch-
policy=dir
ect'>
<23/10/2000 14h42min33s BRST> <Info> <HTTP> <[WebAppServletContext
(1602470,webap
p,/webapp)] registering JSPServlet with initArgs '[JspConfig:
verbose=true,packa
gePrefix=jsp_servlet,-
compiler=javac,compileFlags=,workingDir=C:\bea\wlserver6.1
\.\config\ejbbook\applications\titanapp\webapp\WEB-
INF\_tmp_war_myserver_myserve
r_webapp,pageCheckSeconds=1,superclass=weblogic.servlet.jsp.JspBase,ke
epgenerate
d=false,compilerSupportsEncoding=false,encoding=null,defaultfilename=i
ndex.jsp,c
ompilerclass=null,noTryBlocks=false]'>
<23/10/2000 14h42min33s BRST> <Info> <J2EE> <Deployed : webapp>
<23/10/2000 14h42min33s BRST> <Info> <HTTP> <Initializing WEB server
myserver>
<23/10/2000 14h42min33s BRST> <Warning> <Management> <No components
found in app
lication: .\config\ejbbook\applications\META-INF>
<23/10/2000 14h42min34s BRST> <Notice> <Management> <Application
Poller started
for development server.>
<23/10/2000 14h42min34s BRST> <Info> <HTTP> <[HTTP myserver]
Unloading web app:
webapp>
<23/10/2000 14h42min34s BRST> <Info> <J2EE> <Undeployed : titanapp>

#1 From: wzyml@...
Date: Mon Oct 15, 2001 10:37 pm
Subject: what is the WebLogic server?
wzyml@...
Send Email Send Email
 
Messages 1 - 30 of 647   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

Copyright Đ 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help