Page 2 of 2 FirstFirst 12
Results 21 to 33 of 33
  1. #21
    Join Date
    Jan 2013
    Posts
    69
    Rep Power
    0

    Default Re: HTTP Status 500 - JBoss

    where i am supposed to find this...Sorry this may be an ignorant question but at this point I need reliable resources couse i have more than 2 weeks with this project and i'm totally bored with all the problems it brought to me ...

  2. #22
    Join Date
    Jan 2013
    Posts
    69
    Rep Power
    0

    Default Re: HTTP Status 500 - JBoss

    Sorry for the ignorance of the question but where i'm supposed to find this??
    I'm sorry but all the problems this project brought to me have totally disoriented me

  3. #23
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: HTTP Status 500 - JBoss

    Please do not ask for code as refusal often offends.

    ** This space for rent **

  4. #24
    Join Date
    Jan 2013
    Posts
    69
    Rep Power
    0

    Default Re: HTTP Status 500 - JBoss

    I did some other things trying to find the solution but the error remains the same ...

  5. #25
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: HTTP Status 500 - JBoss

    What things?
    Did you read those docs?
    Did you change the driver you are trying to reference in your data source?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  6. #26
    Join Date
    Jan 2013
    Posts
    69
    Rep Power
    0

    Default Re: HTTP Status 500 - JBoss

    Yes i changed the driver and the log files now specifies that :
    com.javasrc.webphotogallery.dao.AlbumDAOException: SQL Exception while getting DB connection :
    2013-02-05 21:31:01,409 ERROR [STDERR] (http-127.0.0.1-8080-3) org.jboss.util.NestedSQLException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.; - nested throwable: (javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.)

  7. #27
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: HTTP Status 500 - JBoss

    I suspect it's time to dig out the JBoss docs.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  8. #28
    Join Date
    Jan 2013
    Posts
    69
    Rep Power
    0

    Default Re: HTTP Status 500 - JBoss

    Uffff I read yeasterday all about the version of JBoss i am using.
    I found that org.gjt.mm.mysql.Driver is an old driver - class and it was suggested to update it to com.mysql.jdbc.Driver as soon as possible...
    I don't know exactly how this update should be made but when i changed the driver class specification in my webphotogallery-ds.xml from org.gjt.mm.mysql.Driver to com.mysql.jdbc.Driver the log file says the thing i mentioned before :
    com.javasrc.webphotogallery.dao.AlbumDAOException: SQL Exception while getting DB connection :
    2013-02-05 21:31:01,409 ERROR [STDERR] (http-127.0.0.1-8080-3) org.jboss.util.NestedSQLException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.; - nested throwable: (javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.)

  9. #29
    Join Date
    Jan 2013
    Posts
    69
    Rep Power
    0

    Default Re: HTTP Status 500 - JBoss

    The thing that i don't understand most is the fact that the connection betwee jBoss and mysql is working when i put images in the db through the class LoadImage ...

  10. #30
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: HTTP Status 500 - JBoss

    So changing the Driver fixed the problem with no class found.
    Something else is causing the null factory.
    That could well be your code, though.
    If one part works, and another part doesn't, then compare the two bits of code.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  11. #31
    Join Date
    Jan 2013
    Posts
    69
    Rep Power
    0

    Default Re: HTTP Status 500 - JBoss

    Okkk ... yesterday I finelly solved all my problems...I didn't change the driver class "org.gjt.mm.mysql.Driver" , but I changed the way of getting the db connection in my code!
    When I got the error I was specifying the db connection as:
    Java Code:
    ....
    ....
    Connection conn = null;
            PreparedStatement ps = null;
    
            try
            {
                conn = this.getDBConnection();
    ...
    ...
    and i had created this method:
    Java Code:
    protected Connection getDBConnection() throws AlbumDAOException
        {
            try
            {
                return datasource.getConnection();
            } 
            catch( SQLException se )
            {
                throw new AlbumDAOException( "SQL Exception while getting " +
                                             "DB connection : \n" + se);
            }
        }
    To resolve the problem I removed this lines of code and replaced them with:
    Java Code:
    ....
    ....
    Connection conn = null;
            PreparedStatement ps = null;
    
            try
            {
    		    try {
    				Class.forName("org.gjt.mm.mysql.Driver");
    			} catch (ClassNotFoundException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			}
                String url = "jdbc:mysql://localhost:3306/webphotogallery";
                String username = "root";
                String password = "";
                conn = DriverManager.getConnection( url, username, password );
    ....
    ....
    This didn't solve my problem at all, so I tried to do sth else ...
    I also included the Java connector (JDBC .jar file ) in the lib directory of WEB-INF and voilaaa , finally I had the possibility to view for the first time my web photo gallery .

    I also got another error when trying to upload an image from my pc to one album of my web photo gallery .
    I resolved this problem this way:
    1) At first I opened Eclipse and for the ImageUploadServlet.java :
    -rightclick>>Build path>>Configure Build path>>Libraries>>Add External JARs
    at this point I added commons-fileupload-1.2.2.jar
    2)I downloaded commons-io and encluded it in the CLASSPATH of my system environment variables and in the lib directory of WEB-INF
    This resolved the problem of uploading images
    Thank you all
    b.dhimitri

  12. #32
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: HTTP Status 500 - JBoss

    Do not set the CLASSPATH in your environment.
    That is out and out the wrong way of doing things.
    If it's in the WEB-INF/lib then it's accessible by your application.
    If it's needed by JBoss then it needs to be higher up in one of the JBoss libs (you'd need to read the docs).

    Finally, you really should figure out how to use a DataSource and it's underlying connection pool.
    The way you are doing it at the moment is not scaleable.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  13. #33
    Join Date
    Jan 2013
    Posts
    69
    Rep Power
    0

    Default Re: HTTP Status 500 - JBoss

    Ok...
    Anyway I will remove all the changes I did this week couse I built this project only for my class of Enterprise Architecture ...
    I don't think I will use JBOss and java in the future

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 3
    Last Post: 10-15-2012, 11:53 AM
  2. HTTP Status 500 -
    By gauravmanral in forum Java Servlet
    Replies: 2
    Last Post: 02-14-2012, 04:50 AM
  3. http://localhost:8080/helloservice/HelloService?Tester HTTP Status 404 -
    By vietnamusa in forum Enterprise JavaBeans (EJB)
    Replies: 0
    Last Post: 03-13-2011, 12:02 AM
  4. HTTP Status 500 -
    By gardiann in forum Java Servlet
    Replies: 2
    Last Post: 12-26-2010, 12:49 PM
  5. Replies: 7
    Last Post: 11-11-2009, 08:29 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •