Creating sideBar in a class
Hi, I'm currently laying out my screen in swing and am having a few problems.
I have created a class for a sidebar as follows:
public class sideBar extends JPanel{
public sideBar(){
setLayout(new BoxLayout(sideBar, BoxLayout.Y_AXIS));
String[] labels = {"First Name", "Initial", "Surname"};
int[] size = {10, 1, 20};
textForm nodeDetails = new textForm(labels, size);
viewZoom = new JPanel();
viewZoom.setSize(400,200);
viewZoom.setBorder(BorderFactory.createLineBorder(Color.black));
test = new JButton ("THIS");
add(viewZoom);
add(nodeDetails);
add(test);
setBorder(BorderFactory.createLineBorder(Color.black));
I then create the sidebar and add it to the main layout as follows:
sideBar side = new sideBar();
// create content pane
contentPane.add(side, BorderLayout.EAST);
This compiles fine but I get a run time error stating:
exception in thread "main" java.awt.AWTError BoxLayout can't be shared
Any ideas why this is?????
You try to add the BoxLayout to the class in general and to the concrete Object sideBar in particular. That is a conflict.
Try to exchange sideBar by this
setLayout( new BoxLayout( this, BoxLayout.Y_AXIS ) );Hope this helps, Rommie.
Similar Messages
-
How to create two different implementation class for a Control
Hi,
I am a newbie to beehieve. I want to know that is it possible to create two different 'Impl' classes for a Control. If yes then how do we instantiate them ? How can we chain them (something like calling one 'Impl' from the other one? Thanks in Advance!!!
Regards,
AbhishekYou are sure you are in the right forum?
This is the JDeveloper and ADF forum...
Timo -
How to access MC's textfield created in a custom class?
I have a custom class which creates a new MC using a library MC. The library MC contains a dynamic textfield called productName.
The custom class object gets created fine and is displaying on the stage. It's also holding custom properties I set as well.
How do I control the dynamic textfield inside the MC, which is inside the custom class object?
My Product.as:
package {
import flash.display.MovieClip;
public class Product extends MovieClip {
public var prodName:String;
public var prodCategory:String;
public var prodQuality:String;
public function Product():void {
var productMC:MovieClip = new cellMC();
addChild(productMC);
My .FLA first frame:
var myProd1:Product = new Product();
myProd1.prodCategory = "Heaters";
myProd1.x = 150;
myProd1.y = 140;
addChild(myProd1);
// THE FOLLOWING DOES NOT WORK
myProd1.productMC.productName.text = "ABC 123";
I figure something like this would work, but with lots of variations, still nothing works
I get errors telling me it can't find productMC.
UPDATE:
Using GetByChildName it seems I can access productMC. For example this works:
myProd1.getChildByName("productMC").visible = false;
But this does not work:
myProd1.getChildByName("productMC").getChildByName("productName").text = "dgdhdhdhrgh";
If I take the textfield out of the library MC, and create it in the class, then this works:
myProd1.getChildByName("productName").visible = false;
BUT this does not work:
myProd1.getChildByName("productName").text = "sdgsgdfsg";Hi Otto,
If I well understood your situation, the solution might be quite simple.
Since your Product class is a MovieClip (and not a Sprite), you could solve your problem many ways knowing that a MovieClip is a dynamic class.
But first, the thing is that you created your productMC object on the fly inside your Product class.
So either you correct it like this:
package {
import flash.display.MovieClip;
public class Product extends MovieClip {
public var prodName:String;
public var prodCategory:String;
public var prodQuality:String;
public var productMC:MovieClip; // *****
public function Product():void {
productMC = new cellMC(); // *********
addChild(productMC);
Or use this cheap trick (a MovieClip is a dynamic class):
package {
import flash.display.MovieClip;
public class Product extends MovieClip {
public var prodName:String;
public var prodCategory:String;
public var prodQuality:String;
public function Product():void {
var productMC:MovieClip = new cellMC();
this.productMC = productMC; // **************
addChild(productMC);
Although it is possible that, for this one, you need to reforce the dynamic property:
package {
import flash.display.MovieClip;
dynamic public class Product extends MovieClip {
I am not sure, but anyway, you will see for yourself.
Plus, you try to change text to a MovieClip object? Either there is already a TextField in you cellMC object and you are not targeting it, or productMC should be instanciated as a TextField and not a MovieClip. I think you know the answer to that.
Design Cyboïde
Designer web Montreal -
Adding ItemListeners to an object created in an inner class?
Hi All,
I was wondering how dow you add ItemListeners to an object, thats created in an inner class of an outer class that implements the item listener interface. Or is it possible? I got around the problem by putting the createBox method in the outer class and calling it from the inner class, but it would be nice to know if you can keep it contained.
i.e (Assume everythings declared, libs are imported, interface is implemented in outer class etc.)
public class OuterClass implements ItemListener
// Stuff
class InnerClass
// Yet more stuff
void createBox (JPanel aPanel)
JCheckBox aBox = new JCheckBox;
aPanel.add(aBox)
// What should this line be ->
aBox.addItemListener(whatGoesHere?);
// More Stuff
}aBox.addItemListener(OuterClass.this);
-
Is it possbile to create ALV Grid using Class & without using SE51
Is it possible to create a alv grid using Class, with out using the screen painter(SE51).
Hi Preethi,
It is possible to creat ALV grid using class, provided u have to create a custom control in the screen dialog.
Try with the foll code. This is an example for flight detail.
DATA: container TYPE REF TO cl_gui_custom_container,
alv_con TYPE REF TO cl_gui_alv_grid.
data : it_sflight like table of wa with header line,
g_fieldcat type lvc_t_fcat.
/* Paste the code the PBO
CREATE OBJECT container
EXPORTING
container_name = 'C_SPFLI'. "Specify the container name which u created in the dialog screen.
CREATE OBJECT alv_con
EXPORTING
i_parent = container.
/* Use the foll. to dislay the report
CALL METHOD cl_grid->set_table_for_first_display
EXPORTING
I_STRUCTURE_NAME = 'SFLIGHT'
CHANGING
it_outtab = it_sflight[]
IT_FIELDCATALOG = g_fieldcat.
First create the container and then place the ALV in the container and for dislaying pass the necessary table.
Hope this will useful for u.
Get back if u r unable to do it.
Regards
Router -
How to create a model access class ???
HI,
Can somebody tell me how to create a Model Access Class. In the Application Set, i can find the Model Access folder, but it has a list of application sets which is already created and the system asks to select a Application set. I need to create a new application set. Please help.
Regards,
ShinyHi Shiny,
I would suggest you not to create a new application set.
If you are enhancing a standard PCUI application, i would suggest you to create new model access classes and assign them to the same application set which is assigned with the standard model access class for that application.
Creating a model access class can be done through the transaction SE24(like any other Z-class).
Go to transaction CRMC_BLUEPRINT_C and you could assign this newly created Model access class to the standard application set. This can be done under Application Element->Application Set->MOdel Access Class.
If you still feel the need to create a new application set altogether, it can be done from Trx CRMC_BLUEPRINT_C->Layout of PCUI-> Application Element->Application set.
I hope it helps.
Cheers,
Gyan. -
How to create object by getting class name as input
hi
i need to create object for the existing classes by getting class name as input from the user at run time.
how can i do it.
for exapmle ExpnEvaluation is a class, i will get this class name as input and store it in a string
String classname = "ExpnEvaluation";
now how can i create object for the class ExpnEvaluation by using the string classname in which the class name is storted
Thanks in advancei think we have to cast it, can u help me how to cast
the obj to the classname that i get as inputThat's exactly the point why you shouldn't be doing this. You can't have a dynamic cast at compile time already. It doesn't make sense. Which is also the reason why class.forName().newInstance() is a very nice but also often very useless tool, unless the classes loaded all share a mutual interface. -
How to create sidebars in wiki mountain lion
Hi,
Does anybody know how to create Sidebars in Wiki Mountain Lion 10.8?
Regards
MichaelJust an FYI.....
When the history is cleared, the cache is cleared as well. The favicons also go as a result of that process.
Barry -
Hi,
I used this link for create Events in Global Class through SE24.....
[http://sapabapnotes.blogspot.com/]
I do same steps as given in this link....but it show some syntax error when i check it...
Error : "IT_LFA1" is not an internal table - the "OCCURS n" specification is missing...
Where i define it...
Plz tell me wat can i do...
Thanks...
Edited by: Prince Kumar on Jan 25, 2008 12:25 PM
Edited by: Prince Kumar on Jan 25, 2008 12:46 PMHi,
Thanks for reply....
I create a table type with structure LFA1....
Plz tell me that in the interface tab....wat i write....
Plz clear...
thanks.... -
Error no. SPRX084 when create a ABAP proxy class
Hy Guys,
I create a Web Services on Axis and Tomcat machine, it's in document/literal Style format.
When I try to import WSDL to create an ABAP proxy class, Proxy class generator, returm me an error number SPRX084 having said me that the message, in part TAG on element Attribute, uses a wrong or inexistent element.
I've the same case from "http://www.thomas-bayer.com/axis2/services/BLZService?wsdl".
There's a solution?
Best Regards,
Antonelloi tried with this wsdl (http://www.thomas-bayer.com/axis2/services/BLZService?wsdl) and dont get the error you are mentioning.
-
"cannot create jbcd driver of class " for connect URL 'null'" error
I am trying to get an application that is currently working fine on a Windows platform to work in a Linux environment.
One thing that is different from my setup in Windows, and also one that I have no experience with, is the Linux-Ubuntu default install of Apache uses Virtual Hosts and Tomcat's equivalent multiple sessions.
I'm running the app out of the usr/share/tomcat6/webapps/msgboard instance of Tomcat vs var/lib/tomcat6.
I am calling the application from Apache Virtual Host port 80 using mod_jk. The application cannot run under native Tomcat because of the extensive use of PHP. Everything else in the application is working correctly including a DWR (Ajax) servlet. However I also tried a simple test app from native Tomcat and got the same results.
I also tried connecting with jdbc:mysql://localhost:3306/msgboard?autoreconnect=true&user=root&password=password at the terminal prompt and got
bash: jdbc:mysql://localhost/msgboard?autoreconnect=true: No such file or directory
[1]7074
[2] 7048
[1] Exit 127 jdbc:mysql://localhost/msgboard?autoreconnect=true
[2]+ Donesyslog error is
Feb 23, 2009 3:01:51 PM org.directwebremoting.util.CommonsLoggingOutput info INFO: Exec: Online.getPosts()
Feb 23 15:01:51 ubuntu jsvc.exec[6779]: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Feb 23 15:01:51 ubuntu jsvc.exec[6779]: Caused by: java.sql.SQLException: No suitable driverFollowing is all the pertinent setup info for reference and critique. Any suggestions would be greatly appreciated.
Apache2.2
Tomcat6
JDBC
mod_jk
Java (not sure what ver, it's the default Ubuntu install ver.)
PHP
Currently I am pointing to mysql-connector-java.jar in my CLASSPATH at /usr/share/java/mysql-connector-java.jar added symlinks commons-dbcp.jar, commons-logging.jar to usr/share/tomcat6/lib
Application is deployed from usr/share/tomcat6/webapps/msgboard
The basic code snippet in class calling the jdbc
WEB-INF/classes/dbLink.class
Context ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/msgboardDB");
WEB-INF/web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app id="msgboard">
<display-name>Message Board</display-name>
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/msgboardDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
META-INF/context.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<Context path="/msgboard" docBase="msgboard"
debug="5" reloadable="true" crossContext="true">
<Resource name="jdbc/msgboardDB"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="30"
maxWait="10000"
username="root"
password="thePassword"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/msgboard?autoReconnect=true"/>
</Context>
I also included a symlink to this in var/lib/tomcat6/config named msgboard.xml
per instruction at http://ubuntuforums.org/showthread.php?t=430133 and have since removed it.
my.cnf
[client]
port = 3306
bind-address = 127.0.0.1
permissions set in /etc/tomcat6/policy.d/04webapps.policy
permission java.net.SocketPermission "127.0.0.1:3306", "connect,resolve,listen,accept";
per instruction at http://ubuntuforums.org/showthread.php?t=430133
other permiissions set /etc/tomcat6/policy.d/50local.policy
grant codeBase "file:/usr/share/tomcat6/webapps/msgboard/-" {
permission java.net.SocketPermission "127.0.0.1:3306", "connect,resolve,listen,accept";
grant codeBase "file:/usr/share/tomcat6/webapps/msgboard/WEB-INF/classes/-" {
permission java.io.FilePermission "/usr/share/tomcat6/webapps/msgboard/WEB-INF/classes/logging.properties", "read";
grant codeBase "jar:file:/usr/share/tomcat6/webapps/msgboard/WEB-INF/lib/mysql-connector-java-5.1.6.jar!/-" {
permission java.net.SocketPermission "127.0.0.1:3306", "connect,resolve,listen,accept";
I even tried setting Tomcat Security to "no" per instruction at
http://webui.sourcelabs.com/ubuntu/mail/user/threads/Tomcat_connecting_to_MySQL_-Ubuntu8.10_Server.meta
http://ubuntuforums.org/showthread.php?t=1034957&highlight=apache+tomcat+jdbc
http://ubuntuforums.org/showthread.php?t=66615
http://ubuntuforums.org/showthread.php?t=33601&highlight=java+mysql
http://ubuntuforums.org/showthread.php?t=430133
http://programminglinuxblog.blogspot.com/2008/03/connection-pooling-with-java-all.html
http://webui.sourcelabs.com/ubuntu/mail/user/threads/Tomcat_connecting_to_MySQL_-Ubuntu8.10_Server.metaSOLUTION
I had to add
<Resource name="jdbc/webappDB"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="30"
maxWait="10000"
username="root"
password="password"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/webapp?autoReconnect=true"/>into /var/lib/tomcat6/conf/Catalina/localhost/ webapp.xml
Note: the above context file was created automatically after deploying the webapp. I had to add the <resource> to it.
The context I created in usr/share/tomcat_home/webapp/META_INF/context.xml is still there and has the same <resource>.defined in it. I did not verify whether or not it still needs to be there.
After that I had to add two policies
/var/lib/tomcat6/conf/policy.d/03catalina.policy
grant {
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.dbcp.*";
and 04webapps.policy
permission java.net.SocketPermission "127.0.0.1:3306", "connect,resolve,listen,accept";
That did the trick!
Other things that were done but have not been verified as to have any bearing on this issue.
I changed the active java from openjdk to java-sun
I added $tomcat_home/lib:$tomcat_home/lib/mysql-connector.jar:$tomcat_home/lib/commons-dbcp.jar to PATH
Changed CLASSPATH=usr/share/classpath:usr/share/java/commons-dbcp.jar:usr/share/java/mysql-connector.jar
Edited by: wlbragg on Feb 25, 2009 12:58 AM
Edited by: wlbragg on Feb 25, 2009 12:59 AM
Edited by: wlbragg on Feb 25, 2009 1:11 AM -
Adaptor Module creating wrong version of class
Hi Guys,
I wonder if anyone can possibly shed any light on the following problem.
I am trying to create an instance of apache Axis' MessageFactory
However every time the Adaptor Module (Called ClientAuthentication) is called the following class is created - copied from the Message Display Tool
ClientAuthentication: com.sap.engine.services.webservices.jaxm.soap.MessageFactoryImpl created
I have the following in my imports
import org.apache.axis.soap.MessageFactoryImpl;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPHeader;
import javax.xml.soap.SOAPMessage;
import javax.xml.soap.SOAPPart;
And, at this stage, I have explicitly referenced the axis class when creating the instance:
// MessageFactory mf = MessageFactory.newInstance();
// Creating com.sap.engine.services.webservices.jaxm.soap.SOAPMessageImpl
javax.xml.soap.MessageFactory mf= org.apache.axis.soap.MessageFactoryImpl.newInstance();
Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS, "ClientAuthentication: " + mf.getClass().getName() + " created");
Looking at the class in the exported EJB via a decompiler shows
MessageFactory mf = MessageFactoryImpl.newInstance();
Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS, "ClientAuthentication: " + mf.getClass().getName() + " created");
And the result is a com.sap.engine.services.webservices.jaxm.soap.MessageFactoryImpl is created resulting in the wrong SOAPMessage which crashes when returning it's SOAPPart
Any help would be appreciated,
JohnHi,
It is possible to bypass the call to an implementation of MessageFactory and ensure the axis library is used to create the SOAPEnvelope using
org.apache.axis.message.SOAPEnvelope env = new org.apache.axis.message.SOAPEnvelope();
env.setSAAJEncodingCompliance(true);
org.apache.axis.Message iSoapMessage = new org.apache.axis.Message(env);
iSoapMessage.setMessageType("request");
SOAPMessage sm = iSoapMessage;
Instead of
javax.xml.soap.MessageFactory mf= org.apache.axis.soap.MessageFactoryImpl.newInstance();
SOAPMessage sm = mf.createMessage();
Which wasn't returning the right implementation of MessageFactory and hence SOAPEnvelope.
The addDocument to the SOAPBody is still crashing the same way, but this questionis answered.
All the best,
John -
Making the doc.bat to create the documentation for classes & Tests
Hello
I have created a file called "documentation.bat" to created the documentation in html for my src and test classes.
I havent got any problem to do it for my classes, but i also want to do it for my Tests and i dont know how to put it in the same .bat file
To create documentation for the classes i use this:
set CLASSPATH=.\sources;.\lib\cacheLRU-lib-1.1.jar;.\tests
javadoc -d .\doc -linkoffline http://java.sun.com/j2se/1.5.0/doc/api .\doc -sourcepath sources -author -subpackages es.ubu.lsi.cacheLRU.controladorTo create documentation for the Tests classes i was using this, that show my decents for warnings :S :
set CLASSPATH=.\sources;.\lib\cacheLRU-lib-1.1.jar;.\tests
javadoc -d .\doc -linkoffline http://java.sun.com/j2se/1.5.0/doc/api .\doc -sourcepath sources;tests -author -subpackages es.ubu.lsi.cacheLRU.controlador es.ubu.lsi.cacheLRU.testsWhats the problem in the second code?
How to put two folders and two packages to do it?
Lots of thanks, sry for my language :STry generating just to Word and then creating the PDF from
there. There is a known problem which affects some users but not
others. Cause not known. -
Create Object of "ObjectName" Class by giving only Domain Name.
Hie,
I want to create Object of "ObjectName" class without specifying its key value properties, but i want to only specify the domain name.
For eg:
ObjectName on=new ObjectName("jboss.ws4ee:*"); here jboss.ws4ee is the domain name and after colon(:) will come the key value properties.. i dont want to specify that because i want the list of all mbeans coming under this domain i.e. jboss.ws4ee
So anyone can plzzz help me..
Regards.Hi,
What were you trying to do with that name?
ObjectName on=new ObjectName("jboss.ws4ee:*");
You cannot create an MBean with such an ObjectName. You can only
use it as first argument to queryNames() and queryMBeans();
If you want to get the attributes of all jboss MBeans then you will need to
do something like that:
final ObjectName pattern=new ObjectName("jboss.ws4ee:*");
for (ObjectName o : server.queryNames(pattern,null)) {
System.out.println("MBean: " + o);
for (MBeanAttributeInfo info : server.getMBeanInfo(o).getAttributes()) {
final String attrname = info.getName();
System.out.println("\t"+attrname+"="+server.getAttribute(o,attrname));
}(disclaimer: this code was eyed-compiled)
hope this helps,
-- daniel
JMX, SNMP, Java, etc...
http://blogs.sun.com/jmxetc -
Cannot create JDBC driver of class '' for connect URL 'null'
HI,
Can any one help why i am getting the below error:
Cannot create JDBC driver of class '' for connect URL 'null'
The Error Stack Trace is:
Cannot create JDBC driver of class '' for connect URL 'null'
java.lang.NullPointerException
at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(Unknown Source)
at java.sql.DriverManager.getDriver(Unknown Source)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1437)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCConnection.Open(Unknown Source)
at com.crystaldecisions.reports.queryengine.JDBConnectionWrapper.Open(SourceFile:123)
at com.crystaldecisions.reports.queryengine.Connection.br(SourceFile:1786)
at com.crystaldecisions.reports.queryengine.Connection.bs(SourceFile:505)
at com.crystaldecisions.reports.queryengine.Connection.t4(SourceFile:3020)
at com.crystaldecisions.reports.dataengine.dfadapter.DFAdapter.a(SourceFile:697)
at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.a(SourceFile:309)
at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.long(SourceFile:264)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1150)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:660)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:166)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:528)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:526)
at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:524)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:423)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:351)
at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)
at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)
at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716)
at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125)
at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)
at com.crystaldecisions.sdk.occa.report.application.ds.a(SourceFile:186)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:878)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.getPromptDatabaseLogOnInfos(SourceFile:815)
at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.getPromptDatabaseLogOnInfos(SourceFile:338)
at com.businessobjects.report.web.a.e.a(SourceFile:174)
at com.businessobjects.report.web.a.e.a(SourceFile:97)
at com.businessobjects.report.web.a.e.a(SourceFile:343)
at com.businessobjects.report.web.a.t.a(SourceFile:1726)
at com.businessobjects.report.web.event.bw.broadcast(SourceFile:97)
at com.businessobjects.report.web.event.am.a(SourceFile:53)
at com.businessobjects.report.web.a.t.if(SourceFile:2104)
at com.businessobjects.report.web.e.a(SourceFile:300)
at com.businessobjects.report.web.e.a(SourceFile:202)
at com.businessobjects.report.web.e.a(SourceFile:135)
at com.crystaldecisions.report.web.ServerControl.a(SourceFile:607)
at com.crystaldecisions.report.web.ServerControl.processHttpRequest(SourceFile:342)
at org.apache.jsp.CrystalReport_jsp._jspService(CrystalReport_jsp.java:205)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Cannot create JDBC driver of class '' for connect URL 'null'
java.lang.NullPointerException
at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(Unknown Source)
at java.sql.DriverManager.getDriver(Unknown Source)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1437)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCConnection.Open(Unknown Source)
at com.crystaldecisions.reports.queryengine.JDBConnectionWrapper.Open(SourceFile:123)
at com.crystaldecisions.reports.queryengine.Connection.br(SourceFile:1786)
at com.crystaldecisions.reports.queryengine.Connection.
Thanks
PenchalHI Shailendra,
I think your expecting code. The Code is as follows. and also for few reports i am getting Unexpected Database Error help me in this also
if(reportName != null && !"".equals(reportName) && reportSource==null){
//Initializing report
ReportClientDocument boReportClientDocument = new ReportClientDocument();
boReportClientDocument.open(reportName, 0);
Fields<IParameterField> parameterFields = boReportClientDocument.getDataDefController().getDataDefinition().getParameterFields();
System.out.println("Param Fields Size:"+parameterFields.size());
if (parameterFields.size() > 0) {
ParameterFieldController paramController = boReportClientDocument.getDataDefController().getParameterFieldController();
for (int i = 0; i < parameterFields.size(); i++) {
String paramName = parameterFields.getField(i).getName().trim();
System.out.println(" - "+paramName);
if(request.getParameter(paramName) != null) {
paramController.setCurrentValue("", paramName, request.getParameter(paramName));
System.out.println(paramName+":"+request.getParameter(paramName));
}else {
System.out.println("Param is Null:"+paramName+":"+request.getParameter(paramName));
paramController.setCurrentValue("", paramName, "");
reportSource = boReportClientDocument.getReportSource();
//session.setAttribute("ReportSource", reportSource);
boReportClientDocument.close();
CrystalReportViewer crystalReportViewer = new CrystalReportViewer();
crystalReportViewer.setName(reportName);
crystalReportViewer.setOwnPage(true);
crystalReportViewer.setBestFitPage(true);
crystalReportViewer.setToolPanelWidth(0);
crystalReportViewer.setHasToggleParameterPanelButton(false);
crystalReportViewer.setHasToggleGroupTreeButton(false);
crystalReportViewer.setReportSource(reportSource);
crystalReportViewer.setEnableDrillDown(false);
crystalReportViewer.processHttpRequest(request, response,getServletConfig().getServletContext(),null);
Thanks
Penchal
Maybe you are looking for
-
How to set up Print Specs and Profiles in CS5 Suite
I am no color management expert but I do want to get my printer to print the same colors as my monitor displays in PSD, AI and InD applications. My Intel iMac and Cinema Display running OS10.5.8 are both color calibrated with Spyder 3 Elite to achiev
-
Hey Guys, my status might say noob but i am well seasoned in ADF. We migrated from 11.1.1.3 to the new JDEV 11.1.2. We are doing a test run before we commit to it. I noticed the following: We have master detail forms that work flawlessly in 11.1.1.3
-
Smart Form printing issue in repeate page
Hi, We have one smartfforms printing some notification details in which Only one page layout is use and it is repeated again at one block Upper margin is 18.23 and Height is 9.60 CM on first page it is printing properly but on second page it is
-
Which interface would you use to list each element of a vector?
Which interface would you use to list each element of a vector?
-
Complete removal of iTunes and QuickTime
If I completely remove iTunes and QuickTime, will all the songs from my music library in iTunes be deleted too? Will they be there when I install iTunes again? Windows XP Pro