Weird! I thought crimson.jar/jaxp.jar were included in rt.jar for jsk 1.4!!

I am trying a Wrox Books Example (Chapter 2 in Professional Java XML), and if I do this:
  java BookMain
I get this error:
  Exception in thread "main" java.lang.NullPointerException
    at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:524)
    at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
    at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:346)
    at wrox.book.BookMain.main(BookMain.java:34)
But if I do this:
  java -Xbootclasspath:D:\jaxp\jaxp-1.1\crimson.jar;D:\jaxp\jaxp-1.1\jaxp.jar;D:\jdk1.4\jre\lib\rt.jar BookMain
Then it works!!!
What's up with that? Is there a later version of crimson in jaxp1.1 than jdk1.4? Is there a known bug?

I found the same NullPointerException at the same place for the BookMain exercise. The solution (which took a while for me to determine) was to add a missing line in BookMain:
factory.setNameSpaceAware(true);
After that the code ran fine.
I'm surprised that the parsers die in such a case (rather than raising an exception saying they don't understand the namespace-related XML).

Similar Messages

  • Adf bc jar for base entity classes and extending them existing  project

    Hi,
    I am using jdev 11.1.1.0 and have created a base workspace/project and adf jar for my base entity classes.
    1. I can consume this base adf bc jar in a separate new consuming workspace and create VO based on base bc classes or create new EOs that extend base bc entity classes.
    2. Furthermore, for an existing consuming project that earlier included src/ of base entity (BC components), i can remove the dependency on bc source and bring in this new adf jar and everything including the view controller and the service/datacontrol works fine.
    The issue i am running into is as follows.
    - In the existing project (#2) above i try to create a couple of entities based on entities in my base jar; associations are automatically brought in. Note i am not overriding any attributes. My intent here is to generate .java and implement some code.
    - I then try to make my existing VOs based on the newly extended entity (VO overview->Entity Objects-> Shuttle NewEntity from Available to Selected)
    - I then try to remove the old EO from selected under VO overview->Entity Objects->Shuttle OldEntity from Selected back
    - I get a warning dialog box that says something to the effect that some viewlinks are dependent on these old EOs in this consuming project.
    - I tried to laboriously analyzed dependencies and it this dialog box does not make any sense as I have already extended EOs and the tooling should be able to let me use these
    My questions
    - Why I am not able to remove old entities from VO dependencies
    - Is it ok to leave the old EOs in "Selected" along with the newly extended EO ? What are the implications for this?
    - I also thought about extending base associations, but did not go anywhere.
    In general, I am ok with consuming an ADF BC jar that has entities etc. but not clear about removing dependencies of base EOs on VOs when entities are extended and consumed in a pre-existing project that used base entities.
    I can send a project if any PM is willing to take a look at it.
    Thanks,
    ps:
    I have already gone over the following info
    http://technology.amis.nl/blog/215/organization-of-bc4j-domain-eo-and-business-vo-package
    .. wants to create an enterprise data model in BC4J, reflecting the Enterprise Data Model set up in the RDBMS. All (or at least most) business rules will be implemented in the Middle Tier – to take the load of the database and also allow developers not comfortable with PL/SQL to define and maintain the business rules. It is clear that this means that all applications that need to access – and manipulate – the database, need to go through the BC4J foundation layer. Martijn wants to define the Entity Objects – and their business rules – only once and share that definition between different projects. Each projects can create its own ViewObjects on top of these shared Enterprise Entity Objects.
    http://radio-weblogs.com/0118231/2005/09/29.html
    I am currently working on a project for a partner where we will be using ADF BC as our model layer for a large application. In order to keep the footprint of each application module down to a reasonable size, we are intending to create a number of separate 'root' application modules for each functional area of the application. Within, these 'root' application modules we will then use nested application modules to further partition the application. All of the application modules will be accessing the same datasource and will need access to the same database objects.
    In order to separate our code between the development team and into function areas, our initial thoughts were that we would create an ADF BC model project containing Entity Objects for all of the database tables e.t.c. as these are common amongst all functional areas. We have configured all of the EOs for validation rules, defaulting values and extending doDML() as appropriate. Happy at this stage we then created a simple .jar file to deploy all of the definitions. Upon creating a new ADF BC project for each functional area we added the jar file as a library import into the new project. However when we the tried to create some new View Objects via the JDev Wizard we were unable to see the imported Entity Objects.
    Is the only way to share Entity Object definitions between different ADF BC projects to manually copy the source definition files into the new projects src directory? Since this would mean multiple copies of the same components, it could prove to be a maintenance nightmare.Is there a way of doing it without creating multiple copies of the same object definitions?
    The developer is spot on in their ideas of layering and reuse, and even has created a library for their reusable entities. This last step is not something everyone thinks to do. The missing step is known as "importing" components, so with that one extra bit of knowledge under his belt, he should be able to do exactly what he envisions. My little article called Difference Between Adding and Importing Business Components tries to explain the difference and gives the menu options to choose to perform the importing.
    Difference between adding and importing BC4J
    http://radio-weblogs.com/0118231/stories/2005/08/11/differenceBetweenAddingAndImportingBusinessComponents.html
    Working with Libraries of Reusable Business Components
    http://download.oracle.com/docs/cd/B32110_01/web.1013/b25947/bcadvgen.htm#CHEFECGD

    Hi,
    since you followed the OC4J developer guide I think this question might be better handled there as well
    OC4J
    So in case you don't get an answer here on the forum, try it on the OC4J forum
    Frank

  • SimpleCallbackHandler no longer in weblogic.jar for WebLogic 10.3g

    I was using the weblogic.security.SimpleCallbackHandler in WebLogic 9.2 to authenticate users. I looked at the documentation for 10.3g and it still mentions this class is available, however it is not in the weblogic.jar file nor in the javadocs. Here is the URL where I was looking. http://e-docs.bea.com/wls/docs103/security/thin_client.html#wp1035574.
    The only CallbackHandler in the 10.3g release seems to be the weblogic.security.URLCallbackHandler class. I tried replacing the SimpleCallbackHandler with this class. When I put the weblogic.jar in my classpath and build, I get the following error.
    class file for weblogic.security.acl.internal.AuthenticatedSubject not found
    ServletAuthentication.runAs(mySubject, request);
    Indeed, this class is not in the weblogic.jar file. Both SimpleCallbackHandler and AuthenticatedSubject were in the weblogic.jar for WebLogic 9.2
    <code>
    import javax.security.auth.Subject;
    import weblogic.security.SimpleCallbackHandler;
    import weblogic.security.services.Authentication;
    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    LoginForm loginForm = (LoginForm) form;
    Subject subject = Authentication.login(new SimpleCallbackHandler(loginForm.getUsername(), loginForm.getPassword().getBytes()));
    weblogic.servlet.security.ServletAuthentication.runAs(subject, request);
    <./code>
    Why were these removed and not deprecated???

    SimpleCallbackHandler does not exist in weblogic.jar. Used the following code to get around this. WebLogic documentation offers this as an alternative to using SimpleCallbackHandler.
    Subject subject = Authentication.login(new URLCallbackHandler(uid, pwd));
    weblogic.servlet.security.ServletAuthentication.runAs(subject, request);
    This code agrees with the snippet provided in WebLogic documentation
    Project does not compile with the following error:
    Project: C:\apps\11g\PrismMainApp\ViewController\ViewController.jpr
    C:\apps\11g\PrismMainApp\ViewController\src\adr\prismmain\view\managed\PrismLogin.java
    Error(70,28): cannot access weblogic.security.acl.internal.AuthenticatedSubject

  • Deployment Issues, Different  Jars for Diff Java in one application.

    HI,
    I need to put classpath (Jars) for my WEB-INF/classes. Different Jars for Diff files in one application.
    The problem is , for one ofmy application, the lib files are x.jar and y.jar , x is older than y but have same
    lib files. in x and y, there is one class , r.java , which have a method method1(). whey they are doing modifications in y.jar , the r.java has changed to new vertion, the method method1() they re-written the body.
    My application have 5 java files, in which 2 files uses r.java imported from the x.jar earlier.
    Now we need to use y.jar because , the y.jar have more files added with good futures. But the earlier 2 files are giving exception if i use y.jar.
    I need solution for this. how can i put classpath for the 2 files to use the x.jar and other files to use y.jar in the same application.
    I am using a Tomcat 4 server. only Servlets, JSPs I am using.
    Thank you,
    Kiran

    I may be missing something here, is y.jar a newer version of x.jar? And if it is do you need x.jar at all? Are there classes in x.jar that do not exist in y.jar? Can you modify your application to provide the same functionality and only use y.jar?

  • How to use two different ojdbc14.jar for two web application.

    Hi,
    I have two web application running in same tomcat, I need to use the two different ojdbc14.jar for two application, now both are taking the jars from tomcat common/lib directory, I tried copying the new ojdbc14.jar in web-inf/lib folder of one application, but it is not working.
    Could you please let me know whether this will take the jar from tomcat by befault or from web-inf, and a solution how to proceed with this.
    Thanks in advance.

    Yes, I tried removing the jars from common/lib, but as the connection string is mentioned inside the server.xml it is showing db connection error while trying to connect to the database

  • Including External JARs for Java Application in OC4J

    Hi Experts,
    Here is my requirement.
    I have developed my Java application using Tomcat Server & Eclipse. In my application I have used some External JARs & imported the classes in my JSP.
    Now that I'm using OC4J Server instead of Tomcat I'v no clue as to where I have copy these External JARs for my application to work.
    I have installed OBIEE-Client which includes OC4J server. The path where I have placed my application is as below
    *"C:\OracleBI\oc4j_bi\j2ee\home\default-web-app"*
    If I run my application the server does not import the classes in the JSP which we include using Import statement using JSP tags (*ex* - <%@ page import = "org.apache.commons.fileupload.*"%>).
    This is the location which I found, where I need to put my Java-J2EE application. This OC4J_BI comes with OBIEE.
    Kindly help me out on where to place these External JARs exact location in OC4J.
    Also let me know if I have to alter any configuration/xml file (if so pls specify the file name & its location).
    Thanks in advance,
    Venky

    You can either include the external libraries in the application, by placing them into WEB-INF/lib, or you can import them into the server as "shared libraries", normally you'd use the "enterprise manager" application to do this. Having loaded a shared library you then add it to the classpath when you're deploying the application.

  • Where is the jar for me to import?

    import javax.servlet.http.*; <--- showing error
    import kr.pe.okjsp.util.*;
    import com.oreilly.servlet.MultipartRequest;
    public class WriteServlet extends HttpServlet {  <--- showing error
    long long time ago, there was
    server.jar
    but in java 5.0, where is the jar for me to import?
    It would be really appreciated. Do I have to download j2ee for this?
    My memory is fuzzy...
    Thanks -

    Yes, it is part of EE not SE. Or you can get it/them from your application server's lib dir (which may or may not be a better choice).

  • Signing  a trusted jar for use with forms

    I have not found sufficient documentation on how to sign a new jar for use in conjunction with forms.
    I have read the descriptions in the getCLientInfo bean.
    This doesn't cover the whole subject.
    What must be done in Jinitiator? for instance.
    Can someone direct me to a more exhaustive source of information?
    I've done everything I can think of and /or discover and I'm still getting Security exceptions.
    Mick

    Adrienk wrote:
    is the a tutorial on how to open a .jar file and use it with in eclipse by keeping the same file structure?Is your shift key broken, or are you just too lazy to apply once at the start of each sentence?
    In any case, for Eclipse problems, see [http://www.google.com/#q=eclipse+forum].

  • SSL Cert used to sign Jars for distribution via WebStart

    Hi,
    I have an SSL cert (Comodo InstallSSL) for my website and wondered if I can use it to sign jars so, when distributed via webstart, the old "untrusted source" message doesn't get displayed. I've been doing a lot of reading but, to be honest, I can't really find my bearings! I have imported the cert into my keystore but get the message when I try to sign a jar:
    Certificate chain not found for: myalias  myalias must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain.I have the following files in relation to my cert:
    xxx.cabundle (this can be imported into keytool easily)
    cert/xxx.crt (looks like a PGP file, cannot be imported (-import) into keytool)
    private/xxx.key
    My questions I suppose are:
    1. Can I use a cert issued for SSL to sign jars for webstart distribution?
    2. If yes to 1; what steps other than importing the cert alone (which generates the message above) do I need to do to achieve this?
    Any help would be appreciated!
    Rich

    Hi,
    yes, the pkcs12 certificate includes the private key, as opposed to pb7 which does not.
    Sent from Cisco Technical Support Android App

  • [J2ME Polish] How to generate jad/jar for all devices?

    Hello,
    I've developed a J2ME Polish application using Netbeans 6.1 as IDE.
    Now I'd like to generate the corresponding jad/jar for all the existing devices. How can I do that?
    Furthermore, as soon as I'll have generated all these jar/jad, I'd like to put them all in a Web directory in order to make each device able to download the jad/jar corresponding to its configuration. How can I switch a given device towards the appropriate jad/jar in this Web directory?
    Help me please, I'm really confused!
    Thanks you in advance.
    /arkienou

    Even though JDK1.4 is not officially shipping the
    Java Plugin 1.4 documents on Security are fairly
    good. Check out :
    http://java.sun.com:80/j2se/1.4/docs/guide/plugin/developer_guide/contents.html
    http://java.sun.com:80/j2se/1.4/docs/guide/plugin/developer_guide/rsa_how.html
    regards,
    atsSun
    Sun Microsystems

  • Securing a jar for shipment

    Has anyone tried to secure a jar for packaging it up and shipping it off to
    a customer to avoid decompilation of the classes? For example, WinZip offers
    a password protection for a zip file, using the Zip 2.0 standard, which is
    not very secure.
    To BEA, do you know of a way of securing jars, but still having them read by
    WL at run time?
    Thanks,
    Evan Child
    [email protected]

    AFAIK this is impossible in Java. There are various tools such as obfuscators, and you can even encrypt the .class files if you supply a decrypting class loader, but at some point the byte codes have to appear in memory and from there they can be decompiled.

  • Small weblogic.jar for jms/j2ee clients of weblogic

              We are trying to create a smaller footprint for the ~38M weblogic.jar for distribution
              to our client applications to use the JMS and J2EE features of Weblogic 7.0sp2.
              I attempted to use the whitepaper document distributed by BEA for creating a smaller
              jar file, but it did not work. Has anyone else in the user community successfully
              created the jar file and if so could they give me some insight on how they did
              it.
              Thanks,
              Ashish
              

    Hi Ashish,
              I've personally used the "URL" class loader option with success,
              and I know that several customers have also used this option, as
              well as the other options for years. Feel free to
              post more detail than "it did not work", and I may be able
              to help you out.
              Tom, BEA
              P.S. If 8.1 is an option, you may with to consider using the
              thin client jars it supplies.
              Ashish Bisarya wrote:
              > We are trying to create a smaller footprint for the ~38M weblogic.jar for distribution
              > to our client applications to use the JMS and J2EE features of Weblogic 7.0sp2.
              > I attempted to use the whitepaper document distributed by BEA for creating a smaller
              > jar file, but it did not work. Has anyone else in the user community successfully
              > created the jar file and if so could they give me some insight on how they did
              > it.
              >
              > Thanks,
              > Ashish
              

  • Need WebLogic.jar for download

    I need WebLogic.jar for development .Kindly let me no from where can i get?

    Go to support.oracle.com
    Search for document id 763603.1
    OR
    edelivery.oracle.com and use the BEA WebLogic Media Pack
    Did you try creating a wlfullclient.jar?
    http://download.oracle.com/docs/cd/E14571_01/web.1111/e13717/jarbuilder.htm#BABCGHFH

  • Mapdef.jar  for mapviewer 10.1.2: where is it ?

    Good morning
    I need to have the file mapdef.jar for mapviewer version 10.1.2.
    I don't find it anywhere in the ORACLE site
    Thank for jour help
    Giuseppe AUTORE
    [email protected]

    Hi Giusepper,
    It is because Map Definition tool is not supported by Oracle anymore. They have produced new tool for managing metadata - MapBuilder, this tool have wider functionality and better user interface. Try to use it.
    Regards,
    Andrejus

  • Single or Universal Jar for JWSDP 2.0?

    Hello,
    JWSDP is comprised of many separate technologies, each with their own set of jars. I have not been able to find a single or universal jar in the distribution that I can easily deploy. One might obviously want a client jar, and a server jar. I would also like the client and server versions of the universal jar for for either standalone OR Tomcat deployment.
    Does anyone know if such universal jars exist, or will I be forced to create my own? If so, is there a list of jars that one would need to include to create a universal deployment jar?
    Thank You,
    Eric

    Hey my friend, in JWSDP2.0 I think there is no such universal jar. In each package they got its own lib dir, where you dont have all the jar files neccessary for that package. you have to move sonme jar here and there.SinceJWDSP2.0 is a new release, their distribution is little mess.
    Since I am now playing with JAX WS I can give you the list of jar file required for you to work properly with JAXWS example code and others.
    jaxb-api.jar
    jaxb-impl.jar
    jaxb-xjc.jar
    jaxws-api.jar
    jaxws-rt.jar
    jsr181-api.jar
    resolver.jar
    saaj-api.jar
    saaj-impl.jar
    Cheers
    Rajesh R

Maybe you are looking for

  • How to use a Java Thread in a Java Stored Procedure?

    I am working with java stored Procedures but i have a problem when i use threads.While the thread is running all the processes are blocked because the thread is not detatched.I don't know if it is impossible to use Thread in a java stored procedure.i

  • After upgrading to iOS 7.0 my iMessage doesn't work and it says it is "waiting for authorization". When I try to activate it, it won't connect.

    I upgraded to iOS 7.0 and now my iMessage doesn't work. My phone reads "waiting for activation" When I try signing in I get a message "Could not sign in. Please check your network connections and try again". My network connection is fine for all othe

  • Program Favor

    Will someone do me a huge favor and build a .exe for me using their app builder? I have the student edition and it let me build applications for a while, but the license expired and I was one version shy of the finished product! I'll attach the .vi a

  • Linking a Business partner to Territory ID

    Hi Experts, <b>By Programming i should link business partners (Role Employee) to the Territory ID,</b> when i am using a BAPI Function Module <b>'BAPI_TERRITORY_CHANGE'</b> i am getting an error <b>'Position is not define'</b>. How to rectify the err

  • Missing part of audiobook

    I purchased an audiobook from iTunes via my iPhone. I went to my downloads and purchases folder in itunes and nothing comes up. I recently started listening to it and realized I only have part one. I considered purchasing it again but I can't because