Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

multiple beans per jar

 
Trailboss
Posts: 23401
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I keep getting XML errors when I try to put two BMP Entity beans in one jar. Can someone point out what isn't working?
Here is my ejb-jar.xml:

and here is my weblogic-ejb-jar.xml

What am I doing wrong?
[This message has been edited by Paul Wheaton (edited October 02, 2000).]
 
Ranch Hand
Posts: 919
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Paul,
can I have a look at the xml files in which you try to deploy more than one bean?
 
paul wheaton
Trailboss
Posts: 23401
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Doh!

Okay, I changed the message above so it has the stuff for the two beans.
 
George Brown
Ranch Hand
Posts: 919
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is another tag that the xml parser could be looking for. Try substituting the 'container-transaction' sections of your ejb-jar.xml file (I think the parser could be looking for the 'method-intf' tag):

...and...

I hope that helps.
 
paul wheaton
Trailboss
Posts: 23401
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I finally got around to trying this and this doesn't fix it.
 
George Brown
Ranch Hand
Posts: 919
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Paul,
what is the text of the XML error message?
 
paul wheaton
Trailboss
Posts: 23401
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Deploying ejb-jar file into container (creates helper code)...
org.xml.sax.SAXParseException: XML declaration may only begin entities.
at com.sun.xml.parser.Parser.fatal(Parser.java:2797)
at com.sun.xml.parser.Parser.fatal(Parser.java:2785)
at com.sun.xml.parser.Parser.maybePI(Parser.java:938)
at com.sun.xml.parser.Parser.maybeMisc(Parser.java:1061)
at com.sun.xml.parser.Parser.parseInternal(Parser.java:478)
at com.sun.xml.parser.Parser.parse(Parser.java:283)
at weblogic.xml.dom.SunDOMParser.getDocument(SunDOMParser.java:69)
at weblogic.xml.dom.DOMParser.getDocument(DOMParser.java:102)
at weblogic.ejb.deployment.dd.DescriptorLoader.<init>(DescriptorLoader.java:151)
at weblogic.ejbc.runBody(ejbc.java, Compiled Code)
at weblogic.utils.compiler.Tool.run(Tool.java:80)
at weblogic.ejbc.main(ejbc.java:353)
--------------- nested within: ------------------
Received SAXParseException from Sun Parser at line 2, column -1: org.xml.sax.SAXParseException: XML
declaration may only begin entities.
at weblogic.xml.dom.SunDOMParser.getDocument(SunDOMParser.java:72)
at weblogic.xml.dom.DOMParser.getDocument(DOMParser.java:102)
at weblogic.ejb.deployment.dd.DescriptorLoader.<init>(DescriptorLoader.java:151)
at weblogic.ejbc.runBody(ejbc.java, Compiled Code)
at weblogic.utils.compiler.Tool.run(Tool.java:80)
at weblogic.ejbc.main(ejbc.java:353)
ERROR: Received SAXParseException from Sun Parser at line 2, column -1: org.xml.sax.SAXParseExceptio
n: XML declaration may only begin entities.
 
George Brown
Ranch Hand
Posts: 919
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have to admit that the xml files look fine to me. Have you got service pack 5? I believe amongst other fixes there were patches to some aspects of the xml parsing in service pack 1 to do with transaction isolation.
Also, are you running weblogic.ejbc from some wrapping program? this error apparently happens when the parser thinks that there is another still-active document. Assuming that you are, perhaps the fault wouldn't occur if it was running directly from the command-line.
I hope that helps.
 
paul wheaton
Trailboss
Posts: 23401
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found the error.
One of my XML files started with a blank line. Take out the blank line, and everything is rosy.
What the hell is up with that?
 
George Brown
Ranch Hand
Posts: 919
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's one in the eye for the Sun parsers. I'm glad you found it, I was drawing a blank
It is a bit typical though. I remember a number of years ago I was doing maintenance stuff on a system where the config files were ultra-fussy. I mean, if a tab happened to be spaces, or a space was in the wrong place, it would all fall over in a heap. It was horribly strict and problems would take many hours to root out.
In fact, now I come to think about it, 'make' is painfully fussy and I use that semi-regularly. And that's a standard tool.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic