Highlighted

trying to render a xdp form

Avatar

Guest

05-11-2008

Hello everybody



I'm trying to do a basic form with Livecycle Forms but I have some errors and doubts. I have done a servlet when I try to generate that pdf form but, when it runs renderForm() method, it shows this error



13:01:58,525 INFO [STDOUT] Error al realizar el 'Render': javax.naming.NameNotFoundException: com not bound

13:01:58,525 ERROR [STDERR] com.adobe.formServer.interfaces.RenderFormException: javax.naming.NameNotFoundException: com not bound

13:01:58,525 ERROR [STDERR] at com.adobe.formServer.client.EJBClient.renderForm(EJBClient.java:357)

13:01:58,525 ERROR [STDERR] at net.flexlive.randori.pdfConstructor.generatePdf(pdfConstructor.java:102)

13:01:58,525 ERROR [STDERR] at net.flexlive.randori.pdfConstructor.doGet(pdfConstructor.java:36)

13:01:58,525 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)

13:01:58,525 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

13:01:58,525 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

13:01:58,525 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

13:01:58,525 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

13:01:58,525 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

13:01:58,525 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

13:01:58,525 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)

13:01:58,525 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

13:01:58,525 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)

13:01:58,525 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)

13:01:58,525 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

13:01:58,525 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

13:01:58,525 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)

13:01:58,525 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

13:01:58,525 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)

13:01:58,525 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)

13:01:58,525 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)

13:01:58,525 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)

13:01:58,525 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)

13:01:58,525 ERROR [STDERR] Caused by: javax.naming.NameNotFoundException: com not bound

13:01:58,525 ERROR [STDERR] ... 23 more



I was looking for a solution but I haven't idea about what can be the problem of this. I¨'m using JBOSS 4.2.3 and Eclipse 3.3.2 and my servlet code is this:



try {

//Nombre del XDP

String sNom = "solicitud_final.xdp";



//Ruta del formulario

String sRoot = "http://localhost:8080/AdobeForms/web";



//Construyo el path de la aplicacion, para que el form server sepa volver

String appPath = request.getServletPath();

//appPath = appPath.substring(0, appPath.lastIndexOf("/"));

String sURL = request.getScheme() + "://" +

request.getServerName() + ":" +

request.getServerPort() +

request.getContextPath() +

appPath;



//Configuro las opciones

String m_sOptions = "RenderAtClient=true&CacheEnabled=false";



//Cojo el XML para l

Replies

Highlighted

Avatar

Guest

05-11-2008

String sNom = "solicitud_final.xdp";

String sRoot = "http://localhost:8080/AdobeForms/web";



//Construyo el path de la aplicacion, para que el form server sepa volver

String appPath = request.getServletPath();

//appPath = appPath.substring(0, appPath.lastIndexOf("/"));

String sURL = request.getScheme() + "://" +

request.getServerName() + ":" +

request.getServerPort() +

request.getContextPath() +

appPath;



//Configuro las opciones

String m_sOptions = "RenderAtClient=true&CacheEnabled=false";



//Cojo el XML para la preCarga del formulario

byte[] mData = null;

//String sRutaXML = mRootForms + "/" + mXMLData;

//mData = readFile(sRutaXML);



//Instancio el FormServer mediante la API

EJBClient ejbClient = new EJBClient();



Hashtable env = new Hashtable();

env.put(Context.INITIAL_CONTEXT_FACTORY, org.jnp.interfaces.NamingContextFactory");

env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");

env.put(Context.PROVIDER_URL, "172.26.121.76:1099");

InitialContext context = null;



try {

context = new InitialContext(env);

} catch (Exception e) {

System.out.println("Error al iniciar el contexto: " + e.getMessage());

return;

}





ejbClient.setInitialContext(context);



IFormServer ifs = (IFormServer)ejbClient;

//LLamo al metodo que conastruye el formulario

IOutputContext mIOC = ifs.renderForm(

sNom,

"PDFForm",

null,//mData,

m_sOptions,

request.getHeader("User-Agent"),

sURL,

null,

sRoot,

null);



//Construyo la salida y la muestro por pantalla

ServletOutputStream oOutput = response.getOutputStream();

response.setContentType(mIOC.getContentType());

byte[] cContent = mIOC.getOutputContent();

oOutput.write(cContent);

oOutput.flush();

oOutput.close();
Highlighted

Avatar

Guest

05-11-2008

I discovered where do this error. i have tried to do this



Object obj = context.lookup("ejb/com/adobe/formServer/FormServer");



and I have the same error, so I think "com not bound" is refered to ejb.com package. Any suggestion about how to resolve this?



Thanks in advance