ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Yates <a...@powermarket.com>
Subject RE: Jar/ EJBs / Weblogic (general weirdness)
Date Thu, 03 May 2001 19:27:05 GMT

hmm... so I posted this last night, but it never showed up on the list ...
yet more strangeness, I guess :)

Anyway, we solved the problem below - it turns out that we had a class in
the 'default' package, and so the ejbjar baulked ... (I didn't stop to
figure out whether this is what's supposed to happen or not, but thought I'd
repost it so that others could ponder at their leisure :))
However, all is still not wonderful and shiny in my world - I have a new
problem, and was looking for ideas:

In the trace below, it would seem that my deployment descriptor is
malformed, -- but -- the DD is automatically generated (by EJBGen) in the
same way that we always have generated (with previous success) - and it --
does -- contain the "destination-type" 

This is an ejb20 bean (the destination-type is part of the description of a
message driven bean) - could this be the root of my problem? 

I'm using the jakarta-ant-1.4alpha-optional.jar (but with ant1.3) 

any help would be much appreciated!

thanks,

Andy



     [ejbc] org.xml.sax.SAXParseException: Element type "destination-type"
must be declared.
     [ejbc]     at
weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1008)
     [ejbc]     at
weblogic.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLEr
ror(XMLValidator.java:1236)
     [ejbc]     at
weblogic.apache.xerces.validators.common.XMLValidator.validateElementAndAttr
ibutes(XMLValidator.java:2673)
     [ejbc]     at
weblogic.apache.xerces.validators.common.XMLValidator.callStartElement(XMLVa
lidator.java:818)
     [ejbc]     at
weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispat
ch(XMLDocumentScanner.java:1222)
     [ejbc]     at
weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentSca
nner.java:380)
     [ejbc]     at
weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:900)
     [ejbc]     at
weblogic.xml.process.ProcessorDriver.process(ProcessorDriver.java:128)
     [ejbc]     at
weblogic.ejb20.dd.xml.EjbJarLoader_EJB20.process(EjbJarLoader_EJB20.java:919
)
     [ejbc]     at
weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:74)
     [ejbc]     at
weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:47)
     [ejbc]     at
weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:38)
     [ejbc]     at weblogic.ejbc20.runBody(ejbc20.java:327)
     [ejbc]     at weblogic.utils.compiler.Tool.run(Tool.java:81)
     [ejbc]     at weblogic.ejbc20.main(ejbc20.java:419)
     [ejbc] --------------- nested within: ------------------
     [ejbc] weblogic.xml.process.XMLParsingException: Element type
"destination-type" must be declared. - with nested exception:
     [ejbc] [org.xml.sax.SAXParseException: Element type "destination-type"
must be declared.] Line: 19 Column: 27
     [ejbc]     at
weblogic.xml.process.ProcessorDriver.process(ProcessorDriver.java:132)
     [ejbc]     at
weblogic.ejb20.dd.xml.EjbJarLoader_EJB20.process(EjbJarLoader_EJB20.java:919
)
     [ejbc]     at
weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:74)
     [ejbc]     at
weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:47)
     [ejbc]     at
weblogic.ejb20.dd.xml.DDUtils.loadDeploymentDescriptor(DDUtils.java:38)
     [ejbc]     at weblogic.ejbc20.runBody(ejbc20.java:327)
     [ejbc]     at weblogic.utils.compiler.Tool.run(Tool.java:81)
     [ejbc]     at weblogic.ejbc20.main(ejbc20.java:419)
     [ejbc] ERROR: weblogic.xml.process.XMLParsingException: Element type
"destination-type" must be declared. - with nested exception:
     [ejbc] [org.xml.sax.SAXParseException: Element type "destination-type"
must be declared.] Line: 19 Column: 27
     [ejbc] Java Result: 1




> -----Original Message-----
> From: Andy Yates 
> Sent: Thursday, May 03, 2001 1:10 AM
> To: 'ant-user@jakarta.apache.org'
> Subject: RE: Jar/ EJBs / Weblogic (general weirdness)
> 
> 
> I don't know! I can't seem to get ejbjar to work for the life of me...
> 
> here's the target I'm using:
> 
>     <target name="ejbJar" depends="compileSource">
>        <copy todir="${build.metainf.dir}">
>           <fileset dir="${build.src.dir}"> 
> 	     <include name="*-jar.xml"/>
> 	  </fileset>
>        </copy>
>        <ejbjar descriptordir="${build.metainf.dir}"
> 	         srcdir="${build.classes.dir}"
>                destdir="${build.jars.dir}"
> 	         classpath="${classpath}"
> 	         basejarname="powermarket">
> 	         <support dir="${build.classes.dir}">
> 		     <include name="**/*.class"/>
> 		     <exclude name="**/*Bean.class"/>
> 	         </support>
> 	       <weblogic destdir="${build.jars.dir}"/>
> 	       <include name="*ejb-jar.xml"/>
> 	       <exclude name="*weblogic*.xml"/>     
>        </ejbjar>
>    </target>
> 
> but it throws this exception:
> <--->
> ejbJar:
>      [copy] Copying 3 files to D:\andy\dev\main\build\META-INF
>    [ejbjar] building powermarket.jar with 121 files
> 
> BUILD FAILED
> 
> java.lang.StringIndexOutOfBoundsException: String index out 
> of range: -1
>         at java.lang.String.substring(String.java:1503)
>         at 
> org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTo
> ol.writeJar(Unknown Source)
>         at 
> org.apache.tools.ant.taskdefs.optional.ejb.WeblogicDeploymentT
> ool.writeJar(Unknown Source)
>         at 
> org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTo
> ol.processDescriptor(Unknown Source)
>         at 
> org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.execute(Unkn
> own Source)
>         at org.apache.tools.ant.Target.execute(Target.java:153)
>         at org.apache.tools.ant.Project.runTarget(Project.java:898)
>         at 
> org.apache.tools.ant.Project.executeTarget(Project.java:536)
>         at 
> org.apache.tools.ant.Project.executeTargets(Project.java:510)
>         at org.apache.tools.ant.Main.runBuild(Main.java:421)
>         at org.apache.tools.ant.Main.main(Main.java:149)
> Total time: 30 seconds
> String index out of range: -1
> <--->
> 
> I think that this _may_ be because my -ejb-jar.xml file is 
> actually 'ejb-jar.xml' - but this is not much more than a 
> wild guess... 
> 
> do you have any ideas?
> 
> many thanks,
> 
> Andy
> 
> 
> 
> 
> > -----Original Message-----
> > From: Les Hughes [mailto:leslie.hughes@rubus.com]
> > Sent: Wednesday, May 02, 2001 1:32 AM
> > To: 'ant-user@jakarta.apache.org'
> > Subject: RE: Jar/ EJBs / Weblogic (general weirdness)
> > 
> > 
> > 
> > Hi,
> > 
> > Do you get the same problem when using the ejbjar / weblogic tasks?
> > 
> > Bye,
> > Les
> > 
> > 
> > > -----Original Message-----
> > > From: Andy Yates [mailto:andy@powermarket.com]
> > > Sent: 02 May 2001 06:47
> > > To: 'ant-user@jakarta.apache.org'
> > > Subject: Jar/ EJBs / Weblogic (general weirdness)
> > > 
> > > 
> > > hi - so I have a somewhat confusing problem... (but then, 
> > > aren't they all?
> > > :))
> > > 
> > > we're creating an EJB jar using the jar task:
> > > 
> > > <jar jarfile="${build.jars.dir}/pm_classes${time.stamp}.jar"
> > >       compress="false">
> > >     <fileset dir="${build.classes.dir}"/>
> > >     <fileset dir="${build.isv.dir}"
> > > 	   includes="**/*.class"/>
> > >     <fileset dir="${pm.main.dir}/build"
> > > 	           includes="META-INF/**"/>
> > > </jar>
> > > 
> > > and then running weblogic.ejbc on it, so as to make the 
> > deployable jar
> > > 
> > > <target name="ejbc">
> > >      <java classname="weblogic.ejbc" 
> > >              classpath="${external.classes}"
> > > 	 fork="yes">
> > >           <arg value="${build.jars.dir}/pm_classes.jar"/>
> > >           <arg value="${build.jars.dir}/pm_ejbc_classes.jar"/>  
> > >      </java>
> > > </target>
> > > 
> > > so far so good....
> > > 
> > > however, when we try and deploy this, a 
> > > ClassNotFoundException is thrown,
> > > for a class that is in the jar file!
> > > 
> > > being the curious lot that we are, we decided to unjar, and 
> > > then re-jar the
> > > said file manually (that is, 'jar -xvf pm_ejbc_classes.jar' 
> > > followed by
> > > deleting pm_classes.jar, and then 'jar -cvf 
> > > pm_ejbc_classes.jar *' in a
> > > temporary directory) ... and suddenly all is well, and 
> the jar file
> > > deploys!!
> > > 
> > > does anyone have any idea why this might be? how can I make 
> > > it work in ant?
> > > 
> > > many thanks!
> > > 
> > > Andy
> > > 
> > > 
> > > 
> > > ps - here's the stack trace from the WL server:
> > > 
> > > weblogic.ejb20.EJBDeploymentException: Error deploying 
> > > stateless EJB; nested
> > > exception is:
> > >         javax.naming.CommunicationException [Root exception is
> > > java.rmi.UnmarshalException: error unmarshalling arguments; 
> > > nested exception
> > > is:
> > >         java.lang.ClassNotFoundException:
> > > com.powermarket.extract.webl.WebLEvaluatorBeanEOImpl_WLStub:  
> > > This error
> > > could indicate that a component was deployed on a  cluster 
> > > member but not
> > > other members of that cluster. Make sure that any component 
> > > deployed on a
> > > server that is part of a cluster is also deployed on all 
> > > other members of
> > > that cluster]
> > > javax.naming.CommunicationException.  Root exception is
> > > java.rmi.UnmarshalException: error unmarshalling arguments; 
> > > nested exception
> > > is:
> > >         java.lang.ClassNotFoundException:
> > > com.powermarket.extract.webl.WebLEvaluatorBeanEOImpl_WLStub:  
> > > This error
> > > could indicate that a component was deployed on a  cluster 
> > > member but not
> > > other members of that cluster. Make sure that any component 
> > > deployed on a
> > > server that is part of a cluster is also deployed on all 
> > > other members of
> > > that cluster
> > >         java.lang.ClassNotFoundException:
> > > com.powermarket.extract.webl.WebLEvaluatorBeanEOImpl_WLStub:  
> > > This error
> > > could indicate that a component was deployed on a  cluster 
> > > member but not
> > > other members of that cluster. Make sure that any component 
> > > deployed on a
> > > server that is part of a cluster is also deployed on all 
> > > other members of
> > > that cluster 
> > > 
> > > oh yeah - there is only one server in my 'cluster', and (as 
> > > you can see) for
> > > some reason, the exception is thrown 3 times....
> > > 
> > 
> 

Mime
View raw message