Publishing Problem with WTP and Tomcat 5.5

Hello you all,
I've got the problem that my Eclipse does not publish my Hibernate (*.hbm.xml) files.
In the concerning folder, I do only find the .class-files.
We're using Eclipse (3.3.2), Maven 2, Tomcat 5.5
Urgend help is needed as we have to distribute our Software till the end of the week :(
Thanks in advance

I'll try reposting, now that I figured out how to format it:
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public class ThreadTest {
     private static final int MAX_RUNNABLES = 1;
     private final List<Runnable> runnableBuffer = new ArrayList<Runnable>(MAX_RUNNABLES);
     private final ThreadPoolExecutor myThreadPool =
          new ThreadPoolExecutor(MAX_RUNNABLES,
               MAX_RUNNABLES,
            0L, TimeUnit.SECONDS,
            new SynchronousQueue<Runnable>());
     public ThreadTest() {
        //myThreadPool.prestartAllCoreThreads();
        for (int i=0; i<MAX_RUNNABLES; i++) {
            runnableBuffer.add(new Runnable() {
                public void run() {
    public void start() {
        for (Runnable r : runnableBuffer) {
            System.out.println("corePoolSize: " + myThreadPool.getCorePoolSize());
            System.out.println("maxPoolSize: " + myThreadPool.getMaximumPoolSize());
            System.out.println("poolSize: " + myThreadPool.getPoolSize());
            System.out.println("taskCount: " + myThreadPool.getTaskCount());
            System.out.println("Starting runnable ");
            System.out.println("");
            myThreadPool.execute(r);
        System.out.println("All runnables have started");
    public static void main(String[] args) {
        ThreadTest t = new ThreadTest();
        t.start();
}

Similar Messages

  • Problem with JNI and Tomcat (and threads???)

    Howdy,
    Here is the issue - I would like some help on HOW to debug and fix this problem:
    2 test use cases -
    1)
    a)User goes to Login.jsp, enters user and password
    b) User submits to LoginServlet
    c) login calls JNI code that connects to a powerbuilder(Yes I know this is ugly) PBNI code module (this is a .dll) that authenticates the user with the database
    d) the servlet then redirects to another .jsp page
    e) user then submits to LogoutServlet - also a JNI call to a powerbuilder PBNI code module
    f) REPEAT STEPS a-e over a few times (inconsistent) and then the call to the JNI code hangs
    2)
    a) users does NOT goto Login.jsp, but rather calls LoginServlet and passes the userid and password as GET parms
    b) user does NOT get redirected to a page (redirect code commented out)
    c) user calls LogoutServlet
    d) repeat steps a-c at will and no failure, no hanging
    The only difference is that in case 1 (with JSP), there is a redirect and it afffected the JNI call by haniging inside JNI code.
    In case 2 (without JSP) there is still a JNI call, but it does not hang. In addition, when it hangs and I stop Tomcat, the logs show cleanup entries that say:
    Oct 19, 2004 9:17:09 AM org.apache.catalina.core.StandardWrapper unload
    INFO: Waiting for 1 instance(s) to be deallocated
    Oct 19, 2004 9:17:10 AM org.apache.catalina.core.StandardWrapper unload
    INFO: Waiting for 1 instance(s) to be deallocated
    Oct 19, 2004 9:17:11 AM org.apache.catalina.core.StandardWrapper unload
    INFO: Waiting for 1 instance(s) to be deallocated
    Is this a threading issue in Tomcat???
    On would assume that the JNI code is not cleaning up after itself, but I don't believe this is the case,
    and even if it was, why would I get the tomcat log cleanup entries above???
    What do those cleanup entries imply about the state of Tomcat????

    hi ,
    I met the same problem this morning, and searched the www.google.com in order to solve it, as a result, your article was shown on my screen. :)
    Till now I have read some technical information and solved my problems. Maybe the solution be useful to you:
    ==============================
    error message : (Environment : Tomcat 5, Windows 2003, Mysql5)
    2006-3-29 11:53:48 org.apache.catalina.core.StandardWrapper unload
    message: Waiting for 2 instance(s) to be deallocated
    ==============================
    cause: the number of connection to database exceeded.another word,too many connections.
    ==============================
    solution: close the connection when it becomes useless for your program. :)
    ==============================
    ps. Sorry for my weak English . hehe ....

  • Problem with axis2 and Tomcat

    Hello,
    I am having a strange problem with Tomcat and axis. I have a webservice that uses axis2 for wsdl2java class generation. When I compile my project in maven a Test is performed. During the test a glassfish server is established and the project is deployed -everything work great with the expected results. However when I try to deploy the webservice on tomcat it has some problems.
    At first I tried to call axis code in a POST method that takes a MultiPart message. The code is as below:
    *@Path("identifyWavestream")*
    *@POST*
    *@Consumes(MediaType.MULTIPART_FORM_DATA)*
    *@Produces(MediaType.APPLICATION_XML)*
    *public String multipartTest(com.sun.jersey.multipart.MultiPart multiPart) throws Exception {* 
    *// get first body part (index 0)*
    *//tomcat shows that the first error is here (line 122 is the nest one with bodypart)*
    BodyPart bp = multiPart.getBodyParts().get(0);
    BodyPartEntity bodyPartEntity = (BodyPartEntity) bp.getEntity();
    InputStream stream = bodyPartEntity.getInputStream();
    *//the rest of the code either saves the incoming file or implements the wsdl2java axis interface - neither works.*
    And the tomcat error is:
    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    java.util.ArrayList.RangeCheck(Unknown Source)
    java.util.ArrayList.get(Unknown Source)
    com.webserv.rest.resources.SearchResource.test.multipartTest(SearchResource.java:122)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    java.lang.reflect.Method.invoke(Unknown Source)
    com.sun.jersey.server.impl.model.method.dispatch.EntityParamDispatchProvider$TypeOutInvoker._dispatch(EntityParamDispatchProvider.java:138)
    com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
    com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:124)
    com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
    com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:71)
    com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
    com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:63)
    com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:555)
    com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:514)
    com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:505)
    com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:359)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    It was strange to me since this simple approach of handling a Multipart method worked for me earlier. Then I decided skip the handling of multipart method and just call the axis code. But the results also caused an error. I then tried to call the axis code in a simple @GET method (to cross out any issues regarding the multipart) and the result where the same. Again everything works on the maven- glassfish test. In this case the tomcat error is the following:
    javax.servlet.ServletException: java.lang.NoSuchMethodError: org.apache.commons.httpclient.HttpConnectionManager.getParams()Lorg/apache/commons/httpclient/params/HttpConnectionManagerParams;
    com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:361)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    root cause
    com.sun.jersey.api.container.MappableContainerException: java.lang.NoSuchMethodError: org.apache.commons.httpclient.HttpConnectionManager.getParams()Lorg/apache/commons/httpclient/params/HttpConnectionManagerParams;
    com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:74)
    com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:124)
    com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
    com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:71)
    com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
    com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:63)
    com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:555)
    com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:514)
    com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:505)
    com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:359)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    root cause
    java.lang.NoSuchMethodError: org.apache.commons.httpclient.HttpConnectionManager.getParams()Lorg/apache/commons/httpclient/params/HttpConnectionManagerParams;
    org.apache.axis2.transport.http.AbstractHTTPSender.initializeTimeouts(AbstractHTTPSender.java:454)
    org.apache.axis2.transport.http.AbstractHTTPSender.getHttpClient(AbstractHTTPSender.java:514)
    org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:156)
    org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
    org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
    org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
    org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
    org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
    org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
    org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
    com.webserv.rest.webapp.IntSoapServiceStub.getServerData(IntSoapServiceStub.java:2447)
    com.webserv..rest.resources.AIntSoapImpl.getServerData(AIntSoapImpl.java:112)
    com.webserv..rest.resources.SearchResource.test.pingTest(SearchResource.java:167)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    java.lang.reflect.Method.invoke(Unknown Source)
    com.sun.jersey.server.impl.model.method.dispatch.EntityParamDispatchProvider$TypeOutInvoker._dispatch(EntityParamDispatchProvider.java:138)
    com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
    com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:124)
    com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
    com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:71)
    com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
    com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:63)
    com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:555)
    com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:514)
    com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:505)
    com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:359)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    I think it is also a good ide to post the pom.xml file :
    Edited by: 803864 on 2010-10-21 00:30

    I think it is also a good ide to post the pom.xml file:
    +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"+
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    +<modelVersion>4.0.0</modelVersion>+
    +<groupId>com.myProjects</groupId>+
    +<artifactId>audioid-rest-interface</artifactId>+
    +<packaging>war</packaging>+
    +<name>AudioID Rest Interface</name>+
    +<version>0.1</version>+
    +<dependencies>+
    +<!--+
    +<dependency>+
    +<groupId>com.sun.tools.xjc.maven2</groupId>+
    +<artifactId>maven-jaxb-plugin</artifactId>+
    +<version>1.1</version>+
    +<scope>test</scope>+
    +</dependency>+
    +<dependency>+
    +<groupId>com.sun.jersey</groupId>+
    +<artifactId>jersey-client</artifactId>+
    +<version>1.0.1</version>+
    +</dependency>+
    +<dependency>+
    +<groupId>com.sun.jersey.contribs</groupId>+
    +<artifactId>jersey-multipart</artifactId>+
    +<version>1.0.1</version>+
    +</dependency>+
    +<dependency>+
    +<groupId>com.sun.grizzly</groupId>+
    +<artifactId>grizzly-servlet-webserver</artifactId>+
    +<version>1.9.0</version>+
    +<scope>test</scope>+
    +</dependency>-->+
    +<dependency>+
    +<groupId>com.sun.jersey.contribs</groupId>+
    +<artifactId>jersey-multipart</artifactId>+
    +<version>1.0.1</version>+
    +</dependency>+
    +<dependency>+
    +<groupId>com.sun.jersey</groupId>+
    +<artifactId>jersey-client</artifactId>+
    +<version>1.0.1</version>+
    +</dependency>+
    +<dependency>+
    +<groupId>com.sun.jersey</groupId>+
    +<artifactId>jersey-bundle</artifactId>+
    +<version>1.0.1</version>+
    +</dependency>+
    +<dependency>+
    +<groupId>commons-logging</groupId>+
    +<artifactId>commons-logging</artifactId>+
    +<version>1.0.4</version>+
    +</dependency>+
    +<dependency>+
    +<groupId>commons-collections</groupId>+
    +<artifactId>commons-collections</artifactId>+
    +<version>3.1</version>+
    +</dependency>+
    +<dependency>+
    +<groupId>org.slf4j</groupId>+
    +<artifactId>slf4j-log4j12</artifactId>+
    +<version>1.5.6</version>+
    +</dependency>+
    +<dependency>+
    +<groupId>junit</groupId>+
    +<artifactId>junit</artifactId>+
    +<version>3.8.2</version>+
    +<scope>test</scope>+
    +</dependency>+
    +<dependency>+
    +<groupId>org.glassfish.distributions</groupId>+
    +<artifactId>web-all</artifactId>+
    +<version>10.0-build-20080430</version>+
    +<scope>test</scope>+
    +</dependency>+
    +<dependency>+
    +<groupId>org.glassfish.embedded</groupId>+
    +<artifactId>gf-embedded-api</artifactId>+
    +<version>1.0-alpha-4</version>+
    +<scope>test</scope>+
    +</dependency>+
    +<dependency>+
    +<groupId>com.sun.jersey</groupId>+
    +<artifactId>jersey-server</artifactId>+
    +<version>1.0.3.1</version>+
    +<scope>test</scope>+
    +</dependency>+
    +<dependency>+
    +<groupId>com.sun.jersey.contribs</groupId>+
    +<artifactId>maven-wadl-plugin</artifactId>+
    +<version>1.0.3.1</version>+
    +</dependency>+
    +<dependency>+
    +<groupId>org.hibernate</groupId>+
    +<artifactId>hibernate</artifactId>+
    +<version>3.2.5.ga</version>+
    +<exclusions>+
    +<exclusion>+
    +<groupId>javax.transaction</groupId>+
    +<artifactId>jta</artifactId>+
    +</exclusion>+
    +<exclusion>+
    +<groupId>cglib</groupId>+
    +<artifactId>cglib</artifactId>+
    +</exclusion>+
    +</exclusions>+
    +</dependency>+
    +<dependency>+
    +<groupId>org.apache.axis2</groupId>+
    +<artifactId>axis2</artifactId>+
    +<version>1.4.1</version>+
    +</dependency>+
    +<!-- <dependency> -->+
    +<dependency>+
    +<groupId>org.apache.axis2</groupId>+
    +<artifactId>axis2-aar-maven-plugin</artifactId>+
    +<version>1.4.1</version>+
    +<scope>test</scope>+
    +</dependency>+
    +<dependency>+
    +<groupId>org.apache.axis2</groupId>+
    +<artifactId>axis2-java2wsdl</artifactId>+
    +<version>1.4.1</version>+
    +<scope>test</scope>+
    +</dependency>+
    +<dependency>+
    +<groupId>org.apache.axis2</groupId>+
    +<artifactId>axis2-xmlbeans</artifactId>+
    +<version>1.4.1</version>+
    +</dependency>+
    +<!-- <dependency> -->+
    +<dependency>+
    +<groupId>com.sun.xml.bind</groupId>+
    +<artifactId>jaxb-impl</artifactId>+
    +<version>2.1.12</version>+
    +</dependency>+
    +<dependency>+
    +<groupId>cglib</groupId>+
    +<artifactId>cglib-nodep</artifactId>+
    +<version>2.1_3</version>+
    +</dependency>+
    +</dependencies>+
    +<build>+
    +<finalName>audioid-rest-interface</finalName>+
    +<plugins>+
    +<plugin>+
    +<!-- This class is just generated for wadl support!!! -->+
    +<!-- Take care that folder ../music-dna-core is existing -->+
    +<groupId>com.sun.tools.xjc.maven2</groupId>+
    +<artifactId>maven-jaxb-plugin</artifactId>+
    +<version>1.1</version>+
    +<executions>+
    +<execution>+
    +<phase>generate-sources</phase>+
    +<goals>+
    +<goal>generate</goal>+
    +</goals>+
    +</execution>+
    +</executions>+
    +<configuration>+
    +<generatePackage> com.webserv.wsparameters</generatePackage>+
    +<schemaDirectory>../audioid-rest-interface/src/main/resources+
    +</schemaDirectory>+
    +<includeSchemas>+
    +<includeSchema>**/*.xsd</includeSchema>+
    +</includeSchemas>+
    +<extension>true</extension>+
    +<strict>false</strict>+
    +<verbose>false</verbose>+
    +</configuration>+
    +</plugin>+
    +<plugin>+
    +<groupId>org.apache.maven.plugins</groupId>+
    +<artifactId>maven-javadoc-plugin</artifactId>+
    +<!-- <version>2.6</version> -->+
    +<executions>+
    +<execution>+
    +<goals>+
    +<goal>javadoc</goal>+
    +</goals>+
    +<phase>compile</phase>+
    +</execution>+
    +</executions>+
    +<configuration>+
    +<encoding>UTF-8</encoding>+
    +<verbose>false</verbose>+
    +<show>public</show>+
    +<subpackages> com.webserv.rest.rest.resources: com.webserv.rest.rest.commons: com.webserv.wsparameters+
    +</subpackages>+
    +<doclet>com.sun.jersey.wadl.resourcedoc.ResourceDoclet</doclet>+
    +<docletPath>${path.separator}${project.build.outputDirectory}+
    +</docletPath>+
    +<docletArtifacts>+
    +<docletArtifact>+
    +<groupId>com.sun.jersey.contribs</groupId>+
    +<artifactId>wadl-resourcedoc-doclet</artifactId>+
    +<version>1.0.3.1</version>+
    +</docletArtifact>+
    +<docletArtifact>+
    +<groupId>com.sun.jersey</groupId>+
    +<artifactId>jersey-server</artifactId>+
    +<version>1.0.3.1</version>+
    +</docletArtifact>+
    +<docletArtifact>+
    +<groupId>xerces</groupId>+
    +<artifactId>xercesImpl</artifactId>+
    +<version>2.6.1</version>+
    +</docletArtifact>+
    +</docletArtifacts>+
    +<additionalparam>-output+
    +${project.build.outputDirectory}/resourcedoc.xml</additionalparam>+
    +<useStandardDocletOptions>false</useStandardDocletOptions>+
    +</configuration>+
    +</plugin>+
    +<plugin>+
    +<groupId>com.sun.jersey.contribs</groupId>+
    +<artifactId>maven-wadl-plugin</artifactId>+
    +<version>1.0.3.1</version>+
    +<executions>+
    +<execution>+
    +<id>generate</id>+
    +<goals>+
    +<goal>generate</goal>+
    +</goals>+
    +<phase>compile</phase>+
    +</execution>+
    +</executions>+
    +<configuration>+
    +<wadlFile>${project.build.outputDirectory}/application.wadl+
    +</wadlFile>+
    +<formatWadlFile>true</formatWadlFile>+
    +<baseUri>http://192.168.2.149:8080/${project.build.finalName}+
    +</baseUri>+
    +<packagesResourceConfig>+
    +<param> com.webserv.rest.resources</param>+
    +</packagesResourceConfig>+
    +<wadlGenerators>+
    +<wadlGeneratorDescription>+
    +<className>com.sun.jersey.server.wadl.generators.WadlGeneratorApplicationDoc+
    +</className>+
    +<properties>+
    +<property>+
    +<name>applicationDocsFile</name>+
    +<value>${basedir}/src/main/doc/application-doc.xml</value>+
    +</property>+
    +</properties>+
    +</wadlGeneratorDescription>+
    +<wadlGeneratorDescription>+
    +<className>com.sun.jersey.server.wadl.generators.WadlGeneratorGrammarsSupport+
    +</className>+
    +<properties>+
    +<property>+
    +<name>grammarsFile</name>+
    +<value>${basedir}/src/main/doc/application-grammars.xml</value>+
    +</property>+
    +</properties>+
    +</wadlGeneratorDescription>+
    +<wadlGeneratorDescription>+
    +<className>com.sun.jersey.server.wadl.generators.resourcedoc.WadlGeneratorResourceDocSupport+
    +</className>+
    +<properties>+
    +<property>+
    +<name>resourceDocFile</name>+
    +<value>${project.build.outputDirectory}/resourcedoc.xml</value>+
    +</property>+
    +</properties>+
    +</wadlGeneratorDescription>+
    +</wadlGenerators>+
    +</configuration>+
    +</plugin>+
    +<plugin>+
    +<groupId>org.codehaus.mojo</groupId>+
    +<artifactId>exec-maven-plugin</artifactId>+
    +<version>1.1</version>+
    +<executions>+
    +<execution>+
    +<goals>+
    +<goal>java</goal>+
    +</goals>+
    +</execution>+
    +</executions>+
    +<configuration>+
    +<mainClass>com.sun.jersey.samples.generatewadl.Main</mainClass>+
    +</configuration>+
    +</plugin>+
    +<plugin>+
    +<groupId>org.apache.maven.plugins</groupId>+
    +<artifactId>maven-compiler-plugin</artifactId>+
    +<inherited>true</inherited>+
    +<configuration>+
    +<source>1.5</source>+
    +<target>1.5</target>+
    +<!--+
    exclude temporary types that are only needed for wadl and doc
    generation
    -->
    +<!--+
    +<excludes> <exclude>com/webserv/types/temporary/**</exclude>+
    +<exclude>com/webserv/rest/commons/Examples.java</exclude>+
    +</excludes>+
    -->
    +</configuration>+
    +</plugin>+
    +<plugin>+
    +<groupId>org.jvnet.jaxb2.maven2</groupId>+
    +<artifactId>maven-jaxb2-plugin</artifactId>+
    +<executions>+
    +<execution>+
    +<goals>+
    +<goal>generate</goal>+
    +</goals>+
    +</execution>+
    +</executions>+
    +</plugin>+
    +<plugin>+
    +<groupId>org.apache.axis2</groupId>+
    +<artifactId>axis2-wsdl2code-maven-plugin</artifactId>+
    +<version>1.4.1</version>+
    +<executions>+
    +<execution>+
    +<id>generate reco core</id>+
    +<goals>+
    +<goal>wsdl2code</goal>+
    +</goals>+
    +<configuration>+
    +<packageName>com.webserv.rest.webapp</packageName>+
    +<wsdlFile>src/main/java/com/webserv/wsdl/web.wsdl</wsdlFile>+
    +<databindingName>adb</databindingName>+
    +</configuration>+
    +</execution>+
    +</executions>+
    +</plugin>+
    +<plugin>+
    +<groupId>com.sun.tools.xjc.maven2</groupId>+
    +<artifactId>maven-jaxb-plugin</artifactId>+
    +<version>1.1</version>+
    +<executions>+
    +<execution>+
    +<goals>+
    +<goal>generate</goal>+
    +</goals>+
    +</execution>+
    +</executions>+
    +<configuration>+
    +<generatePackage>com.webserv.wsparameters</generatePackage>+
    +<schemaDirectory>src/main/xsd</schemaDirectory> <includeSchemas>+
    +<includeSchema>**/*.xsd</includeSchema> </includeSchemas>+
    +<extension>true</extension>+
    +<strict>false</strict>+
    +<verbose>true</verbose>+
    +</configuration>+
    +</plugin>+
    +</plugins>+
    +</build>+
    +<profiles>+
    +<profile>+
    +<id>jdk-1.5</id>+
    +<activation>+
    +<jdk>1.5</jdk>+
    +</activation>+
    +<dependencies>+
    +<dependency>+
    +<groupId>com.sun.xml.bind</groupId>+
    +<artifactId>jaxb-impl</artifactId>+
    +<version>2.1.10</version>+
    +</dependency>+
    +</dependencies>+
    +<build>+
    +<plugins>+
    +<plugin>+
    +<groupId>org.apache.maven.plugins</groupId>+
    +<artifactId>maven-javadoc-plugin</artifactId>+
    +<configuration>+
    +<docletArtifacts>+
    +<docletArtifact>+
    +<groupId>com.sun.jersey.contribs</groupId>+
    +<artifactId>maven-wadl-plugin</artifactId>+
    +<version>1.0.3.1</version>+
    +</docletArtifact>+
    +<docletArtifact>+
    +<groupId>com.sun.jersey.contribs</groupId>+
    +<artifactId>wadl-resourcedoc-doclet</artifactId>+
    +<version>1.0.3.1</version>+
    +</docletArtifact>+
    +<docletArtifact>+
    +<groupId>com.sun.jersey</groupId>+
    +<artifactId>jersey-server</artifactId>+
    +<version>1.0.3.1</version>+
    +</docletArtifact>+
    +<docletArtifact>+
    +<groupId>xerces</groupId>+
    +<artifactId>xercesImpl</artifactId>+
    +<version>2.6.1</version>+
    +</docletArtifact>+
    +<docletArtifact>+
    +<groupId>javax.xml.bind</groupId>+
    +<artifactId>jaxb-api</artifactId>+
    +<version>2.1</version>+
    +</docletArtifact>+
    +<docletArtifact>+
    +<groupId>javax.xml</groupId>+
    +<artifactId>jaxb-impl</artifactId>+
    +<version>2.1</version>+
    +</docletArtifact>+
    +<docletArtifact>+
    +<groupId>javax.activation</groupId>+
    +<artifactId>activation</artifactId>+
    +<version>1.1</version>+
    +</docletArtifact>+
    +<docletArtifact>+
    +<groupId>javax.xml.stream</groupId>+
    +<artifactId>stax-api</artifactId>+
    +<version>1.0</version>+
    +</docletArtifact>+
    +</docletArtifacts>+
    +</configuration>+
    +</plugin>+
    +</plugins>+
    +</build>+
    +</profile>+
    +<profile>+
    +<id>xsltproc</id>+
    +<activation>+
    +<file>+
    +<exists>../xsltproc_win32/xsltproc.exe</exists>+
    +</file>+
    +</activation>+
    +<build>+
    +<plugins>+
    +<!-- Create/generate the application.html using xsltproc -->+
    +<!-- Create/generate the application.html using xsltproc -->+
    +<plugin>+
    +<groupId>org.codehaus.mojo</groupId>+
    +<artifactId>exec-maven-plugin</artifactId>+
    +<version>1.1</version>+
    +<executions>+
    +<execution>+
    +<id>copy-docs-to-builddir</id>+
    +<goals>+
    +<goal>exec</goal>+
    +</goals>+
    +<phase>compile</phase>+
    +<configuration>+
    +<executable>copy</executable>+
    +<commandlineArgs>src\\main\\doc\\*.* target\\classes+
    +</commandlineArgs>+
    +</configuration>+
    +</execution>+
    +<execution>+
    +<id>prepare-xsltproc</id>+
    +<goals>+
    +<goal>exec</goal>+
    +</goals>+
    +<phase>package</phase>+
    +<configuration>+
    +<executable>copy</executable>+
    +<commandlineArgs>..\\audioid-rest-interface\\src\\main\\resources\\*.xsd+
    target\\classes</commandlineArgs>
    +</configuration>+
    +</execution>+
    +<execution>+
    +<id>exec-xsltproc: target/application.html</id>+
    +<goals>+
    +<goal>exec</goal>+
    +</goals>+
    +<phase>package</phase>+
    +<configuration>+
    +<!--<executable>xsltproc</executable>-->+
    +<executable>../xsltproc_win32/xsltproc.exe</executable>+
    +<commandlineArgs>-o target/application.html+
    src/main/doc/wadl_documentation.xsl
    target/classes/application.wadl</commandlineArgs>
    +</configuration>+
    +</execution>+
    +</executions>+
    +</plugin>+
    +</plugins>+
    +</build>+
    +</profile>+
    +</profiles>+
    +<pluginRepositories>+
    +<pluginRepository>+
    +<id>maven2-repository.dev.java.net</id>+
    +<name>Java.net Repository for Maven</name>+
    +<url>http://download.java.net/maven/2/</url>+
    +<layout>default</layout>+
    +</pluginRepository>+
    +<pluginRepository>+
    +<id>maven-repository.dev.java.net</id>+
    +<name>Java.net Maven 1 Repository (legacy)</name>+
    +<url>http://download.java.net/maven/1</url>+
    +<layout>legacy</layout>+
    +</pluginRepository>+
    +</pluginRepositories>+
    +<repositories>+
    +<repository>+
    +<id>maven2-repository.dev.java.net</id>+
    +<name>Java.net Repository for Maven</name>+
    +<url>http://download.java.net/maven/2/</url>+
    +<layout>default</layout>+
    +</repository>+
    +<repository>+
    +<id>maven-repository.dev.java.net</id>+
    +<name>Java.net Maven 1 Repository (legacy)</name>+
    +<url>http://download.java.net/maven/1</url>+
    +<layout>legacy</layout>+
    +</repository>+
    +<repository>+
    +<id>glassfish-repository</id>+
    +<name>Java.net Repository for Glassfish</name>+
    +<url>http://download.java.net/maven/glassfish</url>+
    +</repository>+
    +</repositories>+
    +</project>+
    Can anyonr contribute?

  • Cookie Problem  With JSP and Tomcat

    I have a tiny web application developed for my project thing.
    I am facing a problem while maintaining sessions with Cookie. I use Tomcat 3.2.1 Web Server and JSP 1.2 Specifications for my web application.
    I have created a page which creates a cookie and stores it in the client's PC, so when the same client visits the site, he can be remembered. Now while surfing the site in the same session, the site remembers the client. But once the client closes the browser and tries connecting to the site, he cannot be remembered. So I took a look into Temporary Internet Files of the client PC and found no cookie there. So where the cookie gets created and why does it disappears with the session. I have set a time limit of 1 year in the cookie.
    Now is that a Problem with Tomcat or with the configuration settings of IE in the client PC?? Or something else???
    Reply me Soon...

    Thanks for your reply.
    following is the code for how do i create a cookie...
    <%
         String custno = custBean.createPreferred();
         Cookie c = new Cookie("pc", custno);
         c.setVersion(1);
         c.setPath("/");
         c.setComment("PreferredCustomer");
         c.setDomain("think_machine");
    //think_machine is the name of the Web Server(Tomcat)
         c.setMaxAge(365*24*60*60);
         response.addCookie(c);
    %>
    And the code to read a cookie is..
         String custID = null;
         Cookie[] cookies = request.getCookies();
         for(int i = 0; i < cookies.length; i++)
              if(cookies.getName().equals("pc"))
                   custID = cookies[i].getValue();
                   break;
    One more thing I would like to let you know, that i access this from the same PC on which the Web Server is installed. Means the Server and the client are both one and the same PC.

  • Right problem with apache and tomcat

    Bonjour;
    I use a user login "apache" to stop/start Apache and tomcat. Because never launching apache et tomcat as root.
    But I have the following problem with apache (file error.log) :
    [Tue May  6 17:26:22 2003] [error] Connection "warpConnection" cannot connect
    [Tue May  6 17:26:22 2003] [error] Cannot open connection "warpConnection"
    [Tue May  6 17:27:01 2003] [error] Re-Trying to deploy connections
    As root the error msg does'nt exists (lost)
    Best regards;
    A+;

    Run it from the shell to see whats wrong:
    # httpd

  • Authentication problem with JWS and TOMCAT

    Hi everyone !
    I have a problem with Java Web Start (1.0.1) and Tomcat (4.0.4).
    I'm trying to call my application via Web server Tomcat with restricting access.
    My configuration is the following :
    The deployment descriptor web.xml is:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <mime-mapping>
    <extension>jar</extension>
    <mime-type>application/java-archive</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>java</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>jnlp</extension>
    <mime-type>application/x-java-jnlp-file</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>JNLP</extension>
    <mime-type>application/x-java-jnlp-file</mime-type>
    </mime-mapping>
    <!-- Define a Security Constraint on this Application -->
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Entire Application</web-resource-name>
    <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <!-- NOTE: This role is not present in the default users file -->
    <role-name>standard</role-name>
    </auth-constraint>
    </security-constraint>
    <!-- Define the Login Configuration for this Application -->
    <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>MY APPL</realm-name>
    </login-config>
    </web-app>
    And jnlp File is:
    <jnlp
    spec="1.0+"
    codebase="http://host:8080/Official/"
    href="Application.jnlp">
    <information>
    <title>Application release 0.10</title>
    <vendor> XXXX </vendor>
    <homepage href="/"/>
    <description>Application</description>
    <description kind="short">My Application</description>
    <icon href="Icon.gif"/>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.3"/>
    <jar href="Jar1.jar"/>
    <jar href="Jar2.jar"/>
    <jar href="Jar3.jar"/>
    <jar href="Jar4.jar"/>
    <jar href="Jar5.jar"/>
    <jar href="Jar6.jar"/>
    <jar href="Jar7.jar"/>
    <jar href="Jar8.jar"/>
    <jar href="Jar9.jar"/>
    <jar href="Jar10.jar"/>
    <jar href="MyApplication.jar"/>
    </resources>
    <application-desc main-class="com.xxxx.tool.cm.MyApplication"/>
    </jnlp>
    With the above configuration the Java Web Start not work.
    I'm expecting the message box for insert username and password instead it returns the messagge error :
    An error occurred while launching/running the application.
    Vendor: XXXX
    Category: Download Error
    Unable to load resource: http://host:8080/Official/Application.jnlp
    The Exception error is:
    JNLPException[category: Download Error : Exception: java.lang.NullPointerException : LaunchDesc: null ]
         at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)
         at com.sun.javaws.cache.DownloadProtocol.isLaunchFileUpdateAvailable(Unknown Source)
         at com.sun.javaws.LaunchDownload.getUpdatedLaunchDesc(Unknown Source)
         at com.sun.javaws.Launcher.downloadResources(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    I have tried to remove the restrict access in the deployment descriptor (web.xml) and java Web Start WORKS !!!!!!
    I'll appreciate any idea or hint!
    Thanks in advance

    Check this out
    http://forum.java.sun.com/thread.jsp?forum=38&thread=456250
    Mad Einstein

  • Simple setup problems with JSTL and Tomcat

    Hi all, I'm having some problems getting JSTL to work the 1st time. JSTL setup seems to be a common problem for relative newbies, but having read previous threads, I still haven't been able to solve my problem so hopefully someone can help:
    the jstl.jar and standard.jar are in my WEB-INF/lib directory, so I don't think it's a classpath problem.
    My jsp page has the following at the top:
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>Later, I reference a bean var with :
    <c:out value="My var is : ${var.property}"/>In my web.xml I have:
      <taglib>
       <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
       <taglib-location>/WEB-INF/lib/jstl.jar</taglib-location>
      </taglib>And I've placed the actual tld (c.tld) in the WEB-INF directory.
    On startup I get the error when compiling the JSP:
    No such tag out in the tag library imported with prefix c
    Can anyone help here?
    Thanks in advance,
    Mike

    I think this note from the JSTL mailing list by Shawn Bayern, one of the lead developers of Jakarta JSTL and the author of "JSTL In Action", will clarify it:
    http://www.mail-archive.com/[email protected]/msg04587.html
    Don't put that <taglib> in your web.xml. All the books tell you to do it, but Shawn Bayern has the right answer. The URI should be the one that's in the TLD JAR .tld files.
    I use JSTL and Tomcat 4.1.24 without the <taglib>, and it works fine. - MOD

  • Problem with JNI and Tomcat in windows

    Hello guys...
    I have the following problem.
    I used Tomcat 4 and I have following ApiEncriptacion class, in package com.servipag.sts;
    package com.servipag.sts;
    class ApiEncriptacion
         public native String encripta(String texto, String ubicacionLlavePublica, String semilla);
         static
              System.loadLibrary("apisdark");
         public native String desencripta(String texto, String ubicacionLlavePrivada);
         static
              System.loadLibrary("apisdark");
    the LD_LIBRARY_PATH is set in following dir c:\tomcat\bice
    the dll this in the following path = c:\tomcat\bice\apisdark.dll
    I run Tomcat at the following way..
    C:\jdk1.4\bin\java.exe -jar -Djava.library.path="c:\tomcat\bice" -Duser.dir="C:\Tomcat" "C:\Tomcat\bin\bootstrap.jar" start
    but, still appear the error:
    java.lang.UnsatisfiedLinkError: encripta
         at com.servipag.sts.ApiEncriptacion.encripta(Native Method)
         at com.servipag.sts.ServiciosServiPagImpl.rescatarFirma(ServiciosServiPagImpl.java:2143)
         at com.servipag.sts.ServiciosServiPagImpl.pagarCuenta(ServiciosServiPagImpl.java:310)
         at org.apache.jsp.SBCO_0005flogin_0005fbice_0005f4$jsp._jspService(SBCO_0005flogin_0005fbice_0005f4$jsp.java:265)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
         at java.lang.Thread.run(Thread.java:536)
    please help me
    Luis Navarro.
    Chile

    ApiEncripatcion.h
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class ApiEncriptacion */
    #ifndef IncludedApiEncriptacion
    #define IncludedApiEncriptacion
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class: ApiEncriptacion
    * Method: encripta
    * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    JNIEXPORT jstring JNICALL Java_ApiEncriptacion_encripta
    (JNIEnv *, jobject, jstring, jstring, jstring);
    * Class: ApiEncriptacion
    * Method: desencripta
    * Signature: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    JNIEXPORT jstring JNICALL Java_ApiEncriptacion_desencripta
    (JNIEnv *, jobject, jstring, jstring);
    #ifdef __cplusplus
    #endif
    #endif
    ApiEncriptacion.c
    #include "jni.h"
    #include <stdio.h>
    #include "files.h"
    #include "hex.h"
    #include "rsa.h"
    #include "randpool.h"
    USING_NAMESPACE(CryptoPP)
    USING_NAMESPACE(std)
    void GenerateRSAKey(unsigned int keyLength, const char privFilename, const char pubFilename, const char *seed);
    char RSAEncryptString(const char pubFilename, const char seed, const char message);
    char RSADecryptString(const char privFilename, const char *ciphertext);
    JNIEXPORT jstring JNICALL
    Java_ApiEncriptacion_encripta(JNIEnv *env, jobject obj, jstring texto, jstring ubicacionLlavePublica, jstring semilla)
         try
              char *ciphertext = RSAEncryptString(ubicacionLlavePublica, semilla, texto);
              delete [] ciphertext;
              return(ciphertext);
         catch(CryptoPP::Exception &e)
              return ("");
         catch(std::exception &e)
              return ("");
         catch(...)
              return ("");
    JNIEXPORT jstring JNICALL
    Java_ApiEncriptacion_desencripta(JNIEnv *env, jobject obj, jstring texto, jstring ubicacionLlavePrivada)
         try
              char *decrypted = RSADecryptString(ubicacionLlavePrivada, texto);
              return(decrypted);
         catch(CryptoPP::Exception &e)
              return ("");
         catch(std::exception &e)
              return ("");
         catch(...)
              return ("");
    int main()
         return(0);     
    void GenerateRSAKey(unsigned int keyLength, const char privFilename, const char pubFilename, const char *seed)
         RandomPool randPool;
         randPool.Put((byte *)seed, strlen(seed));
         RSAES_OAEP_SHA_Decryptor priv(randPool, keyLength);
         HexEncoder privFile(new FileSink(privFilename));
         priv.DEREncode(privFile);
         privFile.MessageEnd();
         RSAES_OAEP_SHA_Encryptor pub(priv);
         HexEncoder pubFile(new FileSink(pubFilename));
         pub.DEREncode(pubFile);
         pubFile.MessageEnd();
    char RSAEncryptString(const char pubFilename, const char seed, const char message)
         FileSource pubFile(pubFilename, true, new HexDecoder);
         RSAES_OAEP_SHA_Encryptor pub(pubFile);
         if (strlen(message) > pub.MaxPlainTextLength())
              cerr << "message too long for this key\n";
              abort();
         RandomPool randPool;
         randPool.Put((byte *)seed, strlen(seed));
         char outstr = new char[2pub.CipherTextLength()+1];
         pub.Encrypt(randPool, (byte *)message, strlen(message), (byte *)outstr);
         HexEncoder hexEncoder;
         hexEncoder.Put((byte *)outstr, pub.CipherTextLength());
         hexEncoder.MessageEnd();
         hexEncoder.Get((byte *)outstr, 2*pub.CipherTextLength());
         outstr[2*pub.CipherTextLength()] = 0;
         return outstr;
    char RSADecryptString(const char privFilename, const char *ciphertext)
         FileSource privFile(privFilename, true, new HexDecoder);
         RSAES_OAEP_SHA_Decryptor priv(privFile);
         HexDecoder hexDecoder;
         hexDecoder.Put((byte *)ciphertext, strlen(ciphertext));
         hexDecoder.MessageEnd();
         SecByteBlock buf(priv.CipherTextLength());
         hexDecoder.Get(buf, priv.CipherTextLength());
         char *outstr = new char[priv.MaxPlainTextLength()+1];
         unsigned messageLength = priv.Decrypt(buf, (byte *)outstr);
         outstr[messageLength] = 0;
         return outstr;

  • Publishing problems with Firefox and Explorer

    My webpage, www.jcohen.org, works reasonably well in Safari, but formatting and links fall apart in other browsers. I uploaded the Site folder and index.html to my host with Fetch, and I did not have a proxy. I created my own navbar in iWeb, which may be part of the problem? Any thoughts welcome.

    You need to increase the navigation text box in length and center it on the page.
    The fact that the navigation menu is being forced to cause a "return" in IE means that it is being partially covered by the image.
    You could also move the image down the page a bit.
    Make sure you are using a web safe font...
    http://www.iwebformusicians.com/WebMusic/FontsandColors.html

  • Problem with JDBC and Tomcat

    I don't know where the problem originate, the only thing in my memory is that the program worked very well on my PC yesterday, but today, without even slightest change, it doesn't work anymore. As to debug it, I simplified the codes to the least, but it still refuse to work. I was beaten down by this problem totally, and cannot make out any solution for it, so, I come here, hoping to find a warrior to kill this damned bug for me.
    My program is a Servlet, but for the purpose of debugging, I have recode it to an Application/Servlet. When run as a application, I can get the result expected, but as a Servlet, :-(, maybe you should see it by yourself. My server software is Tomcat 4.1.15, and the JDK version is 1.4.0. To excute this program, you should add Data Source "Test" to ODBC.
    ///////////////////////code begins/////////////////////////
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    public class Ex extends HttpServlet
         int ErrorType = 0;
         String err = new String("");
         public static void main(String args[]) throws Exception{
              Ex cEx = new Ex();
              cEx.init();     
              System.out.println(cEx.ErrorType);     
         public void init() {
              String url = "jdbc:odbc:Test";
              ErrorType = 3;     //passed
              try{
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              } catch (ClassNotFoundException e) {
                   e.printStackTrace();
                   ErrorType = 1; //trapped in Class.forName
              try{
                   Connection c = DriverManager.getConnection(url);
              } catch (SQLException e) {
                   e.printStackTrace();
                   ErrorType = 2; //trapped in DriverManager.getConnection
                   err = e.getMessage();
         public void service(HttpServletRequest req, HttpServletResponse res)
                   throws IOException {
              res.setContentType("text/html; charset=GB2312");
              PrintWriter out = res.getWriter();
              out.println("Success " + "<p>" + ErrorType + "<p>" +err);
              out.close();
    //////////////////////////code ends///////////////////////////////
    The result from the Servlet tell me that the problem occurred within the connection process, I don't know who should be responsible to this - Tomcat or JDBC?

    If you could print the exception that you got then that would help :) In the mean time, I could make a guess. It is unlikely that your application server (in this case, Tomcat) is blocking connections from your servlet. So the problem is either with JDBC directly or with the underlying datasource. It seems unlikely that it is JDBC given that you have stated that the code has not changed and it works in application form.
    My guess would be that you are coming up against some sort of security constraint (eg: your DBMS is letting you log in from one IP but not another?, your Java plug-in security policy is disallowing the connection?). It's hard to say.
    But if it works as an application but not via a servlet then you could try putting this in your java.policy file, which is located in the directory where your plug-ins are installed (eg: "C:\Program Files\Java\<version>\lib\security\") on Windows systems;
    permission java.net.SocketPermission "bend xp:1099", "listen,connect,accept";
    Try that, see if it works :)
    Ben

  • Connection Problem with Oracle and Tomcat.

    I was able to enter Oracle using scott/tiger when I did not connect Tomcat.But when I connect tomcat I am unable to log onto Oracle.
    When I logged to the database then I tried to start the Tomcat but it gave an exception.So I went to the task manager and ended the running processes like isqlplus.exe, oracle.exe, tomcat.exe, apache.exe.When I ended all the processes except oracle.exe, tomcat gave an exception. But when I ended oracle.exe Tomcat started working but Oracle stopped working. I don't know what the problem is.
    Can anyone help me out?
    Thanks,
    Sravanthi.

    > Can anyone help me out?
    Yeah sure. Is there a SQL or PL/SQL related question in there.. somewhere.. hiding away?
    After all, you do realise that the name of this forum is SQL and PL/SQL and that it deals with the SQL and PL/SQL languages in the Oracle server.. right?

  • Problem with ssl and tomcat

    Hi to all, I'm trying to do ssl in a intranet. I have tomcat 4.1 and JDK 4.1_02. I have following all steps thats indicate the tomcat ssl documentation, I have copied the jcert.jar jnet.jar and jsse.jar to the directorie jre\lib\ext I have generated the keystore and verisign have sent me the keys. I have modified the server.xml where I have put the new port and the factory tag but I cannot see a page through https.
    I have port 8080 that redirects to 8443, which have the scheme=https.
    if I put http:\\localhost:8080 appear the tomcat home page.
    if I put https:\\localhost:8443 not appear nothing.
    if I put http:\\localhost:8443 not appear error but don't show nothing.
    I have seen the log of tomcat and appear an exception:
    org.apache.commons.digester.Digester error
    Parse Error al line 89 column 11: the content element type "web-app" must match (icon?,display-name?....
    this exception don't appear previously,it seems that is a problem of xerces.
    Any idea or help it is welcome.
    THANKS.

    Obviously you have a syntax error in your one of your .xml files. Most likely in either the global web.xml or the application specific one.

  • Problem with jsp and tomcat

    Hi ,
    I am trying to retrieve data from mysql server using Tomcat webserver of java web services developers pack. i wrote an html page that sends the account_no and password of my program to a JSP page which retrieve data from MySQL server to check whether the account no and password is valid or not . but when i start tomcat and run the html page and submit the onformation the Tomcat gives an error. i am attaching my full programs here. please someone help me.
    mybank.html:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE> My Bank </TITLE>
    </HEAD>
    <BODY>
    <h1>Please Enter Your Account Number and Password</h1>
    <form action="mybank.jsp" method="post">
    <h2>Account Number:</h2>
    <input type="text" name="accno" maxlength="10" size="10"></br>
    <h2>Password:</h2>
    <input type="text" name="pass" maxlength="8" size="8"></br>
    <input type="submit" value="SUBMIT YOUR INFO">
    </form>
    </body>
    </html>
    mybank.jsp:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <%@ page import="java.sql.*" %>
    <HTML>
    <HEAD>
    <TITLE> My Bank JSP </TITLE>
    </HEAD>
    <BODY>
    <% int acc_no = request.getParameter("accno");
    String password=request.getParameter("pass");
    class.forName(com.mysql.jdbc.Driver);
    Connection con= DriveManager.getConnection("jdbc:mysql:///password","root", "firehouse" );
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT account_no, password FROM pass WHERE password ='password' && account_no='acc_no' ");
    while(rs.next())
    int account=rs.getInt(1);
              String passw=rs.getString(2);
    if(rs!=null)
    rs.close();
    if(stmt!=null)
    stmt.close();
    if(con!=null)
    con.close();
    %>
    <h2>Accountno:<%= account %></h2>
    <h2>Password:<%= passw %></h2>
    </BODY>
    </HTML>
    i am getting this error:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    No Java compiler was found to compile the generated source for the JSP.
    This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK
    to the common/lib directory of the Tomcat server, followed by a Tomcat restart.
    If using an alternate Java compiler, please check its installation and access path.
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:128)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:348)
    org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:455)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:300)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:293)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    but i already set up the java compiler though i m getting this error. please help me.

    You say you have set up the environment variables, but it is not working. You may have them set to the wrong thing. One common mistake is to point JAVA_HOME at the java/bin directory rather than just the /java directory.
    Another set of eyes finds small mistakes in the variables that you might not spot yourself.
    So please, post:
    The values of these environment variables
    The path to where the products are installed on your system (ie is it c:\java or c:\j2se1_4_2 or c:\program files?
    I would take another close look at that JAVA_HOME variable to make sure of it :-)
    Good luck,
    evnafets

  • Again problem with servlet and Tomcat

    My files are:
    webapps\greeting\src\GreetingServlet.java
    ................\index.html
    ................\WEB-INF\classes\GreetingServlet.class
    ........................\web.xml
    Url:http//:localhost:8080/greeting/ shows index.html but when i submit
    it showing
    HTTP Status 404 - /greeting/servlet/GreetingServlet
    type: Status report
    message: /greeting/servlet/GreetingServlet
    description: The requested resource (/greeting/servlet/GreetingServlet) is not available.
    Source code:
    1.index.html:
    <HTML>
         <HEAD>
              <TITLE>ProJava Registration</TITLE>
         </HEAD>
         <BODY>
              <H1>Welcome</H1>
              <FORM ACTION ="/greeting/servlet/GreetingServlet" METHOD= "POST">
                   <p>Your Name <INPUT TYPE= "text" SIZE= "40" NAME= "name" ></p>
                   <p>Your Email <INPUT TYPE= "text" SIZE= "40" NAME="email">
                   <INPUT TYPE= "submit" VALUE= "Submit" ></p>
              </FORM>
         </BODY>
    </HTML>
    2.GreetingServlet.java:
    import javax.servlet.* ;
    import javax.servlet.http.* ;
    import java.io.* ;
    import java.util.* ;
    public class GreetingServlet extends HttpServlet{
    protected void doPost (HttpServletRequest request,
                   HttpServletResponse response)
                        throws ServletException, IOException {
         String name = request.getParameter ("name");
         String email = request.getParameter ("email");
         String message = null;
         GregorianCalendar calendar = new GregorianCalendar();
         if (calendar.get(Calendar.AM_PM) == Calendar.AM) {
              message =" Good Morning";
         else {
              message = " Good Afternoon";
         response.setContentType("text/html");
         PrintWriter out = response.getWriter();
         out .println("<HTML>");
         out .println("<BODY>");
         out .println("<p>"+message +","+name+"</p>");
         out .println("<p> Thanks ("+email+")</p>");
         out .println("<p> -The Pro Java Team.</p>");
         out .println("</BODY>");
         out .println("</HTML>");
         out .close();
    Please help me
    Thanks in advance Also thanks to st.

    Hi,
    I think you have to change server.xml, which is in conf directory of your tomcat root directory.
    search context in server.xml
    and alter like this
    <Context path="/greetings" docBase="greetings" debug="0"
    reloadable="true" crossContext="true">
    Hope this will help
    Regards
    Sekhar

  • Problems with reports and XML-publisher - No XML

    Hi!
    I'm having a problem with Apps and XML-publisher. I made a report file, which queries some views. When executing in reports, I get all the data I expect.
    Now, when I upload the reportfile to Apps and let it generate XML, my xml-file is empty (well, almost empty)
    <?xml version="1.0" ?>
    <!-- Generated by Oracle Reports version 6.0.8.27.0 -->
    <T03501684>
    <LIST_G_PERSOON>
    <LIST_G_PERSOON />
    </T03501684>
    Anyone who can shed any light upon this problem?

    OK, finally solved the problem... A good night's sleep always helps ;).
    After just trying each queried table one after an other, I found the problem:
    The difference between Oracle Apps (Dutch locale) and the reports builder (English) is the language... And our functional people have changed some names, but the Dutch ones, leaving the english names in place and one of the tables I query has language specific data, which is also appears in a where clause.

Maybe you are looking for

  • Co-Product Lot creation at the time of Process order release.

    Hello All,       I want to map a scenario such that: Whenever a order for material is RELEASED it should generate a LOT for say MAIN product ,CO-PRODUCT & BY-PRODUCT(in shrt also for its BOM). Thanks.

  • Please answer this as soon as possible

    I just downloaded an explicit song, how do you delete it? please respond as soon as possible

  • Using binarize... Getting Tiff Image in Black Background..

    Hi, Basically my subject summarizes my problem, but I am trying to write some text to a blank JPEG file and then create a Tiff file from that JPEG... But When i use the binarize i am getting the image as black background and the resolution is not tha

  • CC to CS6 to CC to CS6 workflow

    I'm on a MacBookPro with a Retina screen. InDesign CS6 looks horrible, and CC looks great. However my designers are all using CS6. My layouts are pretty basic, text and graphics, no fancy moves, no CC specific features. Wondering how realistic it is

  • Using a custom font: Not appearing in Adobe

    I am using a custom font for a project at work. The font has been installed on my machine and works great in other programs (Microsoft Word and Open Office, for example). The font is not displaying on the font list in Flash or Photoshop, however. How