Jeremy Severson

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

Recent posts by Jeremy Severson

I did not put the class in a package. So i added it to one and update the folder structure in the WEB-INF/classes directory and now it works great.

Do you always have to have your classes in a package? I thought that if I did not have a package set that I could use the class name only for the import.
13 years ago
Hey All,

I created a class that I want to use for encrypting a string with RC4 and then return the encrypted string only problem is I seem to be having trouble getting the class to import. I am not sure if my import statement is wrong or if there is an issue with my class.

So I put my compiled class file into 'WEB-INF/classes' folder and here is the class code (code is sloppy now but I will clean it up once I have my class working),


Then in my jsp file this is what I put,


But when I run the jsp this is what I get (had to use code tag because of abbreviation rule on forum),


I am guessing it is something simple that I am doing wrong but can't seem to figure out what it is. Any help is appreciated.
13 years ago
Thanks Ulf,

After doing some more investigating yesterday that was the solution I came to also. Turns out my VPS does not unpack the war files and changing the setting "unpackwar" in the server.xml to true did not resolve it since they have a custom setup so now I am sitting here waiting for them to fix the issue.

Its good to hear someone that is more knowledgeable have a similar thought on the solution, makes me more confidant in pursuing my VPS provider to get the setting fixed for me.
13 years ago
Well I am still having issues with this. I went through and did the manual installation that jforum has listed at their site but still no luck. I also got a hold of the log output but it seems like greek to me. Hope someone out there with more knowledge on this can help me out.

Here is the log output,

5-Oct-10 3:42:59 PM org.apache.catalina.core.ApplicationContext log
INFO: Manager: list: Listing contexts for virtual host 'XXXXXXXXXXXXXX.com'
5-Oct-10 3:44:16 PM org.apache.catalina.core.ApplicationContext log
INFO: Manager: install: Installing web application at '/jforum' from 'jforum.war'
java.io.FileNotFoundException: jforum.war (No such file or directory)
at gnu.java.nio.channels.FileChannelImpl.open(libgcj.so.7rh)
at gnu.java.nio.channels.FileChannelImpl.<init>(libgcj.so.7rh)
at gnu.java.nio.channels.FileChannelImpl.create(libgcj.so.7rh)
at java.io.FileInputStream.<init>(libgcj.so.7rh)
at org.apache.catalina.manager.ManagerServlet.copyInternal(catalina-manager-5.5.17.jar.so)
at org.apache.catalina.manager.ManagerServlet.copy(catalina-manager-5.5.17.jar.so)
at org.apache.catalina.manager.ManagerServlet.deploy(catalina-manager-5.5.17.jar.so)
at org.apache.catalina.manager.ManagerServlet.doGet(catalina-manager-5.5.17.jar.so)
at javax.servlet.http.HttpServlet.service(tomcat5-servlet-2.4-api-5.5.17.jar.so)
at javax.servlet.http.HttpServlet.service(tomcat5-servlet-2.4-api-5.5.17.jar.so)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(catalina-5.5.17.jar.so)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(catalina-5.5.17.jar.so)
at org.apache.catalina.core.StandardWrapperValve.invoke(catalina-5.5.17.jar.so)
at org.apache.catalina.core.StandardContextValve.invoke(catalina-5.5.17.jar.so)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(catalina-5.5.17.jar.so)
at org.apache.catalina.core.StandardHostValve.invoke(catalina-5.5.17.jar.so)
at org.apache.catalina.valves.ErrorReportValve.invoke(catalina-5.5.17.jar.so)
at org.apache.catalina.core.StandardEngineValve.invoke(catalina-5.5.17.jar.so)
at org.apache.catalina.connector.CoyoteAdapter.service(catalina-5.5.17.jar.so)
at org.apache.coyote.http11.Http11Processor.process(tomcat-http-5.5.17.jar.so)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(tomcat-http-5.5.17.jar.so)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(tomcat-util-5.5.17.jar.so)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(tomcat-util-5.5.17.jar.so)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(tomcat-util-5.5.17.jar.so)
at java.lang.Thread.run(libgcj.so.7rh)
5-Oct-10 3:44:16 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive jforum.war
5-Oct-10 3:44:20 PM org.apache.catalina.core.ApplicationContext log
INFO: Manager: list: Listing contexts for virtual host 'XXXXXXXXXXXXXX.com'
log4j:ERROR Could not parse file [null/WEB-INF/log4j.xml].
java.io.FileNotFoundException: /usr/share/tomcat5/null/WEB-INF/log4j.xml (No such file or directory)
at gnu.java.nio.channels.FileChannelImpl.open(libgcj.so.7rh)
at gnu.java.nio.channels.FileChannelImpl.<init>(libgcj.so.7rh)
at gnu.java.nio.channels.FileChannelImpl.create(libgcj.so.7rh)
at java.io.FileInputStream.<init>(libgcj.so.7rh)
at gnu.java.net.protocol.file.Connection.connect(libgcj.so.7rh)
at gnu.java.net.protocol.file.Connection.getInputStream(libgcj.so.7rh)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(xerces-j2-2.7.1.jar.so)
at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(xerces-j2-2.7.1.jar.so)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(xml-commons-apis-1.3.02.jar.so)
at org.apache.log4j.xml.DOMConfigurator$1.parse(DOMConfigurator.java:598)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:711)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:604)
at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:733)
at net.jforum.JForumBaseServlet.init(JForumBaseServlet.java:108)
at net.jforum.JForum.init(JForum.java:91)
at org.apache.catalina.core.StandardWrapper.loadServlet(catalina-5.5.17.jar.so)
at org.apache.catalina.core.StandardWrapper.allocate(catalina-5.5.17.jar.so)
at org.apache.catalina.core.StandardWrapperValve.invoke(catalina-5.5.17.jar.so)
at org.apache.catalina.core.StandardContextValve.invoke(catalina-5.5.17.jar.so)
at org.apache.catalina.core.StandardHostValve.invoke(catalina-5.5.17.jar.so)
at org.apache.catalina.valves.ErrorReportValve.invoke(catalina-5.5.17.jar.so)
at org.apache.catalina.core.StandardEngineValve.invoke(catalina-5.5.17.jar.so)
at org.apache.catalina.connector.CoyoteAdapter.service(catalina-5.5.17.jar.so)
at org.apache.coyote.http11.Http11Processor.process(tomcat-http-5.5.17.jar.so)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(tomcat-http-5.5.17.jar.so)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(tomcat-util-5.5.17.jar.so)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(tomcat-util-5.5.17.jar.so)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(tomcat-util-5.5.17.jar.so)
at java.lang.Thread.run(libgcj.so.7rh)
log4j:WARN No appenders could be found for logger (net.jforum.JForumBaseServlet).
log4j:WARN Please initialize the log4j system properly.
5-Oct-10 3:44:29 PM org.apache.catalina.core.ApplicationContext log
SEVERE: StandardWrapper.Throwable
net.jforum.exceptions.ForumStartupException: Error while starting JForum
at java.util.Hashtable.put(libgcj.so.7rh)
at net.jforum.util.preferences.SystemGlobals.buildSystem(SystemGlobals.java:129)
at net.jforum.util.preferences.SystemGlobals.initGlobals(SystemGlobals.java:108)
at net.jforum.ConfigLoader.startSystemglobals(ConfigLoader.java:91)
at net.jforum.JForumBaseServlet.init(JForumBaseServlet.java:112)
at net.jforum.JForum.init(JForum.java:91)
at org.apache.catalina.core.StandardWrapper.loadServlet(catalina-5.5.17.jar.so)
at org.apache.catalina.core.StandardWrapper.allocate(catalina-5.5.17.jar.so)
at org.apache.catalina.core.StandardWrapperValve.invoke(catalina-5.5.17.jar.so)
at org.apache.catalina.core.StandardContextValve.invoke(catalina-5.5.17.jar.so)
at org.apache.catalina.core.StandardHostValve.invoke(catalina-5.5.17.jar.so)
at org.apache.catalina.valves.ErrorReportValve.invoke(catalina-5.5.17.jar.so)
at org.apache.catalina.core.StandardEngineValve.invoke(catalina-5.5.17.jar.so)
at org.apache.catalina.connector.CoyoteAdapter.service(catalina-5.5.17.jar.so)
at org.apache.coyote.http11.Http11Processor.process(tomcat-http-5.5.17.jar.so)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(tomcat-http-5.5.17.jar.so)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(tomcat-util-5.5.17.jar.so)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(tomcat-util-5.5.17.jar.so)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(tomcat-util-5.5.17.jar.so)
at java.lang.Thread.run(libgcj.so.7rh)
Caused by: java.lang.NullPointerException
at java.util.Hashtable.put(libgcj.so.7rh)
...19 more
5-Oct-10 3:44:29 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Allocate exception for servlet jforum
net.jforum.exceptions.ForumStartupException: Error while starting JForum
at java.util.Hashtable.put(libgcj.so.7rh)
at net.jforum.util.preferences.SystemGlobals.buildSystem(SystemGlobals.java:129)
at net.jforum.util.preferences.SystemGlobals.initGlobals(SystemGlobals.java:108)
at net.jforum.ConfigLoader.startSystemglobals(ConfigLoader.java:91)
at net.jforum.JForumBaseServlet.init(JForumBaseServlet.java:112)
at net.jforum.JForum.init(JForum.java:91)
at org.apache.catalina.core.StandardWrapper.loadServlet(catalina-5.5.17.jar.so)
at org.apache.catalina.core.StandardWrapper.allocate(catalina-5.5.17.jar.so)
at org.apache.catalina.core.StandardWrapperValve.invoke(catalina-5.5.17.jar.so)
at org.apache.catalina.core.StandardContextValve.invoke(catalina-5.5.17.jar.so)
at org.apache.catalina.core.StandardHostValve.invoke(catalina-5.5.17.jar.so)
at org.apache.catalina.valves.ErrorReportValve.invoke(catalina-5.5.17.jar.so)
at org.apache.catalina.core.StandardEngineValve.invoke(catalina-5.5.17.jar.so)
at org.apache.catalina.connector.CoyoteAdapter.service(catalina-5.5.17.jar.so)
at org.apache.coyote.http11.Http11Processor.process(tomcat-http-5.5.17.jar.so)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(tomcat-http-5.5.17.jar.so)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(tomcat-util-5.5.17.jar.so)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(tomcat-util-5.5.17.jar.so)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(tomcat-util-5.5.17.jar.so)
at java.lang.Thread.run(libgcj.so.7rh)
Caused by: java.lang.NullPointerException
at java.util.Hashtable.put(libgcj.so.7rh)
...19 more


13 years ago
Hey All,

So I installed JForum on my local tomcat server just fine but when I upload it to my Virtual Private Server and try to run the install I get the following,

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet.init() for servlet install threw exception
org.apache.catalina.valves.ErrorReportValve.invoke(catalina-5.5.17.jar.so)
org.apache.catalina.connector.CoyoteAdapter.service(catalina-5.5.17.jar.so)
org.apache.coyote.http11.Http11Processor.process(tomcat-http-5.5.17.jar.so)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(tomcat-http-5.5.17.jar.so)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(tomcat-util-5.5.17.jar.so)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(tomcat-util-5.5.17.jar.so)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(tomcat-util-5.5.17.jar.so)
java.lang.Thread.run(libgcj.so.7rh)
root cause

net.jforum.exceptions.ForumStartupException: Error while starting JForum
java.util.Hashtable.put(libgcj.so.7rh)
net.jforum.util.preferences.SystemGlobals.buildSystem(SystemGlobals.java:129)
net.jforum.util.preferences.SystemGlobals.initGlobals(SystemGlobals.java:108)
net.jforum.ConfigLoader.startSystemglobals(ConfigLoader.java:91)
net.jforum.JForumBaseServlet.init(JForumBaseServlet.java:112)
net.jforum.InstallServlet.init(InstallServlet.java:79)
org.apache.catalina.valves.ErrorReportValve.invoke(catalina-5.5.17.jar.so)
org.apache.catalina.connector.CoyoteAdapter.service(catalina-5.5.17.jar.so)
org.apache.coyote.http11.Http11Processor.process(tomcat-http-5.5.17.jar.so)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(tomcat-http-5.5.17.jar.so)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(tomcat-util-5.5.17.jar.so)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(tomcat-util-5.5.17.jar.so)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(tomcat-util-5.5.17.jar.so)
java.lang.Thread.run(libgcj.so.7rh)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.



Not sure where I should be looking to fix this issue. Hope someone out there can enlighten me to what my issue might be. Thanks for any input you can provide and also remember when describing the issue with me I have a very limited knowledge of Java/Tomcat/JSP so you might need to explain it to me like I am five .
14 years ago
Sorry to take so long to get back here to post on the reply's but I was away from my computer till now. I actually ended up figuring out my issue. I went through the code section by section comparing my action script class with the output of the jsp and everything was the same till I got to the part were I am doing the RC4. Turns out I had to set i & j to 0 before I started doing the RC4 encryption. Once I did that the output was just fine then.

The reason for this encryption is so I can create a url link with encrypted url variables that goes to flash app that we created. The client originally was handling the link on their site and all I had to worry about was decrypting in the flash app. But we recently got the work from them to redo and host a section of their site which was cool except for the whole having to do it in java thing since we knew nothing of java.

Here is the working code.



Again thanks to everyone for the helpful input. Now I just need to figure out how to get this into a servlet. Wish me luck.
14 years ago
Thanks for moving this to the appropriate forum.

I know the code is not implemented correctly but as I stated I am a full blown newbie at JSP/Java. I am just figuring out how to create a servlet which I will be moving this to once I have it working out.
14 years ago
Hey All,

Java newbie here with a question on my RC4 encryption script i am trying to create in jsp. I took a Action Script 3 class that does RC4 encryption and was trying to port it over for jsp. Finally getting an output but it is not the correct output. Hoping someone can take a look at my code to see if they can help me figure out where my issue may be.



Right now my output is 5D226586D839826D9F081B . Let me know if adding the RC4 action script class on here would help also.
14 years ago
After looking at numbers of documents I decided to try an older install of tomcat. Originally I installed 7 which was the latest version, so I went and grabbed 5.5 and installed that. Configured it up the same way and it worked with my login form on the first try. So there must of been a bug or something in tomcat 7. Lesson learned, always grab a stable version.

Thanks for the all the help again tim.
14 years ago
Thanks for the update Tim, still banging my head against the wall over here trying to get this all worked out. The link you sent me is what I was looking at trying to get this to work.

Tim Holloway wrote:as long as your SSO valve doesn't have improper reauthorization settings.



What should I look at to determine this is not the case? My previous posting I posted my server.xml settings for the host which looks correct. I also posted what I had for each apps web.xml. Can you take a look and see if those look like they are configured correctly? Also does the SSO Valve need to have an authenticator? Read something about that while reading through articles & docs.

Thanks for all the help.
14 years ago
Could you point me to a good reference for information about this?
14 years ago
I was taking a look at the documentation of adding a single sign-on valve inside of the server.xml file which I thought I was doing correctly but I am still getting the same result. I moved my realm from the Engine tag to the Host tag and added a valve line for the single sign-on. Here is what the host section of my server.xml file looks like,



Does this look correct? If not what do I need to change. Also for the web.xml in each app is there something I need to set to make the work with the single sign-on? Here is my web.xml file,

>
14 years ago
Hey All,

Hope someone here can help me out. Let me start by stating my knowledge of JAVA is pretty much none. The only reason I am using tomcat server is because a client asked that I used a java based forum. So for the forum I am using jforum which mentioned that you can incorporate it into your current site with SSO.

In the server.xml file I modified the realm to use a database,




And the layout of my tomcat webapps,



in each of the webapps I added the following to the web.xml,



As you can see I commented out the BASIC method which would work just fine between the apps. The FORM method will not work between the apps for some reason. So if I open my browser and go to myWebSite it will redirect to the login.jsp. I enter a username and password that exists in the database and then it will go back to the index page for myWebSite. Then if I click the forum link in myWebSite to go to the jforum app (http://localhost:9090/jforum/forums/list.page) it will redirect once again to the login.jsp. Again if I set the method in the web.xml to BASIC then I only need to login once in the same scenario.

So if someone has some insight into why the FORM method would not be working or if there is an error in the way I am accessing between the webapps I would love to get some input. Also if there is something I did not post that would be helpful in figuring out my issue let me know and I will get it up here.
14 years ago