hisham ragheb

Ranch Hand
+ Follow
since Apr 14, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by hisham ragheb

Tim Holloway wrote:I think you need to crank up the log level on the Digester another notch. It should be able to display the actual name of the element being parsed. Maybe setting the SAX parser's log level to debug will help.

I've got a feeling that the information should already be there, but I'm just not seeing it. However, the Digester logging can be quite detailed, so when subtlety fails...



i noticed something i guess

when i removed jdk 1.6 update 17 and installed my older version 1.6 update 14 the server starts normally and things works fine

i tried to install update 17 again and the problem rises.

is it possible its a problem in the java update??

could you try it on your PC and check yourself

i'm waiting your response, its very important to me


regards
14 years ago

Tim Holloway wrote:I don't see an obvious problem, but you're likely to get this error when something's missing from the XML in the Realm element or when the general server.xml file is invalid. Basically, the Digester it attempting to construct class objects and load attributes into them and it thinks that a critical item is missing.

You might be able to look at one of the other logfiles and find an additional message. If not, turn up the logging level on Tomcat for org.apache.tomcat.util.digester to the debug level. Actually, I thought Digester was just org.apache.digester, but to be really certain, log debug on org.apache in general.

The digester will cheerfully spit out tons of information, but included in the mix will be an indication of what was being processed when the error was encountered.



it seems there is no other useful more messages even if i widen the logging scope

but this is the full log message maybe it has somthing i cant notice:

Using CATALINA_BASE: C:\Documents and Settings\User\.netbeans\6.8\apache-tomcat-6.0.20_base
Using CATALINA_HOME: C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.20
Using CATALINA_TMPDIR: C:\Documents and Settings\User\.netbeans\6.8\apache-tomcat-6.0.20_base\temp
Using JRE_HOME: C:\Program Files\Java\jdk1.6.0_17
Dec 20, 2009 6:27:36 AM org.apache.tomcat.util.digester.Digester startElement
SEVERE: Begin event threw exception
java.lang.NullPointerException
at sun.jkernel.DownloadManager.getBootClassPathEntryForClass(DownloadManager.java:928)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:293)
at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:205)
at org.apache.tomcat.util.digester.Rule.begin(Rule.java:153)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1358)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1339)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644)
at org.apache.catalina.startup.Catalina.load(Catalina.java:521)
at org.apache.catalina.startup.Catalina.load(Catalina.java:555)
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.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
Dec 20, 2009 6:27:36 AM org.apache.catalina.startup.Catalina load
WARNING: Catalina.start using conf/server.xml:
java.lang.NullPointerException
at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2808)
at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2834)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1361)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1339)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644)
at org.apache.catalina.startup.Catalina.load(Catalina.java:521)
at org.apache.catalina.startup.Catalina.load(Catalina.java:555)
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.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
Caused by: java.lang.NullPointerException
at sun.jkernel.DownloadManager.getBootClassPathEntryForClass(DownloadManager.java:928)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:293)
at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:205)
at org.apache.tomcat.util.digester.Rule.begin(Rule.java:153)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1358)
... 20 more
Dec 20, 2009 6:27:36 AM org.apache.tomcat.util.digester.Digester startElement
SEVERE: Begin event threw exception
java.lang.NullPointerException
at sun.jkernel.DownloadManager.getBootClassPathEntryForClass(DownloadManager.java:928)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:293)
at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:205)
at org.apache.tomcat.util.digester.Rule.begin(Rule.java:153)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1358)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1339)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644)
at org.apache.catalina.startup.Catalina.load(Catalina.java:521)
at org.apache.catalina.startup.Catalina.start(Catalina.java:575)
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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Dec 20, 2009 6:27:36 AM org.apache.catalina.startup.Catalina load
WARNING: Catalina.start using conf/server.xml:
java.lang.NullPointerException
at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2808)
at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2834)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1361)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1339)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644)
at org.apache.catalina.startup.Catalina.load(Catalina.java:521)
at org.apache.catalina.startup.Catalina.start(Catalina.java:575)
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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.NullPointerException
at sun.jkernel.DownloadManager.getBootClassPathEntryForClass(DownloadManager.java:928)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:293)
at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:205)
at org.apache.tomcat.util.digester.Rule.begin(Rule.java:153)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1358)
... 20 more
Dec 20, 2009 6:27:36 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 0 ms
java.lang.reflect.InvocationTargetException
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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.NullPointerException
at org.apache.catalina.startup.Catalina.await(Catalina.java:647)
at org.apache.catalina.startup.Catalina.start(Catalina.java:607)
... 6 more



please i need help so much..i tried this once before i even used the ssl but whats happening now is very bizarre..
14 years ago
hi,

i have a tomcat exception rise when i change the realm type to JDBCRealm

the exception looks like that:




the <Realm> tag i modified in server.xml looks like that:




i use Java DB and placed derby-client.jar in lib directory of the server

when i comment my <Realm> definition above and uncomment the default realm definition of the server the server start normally and authenticate using the tomcat-user.xml entries as the default realm storage

what could be the problem???





14 years ago

Freddy Wong wrote:



im using spring 2.5.5

so i tried to use this which didnt work



i tried this also which didnt work




i still always get NullPointerException when i try to access the Map

is there a way to debug the framework, everytime i use the debugger it dont step into the spring classes
15 years ago

Kengkaj Sathianpantarit wrote:There is no Map bean. You need a Map bean.



I'm trying similar example as the one in (Apress Spring Recipes) book, but he didn't define Map bean in this example?

can you show me how can i do it
15 years ago

Kengkaj Sathianpantarit wrote:Please post your configuration.



ok..but becareful that naming may not make so much sense here


A Person class:




A Career Abstract class:




(Subclass of Career) MSC class:




The beans.xml





The Main class (for testing):




also, thank you for your concern
15 years ago

Kengkaj Sathianpantarit wrote:You should have a Map bean specified.



The problem that @Autowire somtimes works and most time it dont when its used with collections(List,Set Map)..the container dont create the collection and inject the beans by type in it

this is my problem...the collection returned sometimes is null other times contains the injected beans

I dont know why
15 years ago
hi,


i created a Person bean which has a private field named degrees of type Map<String,Degree> and annotated it with @Autowired
i have also 2 classes who are different implementations of the Degree class, i defined and initialized them in the beans.xml

the problem arise when i try to get this field using its getter method where i always gets null. This mean this Map<String,Degree> is not initialized with the target beans

why is that?


regards

15 years ago

Bear Bibeault wrote:Does it work OK if you move the JSP out of WEB-INF?




No it doesn't...i tried to put the jsp file in the root and changed the web.xml to match that, but i still get the 404 code in the response


if i use same <url-pattern> in both <servlet-mapping> and <jsp-property-group> things doesn't work...so this eliminates the effect of <el-ignored> on a specific page and i think its not supposed to work like that...right?what could be the problem?

Things works smoothly if i just use the isELIgnored="true"
15 years ago
JSP
i wrote a one jsp page application to see the effect of <el-ignored> DD tag...Actually the container(Apache Tomcat 6) behave differently than what i expect and what i read

My web app is name 'show' and in the web-inf i placed the web.xml and mine.jsp, the problem is the container cannot recognize the url specified in <url-pattern> int the <jsp-property-group> and i get 404 response...but when i use either *.do or *.jsp in the <url-pattern> tag thigs works fine

is that a normal behavior???or what could be wrong???



The web app consist only of these two files to just monitor the <jsp-config> behavior

WEB-INF
|
|
|--------mine.jsp
|
|--------web.xml

web.xml







mine.jsp

15 years ago
JSP

Bear Bibeault wrote:

hisham ragheb wrote:i place the servlet-api.jar in the application context root as supposed


Incorrect. You must not copy the servlet-api.jar anywhere! Just leave it in the Tomcat folder where it belongs!



you didnt understand....i just took a copy from the tomcathome/lib just to test my web application

of course i didnt took the one that tomcat use :wink

i just took a copy of any jar file to test its downloading
15 years ago
i created a web application to download a jar file...but when i run the application it tries to open the servlet itself

here is the code

The Servlet:



this is the form.html(reside in the application context root):





This is the web.xml file:




i place the servlet-api.jar in the application context root as supposed...but whe i click the download button a dialog from the browser appears to either save dodo.do file or to choose a file to open it....how is that....why???
15 years ago

greg stark wrote:1. This is java forum, so you should restrict yourself to java relevant questions.
2. Both the browser and the server support the SSL/TLS protocol, which is described in RFC 2246 and its sucessors. It is available to java programmers through the JSSE.



This question is very related to java,because:

1-i want to add the public/private keys to the keystore
2-i want to use the private key to sign my jar using the jar signer
3-i want to configure the java.policy to trust the digital signature on the jar file

i think all of this is related to java anyway
15 years ago
Hi all,

Im totally new in this area so please be patient with me.

i want to make a secure web connection. so, i created the private key with openSSL as follow:

openssl>genrsa -out mykey.pem

here is my first question???

do i have to generate a CSR? or public key certificate?

should i use:

openssl>req -new -key mykey.pem -out mypublic.pem
or
openssl>req -new -key mykey.pem -x509 -out mypublic.pem

My second question is:
how do the web browsers of the clients automatically load my public key and use it to encrypt data when a form request is dedicated to my web site



regards
15 years ago
i want to develop with portals though i dont understand what are they exactly...i want to understand all about portals,portlets and portal servers...i need help with photos and examples from books or websites which are easy for begginers...i saw in sun.com a sun portal server if this server is used in the examples that would be great.any help will be really very appreciative.Portals are now very required in the career market so please help me.

thank you all java comrades
16 years ago