[jboss-user] [JBoss Portal] - Re: Exception when deploying on Mac OS X

timcu do-not-reply at jboss.com
Mon Sep 18 18:52:25 EDT 2006


I have tried two Macs, one running Java 1.4.2 and one running Java 1.5.0 and both had the same error.  The installation is the bundled jboss portal 2.4.0 and jboss AS 4.0.4 which is pretty simple to get running on fedora core 5.  I would like to get it working on Mac OS X so I am open to suggestions. The error message itself appears wrong

java.lang.IllegalArgumentException: Mixed content now allowed

should probably be

java.lang.IllegalArgumentException: Mixed content not allowed

I looked up the source of the exception in the source code for XML.java (see below) but that hasn't helped me solve the problem.

Regards

Tim

   /**
  |     * Get the element's content as a string.
  |     *
  |     * @param element the container
  |     * @param trim    true if text should be trimmed before returning result
  |     * @throws IllegalArgumentException if the element content is mixed or null
  |     */
  |    public static String asString(Element element, boolean trim) throws IllegalArgumentException
  |    {
  |       if (element == null)
  |       {
  |          throw new IllegalArgumentException("No null element allowed");
  |       }
  | 
  |       //
  |       StringBuffer buffer = new StringBuffer();
  |       NodeList children = element.getChildNodes();
  |       for (int i = 0; i < children.getLength(); i++)
  |       {
  |          Node child = children.item(i);
  |          switch (child.getNodeType())
  |          {
  |          case Node.CDATA_SECTION_NODE:
  |          case Node.TEXT_NODE:
  |             buffer.append(((Text)child).getData());
  |             break;
  |          case Node.ELEMENT_NODE:
  |             throw new IllegalArgumentException("Mixed content now allowed");
  |          default:
  |             break;
  |          }
  |       }
  |       String result = buffer.toString();
  |       if (trim)
  |       {
  |          result = result.trim();
  |       }
  |       return result;
  |    }
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972448#3972448

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972448



More information about the jboss-user mailing list