Help coderanch get a
new server
by contributing to the fundraiser

Mike Tihonchik

Greenhorn
+ Follow
since Mar 20, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Mike Tihonchik

Kengkaj Sathianpantarit wrote:It happened in which page? form view or success view?


It happens to the form view on initial load..
15 years ago
Yes, I did, however, I get the following exception in my JBoss window:

16:13:24,217 ERROR [[i550imports]] Servlet.service() for servlet i550imports threw exception
java.lang.StackOverflowError
at org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:210)
at org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:222)
at org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:222)
at org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:222)
at org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:222)
at org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:222)

15 years ago
I am new to Spring MVC, and I can't seem to figure out what is the problem. I get the following exception: Neither BindingResult nor plain target object for bean name 'loginUser' available as request attribute. Here are my files: web.xml, ...-servlet.xml and LoginController.java




I think, I messing up in the web.xml or ...-servlet.xml while defining my urlMapping, because if I change the following line to: the login page come up. Thank you in advance
15 years ago

Danny Rebello wrote:

C:\danny\hibernate\FirstHibernateExample\
my java,class and xml files are under
C:\danny\hibernate\FirstHibernateExample\src\com\test\example\

When I compile the java files everything is fine.
When I run the application I get the following error :
net.sf.hibernate.HibernateException: hibernate.cfg.xml not found.
In my code I have specified
private static String CONFIG_FILE_LOCATION = "/hibernate.cfg.xml";



try removing forward slash from the location, i.e.
I am trying to use Hibernate annotations for mapping and I get following error:
org.hibernate.AnnotationException: Cannot find the expected secondary table: no servers available for annotated.Server
Here is my code:




I am using Derby as my database and I know I am getting connection to it...
any help would be appreciated...

Paul Clapham wrote:

Mike Tihonchik wrote:I moved it to the source directory [where my hibernate.cfg.xml and derby.cfg.xml are located] and still the same error persist...


But doesn't your configuration say it's in a directory called "database" under that?



I moved both my xml and pojo out of it, just to make sure that directory structure was not affecting anything...

Paul Clapham wrote:So no matter what you put in servers.hbm.xml, you still get the same error? (Hint: try putting rubbish in it.) If so, that simply means that Hibernate can't find it.



That might be the case... I did put some random tags and still got the same error... What is confusing to me if it can't find it, why??? I moved it to the source directory [where my hibernate.cfg.xml and derby.cfg.xml are located] and still the same error persist... The only other thing, I had an exception before that told me specifically that it could not find the mapping class (which was different exception from what I am getting now). I was getting "not found" exception when I wrongly specified path in hibernate.cfg.xml file to the mapping.
I removed everything from the servers.hbm.xml to look like this:

and adjusted my POJO accordingly (to have only one String of masterKey). It still throws the error... I don't think there is a problem with form and validity of xml's themselves, because if I remove the line

from derby.cfg.xml, I get the connection and I am able to query database, and bring results back....

Paul Clapham wrote:Problem solved, then?



No, it was a typo when I was writing a post...

Paul Clapham wrote:You say you have a file named "server.hbm.xml" but you also have an XML document which refers to "servers.hbm.xml".



Got you, its just a typo...
Hey guys,
I am new to Hibernate (couple days). I got this error while running my program:
org.hibernate.InvalidMappingException: Could not parse mapping document from invalid mapping

Now I have looked on internet and none of the solutions seems to help me. Here is my files:
derby.cfg.xml


servers.hbm.xml


and my POJO:
Server.java


Now the only thing that might be different from everybody else, is that I am using IntelliJ IDEA 7.0.4 as my development tool...
Thank you, any suggestions would be highly appreciated...
mike
I have a Base64 byte[] that contains a picture, that is 240x180 and is 88k. I was wondering if there is a way to change the color depth of this picture, so that the resolution stays the same, but the size of the picture goes down??? Thanks in advance
Mike
16 years ago