Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

vika mishra

Greenhorn
+ Follow
since Feb 11, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by vika mishra

I am trying to build ejb jar with weblogic appc on weblogic10 server .although i have checked ejb-jar.xml is present in my META-INF.Can you suggest me what changes I need to make it read. :-


[jar] Building jar: D:\portal\build\jars\portal-ejb-temp-wl10.jar
[java] <Jan 21, 2011 7:42:13 PM IST> <Error> <J2EE> <BEA-160197> <Unable to load descriptor D:\portal\build\jars\portal-ejb-temp-wl10.jar/META-INF/ejb-jar.xml of module portal-ejb-temp-wl10.jar. The error is java.io.IOException
[java] at weblogic.descriptor.internal.MarshallerFactory.<init>(MarshallerFactory.java:50)
[java] at weblogic.descriptor.BasicDescriptorManager.getMarshallerFactory(BasicDescriptorManager.java:131)
[java] at weblogic.descriptor.BasicDescriptorManager.getDescriptorFactory(BasicDescriptorManager.java:165)
[java] at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:289)
[java] at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:260)
[java] at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:774)
[java] at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:395)
[java] at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:745)
[java] at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:754)
[java] at weblogic.ejb.spi.EjbJarDescriptor.getEjbJarBean(EjbJarDescriptor.java:131)
my ekb-jar.xml is as :-
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
version="2.1">
<description>Deployment for General Manager EJB.</description>
<display-name>General Manager</display-name>
<enterprise-beans>
<session>
<description>The GeneralBean retrieves the details for generic Nest objects</description>
<ejb-name>GeneralMgr</ejb-name>
<home>com.app.nest.ejb.general.GeneralMgrHome</home>
<remote>com.app.nest.ejb.general.GeneralMgr</remote>
<ejb-class>com.app.nest.ejb.general.GeneralMgrBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<env-entry>
<env-entry-name>dataSourceName</env-entry-name>
<env-entry-type>java.lang.String </env-entry-type>
<env-entry-value>generalDataSource</env-entry-value>
</env-entry>
</session>
</enterprise-beans>
</ejb-jar>











11 years ago
my weblogic-ejb-jar.xml is as :-

<?xml version="1.0" encoding="UTF-8"?>
<weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/90" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-ejb-jar.xsd">
<weblogic-enterprise-bean>
<ejb-name>GeneralMgr</ejb-name>
<caching-descriptor>
<max-beans-in-free-pool>100</max-beans-in-free-pool>
</caching-descriptor>
<jndi-name>nest.ejb.general.GeneralMgrEJB</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
11 years ago
Please find the attached build files used for preparing build


<target name="jar-ejb-general" depends="jar-common,jar-dao,compile-ejb-general"
description="Create a jar containing the General EJB.">
<jar jarfile="${build.jars.dir}/${name}-ejb-temp-brij.jar">
<fileset dir="${build.dest.dir}">
<patternset refid="ejb-common.classes"/>
<patternset refid="ejb-common.support"/>
<patternset refid="general.ejb.classes"/>
<patternset refid="general.ejb.support"/>
</fileset>
<fileset dir="${src.dir}/com/globalone/app/nest/ejb/general">
<include name="META-INF/*.xml"/>
</fileset>
</jar>
<!--
we have to explicitly specify the classpath because of some odd class-cast
exceptions when parsing the XML
-->

<java classname='weblogic.appc' fork="yes">
<classpath>
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
<pathelement location="${build.jars.dir}/${name}-common.jar"/>
<pathelement location="${build.jars.dir}/${name}-dao.jar"/>
</classpath>
<!--<arg line="-output ${build.jars.dir}/${name}-ejb-general.jar ${build.jars.dir}/${name}-ejb-temp-brij.jar"/>-->
<arg value="${build.jars.dir}/${name}-ejb-temp-brij.jar"/>
</java>

<!-- <java classname='appc' fork="yes">
<classpath>
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
<pathelement location="${build.jars.dir}/${name}-common.jar"/>
<pathelement location="${build.jars.dir}/${name}-dao.jar"/>
</classpath>
<arg line="-output ${build.jars.dir}/${name}-ejb-general.jar ${build.jars.dir}/${name}-ejb-temp-brij.jar"/>
<arg value="${build.jars.dir}/${name}-ejb-temp-brij.jar"/>
</java>-->

<!-- Delete temporary Jar file -->
<!--<delete file="${build.jars.dir}/${name}-ejb-temp.jar"/>-->
</target>

11 years ago
I am migrating from WL7 to WL10 and facing the error while migrating from ejbc to appc:-
jar-ejb-general:

[jar] Building jar: D:\nestportal\nestp\build\jars\nestportal-ejb-temp-brij.jar

[java] com/bea/xml/XmlException

[java] <Jan 17, 2011 10:14:02 AM IST> <Error> <J2EE> <BEA-160187> <weblogic.appc failed to compile your application. Recompile with the -verbose option for more details. Please see the error message(s) below.>

[java] Java Result: 1

11 years ago
Hi Edward,
I am also migrating from WL7 to WL10 and facing the error while migrating from ejbc to appc:-
jar-ejb-general:

[jar] Building jar: D:\nestportal\nestp\build\jars\nestportal-ejb-temp-brij.jar

[java] com/bea/xml/XmlException

[java] <Jan 17, 2011 10:14:02 AM IST> <Error> <J2EE> <BEA-160187> <weblogic.appc failed to compile your application. Recompile with the -verbose option for more details. Please see the error message(s) below.>

[java] Java Result: 1

Can you suggest me what changes are required in descriptor files.
ANy input from you will be of great help




11 years ago
<%@ include file="taglibs.jsp"%>


<% String messageErr="errors.logon.connect" ;
if (request.getAttribute("messageError")!= null && request.getAttribute("messageError")!= ""){
messageErr = (String)request.getAttribute("messageError");
}
%>

<script type="text/javascript" language="Javascript1.1">

function openWindow()
{
alert ('<bean:message key="<%=messageErr%>"/>');
}

// On vérifie si l'ecran est situé dans une popup
// dans cette cas, on ferme et renvoye le login au opener
// On vérifie seulement deux niveaus car c'est le maximum possible dans l'appli.
if (opener && opener.dialogWin && opener.dialogWin.win == window)
{
// si l'ecran est situé dans une popup
var target = opener
if (opener.opener && opener.opener.dialogWin && opener.opener.dialogWin.win == window)
{
// si le popup vient d'une autre popup
target = opener.opener
}

// login page
target.document.location.href='<%=strContextPath%>/'

// auto-ferme
close()
}
</script>
<html:form action="/login.do" focus="login">

<logic:messagesPresent>
<body onload="openWindow();" >
</logic:messagesPresent>

<logic:messagesNotPresent>
<body>
</logic:messagesNotPresent>

<table width="100%" border="0" cellspacing="0" cellpadding="0"
bgcolor="#333333" height="67">
<tr>
<td width="937" height="67" valign="middle"
background="<%=strImagesPath%>/LOGO.gif"> </td>
<td width="33" align="center" valign="middle"
background="<%=strImagesPath%>/bg_bleu_5.gif"> </td>
<td width="25" align="center" valign="middle"
background="<%=strImagesPath%>/bg_bleu_5.gif"> </td>
</tr>
</table>
<table width="100%" height="500" border="0" cellspacing="0"
cellpadding="0" leftmargin="0" topmargin="0" class="stylZCtext">
<tr>
<td valign="middle" width="965" height="500">
<table width="325" height="185" align="center" class="stylZCtext"
cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
<!--Partie basse -->
<tr>
<td width="60%">
<table align="center" width="310" height="169" border="0"
cellpadding="0" cellspacing="0" class="Ta">
<tr>
<td width="54%" height="20" class="TiTa">
<div align="left" style="font-size: 8pt"> <bean:message
key="label.autentification" /></div>
</td>
<td width="46%" height="20" class="TiTa">
<div align="center"></div>
</td>
</tr>
<tr>
<td height="20" class="TeTaB"> </td>
<td height="20" class="TeTaB"> </td>
</tr>
<tr>
<td width="54%" height="24" class="TeTaB">
<div align="right"><bean:message key="label.login" />  :
 </div>
</td>
<td width="46%" height="24" class="TeTaB">
<div align="left"><html:text property="login" size="16"
maxlength="50" /></div>
</td>
</tr>
<tr>
<td width="54%" height="24" class="TeTaB">
<div align="right"><bean:message key="label.password" />  :
 </div>
</td>
<td width="46%" height="24" class="TeTaB">
<div align="left"><html:password property="password" size="16"
maxlength="30" /></div>
</td>
</tr>
<tr>
<td width="54%" class="TeTaB" align="center"><img
src="<%=strImagesPath%>/phone_modem1d.gif" border="0"></td>
<td width="46%" class="TeTaB">
<table>
<tr>
<td height="50%" class="TeTaB">
<div align="right"><html:submit property="submit"
value="Valider" styleClass="stylBtnLog" /></div>
</td>
<td height="50%" class="TeTaB">
<div align="center"><html:reset value="Annuler"
styleClass="stylBtnLog" /></div>
</td>
</tr>
<tr>
<td height="25%"> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="TeTaB" align="center"> </td>
<td class="TeTaB"> </td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html:form>
11 years ago
adding authentification.jsp
11 years ago
<%-- Include common set of tag library declarations for each layout --%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%-- Set all pages that include this page (particularly tiles) to use XHTML --%>
<html:xhtml />
<% if (session != null)
{
%>
<script>
history.forward();
</script>
<%
}
%>
<html:html xhtml="true" locale="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Cache-Control" content="no-cache"/>

<title><tiles:getAsString name='document.title' ignore="true"/></title>

<%-- Get Javascript List --%>
<tiles:useAttribute id="scriptList" name="scripts"
classname="java.util.List" ignore="true"/>

<c:forEach var="js" items="${scriptList}">
<script type="text/javascript"
src="<c:url value="${js}"/>"></script>
</c:forEach>


<%-- Get List of Stylesheets --%>
<tiles:useAttribute id="styleList" name="styles"
classname="java.util.List" ignore="true"/>

<c:forEach var="css" items="${styleList}">
<link rel="stylesheet" type="text/css" media="all"
href="<c:url value="${css}"/>" />
</c:forEach>

</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#c0daef">
<script>
alert('hi baselayout');
</script>
<tr>

<tiles:insert attribute='hhh' />
</tr>

</body>
</html:html>
11 years ago
Adding baseLayout.jsp code
11 years ago
Actually on our baseLayout.jsp the line
<td valign='middle'><tiles:insert attribute='accueil'/></td>

is not inserting its attribute but if we we paste it two times then it is inserting value but copying the header two times
11 years ago
In our "baseLayout.jsp" we have 'accueil'/insert attribute which is not able to call authentification.jsp :-
<td valign='middle'><tiles:insert attribute='accueil'/></td>



The attribute 'accueil'/ is mapped to authetification.jsp in tiles-config.xml file.

<!-- Authentification Page definition -->

<definition name=".authentification" extends="baseLayout">

<put name="document.title" value="Ocean Authentication Page"/>

<put name="accueil" value="/common/authentification.jsp"/>

</definition>

The struts-config.xml has entry of tiles-config.xml

<!-- Plugin pour l'utilisation des Tiles Struts -->

<plug-in className="org.apache.struts.tiles.TilesPlugin" >

<set-property property="definitions-config" value="/WEB-INF/tiles-config.xml" />

<set-property property="definitions-debug" value="2" />

<set-property property="definitions-parser-details" value="2" />

<set-property property="definitions-parser-validate" value="true" />

</plug-in>


Can someone could suggest what could be the problem as the "baseLayout.jsp" is not able to call "authentification.jsp".

Although if we are going directly to authentification.jsp then we are able to login and navigate inside the application.




11 years ago