Re: Deploy on JBoss
Re: Deploy on JBoss
- Subject: Re: Deploy on JBoss
- From: "Ricardo Cortes" <email@hidden>
- Date: Fri, 29 Apr 2005 11:14:35 -0400
- Organization: Bolt
Those instructions I gave were for OS X so I tried a Linux installation
on Red Hat yesterday and ran into a few snags. I took the same WAR and
followed my instructions and they didn't work on Red Hat. But, after
some strange fiddling I was able to get my application working. Again,
here are my specs so you can compare them to yours:
* Building as a WAR in XCode
* Using MySQL as my database
* WO 5.2.3
* Original WAR worked fine in Tomcat
Now, here's what I had to do to get my WO application up and running on
RedHat:
1. I had to unpack my WAR and remove the jboss-web.xml file in the WEB-
INF folder. I originally toyed with defining an external datasource in
jboss-web.xml and web.xml but that didn't work so I just removed the
jboss-web.xml file all together as I wanted WO to use it's own EO model
defined datasource. I also made sure the <resource-ref> element in the
deployment descriptor was commented out (web.xml).
cd /usr/local/jboss-3.2.6/server/<app_name>/deploy
mkdir unzip
mv <app_name>.war unzip
cd unzip
jar -xvf <app_name.war>
cd WEB-INF
rm jboss-web.xml
vi web.xml (ensure <resource-ref> element is commented out)
2. Then I packed up my WAR again using jar:
cd /usr/local/jboss-3.2.6/server/<app_name>/deploy/unzip
rm <app_name>.war (removed the old war)
jar -cvf <app_name>.war *
mv <app_name>.war ..
cd ..
rm -rf unzip
3. Then something weird happened. I started up my application using
`run.sh -c <app_name>` and I got an exception from WebObjects as soon as
I hit the application with the following URL:
http://localhost:8080/appName/WebObjects/appName.woa
The exception said that it couldn't find one of my tables 'COUNTRY' even
though the table name was 'country'. I remembered having to add the
capitalizeTypeNames attribute to my JDBC URL (setting the value to true)
when I first started deploying against MySQL so I decided to change the
attribute to false. This again required me to unpack my WAR, go into
the lib folder of the WEB-INF directory and unpack my model framework
and changed the JDBC URL in index.eomodeld from:
jdbc:mysql://localhost/electrophobic?capitalizeTypeNames=true
to
jdbc:mysql://localhost/electrophobic?capitalizeTypeNames=false
Then, I repacked my WAR again and started up JBoss again. But, this
didn't work. When I hit the application again using the URL above, I
got the same exception. So, I went into MySQL and changed all my table
names to have capital letters instead of lowercase letters. This time,
when I hit my application everything worked. I'm not sure why but I'd
be curious if anyone knew a reason why the capitalize letter tablename
problem is happening. You might be using a different database than
MySQL so I'm not sure you'll run into the same problem. Also, it would
be good if some other folks can post their experiences on deploying on
JBoss to see if we have discovered bugs in WebObjects. Maybe this was
too much information but hopefully some of it helps.
Regards,
Ricardo
---
Bolt Media
Lead Software Engineer
email@hidden
On Fri, 2005-04-29 at 09:50 +0200, Gian Luca Gaiba wrote:
>
>
> ______________________________________________________________________
>
>
>
> Thanx a lot Ricardo
> i'm trying to follow your suggestion...
> but some related questions:
>
> Are you using Linux?
> (i'm using Panther but my goal is to deploy on Linux)
>
> Rebuilding my app as WAR i think i have to include
> framework as jars files anyway... is that right?
>
> cheers
> gian
> On Apr 28, 2005, at 5:02 PM, Ricardo Cortes wrote:
>
> You don't have to do anything special to deploy in JBoss if
> you are
> building your application as a WAR instead of SSDD. I'm not
> saying it's
> not easy with SSDD, I just haven't gotten SSDD to work in
> Tomcat the way
> I've wanted it to work. I find WAR deployment easier as it's
> also just
> one file. Assuming you are now building a WAR from your
> WebObjects
> project in XCode, below are the steps you need to deploy in
> JBoss.
>
> 1. Downloaded JBoss 3.2.6 (I haven't used 4.0 yet) from
> Sourceforge.net
>
> 2. Unpacked JBoss.tar.gz into /usr/local/jboss
>
> 3. cp -
> rp /usr/local/jboss/server/default /usr/local/jboss/server/<your_app_name>
>
> 4. cp
> <your_app_name>.war /usr/local/jboss/server/<your_app_name>/deploy
>
> 5. /usr/local/jboss/bin/run.sh -c <your_app_name>
>
> 6. Wait for the app to start
>
> 7. Hit the app with the following URL:
>
>
> http://localhost:8080/<your_app_name>/WebObjects/<your_app_name>.woa/
>
> 8. If that doesn't work,
> check /usr/local/jboss/server/log/<your_app_name>.log for
> messages and
> also check the jmx-console that comes with JBoss (think of WO
> monitor);
>
> http://localhost:8080/jmx-console
>
> When you get your application running, you'll want to remove
> services
> that start up with your application that you don't need.
> Services like
> JMS and EJB that were included in the default installation of
> JBoss
> which you copied in step 3.
>
> I hope that helps...............
>
> Ciao,
> Ricardo
>
>
> On Wed, 2005-04-27 at 11:54 +0200, Gian Luca Gaiba wrote:
> Someone can help me
> show me a step-by-step guide
> to build an app on JBoss?
>
> in particular:
> I start my JBoss/Tomcat...
> Tested ok!
> I build a simple WOApp
> (deploy as servlet SSDD containing jars of frameworks)
>
> Now
> how to deploy on JBoss?????
>
> thanks
> gian luca
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden