I want to lean j2ee deployment descriptor, help
I want to learn about deployment descriptor -- the .xml concept on j2ee, where I can seek help?
I learnt it from the servlet specifications.
You can download the servlet specifications from http://java.sun.com/products/servlet/download.html#specs
Especially chapter 13, if you decide to download servlet specifications 2.2
Similar Messages
-
How to do JAAS and J2EE Deployment Descriptor ACL in WLS
The examples on this website and shipped with WLS stink. Does there exist a GOOD
example of how to
Log in with a form
authenticate (I guess using j_security_check to hook into the web.xml security)
then pull a user from a database and use the roles defined there for authorization
in the rest of the system?
The weblogic examples are from java clients to RMI (ya, thats handy). They also
sit alone. They dont say how to hook them into weblogic. They say to use JAAS
but they have just JAAS examples! No hooking of it into an EJB, servlet, etc!
They also dont show how to hook that code into WLS to use it as your security
module!
Help, I'm at a loss.
They recommend using JAAS but their documentation and examples of doing so suck
or are non existant. We have a complex real world product and need examples of
the same. Stupid, stand alone examples that teach nothing do no help.
frustrated at BEA for their poor documentation and support,
MikeAlso, I use struts....
In struts you have to extend the Action class which then calls the perform()
method on your servlet.
So to call an EJB I have to have my servlet implement PrivilegedAction?
If so, then this wants a run() method. Struts calls perform so that means
I'm going to have to make another class to call from my servlet with a run
method()? Or I'm going to have my servlet implement PrivledgedAction and
call Security.runAs()?
What if I just want to call the EJB from my servlet and put my security
credentials in the JNDI lookup? I want the container to use the roles of the
user in the JNDI lookup to authorize methods based on the deployment
descriptors.
thanks,
Mike
"Vimala Ranganathan" <[email protected]> wrote in message
news:[email protected]...
Hi Micheal,
Attached is an exmaple of JAAS login and invoking an EJB.
Let me know if this turns out to be useful.
Regarding the form based authentication, Could you be more clear on whatissue you are
facing?
Just as note, when you use form based login, WLS would authenticate theuser against
the realm
WLS is setup for, which could be a file Realm, or a RDBMS realm (in whichcase users
and groups are from database)
Roles cannot be defined at the database level. This needs to be atapplication level
which you can define in web.xml or
console(in 7.0)
If you need any specific help or more information please let me know.
Vimala
Michael Lee wrote:
The examples on this website and shipped with WLS stink. Does there
exist a GOOD
example of how to
Log in with a form
authenticate (I guess using j_security_check to hook into the web.xmlsecurity)
then pull a user from a database and use the roles defined there forauthorization
in the rest of the system?
The weblogic examples are from java clients to RMI (ya, thats handy).They also
sit alone. They dont say how to hook them into weblogic. They say to useJAAS
but they have just JAAS examples! No hooking of it into an EJB, servlet,etc!
They also dont show how to hook that code into WLS to use it as yoursecurity
module!
Help, I'm at a loss.
They recommend using JAAS but their documentation and examples of doingso suck
or are non existant. We have a complex real world product and needexamples of
the same. Stupid, stand alone examples that teach nothing do no help.
frustrated at BEA for their poor documentation and support,
Mike -
How to do JAAS and J2EE Deployment Descriptor ACL : Please help
I am trying to develop a Single sign on application using EJB's, JAAS,
ACL, struts and JSP to Log in with a form authenticate (using
j_security_check to hook into the web.xml security) then pull a user
from a database and use the roles defined there for authorization in
the rest of the system?
The examples on the web are from java clients to RMI, they also sit
alone. They dont say how to hook them into weblogic. They say to use
JAAS but they have just JAAS examples! No hooking of it into an EJB,
servlet, etc! They also dont show how to hook that code into web
server to use it as your security module!
What Settings/configuration I need to make in the web server for JAAS
to work. How the logic proceeds to authorization after form is
submitted using j_security_check. and to further logic in the
application. How is it then integrated with the Struts action forms.
Help, I'm at a loss. They recommend using JAAS but their documentation
and examples do not explain how. We have a complex real world product
and need examples of
the same. Can somebody provide me a working real-life example which
really work and give me some pointers to proceeds that will be really
helpful.
Thanks in advance for the help.I am trying to develop a Single sign on application using EJB's, JAAS,
ACL, struts and JSP to Log in with a form authenticate (using
j_security_check to hook into the web.xml security) then pull a user
from a database and use the roles defined there for authorization in
the rest of the system?
The examples on the web are from java clients to RMI, they also sit
alone. They dont say how to hook them into weblogic. They say to use
JAAS but they have just JAAS examples! No hooking of it into an EJB,
servlet, etc! They also dont show how to hook that code into web
server to use it as your security module!
What Settings/configuration I need to make in the web server for JAAS
to work. How the logic proceeds to authorization after form is
submitted using j_security_check. and to further logic in the
application. How is it then integrated with the Struts action forms.
Help, I'm at a loss. They recommend using JAAS but their documentation
and examples do not explain how. We have a complex real world product
and need examples of
the same. Can somebody provide me a working real-life example which
really work and give me some pointers to proceeds that will be really
helpful.
Thanks in advance for the help. -
Need help in resolving J2EE Deployment SPI error BEA-260101
I have a portal application (ear) currently working on weblogic 10.2. I upgraded my project to 10.3 using workshop, then made an ear and deployed it on 10.3
The following error is being displayed on 10.3.
+<Error> <J2EE Deployment SPI> <BEA-260101> <Parameter 'DDBeanRoot' may not be null.>+
Any help in resolving this will be highly appreciated.Hi,
The following is the description of the error :-
BEA-260101 Error: Parameter 'paramName' may not be null.
Description Misuse of an API
Cause A null parameter was passed to the method.
Action Resolve client programming error
Link:[wls/docs100/messages/SPIDeployer.html]
Hope this helps :) -
J2EE:160043]Missing deployment descriptor "WEB-INF/web.xml"
Hi ,
When I try to deploy using admin console i get the following error msg.
J2EE:160043]Missing deployment descriptor "WEB-INF/web.xml"
The war file has web.xml.
Can some give me the reason for the above error.
LOG content:
weblogic.management.ApplicationException: [J2EE:160043]Missing deployment descriptor
"WEB-INF/web.xml" at "C:\bea8\user_projects\domains\eConnect\applications\myEconnect.war"
at weblogic.j2ee.J2EEApplicationContainerFactory.handleError(J2EEApplicationContainerFactory.java:729)
at weblogic.j2ee.J2EEApplicationContainerFactory.initializeDeployment(J2EEApplicationContainerFactory.java:470)
at weblogic.management.deploy.DeployerRuntime.unprotectedActivate(DeployerRuntime.java:833)
at weblogic.management.deploy.DeployerRuntime.access$000(DeployerRuntime.java:63)
at weblogic.management.deploy.DeployerRuntime$1.run(DeployerRuntime.java:1499)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.management.deploy.DeployerRuntime.checkAndPerformDeployerActions(DeployerRuntime.java:1490)
at weblogic.management.deploy.DeployerRuntime.activate(DeployerRuntime.java:186)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:711)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:690)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
at weblogic.management.internal.RemoteMBeanServerImpl.private_invoke(RemoteMBeanServerImpl.java:947)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:908)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:946)
at weblogic.management.internal.MBeanProxy.invokeForCachingStub(MBeanProxy.java:481)
at weblogic.management.runtime.DeployerRuntimeMBean_Stub.activate(DeployerRuntimeMBean_Stub.java:1064)
at weblogic.management.console.actions.mbean.WebAppComponentDeployAction.prePerform(WebAppComponentDeployAction.java:141)
at weblogic.management.console.actions.mbean.DoMBeanWizardAction.perform(DoMBeanWizardAction.java:215)
at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:173)
at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)You'll have to at least show me the out contents of that WAR file.
-- Rob
Sowjanya wrote:
Suppose the directory structure of the appl is c:\myroot\webapp\...
then we need to go to webapp and then build the war file.
C:\myroot\webapp>jar -cvf abc.war *
then copy the war file and paste it in applicaitons folder.
"sowjanya" <[email protected]> wrote:
Hi ,
When I try to deploy using admin console i get the following error msg.
J2EE:160043]Missing deployment descriptor "WEB-INF/web.xml"
The war file has web.xml.
Can some give me the reason for the above error.
LOG content:
weblogic.management.ApplicationException: [J2EE:160043]Missing deployment
descriptor
"WEB-INF/web.xml" at "C:\bea8\user_projects\domains\eConnect\applications\myEconnect.war"
at weblogic.j2ee.J2EEApplicationContainerFactory.handleError(J2EEApplicationContainerFactory.java:729)
at weblogic.j2ee.J2EEApplicationContainerFactory.initializeDeployment(J2EEApplicationContainerFactory.java:470)
at weblogic.management.deploy.DeployerRuntime.unprotectedActivate(DeployerRuntime.java:833)
at weblogic.management.deploy.DeployerRuntime.access$000(DeployerRuntime.java:63)
at weblogic.management.deploy.DeployerRuntime$1.run(DeployerRuntime.java:1499)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.management.deploy.DeployerRuntime.checkAndPerformDeployerActions(DeployerRuntime.java:1490)
at weblogic.management.deploy.DeployerRuntime.activate(DeployerRuntime.java:186)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:711)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:690)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
at weblogic.management.internal.RemoteMBeanServerImpl.private_invoke(RemoteMBeanServerImpl.java:947)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:908)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:946)
at weblogic.management.internal.MBeanProxy.invokeForCachingStub(MBeanProxy.java:481)
at weblogic.management.runtime.DeployerRuntimeMBean_Stub.activate(DeployerRuntimeMBean_Stub.java:1064)
at weblogic.management.console.actions.mbean.WebAppComponentDeployAction.prePerform(WebAppComponentDeployAction.java:141)
at weblogic.management.console.actions.mbean.DoMBeanWizardAction.perform(DoMBeanWizardAction.java:215)
at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:173)
at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170) -
ApplicationException: [J2EE:160043]Missing deployment descriptor
<Sep 20, 2004 9:38:19 AM EDT> <Error> <Deployer> <BEA-149027> <Unable to activat
e application, BillingDepot, from source, C:\bea\weblogic81\server\bin\.\myserve
r\upload\BillingDepot\BillingDepot.war. Reason: [J2EE:160043]Missing deployment
descriptor "WEB-INF/web.xml" at "C:\bea\weblogic81\server\bin\.\myserver\upload\
BillingDepot\BillingDepot.war">
Got this exception during war file deployment, here's war file content :
C:\Documents and Settings\admin>c:\jdk1.4.2_04\bin\jar tvf C:\bea\weblogic81\
server\bin\.\myserver\upload\BillingDepot\BillingDepot.war
342 Mon Sep 20 09:38:10 EDT 2004 META-INF/MANIFEST.MF
9 Mon Sep 20 09:38:12 EDT 2004 /index.htm
9 Mon Sep 20 09:38:12 EDT 2004 /index.html
45386 Mon Sep 20 09:38:12 EDT 2004 /WEB-INF/lib/activation.jar
1235721 Mon Sep 20 09:38:12 EDT 2004 /WEB-INF/lib/axis.jar
958352 Mon Sep 20 09:38:12 EDT 2004 /WEB-INF/lib/bcprov-jdk14-118.jar
71442 Mon Sep 20 09:38:12 EDT 2004 /WEB-INF/lib/commons-discovery.jar
31605 Mon Sep 20 09:38:12 EDT 2004 /WEB-INF/lib/commons-logging.jar
115060 Mon Sep 20 09:38:12 EDT 2004 /WEB-INF/lib/ipdr.jar
35759 Mon Sep 20 09:38:12 EDT 2004 /WEB-INF/lib/jaxrpc.jar
352668 Mon Sep 20 09:38:12 EDT 2004 /WEB-INF/lib/log4j-1.2.8.jar
276098 Mon Sep 20 09:38:12 EDT 2004 /WEB-INF/lib/mail.jar
18402 Mon Sep 20 09:38:12 EDT 2004 /WEB-INF/lib/saaj.jar
113853 Mon Sep 20 09:38:12 EDT 2004 /WEB-INF/lib/wsdl4j.jar
906248 Mon Sep 20 09:38:12 EDT 2004 /WEB-INF/lib/xalan.jar
1728861 Mon Sep 20 09:38:12 EDT 2004 /WEB-INF/lib/xercesImpl.jar
108484 Mon Sep 20 09:38:14 EDT 2004 /WEB-INF/lib/xml-apis.jar
131919 Mon Sep 20 09:38:14 EDT 2004 /WEB-INF/lib/xmlParserAPIs.jar
354491 Mon Sep 20 09:38:14 EDT 2004 /WEB-INF/lib/xmlsec.jar
9492 Mon Sep 20 09:38:14 EDT 2004 /WEB-INF/server-config.wsdd
4000 Mon Sep 20 09:38:14 EDT 2004 /WEB-INF/web.xml
What can be possibly wrong with the file ? BTW, deployed fine on Tomcat.Hi,
Please check if the JRE being used is for Java 1.3 or 1.4.
How are you deploying the application? Using weblogic.Deployer or through the admin console? If the former then ensure that your classpath and path refer to the JDK 1.4 files/folder.
This is what comes to mymind at the moment, do try and see if this works.
Regards,
Rommel. -
Problem with Missing deployment descriptor [J2EE:160043]
Hi,
I am having a problem deploying an *.ear into weblogic 8.1. I get the error
J2EE:160043]Missing deployment descriptor "META-INF/application.xml" at "C:\bea\weblogic81\samples\domains\examples\applications\ejb20_dataLoadMgr.ear"
even though the application.xml file is in the *.ear file. This *.ear file is
built using the following
ant script:
Note: I am integrating a Message Driven EJB with Documentum Content Server
DFC API calls (3rd party jars)
Thanks, Craig
<project name="ejb20-message" default="all" basedir=".">
<!-- set global properties for this build -->
<property environment="env"/>
<property file="../../../examples.properties"/>
<property name="build.compiler" value="${compiler}"/>
<property name="source" value="."/>
<property name="build" value="${source}/build"/>
<property name="dist" value="${source}/dist"/>
<property name="dummy" value="${source}/dummy"/>
<!--
<target name="all" depends="clean, init, compile_ejb, jar.ejb, appc, ear_app,
-->
<target name="all" depends="clean, init, compile_ejb, jar.ejb, appc, ear_app3"/>
<!-- compile_client"/> -->
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile
and copy the deployment descriptors into it-->
<mkdir dir="${build}"/>
<mkdir dir="${build}/META-INF"/>
<mkdir dir="${dist}"/>
<copy todir="${build}/META-INF">
<fileset dir="${source}">
<include name="*.xml"/>
<exclude name="build.xml"/>
<exclude name="application.xml"/>
</fileset>
</copy>
<!-- Changed to move application.xml into ${dist}/meta-inf C. Ahtye
<copy todir="${dist}">
<fileset dir="${source}">
<include name="application.xml"/>
</fileset>
</copy>
-->
<copy todir="${dist}/META-INF">
<fileset dir="${source}">
<include name="application.xml"/>
</fileset>
</copy>
<!--<copy todir="${dist}">
<fileset dir="${source}">
<include name="dfc.properties"/>
</fileset>
</copy>-->
</target>
<!-- Compile ejb classes into the build directory (jar preparation) -->
<target name="compile_ejb">
<javac srcdir="${source}" destdir="${build}" includes="DataLoadMgrBean.java"
excludes="DSSCommand.java,GetDSSCommand.java,ImportXMLHelper.java" classpath="dfc.jar"/>
</target>
<!-- Update ejb jar file or create it if it doesn't exist, including XML
deployment descriptors -->
<target name="jar.ejb" depends="compile_ejb">
<jar jarfile="${dist}/ejb20_dataLoadMgr.jar" basedir="${build}" update="yes">
</jar>
</target>
<target name="appc" depends="jar.ejb">
<wlappc debug="${debug}" source="${dist}/ejb20_dataLoadMgr.jar" classpath="dfc.jar"
verbose="true"/>
</target>
<!-- Put the ejb into an ear, to be deployed from the ${apps.dir} dir -->
<target name="ear_app" depends="jar.ejb">
<ear earfile="${apps.dir}/ejb20_dataLoadMgr.ear" appxml="${source}/application.xml">
<!--<fileset dir="${dist}/APP-INF/lib" includes="dfc.jar"/>
<fileset dir="${dist}/APP-INF/lib" includes="dfcbase.jar"/>-->
<fileset dir="${dist}" includes="ejb20_dataLoadMgr.jar"/>
</ear>
</target>
<!-- Need to place dfc.jar, dfcbase.jar, log4j.jar into {source} and then deploy
to {dist} -->
<target name="ear_app3" depends="jar.ejb">
<jar destfile="${apps.dir}/ejb20_dataLoadMgr.ear" basedir="${dist}"/>
</target>
<target name="ear_app2" depends="jar.ejb">
<wlpackage toFile="${apps.dir}/ejb20_dataLoadMgr.ear" srcdir="${dist}" destdir="${dummy}"/>
</target>
<!-- Compile client app into the clientclasses directory -->
<target name="compile_client">
<javac srcdir="${source}" destdir="${client.classes.dir}" includes="Client.java"/>
</target>
<target name="clean">
<delete dir="${build}"/>
</target>
<!-- Run the example -->
<target name="run">
<java classname="examples.ejb20.dataLoadMgr.Client" fork="yes" failonerror="true">
<arg value="t3://localhost:${port}"/>
<classpath>
<pathelement path="${ex.classpath}"/>
</classpath>
</java>
</target>
</project>Can you show me the output of jar tvf
C:\bea\weblogic81\samples\domains\examples\applications\ejb20_dataLoadMgr.ear
-- Rob
Craig Ahtye wrote:
Hi,
I am having a problem deploying an *.ear into weblogic 8.1. I get the error
J2EE:160043]Missing deployment descriptor "META-INF/application.xml" at "C:\bea\weblogic81\samples\domains\examples\applications\ejb20_dataLoadMgr.ear"
even though the application.xml file is in the *.ear file. This *.ear file is
built using the following
ant script:
Note: I am integrating a Message Driven EJB with Documentum Content Server
DFC API calls (3rd party jars)
Thanks, Craig
<project name="ejb20-message" default="all" basedir=".">
<!-- set global properties for this build -->
<property environment="env"/>
<property file="../../../examples.properties"/>
<property name="build.compiler" value="${compiler}"/>
<property name="source" value="."/>
<property name="build" value="${source}/build"/>
<property name="dist" value="${source}/dist"/>
<property name="dummy" value="${source}/dummy"/>
<!--
<target name="all" depends="clean, init, compile_ejb, jar.ejb, appc, ear_app,
-->
<target name="all" depends="clean, init, compile_ejb, jar.ejb, appc, ear_app3"/>
<!-- compile_client"/> -->
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile
and copy the deployment descriptors into it-->
<mkdir dir="${build}"/>
<mkdir dir="${build}/META-INF"/>
<mkdir dir="${dist}"/>
<copy todir="${build}/META-INF">
<fileset dir="${source}">
<include name="*.xml"/>
<exclude name="build.xml"/>
<exclude name="application.xml"/>
</fileset>
</copy>
<!-- Changed to move application.xml into ${dist}/meta-inf C. Ahtye
<copy todir="${dist}">
<fileset dir="${source}">
<include name="application.xml"/>
</fileset>
</copy>
-->
<copy todir="${dist}/META-INF">
<fileset dir="${source}">
<include name="application.xml"/>
</fileset>
</copy>
<!--<copy todir="${dist}">
<fileset dir="${source}">
<include name="dfc.properties"/>
</fileset>
</copy>-->
</target>
<!-- Compile ejb classes into the build directory (jar preparation) -->
<target name="compile_ejb">
<javac srcdir="${source}" destdir="${build}" includes="DataLoadMgrBean.java"
excludes="DSSCommand.java,GetDSSCommand.java,ImportXMLHelper.java" classpath="dfc.jar"/>
</target>
<!-- Update ejb jar file or create it if it doesn't exist, including XML
deployment descriptors -->
<target name="jar.ejb" depends="compile_ejb">
<jar jarfile="${dist}/ejb20_dataLoadMgr.jar" basedir="${build}" update="yes">
</jar>
</target>
<target name="appc" depends="jar.ejb">
<wlappc debug="${debug}" source="${dist}/ejb20_dataLoadMgr.jar" classpath="dfc.jar"
verbose="true"/>
</target>
<!-- Put the ejb into an ear, to be deployed from the ${apps.dir} dir -->
<target name="ear_app" depends="jar.ejb">
<ear earfile="${apps.dir}/ejb20_dataLoadMgr.ear" appxml="${source}/application.xml">
<!--<fileset dir="${dist}/APP-INF/lib" includes="dfc.jar"/>
<fileset dir="${dist}/APP-INF/lib" includes="dfcbase.jar"/>-->
<fileset dir="${dist}" includes="ejb20_dataLoadMgr.jar"/>
</ear>
</target>
<!-- Need to place dfc.jar, dfcbase.jar, log4j.jar into {source} and then deploy
to {dist} -->
<target name="ear_app3" depends="jar.ejb">
<jar destfile="${apps.dir}/ejb20_dataLoadMgr.ear" basedir="${dist}"/>
</target>
<target name="ear_app2" depends="jar.ejb">
<wlpackage toFile="${apps.dir}/ejb20_dataLoadMgr.ear" srcdir="${dist}" destdir="${dummy}"/>
</target>
<!-- Compile client app into the clientclasses directory -->
<target name="compile_client">
<javac srcdir="${source}" destdir="${client.classes.dir}" includes="Client.java"/>
</target>
<target name="clean">
<delete dir="${build}"/>
</target>
<!-- Run the example -->
<target name="run">
<java classname="examples.ejb20.dataLoadMgr.Client" fork="yes" failonerror="true">
<arg value="t3://localhost:${port}"/>
<classpath>
<pathelement path="${ex.classpath}"/>
</classpath>
</java>
</target>
</project> -
Plugin to migrate deployment descriptors for J2EE apps
I was told there is a JDev 10g plugin that deals with migration of deployment descriptors for different kinds of J2EE application servers.
If it is true, what is the plugin name? Is it already contained within JDev or we are supposed to download and install it?
Regards,
Eduardo Gouvea.Have a look at the deployment desriptor category in the JDeveloper new gallery - you'll see support for OC4J, JBoss, and Weblogic built-in.
-
Hi there
We are in the process of deploying our standard J2EE EAR file to
WebLogic 9.2 MP2. The EAR file does not contain weblogic custom
deployment descriptors (e.g.: weblogic.xml) but only standard DDs (e.g.:
web.xml)
I have some doubts about resources mapping and I'd like to get some help
from experienced WL users.
Basically our EAR file is composed of an EJB module and a WEB module.
Each module declares some references such as:
WEB.XML snippet
<resource-ref>
<description>DataSource for partition 'default'</description>
<res-ref-name>jdbc/Datasource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
Now the questions:
1) Is there a way to map the resources during the deployment, using the
console? This is the way followed by WebSphere and Oracle AS, for
example. If this is not possible, should I provide a Deployment Plan for
that EAR file? I tried to provide the xml Deployment Plan generated by
weblogic.PlanGenerator utility together with the EAR file while
deploying the app, but no luck. It seems the Deployment Plan should be
provided in a jar file. Is that correct?
2) If the previous options are not possible, how can I create the custom
deployment descriptor? Is there an "Assembly Tool" that imports the
standard EAR and then export the custom EAR file with the custom
deployment descriptors correctly generated?
Thank you a lot in advance.A deployment plan is external to the ear/jar file.
It is probably easiest to deploy the application with the console, and then
use the console to change the values you want. It will automatically
generate a deployment plan for you.
"Quasar" <[email protected]> wrote in message
news:[email protected]..
Hi there
We are in the process of deploying our standard J2EE EAR file to
WebLogic 9.2 MP2. The EAR file does not contain weblogic custom
deployment descriptors (e.g.: weblogic.xml) but only standard DDs (e.g.:
web.xml)
I have some doubts about resources mapping and I'd like to get some help
from experienced WL users.
Basically our EAR file is composed of an EJB module and a WEB module.
Each module declares some references such as:
WEB.XML snippet
<resource-ref>
<description>DataSource for partition 'default'</description>
<res-ref-name>jdbc/Datasource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
Now the questions:
1) Is there a way to map the resources during the deployment, using the
console? This is the way followed by WebSphere and Oracle AS, for
example. If this is not possible, should I provide a Deployment Plan for
that EAR file? I tried to provide the xml Deployment Plan generated by
weblogic.PlanGenerator utility together with the EAR file while
deploying the app, but no luck. It seems the Deployment Plan should be
provided in a jar file. Is that correct?
2) If the previous options are not possible, how can I create the custom
deployment descriptor? Is there an "Assembly Tool" that imports the
standard EAR and then export the custom EAR file with the custom
deployment descriptors correctly generated?
Thank you a lot in advance. -
The DOCTYPE declaration in the ejb-jar.xml deployment descriptor is missing
Hello,
I want to create web service from ejb but everytime I want to do it, I get the following error:
I'm using NWDS 7.2 and JDK 1.6
[004]Deployment aborted
Settings
SDM host : XXX
SDM port : 50118
URL to deploy : file:/C:/DOCUME1/XXXX/LOCALS1/Temp/temp3760382784932063822XXXWSProjectEar.ear
Result
=> deployment aborted : file:/C:/DOCUME1/XXX/LOCALS1/Temp/temp3760382784932063822XXX/WSProjectEar.ear
Aborted: development component 'XXXWSProjectEar'/'sap.com'/'localhost'/'2011.01.06.15.48.31'/'0':
Caught exception during application deployment from SAP J2EE Engine's deploy service:
java.rmi.RemoteException: Cannot deploy application sap.com/XXXWSProjectEar.. Reason: The DOCTYPE declaration in the ejb-jar.xml deployment descriptor is missing. ; nested exception is: com.sap.engine.services.ejb.exceptions.deployment.EJBXMLParserException: The DOCTYPE declaration in the ejb-jar.xml deployment descriptor is missing.
(message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).REMEXC)
Deployment exception : The deployment of at least one item aborted
Can anyone tell me why am I getting this error.
Thnx for your help.
Best regards.Hello Decio Junior,
Actually yes, I resolved my problem.
I'm developing an EJB 3.0 project. I'm using NWDS 7.2 and JDK 1.6 as I said.
The problem is that my server was using JDK 1.4 and that was the problem.
EJB 1.1 and 2.1 need ejb-jar.xml but EJB 3.0 use the annotations instead.
Check your server JDK Version. It should be JDK 1.5 or higher.
Something else that you should check, in your project properties :
In the Build PATH : Use JDK 1.5
In the Java Compiler : Set the java compiler compliance level to 1.6 and check use default compliance settings
Hope it would help.
If you need more explanations, I'm here
Good luck. -
Best tool to use for j2ee deployment ?
Hi,
I've developed j2ee apps using NetWeaver Developer Studio. I am not using the component model in my applications yet.
I use the deploy tool or the Netweaver Developer Studio to deploy my application. I've read that the deploy tool will be removed from the standard tools and that SDM should be used instead for j2ee application deployment.
The problem is that with SDM you canot configure such things as Environment Ressource References or other informations contained in the ejb jar.
Also, I don't like changing the source to make a deployment in NetWeaver Developer Studio as most deployment configs are associated with the runtime environment variables.
What is the proposed solution for this ? Will SDM be adjusted in order to allow more customization in the ear file before deployment ?
Are there any other suggestions ? What do you use ?
Thanks.
Thierry Dagnino
Systems Architect
Hydro QuebecHi Thierry,
I understand that you want to configure your apps in a way that you don't have to edit the deployment descriptors before the actual deployment, am I right? Then you can use substitution variables. A substitution variable is referenced as <i>${subst.var.name}</i>, e.g.[code]<env-entry>
<env-entry-name>myEnvEntry</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>${my.subst.var.name}</env-entry-value>
</env-entry>[/code]For more information on configuring substitution variables, please refer to the following two links:
http://help.sap.com/saphelp_nw04/helpdata/en/85/fa673ba8ecf22fe10000000a11402f/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/35/1cd66947184aa8915ca1831c59b6c1/frameset.htm
Hope that helps,
Vladimir -
Anyone please help me solve this error. I am trying to deploy an application on weblogic 12c i am getting an error but the same application gets successfully deployed on weblogic 11g. The error is
An error occurred during activation of changes, please see the log for details.
Exception preparing module: EJBModule(gsCallbackAdapterLGTX-ejb.jar) An error occurred while reading the deployment descriptor. The error was: Error processing annotations: .
[EJB:015001]Unable to link class com.aep.gridsmart.adapters.lgtx.buslogic.deliver.xform.AdapterTransfomerDeliverSession in Jar /appl/oracle/middleware/WLS/12.1.1.0/user_projects/domains/Gridsmart/servers/ManagedServer1/tmp/_WL_user/gsCallbackAdapterLGTX/34vz4d/gsCallbackAdapterLGTX-ejb.jar : java.lang.NoClassDefFoundError: com/aep/gridsmart/adapter/deliver/CommonAdapterDeliverBeanCotton please let me know what is the mistake i am
doingThe following path does not exist.
C:\Sun\AppServer7\domains\domain1\server1\
applications\j2ee-modules\task_1\WEB-INF\web.xml -
Challenges in deployment descriptors
We currently have an EJB (called CD) that is contacted "remotely" by a web service
(called CA) for some processing. The two (CD and CA) are deployed on different
WLS8.1SP1 domains. CD is currently deployed as an EJB jar file (cd.jar) whereas
CA is part of an EAR file and is deployed as an application. We ran into the necessity
of making CD as part of EAR (much like CA). However, as part of the CA package,
there is currently an initialization class (we're using a servlet) that saves
some entries in JNDI for both CA and CD. We want to mimic the functionality of
that class in CD when we create the ear for it.
I just ran into some settings that could be made in the weblogic-application.xml
deployment descriptor as follows:
<startup-class>startup class name</startup-class>
We're hoping this can help us mimic CA's init process. However, we need to pass
that class some parameters upon load (which in the case of CA was done by using
the <init-param> in its web.xml). We came across the following tag:
<application-param>
<param-name>someparam</param-name>
</param-value>somevalue</param-value>
</application-param
However, we have the following questions:
1. How do we make the startup class fetch those param values at load time? (for
CA, the servlet was using the appPropLoc = getInitParameter("someparam") in its
init method
2. We needed to perform the remote lookup from CA to CD. Would enclosing CD in
an EAR affect our ability to do so? If so, then how do we go about doing that?
Thanks much,
SamiHi sami,
Enclosing the EJB (CD) in an EAR file is not going to stop you from Remotely accessing
it.
As CD and CA are in different application package and moreover in different JVM,
you have to package the interface classes as client jar with in CA for type casting.
Joe
"sami titi" <[email protected]> wrote:
>
We have resolved the first part of this problem by using a startup servlet
much
like we do in CA. However, we still face the issue of question number
2 below.
Please provide some feedback.
Thanks,
Samir
"sami titi" <[email protected]> wrote:
We currently have an EJB (called CD) that is contacted "remotely" by
a web service
(called CA) for some processing. The two (CD and CA) are deployed on
different
WLS8.1SP1 domains. CD is currently deployed as an EJB jar file (cd.jar)
whereas
CA is part of an EAR file and is deployed as an application. We raninto
the necessity
of making CD as part of EAR (much like CA). However, as part of the
CA package,
there is currently an initialization class (we're using a servlet) that
saves
some entries in JNDI for both CA and CD. We want to mimic the functionality
of
that class in CD when we create the ear for it.
I just ran into some settings that could be made in the weblogic-application.xml
deployment descriptor as follows:
<startup-class>startup class name</startup-class>
We're hoping this can help us mimic CA's init process. However, weneed
to pass
that class some parameters upon load (which in the case of CA was done
by using
the <init-param> in its web.xml). We came across the following tag:
<application-param>
<param-name>someparam</param-name>
</param-value>somevalue</param-value>
</application-param
However, we have the following questions:
1. How do we make the startup class fetch those param values at load
time? (for
CA, the servlet was using the appPropLoc = getInitParameter("someparam")
in its
init method
2. We needed to perform the remote lookup from CA to CD. Would enclosing
CD in
an EAR affect our ability to do so? If so, then how do we go about doing
that?
Thanks much,
Sami -
Error in Sun XML schema for servlet2.4 deployment descriptor?
Hi,
I'm including the new XML schema for version 2.4 of the servlet standard in my web.xml deployment descriptor, using http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd
When I try to save the XML file, XMLSpy reports an error in the schema file itself: "Undefined schema component 'base' encountered - simpleContext can not have a base that is a complexType with complexContent"
This error is on line 744, and is caused by the snippet:
<xsd:simpleContent>
<xsd:extension base="j2ee:nonEmptyStringType"/>
</xsd:simpleContent>
Can anyone explain why I'm getting a validation failure on this schema? Surely someone else must have experienced the same thing, but I can't track down any reference to it anywhere. Help!XMLSpy is known to be flawed. From my own experience of implementing
validators and data-binding tools, and from my experience of working in the
W3C Schema working group, I can tell you that there are countless cases
where XMLSpy violates the schema specification.
I checked the corresponding part of the schema, but it looks correct to me.
So I suspect that this is another bug in XMLSpy.
Try Xerces. That's probably the best in terms of conformance to the spec. -
WAR files (Tomcat) and deployment descriptor
Hello,
I am currently writing a small utility to package a web application for Jakarta Tomcat as a .war file.
I have a functional version that imports the deployment descriptor web.xml, but I'd like to make it possible for the user to edit or create from scratch that file. I use the DOM API to make a logical model of my web.xml, but the parser won't accept the external dtd definition :
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
Here is my parser :
private void parse(File in) {
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
factory.setValidating(true);
DocumentBuilder builder = factory.newDocumentBuilder();
document = builder.parse(in); (((*)))
catch (...)
}//parse
---------------------------------------------It seems I have no further controls on DocumentBuilder and DocumentBuilderFactory.
The builder.parse call generates this exception :
java.net.NoRouteToHostException: Operation timed out: no further information
at java.net.PlainSocketImpl.socketConnect(Native Method)
at org.apache.crimson.parser.Resolver.resolveEntity(Resolver.java:389)The problem seems to be located in DOM's DefaultHandler entity resolver, but I don't ee clearly what to do.
Thanks for helping.Hi,
I already tried every combination of settings with
DocumentBuilderFactory.setNamespaceAware
DocumentBuilderFactory.setValidating
DocumentBuilderFactory.setCoalescing
DocumentBuilderFactory.ExpandEntityReferencesI had the same result. Here is the exact dump :
java.net.NoRouteToHostException: Operation timed out: no further information
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:312)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112)
at java.net.Socket.<init>(Socket.java:273)
at java.net.Socket.<init>(Socket.java:100)
at sun.net.NetworkClient.doConnect(NetworkClient.java:50)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:331)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:517)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:277)
at sun.net.www.http.HttpClient.New(HttpClient.java:289)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
.java:379)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:472)
at org.apache.crimson.parser.Resolver.resolveEntity(Resolver.java:389)
at org.apache.crimson.parser.ExternalEntity.getInputSource(ExternalEntit
y.java:88)
at org.apache.crimson.parser.Parser2.pushReader(Parser2.java:2986)
at org.apache.crimson.parser.Parser2.externalParameterEntity(Parser2.jav
a:2721)
at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1154)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:488)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:304)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl
.java:179)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:161)
at DOMView.main(DOMView.java:96)This shows that the entity resolver tries to access the distant DTD, so I tried to implement myself the EntityResolver interface, but I didn't well understood
what to do with that InputStream it has to return.
Maybe you are looking for
-
Trouble shooting the installation of itunes on Windows 7 64 bit?
I have found some old discussions, which had solutions to installing itunes on a Windows 7, 64 bit system. I am getting the following error, and can not get itunes to install: The Windoes Installer Service could not be accessed. This can occur if y
-
Screen has zoomed in and wont go out again
my ipod touch has suddenly decided to zoom in really far and wont go back out again therefore cant really use any of the apps and is generally more difficult to use. please help
-
How to reconfigure the QuickStart key on S12 ION ?
When I got my S12 ION a day before, I instantly wipe out the original OS, and cleanly installed Windows 7 Ultimate edition on it. It went pretty well, and I was pleased with the performance. Then I found out that there's a QuickStart key ("QS" key)
-
SWC_SET_ELEMENT CONTAINER
Hello, I have got a requirement to change a method of any object type, i am new to BOR i find these statements in the methods: swc_set_table container 'Sequential_Approvers' sequential_approvers. swc_set_element method_container 'Status' status. Coul
-
I don't have any other details.