Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
Namespace Dropped

Namespace Dropped

2006-10-03       - By Jason Hunter

 Back
Reply:     1     2  

When I run your input sample through SAXBuilderDemo I get this:

The prefix "resources.jms" for element "resources.jms:JMSProvider" is
not bound.

So it seems you didn't send a full sample file.  I also notice your
opening and closing tags don't match.  If you can send in a real sample
file that shows the error, that'd be helpful.  Also, please remove
anything from the file that doesn't contribute to the error, but please
also run it through SAXBuilderDemo (incl with the distribution) to make
sure it's well formed.

-jh-

Mike Aymard wrote:
> Hello,
>
>  
>
> I'm fairly new to JDOM and am having an issue with namespaces. I am
> reading an xml file, making a small change and then writing it back out.
> What's happening is that the "xmi:" prefix is being dropped from the
> attributes. Not sure if it?s because the xml is not properly formed to
> begin with, but it?s not my file, rather something I must modify.
>
>  
>
> Here's a sample of the input file:
>
>  
>
> <?xml version="1.0" encoding="UTF-8 (See http://UTF-8.ora-code.com)"?>
>
> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:resources.j2c="http://www.ibm.com/websphere/appserver/schemas/5.0
/resources.j2c.xmi">
>
>   <resources.jms:JMSProvider xmi:id="builtin_jmsprovider"
> name="WebSphere JMS Provider" description="Built-in WebSphere JMS
> Provider" externalInitialContextFactory="" externalProviderURL="">
>
>     <factories xmi:type="resources.jms.internalmessaging:WASQueue"
> xmi:id="WASQueue_1112308680518" name="CancelInventoryQ"
> jndiName="jms/mq/ecom/out/cancelInventoryQ" node="localhost"
> persistence="APPLICATION_DEFINED" priority="APPLICATION_DEFINED"
> specifiedPriority="0" expiry="APPLICATION_DEFINED" specifiedExpiry="0"/>
>
>   <resources.jdbc:JDBCProvider xmi:id="JDBCProvider_1106536192663"
> name="Oracle Thin JDBC Provider" description="Oracle JDBC Thin Driver">
>
>     <classpath>${ORACLE_JDBC_DRIVER_PATH}/ojdbc14.jar</classpath>
>
>     <factories xmi:type="resources.jdbc:DataSource"
> xmi:id="DataSource_1106536192663" name="GID Data Source"
> jndiName="jdbc/gidd1" description="An Oracle DataSource." category=""
> authDataAlias="GIDD1" statementCacheSize="10"
> datasourceHelperClassname="com.ibm.websphere.rsadapter.OracleDataStoreHelper"
> relationalResourceAdapter="builtin_rra">
>
>       <propertySet xmi:id="J2EEResourcePropertySet_1106536192665">
>
>         <resourceProperties xmi:id="J2EEResourceProperty_1106536192667"
> name="driverType" type="java.lang.String" value="" description="The type
> of the driver. The possible values are: thin, oci8." required="false"/>
>
>       </propertySet>
>
>       <connectionPool xmi:id="ConnectionPool_1106536192663"
> connectionTimeout="1800" maxConnections="10" minConnections="1"
> reapTime="180" unusedTimeout="1800" agedTimeout="0"
> purgePolicy="EntirePool"/>
>
>       <mapping xmi:id="MappingModule_1106536192665"
> mappingConfigAlias="DefaultPrincipalMapping" authDataAlias="GIDD1"/>
>
>     </factories>
>
>   </resources.jdbc:JDBCProvider>
>
> </xmi:XMI>
>
>  
>
> After writing out the file, the "xmi:" prefix has been removed from the
> attributes, such as xmi:id. This causes an error when the outputted xml
> file is used by its application.
>
>  
>
> <?xml version="1.0" encoding="UTF-8 (See http://UTF-8.ora-code.com)"?>
>
> <xmi:XMI xmlns:xmi="http://www.omg.org/XMI"
> xmlns:resources.j2c="http://www.ibm.com/websphere/appserver/schemas/5.0
/resources.j2c.xmi"
> version="2.0">
>
>   <resources.jms:JMSProvider id="builtin_jmsprovider" name="WebSphere
> JMS Provider" description="Built-in WebSphere JMS Provider"
> externalInitialContextFactory="" externalProviderURL="">
>
>     <factories type="resources.jms.internalmessaging:WASQueue"
> id="WASQueue_1112308680518" name="CancelInventoryQ"
> jndiName="jms/mq/ecom/out/cancelInventoryQ" node="localhost"
> persistence="APPLICATION_DEFINED" priority="APPLICATION_DEFINED"
> specifiedPriority="0" expiry="APPLICATION_DEFINED" specifiedExpiry="0" />
>
>   </resources.jms:JMSProvider>
>
>   <resources.jdbc:JDBCProvider id="JDBCProvider_1106536192663"
> name="Oracle Thin JDBC Provider" description="Oracle JDBC Thin Driver">
>
>     <classpath>${ORACLE_JDBC_DRIVER_PATH}/ojdbc14.jar</classpath>
>
>     <factories type="resources.jdbc:DataSource"
> id="DataSource_1106536192663" name="GID Data Source"
> jndiName="jdbc/gidd1" description="An Oracle DataSource." category=""
> authDataAlias="GIDD1" statementCacheSize="10"
> datasourceHelperClassname="com.ibm.websphere.rsadapter.OracleDataStoreHelper"
> relationalResourceAdapter="builtin_rra">
>
>       <propertySet id="J2EEResourcePropertySet_1106536192665">
>
>         <resourceProperties id="J2EEResourceProperty_1106536192667"
> name="driverType" type="java.lang.String" value="" description="The type
> of the driver. The possible values are: thin, oci8." required="false" />
>
>       </propertySet>
>
>       <connectionPool id="ConnectionPool_1106536192663"
> connectionTimeout="1800" maxConnections="10" minConnections="1"
> reapTime="180" unusedTimeout="1800" agedTimeout="0"
> purgePolicy="EntirePool" />
>
>       <mapping id="MappingModule_1106536192665"
> mappingConfigAlias="DefaultPrincipalMapping" authDataAlias="GIDD1" />
>
>     </factories>
>
>   </resources.jdbc:JDBCProvider>
>
> </xmi:XMI>
>
>  
>
> Is there something I can do to prevent it from being remove or somehow
> put it back? Any help would be greatly appreciated.
>
>  
>
> Thanks!
>
> Mike
>
>  
>
>  
>
>
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
>
> __ ____ ____ ____ ____ ____ ____ ____ ____ ____
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
__ ____ ____ ____ ____ ____ ____ ____ ____ ____
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.