on 05-04-2011 9:41 PM
I am having trouble logging in to the Crystal Reports Server through my Java program using JSP. I'm getting
an error which says the message below:
Server hostname:port not found or server may be down (FWM 01003)
The logon part of my JSP code is shown below: (Due to your SAP Security using some kind of cross site scripting filter, I cannot show the various APS strings I used in the code below)
String aps = hostname:port;
String userName = "administrator";
String password = "xxxxxxxx";
String auth = "secEnterprise";
// Get the enterpriseSession object from the web session.
IEnterpriseSession enterpriseSession = (IEnterpriseSession) session.getAttribute("enterpriseSession");
ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
Exception failure = null;
// If no session already exists, logon using the specified parameters.
try{
// Attempt logon.
enterpriseSession = sessionMgr.logon(userName, password, aps, auth);
}
catch (Exception error){
failure = error;
}
if(failure != null){
//message code written here but was removed due to your scripting filter
return;
}
There is nothing wrong with Crystal Reports Server 2008 because I can log on to the Central Management Console and Infoview successfully. So I know the server is not down. As you can see from the code above, I tried different string values to the aps variable.
I have no compile errors as I have referenced all the required Crystal Report JAR files to run the program. I got the code above from the CELogon.jsp from the Viewers Java Developer SDK Guide.
I am running the Crystal Reports Server 2008 with its default web server, Tomcat while the JSP I am running is in Glassfish web server, the default web server for Netbeans 6.9.1. Both web servers are running in the same server machine with Windows Server 2003 SP2. This is just a test server I am trying to learn from. The configuration settings are as follows:
Crystal Reports Server configuration:
User: Administrator
Port#: 6400
Pswd: xxxxxxxxx
Server Intelligence Agent
Node Name: P576
Port: 6410
Web Server: Tomcat running on connection port 8080
Java Development Environment configuration:
IDE used: Netbeans 6.9.1
Web Server: Glassfish Server running on connection port 8888
I am new to Crystal Reports Server, JSPs, and the Netbeans Java IDE so I don't have any experience with these technologies. Just going by with what I get in the documentation. By the way, I downloaded the trial version of Crystal Reports Server 2008 and still have 1 more month of access for all of its full features. Eventually, we want to only view our Crystal Reports (stored in Crystal Reports Server) through JSP using the Java Report Page Viewer and the Report Source object it creates running in a Page Server (as opposed to RAS Server).
By the way, If I use the code String aps = "p576:6410"; The error I get is "Unable to open a socket to talk to CMS p576:6410 (FWM 01005)"
Hopefully someone can help me with this cause I'm stuck. Thank you.
What do you use as the CMS name when you logon to the CMC? If it isn't shown, in the web.xml in the CmcApp directory you can have it show the CMS name. It should be port 6400 by default.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is the url to log on to CMC --> http://p576:8080/CmcApp/logon.faces?explicitLogoff=true
System: p576:6400
So I think the CMS name you are referring to is p576.
Yes, we are talking about the same thing. I tried that before. The code is as follows:
String aps = "p576:6400";
With this, I get the following error on my Firefox browser:
HTTP Status 500 -
type: Exception report
message description: The server encountered an internal error () that prevented it from fulfilling this request.
exception: org.apache.jasper.JasperException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
root cause: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
note: The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 3.1 logs.
When I looked at the server.log file, it logged the following:
[#|2011-05-05T08:39:54.459-0700|WARNING|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=96;_ThreadName=Thread-1;|StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at com.crystaldecisions.sdk.occa.infostore.internal.InfoObjects.get(InfoObjects.java:530)
at org.apache.jsp.index_jsp.getReportID(index_jsp.java from :45)
at org.apache.jsp.index_jsp._jspService(index_jsp.java from :249)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)
|#]
Never mind my last post. I commented out the rest of the code and just left the Login code and tried to run. It was successful connecting. At least now I know the right APS variable value to set to. Thank you. I might have other issues with it but that's another subject. I'll try to make it work. If I can't, I'll come back in this forum and post.
Thanks again.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.