John Smith

Ranch Hand
+ Follow
since Aug 21, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 John Smith

Hi All:

I am using weblogic wls12120.
I used the ant task that comes with weblogic that generate proxy code from apache axis 1.4 web services.
The Apache axis Admin Service is a rpc-encode web service
<target name="compile_client_postalCode" >
<clientgen

wsdl="http://localhost:8081/Axis/services/AdminService?wsdl"


destDir="C:\TEST7"
packageName="com.apache104"
type="JAXRPC"
/>

Here is my client code:
package com.apache104;

import java.net.MalformedURLException;
import java.net.URL;
import java.rmi.RemoteException;

import javax.xml.rpc.ServiceException;

public class ClientAxisVersion1_0 {

private static String url = "http://localhost:8081/Axis/services/AdminService";
public static void main(String args[]) throws MalformedURLException, ServiceException, RemoteException
{
try
{
URL serviceURL = new URL(url);

AdminService service = new AdminService_Impl(url);
Admin port = service.getAdminService();

System.out.println("test");

}
catch (Exception e)
{
System.out.println("Exception:"+e.toString());
}
}
}

I get the following error:

Error at Line:2, token:[OPENTAGBEGIN]All tags must be contained within a single element
at weblogic.xml.babel.baseparser.BaseParser.parseProlog(BaseParser.java:417)
at weblogic.xml.babel.baseparser.BaseParser.parseSome(BaseParser.java:328)
at weblogic.xml.stax.XMLStreamReaderBase.advance(XMLStreamReaderBase.java:195)
at weblogic.xml.stax.XMLStreamReaderBase.next(XMLStreamReaderBase.java:237)
at weblogic.xml.domimpl.Loader.load(Loader.java:207)
at weblogic.xml.domimpl.Loader.load(Loader.java:73)
at weblogic.xml.domimpl.Loader.load(Loader.java:35)
at weblogic.wsee.util.dom.DOMParser.getWebLogicDocumentImpl(DOMParser.java:122)
at weblogic.wsee.util.dom.DOMParser.getDocument(DOMParser.java:65)
at weblogic.wsee.wsdl.WsdlReader.getDocument(WsdlReader.java:315)
at weblogic.wsee.wsdl.internal.WsdlDefinitionsImpl.parse(WsdlDefinitionsImpl.java:432)
at weblogic.wsee.wsdl.internal.WsdlDefinitionsImpl.parse(WsdlDefinitionsImpl.java:417)
at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:85)
at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:72)
at weblogic.wsee.jaxrpc.ServiceImpl.loadWsdlDefinition(ServiceImpl.java:486)
at weblogic.wsee.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:126)
at com.apache104.AdminService_Impl.<init>(AdminService_Impl.java:23)
at com.apache104.AdminService_Impl.<init>(AdminService_Impl.java:17)
at com.apache104.ClientAxisVersion1_0.main(ClientAxisVersion1_0.java:18)

This happen also on apache axis 1.0.

Here is the wsdl of the web service:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://xml.apache.org/axis/wsdd/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://xml.apache.org/axis/wsdd/" xmlns:intf="http://xml.apache.org/axis/wsdd/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
<wsdl:types>
<schema targetNamespace="http://xml.apache.org/axis/wsdd/" xmlns="http://www.w3.org/2001/XMLSchema">
<element name="AdminService" type="xsd:anyType"/>
<element name="AdminServiceReturn" type="xsd:anyType"/>
</schema>
</wsdl:types>

<wsdl:message name="AdminServiceRequest">

<wsdl:part element="impl:AdminService" name="part"/>

</wsdl:message>

<wsdl:message name="AdminServiceResponse">

<wsdl:part element="impl:AdminServiceReturn" name="AdminServiceReturn"/>

</wsdl:message>

<wsdl:portType name="Admin">

<wsdl:operation name="AdminService">

<wsdl:input message="impl:AdminServiceRequest" name="AdminServiceRequest"/>

<wsdl:output message="impl:AdminServiceResponse" name="AdminServiceResponse"/>

</wsdl:operation>

</wsdl:portType>

<wsdl:binding name="AdminServiceSoapBinding" type="impl:Admin">

<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

<wsdl:operation name="AdminService">

<wsdlsoap:operation soapAction=""/>

<wsdl:input name="AdminServiceRequest">

<wsdlsoap:body use="literal"/>

</wsdl:input>

<wsdl:output name="AdminServiceResponse">

<wsdlsoap:body use="literal"/>

</wsdl:output>

</wsdl:operation>

</wsdl:binding>

<wsdl:service name="AdminService">

<wsdl:port binding="impl:AdminServiceSoapBinding" name="AdminService">

<wsdlsoap:address location="http://localhost:8081/Axis/services/AdminService"/>

</wsdl:port>

</wsdl:service>

</wsdl:definitions>


Any hint or help will be greatly appreciated it.
9 years ago
Hi All:

I needed your help!!
Any hint or help will be greatly appreciated it.
I am currently using Icefaces 1.8.2, JSF 1.1, JasperReports 4.5.1 and weblogic 10.3.2 I try to create a functionality when clicking an excel image it will try to get the result to an excel file using Jasper Report.
I can compiled the following code. I try to use "saveView" but get the following error:

Caused By: java.lang.NoSuchMethodError: javax.faces.application.StateManager.saveView(Ljavax/faces/context/FacesContext;)Ljava/lang/Object;
at com.cta.web.beans.OpportunitiesBean.downloadToExcel(OpportunitiesBean.java:321)
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:597)
Truncated. see log file for complete stacktrace
>
So from the following url(https://jira.springsource.org/browse/SWF-1112) it told me to use saveSerializedView I can compiled but when executed
get the following error:


23:38:22,002 ERROR ViewRootStateManagerImpl:145 - Exception finding JSF1.2 saveView method on delegate
java.lang.NoSuchMethodException: org.apache.myfaces.application.jsp.JspStateManagerImpl.saveView(javax.faces.context.FacesContext)
at java.lang.Class.getMethod(Class.java:1605)
at com.icesoft.faces.application.ViewRootStateManagerImpl.initializeParameters(ViewRootStateManagerImpl.java:143)
at com.icesoft.faces.application.ViewRootStateManagerImpl.saveView(ViewRootStateManagerImpl.java:157)
at com.icesoft.faces.application.ViewRootStateManagerImpl.saveSerializedView(ViewRootStateManagerImpl.java:193)
at com.cta.web.beans.OpportunitiesBean.downloadToExcel(OpportunitiesBean.java:322)
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:597)
at com.sun.el.parser.AstValue.invoke(AstValue.java:130)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274)
at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
at javax.faces.component.UICommand.broadcast(UICommand.java:89)
at com.icesoft.faces.component.panelseries.UISeries$RowEvent.broadcast(UISeries.java:633)
at com.icesoft.faces.component.panelseries.UISeries.broadcast(UISeries.java:295)
at com.icesoft.faces.component.paneltabset.PanelTabSet.broadcast(PanelTabSet.java:318)
at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:50)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:171)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:112)
at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:65)
at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:48)
at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:58)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:55)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:77)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:55)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:192)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:67)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at com.fedex.login.filter.WssoAuthenticationFilter.doFilter(WssoAuthenticationFilter.java:188)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)



public String downloadToExcel(javax.faces.event.ActionEvent event)
{
InputStream reportStream = null;
try
{

FacesContext context = FacesContext.getCurrentInstance();
ExternalContext ext = context.getExternalContext();
//reportStream = ext.getResourceAsStream("resources/jasper/PreviousBookings.jasper");
reportStream = JRLoader.getResourceInputStream("resources/jasper/PreviousBookings.jasper");
//JasperReport jasperReport = JasperCompileManager.compileReport(fis);
Object[] previousBooking = new Object[newOpportunityByPreviousBookingDTOList.size()];
int i = 0;
for(NewOpportunityDTO previousBookingDTO:newOpportunityByPreviousBookingDTOList)
{
previousBooking[i] = previousBookingDTO;
i++;
}

/*
reportStream = JRLoader.getResourceInputStream("resources/jasper/PreviousBookings.jasper");
JasperPrint jprint1 = JasperFillManager.fillReport(reportStream, new HashMap(), new JRBeanArrayDataSource(previousBooking));
JRXlsxExporter exporterXLS = new JRXlsxExporter();
exporterXLS.setParameter(JRXlsExporterParameter.JASPER_PRINT, jprint1);
exporterXLS.setParameter(JRXlsExporterParameter.OUTPUT_FILE_NAME, "c:/test1/test.xlsx");
exporterXLS.exportReport();
*/
JasperPrint jasperPrint = JasperFillManager.fillReport(reportStream, new HashMap(), new JRBeanArrayDataSource(previousBooking));
HttpServletResponse resp = (HttpServletResponse) ext
.getResponse();

resp.setContentType("application/vnd.ms-excel");
String filename = new StringBuffer("previousBookings").append(
".xls").toString();
resp.setHeader("Content-Disposition", "inline;filename="
+ filename);

JExcelApiExporter exporterXLS = new JExcelApiExporter();

exporterXLS.setParameter(
JRXlsExporterParameter.JASPER_PRINT,
jasperPrint);
exporterXLS.setParameter(
JRXlsExporterParameter.IS_DETECT_CELL_TYPE,
Boolean.TRUE);
exporterXLS.setParameter(
JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND,
Boolean.FALSE);
exporterXLS.setParameter(
JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS,
Boolean.TRUE);
exporterXLS.setParameter(
JRXlsExporterParameter
.IS_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS,
Boolean.TRUE);
exporterXLS.setParameter(
JRXlsExporterParameter.IS_IGNORE_CELL_BORDER,
Boolean.TRUE);
exporterXLS.setParameter(JRXlsExporterParameter.OUTPUT_STREAM,
resp.getOutputStream());
exporterXLS.exportReport();
//byte[] reportPDF = JasperRunManager.runReportToPdf(reportStream, parameterMap, connection);

//context.getApplication().getStateManager().saveView(context);
context.getApplication().getStateManager().saveSerializedView(context);
ServletOutputStream out;
out = resp.getOutputStream();

BufferedOutputStream bos = new BufferedOutputStream(out);
bos.flush();
bos.close();

context.responseComplete();

}
catch(Exception e)
{
Utility.setTab(AirFreightConstants.AIRFREIGHT_OPPORTUNITIES);
log.error(StringUtil.exceptionToString(e));
setErrorMessage("operation.failed.error.message", "Error Detail:"+StringUtil.exceptionToString(e));
return null;
}
return "success";
}

JasperReport.jxml:
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="report3" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<style name="table">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<subDataset name="Table Dataset 1"/>
<subDataset name="Table Dataset 2"/>
<field name="awb" class="java.lang.String"/>
<field name="departureDate" class="java.lang.String"/>
<field name="destination" class="java.lang.String"/>
<field name="statusDescription" class="java.lang.String"/>
<field name="owner" class="java.lang.String"/>
<field name="comments" class="java.lang.String"/>
<field name="flight" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="79" splitType="Stretch"/>
</title>
<pageHeader>
<band height="35" splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="61" splitType="Stretch">
<staticText>
<reportElement x="6" y="28" width="80" height="30"/>
<textElement/>
<text><![CDATA[Departure Date]]></text>
</staticText>
<staticText>
<reportElement x="91" y="28" width="50" height="30"/>
<textElement/>
<text><![CDATA[AWB]]></text>
</staticText>
<staticText>
<reportElement x="215" y="28" width="100" height="30"/>
<textElement/>
<text><![CDATA[Destination]]></text>
</staticText>
<staticText>
<reportElement x="330" y="28" width="73" height="30"/>
<textElement/>
<text><![CDATA[Status]]></text>
</staticText>
<staticText>
<reportElement x="417" y="28" width="54" height="30"/>
<textElement/>
<text><![CDATA[Owner]]></text>
</staticText>
<staticText>
<reportElement x="481" y="28" width="73" height="30"/>
<textElement/>
<text><![CDATA[Comments]]></text>
</staticText>
<staticText>
<reportElement x="145" y="28" width="50" height="30"/>
<textElement/>
<text><![CDATA[Flight]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="125" splitType="Stretch">
<textField>
<reportElement x="7" y="13" width="70" height="30"/>
<textElement/>
<textFieldExpression><![CDATA[$F{departureDate}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="92" y="13" width="50" height="30"/>
<textElement/>
<textFieldExpression><![CDATA[$F{awb}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="145" y="15" width="50" height="30"/>
<textElement/>
<textFieldExpression><![CDATA[$F{flight}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="211" y="17" width="100" height="30"/>
<textElement/>
<textFieldExpression><![CDATA[$F{destination}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="332" y="13" width="72" height="30"/>
<textElement/>
<textFieldExpression><![CDATA[$F{statusDescription}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="418" y="15" width="54" height="30"/>
<textElement/>
<textFieldExpression><![CDATA[$F{owner}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="482" y="13" width="100" height="30"/>
<textElement/>
<textFieldExpression><![CDATA[$F{comments}]]></textFieldExpression>
</textField>
</band>
<band height="50"/>
<band height="50"/>
<band height="50"/>
<band height="50"/>
</detail>
<columnFooter>
<band height="45" splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="54" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="42" splitType="Stretch"/>
</summary>
</jasperReport>
11 years ago
JSF
Hi All:

Any help or hint is greatly appreciated it!!
I am currently using IceFaces 1.8.2, Jsf 1.1, and JasperReport 3.5.2.
I get the following error:
net.sf.jasperreports.engine.JRException: Could not load object from location : /test_subreport.jasper
The report test_report.jasper has a subreport called test_subreport.jasper. I placed both test_report.jasper and test_subreport.jasper in the directory "WEB-INF/reports/"


public String testSearch() throws Exception
{
try
{
Connection connection;
FacesContext context = FacesContext.getCurrentInstance();
HttpServletResponse response = (HttpServletResponse)context.getExternalContext().getResponse();
InputStream reportStream = context.getExternalContext().getResourceAsStream("WEB-INF/reports/test_report.jasper");
ServletOutputStream servletOutputStream = response.getOutputStream();
ServletContext ctx = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext();
String filepath = ctx.getRealPath("/WEB-INF/reports/");
filepath = filepath = "/";
String imagepath = ctx.getRealPath("/WEB-INF/images/test_logo.gif");

HashMap parameterMap = new HashMap();


parameterMap.put("SUBREPORT_DIR", filepath);
parameterMap.put("Test Number", testNumber);
parameterMap.put("Image Path", imagepath);

Properties properties = new Properties();
properties.load(context.getExternalContext().getResourceAsStream("WEB-INF/config.properties"));

String driver = properties.getProperty("jdbc.driver");
String jdbc_url = properties.getProperty("jdbc.url");
String username = properties.getProperty("jdbc.username");
String password = properties.getProperty("jdbc.password");
Class.forName(driver);
connection = DriverManager.getConnection(jdbc_url, username, password);


JasperRunManager.runReportToPdfStream(reportStream, servletOutputStream, parameterMap, connection);
//byte[] reports = JasperRunManager.runReportToPdf(reportStream, parameterMap, connection);
connection.close();
response.setContentType("application/pdf");
servletOutputStream.flush();
servletOutputStream.close();
}
catch(Exception e)
{
log.error("exception message:"+e.getMessage());
}

return "success";
}
12 years ago
JSF
Hi All:

I am using Icefaces 1.8.2, Jsf 1.1 and JasperReport 3.5.2.
I click a button and it call "testSearch" and should give return a pdf file. Instead nothing happens. There are no errors and no pdf file.
Any help or hint would be greatly appreciated it

public String testSearch() throws Exception
{
try
{
Connection connection;
FacesContext context = FacesContext.getCurrentInstance();
HttpServletResponse response = (HttpServletResponse)context.getExternalContext().getResponse();
InputStream reportStream = context.getExternalContext().getResourceAsStream("WEB-INF/reports/test_report.jasper");
ServletOutputStream servletOutputStream = response.getOutputStream();
ServletContext ctx = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext();
String filepath = ctx.getRealPath("/WEB-INF/reports/");
String imagepath = ctx.getRealPath("/WEB-INF/images/test_logo.gif");

HashMap parameterMap = new HashMap();


parameterMap.put("SUBREPORT_DIR", filepath);
parameterMap.put("Test Number", testNumber);
parameterMap.put("Image Path", imagepath);

Properties properties = new Properties();
properties.load(context.getExternalContext().getResourceAsStream("WEB-INF/config.properties"));

String driver = properties.getProperty("jdbc.driver");
String jdbc_url = properties.getProperty("jdbc.url");
String username = properties.getProperty("jdbc.username");
String password = properties.getProperty("jdbc.password");
Class.forName(driver);
connection = DriverManager.getConnection(jdbc_url, username, password);


JasperRunManager.runReportToPdfStream(reportStream, servletOutputStream, parameterMap, connection);

connection.close();

response.setContentType("application/pdf");
servletOutputStream.flush();
servletOutputStream.close();
}
catch(Exception e)
{
log.error("exception message:"+e.getMessage());
}

return "success";
}
12 years ago
JSF
Hi All:

I needed your help!! I am using hibernate 3.3.2.
From the following hql code:
ContactCustomerDAOImpl.java:


I get the following error:
hibernate error:
10:33:28,949 DEBUG ErrorCounter:51 - line 1:110: unexpected token: c
line 1:110: unexpected token: c
at org.hibernate.hql.antlr.HqlBaseParser.atom(HqlBaseParser.java:3520)
at org.hibernate.hql.antlr.HqlBaseParser.unaryExpression(HqlBaseParser.java:3216)
at org.hibernate.hql.antlr.HqlBaseParser.multiplyExpression(HqlBaseParser.java:3098)
at org.hibernate.hql.antlr.HqlBaseParser.additiveExpression(HqlBaseParser.java:2818)
at org.hibernate.hql.antlr.HqlBaseParser.concatenation(HqlBaseParser.java:570)
at org.hibernate.hql.antlr.HqlBaseParser.relationalExpression(HqlBaseParser.java:2586)
at org.hibernate.hql.antlr.HqlBaseParser.equalityExpression(HqlBaseParser.java:2449)
at org.hibernate.hql.antlr.HqlBaseParser.negatedExpression(HqlBaseParser.java:2413)
at org.hibernate.hql.antlr.HqlBaseParser.logicalAndExpression(HqlBaseParser.java:2331)
at org.hibernate.hql.antlr.HqlBaseParser.logicalOrExpression(HqlBaseParser.java:2296)
at org.hibernate.hql.antlr.HqlBaseParser.expression(HqlBaseParser.java:2082)
at org.hibernate.hql.antlr.HqlBaseParser.aliasedExpression(HqlBaseParser.java:2249)
at org.hibernate.hql.antlr.HqlBaseParser.selectedPropertiesList(HqlBaseParser.java:1462)
at org.hibernate.hql.antlr.HqlBaseParser.selectClause(HqlBaseParser.java:1365)
at org.hibernate.hql.antlr.HqlBaseParser.selectFrom(HqlBaseParser.java:1106)
at org.hibernate.hql.antlr.HqlBaseParser.queryRule(HqlBaseParser.java:702)
at org.hibernate.hql.antlr.HqlBaseParser.selectStatement(HqlBaseParser.java:296)
at org.hibernate.hql.antlr.HqlBaseParser.statement(HqlBaseParser.java:159)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:274)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:182)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:101)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1651)
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:597)
at org.springframework.orm.hibernate3.HibernateTemplate$CloseSuppressingInvocationHandler.invoke(HibernateTemplate.java:1293)
at $Proxy15.createQuery(Unknown Source)
at com.dao.impl.ContactCustomerDAOImpl$1.doInHibernate(ContactCustomerDAOImpl.java:28)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419)
at org.springframework.orm.hibernate3.HibernateTemplate.executeFind(HibernateTemplate.java:343)
at com.dao.impl.ContactCustomerDAOImpl.findContactCustomer(ContactCustomerDAOImpl.java:17)
at com.dao.impl.junit.TestContactCustomerDAOImpl.testContactCustomer(TestContactCustomerDAOImpl.java:14)
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:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)



This was suppose to be the Oracle equivalent sql code for the hql code above:

Any hint or help would be greatly appreciated it!!
Hi All:

I have the following ice:command code. When it calls the javascript function validate() and if it fails validation I don't want it to submit but unforutnately it submits anywhere.

JSPX CODE:
<ice:commandButton id="newCustomerSave"
value="#{msgs['airfreight.customers.button.submit']}"
action="#{customerBean.saveNewCustomer}"
styleClass="buttonpurple" onclick="validate();" />

JavaScript Code:
function validate() {

mNv=document.getElementById('iceForm:_id47:0:companyName').value;
if (mNv=='') {
alert('Company/Customer name is a required field. Please try again.');
event.returnValue=false;
return false;
}
mNv=document.getElementById('iceForm:_id47:0:iataNumber').value;
if (mNv=='') {
alert('IATA number is a required field. Please try again.');
event.returnValue=false;
return false;
}

mNv=document.getElementById('iceForm:_id47:0:postalCode').value;
if (mNv!='') {
var regEx = /[a-zA-Z][0-9][a-zA-Z](-| |)[0-9][a-zA-Z][0-9]/;
if(regEx.test(mNv))
{

}
else
{
alert('Invalid Postal Code');
event.returnValue=false;
return false;
}

}
return true;
}

Any hint or help would be greatly appreciated it!!
12 years ago
JSF
Hi All:

I need help, please!! Any help or hint is greatly appreciated it!!

In the tutorial from IceFaces 1.8
Data Table Component Tutorials

I am using weblogic 10.3.2, IceFaces 1.8 and Jsf 1.2.
I am using the jars that comes with the IceFaces 1.8 download.

index.jsp:
<html>
<head>
<title>ICEfaces Component Showcase</title>
</head>
<body>
<jsp:forward page="sortableTable.iface" />
</body>
</html>

sortableTable.jspx:
<f:view xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ice="http://www.icesoft.com/icefaces/component">

<ice:outputDeclaration doctypeRoot="HTML"
doctypePublic="-//W3C//DTD HTML 4.01 Transitional//EN"
doctypeSystem="http://www.w3.org/TR/html4/loose.dtd"/>

<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1"></meta>
<title>DataTable Component Tutorial</title>
<link href="./xmlhttp/css/xp/xp.css" rel="stylesheet" type="text/css"/>
</head>

<body>
<h2>Sortable dataTable Component</h2>

In this example commandSortHeader components have been added to the
table headers. Clicking on the headers will sort the table data.


<ice:form>
<!--
This is a very basic table comprising four columns. Each
row represents an inventory item. Each column represents a
inventory item property. commandSortHeader components have been
added ot the table headers.

The sortAscending and sortColumn attributes are set when a command
sortColumnName header is activated. The sortColumn and sortAscending
data can then be sortColumnName by a sortColumnName algorithm if a
change is detected.
-->

<ice:dataTable
id="dataSortData"
sortColumn="#{inventoryList.sortColumnName}"
sortAscending="#{inventoryList.ascending}"
value="#{inventoryList.carInventory}"
var="item">

<!-- Stock number -->
<ice:column>
<f:facet name="header">
<ice:commandSortHeader
columnName="#{inventoryList.stockColumnName}"
arrow="true" >
<ice:outputText value="#{inventoryList.stockColumnName}"/>
</ice:commandSortHeader>
</f:facet>
<ice:outputText value="#{item.stock}"/>
</ice:column>

<!-- Model number -->
<ice:column>
<f:facet name="header">
<ice:commandSortHeader
columnName="#{inventoryList.modelColumnName}"
arrow="true" >
<ice:outputText value="#{inventoryList.modelColumnName}"/>
</ice:commandSortHeader>
</f:facet>
<ice:outputText value="#{item.model}"/>
</ice:column>

<!-- Description -->
<ice:column>
<f:facet name="header">
<ice:commandSortHeader
columnName="#{inventoryList.descriptionColumnName} "
arrow="true" >
<ice:outputText value="#{inventoryList.descriptionColumnName}"/>
</ice:commandSortHeader>
</f:facet>
<ice:outputText value="#{item.description}"/>
</ice:column>

<!-- Odometer reading -->
<ice:column>
<f:facet name="header">
<ice:commandSortHeader
columnName="#{inventoryList.odometerColumnName}"
arrow="true" >
<ice:outputText value="#{inventoryList.odometerColumnName}"/>
</ice:commandSortHeader>
</f:facet>
<ice:outputText value="#{item.odometer}"/>
</ice:column>

<!-- Price number -->
<ice:column>
<f:facet name="header">
<ice:commandSortHeader
columnName="#{inventoryList.priceColumnName}"
arrow="true" >
<ice:outputText value="#{inventoryList.priceColumnName}"/>
</ice:commandSortHeader>
</f:facet>
<ice:outputText value="#{item.price}"/>
</ice:column>

</ice:dataTable>

</ice:form>
</body>
</html>
</f:view>


Error 500--Internal Server Error
java.lang.Exception: javax.faces.FacesException: Can't parse stream for /index.jsp The prefix "jsp" for element "jsp:forward" is not bound.
at com.icesoft.faces.context.View.servePage(View.java :152)
at com.icesoft.faces.webapp.http.core.MultiViewServer .service(MultiViewServer.java:67)
at com.icesoft.faces.webapp.http.common.ServerProxy.s ervice(ServerProxy.java:11)
at com.icesoft.faces.webapp.http.servlet.MainSessionB oundServlet$4.service(MainSessionBoundServlet.java :149)
at com.icesoft.faces.webapp.http.common.standard.Path DispatcherServer.service(PathDispatcherServer.java :24)
at com.icesoft.faces.webapp.http.servlet.BasicAdaptin gServlet.service(BasicAdaptingServlet.java:16)
at com.icesoft.faces.webapp.http.servlet.PathDispatch er.service(PathDispatcher.java:23)
at com.icesoft.faces.webapp.http.servlet.SessionDispa tcher.service(SessionDispatcher.java:53)
at com.icesoft.faces.webapp.http.servlet.PathDispatch er.service(PathDispatcher.java:23)
at com.icesoft.faces.webapp.http.servlet.MainServlet. service(MainServlet.java:131)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:820)
at weblogic.servlet.internal.StubSecurityHelper$Servl etServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invok eServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute( ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(Tail Filter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFi lter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$Ser vletInvocationAction.run(WebAppServletContext.java :3592)
at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.sec uredExecute(WebAppServletContext.java:2202)
at weblogic.servlet.internal.WebAppServletContext.exe cute(WebAppServletContext.java:2108)
at weblogic.servlet.internal.ServletRequestImpl.run(S ervletRequestImpl.java:1432)
at weblogic.work.ExecuteThread.execute(ExecuteThread. java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java :173)
Caused by: javax.faces.FacesException: Can't parse stream for /index.jsp The prefix "jsp" for element "jsp:forward" is not bound.
at com.icesoft.faces.application.D2DViewHandler.rende rResponse(D2DViewHandler.java:445)
at com.icesoft.faces.application.D2DViewHandler.rende rView(D2DViewHandler.java:159)
at com.sun.faces.lifecycle.RenderResponsePhase.execut e(RenderResponsePhase.java:110)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:1 00)
at com.sun.faces.lifecycle.LifecycleImpl.render(Lifec ycleImpl.java:139)
at com.icesoft.faces.webapp.http.core.JsfLifecycleExe cutor.apply(JsfLifecycleExecutor.java:19)
at com.icesoft.faces.context.View$2$1.respond(View.ja va:48)
at com.icesoft.faces.webapp.http.servlet.ServletReque stResponse.respondWith(ServletRequestResponse.java :201)
at com.icesoft.faces.context.View$2.serve(View.java:7 7)
at com.icesoft.faces.context.View.servePage(View.java :149)
... 25 more
Caused by: org.xml.sax.SAXParseException: The prefix "jsp" for element "jsp:forward" is not bound.
at com.sun.org.apache.xerces.internal.parsers.Abstrac tSAXParser.parse(AbstractSAXParser.java:1231)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserI mpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogic XMLReader.java:133)
at weblogic.xml.jaxp.RegistryXMLReader.parse(Registry XMLReader.java:173)
at org.apache.commons.digester.Digester.parse(Digeste r.java:1785)
at com.icesoft.faces.webapp.parser.Parser.parse(Parse r.java:130)
at com.icesoft.faces.application.D2DViewHandler.rende rResponse(D2DViewHandler.java:439)
... 34 more
12 years ago
JSF
Hi All:

I am using weblogic 10.3.2 and JSF 2.0, ICEFACES 2.0. I ran the example (http://wiki.icefaces.org/display/ICE/Data+Table)
dataTable-sortable and I get the following error:

jar files in the war file:
commons-collections-2.1.1.jar
commons-logging-1.0.4.jar
icefaces-ace.jar
icefaces-compat.jar
icefaces.jar
icepush.jar
javax.faces-2.1.4-sources.jar
javax.faces-2.1.4.jar
jsf-api.jar
jsf-impl.jar
jstl.jar
log4j-1.2.11.jar

In the weblogic.xml:
I added the following statement but still get the error below:
<wls:jsp-descriptor><wls:encoding>UTF-8</wls:encoding></wls:jsp-descriptor>


error from the console:
java.lang.IllegalStateException
at com.sun.faces.application.ViewHandlerResponseWrapper.getWriter(ViewHandlerResponseWrapper.java:192)
at com.sun.faces.context.ExternalContextImpl.getResponseOutputWriter(ExternalContextImpl.java:723)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.createResponseWriter(FaceletViewHandlingStrategy.java:930)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:376)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:410)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:502)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:248)
at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:159)
at jsp_servlet.__index._jspService(__index.java:79)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:408)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:318)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:502)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:248)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:546)
at com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:364)
at com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:154)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:100)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:410)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)


Any help or hint would be greatly appreciate it!!!
12 years ago
JSF
Hi All:

I am using weblogic 10.3.2 and JSF 2.0, ICEFACES 2.0. I ran the example (http://wiki.icefaces.org/display/ICE/Data+Table)
dataTable-sortable and I get the following error:

jar files in the war file:
commons-collections-2.1.1.jar
commons-logging-1.0.4.jar
icefaces-ace.jar
icefaces-compat.jar
icefaces.jar
icepush.jar
javax.faces-2.1.4-sources.jar
javax.faces-2.1.4.jar
jsf-api.jar
jsf-impl.jar
jstl.jar
log4j-1.2.11.jar

In the weblogic.xml:
I added the following statement but still get the error below:
<wls:jsp-descriptor><wls:encoding>UTF-8</wls:encoding></wls:jsp-descriptor>


error from the console:
java.lang.IllegalStateException
at com.sun.faces.application.ViewHandlerResponseWrapper.getWriter(ViewHandlerResponseWrapper.java:192)
at com.sun.faces.context.ExternalContextImpl.getResponseOutputWriter(ExternalContextImpl.java:723)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.createResponseWriter(FaceletViewHandlingStrategy.java:930)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:376)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:410)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:502)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:248)
at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:159)
at jsp_servlet.__index._jspService(__index.java:79)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:408)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:318)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:502)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:248)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:546)
at com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:364)
at com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:154)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:100)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:410)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)


Any help or hint would be greatly appreciate it!!!
12 years ago
JSF
Hi All:

I am currently using Ibm Db2 8.2 for mainframe.

Is it possible to combine statement1 and statement2 similar to statement 3.
Basically I want to use the sql result in statement 1 for product_code and currency_code and placed it in a where clause for statement 2
STATEMENT 1:
SELECT DISTINCT PRODUCT_CODE,CURRENCY_CODE FROM TABLE1;

STATEMENT 2:
SELECT * FROM ACCOUNT WHERE PRODUCT_CODE=? AND CURRENCY_CODE=?

STATEMENT 3:
SELECT * FROM ACCOUNT WHERE PRODUCT_CODE=? AND CURRENCY_CODE=? (SELECT DISTINCT PRODUCT_CODE,CURRENCY_CODE FROM TABLE1);
)

To Whom It May Concern:

I am using Rad7, Ibm Websphere 6.1, on Windows XP.
I created an SoapHeader first using a string and bind it using jax-ws.
It works for jax-ws but unfortunately, my work services uses jax-rpc.
Does anybody know how to bind the soap header using jax-rpc.

Any help or hint would be greatly appreciated it.

Here is my code:


import org.apache.cxf.headers.Header;
import org.apache.cxf.headers.Header.Direction;
import org.apache.cxf.helpers.DOMUtils;
import org.apache.cxf.binding.soap.SoapHeader;

import javax.xml.namespace.QName;
import java.io.StringReader;
import java.util.List;
import java.util.ArrayList;
import javax.xml.ws.BindingProvider;


@Test
public void testService() throws Exception {
try
{

URL wsdlURL = new URL("http://localhost:9087/abc/services/ServiceABCService");
ServiceRequestServiceService service = new ServiceRequestServiceServiceLocator();
ServiceRequestService port = service.getServiceRequestService(wsdlURL);

//How to Add Soap Header using jax-ws


String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?><ABCHdrRq "
+ "xmlns=\"http://xmlns.ABCgc.net/ABC/2002/header/\" "
+ ">"
+ "<version>1.0</version><srcInfo><chType>abc</chType><chInst>0124</chInst>" +
"<appName>sSAR</appName><hostName>DW70210521</hostName><userId>fxue</userId>" +
"</srcInfo><startTimeStamp>2010-06-04T13:44:45.132</startTimeStamp><clientDt>2010-06-04T13:44:53.242</clientDt><serviceInfo><serviceName>ServiceRequestService</serviceName>" +
"<serviceFunc>addServiceRequest</serviceFunc></serviceInfo>" +
"<prevTransInfo><prevRqUID>BORS2010-06-04T13:41:10.2067f9368d1-8c5c</prevRqUID>" +
"<prevRespTimestamp>2010-06-04T13:41:10.871</prevRespTimestamp>"+
"<prevRespEndTimestamp>2010-06-04T13:41:10.902</prevRespEndTimestamp>+</prevTransInfo>"+
"</ABCHdrRq>";
SoapHeader dummyHeader1 = new SoapHeader(new QName("uri:http://xmlns.ABCgc.net/ABC/2002/header/", "ABCHdrRq"),
DOMUtils.readXml(new StringReader(xml)).getDocumentElement());
dummyHeader1.setDirection(Direction.DIRECTION_OUT);
List<Header> headers = new ArrayList<Header>();
headers.add(dummyHeader1);

((BindingProvider)port).getRequestContext().put(Header.HEADER_LIST, headers);

//How to Add Soap Header to the request using jax-ws

}
catch(Exception e)
{
System.out.println("Exception message:"+e.getMessage());
}
}

Yours,

Frustrated
13 years ago
Hi All:

I am using Rad 7, Websphere 6.1.
I used the rpc GenericHandler in Rad7 and it works. But I want to implement a version in Spring or Spring Web Services
Here are the contents of my webservices.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE webservices PUBLIC "-//IBM Corporation, Inc.//DTD J2EE Web services 1.0//EN" "http://www.ibm.com/webservices/dtd/j2ee_web_services_1_0.dtd">

<webservices id="WebServices_1066491732483">
<webservice-description id="WebServiceDescription_1066491732483">
<webservice-description-name>HelloWorldService</webservice-description-name>
<wsdl-file>WEB-INF/wsdl/HelloWorld.wsdl</wsdl-file>
<jaxrpc-mapping-file>WEB-INF/HelloWorld_mapping.xml</jaxrpc-mapping-file>
<port-component id="PortComponent_1066491732483">
<port-component-name>HelloWorld</port-component-name>
<wsdl-port id="WSDLPort_1066491732483">
<namespaceURI>http://pack</namespaceURI>;
<localpart>HelloWorld</localpart>
</wsdl-port>
<service-endpoint-interface>pack.HelloWorld</service-endpoint-interface>
<service-impl-bean id="ServiceImplBean_1066491732483">
<servlet-link>pack_HelloWorld</servlet-link>
</service-impl-bean>
<handler id="Handler_1066493401322">
<handler-name>handler.PerformanceHandler</handler-name>
<handler-class>handler.PerformanceHandler</handler-class>
</handler>
</port-component>
</webservice-description>
</webservices>


Here are my GenericHandler implementation code:
/*
* Created on Oct 18, 2003
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package handler;

import java.util.Date;

import javax.xml.namespace.QName;
import javax.xml.rpc.handler.GenericHandler;
import javax.xml.rpc.handler.HandlerInfo;
import javax.xml.rpc.handler.MessageContext;
import javax.xml.rpc.handler.soap.SOAPMessageContext;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPHeader;

/**
* @author Andre Tost
*
*/
public class PerformanceHandler extends GenericHandler {

protected HandlerInfo info = null;
protected Logger logger = null;

public boolean handleRequest(MessageContext context) {
try {
Date startTime = new Date();
context.setProperty("startTime", startTime);
} catch (Exception x) {
// insert error handling here
x.printStackTrace();
}
return true;
}

public boolean handleResponse(MessageContext context) {
try {
Date startTime = (Date)context.getProperty("startTime");
Date endTime = new Date();
long elapsedTime = endTime.getTime()-startTime.getTime();
logger.write("Elapsed time is "+elapsedTime+"\n");
} catch (Exception x) {
// insert error handling here
x.printStackTrace();
}
return true;
}


/* (non-Javadoc)
* @see javax.xml.rpc.handler.Handler#getHeaders()
*/
public QName[] getHeaders() {
return info.getHeaders();
}

public void init(HandlerInfo arg) {
info = arg;
logger = Logger.getLogger("c://temp//HelloWorldServiceLog");
}

public void destroy() {
logger.close();
}
}


Does anybody know how I can implement the handler like GenericHandler with Spring or Spring Web Services.
Any suggestions are appreciated it.

Yours,

Frustrated.
13 years ago
Hi All:

I am using Rad 7 Service Pack 10, Webpshere 6.1 Test Environment Service Pack 31.
In the webpshere 6.1 console, I tried to load the cicseci.rar file through Resources/Resource Adapter, Resource Adapter. For scope, I tried "All Scopes", "Node=xxx,server=xx","cell=xxx",and "node=xx" and they give me the same error below.

I get the following error in the log file:
[7/11/10 14:36:51:812 PDT] 00000020 CommonsMultip E org.apache.struts.upload.CommonsMultipartRequestHandler handleRequest Failed to parse multipart request
org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Async operation timed out
at org.apache.commons.fileupload.FileUploadBase.parseRequest(Unknown Source)
at org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(Unknown Source)
at com.ibm.isclite.container.controller.NLSDiskMultipartRequestHandler.handleRequest(NLSDiskMultipartRequestHandler.java:76)
at org.apache.struts.util.RequestUtils.populate(Unknown Source)
at org.apache.struts.action.RequestProcessor.processPopulate(Unknown Source)
at org.apache.struts.action.RequestProcessor.process(Unknown Source)
at org.apache.struts.action.ActionServlet.process(Unknown Source)
at org.apache.struts.action.ActionServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1152)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1087)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at com.ibm.ws.console.core.servlet.WSCUrlFilter.setUpCommandAssistence(WSCUrlFilter.java:792)
at com.ibm.ws.console.core.servlet.WSCUrlFilter.continueStoringTaskState(WSCUrlFilter.java:363)
at com.ibm.ws.console.core.servlet.WSCUrlFilter.doFilter(WSCUrlFilter.java:229)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:848)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:691)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:588)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:525)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3548)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:269)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:831)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:133)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1818)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)


Any help or hint would be greatly appreciated it.

Yours,

Frustrated.
13 years ago
Hi All:

I am using Rad 7 Service Pack 10, Webpshere 6.1 Test Environment Service Pack 31.
In the webpshere 6.1 console, I tried to load the cicseci.rar file through Resources/Resource Adapter, Resource Adapter. For scope, I tried "All Scopes", "Node=xxx,server=xx","cell=xxx",and "node=xx" and they give me the same error below.

I get the following error in the log file:
[7/11/10 14:36:51:812 PDT] 00000020 CommonsMultip E org.apache.struts.upload.CommonsMultipartRequestHandler handleRequest Failed to parse multipart request
org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Async operation timed out
at org.apache.commons.fileupload.FileUploadBase.parseRequest(Unknown Source)
at org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(Unknown Source)
at com.ibm.isclite.container.controller.NLSDiskMultipartRequestHandler.handleRequest(NLSDiskMultipartRequestHandler.java:76)
at org.apache.struts.util.RequestUtils.populate(Unknown Source)
at org.apache.struts.action.RequestProcessor.processPopulate(Unknown Source)
at org.apache.struts.action.RequestProcessor.process(Unknown Source)
at org.apache.struts.action.ActionServlet.process(Unknown Source)
at org.apache.struts.action.ActionServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1152)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1087)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at com.ibm.ws.console.core.servlet.WSCUrlFilter.setUpCommandAssistence(WSCUrlFilter.java:792)
at com.ibm.ws.console.core.servlet.WSCUrlFilter.continueStoringTaskState(WSCUrlFilter.java:363)
at com.ibm.ws.console.core.servlet.WSCUrlFilter.doFilter(WSCUrlFilter.java:229)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:848)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:691)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:588)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:525)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3548)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:269)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:831)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:133)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1818)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)


Any help or hint would be greatly appreciated it.

Yours,

Frustrated.
13 years ago
Hi All:

I need help!!!

I am using axis2-1.5.1, jdk 1.6, eclipse 3.5, and Axis2_Codegen_Wizard_1.3.0 and windows xp.
I used Axis2_Codegen_Wizard_1.3.0 to generate the client stub and proxy.
I get the following error when I tried to call the web service:

package com.ttdev.ss.client;

import java.rmi.RemoteException;
import com.ttdev.ss.client.SimpleServiceStub.ConcatRequest;
import com.ttdev.ss.client.SimpleServiceStub.ConcatResponse;

public class SimpleClient
{
public static void main(String[] args) throws RemoteException
{
try
{
SimpleServiceStub service = new SimpleServiceStub();
ConcatRequest request = new ConcatRequest();
request.setS1("abc");
request.setS2("123");
ConcatResponse response = service.concat(request);
System.out.println(response.getConcatResponse());
}
catch(Exception e)
{
System.out.println("e.getMessage():"+e.getMessage());
}
}

}

Here is my SimpleService.wsdl:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="SimpleService" targetNamespace="http://ttdev.com/ss" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://ttdev.com/ss" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
<xsd:schema targetNamespace="http://ttdev.com/ss">
<xsd:element name="concatRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="s1" type="xsd:string"/>
<xsd:element name="s2" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="concatResponse" type="xsd:string">

</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="concatResponse">
<wsdl:part name="parameters" element="tns:concatResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="concatRequest">
<wsdl:part name="parameters" element="tns:concatRequest">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="SimpleService">
<wsdl:operation name="concat">
<wsdl:input message="tns:concatRequest">
</wsdl:input>
<wsdl:output message="tns:concatResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="SimpleServiceSOAP" type="tns:SimpleService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="concat">
<soap:operation soapAction="http://ttdev.com/ss/NewOperation"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="SimpleService">
<wsdl:port name="SimpleServiceSOAP" binding="tns:SimpleServiceSOAP">
<soap:address location="http://localhost:8080/axis2/services/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>


In the dos-prompt, I get the following error message:
[INFO] Listening on port 8080
[ERROR] The service cannot be found for the endpoint reference (EPR) 127.0.0.1/a
xis2/services/
org.apache.axis2.AxisFault: The service cannot be found for the endpoint referen
ce (EPR) 127.0.0.1/axis2/services/
at org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPha
se.java:65)
at org.apache.axis2.engine.Phase.invoke(Phase.java:334)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:251)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:160)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReq
uest(HTTPTransportUtils.java:167)
at org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:26
6)
at org.apache.axis2.transport.http.server.AxisHttpService.doService(Axis
HttpService.java:281)
at org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(
AxisHttpService.java:187)
at org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpS
erviceProcessor.java:82)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
at java.lang.Thread.run(Thread.java:619)

Thank you for your help!!!

Yours,

John.
14 years ago