JSP example at JChem Base not working

User 5aca842213

28-01-2011 11:18:09


Hello


I'm doing some test with the JSP
example for searching substructures that comes with Jchem. I've
installed into a Tomcat server. All works fine, but when I configure
security access at web.xml and context.xml files, one of the two
applets that contains the web application doesn't work.


The usual case is that the applet for
showing the search results works fine, but when I change to “query”
the query applet (the one used to build the substructures) never
loads. It remains in the “loading state” for ever.


Removing the mentioned files web.xml
and context.xml, that impose the security restrictions (a basic ones)
there is no problem.


Any suggestion?


Thank you


Best regards


Joan

ChemAxon e274e1bada

31-01-2011 12:43:16

Hi Joan,


could you please send the tomcat's version number, and the settings which you performed?


Thanks, Edvard

User 5aca842213

31-01-2011 15:17:25

Hello


The Tomcat version is 6.0


The META-INF/context.xml file:


<?xml version='1.0' encoding='utf-8'?>
<Context path="/jchem" docBase="jchem" crossContext="true" reloadable="true" debug="1">
    <Resource name="jdbc/postgres" auth="Container"
          type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
          url="jdbc:postgresql://localhost:5432/ADB"
          username="auser" password="apassword" maxActive="20" maxIdle="10" maxWait="-1"/>

    <Realm className="org.apache.catalina.realm.DataSourceRealm" debug="99"
            dataSourceName="jdbc/postgres" localDataSource="true"
            userTable="users_table" userNameCol="user_name_column" userCredCol="password_column"
            userRoleTable="roles_table" roleNameCol="role_column"/>
</Context>


The WEB-INF/web.xml file:


<web-app>
    <display-name>
      DB Molecule Searcher
    </display-name>
    <description>
      DB Molecule Searcher
    </description>
  <security-constraint>
        <web-resource-collection>
            <web-resource-name>jchem</web-resource-name>
            <url-pattern>/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>users</role-name>
        </auth-constraint>  
        <user-data-constraint>
                <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
  </security-constraint>
  <login-config>
        <auth-method>BASIC</auth-method>
    <realm-name>jchem</realm-name>
  </login-config>   
  <resource-ref>
   <description>postgreSQL Datasource example</description>
   <res-ref-name>jdbc/postgres</res-ref-name>
   <res-type>javax.sql.DataSource</res-type>
   <res-auth>Container</res-auth>
  </resource-ref>
</web-app>


Without those two files, the application works fine, with those two files, no.


WIth transport-garantee CONFIDENTIAL or NONE, the application has the same problem.


Thank you.


Best regards


Joan

User 5aca842213

02-02-2011 19:37:30


Hello


I've modified the example. First I
place the query.jsp page. The user then build a query, and the page with the results is shown. Now the error is different. The
applet showing the results crashes with the following message:


Ignored exception: java.lang.RuntimeException: No registered plugin for applet ID 1
Ignored exception: java.lang.RuntimeException: No registered plugin for applet ID 1
Ignored exception: java.lang.RuntimeException: No registered plugin for applet ID 1
Ignored exception: java.lang.RuntimeException: No registered plugin for applet ID 1
java.lang.NoClassDefFoundError: chemaxon/marvin/view/swing/ViewPanel
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:169)
    at chemaxon.marvin.applet.AppletLaunch.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: chemaxon.marvin.view.swing.ViewPanel
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:117)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    ... 4 more
Problem while loading applet.
java.lang.NullPointerException
    at java.awt.Container.addImpl(Container.java:1041)
    at java.awt.Container.add(Container.java:927)
    at chemaxon.marvin.applet.JMViewLaunch.start(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1553)
    at java.lang.Thread.run(Thread.java:619)
Exception: java.lang.NullPointerException


Any commend? Thank you.


Best regards


Joan

User 5aca842213

03-02-2011 15:19:48

Hello


The problem is solved. The solution was to update the Java Virtual Machine to the last release.


Thank you any way.


Best regards


Joan

ChemAxon a9ded07333

04-02-2011 12:19:50

Dear Joan,


We couldn't reproduce the error in our environment so I'm extremely happy to hear that your problem is solved :)


I have a request for you: it would be valuable for us if you could let us know your old JVM version.


Thanks for your help, best regards
Tamás

User 5aca842213

07-02-2011 14:42:44

Hello


The old version was: 1.6.0_12


Best regards,


Joan

ChemAxon a9ded07333

08-02-2011 07:40:02

Hi Joan,


Thank you for your reply!


Best regards,
Tamás