Problem when using a new class "File" in JSP
I'm using Weblogic 4.52sp2 under Solaris 2.6 with JDK 1.2.1_04. I've got a problem with a JSP that uses a commercial bean which contains a specific "File" class. This class has its own package: com.jspsmart.upload.File. While compiling, Weblogic raises an exception:
Fri Mar 09 14:41:38 CET 2001:<I> <ServletContext-Servlets> weblogic.servlet.JSPServlet: Generated java file: /data/html/compiledJSP/_jspsmartupload/_jsp/_sample2.java
Fri Mar 09 14:41:43 CET 2001:<E> <ServletContext-Servlets> weblogic.servlet.JSPServlet: Compilation of /data/html/compiledJSP/_jspsmartupload/_jsp/_sample2.java failed:
/data/html/compiledJSP/_jspsmartupload/_jsp/_sample2.java:46: Ambiguous class: java.io.File and com.jspsmart.upload.File
f = new File("/data/html/jspsmartupload/jsp/sample2.jsp");
I looked at the .java generated file but it seems that everything is OK: f is a java.io.File
public class _sample1 extends weblogic.servlet.jsp.JspBase implements weblogic.servlet.jsp.StaleIndicator {
// StaleIndicator interface
public boolean _isStale() {
java.io.File f = null; long lastModWhenBuilt = 0L, lastMod = 0L;
f = new File("/data/html/jspsmartupload/jsp/sample1.jsp");
lastModWhenBuilt = 984144952000L;
lastMod = f.lastModified();
if (!f.exists() || lastMod > lastModWhenBuilt) return true;
return false;
We can't neither change the bean (no sources) nor Weblogic JSP engine (of course). Has anyone a solution ?
[att1.html]
i think you should try this
f = new java.io.File("/data/html/jspsmartupload/jsp/sample1.jsp");
"Laurent PAILLARD" <[email protected]> wrote in message
news:[email protected]...
I'm using Weblogic 4.52sp2 under Solaris 2.6 with JDK 1.2.1_04. I've got a
problem with a JSP that uses a commercial bean which contains a specific
"File" class. This class has its own package: com.jspsmart.upload.File.
While compiling, Weblogic raises an exception:
Fri Mar 09 14:41:38 CET 2001:<I> <ServletContext-Servlets>
weblogic.servlet.JSPServlet: Generated java file:
/data/html/compiledJSP/_jspsmartupload/_jsp/_sample2.java
Fri Mar 09 14:41:43 CET 2001:<E> <ServletContext-Servlets>
weblogic.servlet.JSPServlet: Compilation of
/data/html/compiledJSP/_jspsmartupload/_jsp/_sample2.java failed:
/data/html/compiledJSP/_jspsmartupload/_jsp/_sample2.java:46: Ambiguous
class: java.io.File and com.jspsmart.upload.File
f = new File("/data/html/jspsmartupload/jsp/sample2.jsp");
I looked at the .java generated file but it seems that everything is OK: f
is a java.io.File
public class _sample1 extends weblogic.servlet.jsp.JspBase implements
weblogic.servlet.jsp.StaleIndicator {
// StaleIndicator interface
public boolean _isStale() {
java.io.File f = null; long lastModWhenBuilt = 0L, lastMod = 0L;
f = new File("/data/html/jspsmartupload/jsp/sample1.jsp");
lastModWhenBuilt = 984144952000L;
lastMod = f.lastModified();
if (!f.exists() || lastMod > lastModWhenBuilt) return true;
return false;
We can't neither change the bean (no sources) nor Weblogic JSP engine (of
course). Has anyone a solution ?
Similar Messages
-
Error occured when using javap (Java Class File Disassembler)
Hi,
I have tried to use Java Class File Disassembler by using javap and i'm getting the error shown below,
C:\> javap abc.class
ERROR: Could not find abc.class
abc.class present in C:\ drive.
Please let me know how to solve the problem
Thanks in Advance
SoundarHi,
Thanks for your information, it works fine. Please let me know is there any option to display the method and variable implemation in abc.class.
I have tried javap abc it displays the method name only.
Thanks in advance,
Soundar -
When using just the class files
I have passed my app over to someone else by just passing over the .class files and the dlls and a text file that I need to generate an id.
Everything seems to be working fine apart from generating the id number I get a blank dialog box with no id inside. Has anyone anyideas why??Your question will be very hard to answer, because we don't have a clue how you create the id using the text file. Please explain how you do that, possibly post some source code.
Jesper -
Deployment problems when using several ejb-jar files
Hello All,
I am having problems with deployment of my J2EE application. My EAR file has several EJB-JARs, one for each entity bean. However I refer to the other EJBs in one EJB. Hence I included the <ejb-ref> element in the deployment descriptor of the entity bean. But I am getting the deployment error that "the bundle does not contain the bean name". I tried to change the <ejb-name> value (within the <ejb-ref> element) to the JNDI name of the EJB I am referring to, and also added the <ejb-link> tag specifying the location of the JAR file that has the EJB. None of the attempts worked.
Can someone help me out on how I am supposed to go about when I have several ejb-jar files as opposed to a single one? I am deploying my app on Sun ONE AS 7.0.
Thank you,
PS: I am posting this message on several forum topics. Please disregard this message if you have seen/answered this message. Thanks.Hi ,
It would help if you could post the relevant snippets of your
ejb-jar.xml. In general, you definitely shouldn't use jndi-name
for any of the linking information. jndi-name is not part of the
standard deployment descriptor. The syntax for the ejb-link is
[ejb-jar uri]#ejb-name
K -
Problem when using keyfield in sender file content conversion
Hi all,
I am using FCC at sender side.
My recordset structure is as follow::
<MT_TW_TLOG>
<Transaction>
---<SalesItem> 1...unbounded
<XF_SOURCESYS>
<XF_STORECODE>
<XF_TYPE>
<XF_VOIDFLAG>
---</saleItem>
---<SalesReturn> 1...unbounded
<XF_SOURCESYS>
<XF_STORECODE>
<XF_TYPE>
<XF_VOIDFLAG>
---</saleReturn>
---<SalesTotal>
<XF_SOURCESYS>
<XF_STORECODE>
<XF_TYPE>
<XF_VOIDFLAG>
---</saleTotal>
---<SalesTender> 1...unbounded
<XF_SOURCESYS>
<XF_STORECODE>
<XF_TYPE>
<XF_VOIDFLAG>
---</saleTender>
</Transaction>
FCC specification that i have used is::
Recordset name:: Transaction
Recordset Structure:: salesItem,,salesReturn,,salesTotal,1,SalesTender,*
Recordset Sequencee::
Variable
Key field name::XF_TYPE
key fiel type::String(Case-sensitive)
then i have given following information::
salesItem.fieldnames ::all field names
salesItem.fieldSeparator::,
salesItem.keyFieldvalue::2
salesItem.processFiledNames::fromConfiguration
salesReturn.fieldnames ::all field names
salesReturn.fieldSeparator::,
salesReturn.keyFieldvalue::2
salesReturn.processFiledNames::fromConfiguration
salesTotal.fieldnames ::all field names
salesTotal.fieldSeparator::,
salesTotal.keyFieldvalue::2
salesTotal.processFiledNames::fromConfiguration
salesTender.fieldnames ::all field names
salesTender.fieldSeparator::,
salesTender.keyFieldvalue::2
salesTender.processFiledNames::fromConfiguration
My source file is a text file.
So when i am transfering following data,
scenario works fine.
PCTW,TWS001,2,1
PCTW,TWS001,2,10
PCTW,TWS001,3,2
PCTW,TWS001,1,3
PCTW,TWS001,4,4
Third field is my XF_TYPE.
But if i change the order of records as follows::
PCTW,TWS001,3,1
PCTW,TWS001,3,10
PCTW,TWS001,2,2
PCTW,TWS001,1,3
PCTW,TWS001,4,4
It fails at adaper monitor and throws following error::
2006-11-01 10:42:00 UTC: Error: Conversion of complete file content of 'try.txt' to XML format failed around position 0: Exception: ERROR consistency check in recordset structure validation (line no. 3: missing structure(s) before type 'SalesItem'
Please provide some help on it.
Thanks & Regards,
NilimaHi Nilima,
Just go through this Weblog.
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
and specially the hilighted ( circled text ) in this and its description below.
Hope this will be helpful
Reward if helpful.
Regards
Sachin -
Problem when use multiple c:import jstl on jsp on Tomcat 5.0
I have jsp that use multipe import jstl tag. I was able to run on the Tomcat 5.5.9. When I deploy it on Tomcat 5.0.28, it is not working.
For example:
<c:import url="/jsp/page1.jsp" />
<c:import url="/jsp/page2.jsp" />
I look at Tomcat cache directory and I only see page1.jsp compiled but not page2.jsp. I look at the catalina.out log file and the error message shows below. I thought JSTL is working for Tomcat 5.x up. Do anyone have any idea? Please help.
Thanks.
java.lang.ArrayIndexOutOfBoundsException: 204
at org.apache.jasper.compiler.JspReader.peekChar(JspReader.java:164)
at org.apache.jasper.compiler.JspReader.isSpace(JspReader.java:357)
at org.apache.jasper.compiler.JspReader.isDelimiter(JspReader.java:440)
at org.apache.jasper.compiler.JspReader.parseToken(JspReader.java:405)
at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1285)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1560)
at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:220)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:510)
at org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(Unknown Source)
at org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(Unknown Source)
at org.apache.jsp.jsp.offermgmt.ajax.ajaxPromotion_jsp._jspx_meth_c_import_1(ajaxPromotion_jsp.java:218)
at org.apache.jsp.jsp.offermgmt.ajax.ajaxPromotion_jsp._jspService(ajaxPromotion_jsp.java:70)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)Can you access page1 and page2.jsp correctly on their own?
ie could the problem be with page2.jsp rather than the import command? -
Problems on zipping and unzipping class files
I am trying to add a class file to a new jar file using FileInputStream and JarOutputStream.
I am getting a very unique problems.
when I read a class file using FileInputStream from my local hard disk I am getting 30 bytes less than then actual file size (the difference in bytes is exactly 30 bytes for any file, either class or xml or java, I dont understand this concept). after reading the contents I am writing the bytes read to a jar file using JarOutputStream. This all gets done fine. But when I extract the class file written into the jar file and try to run the class it is giving me the exception as follows:
java.lang.ClassNotFoundException: com.wipro.flowbrix.plugins.factory.NewClass
Exception in thread "main" java.lang.ClassFormatError: com/wipro/flowbrix/plugins/factory/NewClass (Bad magic number)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
The classpath to the folder from where I am running the file is set. I have double checked the classpath.
any information or solutions regarding this would be of great help.A "magic number" is a short sequence of data at the beginning of a file used to identify the file. ".class" files, for instance, always start with OxCA, 0xFE, 0xBA and 0xBE.
If the 30 bytes missing are at the beginning of your file, there's nothing suprising in getting a "ClassFormatError" exception.
I think we should concentrate on your first problem. Can you post the code used to add the class file, please?
/Stephane -
Async problem when using FlexUnit4
Hi all,
I have a problem I could use a little help with. I'm trying to change a test to FlexUnit4 (first used FlexUnit 0.9), but when using the Async class I get a "Timeout Occurred before expected event" (from the ExpectAsync.handleAsyncTimeOut function (line 315)).
The function looks like this:
[Test(async)]
public function GetApplicationMenuTest():void
var event:GetApplicationMenuEvent=new GetApplicationMenuEvent(this.loader, applicationId);
var asyncHandler:Function=Async.asyncHandler(this, resultHandler, 500);
this.loader.fireEvent(event, asyncHandler);
The loader.fireEvent(event:MVCEvent, callback:Function) method is a function that will set a busy indicator on the screen and that fires the event. When the event is fired a server call is eventually made, and we wait for a responds. When the responds is received the retrieved data is processed until finally the function this.event.loader.receiveData(resultObject) is called. Where the loader is the same as the function above and the resultObject is the processed responds data.
This receivedata function removes the busy indicator from the screen and calls the the callback:Function as can be seen from the super class of the loader:
public function receiveData(data:Object):void
this.callBackFunction(data);
The callBackFunction is the following function in our test:
private function resultHandler(data:EibDataObject):void
Assert.assertTrue("The session is not ok", data.sessionOK);
Assert.assertTrue("Fault messages have been retrieved", data.messages.length <= 0);
Using this setup described above I get a "Timeout Occurred before expected event". I never had a problem using the FlexUnit 0.9 setup that looked as follows:
public function GetApplicationMenuTest():void
var applicationId:String = "";
var event:GetApplicationMenuEvent = new GetApplicationMenuEvent(this.loader, applicationId);
this.loader.fireEvent(event, addAsync(resultHandler, Model.TIMEOUT));
So the only difference in the test is the callback:Function that is set.
I checked out the code of FlexUnit4 (http://opensource.adobe.com/svn/opensource/flexunit/branches/4.x/FlexUnit4) to debug the problem and I found that the method AsyncHandler.handleEvent(event:Event) would not be entered. When I changed this method to AsyncHandler.handleEvent(data:Object) I saw that the argument passed to this function was not an event but the resultObject described above.
This is offcourse pretty logical because AsyncHandler.handleEvent is the method that is returned as the Function from Async.asyncHandler(...).
What do I need to do to change
public function GetApplicationMenuTest():void
var applicationId:String = "";
var event:GetApplicationMenuEvent = new GetApplicationMenuEvent(this.loader, applicationId);
this.loader.fireEvent(event, addAsync(resultHandler, Model.TIMEOUT));
to FlexUnit 4 in the scenario described above? Hope you guys can help
Greetz,
Rick
Also I have a small question, what is the 'timeout=xxx' statement for in the [Test] metadata when you also provide a timeout to the async method?A few things for you:
1) The opensource.adobe.com address is always lagging behind. Our active website is www.flexunit.org and our active code development is at github. We just update the adobe site with major release versions.
2) The timeout in the Test metadata: We support multiple simultaneous outstanding events in FlexUnit 4. In other words, you can say, you expect a given object to broadcast event1, followed by event2, followed by event3. The timeout in the Test is an overall timeout for all of the steps, so each is given their own timeout, but in total they should not exceed the number assigned in the Test metadata
3) As you noted the async methods are expecting to handle an event and you are using them with a callback, which is the root of the problem. I clearly missed the fact that the .9 version would allow this use case, so, if you would, I would appreciate if you could file an enhancement request in our project at bugs.adobe.com and I can work on getting this resolved for the next version.
In the meantime, you could use the responder functionality, which seems like it would work fine, albeit not as elegant as I would like. I can't test this out at my current location, but wanted to get you an answer asap, so post back with issues.
[Test(async)]
public function GetApplicationMenuTest():void
var event:GetApplicationMenuEvent=new GetApplicationMenuEvent(this.loader, applicationId);
var responder:Responder = new mx.rpc.Responder( resultHandler, null );
var asyncResponder:IResponder=Async.asyncResponder(this, responder, 500);
this.loader.fireEvent(event, asyncResponder.result );
Mike -
There is a problem with using the new Hotmail attachment buttons with firefox 3.6.8
I use firefox 3.6.8 browser and was unable to use the new attach file buttons in the newest version of hotmail. .
I sent a help request to microsoft and got back a 'generic' answer that the new hotmail works with all browers; ie, safari, chrome and firefox 3.0+.
Well, that is not exactly true. Because I then troubleshot the problem by opening hotmail in ie vice firefox I was able to attach multiple files (pics/documents) with no problem.
I then went back to firefox and still had the same problem.
The mouse pointer just hovers over each icon where there should be a button and no clicking is there to be clicked....so, there is no way to attach.
hopefully you'll get it worked out soon.
regards, rob NAlthough possibly not related to your problem, I have to remind you that the version of Firefox you are using at the moment has been discontinued and is no longer supported. On top of this, it has known unpatched bugs and security problems. I urge you to update to the latest version of Firefox, for maximum security, stability, performance and usability. You can get it for free, as always, at [http://www.getfirefox.com getfirefox.com].
As for your problem, hopefully this support article is what you need:
http://support.mozilla.com/en-US/kb/Websites+look+wrong
In any case, it's possible that you are having a problem with some Firefox add-on that is hindering your Firefox's normal behavior. Have you tried disabling all add-ons (just to check), to see if Firefox goes back to normal?
Whenever you have a problem with Firefox, whatever it is, you should make sure it's not caused by one (or more than one) of your installed add-ons, be it an extension, a theme or a plugin. To do that easily and cleanly, run Firefox in [http://support.mozilla.com/en-US/kb/Safe+Mode safe mode] (don't forget to select ''Disable all add-ons'' when you start safe mode). If the problem disappears, you know it's from an add-on. Disable them all in normal mode, and enable them one at a time until you find the source of the problem. See [http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes this article] for information about troubleshooting extensions and themes and [https://support.mozilla.com/en-US/kb/Troubleshooting+plugins this one] for plugins.
If you need support for one of your add-ons, you'll have to contact its author.
If the problem does not disappear when all add-ons are disabled, please tell me, so we can work from there. Please have no fear of following my instructions to the line, as all can be easily undone. -
i tried everything in this article, but still have the same problem when using Rapidweaver software. NOT with other software. I am converting my iWeb site to Rapidweaver, whenever there is a calmer period in my office. I have 16 Gb RAM on my NEW iMac and have Parallels desktop, mail, safari, iWeb and Rapidweaver running simultanious.
I never have the problem if i don't use Rapidweaver, but after i have added several pages to Rapidweaver, the problem begins. my iMac won't start up. the only thing that works is re-installing Macos OS X 10.8. i tried even whiping the completeharddrive, and reinstalling with a complete new user, the same problem.
I had it on my previous iMac also, and bought a new one because i thought the problem was in the iMac first. i hadn't noticed it only happens with using rapidweaver.
i sent my complete rapidweaver project to the programmers from rapidweaver at Realmacsoftware, but they couldnt reproduce my problem, there macs started up without any problem.
i deleted all the rapidweaver addons and extra stacks, and started a complete new project.
saterday i had the problem again, after adding about 5 new pages to my rapidweaver site.
i think i have reinstalled Macos OS X 10.8.2 20 or 30 times by now
does anyone have a sollution?Type '''about:support''' in the URL bar and hit Enter.
Scroll down almost to the bottom of that listing and see if you have '''user.js Preferences''' just above the '''''Graphics''''' category.
If you do have that, click on '''user.js file''' in this sentence. <br />
''Your profile folder contains a user.js file, which includes preferences that were not created by Firefox.''
Does that "different homepage" appear in that user.js file? -
Problem when using Javabeans in ADF?
Hi,
I encountered a problem when using ADF.
Please look at the following 2 classes :
public class Person
private String name;
private String city;
private int age;
public Person(String name, int age, String city)
this.name = name;
this.age = age;
this.city = city;
public Person()
public void setName(String name)
this.name = name;
public String getName()
return name;
public void setAge(int age)
this.age = age;
public int getAge()
return age;
public void setCity(String city)
this.city = city;
public String getCity()
return city;
public class PersonFactory
public PersonFactory()
public List getPersons()
List list = new ArrayList();
list.add(new Person("peit", 18, "dalian"));
list.add(new Person("robin", 22, "shenyang"));
list.add(new Person("Joe", 30, "York"));
list.add(new Person("Edi", 23, "Beijing"));
return list;
public List getNames()
List list = new ArrayList();
list.add("Peit");
list.add("Robin");
list.add("Joe");
list.add("Edi");
return list;
public void commit()
System.out.println("Data commited");
I created the PersonFactory class as DataControl, so I can use the getPersons() and getNames()(just for test, so they are simple), I drag the names from
the DataControl palette as Table in a JClientPanel, good luck, it works and displays the 4 Strings in a table, but when I drag the persons from
the DataControl palette as Table in the same JClientPanel, it does not work and raises exception :
java.lang.NullPointerException
at javax.swing.JTable.prepareRenderer(JTable.java:3731)
at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:1149)
at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1051)
at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:974)
So, I confused why? How to edit it properly?
Thanks.
Message was edited by:
[email protected]Hi, Frank
Thank you for your reply.
I am sorry for not explaining well. I mean that the getNames() works fine, but getPersons() does not. The only diferenece between them is the former is simple string and the latter is javabean, but when I made the PersonFactory as DataControl, I set the bean class Person for the getPersons()(list of persons) bean class.
I debuged the class, the exceptions raised when the table for getPersons() setModel() method called.
So, where is the problem?
Thanks. -
When i executed this class file i am getting runtime errors
when i executed this class file i am getting runtime errors
code is :
import java.awt.event.*;
import java.awt.*;
public class Test extends Frame
java.awt.Window w;
TextField t;
Test()
t=new TextField(20);
add(t);
addWindowListener(new WindowAdapter()
public void windowDeactivated(WindowEvent ev) {
w.toFront();
System.out.println("hai");
setSize(300,300);
setVisible(true);
public static void main(String args[])
Test t =new Test();
after executing that class i am getting this errors
Exception occurred during event dispatching:
java.lang.NullPointerException:
at WindowEventDemo.windowActivated(WindowEventDemo.java:76)
at java.awt.Window.processWindowEvent(Window.java:612)
at java.awt.Window.processEvent(Window.java:576)
at java.awt.Component.dispatchEventImpl(Compiled Code)
at java.awt.Container.dispatchEventImpl(Compiled Code)
at java.awt.Window.dispatchEventImpl(Compiled Code)
at java.awt.Component.dispatchEvent(Compiled Code)
at java.awt.EventQueue.dispatchEvent(Compiled Code)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:68)
if anybody know how to pls help meYou are using w that you have not done anything with.
Add following code to the begining of your cinstructor:
w = this;
Then it should work.
//Anders ;-D -
Hello all, can somebody help me?
I have encountered a problem when using Flash Player
V9.0.115. Your help would be greatly appreciated.
The problem described as follows:
1. The flash file with sound works well before uploaded to
website. The audio lost when uploaded to the website(There is no
problem with the flash file size). I have uploaded the flash file
to website for you to test. Please go to
http://www.sameshow.com/democreator/create
a new site.swf and kindly check with it.
2. When we open the flash movie in IE with Flash player
V9.0.47 and previous versions (Flash9d.ocx), the flash movie with
sound works well.
3. When we upgrade the flash player to the latest version
V9.0.115 (Flash9e.ocx), the video works well, but the sound just
can play several seconds and then stop.
4. On Flash Player ocx V9.0.115. If we publish the flash
movie on web with 24fps, the sound just can work several seconds
and then stop, the problem is the same if we use the
TShockWaveFlash control to play the flash movie.
5. On Flash Player ocx V9.0.115. If we publish the flash
movie with 12fps, the sound works well but the quality is really
very poor. It seems that the sound plays shorter with more frames
per second. But the flash file works well with the Flash Player
V9.0.47 and previous versions (Flash9d.ocx).
Can somebody help me to figure it out? Thanks in advance!
Regards,
Sabrina
[email protected]Hello Darren, I really appreciate your response. My mail is
[email protected] I have uploaded the flash file to our
ftp,
http://www.sameshow.com/democreator/create
a new site.swf. And also I compressed the original file to a
zip file and uploaded to our ftp at
http://download.sameshow.com/aff/create.zip,
please kindly check! When we playing this flash file on FlashPlayer
V9.0.47 and previous, the audio works well. But the audio just can
play several seconds and then stop when I playing it on FlashPlayer
V9.0.115. The garbled audio makes us very upset. Your help would be
great appreciated!
Sabrina Fu -
ERROR MESSAGE WHEN USING PACK COMMAND Missing file ////presenter.css Command then fails
Also: "This course requires JavaScript to be enabled in your browser. Please enable JavaScript, then relaunch the course." I have Java enabled in all browsers
Thoughts? Using Presenter 10 Win 8.1 Intel I7 new HP with plenty of memory
ThanksI had saved one copy as an .asp but then resaved it to .xhtml
I'm assuming this is a static web site. Rename (F2) all your pages with .html or .htm extension.
.xhtml is not a valid extension.
Nancy O. -
Problem when using About Operator in Contains Query
Hi,
I'm new to Oracle and this forums too. I have a problem when using about operator in contains query.
I create a table with some records and then create a context index on 'name' column.
CREATE TABLE my_items (
id NUMBER(10) NOT NULL,
name VARCHAR2(200) NOT NULL,
description VARCHAR2(4000) NOT NULL,
price NUMBER(7,2) NOT NULL
ALTER TABLE my_items ADD (
CONSTRAINT my_items_pk PRIMARY KEY (id)
CREATE SEQUENCE my_items_seq;
INSERT INTO my_items VALUES(my_items_seq.nextval, 'Car', 'Car description', 1);
INSERT INTO my_items VALUES(my_items_seq.nextval, 'Train', 'Train description', 2);
INSERT INTO my_items VALUES(my_items_seq.nextval, 'Japan', 'Japan description', 3);
INSERT INTO my_items VALUES(my_items_seq.nextval, 'China', 'China description', 4);
COMMIT;
EXEC ctx_ddl.create_preference('english_lexer','basic_lexer');
EXEC ctx_ddl.set_attribute('english_lexer','index_themes','yes');
EXEC ctx_ddl.set_attribute('english_lexer','theme_language','english');
CREATE INDEX my_items_name_idx ON my_items(name) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS('lexer english_lexer');
EXEC ctx_ddl.sync_index('my_items_name_idx');Then I perform contains query to retrieve record :
SELECT count(*) FROM my_items WHERE contains(name, 'Japan', 1) > 0;
COUNT(*)
1
SELECT count(*) FROM my_items WHERE contains(name, 'about(Japan)', 1) > 0;
COUNT(*)
1But the problem is when I using ABOUT operator like in Oracle's English Knowledge Base Category Hierarchy it return 0
SELECT count(*) FROM my_items WHERE contains(name, 'about(Asia)', 1) > 0;
COUNT(*)
0
SELECT count(*) FROM my_items WHERE contains(name, 'about(transportation)', 1) > 0;
COUNT(*)
0I can't figure out what 's wrong in my query or in my index.
Any help will be appreciated.
Thanks,
Hieu Nguyen
Edited by: user2944391 on Jul 10, 2009 3:25 AMHello (and welcome),
You'd be best asking this question in the Oracle Text forum, here:
Text
And by the way, it will help others to analyse if you put {noformat}{noformat} (lowercase code in curly brackets) before and after your code snippets.
Good luck!
Maybe you are looking for
-
Error while signing data-Private key or certificate of signer not available
Hello All, I am new to PI. I am currently stuck with an issue. The scenario is as explained below. We need to check for the service availability before processing the data. So, we test for the RFC connection first from the ECC system. During this pr
-
White Screen of Death (or coma, at least)
Hi everyone, I've been searching all over the place for a couple of days and no solution to the following situation has worked as of yet, so any help would be greatly appreciated. Brand new installation of Snow Leopard on a late 2006 24" white iMac w
-
First Java Web Start download doesn't update, second time does
I'm using Java Web Start with our application. This release we upgraded to java 1.5 from 1.4. Now I have a few PCs, not all, that do not get updates the first time they launch the application. But when the launch it the second time they get the downl
-
Plz help - can't drag songs from library to iPod
I downloaded iTunes 7, then purchased 2 albums. They are in my Library, but won't drag to my iPod. Any suggestions? iPod mini
-
Cannot get my website to display properly on Iphone...what gives?
This mild annoyance has now become a huge problem lately. My supporting pages on my website do render properly on the browsers in my iphone. The background repeats itself and when I add the "no-repeat" code, one side of the screen is gray. Also, my