NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Prohibited package name: java.sql.xsd

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
jkurban



Joined: 10 Jun 2009
Posts: 2

PostPosted: Wed Jun 10, 2009 3:10 pm    Post subject: Prohibited package name: java.sql.xsd Reply with quote

Created a web service using netbeans. Works great. Went to create a webservice client to call my web service. Created a new project and added "Web Service Client" just like the instructions:

http://www.netbeans.org/kb/55/websvc-jax-ws-asynch.html

Build my client. Build fine, no errors. But it does produce in the dist directroy 3 files under classes.. java.sql.xsd:

ObjectFactory.class
package-info.class
SQLException.class

When I run my client and make the call to the web service:

WorkOrderServicesPortType port = service.getWorkOrderServicesHttpSoap11Endpoint();

I get the following error from the GENERATED CODE! Why would Netbeans generate a package the violates the java lang spec?

java.lang.SecurityException: Prohibited package name: java.sql.xsd
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:480)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:95)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:107)
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)
at sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:370)
at sun.reflect.annotation.AnnotationParser.parseClassValue(AnnotationParser.java:351)
at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:653)
at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:460)
at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
at java.lang.Class.initAnnotationsIfNecessary(Class.java:3072)
at java.lang.Class.getAnnotation(Class.java:3029)
at com.sun.xml.internal.ws.model.RuntimeModeler$1.run(RuntimeModeler.java:165)
at com.sun.xml.internal.ws.model.RuntimeModeler$1.run(RuntimeModeler.java:163)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.internal.ws.model.RuntimeModeler.getPrivClassAnnotation(RuntimeModeler.java:163)
at com.sun.xml.internal.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:195)
at com.sun.xml.internal.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:588)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:291)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:274)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:267)
at javax.xml.ws.Service.getPort(Service.java:92)
at com.williams.wo.services.WorkOrderServices.getWorkOrderServicesHttpSoap11Endpoint(WorkOrderServices.java:56)
at workorderservicesclient.Main.main(Main.java:25)
Back to top
mkuchtiak
Posted via mailing list.





PostPosted: Thu Jun 11, 2009 9:11 am    Post subject: Prohibited package name: java.sql.xsd Reply with quote

This looks suspicious.
Does it really depend if client is asynchronous or not ?
Is non-asynchronous client working well ?
Can you please send the code of your web service?
What version of JDK do you use ?

Milan

jkurban wrote:
Quote:
Created a web service using netbeans. Works great. Went to create a webservice client to call my web service. Created a new project and added "Web Service Client" just like the instructions:



http://www.netbeans.org/kb/55/websvc-jax-ws-asynch.html



Build my client. Build fine, no errors. But it does produce in the dist directroy 3 files under classes.. java.sql.xsd:



ObjectFactory.class

package-info.class

SQLException.class



When I run my client and make the call to the web service:



WorkOrderServicesPortType port = service.getWorkOrderServicesHttpSoap11Endpoint();



I get the following error from the GENERATED CODE! Why would Netbeans generate a package the violates the java lang spec?



java.lang.SecurityException: Prohibited package name: java.sql.xsd

at java.lang.ClassLoader.preDefineClass(ClassLoader.java:480)

at java.lang.ClassLoader.defineClass(ClassLoader.java:615)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)

at java.net.URLClassLoader.access$000(URLClassLoader.java:56)

at java.net.URLClassLoader$1.run(URLClassLoader.java:195)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

at java.lang.ClassLoader.loadClass(ClassLoader.java:252)

at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:247)

at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:95)

at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:107)

at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)

at sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:370)

at sun.reflect.annotation.AnnotationParser.parseClassValue(AnnotationParser.java:351)

at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:653)

at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:460)

at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286)

at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222)

at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)

at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)

at java.lang.Class.initAnnotationsIfNecessary(Class.java:3072)

at java.lang.Class.getAnnotation(Class.java:3029)

at com.sun.xml.internal.ws.model.RuntimeModeler$1.run(RuntimeModeler.java:165)

at com.sun.xml.internal.ws.model.RuntimeModeler$1.run(RuntimeModeler.java:163)

at java.security.AccessController.doPrivileged(Native Method)

at com.sun.xml.internal.ws.model.RuntimeModeler.getPrivClassAnnotation(RuntimeModeler.java:163)

at com.sun.xml.internal.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:195)

at com.sun.xml.internal.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:588)

at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:291)

at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:274)

at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:267)

at javax.xml.ws.Service.getPort(Service.java:92)

at com.williams.wo.services.WorkOrderServices.getWorkOrderServicesHttpSoap11Endpoint(WorkOrderServices.java:56)

at workorderservicesclient.Main.main(Main.java:25)




Back to top
jkurban



Joined: 10 Jun 2009
Posts: 2

PostPosted: Fri Jun 12, 2009 8:54 pm    Post subject: Reply with quote

Does it really depend if client is asynchronous or not ?
ju: does not need to be asynch

Is non-asynchronous client working well ?
ju: I just want to get a client calling my web service. I saw this example and used it.

Can you please send the code of your web service?
ju: see below

What version of JDK do you use ?
ju; 1.6.0_12

Code:

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.williams.wo.services;

import java.sql.SQLException;
import java.util.GregorianCalendar;
import java.text.SimpleDateFormat;

import com.williams.wo.dao.EmpacDAO;
import com.williams.wo.dao.GmasDAO;
import com.williams.wo.model.WorkOrder;

/**
 *
 * @author jurban1
 */
public class WorkOrderServices {

    SimpleDateFormat sdf = new SimpleDateFormat("yyyymmdd HH:MM");

    public String createGMASWorkOrder(String woName) {
        String result = new String();
        StringBuffer sb_wo = new StringBuffer();

        int returnValue = GmasDAO.GetNextGMASWorkOrderNumber();
        String woNumber = (String) new Integer(returnValue).toString();

   // build sql using sb_wo here

        boolean woCall = GmasDAO.ExecuteGMASCall(sb_wo.toString());

        result = "Sucessful WO Creation";
        return result;
    }

    public WorkOrder[] getEMPACWorkOrders() {
        StringBuffer sb = new StringBuffer();
        WorkOrder[] workOrders = null;

   // build sql using sb here

        try {
            workOrders = EmpacDAO.getEmpacWorkOrders(sb);
        } catch (SQLException ex) {
            ex.printStackTrace();
        }

        return workOrders;
    }

    public String createEMPACWorkOrder(String woName) throws SQLException {

        GregorianCalendar gc = new GregorianCalendar();
        StringBuffer sb = new StringBuffer();

   // build sql sb here

        EmpacDAO.executeEmpacCall(sb);
        return "WorkOrderService|createEMPACWorkOrder|WO Created";
    }
}
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo