ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: SQLMaps and Web Services in the same application
Date Fri, 12 Aug 2005 01:26:06 GMT
Thanks! I added that to the WIKI...

Larry

On 8/11/05, Colin Lamond <mlist@lamond.co.uk> wrote:
> Hi,
> 
> I thought I would update the list to the solution.
> 
> I am using the Sun WSDK 1.6 (Web Service Development Kit) which is shipped
> with JAXP 1.3.
> 
> I am also running on J2SE 1.4, which includes JAXP1.1.
> 
> JAXP 1.1 and 1.3 are not compatible at all as they come from completely
> different code bases.
> 
> To resolve this issue I have made the JVM ignore the shipped 1.1 version
> and use 1.3 throughout, to do this use the endorsed option to override 1.1
> with 1.3, e.g.
> 
> java -Djava.endorsed.dirs=C:\jaxp\lib;C:\jaxp\lib\endorsed -cp C:\build
> TestClass
> 
> Colin.
> 
> 
> > Looks like a classloader issue. You probably have a newer or older
> > version of that class in a jar file somewhere. And no, renaming jars
> > will make no difference. I'd recommend you start by hitting jarhoo:
> > www.jarhoo.com, which will tell you in what jar files certain classes
> > are commonly found.
> >
> > If you're running as a standalone app you should be able to track this
> > down by looking at your classpath. If you're running inside a web or EJB
> > container, then you're just going to have to dig through whatever
> > documentation or net lore you can find on the classloader architecture
> > for that container. That should help you figure out what order things
> > are being picked up and may give you an idea where you should place
> > certain jars to get the correct behavior.
> >
> > Be prepared for this to be painful and tedious, classloader problems
> > usually are.
> >
> > Jim
> >
> >
> > -----Original Message-----
> > From: Colin Lamond [mailto:mlist@lamond.co.uk]
> > Sent: Wednesday, August 10, 2005 1:48 PM
> > To: user-java@ibatis.apache.org
> > Subject: Re: SQLMaps and Web Services in the same application
> >
> >
> > Hi,
> >
> > I have tried as suggested renaming the jar files, but this did not fix
> > the problem as the jar files are simply containers for the classes and
> > it is fairly irrelevant what their names are.
> >
> > The problem appears to be that when the
> >
> > SqlMapClientBuilder.buildSqlMapClient(reader);
> >
> > is called with the saxrpc jar files in the class path the
> > javax.xml.parsers.DocumentBuilderFactory.getSchema() method is not
> > found.
> >
> > What could make this method no longer available to sqlmaps?
> >
> > Colin.
> >
> >
> >> Hey.
> >>
> >> Have you tried just renaming the sun ones (JWSDP) to sun-xxxx.jar and
> >> keeping both in your lib directory?
> >>
> >> regards
> >>
> >> Eoin
> >>
> >> Colin Lamond wrote:
> >>
> >>>Hi,
> >>>
> >>>I have been using SQL Maps for Java for some time now and have just
> >>>started work on a project that is using SQL Maps and accessing a web
> >>>service.
> >>>
> >>>The web service stub code has been built using the Java Web Services
> >>>Developer Pack (Java WSDP). My client test project works fine, but as
> >
> >>>soon as I try to use SQL maps in the same project I run into problems.
> >>>
> >>>When I do
> >>>
> >>>SqlMapClientBuilder.buildSqlMapClient(reader);
> >>>
> >>>I get the following error
> >>>
> >>>java.lang.NoSuchMethodError:
> >>>javax.xml.parsers.DocumentBuilderFactory.getSchema()Ljavax/xml/validat
> > ion/Schema;
> >>>        at
> >>>com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.<init>(Unk
> >>>nown
> >>>Source)
> >>>        at
> >>>com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.new
> > DocumentBuilder(Unknown
> >>>Source)
> >>>        at
> >>>com.ibatis.common.xml.NodeletParser.createDocument(NodeletParser.java:
> > 135)
> >>>        at
> >>> com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:50)
> >>>        at
> >>>com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapCo
> > nfigParser.java:78)
> >>>        at
> >>>com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapC
> > lientBuilder.java:62)
> >>>        at
> >>>com.channel4.quizCall.answers.daemon.db.SqlMapsConfig.<clinit>(SqlMaps
> > Config.java:64)
> >>>        at
> >>>com.channel4.quizCall.answers.daemon.AnswersDEngine.runEngine(AnswersD
> > Engine.java:53)
> >>>        at
> >>>com.channel4.quizCall.answers.daemon.AnswersD.main(AnswersD.java:39)
> >>>
> >>>I have discovered that this is only the case when I place the saxrpc
> >>>jars on my class path (jaxrpc-impl.jar jaxrpc-spi.jar jaxrpc-api.jar
> >>>activation.jar jax-qname.jar) that are required for the web service.
> >>>If I remove these then the web service client does not work, if I add
> >>>them  then sqlmaps does not work.
> >>>
> >>>Can any one point me in the direction of the solution to this problem?
> >>>
> >>>Thanks,
> >>>Colin.
> >>>
> >>>
> >>>
> >>>
> >>
> >
> >
> >
> 
> 
>

Mime
View raw message