Archive for January, 2006

Xerces parser error in applet

Written by coregps on Friday, January 27th, 2006 in Java.

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

I’m using Mapxtreme for Java 4.7.1 with JDK 1.5 and Tomcat 5.5.7 on Windows 2000 Server and I developed a mapxtreme for java applet, in this applet I defined two public methods. One is used to create the contour annotation layer, the other is used to search the point features covered by the region on the contour layer. This applet runs perfectly in applet viewer. However, when I invoked the second method using javascript in jsp page, I got the following exception:

java.lang.RuntimeException: org.jdom.JDOMException: Could not load org.apache.xerces.parsers.SAXParser: SAX2 driver class org.apache.xerces.parsers.SAXParser not found: org/apache/xerces/parsers/SAXParser
 at com.mapinfo.xmlprot.mxtj.bm.createRendition(Unknown Source)
 at com.mapinfo.xmlprot.mxtj.bm.createRendition(Unknown Source)
 at com.mapinfo.util.bi.createRendition(Unknown Source)
 at com.mapinfo.dp.util.msf.cl.b(Unknown Source)
 at com.mapinfo.dp.util.msf.cl.getNextFeature(Unknown Source)
 at com.mapinfo.dp.util.RewindableFeatureSet.getNextFeature(Unknown Source)
 at SimpleMap.drawContour(SimpleMap.java:707)
 at SimpleMap.contour(SimpleMap.java:411)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at sun.plugin.javascript.JSInvoke.invoke(Unknown Source)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
 at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)
 at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
 at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at sun.plugin.com.DispatchImpl.invoke(Unknown Source)

I thought it must be the problem of classloader. I tried to put the jar files xercexImpl.jar, xml-apis.jar, jdom.jar, xalan.jar in all of the following directories:

Applet directory
Tomcat/Common/lib
Tomcat/Common/endorsed
myApp/WEB-INF/lib

But no luck. Finally, I found the solution at the Apache Xerces site. Just create a directory named “endorsed” under JRE/lib directory and copy the jar file “xercesImpl.jar” to this directory. This operation is to override the JAXP implementation in JDK1.4 and above. However, Putting this JAR to another location like lib/ext WILL NOT WORK. After doing this, my applet works fine. You can visit http://java.sun.com/j2se/1.5.0/docs/guide/standards/ for more information.

Here, I also want to thank Roel De Nijs for his kindly help!

Unable to load php_mysql.dll

Written by coregps on Wednesday, January 18th, 2006 in MySQL.

When configuring apache 2.0.55 with php 5.0.4 on Windows Server 2003, I got the error message: ?PHP Startup: Unable to load dynamic library ?D:\Apache2\php\ext\php_mysql.dll? - The specified module could not be found.? To make it work, just copy the libmysql.dll come with the PHP distribution into c:\windows\system32.

6-week Java Intro Programming Online Bootcamp has already begun

Written by coregps on Tuesday, January 17th, 2006 in Java.

The free “6-week Java Intro Programming Online Bootcamp” course taught by Sang Shin has already begun from Jan. 16th, 2006. This bootcamp is for anyone who wants to learn Java programming for the first time.  In this course, students will learn how to write, compile, and run Java programs. They will also learn essential object oriented programming concepts such as inheritance and polymorphism. Students will write and run the Java programs using both command line tools and NetBeans IDE.

Each week, students are expected to do weekly homework after studying the presentation and hands-on lab material. There is also class group alias where students can ask questions.

The only thing you have to do in order to register for the course is sending an email to the following address.

javaintro1-subscribe@yahoogroups.com

For detailed information about this bootcamp, please go to the following websites.

Course website: http://www.javapassion.com/javaintro1
Course schedule: http://www.javapassion.com/javaintro1/Class.html
Course group alias: http://groups.yahoo.com/group/javaintro1/



Site Navigation