Displaying keyword search results 41 - 51
Created by Dr. Xi on June 01, 2010 16:44:12 Last update: June 01, 2010 16:45:52
I installed JDK 1.6 under C:\jdk1.6.0_20 and unpacked Eclipse GALILEO in C:\local\eclipse . When I launched Eclipse with eclipse.exe , it simply displayed a splash page and shutdown. Running eclipsec.exe displayed some vague errors:
C:\local\eclipse>eclipsec Error occurred during...Turning on debug:
C:\local\eclipse>eclipsec -debug Start VM: -Dos...The Solution: add -vm option to eclipse.ini :
Created by Dr. Xi on January 07, 2010 22:56:20 Last update: March 22, 2010 01:52:48
If the error reads:
java.lang.LinkageError: Class javax/xml/rpc/encodi...then the class javax.xml.rpc.encoding.TypeMappingRegistry is loaded by two or more different class loaders, and the versions are not compatible. For example, one might be under WEB-INF/lib, another might be loaded through an EJB. The solution is to get rid of the duplicate versions .
java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl cannot be cast to javax.xml.parsers.SAXParserFactory
Created by Dr. Xi on March 22, 2010 01:50:49 Last update: March 22, 2010 01:50:49
The class org.apache.xerces.jaxp.SAXParserFactoryImpl extends javax.xml.parsers.SAXParserFactory , so casting the former to the latter should not be a problem. This error occurs when there are two copies of javax.xml.parsers.SAXParserFactory loaded by two different class loaders, and you are trying to cast one to the other. Normally, you'll be able to find xml-apis.jar under WEB-INF/lib of the WAR file. Deleting the jar will resolve the problem.
OC4J: Exception creating EntityManagerFactory using PersistenceProvider class org.hibernate.ejb.HibernatePersistence for persistence unit DefaultPU
Created by Dr. Xi on March 02, 2010 00:07:48 Last update: March 02, 2010 00:07:48
OC4J didn't offer much help in the console. This is all it displayed:
2010-03-01 15:48:21.372 ERROR J2EE EJB-03027 [Fab...However, in the em console, Logs -> Diagnostic Logs gives more details: Message Text
[FabulousApp] An error occured deploying EJB mod...Supplemental Text
com.evermind.server.ejb.exception.DeploymentExcept...The error was caused by a relationship annotation between two entities, the referenced attribute was removed from the owner side:
Created by Dr. Xi on February 13, 2010 22:52:18 Last update: February 13, 2010 22:52:18
This runtime error happens when the Sun EL implementation is not available. Look for the class com.sun.el.ExpressionFactoryImpl in your deployment package, you probably won't find it, or you'll find a version that can't be loaded in your deployment environment. If you are using Maven to build, you can add the following repository and dependency in pom.xml :
<!-- Project dependencies --> <dependencies...
Created by Dr. Xi on February 10, 2010 23:39:37 Last update: February 10, 2010 23:39:37
Example web.xml that includes most frequently used elements. This sample is for Servlet Specification 2.4.
<?xml version="1.0" encoding="UTF-8"?> <web-ap...
Created by Dr. Xi on February 09, 2009 23:14:15 Last update: February 09, 2009 23:14:15
This example demonstrates the general steps in creating a custom Java class loader. Normally a class loader would consult its parent class loader when asked to load a class. If it's not loaded by the parent class loader, then the class loader would try to load the class on its own. This class loader tries to load the requested class on its own first, and delegates to the parent only when a java.lang.SecurityException is thrown (which happens when it tries to load core Java classes such as java.lang.String ). The classes are loaded from CLASSPATH through the getResourceAsStream call. It's important to note that when a class is loaded with a certain class loader, all classes referenced from that class are also loaded through the...
Created by Dr. Xi on January 30, 2009 16:57:12 Last update: January 30, 2009 17:25:36
The scriptable attribute defaults to false . However, even when you set it to true , there is a time delay between when the applet is loaded and when it becomes scriptable . The following code may fail:
Created by Dr. Xi on December 12, 2007 20:30:01 Last update: December 12, 2007 20:32:23
This is a script to tail a log file through the web browser. It uses AJAX, apache web server, mod_python, UNIX utilities tail (requires the --lines switch) and wc . The log file may reside on the web server or any other host accessible from the web server through SSH. Although it's written in python, it should be easy to port to other languages such as Perl. Apache httpd.conf :
LoadModule python_module modules/mod_python.so ...Python script:
import time, os from os.path import basename ...
Created by Dr. Xi on August 15, 2007 18:08:34 Last update: November 08, 2007 22:00:01
I had this problem when deploying a J2EE application into Oracle app server. It worked fine with an OC4J container configured in the default group. But it failed to start with an OC4J container I created. Here's a sample stack trace of the initialization exception:
07/08/14 13:32:46.34 10.1.3.3.0 Started 07/08/1...The problem was, the struts ActionServlet loads commons logging LogFactory, the log factory somehow knows that it needs log4j, but it can't load log4j since it's loaded by a different class loader. The solution for Oracle is to omit commons logging from the list of inherited libraries. Add this to META-INF/orion-application.xml solves the problem:
<imported-shared-libraries> <remove-inhe...Actually, this is a quite common problem with commons-logging. If you search the web, you'll find that people have...
Created by Dr. Xi on August 10, 2007 19:53:32 Last update: August 10, 2007 19:53:32
As a Java developer, I often need to find out which Jar file to include on my classpath in order to fix some compilation error (undefined package, class etc). This is a little Perl script I wrote to facilitate this task.
#!/bin/perl # find jar containing specified...