RE: Compiling basicPortal with NetBeans 3.5 (i.e. Tomcat 4.0.6)?

"Hue Holleran" <[email protected]> Sun, 27 Apr 2003 20:01:37 +0100
Newsgroups gmane.comp.java.mvc.devel
Message-ID <000301c30cef$6d9dc8c0$150aa8c0@laphueh>
Vic,

>> I definetly tested under Tomcat 4.1.x. <<

Problem seems to be with tomcat shipped with netbeans:

I get exactly the same compilation error under Linux (Debian) using netbeans
3.5 (caveat: beta): "java.lang.ExceptionInInitializerError ...
java.lang.NullPointerException at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources
.java:577)" running Sun's JDK 1.4.1_02 as Win2k running netbeans 3.5 running
Sun's JDK 1.4.1_02 and it looks like a problem loading messages property
bundle - so at least I'm starting to get a little consistency! This also
generates same error under latest netbeans release 3.4.1 on Linux (Debian)
running Sun's JDK 1.4.1_02 - but I'm not sure if this is a JDK 1.4.1_02
issue or a netbeans issue.

ALSO - the strutsel-exercise-taglib.war (expanded) from
jakarta-struts-20030424 nightly (later nightlies do not have contrib/el as
there must be a compilation problem for auto builder again) gives exactly
the same error under netbeans! Which points to a more general problem with
el taglibs or a more general problem with tomcat 4.0.6 bundled with netbeans
(or Sun's JDK 1.4.1_02?) not being able to load messages property bundle.

BUT bp deploys and runs faultlessly under Tomcat 4.0.3 (from Debian 'stable'
.deb) and latest Tomcat 4.0.6 (from jakarta) on Linux (Debian) again running
Sun's JDK 1.4.1_02 - so it is not a problem specific to bp - I have checked
netbeans issuezilla but cannot find any related bug so will post to netbeans
list and check. Sorry to have taken your time on this.

>> *The configuration for Tomcat 4.1.x is in DOCO.*,  with data source,so I
did not mess with SQL mapping, just the data source. <<

Yes, thanks - I did check the server.xml but to be honest wanted to
understand ibatis-db and ScaffoldXPress a little better - so got source and
started trying different settings.

I must say I'm very impressed with both the lower-level ibatis and
ScaffoldXPress's highler-level bean+DAOhelper approach - your basebeans
tuition was extremely useful in getting to understand what appears to be a
very high-performance architecture. Kudos to the ibatis developers and to
you and your colleagues in using ibatis in such a reusable and approachable
way. bp is a very nice demonstration app to demonstrate the power of both
ibatis and ScaffoldXPress and shows what can really be done with relatively
very little code.

Thanks again,

Hue.

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Vic Cekvenich
> Sent: 27 April 2003 01:30
> To: [email protected]
> Subject: Re: [MVC-Programmers] Compiling basicPortal with NetBeans 3.5
> (i.e. Tomcat 4.0.6)?
>
>
> I definetly tested under Tomcat 4.1.x. *The configuration for Tomcat
> 4.1.x is in DOCO.*,  with data source,so I did not mess with SQL
> mapping, just the data source.
> If you still have a problem in a day or 2, I will test the older tomcat
> 4.0.x for you. The message makes no sense to me.
> Are you using JDK 1.4x?  It looks like a JSP compiler barfs. Maybe copy
> tools.jar to Tomcat common?
>
>
> In future, would it be easier for me to "ship" w/ Tomcat? I think I
> will. (I like Resin, but.... )
>
> .V
>
> Hue Holleran wrote:
>
> >I've had several problems getting bp to run under netbeans -
> although this
> >seems to be more of a Tomcat 4.0.6 (old stable release) issue -
> Vic can you
> >confirm that you've been able to run this under Tomcat 4.0.6,
> please - the
> >error thrown is shown at the end of this email.
> >
> >Thanks,
> >
> >Hue.
> >
> >Also - thought I'd pass this on as this was better for me: For
> those who do
> >not want to add a container ds for testing and wish to use the ibatis
> >'SimpleDataSourceFactory' with just the connection details stored in the
> >local webapp... change the
> 'WEB-INF/Classes/properties/sql-map-config entry'
> >for the datasource, as follows:
> >
> >(obviously need to update ##HOST##, ##DB##, ##USER## and
> ##PASSWORD## to the
> >correct values)
> >
> ><datasource name = "ids"
> >
> >factory-class="com.ibatis.db.sqlmap.datasource.SimpleDataSourceFactory"
> >            default = "true" >
> >    <property name="JDBC.Driver" value="org.postgresql.Driver"/>
> >    <property name="JDBC.ConnectionURL"
> >value="jdbc:postgresql://##HOST##:5432/##DB##?autoReconnect=true"/>
> >    <property name="JDBC.Username" value="##USER##"/>
> >    <property name="JDBC.Password" value="##PASSWORD##"/>
> >    <property name="Pool.MaximumActiveConnections" value="10"/>
> >    <property name="Pool.MaximumIdleConnections" value="5"/>
> >    <property name="Pool.MaximumCheckoutTime" value="120000"/>
> >    <property name="Pool.TimeToWait" value="10000"/>
> >    <property name="Pool.PingQuery" value="select * from dual"/>
> >    <property name="Pool.PingEnabled" value="false"/>
> >    <property name="Pool.PingConnectionsOlderThan" value="0"/>
> >    <property name="Pool.PingConnectionsNotUsedFor" value="0"/>
> >    <property name="Pool.QuietMode" value="true"/>
> ></datasource>
> >
> >
> >
> >-- Error compiling under Tomcat 4.0.6 --
> >WEB-INF/portlets/blog/Blog.jsp [-1:-1]
> java.lang.ExceptionInInitializerError
> >        at java.lang.Class.forName0(Native Method)
> >        at java.lang.Class.forName(Class.java:140)
> >        at
> >org.apache.strutsel.taglib.html.ELFormTagBeanInfo.class$(ELFormTa
> gBeanInfo.j
> >ava:81)
> >        at
> >org.apache.strutsel.taglib.html.ELFormTagBeanInfo.getPropertyDesc
> riptors(ELF
> >ormTagBeanInfo.java:81)
> >        at
> >java.beans.Introspector.getTargetPropertyInfo(Introspector.java:436)
> >        at java.beans.Introspector.getBeanInfo(Introspector.java:372)
> >        at java.beans.Introspector.getBeanInfo(Introspector.java:144)
> >        at
> >org.apache.jasper.compiler.TagCache.setTagHandlerClass(TagCache.java:116)
> >        at
> >org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerat
> or.java:146
> >)
> >        at
> >org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.add
> Generator(A
> >nalyzerParseEventListener.java:154)
> >        at
> >org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.han
> dleTagBegin
> >(AnalyzerParseEventListener.java:962)
> >        at
> >org.apache.jasper.compiler.DelegatingListener.handleTagBegin(Dele
> gatingListe
> >ner.java:221)
> >        at
> >org.apache.jasper.compiler.DelegatingListener.handleTagBegin(Dele
> gatingListe
> >ner.java:216)
> >        at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:878)
> >        at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
> >        at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
> >        at org.apache.jasper.compiler.Parser.parse(Parser.java:1099)
> >        at
> >org.apache.jasper.compiler.ParserController.parse(ParserControlle
> r.java:214)
> >        at
> >org.netbeans.modules.web.jspparser.JspParserImpl.callTomcatParser
> (JspParserI
> >mpl.java:126)
> >        at
> >org.netbeans.modules.web.jspparser.JspParserImpl.analyzePage(JspP
> arserImpl.j
> >ava:93)
> >        at
> >org.netbeans.modules.web.core.jsploader.JspDataObject.createCompi
> ler(JspData
> >Object.java:297)
> >        at
> >org.netbeans.modules.web.core.jsploader.JspCompilerSupport.addToJ
> ob(JspCompi
> >lerSupport.java:62)
> >        at
> >org.openide.actions.AbstractCompileAction.prepareJobFor(AbstractC
> ompileActio
> >n.java:361)
> >        at
> >org.openide.actions.AbstractCompileAction.createJob(AbstractCompi
> leAction.ja
> >va:198)
> >        at
> >org.openide.actions.AbstractCompileAction.compile(AbstractCompile
> Action.java
> >:209)
> >        at
> >org.netbeans.modules.tomcat.tomcat40.autocompile.CompileServlet.p
> rocessReque
> >st(CompileServlet.java:76)
> >        at
> >org.netbeans.modules.tomcat.tomcat40.autocompile.CompileServlet.d
> oGet(Compil
> >eServlet.java:122)
> >        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> >        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >        at
> >org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
> >        at org.apache.tomcat.core.Handler.service(Handler.java:286)
> >        at
> >org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> >        at
> >org.apache.tomcat.core.ContextManager.internalService(ContextMana
> ger.java:79
> >7)
> >        at
> >org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> >        at
> >org.apache.tomcat.service.http.HttpConnectionHandler.processConne
> ction(HttpC
> >onnectionHandler.java:210)
> >        at
> >org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> >        at
> >org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.
> java:498)
> >        at java.lang.Thread.run(Thread.java:536)
> >Caused by: java.lang.NullPointerException
> >        at
> >org.apache.struts.util.MessageResources.getMessageResources(Messa
> geResources
> >.java:577)
> >        at
> org.apache.struts.taglib.html.FormTag.<clinit>(FormTag.java:140)
> >        ... 38 more
> >---
> >Outgoing mail is certified Virus Free.
> >Checked by AVG anti-virus system (http://www.grisoft.com).
> >Version: 6.0.474 / Virus Database: 272 - Release Date: 18/04/2003
> >
> >
> >
>
> _______________________________________________
> MVC-Programmers mailing list
> [email protected]
> http://www.basebeans.net:8080/mailman/listinfo/mvc-programmers
>
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.474 / Virus Database: 272 - Release Date: 18/04/2003
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.474 / Virus Database: 272 - Release Date: 18/04/2003